agentv 4.44.0-next.1 → 5.1.0-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/README.md +236 -54
  2. package/dist/{agentv-provider-AYXH7WLW-NJRC6UQX.js → agentv-provider-AYXH7WLW-6YZKZ7PS.js} +2 -2
  3. package/dist/{artifact-writer-72MQQELS.js → artifact-writer-IORG7CW5.js} +21 -12
  4. package/dist/{chunk-NPVGBFF6.js → chunk-7BGERE6L.js} +2 -43
  5. package/dist/chunk-7BGERE6L.js.map +1 -0
  6. package/dist/{chunk-CXHYTYHU.js → chunk-AM2IPHKS.js} +3496 -1955
  7. package/dist/chunk-AM2IPHKS.js.map +1 -0
  8. package/dist/{chunk-KAGZRUO6.js → chunk-CBBBRTQ3.js} +127 -80
  9. package/dist/chunk-CBBBRTQ3.js.map +1 -0
  10. package/dist/{chunk-2N3YSEMI.js → chunk-GIRUNQGP.js} +8323 -9226
  11. package/dist/chunk-GIRUNQGP.js.map +1 -0
  12. package/dist/{chunk-NCNDA3F6.js → chunk-GJWPQXHN.js} +1070 -791
  13. package/dist/chunk-GJWPQXHN.js.map +1 -0
  14. package/dist/{chunk-BPGJ4HBU.js → chunk-PEUTJS7B.js} +3 -3
  15. package/dist/{chunk-5H446C7X.js → chunk-QMRVH5ZP.js} +2 -8
  16. package/dist/{chunk-5DYGN547.js → chunk-ZGPCX334.js} +44263 -30424
  17. package/dist/chunk-ZGPCX334.js.map +1 -0
  18. package/dist/cli.js +8 -9
  19. package/dist/cli.js.map +1 -1
  20. package/dist/dashboard/assets/{index-DitffAxS.js → index-BSHoWrdr.js} +1 -1
  21. package/dist/dashboard/assets/index-BaLLxmVO.js +121 -0
  22. package/dist/dashboard/assets/index-zvUKAkKn.css +1 -0
  23. package/dist/dashboard/index.html +2 -2
  24. package/dist/{dist-L4YCQOQ6.js → dist-2D2GBHZV.js} +101 -51
  25. package/dist/{docker-workspace-RPPXBT27-B4AQHVWA.js → docker-workspace-NNK4Z6FR-QRTIG6TM.js} +3 -3
  26. package/dist/{exec-AR6JUUN5-6MBPURPR.js → exec-4HFFRQ3B-AXDMJNLJ.js} +3 -3
  27. package/dist/index.js +8 -9
  28. package/dist/{interactive-DRNRKLEQ.js → interactive-V4SEHLNY.js} +13 -29
  29. package/dist/interactive-V4SEHLNY.js.map +1 -0
  30. package/dist/skills/agentv-bench/SKILL.md +26 -26
  31. package/dist/skills/agentv-bench/agents/analyzer.md +7 -7
  32. package/dist/skills/agentv-bench/agents/comparator.md +4 -5
  33. package/dist/skills/agentv-bench/agents/grader.md +4 -4
  34. package/dist/skills/agentv-bench/references/autoresearch.md +4 -4
  35. package/dist/skills/agentv-bench/references/description-optimization.md +2 -2
  36. package/dist/skills/agentv-bench/references/environment-adaptation.md +10 -10
  37. package/dist/skills/agentv-bench/references/eval-yaml-spec.md +52 -26
  38. package/dist/skills/agentv-bench/references/migrating-from-skill-creator.md +6 -6
  39. package/dist/skills/agentv-bench/references/schemas.md +6 -6
  40. package/dist/skills/agentv-bench/references/subagent-pipeline.md +14 -13
  41. package/dist/skills/agentv-eval-migrations/SKILL.md +33 -0
  42. package/dist/skills/agentv-eval-migrations/references/breaking-changes.md +1013 -0
  43. package/dist/skills/agentv-eval-review/SKILL.md +6 -3
  44. package/dist/skills/agentv-eval-review/scripts/lint_eval.py +1 -1
  45. package/dist/skills/agentv-eval-writer/SKILL.md +329 -200
  46. package/dist/skills/agentv-eval-writer/references/{config-schema.json → config.schema.json} +6 -5
  47. package/dist/skills/agentv-eval-writer/references/custom-evaluators.md +23 -18
  48. package/dist/skills/agentv-eval-writer/references/eval.schema.json +10447 -0
  49. package/dist/skills/agentv-eval-writer/references/python-helpers.md +8 -8
  50. package/dist/skills/agentv-eval-writer/references/rubric-evaluator.md +21 -22
  51. package/dist/skills/agentv-trace-analyst/SKILL.md +4 -4
  52. package/dist/templates/.agentv/targets.yaml +41 -40
  53. package/dist/{ts-eval-loader-S7ESROX2-6CB3HB6H.js → ts-eval-loader-SSPJVEHD-AL2A3V5Z.js} +4 -4
  54. package/package.json +13 -4
  55. package/dist/chunk-2N3YSEMI.js.map +0 -1
  56. package/dist/chunk-5DYGN547.js.map +0 -1
  57. package/dist/chunk-76FOHROU.js +0 -96
  58. package/dist/chunk-76FOHROU.js.map +0 -1
  59. package/dist/chunk-CXHYTYHU.js.map +0 -1
  60. package/dist/chunk-HSHTTN6C.js +0 -565
  61. package/dist/chunk-HSHTTN6C.js.map +0 -1
  62. package/dist/chunk-KAGZRUO6.js.map +0 -1
  63. package/dist/chunk-LRULMAAA.js +0 -1711
  64. package/dist/chunk-LRULMAAA.js.map +0 -1
  65. package/dist/chunk-NCNDA3F6.js.map +0 -1
  66. package/dist/chunk-NPVGBFF6.js.map +0 -1
  67. package/dist/chunk-R3CXYNTN.js +0 -1238
  68. package/dist/chunk-R3CXYNTN.js.map +0 -1
  69. package/dist/chunk-VQ2ZO7XJ.js +0 -2098
  70. package/dist/chunk-VQ2ZO7XJ.js.map +0 -1
  71. package/dist/chunk-XALGXSKB.js +0 -21
  72. package/dist/chunk-XALGXSKB.js.map +0 -1
  73. package/dist/dashboard/assets/index-1Hvy8sBy.js +0 -119
  74. package/dist/dashboard/assets/index-J5sPcQO3.css +0 -1
  75. package/dist/esm-NNMQYIKT.js +0 -32
  76. package/dist/esm-R77SNOF5.js +0 -65
  77. package/dist/esm-RVQPUGWH.js +0 -1207
  78. package/dist/esm-RVQPUGWH.js.map +0 -1
  79. package/dist/esm-TTEMJEVV.js +0 -933
  80. package/dist/esm-TTEMJEVV.js.map +0 -1
  81. package/dist/esm-ZADQ4XQH-QUFGGZL4.js +0 -924
  82. package/dist/esm-ZADQ4XQH-QUFGGZL4.js.map +0 -1
  83. package/dist/exec-AR6JUUN5-6MBPURPR.js.map +0 -1
  84. package/dist/getMachineId-bsd-HSK5LZMG.js +0 -41
  85. package/dist/getMachineId-bsd-HSK5LZMG.js.map +0 -1
  86. package/dist/getMachineId-darwin-4DP6CCJV.js +0 -41
  87. package/dist/getMachineId-darwin-4DP6CCJV.js.map +0 -1
  88. package/dist/getMachineId-linux-44LJ5UJB.js +0 -33
  89. package/dist/getMachineId-linux-44LJ5UJB.js.map +0 -1
  90. package/dist/getMachineId-unsupported-NVK6IATM.js +0 -24
  91. package/dist/getMachineId-unsupported-NVK6IATM.js.map +0 -1
  92. package/dist/getMachineId-win-YZ36S7VA.js +0 -43
  93. package/dist/getMachineId-win-YZ36S7VA.js.map +0 -1
  94. package/dist/interactive-DRNRKLEQ.js.map +0 -1
  95. package/dist/otlp-json-file-exporter-RY63S3IG-PZBQPVYY.js +0 -9
  96. package/dist/otlp-json-file-exporter-RY63S3IG-PZBQPVYY.js.map +0 -1
  97. package/dist/skills/agentv-eval-writer/references/eval-schema.json +0 -17355
  98. package/dist/src-76ISS3LH.js +0 -1733
  99. package/dist/src-76ISS3LH.js.map +0 -1
  100. package/dist/ts-eval-loader-S7ESROX2-6CB3HB6H.js.map +0 -1
  101. /package/dist/{agentv-provider-AYXH7WLW-NJRC6UQX.js.map → agentv-provider-AYXH7WLW-6YZKZ7PS.js.map} +0 -0
  102. /package/dist/{artifact-writer-72MQQELS.js.map → artifact-writer-IORG7CW5.js.map} +0 -0
  103. /package/dist/{chunk-BPGJ4HBU.js.map → chunk-PEUTJS7B.js.map} +0 -0
  104. /package/dist/{chunk-5H446C7X.js.map → chunk-QMRVH5ZP.js.map} +0 -0
  105. /package/dist/{dist-L4YCQOQ6.js.map → dist-2D2GBHZV.js.map} +0 -0
  106. /package/dist/{docker-workspace-RPPXBT27-B4AQHVWA.js.map → docker-workspace-NNK4Z6FR-QRTIG6TM.js.map} +0 -0
  107. /package/dist/{esm-NNMQYIKT.js.map → exec-4HFFRQ3B-AXDMJNLJ.js.map} +0 -0
  108. /package/dist/{esm-R77SNOF5.js.map → ts-eval-loader-SSPJVEHD-AL2A3V5Z.js.map} +0 -0
@@ -1,119 +0,0 @@
1
- var s$=Object.defineProperty;var qO=e=>{throw TypeError(e)};var l$=(e,t,r)=>t in e?s$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ev=(e,t,r)=>l$(e,typeof t!="symbol"?t+"":t,r),tv=(e,t,r)=>t.has(e)||qO("Cannot "+r);var B=(e,t,r)=>(tv(e,t,"read from private field"),r?r.call(e):t.get(e)),je=(e,t,r)=>t.has(e)?qO("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),me=(e,t,r,n)=>(tv(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Te=(e,t,r)=>(tv(e,t,"access private method"),r);var Xf=(e,t,r,n)=>({set _(i){me(e,t,i,r)},get _(){return B(e,t,n)}});function o$(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 as(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var rv={exports:{}},sc={};/**
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 FO;function u$(){if(FO)return sc;FO=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 sc.Fragment=t,sc.jsx=r,sc.jsxs=r,sc}var HO;function c$(){return HO||(HO=1,rv.exports=u$()),rv.exports}var d=c$(),nv={exports:{}},Ee={};/**
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 KO;function d$(){if(KO)return Ee;KO=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"),g=Symbol.iterator;function x(I){return I===null||typeof I!="object"?null:(I=g&&I[g]||I["@@iterator"],typeof I=="function"?I:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,N={};function O(I,Q,oe){this.props=I,this.context=Q,this.refs=N,this.updater=oe||b}O.prototype.isReactComponent={},O.prototype.setState=function(I,Q){if(typeof I!="object"&&typeof I!="function"&&I!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,I,Q,"setState")},O.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function A(){}A.prototype=O.prototype;function T(I,Q,oe){this.props=I,this.context=Q,this.refs=N,this.updater=oe||b}var E=T.prototype=new A;E.constructor=T,w(E,O.prototype),E.isPureReactComponent=!0;var C=Array.isArray;function M(){}var R={H:null,A:null,T:null,S:null},D=Object.prototype.hasOwnProperty;function L(I,Q,oe){var se=oe.ref;return{$$typeof:e,type:I,key:Q,ref:se!==void 0?se:null,props:oe}}function k(I,Q){return L(I.type,Q,I.props)}function F(I){return typeof I=="object"&&I!==null&&I.$$typeof===e}function q(I){var Q={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function(oe){return Q[oe]})}var ie=/\/+/g;function ee(I,Q){return typeof I=="object"&&I!==null&&I.key!=null?q(""+I.key):Q.toString(36)}function ne(I){switch(I.status){case"fulfilled":return I.value;case"rejected":throw I.reason;default:switch(typeof I.status=="string"?I.then(M,M):(I.status="pending",I.then(function(Q){I.status==="pending"&&(I.status="fulfilled",I.value=Q)},function(Q){I.status==="pending"&&(I.status="rejected",I.reason=Q)})),I.status){case"fulfilled":return I.value;case"rejected":throw I.reason}}throw I}function z(I,Q,oe,se,fe){var xe=typeof I;(xe==="undefined"||xe==="boolean")&&(I=null);var Se=!1;if(I===null)Se=!0;else switch(xe){case"bigint":case"string":case"number":Se=!0;break;case"object":switch(I.$$typeof){case e:case t:Se=!0;break;case p:return Se=I._init,z(Se(I._payload),Q,oe,se,fe)}}if(Se)return fe=fe(I),Se=se===""?"."+ee(I,0):se,C(fe)?(oe="",Se!=null&&(oe=Se.replace(ie,"$&/")+"/"),z(fe,Q,oe,"",function(de){return de})):fe!=null&&(F(fe)&&(fe=k(fe,oe+(fe.key==null||I&&I.key===fe.key?"":(""+fe.key).replace(ie,"$&/")+"/")+Se)),Q.push(fe)),1;Se=0;var Re=se===""?".":se+":";if(C(I))for(var ce=0;ce<I.length;ce++)se=I[ce],xe=Re+ee(se,ce),Se+=z(se,Q,oe,xe,fe);else if(ce=x(I),typeof ce=="function")for(I=ce.call(I),ce=0;!(se=I.next()).done;)se=se.value,xe=Re+ee(se,ce++),Se+=z(se,Q,oe,xe,fe);else if(xe==="object"){if(typeof I.then=="function")return z(ne(I),Q,oe,se,fe);throw Q=String(I),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(I).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.")}return Se}function H(I,Q,oe){if(I==null)return I;var se=[],fe=0;return z(I,se,"","",function(xe){return Q.call(oe,xe,fe++)}),se}function Z(I){if(I._status===-1){var Q=I._result;Q=Q(),Q.then(function(oe){(I._status===0||I._status===-1)&&(I._status=1,I._result=oe)},function(oe){(I._status===0||I._status===-1)&&(I._status=2,I._result=oe)}),I._status===-1&&(I._status=0,I._result=Q)}if(I._status===1)return I._result.default;throw I._result}var ae=typeof reportError=="function"?reportError:function(I){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof I=="object"&&I!==null&&typeof I.message=="string"?String(I.message):String(I),error:I});if(!window.dispatchEvent(Q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",I);return}console.error(I)},le={map:H,forEach:function(I,Q,oe){H(I,function(){Q.apply(this,arguments)},oe)},count:function(I){var Q=0;return H(I,function(){Q++}),Q},toArray:function(I){return H(I,function(Q){return Q})||[]},only:function(I){if(!F(I))throw Error("React.Children.only expected to receive a single React element child.");return I}};return Ee.Activity=y,Ee.Children=le,Ee.Component=O,Ee.Fragment=r,Ee.Profiler=i,Ee.PureComponent=T,Ee.StrictMode=n,Ee.Suspense=f,Ee.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=R,Ee.__COMPILER_RUNTIME={__proto__:null,c:function(I){return R.H.useMemoCache(I)}},Ee.cache=function(I){return function(){return I.apply(null,arguments)}},Ee.cacheSignal=function(){return null},Ee.cloneElement=function(I,Q,oe){if(I==null)throw Error("The argument must be a React element, but you passed "+I+".");var se=w({},I.props),fe=I.key;if(Q!=null)for(xe in Q.key!==void 0&&(fe=""+Q.key),Q)!D.call(Q,xe)||xe==="key"||xe==="__self"||xe==="__source"||xe==="ref"&&Q.ref===void 0||(se[xe]=Q[xe]);var xe=arguments.length-2;if(xe===1)se.children=oe;else if(1<xe){for(var Se=Array(xe),Re=0;Re<xe;Re++)Se[Re]=arguments[Re+2];se.children=Se}return L(I.type,fe,se)},Ee.createContext=function(I){return I={$$typeof:o,_currentValue:I,_currentValue2:I,_threadCount:0,Provider:null,Consumer:null},I.Provider=I,I.Consumer={$$typeof:l,_context:I},I},Ee.createElement=function(I,Q,oe){var se,fe={},xe=null;if(Q!=null)for(se in Q.key!==void 0&&(xe=""+Q.key),Q)D.call(Q,se)&&se!=="key"&&se!=="__self"&&se!=="__source"&&(fe[se]=Q[se]);var Se=arguments.length-2;if(Se===1)fe.children=oe;else if(1<Se){for(var Re=Array(Se),ce=0;ce<Se;ce++)Re[ce]=arguments[ce+2];fe.children=Re}if(I&&I.defaultProps)for(se in Se=I.defaultProps,Se)fe[se]===void 0&&(fe[se]=Se[se]);return L(I,xe,fe)},Ee.createRef=function(){return{current:null}},Ee.forwardRef=function(I){return{$$typeof:c,render:I}},Ee.isValidElement=F,Ee.lazy=function(I){return{$$typeof:p,_payload:{_status:-1,_result:I},_init:Z}},Ee.memo=function(I,Q){return{$$typeof:h,type:I,compare:Q===void 0?null:Q}},Ee.startTransition=function(I){var Q=R.T,oe={};R.T=oe;try{var se=I(),fe=R.S;fe!==null&&fe(oe,se),typeof se=="object"&&se!==null&&typeof se.then=="function"&&se.then(M,ae)}catch(xe){ae(xe)}finally{Q!==null&&oe.types!==null&&(Q.types=oe.types),R.T=Q}},Ee.unstable_useCacheRefresh=function(){return R.H.useCacheRefresh()},Ee.use=function(I){return R.H.use(I)},Ee.useActionState=function(I,Q,oe){return R.H.useActionState(I,Q,oe)},Ee.useCallback=function(I,Q){return R.H.useCallback(I,Q)},Ee.useContext=function(I){return R.H.useContext(I)},Ee.useDebugValue=function(){},Ee.useDeferredValue=function(I,Q){return R.H.useDeferredValue(I,Q)},Ee.useEffect=function(I,Q){return R.H.useEffect(I,Q)},Ee.useEffectEvent=function(I){return R.H.useEffectEvent(I)},Ee.useId=function(){return R.H.useId()},Ee.useImperativeHandle=function(I,Q,oe){return R.H.useImperativeHandle(I,Q,oe)},Ee.useInsertionEffect=function(I,Q){return R.H.useInsertionEffect(I,Q)},Ee.useLayoutEffect=function(I,Q){return R.H.useLayoutEffect(I,Q)},Ee.useMemo=function(I,Q){return R.H.useMemo(I,Q)},Ee.useOptimistic=function(I,Q){return R.H.useOptimistic(I,Q)},Ee.useReducer=function(I,Q,oe){return R.H.useReducer(I,Q,oe)},Ee.useRef=function(I){return R.H.useRef(I)},Ee.useState=function(I){return R.H.useState(I)},Ee.useSyncExternalStore=function(I,Q,oe){return R.H.useSyncExternalStore(I,Q,oe)},Ee.useTransition=function(){return R.H.useTransition()},Ee.version="19.2.4",Ee}var GO;function ru(){return GO||(GO=1,nv.exports=d$()),nv.exports}var S=ru();const Bo=as(S),f$=o$({__proto__:null,default:Bo},[S]);var av={exports:{}},lc={},iv={exports:{}},sv={};/**
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 YO;function h$(){return YO||(YO=1,(function(e){function t(z,H){var Z=z.length;z.push(H);e:for(;0<Z;){var ae=Z-1>>>1,le=z[ae];if(0<i(le,H))z[ae]=H,z[Z]=le,Z=ae;else break e}}function r(z){return z.length===0?null:z[0]}function n(z){if(z.length===0)return null;var H=z[0],Z=z.pop();if(Z!==H){z[0]=Z;e:for(var ae=0,le=z.length,I=le>>>1;ae<I;){var Q=2*(ae+1)-1,oe=z[Q],se=Q+1,fe=z[se];if(0>i(oe,Z))se<le&&0>i(fe,oe)?(z[ae]=fe,z[se]=Z,ae=se):(z[ae]=oe,z[Q]=Z,ae=Q);else if(se<le&&0>i(fe,Z))z[ae]=fe,z[se]=Z,ae=se;else break e}}return H}function i(z,H){var Z=z.sortIndex-H.sortIndex;return Z!==0?Z:z.id-H.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,g=3,x=!1,b=!1,w=!1,N=!1,O=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function E(z){for(var H=r(h);H!==null;){if(H.callback===null)n(h);else if(H.startTime<=z)n(h),H.sortIndex=H.expirationTime,t(f,H);else break;H=r(h)}}function C(z){if(w=!1,E(z),!b)if(r(f)!==null)b=!0,M||(M=!0,q());else{var H=r(h);H!==null&&ne(C,H.startTime-z)}}var M=!1,R=-1,D=5,L=-1;function k(){return N?!0:!(e.unstable_now()-L<D)}function F(){if(N=!1,M){var z=e.unstable_now();L=z;var H=!0;try{e:{b=!1,w&&(w=!1,A(R),R=-1),x=!0;var Z=g;try{t:{for(E(z),y=r(f);y!==null&&!(y.expirationTime>z&&k());){var ae=y.callback;if(typeof ae=="function"){y.callback=null,g=y.priorityLevel;var le=ae(y.expirationTime<=z);if(z=e.unstable_now(),typeof le=="function"){y.callback=le,E(z),H=!0;break t}y===r(f)&&n(f),E(z)}else n(f);y=r(f)}if(y!==null)H=!0;else{var I=r(h);I!==null&&ne(C,I.startTime-z),H=!1}}break e}finally{y=null,g=Z,x=!1}H=void 0}}finally{H?q():M=!1}}}var q;if(typeof T=="function")q=function(){T(F)};else if(typeof MessageChannel<"u"){var ie=new MessageChannel,ee=ie.port2;ie.port1.onmessage=F,q=function(){ee.postMessage(null)}}else q=function(){O(F,0)};function ne(z,H){R=O(function(){z(e.unstable_now())},H)}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(z){z.callback=null},e.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<z?Math.floor(1e3/z):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(z){switch(g){case 1:case 2:case 3:var H=3;break;default:H=g}var Z=g;g=H;try{return z()}finally{g=Z}},e.unstable_requestPaint=function(){N=!0},e.unstable_runWithPriority=function(z,H){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var Z=g;g=z;try{return H()}finally{g=Z}},e.unstable_scheduleCallback=function(z,H,Z){var ae=e.unstable_now();switch(typeof Z=="object"&&Z!==null?(Z=Z.delay,Z=typeof Z=="number"&&0<Z?ae+Z:ae):Z=ae,z){case 1:var le=-1;break;case 2:le=250;break;case 5:le=1073741823;break;case 4:le=1e4;break;default:le=5e3}return le=Z+le,z={id:p++,callback:H,priorityLevel:z,startTime:Z,expirationTime:le,sortIndex:-1},Z>ae?(z.sortIndex=Z,t(h,z),r(f)===null&&z===r(h)&&(w?(A(R),R=-1):w=!0,ne(C,Z-ae))):(z.sortIndex=le,t(f,z),b||x||(b=!0,M||(M=!0,q()))),z},e.unstable_shouldYield=k,e.unstable_wrapCallback=function(z){var H=g;return function(){var Z=g;g=H;try{return z.apply(this,arguments)}finally{g=Z}}}})(sv)),sv}var VO;function m$(){return VO||(VO=1,iv.exports=h$()),iv.exports}var lv={exports:{}},hr={};/**
26
- * @license React
27
- * react-dom.production.js
28
- *
29
- * Copyright (c) Meta Platforms, Inc. and affiliates.
30
- *
31
- * This source code is licensed under the MIT license found in the
32
- * LICENSE file in the root directory of this source tree.
33
- */var QO;function p$(){if(QO)return hr;QO=1;var e=ru();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 hr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,hr.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)},hr.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()}},hr.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))},hr.prefetchDNS=function(f){typeof f=="string"&&n.d.D(f)},hr.preinit=function(f,h){if(typeof f=="string"&&h&&typeof h.as=="string"){var p=h.as,y=c(p,h.crossOrigin),g=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:g,fetchPriority:x}):p==="script"&&n.d.X(f,{crossOrigin:y,integrity:g,fetchPriority:x,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},hr.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)},hr.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})}},hr.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)},hr.requestFormReset=function(f){n.d.r(f)},hr.unstable_batchedUpdates=function(f,h){return f(h)},hr.useFormState=function(f,h,p){return o.H.useFormState(f,h,p)},hr.useFormStatus=function(){return o.H.useHostTransitionStatus()},hr.version="19.2.4",hr}var XO;function g2(){if(XO)return lv.exports;XO=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),lv.exports=p$(),lv.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 WO;function y$(){if(WO)return lc;WO=1;var e=m$(),t=ru(),r=g2();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 v=u.return;if(v===null)break;var j=v.alternate;if(j===null){if(m=v.return,m!==null){u=m;continue}break}if(v.child===j.child){for(j=v.child;j;){if(j===u)return f(v),a;if(j===m)return f(v),s;j=j.sibling}throw Error(n(188))}if(u.return!==m.return)u=v,m=j;else{for(var _=!1,P=v.child;P;){if(P===u){_=!0,u=v,m=j;break}if(P===m){_=!0,m=v,u=j;break}P=P.sibling}if(!_){for(P=j.child;P;){if(P===u){_=!0,u=j,m=v;break}if(P===m){_=!0,m=j,u=v;break}P=P.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,g=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),T=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),L=Symbol.for("react.activity"),k=Symbol.for("react.memo_cache_sentinel"),F=Symbol.iterator;function q(a){return a===null||typeof a!="object"?null:(a=F&&a[F]||a["@@iterator"],typeof a=="function"?a:null)}var ie=Symbol.for("react.client.reference");function ee(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===ie?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case w:return"Fragment";case O:return"Profiler";case N:return"StrictMode";case C:return"Suspense";case M:return"SuspenseList";case L:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case b:return"Portal";case T:return a.displayName||"Context";case A:return(a._context.displayName||"Context")+".Consumer";case E:var s=a.render;return a=a.displayName,a||(a=s.displayName||s.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case R:return s=a.displayName||null,s!==null?s:ee(a.type)||"Memo";case D:s=a._payload,a=a._init;try{return ee(a(s))}catch{}}return null}var ne=Array.isArray,z=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z={pending:!1,data:null,method:null,action:null},ae=[],le=-1;function I(a){return{current:a}}function Q(a){0>le||(a.current=ae[le],ae[le]=null,le--)}function oe(a,s){le++,ae[le]=a.current,a.current=s}var se=I(null),fe=I(null),xe=I(null),Se=I(null);function Re(a,s){switch(oe(xe,s),oe(fe,a),oe(se,null),s.nodeType){case 9:case 11:a=(a=s.documentElement)&&(a=a.namespaceURI)?dO(a):0;break;default:if(a=s.tagName,s=s.namespaceURI)s=dO(s),a=fO(s,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}Q(se),oe(se,a)}function ce(){Q(se),Q(fe),Q(xe)}function de(a){a.memoizedState!==null&&oe(Se,a);var s=se.current,u=fO(s,a.type);s!==u&&(oe(fe,a),oe(se,u))}function Oe(a){fe.current===a&&(Q(se),Q(fe)),Se.current===a&&(Q(Se),rc._currentValue=Z)}var ue,gt;function Pe(a){if(ue===void 0)try{throw Error()}catch(u){var s=u.stack.trim().match(/\n( *(at )?)/);ue=s&&s[1]||"",gt=-1<u.stack.indexOf(`
42
- at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+ue+a+gt}var vt=!1;function xt(a,s){if(!a||vt)return"";vt=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var m={DetermineComponentFrameRoot:function(){try{if(s){var re=function(){throw Error()};if(Object.defineProperty(re.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(re,[])}catch(W){var X=W}Reflect.construct(a,[],re)}else{try{re.call()}catch(W){X=W}a.call(re.prototype)}}else{try{throw Error()}catch(W){X=W}(re=a())&&typeof re.catch=="function"&&re.catch(function(){})}}catch(W){if(W&&X&&typeof W.stack=="string")return[W.stack,X.stack]}return[null,null]}};m.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var v=Object.getOwnPropertyDescriptor(m.DetermineComponentFrameRoot,"name");v&&v.configurable&&Object.defineProperty(m.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var j=m.DetermineComponentFrameRoot(),_=j[0],P=j[1];if(_&&P){var $=_.split(`
44
- `),Y=P.split(`
45
- `);for(v=m=0;m<$.length&&!$[m].includes("DetermineComponentFrameRoot");)m++;for(;v<Y.length&&!Y[v].includes("DetermineComponentFrameRoot");)v++;if(m===$.length||v===Y.length)for(m=$.length-1,v=Y.length-1;1<=m&&0<=v&&$[m]!==Y[v];)v--;for(;1<=m&&0<=v;m--,v--)if($[m]!==Y[v]){if(m!==1||v!==1)do if(m--,v--,0>v||$[m]!==Y[v]){var J=`
46
- `+$[m].replace(" at new "," at ");return a.displayName&&J.includes("<anonymous>")&&(J=J.replace("<anonymous>",a.displayName)),J}while(1<=m&&0<=v);break}}}finally{vt=!1,Error.prepareStackTrace=u}return(u=a?a.displayName||a.name:"")?Pe(u):""}function Ht(a,s){switch(a.tag){case 26:case 27:case 5:return Pe(a.type);case 16:return Pe("Lazy");case 13:return a.child!==s&&s!==null?Pe("Suspense Fallback"):Pe("Suspense");case 19:return Pe("SuspenseList");case 0:case 15:return xt(a.type,!1);case 11:return xt(a.type.render,!1);case 1:return xt(a.type,!0);case 31:return Pe("Activity");default:return""}}function he(a){try{var s="",u=null;do s+=Ht(a,u),u=a,a=a.return;while(a);return s}catch(m){return`
47
- Error generating stack: `+m.message+`
48
- `+m.stack}}var _t=Object.prototype.hasOwnProperty,hu=e.unstable_scheduleCallback,Sl=e.unstable_cancelCallback,Up=e.unstable_shouldYield,Td=e.unstable_requestPaint,Me=e.unstable_now,fr=e.unstable_getCurrentPriorityLevel,Kn=e.unstable_ImmediatePriority,Pd=e.unstable_UserBlockingPriority,Md=e.unstable_NormalPriority,U5=e.unstable_LowPriority,Kw=e.unstable_IdlePriority,q5=e.log,F5=e.unstable_setDisableYieldValue,mu=null,Kr=null;function ii(a){if(typeof q5=="function"&&F5(a),Kr&&typeof Kr.setStrictMode=="function")try{Kr.setStrictMode(mu,a)}catch{}}var Gr=Math.clz32?Math.clz32:G5,H5=Math.log,K5=Math.LN2;function G5(a){return a>>>=0,a===0?32:31-(H5(a)/K5|0)|0}var Rd=256,Dd=262144,kd=4194304;function ls(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 Id(a,s,u){var m=a.pendingLanes;if(m===0)return 0;var v=0,j=a.suspendedLanes,_=a.pingedLanes;a=a.warmLanes;var P=m&134217727;return P!==0?(m=P&~j,m!==0?v=ls(m):(_&=P,_!==0?v=ls(_):u||(u=P&~a,u!==0&&(v=ls(u))))):(P=m&~j,P!==0?v=ls(P):_!==0?v=ls(_):u||(u=m&~a,u!==0&&(v=ls(u)))),v===0?0:s!==0&&s!==v&&(s&j)===0&&(j=v&-v,u=s&-s,j>=u||j===32&&(u&4194048)!==0)?s:v}function pu(a,s){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&s)===0}function Y5(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 Gw(){var a=kd;return kd<<=1,(kd&62914560)===0&&(kd=4194304),a}function qp(a){for(var s=[],u=0;31>u;u++)s.push(a);return s}function yu(a,s){a.pendingLanes|=s,s!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function V5(a,s,u,m,v,j){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 P=a.entanglements,$=a.expirationTimes,Y=a.hiddenUpdates;for(u=_&~u;0<u;){var J=31-Gr(u),re=1<<J;P[J]=0,$[J]=-1;var X=Y[J];if(X!==null)for(Y[J]=null,J=0;J<X.length;J++){var W=X[J];W!==null&&(W.lane&=-536870913)}u&=~re}m!==0&&Yw(a,m,0),j!==0&&v===0&&a.tag!==0&&(a.suspendedLanes|=j&~(_&~s))}function Yw(a,s,u){a.pendingLanes|=s,a.suspendedLanes&=~s;var m=31-Gr(s);a.entangledLanes|=s,a.entanglements[m]=a.entanglements[m]|1073741824|u&261930}function Vw(a,s){var u=a.entangledLanes|=s;for(a=a.entanglements;u;){var m=31-Gr(u),v=1<<m;v&s|a[m]&s&&(a[m]|=s),u&=~v}}function Qw(a,s){var u=s&-s;return u=(u&42)!==0?1:Fp(u),(u&(a.suspendedLanes|s))!==0?0:u}function Fp(a){switch(a){case 2:a=1;break;case 8:a=4;break;case 32:a=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:a=128;break;case 268435456:a=134217728;break;default:a=0}return a}function Hp(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function Xw(){var a=H.p;return a!==0?a:(a=window.event,a===void 0?32:kO(a.type))}function Ww(a,s){var u=H.p;try{return H.p=a,s()}finally{H.p=u}}var si=Math.random().toString(36).slice(2),tr="__reactFiber$"+si,Pr="__reactProps$"+si,Nl="__reactContainer$"+si,Kp="__reactEvents$"+si,Q5="__reactListeners$"+si,X5="__reactHandles$"+si,Zw="__reactResources$"+si,gu="__reactMarker$"+si;function Gp(a){delete a[tr],delete a[Pr],delete a[Kp],delete a[Q5],delete a[X5]}function Ol(a){var s=a[tr];if(s)return s;for(var u=a.parentNode;u;){if(s=u[Nl]||u[tr]){if(u=s.alternate,s.child!==null||u!==null&&u.child!==null)for(a=xO(a);a!==null;){if(u=a[tr])return u;a=xO(a)}return s}a=u,u=a.parentNode}return null}function _l(a){if(a=a[tr]||a[Nl]){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 El(a){var s=a[Zw];return s||(s=a[Zw]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function Kt(a){a[gu]=!0}var Jw=new Set,eS={};function os(a,s){Al(a,s),Al(a+"Capture",s)}function Al(a,s){for(eS[a]=s,a=0;a<s.length;a++)Jw.add(s[a])}var W5=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]*$"),tS={},rS={};function Z5(a){return _t.call(rS,a)?!0:_t.call(tS,a)?!1:W5.test(a)?rS[a]=!0:(tS[a]=!0,!1)}function Ld(a,s,u){if(Z5(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 $d(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 pa(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 on(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function nS(a){var s=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function J5(a,s,u){var m=Object.getOwnPropertyDescriptor(a.constructor.prototype,s);if(!a.hasOwnProperty(s)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var v=m.get,j=m.set;return Object.defineProperty(a,s,{configurable:!0,get:function(){return v.call(this)},set:function(_){u=""+_,j.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 Yp(a){if(!a._valueTracker){var s=nS(a)?"checked":"value";a._valueTracker=J5(a,s,""+a[s])}}function aS(a){if(!a)return!1;var s=a._valueTracker;if(!s)return!0;var u=s.getValue(),m="";return a&&(m=nS(a)?a.checked?"true":"false":a.value),a=m,a!==u?(s.setValue(a),!0):!1}function zd(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 eI=/[\n"\\]/g;function un(a){return a.replace(eI,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function Vp(a,s,u,m,v,j,_,P){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=""+on(s)):a.value!==""+on(s)&&(a.value=""+on(s)):_!=="submit"&&_!=="reset"||a.removeAttribute("value"),s!=null?Qp(a,_,on(s)):u!=null?Qp(a,_,on(u)):m!=null&&a.removeAttribute("value"),v==null&&j!=null&&(a.defaultChecked=!!j),v!=null&&(a.checked=v&&typeof v!="function"&&typeof v!="symbol"),P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?a.name=""+on(P):a.removeAttribute("name")}function iS(a,s,u,m,v,j,_,P){if(j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"&&(a.type=j),s!=null||u!=null){if(!(j!=="submit"&&j!=="reset"||s!=null)){Yp(a);return}u=u!=null?""+on(u):"",s=s!=null?""+on(s):u,P||s===a.value||(a.value=s),a.defaultValue=s}m=m??v,m=typeof m!="function"&&typeof m!="symbol"&&!!m,a.checked=P?a.checked:!!m,a.defaultChecked=!!m,_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(a.name=_),Yp(a)}function Qp(a,s,u){s==="number"&&zd(a.ownerDocument)===a||a.defaultValue===""+u||(a.defaultValue=""+u)}function Cl(a,s,u,m){if(a=a.options,s){s={};for(var v=0;v<u.length;v++)s["$"+u[v]]=!0;for(u=0;u<a.length;u++)v=s.hasOwnProperty("$"+a[u].value),a[u].selected!==v&&(a[u].selected=v),v&&m&&(a[u].defaultSelected=!0)}else{for(u=""+on(u),s=null,v=0;v<a.length;v++){if(a[v].value===u){a[v].selected=!0,m&&(a[v].defaultSelected=!0);return}s!==null||a[v].disabled||(s=a[v])}s!==null&&(s.selected=!0)}}function sS(a,s,u){if(s!=null&&(s=""+on(s),s!==a.value&&(a.value=s),u==null)){a.defaultValue!==s&&(a.defaultValue=s);return}a.defaultValue=u!=null?""+on(u):""}function lS(a,s,u,m){if(s==null){if(m!=null){if(u!=null)throw Error(n(92));if(ne(m)){if(1<m.length)throw Error(n(93));m=m[0]}u=m}u==null&&(u=""),s=u}u=on(s),a.defaultValue=u,m=a.textContent,m===u&&m!==""&&m!==null&&(a.value=m),Yp(a)}function Tl(a,s){if(s){var u=a.firstChild;if(u&&u===a.lastChild&&u.nodeType===3){u.nodeValue=s;return}}a.textContent=s}var tI=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function oS(a,s,u){var m=s.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?m?a.setProperty(s,""):s==="float"?a.cssFloat="":a[s]="":m?a.setProperty(s,u):typeof u!="number"||u===0||tI.has(s)?s==="float"?a.cssFloat=u:a[s]=(""+u).trim():a[s]=u+"px"}function uS(a,s,u){if(s!=null&&typeof s!="object")throw Error(n(62));if(a=a.style,u!=null){for(var m in u)!u.hasOwnProperty(m)||s!=null&&s.hasOwnProperty(m)||(m.indexOf("--")===0?a.setProperty(m,""):m==="float"?a.cssFloat="":a[m]="");for(var v in s)m=s[v],s.hasOwnProperty(v)&&u[v]!==m&&oS(a,v,m)}else for(var j in s)s.hasOwnProperty(j)&&oS(a,j,s[j])}function Xp(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 rI=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"]]),nI=/^[\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 Bd(a){return nI.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}function ya(){}var Wp=null;function Zp(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var Pl=null,Ml=null;function cS(a){var s=_l(a);if(s&&(a=s.stateNode)){var u=a[Pr]||null;e:switch(a=s.stateNode,s.type){case"input":if(Vp(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="'+un(""+s)+'"][type="radio"]'),s=0;s<u.length;s++){var m=u[s];if(m!==a&&m.form===a.form){var v=m[Pr]||null;if(!v)throw Error(n(90));Vp(m,v.value,v.defaultValue,v.defaultValue,v.checked,v.defaultChecked,v.type,v.name)}}for(s=0;s<u.length;s++)m=u[s],m.form===a.form&&aS(m)}break e;case"textarea":sS(a,u.value,u.defaultValue);break e;case"select":s=u.value,s!=null&&Cl(a,!!u.multiple,s,!1)}}}var Jp=!1;function dS(a,s,u){if(Jp)return a(s,u);Jp=!0;try{var m=a(s);return m}finally{if(Jp=!1,(Pl!==null||Ml!==null)&&(Af(),Pl&&(s=Pl,a=Ml,Ml=Pl=null,cS(s),a)))for(s=0;s<a.length;s++)cS(a[s])}}function xu(a,s){var u=a.stateNode;if(u===null)return null;var m=u[Pr]||null;if(m===null)return null;u=m[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(m=!m.disabled)||(a=a.type,m=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!m;break e;default:a=!1}if(a)return null;if(u&&typeof u!="function")throw Error(n(231,s,typeof u));return u}var ga=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ey=!1;if(ga)try{var bu={};Object.defineProperty(bu,"passive",{get:function(){ey=!0}}),window.addEventListener("test",bu,bu),window.removeEventListener("test",bu,bu)}catch{ey=!1}var li=null,ty=null,Ud=null;function fS(){if(Ud)return Ud;var a,s=ty,u=s.length,m,v="value"in li?li.value:li.textContent,j=v.length;for(a=0;a<u&&s[a]===v[a];a++);var _=u-a;for(m=1;m<=_&&s[u-m]===v[j-m];m++);return Ud=v.slice(a,1<m?1-m:void 0)}function qd(a){var s=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&s===13&&(a=13)):a=s,a===10&&(a=13),32<=a||a===13?a:0}function Fd(){return!0}function hS(){return!1}function Mr(a){function s(u,m,v,j,_){this._reactName=u,this._targetInst=v,this.type=m,this.nativeEvent=j,this.target=_,this.currentTarget=null;for(var P in a)a.hasOwnProperty(P)&&(u=a[P],this[P]=u?u(j):j[P]);return this.isDefaultPrevented=(j.defaultPrevented!=null?j.defaultPrevented:j.returnValue===!1)?Fd:hS,this.isPropagationStopped=hS,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 us={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Hd=Mr(us),ju=y({},us,{view:0,detail:0}),aI=Mr(ju),ry,ny,wu,Kd=y({},ju,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:iy,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!==wu&&(wu&&a.type==="mousemove"?(ry=a.screenX-wu.screenX,ny=a.screenY-wu.screenY):ny=ry=0,wu=a),ry)},movementY:function(a){return"movementY"in a?a.movementY:ny}}),mS=Mr(Kd),iI=y({},Kd,{dataTransfer:0}),sI=Mr(iI),lI=y({},ju,{relatedTarget:0}),ay=Mr(lI),oI=y({},us,{animationName:0,elapsedTime:0,pseudoElement:0}),uI=Mr(oI),cI=y({},us,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),dI=Mr(cI),fI=y({},us,{data:0}),pS=Mr(fI),hI={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},mI={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"},pI={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function yI(a){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(a):(a=pI[a])?!!s[a]:!1}function iy(){return yI}var gI=y({},ju,{key:function(a){if(a.key){var s=hI[a.key]||a.key;if(s!=="Unidentified")return s}return a.type==="keypress"?(a=qd(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?mI[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:iy,charCode:function(a){return a.type==="keypress"?qd(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?qd(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),vI=Mr(gI),xI=y({},Kd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),yS=Mr(xI),bI=y({},ju,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:iy}),jI=Mr(bI),wI=y({},us,{propertyName:0,elapsedTime:0,pseudoElement:0}),SI=Mr(wI),NI=y({},Kd,{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}),OI=Mr(NI),_I=y({},us,{newState:0,oldState:0}),EI=Mr(_I),AI=[9,13,27,32],sy=ga&&"CompositionEvent"in window,Su=null;ga&&"documentMode"in document&&(Su=document.documentMode);var CI=ga&&"TextEvent"in window&&!Su,gS=ga&&(!sy||Su&&8<Su&&11>=Su),vS=" ",xS=!1;function bS(a,s){switch(a){case"keyup":return AI.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jS(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var Rl=!1;function TI(a,s){switch(a){case"compositionend":return jS(s);case"keypress":return s.which!==32?null:(xS=!0,vS);case"textInput":return a=s.data,a===vS&&xS?null:a;default:return null}}function PI(a,s){if(Rl)return a==="compositionend"||!sy&&bS(a,s)?(a=fS(),Ud=ty=li=null,Rl=!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 gS&&s.locale!=="ko"?null:s.data;default:return null}}var MI={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 wS(a){var s=a&&a.nodeName&&a.nodeName.toLowerCase();return s==="input"?!!MI[a.type]:s==="textarea"}function SS(a,s,u,m){Pl?Ml?Ml.push(m):Ml=[m]:Pl=m,s=kf(s,"onChange"),0<s.length&&(u=new Hd("onChange","change",null,u,m),a.push({event:u,listeners:s}))}var Nu=null,Ou=null;function RI(a){iO(a,0)}function Gd(a){var s=vu(a);if(aS(s))return a}function NS(a,s){if(a==="change")return s}var OS=!1;if(ga){var ly;if(ga){var oy="oninput"in document;if(!oy){var _S=document.createElement("div");_S.setAttribute("oninput","return;"),oy=typeof _S.oninput=="function"}ly=oy}else ly=!1;OS=ly&&(!document.documentMode||9<document.documentMode)}function ES(){Nu&&(Nu.detachEvent("onpropertychange",AS),Ou=Nu=null)}function AS(a){if(a.propertyName==="value"&&Gd(Ou)){var s=[];SS(s,Ou,a,Zp(a)),dS(RI,s)}}function DI(a,s,u){a==="focusin"?(ES(),Nu=s,Ou=u,Nu.attachEvent("onpropertychange",AS)):a==="focusout"&&ES()}function kI(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return Gd(Ou)}function II(a,s){if(a==="click")return Gd(s)}function LI(a,s){if(a==="input"||a==="change")return Gd(s)}function $I(a,s){return a===s&&(a!==0||1/a===1/s)||a!==a&&s!==s}var Yr=typeof Object.is=="function"?Object.is:$I;function _u(a,s){if(Yr(a,s))return!0;if(typeof a!="object"||a===null||typeof s!="object"||s===null)return!1;var u=Object.keys(a),m=Object.keys(s);if(u.length!==m.length)return!1;for(m=0;m<u.length;m++){var v=u[m];if(!_t.call(s,v)||!Yr(a[v],s[v]))return!1}return!0}function CS(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function TS(a,s){var u=CS(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=CS(u)}}function PS(a,s){return a&&s?a===s?!0:a&&a.nodeType===3?!1:s&&s.nodeType===3?PS(a,s.parentNode):"contains"in a?a.contains(s):a.compareDocumentPosition?!!(a.compareDocumentPosition(s)&16):!1:!1}function MS(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var s=zd(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=zd(a.document)}return s}function uy(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 zI=ga&&"documentMode"in document&&11>=document.documentMode,Dl=null,cy=null,Eu=null,dy=!1;function RS(a,s,u){var m=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;dy||Dl==null||Dl!==zd(m)||(m=Dl,"selectionStart"in m&&uy(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}),Eu&&_u(Eu,m)||(Eu=m,m=kf(cy,"onSelect"),0<m.length&&(s=new Hd("onSelect","select",null,s,u),a.push({event:s,listeners:m}),s.target=Dl)))}function cs(a,s){var u={};return u[a.toLowerCase()]=s.toLowerCase(),u["Webkit"+a]="webkit"+s,u["Moz"+a]="moz"+s,u}var kl={animationend:cs("Animation","AnimationEnd"),animationiteration:cs("Animation","AnimationIteration"),animationstart:cs("Animation","AnimationStart"),transitionrun:cs("Transition","TransitionRun"),transitionstart:cs("Transition","TransitionStart"),transitioncancel:cs("Transition","TransitionCancel"),transitionend:cs("Transition","TransitionEnd")},fy={},DS={};ga&&(DS=document.createElement("div").style,"AnimationEvent"in window||(delete kl.animationend.animation,delete kl.animationiteration.animation,delete kl.animationstart.animation),"TransitionEvent"in window||delete kl.transitionend.transition);function ds(a){if(fy[a])return fy[a];if(!kl[a])return a;var s=kl[a],u;for(u in s)if(s.hasOwnProperty(u)&&u in DS)return fy[a]=s[u];return a}var kS=ds("animationend"),IS=ds("animationiteration"),LS=ds("animationstart"),BI=ds("transitionrun"),UI=ds("transitionstart"),qI=ds("transitioncancel"),$S=ds("transitionend"),zS=new Map,hy="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(" ");hy.push("scrollEnd");function Tn(a,s){zS.set(a,s),os(s,[a])}var Yd=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)},cn=[],Il=0,my=0;function Vd(){for(var a=Il,s=my=Il=0;s<a;){var u=cn[s];cn[s++]=null;var m=cn[s];cn[s++]=null;var v=cn[s];cn[s++]=null;var j=cn[s];if(cn[s++]=null,m!==null&&v!==null){var _=m.pending;_===null?v.next=v:(v.next=_.next,_.next=v),m.pending=v}j!==0&&BS(u,v,j)}}function Qd(a,s,u,m){cn[Il++]=a,cn[Il++]=s,cn[Il++]=u,cn[Il++]=m,my|=m,a.lanes|=m,a=a.alternate,a!==null&&(a.lanes|=m)}function py(a,s,u,m){return Qd(a,s,u,m),Xd(a)}function fs(a,s){return Qd(a,null,null,s),Xd(a)}function BS(a,s,u){a.lanes|=u;var m=a.alternate;m!==null&&(m.lanes|=u);for(var v=!1,j=a.return;j!==null;)j.childLanes|=u,m=j.alternate,m!==null&&(m.childLanes|=u),j.tag===22&&(a=j.stateNode,a===null||a._visibility&1||(v=!0)),a=j,j=j.return;return a.tag===3?(j=a.stateNode,v&&s!==null&&(v=31-Gr(u),a=j.hiddenUpdates,m=a[v],m===null?a[v]=[s]:m.push(s),s.lane=u|536870912),j):null}function Xd(a){if(50<Qu)throw Qu=0,Ng=null,Error(n(185));for(var s=a.return;s!==null;)a=s,s=a.return;return a.tag===3?a.stateNode:null}var Ll={};function FI(a,s,u,m){this.tag=a,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Vr(a,s,u,m){return new FI(a,s,u,m)}function yy(a){return a=a.prototype,!(!a||!a.isReactComponent)}function va(a,s){var u=a.alternate;return u===null?(u=Vr(a.tag,s,a.key,a.mode),u.elementType=a.elementType,u.type=a.type,u.stateNode=a.stateNode,u.alternate=a,a.alternate=u):(u.pendingProps=s,u.type=a.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=a.flags&65011712,u.childLanes=a.childLanes,u.lanes=a.lanes,u.child=a.child,u.memoizedProps=a.memoizedProps,u.memoizedState=a.memoizedState,u.updateQueue=a.updateQueue,s=a.dependencies,u.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},u.sibling=a.sibling,u.index=a.index,u.ref=a.ref,u.refCleanup=a.refCleanup,u}function US(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,v,j){var _=0;if(m=a,typeof a=="function")yy(a)&&(_=1);else if(typeof a=="string")_=VL(a,u,se.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case L:return a=Vr(31,u,s,v),a.elementType=L,a.lanes=j,a;case w:return hs(u.children,v,j,s);case N:_=8,v|=24;break;case O:return a=Vr(12,u,s,v|2),a.elementType=O,a.lanes=j,a;case C:return a=Vr(13,u,s,v),a.elementType=C,a.lanes=j,a;case M:return a=Vr(19,u,s,v),a.elementType=M,a.lanes=j,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case T:_=10;break e;case A:_=9;break e;case E:_=11;break e;case R:_=14;break e;case D:_=16,m=null;break e}_=29,u=Error(n(130,a===null?"null":typeof a,"")),m=null}return s=Vr(_,u,s,v),s.elementType=a,s.type=m,s.lanes=j,s}function hs(a,s,u,m){return a=Vr(7,a,m,s),a.lanes=u,a}function gy(a,s,u){return a=Vr(6,a,null,s),a.lanes=u,a}function qS(a){var s=Vr(18,null,null,0);return s.stateNode=a,s}function vy(a,s,u){return s=Vr(4,a.children!==null?a.children:[],a.key,s),s.lanes=u,s.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},s}var FS=new WeakMap;function dn(a,s){if(typeof a=="object"&&a!==null){var u=FS.get(a);return u!==void 0?u:(s={value:a,source:s,stack:he(s)},FS.set(a,s),s)}return{value:a,source:s,stack:he(s)}}var $l=[],zl=0,Zd=null,Au=0,fn=[],hn=0,oi=null,Gn=1,Yn="";function xa(a,s){$l[zl++]=Au,$l[zl++]=Zd,Zd=a,Au=s}function HS(a,s,u){fn[hn++]=Gn,fn[hn++]=Yn,fn[hn++]=oi,oi=a;var m=Gn;a=Yn;var v=32-Gr(m)-1;m&=~(1<<v),u+=1;var j=32-Gr(s)+v;if(30<j){var _=v-v%5;j=(m&(1<<_)-1).toString(32),m>>=_,v-=_,Gn=1<<32-Gr(s)+v|u<<v|m,Yn=j+a}else Gn=1<<j|u<<v|m,Yn=a}function xy(a){a.return!==null&&(xa(a,1),HS(a,1,0))}function by(a){for(;a===Zd;)Zd=$l[--zl],$l[zl]=null,Au=$l[--zl],$l[zl]=null;for(;a===oi;)oi=fn[--hn],fn[hn]=null,Yn=fn[--hn],fn[hn]=null,Gn=fn[--hn],fn[hn]=null}function KS(a,s){fn[hn++]=Gn,fn[hn++]=Yn,fn[hn++]=oi,Gn=s.id,Yn=s.overflow,oi=a}var rr=null,lt=null,$e=!1,ui=null,mn=!1,jy=Error(n(519));function ci(a){var s=Error(n(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Cu(dn(s,a)),jy}function GS(a){var s=a.stateNode,u=a.type,m=a.memoizedProps;switch(s[tr]=a,s[Pr]=m,u){case"dialog":ke("cancel",s),ke("close",s);break;case"iframe":case"object":case"embed":ke("load",s);break;case"video":case"audio":for(u=0;u<Wu.length;u++)ke(Wu[u],s);break;case"source":ke("error",s);break;case"img":case"image":case"link":ke("error",s),ke("load",s);break;case"details":ke("toggle",s);break;case"input":ke("invalid",s),iS(s,m.value,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name,!0);break;case"select":ke("invalid",s);break;case"textarea":ke("invalid",s),lS(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||uO(s.textContent,u)?(m.popover!=null&&(ke("beforetoggle",s),ke("toggle",s)),m.onScroll!=null&&ke("scroll",s),m.onScrollEnd!=null&&ke("scrollend",s),m.onClick!=null&&(s.onclick=ya),s=!0):s=!1,s||ci(a,!0)}function YS(a){for(rr=a.return;rr;)switch(rr.tag){case 5:case 31:case 13:mn=!1;return;case 27:case 3:mn=!0;return;default:rr=rr.return}}function Bl(a){if(a!==rr)return!1;if(!$e)return YS(a),$e=!0,!1;var s=a.tag,u;if((u=s!==3&&s!==27)&&((u=s===5)&&(u=a.type,u=!(u!=="form"&&u!=="button")||zg(a.type,a.memoizedProps)),u=!u),u&&lt&&ci(a),YS(a),s===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(n(317));lt=vO(a)}else if(s===31){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(n(317));lt=vO(a)}else s===27?(s=lt,Ni(a.type)?(a=Hg,Hg=null,lt=a):lt=s):lt=rr?yn(a.stateNode.nextSibling):null;return!0}function ms(){lt=rr=null,$e=!1}function wy(){var a=ui;return a!==null&&(Ir===null?Ir=a:Ir.push.apply(Ir,a),ui=null),a}function Cu(a){ui===null?ui=[a]:ui.push(a)}var Sy=I(null),ps=null,ba=null;function di(a,s,u){oe(Sy,s._currentValue),s._currentValue=u}function ja(a){a._currentValue=Sy.current,Q(Sy)}function Ny(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 Oy(a,s,u,m){var v=a.child;for(v!==null&&(v.return=a);v!==null;){var j=v.dependencies;if(j!==null){var _=v.child;j=j.firstContext;e:for(;j!==null;){var P=j;j=v;for(var $=0;$<s.length;$++)if(P.context===s[$]){j.lanes|=u,P=j.alternate,P!==null&&(P.lanes|=u),Ny(j.return,u,a),m||(_=null);break e}j=P.next}}else if(v.tag===18){if(_=v.return,_===null)throw Error(n(341));_.lanes|=u,j=_.alternate,j!==null&&(j.lanes|=u),Ny(_,u,a),_=null}else _=v.child;if(_!==null)_.return=v;else for(_=v;_!==null;){if(_===a){_=null;break}if(v=_.sibling,v!==null){v.return=_.return,_=v;break}_=_.return}v=_}}function Ul(a,s,u,m){a=null;for(var v=s,j=!1;v!==null;){if(!j){if((v.flags&524288)!==0)j=!0;else if((v.flags&262144)!==0)break}if(v.tag===10){var _=v.alternate;if(_===null)throw Error(n(387));if(_=_.memoizedProps,_!==null){var P=v.type;Yr(v.pendingProps.value,_.value)||(a!==null?a.push(P):a=[P])}}else if(v===Se.current){if(_=v.alternate,_===null)throw Error(n(387));_.memoizedState.memoizedState!==v.memoizedState.memoizedState&&(a!==null?a.push(rc):a=[rc])}v=v.return}a!==null&&Oy(s,a,u,m),s.flags|=262144}function Jd(a){for(a=a.firstContext;a!==null;){if(!Yr(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function ys(a){ps=a,ba=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function nr(a){return VS(ps,a)}function ef(a,s){return ps===null&&ys(a),VS(a,s)}function VS(a,s){var u=s._currentValue;if(s={context:s,memoizedValue:u,next:null},ba===null){if(a===null)throw Error(n(308));ba=s,a.dependencies={lanes:0,firstContext:s},a.flags|=524288}else ba=ba.next=s;return u}var HI=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()})}},KI=e.unstable_scheduleCallback,GI=e.unstable_NormalPriority,Mt={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function _y(){return{controller:new HI,data:new Map,refCount:0}}function Tu(a){a.refCount--,a.refCount===0&&KI(GI,function(){a.controller.abort()})}var Pu=null,Ey=0,ql=0,Fl=null;function YI(a,s){if(Pu===null){var u=Pu=[];Ey=0,ql=Tg(),Fl={status:"pending",value:void 0,then:function(m){u.push(m)}}}return Ey++,s.then(QS,QS),s}function QS(){if(--Ey===0&&Pu!==null){Fl!==null&&(Fl.status="fulfilled");var a=Pu;Pu=null,ql=0,Fl=null;for(var s=0;s<a.length;s++)(0,a[s])()}}function VI(a,s){var u=[],m={status:"pending",value:null,reason:null,then:function(v){u.push(v)}};return a.then(function(){m.status="fulfilled",m.value=s;for(var v=0;v<u.length;v++)(0,u[v])(s)},function(v){for(m.status="rejected",m.reason=v,v=0;v<u.length;v++)(0,u[v])(void 0)}),m}var XS=z.S;z.S=function(a,s){RN=Me(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&YI(a,s),XS!==null&&XS(a,s)};var gs=I(null);function Ay(){var a=gs.current;return a!==null?a:nt.pooledCache}function tf(a,s){s===null?oe(gs,gs.current):oe(gs,s.pool)}function WS(){var a=Ay();return a===null?null:{parent:Mt._currentValue,pool:a}}var Hl=Error(n(460)),Cy=Error(n(474)),rf=Error(n(542)),nf={then:function(){}};function ZS(a){return a=a.status,a==="fulfilled"||a==="rejected"}function JS(a,s,u){switch(u=a[u],u===void 0?a.push(s):u!==s&&(s.then(ya,ya),s=u),s.status){case"fulfilled":return s.value;case"rejected":throw a=s.reason,t1(a),a;default:if(typeof s.status=="string")s.then(ya,ya);else{if(a=nt,a!==null&&100<a.shellSuspendCounter)throw Error(n(482));a=s,a.status="pending",a.then(function(m){if(s.status==="pending"){var v=s;v.status="fulfilled",v.value=m}},function(m){if(s.status==="pending"){var v=s;v.status="rejected",v.reason=m}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw a=s.reason,t1(a),a}throw xs=s,Hl}}function vs(a){try{var s=a._init;return s(a._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(xs=u,Hl):u}}var xs=null;function e1(){if(xs===null)throw Error(n(459));var a=xs;return xs=null,a}function t1(a){if(a===Hl||a===rf)throw Error(n(483))}var Kl=null,Mu=0;function af(a){var s=Mu;return Mu+=1,Kl===null&&(Kl=[]),JS(Kl,a,s)}function Ru(a,s){s=s.props.ref,a.ref=s!==void 0?s:null}function sf(a,s){throw s.$$typeof===g?Error(n(525)):(a=Object.prototype.toString.call(s),Error(n(31,a==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":a)))}function r1(a){function s(K,U){if(a){var G=K.deletions;G===null?(K.deletions=[U],K.flags|=16):G.push(U)}}function u(K,U){if(!a)return null;for(;U!==null;)s(K,U),U=U.sibling;return null}function m(K){for(var U=new Map;K!==null;)K.key!==null?U.set(K.key,K):U.set(K.index,K),K=K.sibling;return U}function v(K,U){return K=va(K,U),K.index=0,K.sibling=null,K}function j(K,U,G){return K.index=G,a?(G=K.alternate,G!==null?(G=G.index,G<U?(K.flags|=67108866,U):G):(K.flags|=67108866,U)):(K.flags|=1048576,U)}function _(K){return a&&K.alternate===null&&(K.flags|=67108866),K}function P(K,U,G,te){return U===null||U.tag!==6?(U=gy(G,K.mode,te),U.return=K,U):(U=v(U,G),U.return=K,U)}function $(K,U,G,te){var we=G.type;return we===w?J(K,U,G.props.children,te,G.key):U!==null&&(U.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===D&&vs(we)===U.type)?(U=v(U,G.props),Ru(U,G),U.return=K,U):(U=Wd(G.type,G.key,G.props,null,K.mode,te),Ru(U,G),U.return=K,U)}function Y(K,U,G,te){return U===null||U.tag!==4||U.stateNode.containerInfo!==G.containerInfo||U.stateNode.implementation!==G.implementation?(U=vy(G,K.mode,te),U.return=K,U):(U=v(U,G.children||[]),U.return=K,U)}function J(K,U,G,te,we){return U===null||U.tag!==7?(U=hs(G,K.mode,te,we),U.return=K,U):(U=v(U,G),U.return=K,U)}function re(K,U,G){if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return U=gy(""+U,K.mode,G),U.return=K,U;if(typeof U=="object"&&U!==null){switch(U.$$typeof){case x:return G=Wd(U.type,U.key,U.props,null,K.mode,G),Ru(G,U),G.return=K,G;case b:return U=vy(U,K.mode,G),U.return=K,U;case D:return U=vs(U),re(K,U,G)}if(ne(U)||q(U))return U=hs(U,K.mode,G,null),U.return=K,U;if(typeof U.then=="function")return re(K,af(U),G);if(U.$$typeof===T)return re(K,ef(K,U),G);sf(K,U)}return null}function X(K,U,G,te){var we=U!==null?U.key:null;if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return we!==null?null:P(K,U,""+G,te);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case x:return G.key===we?$(K,U,G,te):null;case b:return G.key===we?Y(K,U,G,te):null;case D:return G=vs(G),X(K,U,G,te)}if(ne(G)||q(G))return we!==null?null:J(K,U,G,te,null);if(typeof G.then=="function")return X(K,U,af(G),te);if(G.$$typeof===T)return X(K,U,ef(K,G),te);sf(K,G)}return null}function W(K,U,G,te,we){if(typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint")return K=K.get(G)||null,P(U,K,""+te,we);if(typeof te=="object"&&te!==null){switch(te.$$typeof){case x:return K=K.get(te.key===null?G:te.key)||null,$(U,K,te,we);case b:return K=K.get(te.key===null?G:te.key)||null,Y(U,K,te,we);case D:return te=vs(te),W(K,U,G,te,we)}if(ne(te)||q(te))return K=K.get(G)||null,J(U,K,te,we,null);if(typeof te.then=="function")return W(K,U,G,af(te),we);if(te.$$typeof===T)return W(K,U,G,ef(U,te),we);sf(U,te)}return null}function ye(K,U,G,te){for(var we=null,qe=null,ve=U,Ce=U=0,Le=null;ve!==null&&Ce<G.length;Ce++){ve.index>Ce?(Le=ve,ve=null):Le=ve.sibling;var Fe=X(K,ve,G[Ce],te);if(Fe===null){ve===null&&(ve=Le);break}a&&ve&&Fe.alternate===null&&s(K,ve),U=j(Fe,U,Ce),qe===null?we=Fe:qe.sibling=Fe,qe=Fe,ve=Le}if(Ce===G.length)return u(K,ve),$e&&xa(K,Ce),we;if(ve===null){for(;Ce<G.length;Ce++)ve=re(K,G[Ce],te),ve!==null&&(U=j(ve,U,Ce),qe===null?we=ve:qe.sibling=ve,qe=ve);return $e&&xa(K,Ce),we}for(ve=m(ve);Ce<G.length;Ce++)Le=W(ve,K,Ce,G[Ce],te),Le!==null&&(a&&Le.alternate!==null&&ve.delete(Le.key===null?Ce:Le.key),U=j(Le,U,Ce),qe===null?we=Le:qe.sibling=Le,qe=Le);return a&&ve.forEach(function(Ci){return s(K,Ci)}),$e&&xa(K,Ce),we}function Ne(K,U,G,te){if(G==null)throw Error(n(151));for(var we=null,qe=null,ve=U,Ce=U=0,Le=null,Fe=G.next();ve!==null&&!Fe.done;Ce++,Fe=G.next()){ve.index>Ce?(Le=ve,ve=null):Le=ve.sibling;var Ci=X(K,ve,Fe.value,te);if(Ci===null){ve===null&&(ve=Le);break}a&&ve&&Ci.alternate===null&&s(K,ve),U=j(Ci,U,Ce),qe===null?we=Ci:qe.sibling=Ci,qe=Ci,ve=Le}if(Fe.done)return u(K,ve),$e&&xa(K,Ce),we;if(ve===null){for(;!Fe.done;Ce++,Fe=G.next())Fe=re(K,Fe.value,te),Fe!==null&&(U=j(Fe,U,Ce),qe===null?we=Fe:qe.sibling=Fe,qe=Fe);return $e&&xa(K,Ce),we}for(ve=m(ve);!Fe.done;Ce++,Fe=G.next())Fe=W(ve,K,Ce,Fe.value,te),Fe!==null&&(a&&Fe.alternate!==null&&ve.delete(Fe.key===null?Ce:Fe.key),U=j(Fe,U,Ce),qe===null?we=Fe:qe.sibling=Fe,qe=Fe);return a&&ve.forEach(function(i$){return s(K,i$)}),$e&&xa(K,Ce),we}function tt(K,U,G,te){if(typeof G=="object"&&G!==null&&G.type===w&&G.key===null&&(G=G.props.children),typeof G=="object"&&G!==null){switch(G.$$typeof){case x:e:{for(var we=G.key;U!==null;){if(U.key===we){if(we=G.type,we===w){if(U.tag===7){u(K,U.sibling),te=v(U,G.props.children),te.return=K,K=te;break e}}else if(U.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===D&&vs(we)===U.type){u(K,U.sibling),te=v(U,G.props),Ru(te,G),te.return=K,K=te;break e}u(K,U);break}else s(K,U);U=U.sibling}G.type===w?(te=hs(G.props.children,K.mode,te,G.key),te.return=K,K=te):(te=Wd(G.type,G.key,G.props,null,K.mode,te),Ru(te,G),te.return=K,K=te)}return _(K);case b:e:{for(we=G.key;U!==null;){if(U.key===we)if(U.tag===4&&U.stateNode.containerInfo===G.containerInfo&&U.stateNode.implementation===G.implementation){u(K,U.sibling),te=v(U,G.children||[]),te.return=K,K=te;break e}else{u(K,U);break}else s(K,U);U=U.sibling}te=vy(G,K.mode,te),te.return=K,K=te}return _(K);case D:return G=vs(G),tt(K,U,G,te)}if(ne(G))return ye(K,U,G,te);if(q(G)){if(we=q(G),typeof we!="function")throw Error(n(150));return G=we.call(G),Ne(K,U,G,te)}if(typeof G.then=="function")return tt(K,U,af(G),te);if(G.$$typeof===T)return tt(K,U,ef(K,G),te);sf(K,G)}return typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint"?(G=""+G,U!==null&&U.tag===6?(u(K,U.sibling),te=v(U,G),te.return=K,K=te):(u(K,U),te=gy(G,K.mode,te),te.return=K,K=te),_(K)):u(K,U)}return function(K,U,G,te){try{Mu=0;var we=tt(K,U,G,te);return Kl=null,we}catch(ve){if(ve===Hl||ve===rf)throw ve;var qe=Vr(29,ve,null,K.mode);return qe.lanes=te,qe.return=K,qe}finally{}}}var bs=r1(!0),n1=r1(!1),fi=!1;function Ty(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Py(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 hi(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function mi(a,s,u){var m=a.updateQueue;if(m===null)return null;if(m=m.shared,(Ge&2)!==0){var v=m.pending;return v===null?s.next=s:(s.next=v.next,v.next=s),m.pending=s,s=Xd(a),BS(a,null,u),s}return Qd(a,m,s,u),Xd(a)}function Du(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,Vw(a,u)}}function My(a,s){var u=a.updateQueue,m=a.alternate;if(m!==null&&(m=m.updateQueue,u===m)){var v=null,j=null;if(u=u.firstBaseUpdate,u!==null){do{var _={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};j===null?v=j=_:j=j.next=_,u=u.next}while(u!==null);j===null?v=j=s:j=j.next=s}else v=j=s;u={baseState:m.baseState,firstBaseUpdate:v,lastBaseUpdate:j,shared:m.shared,callbacks:m.callbacks},a.updateQueue=u;return}a=u.lastBaseUpdate,a===null?u.firstBaseUpdate=s:a.next=s,u.lastBaseUpdate=s}var Ry=!1;function ku(){if(Ry){var a=Fl;if(a!==null)throw a}}function Iu(a,s,u,m){Ry=!1;var v=a.updateQueue;fi=!1;var j=v.firstBaseUpdate,_=v.lastBaseUpdate,P=v.shared.pending;if(P!==null){v.shared.pending=null;var $=P,Y=$.next;$.next=null,_===null?j=Y:_.next=Y,_=$;var J=a.alternate;J!==null&&(J=J.updateQueue,P=J.lastBaseUpdate,P!==_&&(P===null?J.firstBaseUpdate=Y:P.next=Y,J.lastBaseUpdate=$))}if(j!==null){var re=v.baseState;_=0,J=Y=$=null,P=j;do{var X=P.lane&-536870913,W=X!==P.lane;if(W?(Ie&X)===X:(m&X)===X){X!==0&&X===ql&&(Ry=!0),J!==null&&(J=J.next={lane:0,tag:P.tag,payload:P.payload,callback:null,next:null});e:{var ye=a,Ne=P;X=s;var tt=u;switch(Ne.tag){case 1:if(ye=Ne.payload,typeof ye=="function"){re=ye.call(tt,re,X);break e}re=ye;break e;case 3:ye.flags=ye.flags&-65537|128;case 0:if(ye=Ne.payload,X=typeof ye=="function"?ye.call(tt,re,X):ye,X==null)break e;re=y({},re,X);break e;case 2:fi=!0}}X=P.callback,X!==null&&(a.flags|=64,W&&(a.flags|=8192),W=v.callbacks,W===null?v.callbacks=[X]:W.push(X))}else W={lane:X,tag:P.tag,payload:P.payload,callback:P.callback,next:null},J===null?(Y=J=W,$=re):J=J.next=W,_|=X;if(P=P.next,P===null){if(P=v.shared.pending,P===null)break;W=P,P=W.next,W.next=null,v.lastBaseUpdate=W,v.shared.pending=null}}while(!0);J===null&&($=re),v.baseState=$,v.firstBaseUpdate=Y,v.lastBaseUpdate=J,j===null&&(v.shared.lanes=0),xi|=_,a.lanes=_,a.memoizedState=re}}function a1(a,s){if(typeof a!="function")throw Error(n(191,a));a.call(s)}function i1(a,s){var u=a.callbacks;if(u!==null)for(a.callbacks=null,a=0;a<u.length;a++)a1(u[a],s)}var Gl=I(null),lf=I(0);function s1(a,s){a=Ta,oe(lf,a),oe(Gl,s),Ta=a|s.baseLanes}function Dy(){oe(lf,Ta),oe(Gl,Gl.current)}function ky(){Ta=lf.current,Q(Gl),Q(lf)}var Qr=I(null),pn=null;function pi(a){var s=a.alternate;oe(Et,Et.current&1),oe(Qr,a),pn===null&&(s===null||Gl.current!==null||s.memoizedState!==null)&&(pn=a)}function Iy(a){oe(Et,Et.current),oe(Qr,a),pn===null&&(pn=a)}function l1(a){a.tag===22?(oe(Et,Et.current),oe(Qr,a),pn===null&&(pn=a)):yi()}function yi(){oe(Et,Et.current),oe(Qr,Qr.current)}function Xr(a){Q(Qr),pn===a&&(pn=null),Q(Et)}var Et=I(0);function of(a){for(var s=a;s!==null;){if(s.tag===13){var u=s.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||qg(u)||Fg(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 wa=0,Ae=null,Je=null,Rt=null,uf=!1,Yl=!1,js=!1,cf=0,Lu=0,Vl=null,QI=0;function bt(){throw Error(n(321))}function Ly(a,s){if(s===null)return!1;for(var u=0;u<s.length&&u<a.length;u++)if(!Yr(a[u],s[u]))return!1;return!0}function $y(a,s,u,m,v,j){return wa=j,Ae=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,z.H=a===null||a.memoizedState===null?H1:Jy,js=!1,j=u(m,v),js=!1,Yl&&(j=u1(s,u,m,v)),o1(a),j}function o1(a){z.H=Bu;var s=Je!==null&&Je.next!==null;if(wa=0,Rt=Je=Ae=null,uf=!1,Lu=0,Vl=null,s)throw Error(n(300));a===null||Dt||(a=a.dependencies,a!==null&&Jd(a)&&(Dt=!0))}function u1(a,s,u,m){Ae=a;var v=0;do{if(Yl&&(Vl=null),Lu=0,Yl=!1,25<=v)throw Error(n(301));if(v+=1,Rt=Je=null,a.updateQueue!=null){var j=a.updateQueue;j.lastEffect=null,j.events=null,j.stores=null,j.memoCache!=null&&(j.memoCache.index=0)}z.H=K1,j=s(u,m)}while(Yl);return j}function XI(){var a=z.H,s=a.useState()[0];return s=typeof s.then=="function"?$u(s):s,a=a.useState()[0],(Je!==null?Je.memoizedState:null)!==a&&(Ae.flags|=1024),s}function zy(){var a=cf!==0;return cf=0,a}function By(a,s,u){s.updateQueue=a.updateQueue,s.flags&=-2053,a.lanes&=~u}function Uy(a){if(uf){for(a=a.memoizedState;a!==null;){var s=a.queue;s!==null&&(s.pending=null),a=a.next}uf=!1}wa=0,Rt=Je=Ae=null,Yl=!1,Lu=cf=0,Vl=null}function jr(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Rt===null?Ae.memoizedState=Rt=a:Rt=Rt.next=a,Rt}function At(){if(Je===null){var a=Ae.alternate;a=a!==null?a.memoizedState:null}else a=Je.next;var s=Rt===null?Ae.memoizedState:Rt.next;if(s!==null)Rt=s,Je=a;else{if(a===null)throw Ae.alternate===null?Error(n(467)):Error(n(310));Je=a,a={memoizedState:Je.memoizedState,baseState:Je.baseState,baseQueue:Je.baseQueue,queue:Je.queue,next:null},Rt===null?Ae.memoizedState=Rt=a:Rt=Rt.next=a}return Rt}function df(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function $u(a){var s=Lu;return Lu+=1,Vl===null&&(Vl=[]),a=JS(Vl,a,s),s=Ae,(Rt===null?s.memoizedState:Rt.next)===null&&(s=s.alternate,z.H=s===null||s.memoizedState===null?H1:Jy),a}function ff(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return $u(a);if(a.$$typeof===T)return nr(a)}throw Error(n(438,String(a)))}function qy(a){var s=null,u=Ae.updateQueue;if(u!==null&&(s=u.memoCache),s==null){var m=Ae.alternate;m!==null&&(m=m.updateQueue,m!==null&&(m=m.memoCache,m!=null&&(s={data:m.data.map(function(v){return v.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),u===null&&(u=df(),Ae.updateQueue=u),u.memoCache=s,u=s.data[s.index],u===void 0)for(u=s.data[s.index]=Array(a),m=0;m<a;m++)u[m]=k;return s.index++,u}function Sa(a,s){return typeof s=="function"?s(a):s}function hf(a){var s=At();return Fy(s,Je,a)}function Fy(a,s,u){var m=a.queue;if(m===null)throw Error(n(311));m.lastRenderedReducer=u;var v=a.baseQueue,j=m.pending;if(j!==null){if(v!==null){var _=v.next;v.next=j.next,j.next=_}s.baseQueue=v=j,m.pending=null}if(j=a.baseState,v===null)a.memoizedState=j;else{s=v.next;var P=_=null,$=null,Y=s,J=!1;do{var re=Y.lane&-536870913;if(re!==Y.lane?(Ie&re)===re:(wa&re)===re){var X=Y.revertLane;if(X===0)$!==null&&($=$.next={lane:0,revertLane:0,gesture:null,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null}),re===ql&&(J=!0);else if((wa&X)===X){Y=Y.next,X===ql&&(J=!0);continue}else re={lane:0,revertLane:Y.revertLane,gesture:null,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},$===null?(P=$=re,_=j):$=$.next=re,Ae.lanes|=X,xi|=X;re=Y.action,js&&u(j,re),j=Y.hasEagerState?Y.eagerState:u(j,re)}else X={lane:re,revertLane:Y.revertLane,gesture:Y.gesture,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},$===null?(P=$=X,_=j):$=$.next=X,Ae.lanes|=re,xi|=re;Y=Y.next}while(Y!==null&&Y!==s);if($===null?_=j:$.next=P,!Yr(j,a.memoizedState)&&(Dt=!0,J&&(u=Fl,u!==null)))throw u;a.memoizedState=j,a.baseState=_,a.baseQueue=$,m.lastRenderedState=j}return v===null&&(m.lanes=0),[a.memoizedState,m.dispatch]}function Hy(a){var s=At(),u=s.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=a;var m=u.dispatch,v=u.pending,j=s.memoizedState;if(v!==null){u.pending=null;var _=v=v.next;do j=a(j,_.action),_=_.next;while(_!==v);Yr(j,s.memoizedState)||(Dt=!0),s.memoizedState=j,s.baseQueue===null&&(s.baseState=j),u.lastRenderedState=j}return[j,m]}function c1(a,s,u){var m=Ae,v=At(),j=$e;if(j){if(u===void 0)throw Error(n(407));u=u()}else u=s();var _=!Yr((Je||v).memoizedState,u);if(_&&(v.memoizedState=u,Dt=!0),v=v.queue,Yy(h1.bind(null,m,v,a),[a]),v.getSnapshot!==s||_||Rt!==null&&Rt.memoizedState.tag&1){if(m.flags|=2048,Ql(9,{destroy:void 0},f1.bind(null,m,v,u,s),null),nt===null)throw Error(n(349));j||(wa&127)!==0||d1(m,s,u)}return u}function d1(a,s,u){a.flags|=16384,a={getSnapshot:s,value:u},s=Ae.updateQueue,s===null?(s=df(),Ae.updateQueue=s,s.stores=[a]):(u=s.stores,u===null?s.stores=[a]:u.push(a))}function f1(a,s,u,m){s.value=u,s.getSnapshot=m,m1(s)&&p1(a)}function h1(a,s,u){return u(function(){m1(s)&&p1(a)})}function m1(a){var s=a.getSnapshot;a=a.value;try{var u=s();return!Yr(a,u)}catch{return!0}}function p1(a){var s=fs(a,2);s!==null&&Lr(s,a,2)}function Ky(a){var s=jr();if(typeof a=="function"){var u=a;if(a=u(),js){ii(!0);try{u()}finally{ii(!1)}}}return s.memoizedState=s.baseState=a,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sa,lastRenderedState:a},s}function y1(a,s,u,m){return a.baseState=u,Fy(a,Je,typeof m=="function"?m:Sa)}function WI(a,s,u,m,v){if(yf(a))throw Error(n(485));if(a=s.action,a!==null){var j={payload:v,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(_){j.listeners.push(_)}};z.T!==null?u(!0):j.isTransition=!1,m(j),u=s.pending,u===null?(j.next=s.pending=j,g1(s,j)):(j.next=u.next,s.pending=u.next=j)}}function g1(a,s){var u=s.action,m=s.payload,v=a.state;if(s.isTransition){var j=z.T,_={};z.T=_;try{var P=u(v,m),$=z.S;$!==null&&$(_,P),v1(a,s,P)}catch(Y){Gy(a,s,Y)}finally{j!==null&&_.types!==null&&(j.types=_.types),z.T=j}}else try{j=u(v,m),v1(a,s,j)}catch(Y){Gy(a,s,Y)}}function v1(a,s,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(m){x1(a,s,m)},function(m){return Gy(a,s,m)}):x1(a,s,u)}function x1(a,s,u){s.status="fulfilled",s.value=u,b1(s),a.state=u,s=a.pending,s!==null&&(u=s.next,u===s?a.pending=null:(u=u.next,s.next=u,g1(a,u)))}function Gy(a,s,u){var m=a.pending;if(a.pending=null,m!==null){m=m.next;do s.status="rejected",s.reason=u,b1(s),s=s.next;while(s!==m)}a.action=null}function b1(a){a=a.listeners;for(var s=0;s<a.length;s++)(0,a[s])()}function j1(a,s){return s}function w1(a,s){if($e){var u=nt.formState;if(u!==null){e:{var m=Ae;if($e){if(lt){t:{for(var v=lt,j=mn;v.nodeType!==8;){if(!j){v=null;break t}if(v=yn(v.nextSibling),v===null){v=null;break t}}j=v.data,v=j==="F!"||j==="F"?v:null}if(v){lt=yn(v.nextSibling),m=v.data==="F!";break e}}ci(m)}m=!1}m&&(s=u[0])}}return u=jr(),u.memoizedState=u.baseState=s,m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:j1,lastRenderedState:s},u.queue=m,u=U1.bind(null,Ae,m),m.dispatch=u,m=Ky(!1),j=Zy.bind(null,Ae,!1,m.queue),m=jr(),v={state:s,dispatch:null,action:a,pending:null},m.queue=v,u=WI.bind(null,Ae,v,j,u),v.dispatch=u,m.memoizedState=a,[s,u,!1]}function S1(a){var s=At();return N1(s,Je,a)}function N1(a,s,u){if(s=Fy(a,s,j1)[0],a=hf(Sa)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var m=$u(s)}catch(_){throw _===Hl?rf:_}else m=s;s=At();var v=s.queue,j=v.dispatch;return u!==s.memoizedState&&(Ae.flags|=2048,Ql(9,{destroy:void 0},ZI.bind(null,v,u),null)),[m,j,a]}function ZI(a,s){a.action=s}function O1(a){var s=At(),u=Je;if(u!==null)return N1(s,u,a);At(),s=s.memoizedState,u=At();var m=u.queue.dispatch;return u.memoizedState=a,[s,m,!1]}function Ql(a,s,u,m){return a={tag:a,create:u,deps:m,inst:s,next:null},s=Ae.updateQueue,s===null&&(s=df(),Ae.updateQueue=s),u=s.lastEffect,u===null?s.lastEffect=a.next=a:(m=u.next,u.next=a,a.next=m,s.lastEffect=a),a}function _1(){return At().memoizedState}function mf(a,s,u,m){var v=jr();Ae.flags|=a,v.memoizedState=Ql(1|s,{destroy:void 0},u,m===void 0?null:m)}function pf(a,s,u,m){var v=At();m=m===void 0?null:m;var j=v.memoizedState.inst;Je!==null&&m!==null&&Ly(m,Je.memoizedState.deps)?v.memoizedState=Ql(s,j,u,m):(Ae.flags|=a,v.memoizedState=Ql(1|s,j,u,m))}function E1(a,s){mf(8390656,8,a,s)}function Yy(a,s){pf(2048,8,a,s)}function JI(a){Ae.flags|=4;var s=Ae.updateQueue;if(s===null)s=df(),Ae.updateQueue=s,s.events=[a];else{var u=s.events;u===null?s.events=[a]:u.push(a)}}function A1(a){var s=At().memoizedState;return JI({ref:s,nextImpl:a}),function(){if((Ge&2)!==0)throw Error(n(440));return s.impl.apply(void 0,arguments)}}function C1(a,s){return pf(4,2,a,s)}function T1(a,s){return pf(4,4,a,s)}function P1(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 M1(a,s,u){u=u!=null?u.concat([a]):null,pf(4,4,P1.bind(null,s,a),u)}function Vy(){}function R1(a,s){var u=At();s=s===void 0?null:s;var m=u.memoizedState;return s!==null&&Ly(s,m[1])?m[0]:(u.memoizedState=[a,s],a)}function D1(a,s){var u=At();s=s===void 0?null:s;var m=u.memoizedState;if(s!==null&&Ly(s,m[1]))return m[0];if(m=a(),js){ii(!0);try{a()}finally{ii(!1)}}return u.memoizedState=[m,s],m}function Qy(a,s,u){return u===void 0||(wa&1073741824)!==0&&(Ie&261930)===0?a.memoizedState=s:(a.memoizedState=u,a=kN(),Ae.lanes|=a,xi|=a,u)}function k1(a,s,u,m){return Yr(u,s)?u:Gl.current!==null?(a=Qy(a,u,m),Yr(a,s)||(Dt=!0),a):(wa&42)===0||(wa&1073741824)!==0&&(Ie&261930)===0?(Dt=!0,a.memoizedState=u):(a=kN(),Ae.lanes|=a,xi|=a,s)}function I1(a,s,u,m,v){var j=H.p;H.p=j!==0&&8>j?j:8;var _=z.T,P={};z.T=P,Zy(a,!1,s,u);try{var $=v(),Y=z.S;if(Y!==null&&Y(P,$),$!==null&&typeof $=="object"&&typeof $.then=="function"){var J=VI($,m);zu(a,s,J,Jr(a))}else zu(a,s,m,Jr(a))}catch(re){zu(a,s,{then:function(){},status:"rejected",reason:re},Jr())}finally{H.p=j,_!==null&&P.types!==null&&(_.types=P.types),z.T=_}}function eL(){}function Xy(a,s,u,m){if(a.tag!==5)throw Error(n(476));var v=L1(a).queue;I1(a,v,s,Z,u===null?eL:function(){return $1(a),u(m)})}function L1(a){var s=a.memoizedState;if(s!==null)return s;s={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sa,lastRenderedState:Z},next:null};var u={};return s.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sa,lastRenderedState:u},next:null},a.memoizedState=s,a=a.alternate,a!==null&&(a.memoizedState=s),s}function $1(a){var s=L1(a);s.next===null&&(s=a.alternate.memoizedState),zu(a,s.next.queue,{},Jr())}function Wy(){return nr(rc)}function z1(){return At().memoizedState}function B1(){return At().memoizedState}function tL(a){for(var s=a.return;s!==null;){switch(s.tag){case 24:case 3:var u=Jr();a=hi(u);var m=mi(s,a,u);m!==null&&(Lr(m,s,u),Du(m,s,u)),s={cache:_y()},a.payload=s;return}s=s.return}}function rL(a,s,u){var m=Jr();u={lane:m,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},yf(a)?q1(s,u):(u=py(a,s,u,m),u!==null&&(Lr(u,a,m),F1(u,s,m)))}function U1(a,s,u){var m=Jr();zu(a,s,u,m)}function zu(a,s,u,m){var v={lane:m,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(yf(a))q1(s,v);else{var j=a.alternate;if(a.lanes===0&&(j===null||j.lanes===0)&&(j=s.lastRenderedReducer,j!==null))try{var _=s.lastRenderedState,P=j(_,u);if(v.hasEagerState=!0,v.eagerState=P,Yr(P,_))return Qd(a,s,v,0),nt===null&&Vd(),!1}catch{}finally{}if(u=py(a,s,v,m),u!==null)return Lr(u,a,m),F1(u,s,m),!0}return!1}function Zy(a,s,u,m){if(m={lane:2,revertLane:Tg(),gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},yf(a)){if(s)throw Error(n(479))}else s=py(a,u,m,2),s!==null&&Lr(s,a,2)}function yf(a){var s=a.alternate;return a===Ae||s!==null&&s===Ae}function q1(a,s){Yl=uf=!0;var u=a.pending;u===null?s.next=s:(s.next=u.next,u.next=s),a.pending=s}function F1(a,s,u){if((u&4194048)!==0){var m=s.lanes;m&=a.pendingLanes,u|=m,s.lanes=u,Vw(a,u)}}var Bu={readContext:nr,use:ff,useCallback:bt,useContext:bt,useEffect:bt,useImperativeHandle:bt,useLayoutEffect:bt,useInsertionEffect:bt,useMemo:bt,useReducer:bt,useRef:bt,useState:bt,useDebugValue:bt,useDeferredValue:bt,useTransition:bt,useSyncExternalStore:bt,useId:bt,useHostTransitionStatus:bt,useFormState:bt,useActionState:bt,useOptimistic:bt,useMemoCache:bt,useCacheRefresh:bt};Bu.useEffectEvent=bt;var H1={readContext:nr,use:ff,useCallback:function(a,s){return jr().memoizedState=[a,s===void 0?null:s],a},useContext:nr,useEffect:E1,useImperativeHandle:function(a,s,u){u=u!=null?u.concat([a]):null,mf(4194308,4,P1.bind(null,s,a),u)},useLayoutEffect:function(a,s){return mf(4194308,4,a,s)},useInsertionEffect:function(a,s){mf(4,2,a,s)},useMemo:function(a,s){var u=jr();s=s===void 0?null:s;var m=a();if(js){ii(!0);try{a()}finally{ii(!1)}}return u.memoizedState=[m,s],m},useReducer:function(a,s,u){var m=jr();if(u!==void 0){var v=u(s);if(js){ii(!0);try{u(s)}finally{ii(!1)}}}else v=s;return m.memoizedState=m.baseState=v,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:v},m.queue=a,a=a.dispatch=rL.bind(null,Ae,a),[m.memoizedState,a]},useRef:function(a){var s=jr();return a={current:a},s.memoizedState=a},useState:function(a){a=Ky(a);var s=a.queue,u=U1.bind(null,Ae,s);return s.dispatch=u,[a.memoizedState,u]},useDebugValue:Vy,useDeferredValue:function(a,s){var u=jr();return Qy(u,a,s)},useTransition:function(){var a=Ky(!1);return a=I1.bind(null,Ae,a.queue,!0,!1),jr().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,s,u){var m=Ae,v=jr();if($e){if(u===void 0)throw Error(n(407));u=u()}else{if(u=s(),nt===null)throw Error(n(349));(Ie&127)!==0||d1(m,s,u)}v.memoizedState=u;var j={value:u,getSnapshot:s};return v.queue=j,E1(h1.bind(null,m,j,a),[a]),m.flags|=2048,Ql(9,{destroy:void 0},f1.bind(null,m,j,u,s),null),u},useId:function(){var a=jr(),s=nt.identifierPrefix;if($e){var u=Yn,m=Gn;u=(m&~(1<<32-Gr(m)-1)).toString(32)+u,s="_"+s+"R_"+u,u=cf++,0<u&&(s+="H"+u.toString(32)),s+="_"}else u=QI++,s="_"+s+"r_"+u.toString(32)+"_";return a.memoizedState=s},useHostTransitionStatus:Wy,useFormState:w1,useActionState:w1,useOptimistic:function(a){var s=jr();s.memoizedState=s.baseState=a;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=u,s=Zy.bind(null,Ae,!0,u),u.dispatch=s,[a,s]},useMemoCache:qy,useCacheRefresh:function(){return jr().memoizedState=tL.bind(null,Ae)},useEffectEvent:function(a){var s=jr(),u={impl:a};return s.memoizedState=u,function(){if((Ge&2)!==0)throw Error(n(440));return u.impl.apply(void 0,arguments)}}},Jy={readContext:nr,use:ff,useCallback:R1,useContext:nr,useEffect:Yy,useImperativeHandle:M1,useInsertionEffect:C1,useLayoutEffect:T1,useMemo:D1,useReducer:hf,useRef:_1,useState:function(){return hf(Sa)},useDebugValue:Vy,useDeferredValue:function(a,s){var u=At();return k1(u,Je.memoizedState,a,s)},useTransition:function(){var a=hf(Sa)[0],s=At().memoizedState;return[typeof a=="boolean"?a:$u(a),s]},useSyncExternalStore:c1,useId:z1,useHostTransitionStatus:Wy,useFormState:S1,useActionState:S1,useOptimistic:function(a,s){var u=At();return y1(u,Je,a,s)},useMemoCache:qy,useCacheRefresh:B1};Jy.useEffectEvent=A1;var K1={readContext:nr,use:ff,useCallback:R1,useContext:nr,useEffect:Yy,useImperativeHandle:M1,useInsertionEffect:C1,useLayoutEffect:T1,useMemo:D1,useReducer:Hy,useRef:_1,useState:function(){return Hy(Sa)},useDebugValue:Vy,useDeferredValue:function(a,s){var u=At();return Je===null?Qy(u,a,s):k1(u,Je.memoizedState,a,s)},useTransition:function(){var a=Hy(Sa)[0],s=At().memoizedState;return[typeof a=="boolean"?a:$u(a),s]},useSyncExternalStore:c1,useId:z1,useHostTransitionStatus:Wy,useFormState:O1,useActionState:O1,useOptimistic:function(a,s){var u=At();return Je!==null?y1(u,Je,a,s):(u.baseState=a,[a,u.queue.dispatch])},useMemoCache:qy,useCacheRefresh:B1};K1.useEffectEvent=A1;function eg(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 tg={enqueueSetState:function(a,s,u){a=a._reactInternals;var m=Jr(),v=hi(m);v.payload=s,u!=null&&(v.callback=u),s=mi(a,v,m),s!==null&&(Lr(s,a,m),Du(s,a,m))},enqueueReplaceState:function(a,s,u){a=a._reactInternals;var m=Jr(),v=hi(m);v.tag=1,v.payload=s,u!=null&&(v.callback=u),s=mi(a,v,m),s!==null&&(Lr(s,a,m),Du(s,a,m))},enqueueForceUpdate:function(a,s){a=a._reactInternals;var u=Jr(),m=hi(u);m.tag=2,s!=null&&(m.callback=s),s=mi(a,m,u),s!==null&&(Lr(s,a,u),Du(s,a,u))}};function G1(a,s,u,m,v,j,_){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(m,j,_):s.prototype&&s.prototype.isPureReactComponent?!_u(u,m)||!_u(v,j):!0}function Y1(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&&tg.enqueueReplaceState(s,s.state,null)}function ws(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 v in a)u[v]===void 0&&(u[v]=a[v])}return u}function V1(a){Yd(a)}function Q1(a){console.error(a)}function X1(a){Yd(a)}function gf(a,s){try{var u=a.onUncaughtError;u(s.value,{componentStack:s.stack})}catch(m){setTimeout(function(){throw m})}}function W1(a,s,u){try{var m=a.onCaughtError;m(u.value,{componentStack:u.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(v){setTimeout(function(){throw v})}}function rg(a,s,u){return u=hi(u),u.tag=3,u.payload={element:null},u.callback=function(){gf(a,s)},u}function Z1(a){return a=hi(a),a.tag=3,a}function J1(a,s,u,m){var v=u.type.getDerivedStateFromError;if(typeof v=="function"){var j=m.value;a.payload=function(){return v(j)},a.callback=function(){W1(s,u,m)}}var _=u.stateNode;_!==null&&typeof _.componentDidCatch=="function"&&(a.callback=function(){W1(s,u,m),typeof v!="function"&&(bi===null?bi=new Set([this]):bi.add(this));var P=m.stack;this.componentDidCatch(m.value,{componentStack:P!==null?P:""})})}function nL(a,s,u,m,v){if(u.flags|=32768,m!==null&&typeof m=="object"&&typeof m.then=="function"){if(s=u.alternate,s!==null&&Ul(s,u,v,!0),u=Qr.current,u!==null){switch(u.tag){case 31:case 13:return pn===null?Cf():u.alternate===null&&jt===0&&(jt=3),u.flags&=-257,u.flags|=65536,u.lanes=v,m===nf?u.flags|=16384:(s=u.updateQueue,s===null?u.updateQueue=new Set([m]):s.add(m),Eg(a,m,v)),!1;case 22:return u.flags|=65536,m===nf?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)),Eg(a,m,v)),!1}throw Error(n(435,u.tag))}return Eg(a,m,v),Cf(),!1}if($e)return s=Qr.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=v,m!==jy&&(a=Error(n(422),{cause:m}),Cu(dn(a,u)))):(m!==jy&&(s=Error(n(423),{cause:m}),Cu(dn(s,u))),a=a.current.alternate,a.flags|=65536,v&=-v,a.lanes|=v,m=dn(m,u),v=rg(a.stateNode,m,v),My(a,v),jt!==4&&(jt=2)),!1;var j=Error(n(520),{cause:m});if(j=dn(j,u),Vu===null?Vu=[j]:Vu.push(j),jt!==4&&(jt=2),s===null)return!0;m=dn(m,u),u=s;do{switch(u.tag){case 3:return u.flags|=65536,a=v&-v,u.lanes|=a,a=rg(u.stateNode,m,a),My(u,a),!1;case 1:if(s=u.type,j=u.stateNode,(u.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||j!==null&&typeof j.componentDidCatch=="function"&&(bi===null||!bi.has(j))))return u.flags|=65536,v&=-v,u.lanes|=v,v=Z1(v),J1(v,a,u,m),My(u,v),!1}u=u.return}while(u!==null);return!1}var ng=Error(n(461)),Dt=!1;function ar(a,s,u,m){s.child=a===null?n1(s,null,u,m):bs(s,a.child,u,m)}function eN(a,s,u,m,v){u=u.render;var j=s.ref;if("ref"in m){var _={};for(var P in m)P!=="ref"&&(_[P]=m[P])}else _=m;return ys(s),m=$y(a,s,u,_,j,v),P=zy(),a!==null&&!Dt?(By(a,s,v),Na(a,s,v)):($e&&P&&xy(s),s.flags|=1,ar(a,s,m,v),s.child)}function tN(a,s,u,m,v){if(a===null){var j=u.type;return typeof j=="function"&&!yy(j)&&j.defaultProps===void 0&&u.compare===null?(s.tag=15,s.type=j,rN(a,s,j,m,v)):(a=Wd(u.type,null,m,s,s.mode,v),a.ref=s.ref,a.return=s,s.child=a)}if(j=a.child,!dg(a,v)){var _=j.memoizedProps;if(u=u.compare,u=u!==null?u:_u,u(_,m)&&a.ref===s.ref)return Na(a,s,v)}return s.flags|=1,a=va(j,m),a.ref=s.ref,a.return=s,s.child=a}function rN(a,s,u,m,v){if(a!==null){var j=a.memoizedProps;if(_u(j,m)&&a.ref===s.ref)if(Dt=!1,s.pendingProps=m=j,dg(a,v))(a.flags&131072)!==0&&(Dt=!0);else return s.lanes=a.lanes,Na(a,s,v)}return ag(a,s,u,m,v)}function nN(a,s,u,m){var v=m.children,j=a!==null?a.memoizedState:null;if(a===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),m.mode==="hidden"){if((s.flags&128)!==0){if(j=j!==null?j.baseLanes|u:u,a!==null){for(m=s.child=a.child,v=0;m!==null;)v=v|m.lanes|m.childLanes,m=m.sibling;m=v&~j}else m=0,s.child=null;return aN(a,s,j,u,m)}if((u&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},a!==null&&tf(s,j!==null?j.cachePool:null),j!==null?s1(s,j):Dy(),l1(s);else return m=s.lanes=536870912,aN(a,s,j!==null?j.baseLanes|u:u,u,m)}else j!==null?(tf(s,j.cachePool),s1(s,j),yi(),s.memoizedState=null):(a!==null&&tf(s,null),Dy(),yi());return ar(a,s,v,u),s.child}function Uu(a,s){return a!==null&&a.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function aN(a,s,u,m,v){var j=Ay();return j=j===null?null:{parent:Mt._currentValue,pool:j},s.memoizedState={baseLanes:u,cachePool:j},a!==null&&tf(s,null),Dy(),l1(s),a!==null&&Ul(a,s,m,!0),s.childLanes=v,null}function vf(a,s){return s=bf({mode:s.mode,children:s.children},a.mode),s.ref=a.ref,a.child=s,s.return=a,s}function iN(a,s,u){return bs(s,a.child,null,u),a=vf(s,s.pendingProps),a.flags|=2,Xr(s),s.memoizedState=null,a}function aL(a,s,u){var m=s.pendingProps,v=(s.flags&128)!==0;if(s.flags&=-129,a===null){if($e){if(m.mode==="hidden")return a=vf(s,m),s.lanes=536870912,Uu(null,a);if(Iy(s),(a=lt)?(a=gO(a,mn),a=a!==null&&a.data==="&"?a:null,a!==null&&(s.memoizedState={dehydrated:a,treeContext:oi!==null?{id:Gn,overflow:Yn}:null,retryLane:536870912,hydrationErrors:null},u=qS(a),u.return=s,s.child=u,rr=s,lt=null)):a=null,a===null)throw ci(s);return s.lanes=536870912,null}return vf(s,m)}var j=a.memoizedState;if(j!==null){var _=j.dehydrated;if(Iy(s),v)if(s.flags&256)s.flags&=-257,s=iN(a,s,u);else if(s.memoizedState!==null)s.child=a.child,s.flags|=128,s=null;else throw Error(n(558));else if(Dt||Ul(a,s,u,!1),v=(u&a.childLanes)!==0,Dt||v){if(m=nt,m!==null&&(_=Qw(m,u),_!==0&&_!==j.retryLane))throw j.retryLane=_,fs(a,_),Lr(m,a,_),ng;Cf(),s=iN(a,s,u)}else a=j.treeContext,lt=yn(_.nextSibling),rr=s,$e=!0,ui=null,mn=!1,a!==null&&KS(s,a),s=vf(s,m),s.flags|=4096;return s}return a=va(a.child,{mode:m.mode,children:m.children}),a.ref=s.ref,s.child=a,a.return=s,a}function xf(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 ag(a,s,u,m,v){return ys(s),u=$y(a,s,u,m,void 0,v),m=zy(),a!==null&&!Dt?(By(a,s,v),Na(a,s,v)):($e&&m&&xy(s),s.flags|=1,ar(a,s,u,v),s.child)}function sN(a,s,u,m,v,j){return ys(s),s.updateQueue=null,u=u1(s,m,u,v),o1(a),m=zy(),a!==null&&!Dt?(By(a,s,j),Na(a,s,j)):($e&&m&&xy(s),s.flags|=1,ar(a,s,u,j),s.child)}function lN(a,s,u,m,v){if(ys(s),s.stateNode===null){var j=Ll,_=u.contextType;typeof _=="object"&&_!==null&&(j=nr(_)),j=new u(m,j),s.memoizedState=j.state!==null&&j.state!==void 0?j.state:null,j.updater=tg,s.stateNode=j,j._reactInternals=s,j=s.stateNode,j.props=m,j.state=s.memoizedState,j.refs={},Ty(s),_=u.contextType,j.context=typeof _=="object"&&_!==null?nr(_):Ll,j.state=s.memoizedState,_=u.getDerivedStateFromProps,typeof _=="function"&&(eg(s,u,_,m),j.state=s.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof j.getSnapshotBeforeUpdate=="function"||typeof j.UNSAFE_componentWillMount!="function"&&typeof j.componentWillMount!="function"||(_=j.state,typeof j.componentWillMount=="function"&&j.componentWillMount(),typeof j.UNSAFE_componentWillMount=="function"&&j.UNSAFE_componentWillMount(),_!==j.state&&tg.enqueueReplaceState(j,j.state,null),Iu(s,m,j,v),ku(),j.state=s.memoizedState),typeof j.componentDidMount=="function"&&(s.flags|=4194308),m=!0}else if(a===null){j=s.stateNode;var P=s.memoizedProps,$=ws(u,P);j.props=$;var Y=j.context,J=u.contextType;_=Ll,typeof J=="object"&&J!==null&&(_=nr(J));var re=u.getDerivedStateFromProps;J=typeof re=="function"||typeof j.getSnapshotBeforeUpdate=="function",P=s.pendingProps!==P,J||typeof j.UNSAFE_componentWillReceiveProps!="function"&&typeof j.componentWillReceiveProps!="function"||(P||Y!==_)&&Y1(s,j,m,_),fi=!1;var X=s.memoizedState;j.state=X,Iu(s,m,j,v),ku(),Y=s.memoizedState,P||X!==Y||fi?(typeof re=="function"&&(eg(s,u,re,m),Y=s.memoizedState),($=fi||G1(s,u,$,m,X,Y,_))?(J||typeof j.UNSAFE_componentWillMount!="function"&&typeof j.componentWillMount!="function"||(typeof j.componentWillMount=="function"&&j.componentWillMount(),typeof j.UNSAFE_componentWillMount=="function"&&j.UNSAFE_componentWillMount()),typeof j.componentDidMount=="function"&&(s.flags|=4194308)):(typeof j.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=m,s.memoizedState=Y),j.props=m,j.state=Y,j.context=_,m=$):(typeof j.componentDidMount=="function"&&(s.flags|=4194308),m=!1)}else{j=s.stateNode,Py(a,s),_=s.memoizedProps,J=ws(u,_),j.props=J,re=s.pendingProps,X=j.context,Y=u.contextType,$=Ll,typeof Y=="object"&&Y!==null&&($=nr(Y)),P=u.getDerivedStateFromProps,(Y=typeof P=="function"||typeof j.getSnapshotBeforeUpdate=="function")||typeof j.UNSAFE_componentWillReceiveProps!="function"&&typeof j.componentWillReceiveProps!="function"||(_!==re||X!==$)&&Y1(s,j,m,$),fi=!1,X=s.memoizedState,j.state=X,Iu(s,m,j,v),ku();var W=s.memoizedState;_!==re||X!==W||fi||a!==null&&a.dependencies!==null&&Jd(a.dependencies)?(typeof P=="function"&&(eg(s,u,P,m),W=s.memoizedState),(J=fi||G1(s,u,J,m,X,W,$)||a!==null&&a.dependencies!==null&&Jd(a.dependencies))?(Y||typeof j.UNSAFE_componentWillUpdate!="function"&&typeof j.componentWillUpdate!="function"||(typeof j.componentWillUpdate=="function"&&j.componentWillUpdate(m,W,$),typeof j.UNSAFE_componentWillUpdate=="function"&&j.UNSAFE_componentWillUpdate(m,W,$)),typeof j.componentDidUpdate=="function"&&(s.flags|=4),typeof j.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof j.componentDidUpdate!="function"||_===a.memoizedProps&&X===a.memoizedState||(s.flags|=4),typeof j.getSnapshotBeforeUpdate!="function"||_===a.memoizedProps&&X===a.memoizedState||(s.flags|=1024),s.memoizedProps=m,s.memoizedState=W),j.props=m,j.state=W,j.context=$,m=J):(typeof j.componentDidUpdate!="function"||_===a.memoizedProps&&X===a.memoizedState||(s.flags|=4),typeof j.getSnapshotBeforeUpdate!="function"||_===a.memoizedProps&&X===a.memoizedState||(s.flags|=1024),m=!1)}return j=m,xf(a,s),m=(s.flags&128)!==0,j||m?(j=s.stateNode,u=m&&typeof u.getDerivedStateFromError!="function"?null:j.render(),s.flags|=1,a!==null&&m?(s.child=bs(s,a.child,null,v),s.child=bs(s,null,u,v)):ar(a,s,u,v),s.memoizedState=j.state,a=s.child):a=Na(a,s,v),a}function oN(a,s,u,m){return ms(),s.flags|=256,ar(a,s,u,m),s.child}var ig={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function sg(a){return{baseLanes:a,cachePool:WS()}}function lg(a,s,u){return a=a!==null?a.childLanes&~u:0,s&&(a|=Zr),a}function uN(a,s,u){var m=s.pendingProps,v=!1,j=(s.flags&128)!==0,_;if((_=j)||(_=a!==null&&a.memoizedState===null?!1:(Et.current&2)!==0),_&&(v=!0,s.flags&=-129),_=(s.flags&32)!==0,s.flags&=-33,a===null){if($e){if(v?pi(s):yi(),(a=lt)?(a=gO(a,mn),a=a!==null&&a.data!=="&"?a:null,a!==null&&(s.memoizedState={dehydrated:a,treeContext:oi!==null?{id:Gn,overflow:Yn}:null,retryLane:536870912,hydrationErrors:null},u=qS(a),u.return=s,s.child=u,rr=s,lt=null)):a=null,a===null)throw ci(s);return Fg(a)?s.lanes=32:s.lanes=536870912,null}var P=m.children;return m=m.fallback,v?(yi(),v=s.mode,P=bf({mode:"hidden",children:P},v),m=hs(m,v,u,null),P.return=s,m.return=s,P.sibling=m,s.child=P,m=s.child,m.memoizedState=sg(u),m.childLanes=lg(a,_,u),s.memoizedState=ig,Uu(null,m)):(pi(s),og(s,P))}var $=a.memoizedState;if($!==null&&(P=$.dehydrated,P!==null)){if(j)s.flags&256?(pi(s),s.flags&=-257,s=ug(a,s,u)):s.memoizedState!==null?(yi(),s.child=a.child,s.flags|=128,s=null):(yi(),P=m.fallback,v=s.mode,m=bf({mode:"visible",children:m.children},v),P=hs(P,v,u,null),P.flags|=2,m.return=s,P.return=s,m.sibling=P,s.child=m,bs(s,a.child,null,u),m=s.child,m.memoizedState=sg(u),m.childLanes=lg(a,_,u),s.memoizedState=ig,s=Uu(null,m));else if(pi(s),Fg(P)){if(_=P.nextSibling&&P.nextSibling.dataset,_)var Y=_.dgst;_=Y,m=Error(n(419)),m.stack="",m.digest=_,Cu({value:m,source:null,stack:null}),s=ug(a,s,u)}else if(Dt||Ul(a,s,u,!1),_=(u&a.childLanes)!==0,Dt||_){if(_=nt,_!==null&&(m=Qw(_,u),m!==0&&m!==$.retryLane))throw $.retryLane=m,fs(a,m),Lr(_,a,m),ng;qg(P)||Cf(),s=ug(a,s,u)}else qg(P)?(s.flags|=192,s.child=a.child,s=null):(a=$.treeContext,lt=yn(P.nextSibling),rr=s,$e=!0,ui=null,mn=!1,a!==null&&KS(s,a),s=og(s,m.children),s.flags|=4096);return s}return v?(yi(),P=m.fallback,v=s.mode,$=a.child,Y=$.sibling,m=va($,{mode:"hidden",children:m.children}),m.subtreeFlags=$.subtreeFlags&65011712,Y!==null?P=va(Y,P):(P=hs(P,v,u,null),P.flags|=2),P.return=s,m.return=s,m.sibling=P,s.child=m,Uu(null,m),m=s.child,P=a.child.memoizedState,P===null?P=sg(u):(v=P.cachePool,v!==null?($=Mt._currentValue,v=v.parent!==$?{parent:$,pool:$}:v):v=WS(),P={baseLanes:P.baseLanes|u,cachePool:v}),m.memoizedState=P,m.childLanes=lg(a,_,u),s.memoizedState=ig,Uu(a.child,m)):(pi(s),u=a.child,a=u.sibling,u=va(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 og(a,s){return s=bf({mode:"visible",children:s},a.mode),s.return=a,a.child=s}function bf(a,s){return a=Vr(22,a,null,s),a.lanes=0,a}function ug(a,s,u){return bs(s,a.child,null,u),a=og(s,s.pendingProps.children),a.flags|=2,s.memoizedState=null,a}function cN(a,s,u){a.lanes|=s;var m=a.alternate;m!==null&&(m.lanes|=s),Ny(a.return,s,u)}function cg(a,s,u,m,v,j){var _=a.memoizedState;_===null?a.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:m,tail:u,tailMode:v,treeForkCount:j}:(_.isBackwards=s,_.rendering=null,_.renderingStartTime=0,_.last=m,_.tail=u,_.tailMode=v,_.treeForkCount=j)}function dN(a,s,u){var m=s.pendingProps,v=m.revealOrder,j=m.tail;m=m.children;var _=Et.current,P=(_&2)!==0;if(P?(_=_&1|2,s.flags|=128):_&=1,oe(Et,_),ar(a,s,m,u),m=$e?Au:0,!P&&a!==null&&(a.flags&128)!==0)e:for(a=s.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&cN(a,u,s);else if(a.tag===19)cN(a,u,s);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===s)break e;for(;a.sibling===null;){if(a.return===null||a.return===s)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}switch(v){case"forwards":for(u=s.child,v=null;u!==null;)a=u.alternate,a!==null&&of(a)===null&&(v=u),u=u.sibling;u=v,u===null?(v=s.child,s.child=null):(v=u.sibling,u.sibling=null),cg(s,!1,v,u,j,m);break;case"backwards":case"unstable_legacy-backwards":for(u=null,v=s.child,s.child=null;v!==null;){if(a=v.alternate,a!==null&&of(a)===null){s.child=v;break}a=v.sibling,v.sibling=u,u=v,v=a}cg(s,!0,u,null,j,m);break;case"together":cg(s,!1,null,null,void 0,m);break;default:s.memoizedState=null}return s.child}function Na(a,s,u){if(a!==null&&(s.dependencies=a.dependencies),xi|=s.lanes,(u&s.childLanes)===0)if(a!==null){if(Ul(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=va(a,a.pendingProps),s.child=u,u.return=s;a.sibling!==null;)a=a.sibling,u=u.sibling=va(a,a.pendingProps),u.return=s;u.sibling=null}return s.child}function dg(a,s){return(a.lanes&s)!==0?!0:(a=a.dependencies,!!(a!==null&&Jd(a)))}function iL(a,s,u){switch(s.tag){case 3:Re(s,s.stateNode.containerInfo),di(s,Mt,a.memoizedState.cache),ms();break;case 27:case 5:de(s);break;case 4:Re(s,s.stateNode.containerInfo);break;case 10:di(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,Iy(s),null;break;case 13:var m=s.memoizedState;if(m!==null)return m.dehydrated!==null?(pi(s),s.flags|=128,null):(u&s.child.childLanes)!==0?uN(a,s,u):(pi(s),a=Na(a,s,u),a!==null?a.sibling:null);pi(s);break;case 19:var v=(a.flags&128)!==0;if(m=(u&s.childLanes)!==0,m||(Ul(a,s,u,!1),m=(u&s.childLanes)!==0),v){if(m)return dN(a,s,u);s.flags|=128}if(v=s.memoizedState,v!==null&&(v.rendering=null,v.tail=null,v.lastEffect=null),oe(Et,Et.current),m)break;return null;case 22:return s.lanes=0,nN(a,s,u,s.pendingProps);case 24:di(s,Mt,a.memoizedState.cache)}return Na(a,s,u)}function fN(a,s,u){if(a!==null)if(a.memoizedProps!==s.pendingProps)Dt=!0;else{if(!dg(a,u)&&(s.flags&128)===0)return Dt=!1,iL(a,s,u);Dt=(a.flags&131072)!==0}else Dt=!1,$e&&(s.flags&1048576)!==0&&HS(s,Au,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")yy(a)?(m=ws(a,m),s.tag=1,s=lN(null,s,a,m,u)):(s.tag=0,s=ag(null,s,a,m,u));else{if(a!=null){var v=a.$$typeof;if(v===E){s.tag=11,s=eN(null,s,a,m,u);break e}else if(v===R){s.tag=14,s=tN(null,s,a,m,u);break e}}throw s=ee(a)||a,Error(n(306,s,""))}}return s;case 0:return ag(a,s,s.type,s.pendingProps,u);case 1:return m=s.type,v=ws(m,s.pendingProps),lN(a,s,m,v,u);case 3:e:{if(Re(s,s.stateNode.containerInfo),a===null)throw Error(n(387));m=s.pendingProps;var j=s.memoizedState;v=j.element,Py(a,s),Iu(s,m,null,u);var _=s.memoizedState;if(m=_.cache,di(s,Mt,m),m!==j.cache&&Oy(s,[Mt],u,!0),ku(),m=_.element,j.isDehydrated)if(j={element:m,isDehydrated:!1,cache:_.cache},s.updateQueue.baseState=j,s.memoizedState=j,s.flags&256){s=oN(a,s,m,u);break e}else if(m!==v){v=dn(Error(n(424)),s),Cu(v),s=oN(a,s,m,u);break e}else{switch(a=s.stateNode.containerInfo,a.nodeType){case 9:a=a.body;break;default:a=a.nodeName==="HTML"?a.ownerDocument.body:a}for(lt=yn(a.firstChild),rr=s,$e=!0,ui=null,mn=!0,u=n1(s,null,m,u),s.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling}else{if(ms(),m===v){s=Na(a,s,u);break e}ar(a,s,m,u)}s=s.child}return s;case 26:return xf(a,s),a===null?(u=SO(s.type,null,s.pendingProps,null))?s.memoizedState=u:$e||(u=s.type,a=s.pendingProps,m=If(xe.current).createElement(u),m[tr]=s,m[Pr]=a,ir(m,u,a),Kt(m),s.stateNode=m):s.memoizedState=SO(s.type,a.memoizedProps,s.pendingProps,a.memoizedState),null;case 27:return de(s),a===null&&$e&&(m=s.stateNode=bO(s.type,s.pendingProps,xe.current),rr=s,mn=!0,v=lt,Ni(s.type)?(Hg=v,lt=yn(m.firstChild)):lt=v),ar(a,s,s.pendingProps.children,u),xf(a,s),a===null&&(s.flags|=4194304),s.child;case 5:return a===null&&$e&&((v=m=lt)&&(m=kL(m,s.type,s.pendingProps,mn),m!==null?(s.stateNode=m,rr=s,lt=yn(m.firstChild),mn=!1,v=!0):v=!1),v||ci(s)),de(s),v=s.type,j=s.pendingProps,_=a!==null?a.memoizedProps:null,m=j.children,zg(v,j)?m=null:_!==null&&zg(v,_)&&(s.flags|=32),s.memoizedState!==null&&(v=$y(a,s,XI,null,null,u),rc._currentValue=v),xf(a,s),ar(a,s,m,u),s.child;case 6:return a===null&&$e&&((a=u=lt)&&(u=IL(u,s.pendingProps,mn),u!==null?(s.stateNode=u,rr=s,lt=null,a=!0):a=!1),a||ci(s)),null;case 13:return uN(a,s,u);case 4:return Re(s,s.stateNode.containerInfo),m=s.pendingProps,a===null?s.child=bs(s,null,m,u):ar(a,s,m,u),s.child;case 11:return eN(a,s,s.type,s.pendingProps,u);case 7:return ar(a,s,s.pendingProps,u),s.child;case 8:return ar(a,s,s.pendingProps.children,u),s.child;case 12:return ar(a,s,s.pendingProps.children,u),s.child;case 10:return m=s.pendingProps,di(s,s.type,m.value),ar(a,s,m.children,u),s.child;case 9:return v=s.type._context,m=s.pendingProps.children,ys(s),v=nr(v),m=m(v),s.flags|=1,ar(a,s,m,u),s.child;case 14:return tN(a,s,s.type,s.pendingProps,u);case 15:return rN(a,s,s.type,s.pendingProps,u);case 19:return dN(a,s,u);case 31:return aL(a,s,u);case 22:return nN(a,s,u,s.pendingProps);case 24:return ys(s),m=nr(Mt),a===null?(v=Ay(),v===null&&(v=nt,j=_y(),v.pooledCache=j,j.refCount++,j!==null&&(v.pooledCacheLanes|=u),v=j),s.memoizedState={parent:m,cache:v},Ty(s),di(s,Mt,v)):((a.lanes&u)!==0&&(Py(a,s),Iu(s,null,null,u),ku()),v=a.memoizedState,j=s.memoizedState,v.parent!==m?(v={parent:m,cache:m},s.memoizedState=v,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=v),di(s,Mt,m)):(m=j.cache,di(s,Mt,m),m!==v.cache&&Oy(s,[Mt],u,!0))),ar(a,s,s.pendingProps.children,u),s.child;case 29:throw s.pendingProps}throw Error(n(156,s.tag))}function Oa(a){a.flags|=4}function fg(a,s,u,m,v){if((s=(a.mode&32)!==0)&&(s=!1),s){if(a.flags|=16777216,(v&335544128)===v)if(a.stateNode.complete)a.flags|=8192;else if(zN())a.flags|=8192;else throw xs=nf,Cy}else a.flags&=-16777217}function hN(a,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!AO(s))if(zN())a.flags|=8192;else throw xs=nf,Cy}function jf(a,s){s!==null&&(a.flags|=4),a.flags&16384&&(s=a.tag!==22?Gw():536870912,a.lanes|=s,Jl|=s)}function qu(a,s){if(!$e)switch(a.tailMode){case"hidden":s=a.tail;for(var u=null;s!==null;)s.alternate!==null&&(u=s),s=s.sibling;u===null?a.tail=null:u.sibling=null;break;case"collapsed":u=a.tail;for(var m=null;u!==null;)u.alternate!==null&&(m=u),u=u.sibling;m===null?s||a.tail===null?a.tail=null:a.tail.sibling=null:m.sibling=null}}function ot(a){var s=a.alternate!==null&&a.alternate.child===a.child,u=0,m=0;if(s)for(var v=a.child;v!==null;)u|=v.lanes|v.childLanes,m|=v.subtreeFlags&65011712,m|=v.flags&65011712,v.return=a,v=v.sibling;else for(v=a.child;v!==null;)u|=v.lanes|v.childLanes,m|=v.subtreeFlags,m|=v.flags,v.return=a,v=v.sibling;return a.subtreeFlags|=m,a.childLanes=u,s}function sL(a,s,u){var m=s.pendingProps;switch(by(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ot(s),null;case 1:return ot(s),null;case 3:return u=s.stateNode,m=null,a!==null&&(m=a.memoizedState.cache),s.memoizedState.cache!==m&&(s.flags|=2048),ja(Mt),ce(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(a===null||a.child===null)&&(Bl(s)?Oa(s):a===null||a.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,wy())),ot(s),null;case 26:var v=s.type,j=s.memoizedState;return a===null?(Oa(s),j!==null?(ot(s),hN(s,j)):(ot(s),fg(s,v,null,m,u))):j?j!==a.memoizedState?(Oa(s),ot(s),hN(s,j)):(ot(s),s.flags&=-16777217):(a=a.memoizedProps,a!==m&&Oa(s),ot(s),fg(s,v,a,m,u)),null;case 27:if(Oe(s),u=xe.current,v=s.type,a!==null&&s.stateNode!=null)a.memoizedProps!==m&&Oa(s);else{if(!m){if(s.stateNode===null)throw Error(n(166));return ot(s),null}a=se.current,Bl(s)?GS(s):(a=bO(v,m,u),s.stateNode=a,Oa(s))}return ot(s),null;case 5:if(Oe(s),v=s.type,a!==null&&s.stateNode!=null)a.memoizedProps!==m&&Oa(s);else{if(!m){if(s.stateNode===null)throw Error(n(166));return ot(s),null}if(j=se.current,Bl(s))GS(s);else{var _=If(xe.current);switch(j){case 1:j=_.createElementNS("http://www.w3.org/2000/svg",v);break;case 2:j=_.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;default:switch(v){case"svg":j=_.createElementNS("http://www.w3.org/2000/svg",v);break;case"math":j=_.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;case"script":j=_.createElement("div"),j.innerHTML="<script><\/script>",j=j.removeChild(j.firstChild);break;case"select":j=typeof m.is=="string"?_.createElement("select",{is:m.is}):_.createElement("select"),m.multiple?j.multiple=!0:m.size&&(j.size=m.size);break;default:j=typeof m.is=="string"?_.createElement(v,{is:m.is}):_.createElement(v)}}j[tr]=s,j[Pr]=m;e:for(_=s.child;_!==null;){if(_.tag===5||_.tag===6)j.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=j;e:switch(ir(j,v,m),v){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}m&&Oa(s)}}return ot(s),fg(s,s.type,a===null?null:a.memoizedProps,s.pendingProps,u),null;case 6:if(a&&s.stateNode!=null)a.memoizedProps!==m&&Oa(s);else{if(typeof m!="string"&&s.stateNode===null)throw Error(n(166));if(a=xe.current,Bl(s)){if(a=s.stateNode,u=s.memoizedProps,m=null,v=rr,v!==null)switch(v.tag){case 27:case 5:m=v.memoizedProps}a[tr]=s,a=!!(a.nodeValue===u||m!==null&&m.suppressHydrationWarning===!0||uO(a.nodeValue,u)),a||ci(s,!0)}else a=If(a).createTextNode(m),a[tr]=s,s.stateNode=a}return ot(s),null;case 31:if(u=s.memoizedState,a===null||a.memoizedState!==null){if(m=Bl(s),u!==null){if(a===null){if(!m)throw Error(n(318));if(a=s.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(n(557));a[tr]=s}else ms(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;ot(s),a=!1}else u=wy(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=u),a=!0;if(!a)return s.flags&256?(Xr(s),s):(Xr(s),null);if((s.flags&128)!==0)throw Error(n(558))}return ot(s),null;case 13:if(m=s.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(v=Bl(s),m!==null&&m.dehydrated!==null){if(a===null){if(!v)throw Error(n(318));if(v=s.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(n(317));v[tr]=s}else ms(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;ot(s),v=!1}else v=wy(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=v),v=!0;if(!v)return s.flags&256?(Xr(s),s):(Xr(s),null)}return Xr(s),(s.flags&128)!==0?(s.lanes=u,s):(u=m!==null,a=a!==null&&a.memoizedState!==null,u&&(m=s.child,v=null,m.alternate!==null&&m.alternate.memoizedState!==null&&m.alternate.memoizedState.cachePool!==null&&(v=m.alternate.memoizedState.cachePool.pool),j=null,m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(j=m.memoizedState.cachePool.pool),j!==v&&(m.flags|=2048)),u!==a&&u&&(s.child.flags|=8192),jf(s,s.updateQueue),ot(s),null);case 4:return ce(),a===null&&Dg(s.stateNode.containerInfo),ot(s),null;case 10:return ja(s.type),ot(s),null;case 19:if(Q(Et),m=s.memoizedState,m===null)return ot(s),null;if(v=(s.flags&128)!==0,j=m.rendering,j===null)if(v)qu(m,!1);else{if(jt!==0||a!==null&&(a.flags&128)!==0)for(a=s.child;a!==null;){if(j=of(a),j!==null){for(s.flags|=128,qu(m,!1),a=j.updateQueue,s.updateQueue=a,jf(s,a),s.subtreeFlags=0,a=u,u=s.child;u!==null;)US(u,a),u=u.sibling;return oe(Et,Et.current&1|2),$e&&xa(s,m.treeForkCount),s.child}a=a.sibling}m.tail!==null&&Me()>_f&&(s.flags|=128,v=!0,qu(m,!1),s.lanes=4194304)}else{if(!v)if(a=of(j),a!==null){if(s.flags|=128,v=!0,a=a.updateQueue,s.updateQueue=a,jf(s,a),qu(m,!0),m.tail===null&&m.tailMode==="hidden"&&!j.alternate&&!$e)return ot(s),null}else 2*Me()-m.renderingStartTime>_f&&u!==536870912&&(s.flags|=128,v=!0,qu(m,!1),s.lanes=4194304);m.isBackwards?(j.sibling=s.child,s.child=j):(a=m.last,a!==null?a.sibling=j:s.child=j,m.last=j)}return m.tail!==null?(a=m.tail,m.rendering=a,m.tail=a.sibling,m.renderingStartTime=Me(),a.sibling=null,u=Et.current,oe(Et,v?u&1|2:u&1),$e&&xa(s,m.treeForkCount),a):(ot(s),null);case 22:case 23:return Xr(s),ky(),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&&(ot(s),s.subtreeFlags&6&&(s.flags|=8192)):ot(s),u=s.updateQueue,u!==null&&jf(s,u.retryQueue),u=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),m=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(m=s.memoizedState.cachePool.pool),m!==u&&(s.flags|=2048),a!==null&&Q(gs),null;case 24:return u=null,a!==null&&(u=a.memoizedState.cache),s.memoizedState.cache!==u&&(s.flags|=2048),ja(Mt),ot(s),null;case 25:return null;case 30:return null}throw Error(n(156,s.tag))}function lL(a,s){switch(by(s),s.tag){case 1:return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 3:return ja(Mt),ce(),a=s.flags,(a&65536)!==0&&(a&128)===0?(s.flags=a&-65537|128,s):null;case 26:case 27:case 5:return Oe(s),null;case 31:if(s.memoizedState!==null){if(Xr(s),s.alternate===null)throw Error(n(340));ms()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 13:if(Xr(s),a=s.memoizedState,a!==null&&a.dehydrated!==null){if(s.alternate===null)throw Error(n(340));ms()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 19:return Q(Et),null;case 4:return ce(),null;case 10:return ja(s.type),null;case 22:case 23:return Xr(s),ky(),a!==null&&Q(gs),a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 24:return ja(Mt),null;case 25:return null;default:return null}}function mN(a,s){switch(by(s),s.tag){case 3:ja(Mt),ce();break;case 26:case 27:case 5:Oe(s);break;case 4:ce();break;case 31:s.memoizedState!==null&&Xr(s);break;case 13:Xr(s);break;case 19:Q(Et);break;case 10:ja(s.type);break;case 22:case 23:Xr(s),ky(),a!==null&&Q(gs);break;case 24:ja(Mt)}}function Fu(a,s){try{var u=s.updateQueue,m=u!==null?u.lastEffect:null;if(m!==null){var v=m.next;u=v;do{if((u.tag&a)===a){m=void 0;var j=u.create,_=u.inst;m=j(),_.destroy=m}u=u.next}while(u!==v)}}catch(P){Xe(s,s.return,P)}}function gi(a,s,u){try{var m=s.updateQueue,v=m!==null?m.lastEffect:null;if(v!==null){var j=v.next;m=j;do{if((m.tag&a)===a){var _=m.inst,P=_.destroy;if(P!==void 0){_.destroy=void 0,v=s;var $=u,Y=P;try{Y()}catch(J){Xe(v,$,J)}}}m=m.next}while(m!==j)}}catch(J){Xe(s,s.return,J)}}function pN(a){var s=a.updateQueue;if(s!==null){var u=a.stateNode;try{i1(s,u)}catch(m){Xe(a,a.return,m)}}}function yN(a,s,u){u.props=ws(a.type,a.memoizedProps),u.state=a.memoizedState;try{u.componentWillUnmount()}catch(m){Xe(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(v){Xe(a,s,v)}}function Vn(a,s){var u=a.ref,m=a.refCleanup;if(u!==null)if(typeof m=="function")try{m()}catch(v){Xe(a,s,v)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(v){Xe(a,s,v)}else u.current=null}function gN(a){var s=a.type,u=a.memoizedProps,m=a.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":u.autoFocus&&m.focus();break e;case"img":u.src?m.src=u.src:u.srcSet&&(m.srcset=u.srcSet)}}catch(v){Xe(a,a.return,v)}}function hg(a,s,u){try{var m=a.stateNode;CL(m,a.type,u,s),m[Pr]=s}catch(v){Xe(a,a.return,v)}}function vN(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&Ni(a.type)||a.tag===4}function mg(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||vN(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&&Ni(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 pg(a,s,u){var m=a.tag;if(m===5||m===6)a=a.stateNode,s?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(a,s):(s=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,s.appendChild(a),u=u._reactRootContainer,u!=null||s.onclick!==null||(s.onclick=ya));else if(m!==4&&(m===27&&Ni(a.type)&&(u=a.stateNode,s=null),a=a.child,a!==null))for(pg(a,s,u),a=a.sibling;a!==null;)pg(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&&Ni(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 xN(a){var s=a.stateNode,u=a.memoizedProps;try{for(var m=a.type,v=s.attributes;v.length;)s.removeAttributeNode(v[0]);ir(s,m,u),s[tr]=a,s[Pr]=u}catch(j){Xe(a,a.return,j)}}var _a=!1,kt=!1,yg=!1,bN=typeof WeakSet=="function"?WeakSet:Set,Gt=null;function oL(a,s){if(a=a.containerInfo,Lg=Ff,a=MS(a),uy(a)){if("selectionStart"in a)var u={start:a.selectionStart,end:a.selectionEnd};else e:{u=(u=a.ownerDocument)&&u.defaultView||window;var m=u.getSelection&&u.getSelection();if(m&&m.rangeCount!==0){u=m.anchorNode;var v=m.anchorOffset,j=m.focusNode;m=m.focusOffset;try{u.nodeType,j.nodeType}catch{u=null;break e}var _=0,P=-1,$=-1,Y=0,J=0,re=a,X=null;t:for(;;){for(var W;re!==u||v!==0&&re.nodeType!==3||(P=_+v),re!==j||m!==0&&re.nodeType!==3||($=_+m),re.nodeType===3&&(_+=re.nodeValue.length),(W=re.firstChild)!==null;)X=re,re=W;for(;;){if(re===a)break t;if(X===u&&++Y===v&&(P=_),X===j&&++J===m&&($=_),(W=re.nextSibling)!==null)break;re=X,X=re.parentNode}re=W}u=P===-1||$===-1?null:{start:P,end:$}}else u=null}u=u||{start:0,end:0}}else u=null;for($g={focusedElem:a,selectionRange:u},Ff=!1,Gt=s;Gt!==null;)if(s=Gt,a=s.child,(s.subtreeFlags&1028)!==0&&a!==null)a.return=s,Gt=a;else for(;Gt!==null;){switch(s=Gt,j=s.alternate,a=s.flags,s.tag){case 0:if((a&4)!==0&&(a=s.updateQueue,a=a!==null?a.events:null,a!==null))for(u=0;u<a.length;u++)v=a[u],v.ref.impl=v.nextImpl;break;case 11:case 15:break;case 1:if((a&1024)!==0&&j!==null){a=void 0,u=s,v=j.memoizedProps,j=j.memoizedState,m=u.stateNode;try{var ye=ws(u.type,v);a=m.getSnapshotBeforeUpdate(ye,j),m.__reactInternalSnapshotBeforeUpdate=a}catch(Ne){Xe(u,u.return,Ne)}}break;case 3:if((a&1024)!==0){if(a=s.stateNode.containerInfo,u=a.nodeType,u===9)Ug(a);else if(u===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":Ug(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((a&1024)!==0)throw Error(n(163))}if(a=s.sibling,a!==null){a.return=s.return,Gt=a;break}Gt=s.return}}function jN(a,s,u){var m=u.flags;switch(u.tag){case 0:case 11:case 15:Aa(a,u),m&4&&Fu(5,u);break;case 1:if(Aa(a,u),m&4)if(a=u.stateNode,s===null)try{a.componentDidMount()}catch(_){Xe(u,u.return,_)}else{var v=ws(u.type,s.memoizedProps);s=s.memoizedState;try{a.componentDidUpdate(v,s,a.__reactInternalSnapshotBeforeUpdate)}catch(_){Xe(u,u.return,_)}}m&64&&pN(u),m&512&&Hu(u,u.return);break;case 3:if(Aa(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{i1(a,s)}catch(_){Xe(u,u.return,_)}}break;case 27:s===null&&m&4&&xN(u);case 26:case 5:Aa(a,u),s===null&&m&4&&gN(u),m&512&&Hu(u,u.return);break;case 12:Aa(a,u);break;case 31:Aa(a,u),m&4&&NN(a,u);break;case 13:Aa(a,u),m&4&&ON(a,u),m&64&&(a=u.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(u=gL.bind(null,u),LL(a,u))));break;case 22:if(m=u.memoizedState!==null||_a,!m){s=s!==null&&s.memoizedState!==null||kt,v=_a;var j=kt;_a=m,(kt=s)&&!j?Ca(a,u,(u.subtreeFlags&8772)!==0):Aa(a,u),_a=v,kt=j}break;case 30:break;default:Aa(a,u)}}function wN(a){var s=a.alternate;s!==null&&(a.alternate=null,wN(s)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(s=a.stateNode,s!==null&&Gp(s)),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}var ft=null,Rr=!1;function Ea(a,s,u){for(u=u.child;u!==null;)SN(a,s,u),u=u.sibling}function SN(a,s,u){if(Kr&&typeof Kr.onCommitFiberUnmount=="function")try{Kr.onCommitFiberUnmount(mu,u)}catch{}switch(u.tag){case 26:kt||Vn(u,s),Ea(a,s,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:kt||Vn(u,s);var m=ft,v=Rr;Ni(u.type)&&(ft=u.stateNode,Rr=!1),Ea(a,s,u),Ju(u.stateNode),ft=m,Rr=v;break;case 5:kt||Vn(u,s);case 6:if(m=ft,v=Rr,ft=null,Ea(a,s,u),ft=m,Rr=v,ft!==null)if(Rr)try{(ft.nodeType===9?ft.body:ft.nodeName==="HTML"?ft.ownerDocument.body:ft).removeChild(u.stateNode)}catch(j){Xe(u,s,j)}else try{ft.removeChild(u.stateNode)}catch(j){Xe(u,s,j)}break;case 18:ft!==null&&(Rr?(a=ft,pO(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,u.stateNode),lo(a)):pO(ft,u.stateNode));break;case 4:m=ft,v=Rr,ft=u.stateNode.containerInfo,Rr=!0,Ea(a,s,u),ft=m,Rr=v;break;case 0:case 11:case 14:case 15:gi(2,u,s),kt||gi(4,u,s),Ea(a,s,u);break;case 1:kt||(Vn(u,s),m=u.stateNode,typeof m.componentWillUnmount=="function"&&yN(u,s,m)),Ea(a,s,u);break;case 21:Ea(a,s,u);break;case 22:kt=(m=kt)||u.memoizedState!==null,Ea(a,s,u),kt=m;break;default:Ea(a,s,u)}}function NN(a,s){if(s.memoizedState===null&&(a=s.alternate,a!==null&&(a=a.memoizedState,a!==null))){a=a.dehydrated;try{lo(a)}catch(u){Xe(s,s.return,u)}}}function ON(a,s){if(s.memoizedState===null&&(a=s.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{lo(a)}catch(u){Xe(s,s.return,u)}}function uL(a){switch(a.tag){case 31:case 13:case 19:var s=a.stateNode;return s===null&&(s=a.stateNode=new bN),s;case 22:return a=a.stateNode,s=a._retryCache,s===null&&(s=a._retryCache=new bN),s;default:throw Error(n(435,a.tag))}}function Sf(a,s){var u=uL(a);s.forEach(function(m){if(!u.has(m)){u.add(m);var v=vL.bind(null,a,m);m.then(v,v)}})}function Dr(a,s){var u=s.deletions;if(u!==null)for(var m=0;m<u.length;m++){var v=u[m],j=a,_=s,P=_;e:for(;P!==null;){switch(P.tag){case 27:if(Ni(P.type)){ft=P.stateNode,Rr=!1;break e}break;case 5:ft=P.stateNode,Rr=!1;break e;case 3:case 4:ft=P.stateNode.containerInfo,Rr=!0;break e}P=P.return}if(ft===null)throw Error(n(160));SN(j,_,v),ft=null,Rr=!1,j=v.alternate,j!==null&&(j.return=null),v.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)_N(s,a),s=s.sibling}var Pn=null;function _N(a,s){var u=a.alternate,m=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:Dr(s,a),kr(a),m&4&&(gi(3,a,a.return),Fu(3,a),gi(5,a,a.return));break;case 1:Dr(s,a),kr(a),m&512&&(kt||u===null||Vn(u,u.return)),m&64&&_a&&(a=a.updateQueue,a!==null&&(m=a.callbacks,m!==null&&(u=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=u===null?m:u.concat(m))));break;case 26:var v=Pn;if(Dr(s,a),kr(a),m&512&&(kt||u===null||Vn(u,u.return)),m&4){var j=u!==null?u.memoizedState:null;if(m=a.memoizedState,u===null)if(m===null)if(a.stateNode===null){e:{m=a.type,u=a.memoizedProps,v=v.ownerDocument||v;t:switch(m){case"title":j=v.getElementsByTagName("title")[0],(!j||j[gu]||j[tr]||j.namespaceURI==="http://www.w3.org/2000/svg"||j.hasAttribute("itemprop"))&&(j=v.createElement(m),v.head.insertBefore(j,v.querySelector("head > title"))),ir(j,m,u),j[tr]=a,Kt(j),m=j;break e;case"link":var _=_O("link","href",v).get(m+(u.href||""));if(_){for(var P=0;P<_.length;P++)if(j=_[P],j.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&j.getAttribute("rel")===(u.rel==null?null:u.rel)&&j.getAttribute("title")===(u.title==null?null:u.title)&&j.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){_.splice(P,1);break t}}j=v.createElement(m),ir(j,m,u),v.head.appendChild(j);break;case"meta":if(_=_O("meta","content",v).get(m+(u.content||""))){for(P=0;P<_.length;P++)if(j=_[P],j.getAttribute("content")===(u.content==null?null:""+u.content)&&j.getAttribute("name")===(u.name==null?null:u.name)&&j.getAttribute("property")===(u.property==null?null:u.property)&&j.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&j.getAttribute("charset")===(u.charSet==null?null:u.charSet)){_.splice(P,1);break t}}j=v.createElement(m),ir(j,m,u),v.head.appendChild(j);break;default:throw Error(n(468,m))}j[tr]=a,Kt(j),m=j}a.stateNode=m}else EO(v,a.type,a.stateNode);else a.stateNode=OO(v,m,a.memoizedProps);else j!==m?(j===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):j.count--,m===null?EO(v,a.type,a.stateNode):OO(v,m,a.memoizedProps)):m===null&&a.stateNode!==null&&hg(a,a.memoizedProps,u.memoizedProps)}break;case 27:Dr(s,a),kr(a),m&512&&(kt||u===null||Vn(u,u.return)),u!==null&&m&4&&hg(a,a.memoizedProps,u.memoizedProps);break;case 5:if(Dr(s,a),kr(a),m&512&&(kt||u===null||Vn(u,u.return)),a.flags&32){v=a.stateNode;try{Tl(v,"")}catch(ye){Xe(a,a.return,ye)}}m&4&&a.stateNode!=null&&(v=a.memoizedProps,hg(a,v,u!==null?u.memoizedProps:v)),m&1024&&(yg=!0);break;case 6:if(Dr(s,a),kr(a),m&4){if(a.stateNode===null)throw Error(n(162));m=a.memoizedProps,u=a.stateNode;try{u.nodeValue=m}catch(ye){Xe(a,a.return,ye)}}break;case 3:if(zf=null,v=Pn,Pn=Lf(s.containerInfo),Dr(s,a),Pn=v,kr(a),m&4&&u!==null&&u.memoizedState.isDehydrated)try{lo(s.containerInfo)}catch(ye){Xe(a,a.return,ye)}yg&&(yg=!1,EN(a));break;case 4:m=Pn,Pn=Lf(a.stateNode.containerInfo),Dr(s,a),kr(a),Pn=m;break;case 12:Dr(s,a),kr(a);break;case 31:Dr(s,a),kr(a),m&4&&(m=a.updateQueue,m!==null&&(a.updateQueue=null,Sf(a,m)));break;case 13:Dr(s,a),kr(a),a.child.flags&8192&&a.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(Of=Me()),m&4&&(m=a.updateQueue,m!==null&&(a.updateQueue=null,Sf(a,m)));break;case 22:v=a.memoizedState!==null;var $=u!==null&&u.memoizedState!==null,Y=_a,J=kt;if(_a=Y||v,kt=J||$,Dr(s,a),kt=J,_a=Y,kr(a),m&8192)e:for(s=a.stateNode,s._visibility=v?s._visibility&-2:s._visibility|1,v&&(u===null||$||_a||kt||Ss(a)),u=null,s=a;;){if(s.tag===5||s.tag===26){if(u===null){$=u=s;try{if(j=$.stateNode,v)_=j.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none";else{P=$.stateNode;var re=$.memoizedProps.style,X=re!=null&&re.hasOwnProperty("display")?re.display:null;P.style.display=X==null||typeof X=="boolean"?"":(""+X).trim()}}catch(ye){Xe($,$.return,ye)}}}else if(s.tag===6){if(u===null){$=s;try{$.stateNode.nodeValue=v?"":$.memoizedProps}catch(ye){Xe($,$.return,ye)}}}else if(s.tag===18){if(u===null){$=s;try{var W=$.stateNode;v?yO(W,!0):yO($.stateNode,!1)}catch(ye){Xe($,$.return,ye)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===a)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===a)break e;for(;s.sibling===null;){if(s.return===null||s.return===a)break e;u===s&&(u=null),s=s.return}u===s&&(u=null),s.sibling.return=s.return,s=s.sibling}m&4&&(m=a.updateQueue,m!==null&&(u=m.retryQueue,u!==null&&(m.retryQueue=null,Sf(a,u))));break;case 19:Dr(s,a),kr(a),m&4&&(m=a.updateQueue,m!==null&&(a.updateQueue=null,Sf(a,m)));break;case 30:break;case 21:break;default:Dr(s,a),kr(a)}}function kr(a){var s=a.flags;if(s&2){try{for(var u,m=a.return;m!==null;){if(vN(m)){u=m;break}m=m.return}if(u==null)throw Error(n(160));switch(u.tag){case 27:var v=u.stateNode,j=mg(a);wf(a,j,v);break;case 5:var _=u.stateNode;u.flags&32&&(Tl(_,""),u.flags&=-33);var P=mg(a);wf(a,P,_);break;case 3:case 4:var $=u.stateNode.containerInfo,Y=mg(a);pg(a,Y,$);break;default:throw Error(n(161))}}catch(J){Xe(a,a.return,J)}a.flags&=-3}s&4096&&(a.flags&=-4097)}function EN(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var s=a;EN(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),a=a.sibling}}function Aa(a,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)jN(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:gi(4,s,s.return),Ss(s);break;case 1:Vn(s,s.return);var u=s.stateNode;typeof u.componentWillUnmount=="function"&&yN(s,s.return,u),Ss(s);break;case 27:Ju(s.stateNode);case 26:case 5:Vn(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 Ca(a,s,u){for(u=u&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var m=s.alternate,v=a,j=s,_=j.flags;switch(j.tag){case 0:case 11:case 15:Ca(v,j,u),Fu(4,j);break;case 1:if(Ca(v,j,u),m=j,v=m.stateNode,typeof v.componentDidMount=="function")try{v.componentDidMount()}catch(Y){Xe(m,m.return,Y)}if(m=j,v=m.updateQueue,v!==null){var P=m.stateNode;try{var $=v.shared.hiddenCallbacks;if($!==null)for(v.shared.hiddenCallbacks=null,v=0;v<$.length;v++)a1($[v],P)}catch(Y){Xe(m,m.return,Y)}}u&&_&64&&pN(j),Hu(j,j.return);break;case 27:xN(j);case 26:case 5:Ca(v,j,u),u&&m===null&&_&4&&gN(j),Hu(j,j.return);break;case 12:Ca(v,j,u);break;case 31:Ca(v,j,u),u&&_&4&&NN(v,j);break;case 13:Ca(v,j,u),u&&_&4&&ON(v,j);break;case 22:j.memoizedState===null&&Ca(v,j,u),Hu(j,j.return);break;case 30:break;default:Ca(v,j,u)}s=s.sibling}}function gg(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&&Tu(u))}function vg(a,s){a=null,s.alternate!==null&&(a=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==a&&(s.refCount++,a!=null&&Tu(a))}function Mn(a,s,u,m){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)AN(a,s,u,m),s=s.sibling}function AN(a,s,u,m){var v=s.flags;switch(s.tag){case 0:case 11:case 15:Mn(a,s,u,m),v&2048&&Fu(9,s);break;case 1:Mn(a,s,u,m);break;case 3:Mn(a,s,u,m),v&2048&&(a=null,s.alternate!==null&&(a=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==a&&(s.refCount++,a!=null&&Tu(a)));break;case 12:if(v&2048){Mn(a,s,u,m),a=s.stateNode;try{var j=s.memoizedProps,_=j.id,P=j.onPostCommit;typeof P=="function"&&P(_,s.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch($){Xe(s,s.return,$)}}else Mn(a,s,u,m);break;case 31:Mn(a,s,u,m);break;case 13:Mn(a,s,u,m);break;case 23:break;case 22:j=s.stateNode,_=s.alternate,s.memoizedState!==null?j._visibility&2?Mn(a,s,u,m):Ku(a,s):j._visibility&2?Mn(a,s,u,m):(j._visibility|=2,Xl(a,s,u,m,(s.subtreeFlags&10256)!==0||!1)),v&2048&&gg(_,s);break;case 24:Mn(a,s,u,m),v&2048&&vg(s.alternate,s);break;default:Mn(a,s,u,m)}}function Xl(a,s,u,m,v){for(v=v&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var j=a,_=s,P=u,$=m,Y=_.flags;switch(_.tag){case 0:case 11:case 15:Xl(j,_,P,$,v),Fu(8,_);break;case 23:break;case 22:var J=_.stateNode;_.memoizedState!==null?J._visibility&2?Xl(j,_,P,$,v):Ku(j,_):(J._visibility|=2,Xl(j,_,P,$,v)),v&&Y&2048&&gg(_.alternate,_);break;case 24:Xl(j,_,P,$,v),v&&Y&2048&&vg(_.alternate,_);break;default:Xl(j,_,P,$,v)}s=s.sibling}}function Ku(a,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var u=a,m=s,v=m.flags;switch(m.tag){case 22:Ku(u,m),v&2048&&gg(m.alternate,m);break;case 24:Ku(u,m),v&2048&&vg(m.alternate,m);break;default:Ku(u,m)}s=s.sibling}}var Gu=8192;function Wl(a,s,u){if(a.subtreeFlags&Gu)for(a=a.child;a!==null;)CN(a,s,u),a=a.sibling}function CN(a,s,u){switch(a.tag){case 26:Wl(a,s,u),a.flags&Gu&&a.memoizedState!==null&&QL(u,Pn,a.memoizedState,a.memoizedProps);break;case 5:Wl(a,s,u);break;case 3:case 4:var m=Pn;Pn=Lf(a.stateNode.containerInfo),Wl(a,s,u),Pn=m;break;case 22:a.memoizedState===null&&(m=a.alternate,m!==null&&m.memoizedState!==null?(m=Gu,Gu=16777216,Wl(a,s,u),Gu=m):Wl(a,s,u));break;default:Wl(a,s,u)}}function TN(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 Yu(a){var s=a.deletions;if((a.flags&16)!==0){if(s!==null)for(var u=0;u<s.length;u++){var m=s[u];Gt=m,MN(m,a)}TN(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)PN(a),a=a.sibling}function PN(a){switch(a.tag){case 0:case 11:case 15:Yu(a),a.flags&2048&&gi(9,a,a.return);break;case 3:Yu(a);break;case 12:Yu(a);break;case 22:var s=a.stateNode;a.memoizedState!==null&&s._visibility&2&&(a.return===null||a.return.tag!==13)?(s._visibility&=-3,Nf(a)):Yu(a);break;default:Yu(a)}}function Nf(a){var s=a.deletions;if((a.flags&16)!==0){if(s!==null)for(var u=0;u<s.length;u++){var m=s[u];Gt=m,MN(m,a)}TN(a)}for(a=a.child;a!==null;){switch(s=a,s.tag){case 0:case 11:case 15:gi(8,s,s.return),Nf(s);break;case 22:u=s.stateNode,u._visibility&2&&(u._visibility&=-3,Nf(s));break;default:Nf(s)}a=a.sibling}}function MN(a,s){for(;Gt!==null;){var u=Gt;switch(u.tag){case 0:case 11:case 15:gi(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:Tu(u.memoizedState.cache)}if(m=u.child,m!==null)m.return=u,Gt=m;else e:for(u=a;Gt!==null;){m=Gt;var v=m.sibling,j=m.return;if(wN(m),m===u){Gt=null;break e}if(v!==null){v.return=j,Gt=v;break e}Gt=j}}}var cL={getCacheForType:function(a){var s=nr(Mt),u=s.data.get(a);return u===void 0&&(u=a(),s.data.set(a,u)),u},cacheSignal:function(){return nr(Mt).controller.signal}},dL=typeof WeakMap=="function"?WeakMap:Map,Ge=0,nt=null,De=null,Ie=0,Qe=0,Wr=null,vi=!1,Zl=!1,xg=!1,Ta=0,jt=0,xi=0,Ns=0,bg=0,Zr=0,Jl=0,Vu=null,Ir=null,jg=!1,Of=0,RN=0,_f=1/0,Ef=null,bi=null,Lt=0,ji=null,eo=null,Pa=0,wg=0,Sg=null,DN=null,Qu=0,Ng=null;function Jr(){return(Ge&2)!==0&&Ie!==0?Ie&-Ie:z.T!==null?Tg():Xw()}function kN(){if(Zr===0)if((Ie&536870912)===0||$e){var a=Dd;Dd<<=1,(Dd&3932160)===0&&(Dd=262144),Zr=a}else Zr=536870912;return a=Qr.current,a!==null&&(a.flags|=32),Zr}function Lr(a,s,u){(a===nt&&(Qe===2||Qe===9)||a.cancelPendingCommit!==null)&&(to(a,0),wi(a,Ie,Zr,!1)),yu(a,u),((Ge&2)===0||a!==nt)&&(a===nt&&((Ge&2)===0&&(Ns|=u),jt===4&&wi(a,Ie,Zr,!1)),Qn(a))}function IN(a,s,u){if((Ge&6)!==0)throw Error(n(327));var m=!u&&(s&127)===0&&(s&a.expiredLanes)===0||pu(a,s),v=m?mL(a,s):_g(a,s,!0),j=m;do{if(v===0){Zl&&!m&&wi(a,s,0,!1);break}else{if(u=a.current.alternate,j&&!fL(u)){v=_g(a,s,!1),j=!1;continue}if(v===2){if(j=s,a.errorRecoveryDisabledLanes&j)var _=0;else _=a.pendingLanes&-536870913,_=_!==0?_:_&536870912?536870912:0;if(_!==0){s=_;e:{var P=a;v=Vu;var $=P.current.memoizedState.isDehydrated;if($&&(to(P,_).flags|=256),_=_g(P,_,!1),_!==2){if(xg&&!$){P.errorRecoveryDisabledLanes|=j,Ns|=j,v=4;break e}j=Ir,Ir=v,j!==null&&(Ir===null?Ir=j:Ir.push.apply(Ir,j))}v=_}if(j=!1,v!==2)continue}}if(v===1){to(a,0),wi(a,s,0,!0);break}e:{switch(m=a,j=v,j){case 0:case 1:throw Error(n(345));case 4:if((s&4194048)!==s)break;case 6:wi(m,s,Zr,!vi);break e;case 2:Ir=null;break;case 3:case 5:break;default:throw Error(n(329))}if((s&62914560)===s&&(v=Of+300-Me(),10<v)){if(wi(m,s,Zr,!vi),Id(m,0,!0)!==0)break e;Pa=s,m.timeoutHandle=hO(LN.bind(null,m,u,Ir,Ef,jg,s,Zr,Ns,Jl,vi,j,"Throttled",-0,0),v);break e}LN(m,u,Ir,Ef,jg,s,Zr,Ns,Jl,vi,j,null,-0,0)}}break}while(!0);Qn(a)}function LN(a,s,u,m,v,j,_,P,$,Y,J,re,X,W){if(a.timeoutHandle=-1,re=s.subtreeFlags,re&8192||(re&16785408)===16785408){re={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ya},CN(s,j,re);var ye=(j&62914560)===j?Of-Me():(j&4194048)===j?RN-Me():0;if(ye=XL(re,ye),ye!==null){Pa=j,a.cancelPendingCommit=ye(KN.bind(null,a,s,j,u,m,v,_,P,$,J,re,null,X,W)),wi(a,j,_,!Y);return}}KN(a,s,j,u,m,v,_,P,$)}function fL(a){for(var s=a;;){var u=s.tag;if((u===0||u===11||u===15)&&s.flags&16384&&(u=s.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var m=0;m<u.length;m++){var v=u[m],j=v.getSnapshot;v=v.value;try{if(!Yr(j(),v))return!1}catch{return!1}}if(u=s.child,s.subtreeFlags&16384&&u!==null)u.return=s,s=u;else{if(s===a)break;for(;s.sibling===null;){if(s.return===null||s.return===a)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function wi(a,s,u,m){s&=~bg,s&=~Ns,a.suspendedLanes|=s,a.pingedLanes&=~s,m&&(a.warmLanes|=s),m=a.expirationTimes;for(var v=s;0<v;){var j=31-Gr(v),_=1<<j;m[j]=-1,v&=~_}u!==0&&Yw(a,u,s)}function Af(){return(Ge&6)===0?(Xu(0),!1):!0}function Og(){if(De!==null){if(Qe===0)var a=De.return;else a=De,ba=ps=null,Uy(a),Kl=null,Mu=0,a=De;for(;a!==null;)mN(a.alternate,a),a=a.return;De=null}}function to(a,s){var u=a.timeoutHandle;u!==-1&&(a.timeoutHandle=-1,ML(u)),u=a.cancelPendingCommit,u!==null&&(a.cancelPendingCommit=null,u()),Pa=0,Og(),nt=a,De=u=va(a.current,null),Ie=s,Qe=0,Wr=null,vi=!1,Zl=pu(a,s),xg=!1,Jl=Zr=bg=Ns=xi=jt=0,Ir=Vu=null,jg=!1,(s&8)!==0&&(s|=s&32);var m=a.entangledLanes;if(m!==0)for(a=a.entanglements,m&=s;0<m;){var v=31-Gr(m),j=1<<v;s|=a[v],m&=~j}return Ta=s,Vd(),u}function $N(a,s){Ae=null,z.H=Bu,s===Hl||s===rf?(s=e1(),Qe=3):s===Cy?(s=e1(),Qe=4):Qe=s===ng?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,Wr=s,De===null&&(jt=1,gf(a,dn(s,a.current)))}function zN(){var a=Qr.current;return a===null?!0:(Ie&4194048)===Ie?pn===null:(Ie&62914560)===Ie||(Ie&536870912)!==0?a===pn:!1}function BN(){var a=z.H;return z.H=Bu,a===null?Bu:a}function UN(){var a=z.A;return z.A=cL,a}function Cf(){jt=4,vi||(Ie&4194048)!==Ie&&Qr.current!==null||(Zl=!0),(xi&134217727)===0&&(Ns&134217727)===0||nt===null||wi(nt,Ie,Zr,!1)}function _g(a,s,u){var m=Ge;Ge|=2;var v=BN(),j=UN();(nt!==a||Ie!==s)&&(Ef=null,to(a,s)),s=!1;var _=jt;e:do try{if(Qe!==0&&De!==null){var P=De,$=Wr;switch(Qe){case 8:Og(),_=6;break e;case 3:case 2:case 9:case 6:Qr.current===null&&(s=!0);var Y=Qe;if(Qe=0,Wr=null,ro(a,P,$,Y),u&&Zl){_=0;break e}break;default:Y=Qe,Qe=0,Wr=null,ro(a,P,$,Y)}}hL(),_=jt;break}catch(J){$N(a,J)}while(!0);return s&&a.shellSuspendCounter++,ba=ps=null,Ge=m,z.H=v,z.A=j,De===null&&(nt=null,Ie=0,Vd()),_}function hL(){for(;De!==null;)qN(De)}function mL(a,s){var u=Ge;Ge|=2;var m=BN(),v=UN();nt!==a||Ie!==s?(Ef=null,_f=Me()+500,to(a,s)):Zl=pu(a,s);e:do try{if(Qe!==0&&De!==null){s=De;var j=Wr;t:switch(Qe){case 1:Qe=0,Wr=null,ro(a,s,j,1);break;case 2:case 9:if(ZS(j)){Qe=0,Wr=null,FN(s);break}s=function(){Qe!==2&&Qe!==9||nt!==a||(Qe=7),Qn(a)},j.then(s,s);break e;case 3:Qe=7;break e;case 4:Qe=5;break e;case 7:ZS(j)?(Qe=0,Wr=null,FN(s)):(Qe=0,Wr=null,ro(a,s,j,7));break;case 5:var _=null;switch(De.tag){case 26:_=De.memoizedState;case 5:case 27:var P=De;if(_?AO(_):P.stateNode.complete){Qe=0,Wr=null;var $=P.sibling;if($!==null)De=$;else{var Y=P.return;Y!==null?(De=Y,Tf(Y)):De=null}break t}}Qe=0,Wr=null,ro(a,s,j,5);break;case 6:Qe=0,Wr=null,ro(a,s,j,6);break;case 8:Og(),jt=6;break e;default:throw Error(n(462))}}pL();break}catch(J){$N(a,J)}while(!0);return ba=ps=null,z.H=m,z.A=v,Ge=u,De!==null?0:(nt=null,Ie=0,Vd(),jt)}function pL(){for(;De!==null&&!Up();)qN(De)}function qN(a){var s=fN(a.alternate,a,Ta);a.memoizedProps=a.pendingProps,s===null?Tf(a):De=s}function FN(a){var s=a,u=s.alternate;switch(s.tag){case 15:case 0:s=sN(u,s,s.pendingProps,s.type,void 0,Ie);break;case 11:s=sN(u,s,s.pendingProps,s.type.render,s.ref,Ie);break;case 5:Uy(s);default:mN(u,s),s=De=US(s,Ta),s=fN(u,s,Ta)}a.memoizedProps=a.pendingProps,s===null?Tf(a):De=s}function ro(a,s,u,m){ba=ps=null,Uy(s),Kl=null,Mu=0;var v=s.return;try{if(nL(a,v,s,u,Ie)){jt=1,gf(a,dn(u,a.current)),De=null;return}}catch(j){if(v!==null)throw De=v,j;jt=1,gf(a,dn(u,a.current)),De=null;return}s.flags&32768?($e||m===1?a=!0:Zl||(Ie&536870912)!==0?a=!1:(vi=a=!0,(m===2||m===9||m===3||m===6)&&(m=Qr.current,m!==null&&m.tag===13&&(m.flags|=16384))),HN(s,a)):Tf(s)}function Tf(a){var s=a;do{if((s.flags&32768)!==0){HN(s,vi);return}a=s.return;var u=sL(s.alternate,s,Ta);if(u!==null){De=u;return}if(s=s.sibling,s!==null){De=s;return}De=s=a}while(s!==null);jt===0&&(jt=5)}function HN(a,s){do{var u=lL(a.alternate,a);if(u!==null){u.flags&=32767,De=u;return}if(u=a.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!s&&(a=a.sibling,a!==null)){De=a;return}De=a=u}while(a!==null);jt=6,De=null}function KN(a,s,u,m,v,j,_,P,$){a.cancelPendingCommit=null;do Pf();while(Lt!==0);if((Ge&6)!==0)throw Error(n(327));if(s!==null){if(s===a.current)throw Error(n(177));if(j=s.lanes|s.childLanes,j|=my,V5(a,u,j,_,P,$),a===nt&&(De=nt=null,Ie=0),eo=s,ji=a,Pa=u,wg=j,Sg=v,DN=m,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,xL(Md,function(){return XN(),null})):(a.callbackNode=null,a.callbackPriority=0),m=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||m){m=z.T,z.T=null,v=H.p,H.p=2,_=Ge,Ge|=4;try{oL(a,s,u)}finally{Ge=_,H.p=v,z.T=m}}Lt=1,GN(),YN(),VN()}}function GN(){if(Lt===1){Lt=0;var a=ji,s=eo,u=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||u){u=z.T,z.T=null;var m=H.p;H.p=2;var v=Ge;Ge|=4;try{_N(s,a);var j=$g,_=MS(a.containerInfo),P=j.focusedElem,$=j.selectionRange;if(_!==P&&P&&P.ownerDocument&&PS(P.ownerDocument.documentElement,P)){if($!==null&&uy(P)){var Y=$.start,J=$.end;if(J===void 0&&(J=Y),"selectionStart"in P)P.selectionStart=Y,P.selectionEnd=Math.min(J,P.value.length);else{var re=P.ownerDocument||document,X=re&&re.defaultView||window;if(X.getSelection){var W=X.getSelection(),ye=P.textContent.length,Ne=Math.min($.start,ye),tt=$.end===void 0?Ne:Math.min($.end,ye);!W.extend&&Ne>tt&&(_=tt,tt=Ne,Ne=_);var K=TS(P,Ne),U=TS(P,tt);if(K&&U&&(W.rangeCount!==1||W.anchorNode!==K.node||W.anchorOffset!==K.offset||W.focusNode!==U.node||W.focusOffset!==U.offset)){var G=re.createRange();G.setStart(K.node,K.offset),W.removeAllRanges(),Ne>tt?(W.addRange(G),W.extend(U.node,U.offset)):(G.setEnd(U.node,U.offset),W.addRange(G))}}}}for(re=[],W=P;W=W.parentNode;)W.nodeType===1&&re.push({element:W,left:W.scrollLeft,top:W.scrollTop});for(typeof P.focus=="function"&&P.focus(),P=0;P<re.length;P++){var te=re[P];te.element.scrollLeft=te.left,te.element.scrollTop=te.top}}Ff=!!Lg,$g=Lg=null}finally{Ge=v,H.p=m,z.T=u}}a.current=s,Lt=2}}function YN(){if(Lt===2){Lt=0;var a=ji,s=eo,u=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||u){u=z.T,z.T=null;var m=H.p;H.p=2;var v=Ge;Ge|=4;try{jN(a,s.alternate,s)}finally{Ge=v,H.p=m,z.T=u}}Lt=3}}function VN(){if(Lt===4||Lt===3){Lt=0,Td();var a=ji,s=eo,u=Pa,m=DN;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?Lt=5:(Lt=0,eo=ji=null,QN(a,a.pendingLanes));var v=a.pendingLanes;if(v===0&&(bi=null),Hp(u),s=s.stateNode,Kr&&typeof Kr.onCommitFiberRoot=="function")try{Kr.onCommitFiberRoot(mu,s,void 0,(s.current.flags&128)===128)}catch{}if(m!==null){s=z.T,v=H.p,H.p=2,z.T=null;try{for(var j=a.onRecoverableError,_=0;_<m.length;_++){var P=m[_];j(P.value,{componentStack:P.stack})}}finally{z.T=s,H.p=v}}(Pa&3)!==0&&Pf(),Qn(a),v=a.pendingLanes,(u&261930)!==0&&(v&42)!==0?a===Ng?Qu++:(Qu=0,Ng=a):Qu=0,Xu(0)}}function QN(a,s){(a.pooledCacheLanes&=s)===0&&(s=a.pooledCache,s!=null&&(a.pooledCache=null,Tu(s)))}function Pf(){return GN(),YN(),VN(),XN()}function XN(){if(Lt!==5)return!1;var a=ji,s=wg;wg=0;var u=Hp(Pa),m=z.T,v=H.p;try{H.p=32>u?32:u,z.T=null,u=Sg,Sg=null;var j=ji,_=Pa;if(Lt=0,eo=ji=null,Pa=0,(Ge&6)!==0)throw Error(n(331));var P=Ge;if(Ge|=4,PN(j.current),AN(j,j.current,_,u),Ge=P,Xu(0,!1),Kr&&typeof Kr.onPostCommitFiberRoot=="function")try{Kr.onPostCommitFiberRoot(mu,j)}catch{}return!0}finally{H.p=v,z.T=m,QN(a,s)}}function WN(a,s,u){s=dn(u,s),s=rg(a.stateNode,s,2),a=mi(a,s,2),a!==null&&(yu(a,2),Qn(a))}function Xe(a,s,u){if(a.tag===3)WN(a,a,u);else for(;s!==null;){if(s.tag===3){WN(s,a,u);break}else if(s.tag===1){var m=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(bi===null||!bi.has(m))){a=dn(u,a),u=Z1(2),m=mi(s,u,2),m!==null&&(J1(u,m,s,a),yu(m,2),Qn(m));break}}s=s.return}}function Eg(a,s,u){var m=a.pingCache;if(m===null){m=a.pingCache=new dL;var v=new Set;m.set(s,v)}else v=m.get(s),v===void 0&&(v=new Set,m.set(s,v));v.has(u)||(xg=!0,v.add(u),a=yL.bind(null,a,s,u),s.then(a,a))}function yL(a,s,u){var m=a.pingCache;m!==null&&m.delete(s),a.pingedLanes|=a.suspendedLanes&u,a.warmLanes&=~u,nt===a&&(Ie&u)===u&&(jt===4||jt===3&&(Ie&62914560)===Ie&&300>Me()-Of?(Ge&2)===0&&to(a,0):bg|=u,Jl===Ie&&(Jl=0)),Qn(a)}function ZN(a,s){s===0&&(s=Gw()),a=fs(a,s),a!==null&&(yu(a,s),Qn(a))}function gL(a){var s=a.memoizedState,u=0;s!==null&&(u=s.retryLane),ZN(a,u)}function vL(a,s){var u=0;switch(a.tag){case 31:case 13:var m=a.stateNode,v=a.memoizedState;v!==null&&(u=v.retryLane);break;case 19:m=a.stateNode;break;case 22:m=a.stateNode._retryCache;break;default:throw Error(n(314))}m!==null&&m.delete(s),ZN(a,u)}function xL(a,s){return hu(a,s)}var Mf=null,no=null,Ag=!1,Rf=!1,Cg=!1,Si=0;function Qn(a){a!==no&&a.next===null&&(no===null?Mf=no=a:no=no.next=a),Rf=!0,Ag||(Ag=!0,jL())}function Xu(a,s){if(!Cg&&Rf){Cg=!0;do for(var u=!1,m=Mf;m!==null;){if(a!==0){var v=m.pendingLanes;if(v===0)var j=0;else{var _=m.suspendedLanes,P=m.pingedLanes;j=(1<<31-Gr(42|a)+1)-1,j&=v&~(_&~P),j=j&201326741?j&201326741|1:j?j|2:0}j!==0&&(u=!0,rO(m,j))}else j=Ie,j=Id(m,m===nt?j:0,m.cancelPendingCommit!==null||m.timeoutHandle!==-1),(j&3)===0||pu(m,j)||(u=!0,rO(m,j));m=m.next}while(u);Cg=!1}}function bL(){JN()}function JN(){Rf=Ag=!1;var a=0;Si!==0&&PL()&&(a=Si);for(var s=Me(),u=null,m=Mf;m!==null;){var v=m.next,j=eO(m,s);j===0?(m.next=null,u===null?Mf=v:u.next=v,v===null&&(no=u)):(u=m,(a!==0||(j&3)!==0)&&(Rf=!0)),m=v}Lt!==0&&Lt!==5||Xu(a),Si!==0&&(Si=0)}function eO(a,s){for(var u=a.suspendedLanes,m=a.pingedLanes,v=a.expirationTimes,j=a.pendingLanes&-62914561;0<j;){var _=31-Gr(j),P=1<<_,$=v[_];$===-1?((P&u)===0||(P&m)!==0)&&(v[_]=Y5(P,s)):$<=s&&(a.expiredLanes|=P),j&=~P}if(s=nt,u=Ie,u=Id(a,a===s?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),m=a.callbackNode,u===0||a===s&&(Qe===2||Qe===9)||a.cancelPendingCommit!==null)return m!==null&&m!==null&&Sl(m),a.callbackNode=null,a.callbackPriority=0;if((u&3)===0||pu(a,u)){if(s=u&-u,s===a.callbackPriority)return s;switch(m!==null&&Sl(m),Hp(u)){case 2:case 8:u=Pd;break;case 32:u=Md;break;case 268435456:u=Kw;break;default:u=Md}return m=tO.bind(null,a),u=hu(u,m),a.callbackPriority=s,a.callbackNode=u,s}return m!==null&&m!==null&&Sl(m),a.callbackPriority=2,a.callbackNode=null,2}function tO(a,s){if(Lt!==0&&Lt!==5)return a.callbackNode=null,a.callbackPriority=0,null;var u=a.callbackNode;if(Pf()&&a.callbackNode!==u)return null;var m=Ie;return m=Id(a,a===nt?m:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),m===0?null:(IN(a,m,s),eO(a,Me()),a.callbackNode!=null&&a.callbackNode===u?tO.bind(null,a):null)}function rO(a,s){if(Pf())return null;IN(a,s,!0)}function jL(){RL(function(){(Ge&6)!==0?hu(Kn,bL):JN()})}function Tg(){if(Si===0){var a=ql;a===0&&(a=Rd,Rd<<=1,(Rd&261888)===0&&(Rd=256)),Si=a}return Si}function nO(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:Bd(""+a)}function aO(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 wL(a,s,u,m,v){if(s==="submit"&&u&&u.stateNode===v){var j=nO((v[Pr]||null).action),_=m.submitter;_&&(s=(s=_[Pr]||null)?nO(s.formAction):_.getAttribute("formAction"),s!==null&&(j=s,_=null));var P=new Hd("action","action",null,m,v);a.push({event:P,listeners:[{instance:null,listener:function(){if(m.defaultPrevented){if(Si!==0){var $=_?aO(v,_):new FormData(v);Xy(u,{pending:!0,data:$,method:v.method,action:j},null,$)}}else typeof j=="function"&&(P.preventDefault(),$=_?aO(v,_):new FormData(v),Xy(u,{pending:!0,data:$,method:v.method,action:j},j,$))},currentTarget:v}]})}}for(var Pg=0;Pg<hy.length;Pg++){var Mg=hy[Pg],SL=Mg.toLowerCase(),NL=Mg[0].toUpperCase()+Mg.slice(1);Tn(SL,"on"+NL)}Tn(kS,"onAnimationEnd"),Tn(IS,"onAnimationIteration"),Tn(LS,"onAnimationStart"),Tn("dblclick","onDoubleClick"),Tn("focusin","onFocus"),Tn("focusout","onBlur"),Tn(BI,"onTransitionRun"),Tn(UI,"onTransitionStart"),Tn(qI,"onTransitionCancel"),Tn($S,"onTransitionEnd"),Al("onMouseEnter",["mouseout","mouseover"]),Al("onMouseLeave",["mouseout","mouseover"]),Al("onPointerEnter",["pointerout","pointerover"]),Al("onPointerLeave",["pointerout","pointerover"]),os("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),os("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),os("onBeforeInput",["compositionend","keypress","textInput","paste"]),os("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),os("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),os("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Wu="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(" "),OL=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Wu));function iO(a,s){s=(s&4)!==0;for(var u=0;u<a.length;u++){var m=a[u],v=m.event;m=m.listeners;e:{var j=void 0;if(s)for(var _=m.length-1;0<=_;_--){var P=m[_],$=P.instance,Y=P.currentTarget;if(P=P.listener,$!==j&&v.isPropagationStopped())break e;j=P,v.currentTarget=Y;try{j(v)}catch(J){Yd(J)}v.currentTarget=null,j=$}else for(_=0;_<m.length;_++){if(P=m[_],$=P.instance,Y=P.currentTarget,P=P.listener,$!==j&&v.isPropagationStopped())break e;j=P,v.currentTarget=Y;try{j(v)}catch(J){Yd(J)}v.currentTarget=null,j=$}}}}function ke(a,s){var u=s[Kp];u===void 0&&(u=s[Kp]=new Set);var m=a+"__bubble";u.has(m)||(sO(s,a,2,!1),u.add(m))}function Rg(a,s,u){var m=0;s&&(m|=4),sO(u,a,m,s)}var Df="_reactListening"+Math.random().toString(36).slice(2);function Dg(a){if(!a[Df]){a[Df]=!0,Jw.forEach(function(u){u!=="selectionchange"&&(OL.has(u)||Rg(u,!1,a),Rg(u,!0,a))});var s=a.nodeType===9?a:a.ownerDocument;s===null||s[Df]||(s[Df]=!0,Rg("selectionchange",!1,s))}}function sO(a,s,u,m){switch(kO(s)){case 2:var v=JL;break;case 8:v=e$;break;default:v=Qg}u=v.bind(null,s,u,a),v=void 0,!ey||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(v=!0),m?v!==void 0?a.addEventListener(s,u,{capture:!0,passive:v}):a.addEventListener(s,u,!0):v!==void 0?a.addEventListener(s,u,{passive:v}):a.addEventListener(s,u,!1)}function kg(a,s,u,m,v){var j=m;if((s&1)===0&&(s&2)===0&&m!==null)e:for(;;){if(m===null)return;var _=m.tag;if(_===3||_===4){var P=m.stateNode.containerInfo;if(P===v)break;if(_===4)for(_=m.return;_!==null;){var $=_.tag;if(($===3||$===4)&&_.stateNode.containerInfo===v)return;_=_.return}for(;P!==null;){if(_=Ol(P),_===null)return;if($=_.tag,$===5||$===6||$===26||$===27){m=j=_;continue e}P=P.parentNode}}m=m.return}dS(function(){var Y=j,J=Zp(u),re=[];e:{var X=zS.get(a);if(X!==void 0){var W=Hd,ye=a;switch(a){case"keypress":if(qd(u)===0)break e;case"keydown":case"keyup":W=vI;break;case"focusin":ye="focus",W=ay;break;case"focusout":ye="blur",W=ay;break;case"beforeblur":case"afterblur":W=ay;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":W=mS;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":W=sI;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":W=jI;break;case kS:case IS:case LS:W=uI;break;case $S:W=SI;break;case"scroll":case"scrollend":W=aI;break;case"wheel":W=OI;break;case"copy":case"cut":case"paste":W=dI;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":W=yS;break;case"toggle":case"beforetoggle":W=EI}var Ne=(s&4)!==0,tt=!Ne&&(a==="scroll"||a==="scrollend"),K=Ne?X!==null?X+"Capture":null:X;Ne=[];for(var U=Y,G;U!==null;){var te=U;if(G=te.stateNode,te=te.tag,te!==5&&te!==26&&te!==27||G===null||K===null||(te=xu(U,K),te!=null&&Ne.push(Zu(U,te,G))),tt)break;U=U.return}0<Ne.length&&(X=new W(X,ye,null,u,J),re.push({event:X,listeners:Ne}))}}if((s&7)===0){e:{if(X=a==="mouseover"||a==="pointerover",W=a==="mouseout"||a==="pointerout",X&&u!==Wp&&(ye=u.relatedTarget||u.fromElement)&&(Ol(ye)||ye[Nl]))break e;if((W||X)&&(X=J.window===J?J:(X=J.ownerDocument)?X.defaultView||X.parentWindow:window,W?(ye=u.relatedTarget||u.toElement,W=Y,ye=ye?Ol(ye):null,ye!==null&&(tt=l(ye),Ne=ye.tag,ye!==tt||Ne!==5&&Ne!==27&&Ne!==6)&&(ye=null)):(W=null,ye=Y),W!==ye)){if(Ne=mS,te="onMouseLeave",K="onMouseEnter",U="mouse",(a==="pointerout"||a==="pointerover")&&(Ne=yS,te="onPointerLeave",K="onPointerEnter",U="pointer"),tt=W==null?X:vu(W),G=ye==null?X:vu(ye),X=new Ne(te,U+"leave",W,u,J),X.target=tt,X.relatedTarget=G,te=null,Ol(J)===Y&&(Ne=new Ne(K,U+"enter",ye,u,J),Ne.target=G,Ne.relatedTarget=tt,te=Ne),tt=te,W&&ye)t:{for(Ne=_L,K=W,U=ye,G=0,te=K;te;te=Ne(te))G++;te=0;for(var we=U;we;we=Ne(we))te++;for(;0<G-te;)K=Ne(K),G--;for(;0<te-G;)U=Ne(U),te--;for(;G--;){if(K===U||U!==null&&K===U.alternate){Ne=K;break t}K=Ne(K),U=Ne(U)}Ne=null}else Ne=null;W!==null&&lO(re,X,W,Ne,!1),ye!==null&&tt!==null&&lO(re,tt,ye,Ne,!0)}}e:{if(X=Y?vu(Y):window,W=X.nodeName&&X.nodeName.toLowerCase(),W==="select"||W==="input"&&X.type==="file")var qe=NS;else if(wS(X))if(OS)qe=LI;else{qe=kI;var ve=DI}else W=X.nodeName,!W||W.toLowerCase()!=="input"||X.type!=="checkbox"&&X.type!=="radio"?Y&&Xp(Y.elementType)&&(qe=NS):qe=II;if(qe&&(qe=qe(a,Y))){SS(re,qe,u,J);break e}ve&&ve(a,X,Y),a==="focusout"&&Y&&X.type==="number"&&Y.memoizedProps.value!=null&&Qp(X,"number",X.value)}switch(ve=Y?vu(Y):window,a){case"focusin":(wS(ve)||ve.contentEditable==="true")&&(Dl=ve,cy=Y,Eu=null);break;case"focusout":Eu=cy=Dl=null;break;case"mousedown":dy=!0;break;case"contextmenu":case"mouseup":case"dragend":dy=!1,RS(re,u,J);break;case"selectionchange":if(zI)break;case"keydown":case"keyup":RS(re,u,J)}var Ce;if(sy)e:{switch(a){case"compositionstart":var Le="onCompositionStart";break e;case"compositionend":Le="onCompositionEnd";break e;case"compositionupdate":Le="onCompositionUpdate";break e}Le=void 0}else Rl?bS(a,u)&&(Le="onCompositionEnd"):a==="keydown"&&u.keyCode===229&&(Le="onCompositionStart");Le&&(gS&&u.locale!=="ko"&&(Rl||Le!=="onCompositionStart"?Le==="onCompositionEnd"&&Rl&&(Ce=fS()):(li=J,ty="value"in li?li.value:li.textContent,Rl=!0)),ve=kf(Y,Le),0<ve.length&&(Le=new pS(Le,a,null,u,J),re.push({event:Le,listeners:ve}),Ce?Le.data=Ce:(Ce=jS(u),Ce!==null&&(Le.data=Ce)))),(Ce=CI?TI(a,u):PI(a,u))&&(Le=kf(Y,"onBeforeInput"),0<Le.length&&(ve=new pS("onBeforeInput","beforeinput",null,u,J),re.push({event:ve,listeners:Le}),ve.data=Ce)),wL(re,a,Y,u,J)}iO(re,s)})}function Zu(a,s,u){return{instance:a,listener:s,currentTarget:u}}function kf(a,s){for(var u=s+"Capture",m=[];a!==null;){var v=a,j=v.stateNode;if(v=v.tag,v!==5&&v!==26&&v!==27||j===null||(v=xu(a,u),v!=null&&m.unshift(Zu(a,v,j)),v=xu(a,s),v!=null&&m.push(Zu(a,v,j))),a.tag===3)return m;a=a.return}return[]}function _L(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function lO(a,s,u,m,v){for(var j=s._reactName,_=[];u!==null&&u!==m;){var P=u,$=P.alternate,Y=P.stateNode;if(P=P.tag,$!==null&&$===m)break;P!==5&&P!==26&&P!==27||Y===null||($=Y,v?(Y=xu(u,j),Y!=null&&_.unshift(Zu(u,Y,$))):v||(Y=xu(u,j),Y!=null&&_.push(Zu(u,Y,$)))),u=u.return}_.length!==0&&a.push({event:s,listeners:_})}var EL=/\r\n?/g,AL=/\u0000|\uFFFD/g;function oO(a){return(typeof a=="string"?a:""+a).replace(EL,`
49
- `).replace(AL,"")}function uO(a,s){return s=oO(s),oO(a)===s}function et(a,s,u,m,v,j){switch(u){case"children":typeof m=="string"?s==="body"||s==="textarea"&&m===""||Tl(a,m):(typeof m=="number"||typeof m=="bigint")&&s!=="body"&&Tl(a,""+m);break;case"className":$d(a,"class",m);break;case"tabIndex":$d(a,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":$d(a,u,m);break;case"style":uS(a,m,j);break;case"data":if(s!=="object"){$d(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=Bd(""+m),a.setAttribute(u,m);break;case"action":case"formAction":if(typeof m=="function"){a.setAttribute(u,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof j=="function"&&(u==="formAction"?(s!=="input"&&et(a,s,"name",v.name,v,null),et(a,s,"formEncType",v.formEncType,v,null),et(a,s,"formMethod",v.formMethod,v,null),et(a,s,"formTarget",v.formTarget,v,null)):(et(a,s,"encType",v.encType,v,null),et(a,s,"method",v.method,v,null),et(a,s,"target",v.target,v,null)));if(m==null||typeof m=="symbol"||typeof m=="boolean"){a.removeAttribute(u);break}m=Bd(""+m),a.setAttribute(u,m);break;case"onClick":m!=null&&(a.onclick=ya);break;case"onScroll":m!=null&&ke("scroll",a);break;case"onScrollEnd":m!=null&&ke("scrollend",a);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(n(61));if(u=m.__html,u!=null){if(v.children!=null)throw Error(n(60));a.innerHTML=u}}break;case"multiple":a.multiple=m&&typeof m!="function"&&typeof m!="symbol";break;case"muted":a.muted=m&&typeof m!="function"&&typeof m!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(m==null||typeof m=="function"||typeof m=="boolean"||typeof m=="symbol"){a.removeAttribute("xlink:href");break}u=Bd(""+m),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":m!=null&&typeof m!="function"&&typeof m!="symbol"?a.setAttribute(u,""+m):a.removeAttribute(u);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":m&&typeof m!="function"&&typeof m!="symbol"?a.setAttribute(u,""):a.removeAttribute(u);break;case"capture":case"download":m===!0?a.setAttribute(u,""):m!==!1&&m!=null&&typeof m!="function"&&typeof m!="symbol"?a.setAttribute(u,m):a.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":m!=null&&typeof m!="function"&&typeof m!="symbol"&&!isNaN(m)&&1<=m?a.setAttribute(u,m):a.removeAttribute(u);break;case"rowSpan":case"start":m==null||typeof m=="function"||typeof m=="symbol"||isNaN(m)?a.removeAttribute(u):a.setAttribute(u,m);break;case"popover":ke("beforetoggle",a),ke("toggle",a),Ld(a,"popover",m);break;case"xlinkActuate":pa(a,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":pa(a,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":pa(a,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":pa(a,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":pa(a,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":pa(a,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":pa(a,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":pa(a,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":pa(a,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":Ld(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=rI.get(u)||u,Ld(a,u,m))}}function Ig(a,s,u,m,v,j){switch(u){case"style":uS(a,m,j);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(n(61));if(u=m.__html,u!=null){if(v.children!=null)throw Error(n(60));a.innerHTML=u}}break;case"children":typeof m=="string"?Tl(a,m):(typeof m=="number"||typeof m=="bigint")&&Tl(a,""+m);break;case"onScroll":m!=null&&ke("scroll",a);break;case"onScrollEnd":m!=null&&ke("scrollend",a);break;case"onClick":m!=null&&(a.onclick=ya);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!eS.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(v=u.endsWith("Capture"),s=u.slice(2,v?u.length-7:void 0),j=a[Pr]||null,j=j!=null?j[u]:null,typeof j=="function"&&a.removeEventListener(s,j,v),typeof m=="function")){typeof j!="function"&&j!==null&&(u in a?a[u]=null:a.hasAttribute(u)&&a.removeAttribute(u)),a.addEventListener(s,m,v);break e}u in a?a[u]=m:m===!0?a.setAttribute(u,""):Ld(a,u,m)}}}function ir(a,s,u){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ke("error",a),ke("load",a);var m=!1,v=!1,j;for(j in u)if(u.hasOwnProperty(j)){var _=u[j];if(_!=null)switch(j){case"src":m=!0;break;case"srcSet":v=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(n(137,s));default:et(a,s,j,_,u,null)}}v&&et(a,s,"srcSet",u.srcSet,u,null),m&&et(a,s,"src",u.src,u,null);return;case"input":ke("invalid",a);var P=j=_=v=null,$=null,Y=null;for(m in u)if(u.hasOwnProperty(m)){var J=u[m];if(J!=null)switch(m){case"name":v=J;break;case"type":_=J;break;case"checked":$=J;break;case"defaultChecked":Y=J;break;case"value":j=J;break;case"defaultValue":P=J;break;case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(n(137,s));break;default:et(a,s,m,J,u,null)}}iS(a,j,P,$,Y,_,v,!1);return;case"select":ke("invalid",a),m=_=j=null;for(v in u)if(u.hasOwnProperty(v)&&(P=u[v],P!=null))switch(v){case"value":j=P;break;case"defaultValue":_=P;break;case"multiple":m=P;default:et(a,s,v,P,u,null)}s=j,u=_,a.multiple=!!m,s!=null?Cl(a,!!m,s,!1):u!=null&&Cl(a,!!m,u,!0);return;case"textarea":ke("invalid",a),j=v=m=null;for(_ in u)if(u.hasOwnProperty(_)&&(P=u[_],P!=null))switch(_){case"value":m=P;break;case"defaultValue":v=P;break;case"children":j=P;break;case"dangerouslySetInnerHTML":if(P!=null)throw Error(n(91));break;default:et(a,s,_,P,u,null)}lS(a,m,v,j);return;case"option":for($ in u)if(u.hasOwnProperty($)&&(m=u[$],m!=null))switch($){case"selected":a.selected=m&&typeof m!="function"&&typeof m!="symbol";break;default:et(a,s,$,m,u,null)}return;case"dialog":ke("beforetoggle",a),ke("toggle",a),ke("cancel",a),ke("close",a);break;case"iframe":case"object":ke("load",a);break;case"video":case"audio":for(m=0;m<Wu.length;m++)ke(Wu[m],a);break;case"image":ke("error",a),ke("load",a);break;case"details":ke("toggle",a);break;case"embed":case"source":case"link":ke("error",a),ke("load",a);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Y in u)if(u.hasOwnProperty(Y)&&(m=u[Y],m!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":throw Error(n(137,s));default:et(a,s,Y,m,u,null)}return;default:if(Xp(s)){for(J in u)u.hasOwnProperty(J)&&(m=u[J],m!==void 0&&Ig(a,s,J,m,u,void 0));return}}for(P in u)u.hasOwnProperty(P)&&(m=u[P],m!=null&&et(a,s,P,m,u,null))}function 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 v=null,j=null,_=null,P=null,$=null,Y=null,J=null;for(W in u){var re=u[W];if(u.hasOwnProperty(W)&&re!=null)switch(W){case"checked":break;case"value":break;case"defaultValue":$=re;default:m.hasOwnProperty(W)||et(a,s,W,null,m,re)}}for(var X in m){var W=m[X];if(re=u[X],m.hasOwnProperty(X)&&(W!=null||re!=null))switch(X){case"type":j=W;break;case"name":v=W;break;case"checked":Y=W;break;case"defaultChecked":J=W;break;case"value":_=W;break;case"defaultValue":P=W;break;case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(n(137,s));break;default:W!==re&&et(a,s,X,W,m,re)}}Vp(a,_,P,$,Y,J,j,v);return;case"select":W=_=P=X=null;for(j in u)if($=u[j],u.hasOwnProperty(j)&&$!=null)switch(j){case"value":break;case"multiple":W=$;default:m.hasOwnProperty(j)||et(a,s,j,null,m,$)}for(v in m)if(j=m[v],$=u[v],m.hasOwnProperty(v)&&(j!=null||$!=null))switch(v){case"value":X=j;break;case"defaultValue":P=j;break;case"multiple":_=j;default:j!==$&&et(a,s,v,j,m,$)}s=P,u=_,m=W,X!=null?Cl(a,!!u,X,!1):!!m!=!!u&&(s!=null?Cl(a,!!u,s,!0):Cl(a,!!u,u?[]:"",!1));return;case"textarea":W=X=null;for(P in u)if(v=u[P],u.hasOwnProperty(P)&&v!=null&&!m.hasOwnProperty(P))switch(P){case"value":break;case"children":break;default:et(a,s,P,null,m,v)}for(_ in m)if(v=m[_],j=u[_],m.hasOwnProperty(_)&&(v!=null||j!=null))switch(_){case"value":X=v;break;case"defaultValue":W=v;break;case"children":break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(n(91));break;default:v!==j&&et(a,s,_,v,m,j)}sS(a,X,W);return;case"option":for(var ye in u)if(X=u[ye],u.hasOwnProperty(ye)&&X!=null&&!m.hasOwnProperty(ye))switch(ye){case"selected":a.selected=!1;break;default:et(a,s,ye,null,m,X)}for($ in m)if(X=m[$],W=u[$],m.hasOwnProperty($)&&X!==W&&(X!=null||W!=null))switch($){case"selected":a.selected=X&&typeof X!="function"&&typeof X!="symbol";break;default:et(a,s,$,X,m,W)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ne in u)X=u[Ne],u.hasOwnProperty(Ne)&&X!=null&&!m.hasOwnProperty(Ne)&&et(a,s,Ne,null,m,X);for(Y in m)if(X=m[Y],W=u[Y],m.hasOwnProperty(Y)&&X!==W&&(X!=null||W!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(n(137,s));break;default:et(a,s,Y,X,m,W)}return;default:if(Xp(s)){for(var tt in u)X=u[tt],u.hasOwnProperty(tt)&&X!==void 0&&!m.hasOwnProperty(tt)&&Ig(a,s,tt,void 0,m,X);for(J in m)X=m[J],W=u[J],!m.hasOwnProperty(J)||X===W||X===void 0&&W===void 0||Ig(a,s,J,X,m,W);return}}for(var K in u)X=u[K],u.hasOwnProperty(K)&&X!=null&&!m.hasOwnProperty(K)&&et(a,s,K,null,m,X);for(re in m)X=m[re],W=u[re],!m.hasOwnProperty(re)||X===W||X==null&&W==null||et(a,s,re,X,m,W)}function cO(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function TL(){if(typeof performance.getEntriesByType=="function"){for(var a=0,s=0,u=performance.getEntriesByType("resource"),m=0;m<u.length;m++){var v=u[m],j=v.transferSize,_=v.initiatorType,P=v.duration;if(j&&P&&cO(_)){for(_=0,P=v.responseEnd,m+=1;m<u.length;m++){var $=u[m],Y=$.startTime;if(Y>P)break;var J=$.transferSize,re=$.initiatorType;J&&cO(re)&&($=$.responseEnd,_+=J*($<P?1:(P-Y)/($-Y)))}if(--m,s+=8*(j+_)/(v.duration/1e3),a++,10<a)break}}if(0<a)return s/a/1e6}return navigator.connection&&(a=navigator.connection.downlink,typeof a=="number")?a:5}var Lg=null,$g=null;function If(a){return a.nodeType===9?a:a.ownerDocument}function dO(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 fO(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 zg(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 Bg=null;function PL(){var a=window.event;return a&&a.type==="popstate"?a===Bg?!1:(Bg=a,!0):(Bg=null,!1)}var hO=typeof setTimeout=="function"?setTimeout:void 0,ML=typeof clearTimeout=="function"?clearTimeout:void 0,mO=typeof Promise=="function"?Promise:void 0,RL=typeof queueMicrotask=="function"?queueMicrotask:typeof mO<"u"?function(a){return mO.resolve(null).then(a).catch(DL)}:hO;function DL(a){setTimeout(function(){throw a})}function Ni(a){return a==="head"}function pO(a,s){var u=s,m=0;do{var v=u.nextSibling;if(a.removeChild(u),v&&v.nodeType===8)if(u=v.data,u==="/$"||u==="/&"){if(m===0){a.removeChild(v),lo(s);return}m--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")m++;else if(u==="html")Ju(a.ownerDocument.documentElement);else if(u==="head"){u=a.ownerDocument.head,Ju(u);for(var j=u.firstChild;j;){var _=j.nextSibling,P=j.nodeName;j[gu]||P==="SCRIPT"||P==="STYLE"||P==="LINK"&&j.rel.toLowerCase()==="stylesheet"||u.removeChild(j),j=_}}else u==="body"&&Ju(a.ownerDocument.body);u=v}while(u);lo(s)}function yO(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 Ug(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":Ug(u),Gp(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}a.removeChild(u)}}function kL(a,s,u,m){for(;a.nodeType===1;){var v=u;if(a.nodeName.toLowerCase()!==s.toLowerCase()){if(!m&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(m){if(!a[gu])switch(s){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(j=a.getAttribute("rel"),j==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(j!==v.rel||a.getAttribute("href")!==(v.href==null||v.href===""?null:v.href)||a.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin)||a.getAttribute("title")!==(v.title==null?null:v.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(j=a.getAttribute("src"),(j!==(v.src==null?null:v.src)||a.getAttribute("type")!==(v.type==null?null:v.type)||a.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin))&&j&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(s==="input"&&a.type==="hidden"){var j=v.name==null?null:""+v.name;if(v.type==="hidden"&&a.getAttribute("name")===j)return a}else return a;if(a=yn(a.nextSibling),a===null)break}return null}function IL(a,s,u){if(s==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!u||(a=yn(a.nextSibling),a===null))return null;return a}function gO(a,s){for(;a.nodeType!==8;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!s||(a=yn(a.nextSibling),a===null))return null;return a}function qg(a){return a.data==="$?"||a.data==="$~"}function Fg(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function LL(a,s){var u=a.ownerDocument;if(a.data==="$~")a._reactRetry=s;else if(a.data!=="$?"||u.readyState!=="loading")s();else{var m=function(){s(),u.removeEventListener("DOMContentLoaded",m)};u.addEventListener("DOMContentLoaded",m),a._reactRetry=m}}function yn(a){for(;a!=null;a=a.nextSibling){var s=a.nodeType;if(s===1||s===3)break;if(s===8){if(s=a.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return a}var Hg=null;function vO(a){a=a.nextSibling;for(var s=0;a;){if(a.nodeType===8){var u=a.data;if(u==="/$"||u==="/&"){if(s===0)return yn(a.nextSibling);s--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||s++}a=a.nextSibling}return null}function xO(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 bO(a,s,u){switch(s=If(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 Ju(a){for(var s=a.attributes;s.length;)a.removeAttributeNode(s[0]);Gp(a)}var gn=new Map,jO=new Set;function Lf(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var Ma=H.d;H.d={f:$L,r:zL,D:BL,C:UL,L:qL,m:FL,X:KL,S:HL,M:GL};function $L(){var a=Ma.f(),s=Af();return a||s}function zL(a){var s=_l(a);s!==null&&s.tag===5&&s.type==="form"?$1(s):Ma.r(a)}var ao=typeof document>"u"?null:document;function wO(a,s,u){var m=ao;if(m&&typeof s=="string"&&s){var v=un(s);v='link[rel="'+a+'"][href="'+v+'"]',typeof u=="string"&&(v+='[crossorigin="'+u+'"]'),jO.has(v)||(jO.add(v),a={rel:a,crossOrigin:u,href:s},m.querySelector(v)===null&&(s=m.createElement("link"),ir(s,"link",a),Kt(s),m.head.appendChild(s)))}}function BL(a){Ma.D(a),wO("dns-prefetch",a,null)}function UL(a,s){Ma.C(a,s),wO("preconnect",a,s)}function qL(a,s,u){Ma.L(a,s,u);var m=ao;if(m&&a&&s){var v='link[rel="preload"][as="'+un(s)+'"]';s==="image"&&u&&u.imageSrcSet?(v+='[imagesrcset="'+un(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(v+='[imagesizes="'+un(u.imageSizes)+'"]')):v+='[href="'+un(a)+'"]';var j=v;switch(s){case"style":j=io(a);break;case"script":j=so(a)}gn.has(j)||(a=y({rel:"preload",href:s==="image"&&u&&u.imageSrcSet?void 0:a,as:s},u),gn.set(j,a),m.querySelector(v)!==null||s==="style"&&m.querySelector(ec(j))||s==="script"&&m.querySelector(tc(j))||(s=m.createElement("link"),ir(s,"link",a),Kt(s),m.head.appendChild(s)))}}function FL(a,s){Ma.m(a,s);var u=ao;if(u&&a){var m=s&&typeof s.as=="string"?s.as:"script",v='link[rel="modulepreload"][as="'+un(m)+'"][href="'+un(a)+'"]',j=v;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":j=so(a)}if(!gn.has(j)&&(a=y({rel:"modulepreload",href:a},s),gn.set(j,a),u.querySelector(v)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(tc(j)))return}m=u.createElement("link"),ir(m,"link",a),Kt(m),u.head.appendChild(m)}}}function HL(a,s,u){Ma.S(a,s,u);var m=ao;if(m&&a){var v=El(m).hoistableStyles,j=io(a);s=s||"default";var _=v.get(j);if(!_){var P={loading:0,preload:null};if(_=m.querySelector(ec(j)))P.loading=5;else{a=y({rel:"stylesheet",href:a,"data-precedence":s},u),(u=gn.get(j))&&Kg(a,u);var $=_=m.createElement("link");Kt($),ir($,"link",a),$._p=new Promise(function(Y,J){$.onload=Y,$.onerror=J}),$.addEventListener("load",function(){P.loading|=1}),$.addEventListener("error",function(){P.loading|=2}),P.loading|=4,$f(_,s,m)}_={type:"stylesheet",instance:_,count:1,state:P},v.set(j,_)}}}function KL(a,s){Ma.X(a,s);var u=ao;if(u&&a){var m=El(u).hoistableScripts,v=so(a),j=m.get(v);j||(j=u.querySelector(tc(v)),j||(a=y({src:a,async:!0},s),(s=gn.get(v))&&Gg(a,s),j=u.createElement("script"),Kt(j),ir(j,"link",a),u.head.appendChild(j)),j={type:"script",instance:j,count:1,state:null},m.set(v,j))}}function GL(a,s){Ma.M(a,s);var u=ao;if(u&&a){var m=El(u).hoistableScripts,v=so(a),j=m.get(v);j||(j=u.querySelector(tc(v)),j||(a=y({src:a,async:!0,type:"module"},s),(s=gn.get(v))&&Gg(a,s),j=u.createElement("script"),Kt(j),ir(j,"link",a),u.head.appendChild(j)),j={type:"script",instance:j,count:1,state:null},m.set(v,j))}}function SO(a,s,u,m){var v=(v=xe.current)?Lf(v):null;if(!v)throw Error(n(446));switch(a){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(s=io(u.href),u=El(v).hoistableStyles,m=u.get(s),m||(m={type:"style",instance:null,count:0,state:null},u.set(s,m)),m):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){a=io(u.href);var j=El(v).hoistableStyles,_=j.get(a);if(_||(v=v.ownerDocument||v,_={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},j.set(a,_),(j=v.querySelector(ec(a)))&&!j._p&&(_.instance=j,_.state.loading=5),gn.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},gn.set(a,u),j||YL(v,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=so(u),u=El(v).hoistableScripts,m=u.get(s),m||(m={type:"script",instance:null,count:0,state:null},u.set(s,m)),m):{type:"void",instance:null,count:0,state:null};default:throw Error(n(444,a))}}function io(a){return'href="'+un(a)+'"'}function ec(a){return'link[rel="stylesheet"]['+a+"]"}function NO(a){return y({},a,{"data-precedence":a.precedence,precedence:null})}function YL(a,s,u,m){a.querySelector('link[rel="preload"][as="style"]['+s+"]")?m.loading=1:(s=a.createElement("link"),m.preload=s,s.addEventListener("load",function(){return m.loading|=1}),s.addEventListener("error",function(){return m.loading|=2}),ir(s,"link",u),Kt(s),a.head.appendChild(s))}function so(a){return'[src="'+un(a)+'"]'}function tc(a){return"script[async]"+a}function OO(a,s,u){if(s.count++,s.instance===null)switch(s.type){case"style":var m=a.querySelector('style[data-href~="'+un(u.href)+'"]');if(m)return s.instance=m,Kt(m),m;var v=y({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return m=(a.ownerDocument||a).createElement("style"),Kt(m),ir(m,"style",v),$f(m,u.precedence,a),s.instance=m;case"stylesheet":v=io(u.href);var j=a.querySelector(ec(v));if(j)return s.state.loading|=4,s.instance=j,Kt(j),j;m=NO(u),(v=gn.get(v))&&Kg(m,v),j=(a.ownerDocument||a).createElement("link"),Kt(j);var _=j;return _._p=new Promise(function(P,$){_.onload=P,_.onerror=$}),ir(j,"link",m),s.state.loading|=4,$f(j,u.precedence,a),s.instance=j;case"script":return j=so(u.src),(v=a.querySelector(tc(j)))?(s.instance=v,Kt(v),v):(m=u,(v=gn.get(j))&&(m=y({},u),Gg(m,v)),a=a.ownerDocument||a,v=a.createElement("script"),Kt(v),ir(v,"link",m),a.head.appendChild(v),s.instance=v);case"void":return null;default:throw Error(n(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(m=s.instance,s.state.loading|=4,$f(m,u.precedence,a));return s.instance}function $f(a,s,u){for(var m=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),v=m.length?m[m.length-1]:null,j=v,_=0;_<m.length;_++){var P=m[_];if(P.dataset.precedence===s)j=P;else if(j!==v)break}j?j.parentNode.insertBefore(a,j.nextSibling):(s=u.nodeType===9?u.head:u,s.insertBefore(a,s.firstChild))}function Kg(a,s){a.crossOrigin==null&&(a.crossOrigin=s.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=s.referrerPolicy),a.title==null&&(a.title=s.title)}function Gg(a,s){a.crossOrigin==null&&(a.crossOrigin=s.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=s.referrerPolicy),a.integrity==null&&(a.integrity=s.integrity)}var zf=null;function _O(a,s,u){if(zf===null){var m=new Map,v=zf=new Map;v.set(u,m)}else v=zf,m=v.get(u),m||(m=new Map,v.set(u,m));if(m.has(a))return m;for(m.set(a,null),u=u.getElementsByTagName(a),v=0;v<u.length;v++){var j=u[v];if(!(j[gu]||j[tr]||a==="link"&&j.getAttribute("rel")==="stylesheet")&&j.namespaceURI!=="http://www.w3.org/2000/svg"){var _=j.getAttribute(s)||"";_=a+_;var P=m.get(_);P?P.push(j):m.set(_,[j])}}return m}function EO(a,s,u){a=a.ownerDocument||a,a.head.insertBefore(u,s==="title"?a.querySelector("head > title"):null)}function VL(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 AO(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function QL(a,s,u,m){if(u.type==="stylesheet"&&(typeof m.media!="string"||matchMedia(m.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var v=io(m.href),j=s.querySelector(ec(v));if(j){s=j._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(a.count++,a=Bf.bind(a),s.then(a,a)),u.state.loading|=4,u.instance=j,Kt(j);return}j=s.ownerDocument||s,m=NO(m),(v=gn.get(v))&&Kg(m,v),j=j.createElement("link"),Kt(j);var _=j;_._p=new Promise(function(P,$){_.onload=P,_.onerror=$}),ir(j,"link",m),u.instance=j}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(u,s),(s=u.state.preload)&&(u.state.loading&3)===0&&(a.count++,u=Bf.bind(a),s.addEventListener("load",u),s.addEventListener("error",u))}}var Yg=0;function XL(a,s){return a.stylesheets&&a.count===0&&qf(a,a.stylesheets),0<a.count||0<a.imgCount?function(u){var m=setTimeout(function(){if(a.stylesheets&&qf(a,a.stylesheets),a.unsuspend){var j=a.unsuspend;a.unsuspend=null,j()}},6e4+s);0<a.imgBytes&&Yg===0&&(Yg=62500*TL());var v=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&qf(a,a.stylesheets),a.unsuspend)){var j=a.unsuspend;a.unsuspend=null,j()}},(a.imgBytes>Yg?50:800)+s);return a.unsuspend=u,function(){a.unsuspend=null,clearTimeout(m),clearTimeout(v)}}:null}function Bf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)qf(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var Uf=null;function qf(a,s){a.stylesheets=null,a.unsuspend!==null&&(a.count++,Uf=new Map,s.forEach(WL,a),Uf=null,Bf.call(a))}function WL(a,s){if(!(s.state.loading&4)){var u=Uf.get(a);if(u)var m=u.get(null);else{u=new Map,Uf.set(a,u);for(var v=a.querySelectorAll("link[data-precedence],style[data-precedence]"),j=0;j<v.length;j++){var _=v[j];(_.nodeName==="LINK"||_.getAttribute("media")!=="not all")&&(u.set(_.dataset.precedence,_),m=_)}m&&u.set(null,m)}v=s.instance,_=v.getAttribute("data-precedence"),j=u.get(_)||m,j===m&&u.set(null,v),u.set(_,v),this.count++,m=Bf.bind(this),v.addEventListener("load",m),v.addEventListener("error",m),j?j.parentNode.insertBefore(v,j.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(v,a.firstChild)),s.state.loading|=4}}var rc={$$typeof:T,Provider:null,Consumer:null,_currentValue:Z,_currentValue2:Z,_threadCount:0};function ZL(a,s,u,m,v,j,_,P,$){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=qp(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qp(0),this.hiddenUpdates=qp(null),this.identifierPrefix=m,this.onUncaughtError=v,this.onCaughtError=j,this.onRecoverableError=_,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=$,this.incompleteTransitions=new Map}function CO(a,s,u,m,v,j,_,P,$,Y,J,re){return a=new ZL(a,s,u,_,$,Y,J,re,P),s=1,j===!0&&(s|=24),j=Vr(3,null,null,s),a.current=j,j.stateNode=a,s=_y(),s.refCount++,a.pooledCache=s,s.refCount++,j.memoizedState={element:m,isDehydrated:u,cache:s},Ty(j),a}function TO(a){return a?(a=Ll,a):Ll}function PO(a,s,u,m,v,j){v=TO(v),m.context===null?m.context=v:m.pendingContext=v,m=hi(s),m.payload={element:u},j=j===void 0?null:j,j!==null&&(m.callback=j),u=mi(a,m,s),u!==null&&(Lr(u,a,s),Du(u,a,s))}function MO(a,s){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var u=a.retryLane;a.retryLane=u!==0&&u<s?u:s}}function Vg(a,s){MO(a,s),(a=a.alternate)&&MO(a,s)}function RO(a){if(a.tag===13||a.tag===31){var s=fs(a,67108864);s!==null&&Lr(s,a,67108864),Vg(a,67108864)}}function DO(a){if(a.tag===13||a.tag===31){var s=Jr();s=Fp(s);var u=fs(a,s);u!==null&&Lr(u,a,s),Vg(a,s)}}var Ff=!0;function JL(a,s,u,m){var v=z.T;z.T=null;var j=H.p;try{H.p=2,Qg(a,s,u,m)}finally{H.p=j,z.T=v}}function e$(a,s,u,m){var v=z.T;z.T=null;var j=H.p;try{H.p=8,Qg(a,s,u,m)}finally{H.p=j,z.T=v}}function Qg(a,s,u,m){if(Ff){var v=Xg(m);if(v===null)kg(a,s,m,Hf,u),IO(a,m);else if(r$(v,a,s,u,m))m.stopPropagation();else if(IO(a,m),s&4&&-1<t$.indexOf(a)){for(;v!==null;){var j=_l(v);if(j!==null)switch(j.tag){case 3:if(j=j.stateNode,j.current.memoizedState.isDehydrated){var _=ls(j.pendingLanes);if(_!==0){var P=j;for(P.pendingLanes|=2,P.entangledLanes|=2;_;){var $=1<<31-Gr(_);P.entanglements[1]|=$,_&=~$}Qn(j),(Ge&6)===0&&(_f=Me()+500,Xu(0))}}break;case 31:case 13:P=fs(j,2),P!==null&&Lr(P,j,2),Af(),Vg(j,2)}if(j=Xg(m),j===null&&kg(a,s,m,Hf,u),j===v)break;v=j}v!==null&&m.stopPropagation()}else kg(a,s,m,null,u)}}function Xg(a){return a=Zp(a),Wg(a)}var Hf=null;function Wg(a){if(Hf=null,a=Ol(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 Hf=a,null}function kO(a){switch(a){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(fr()){case Kn:return 2;case Pd:return 8;case Md:case U5:return 32;case Kw:return 268435456;default:return 32}default:return 32}}var Zg=!1,Oi=null,_i=null,Ei=null,nc=new Map,ac=new Map,Ai=[],t$="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 IO(a,s){switch(a){case"focusin":case"focusout":Oi=null;break;case"dragenter":case"dragleave":_i=null;break;case"mouseover":case"mouseout":Ei=null;break;case"pointerover":case"pointerout":nc.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":ac.delete(s.pointerId)}}function ic(a,s,u,m,v,j){return a===null||a.nativeEvent!==j?(a={blockedOn:s,domEventName:u,eventSystemFlags:m,nativeEvent:j,targetContainers:[v]},s!==null&&(s=_l(s),s!==null&&RO(s)),a):(a.eventSystemFlags|=m,s=a.targetContainers,v!==null&&s.indexOf(v)===-1&&s.push(v),a)}function r$(a,s,u,m,v){switch(s){case"focusin":return Oi=ic(Oi,a,s,u,m,v),!0;case"dragenter":return _i=ic(_i,a,s,u,m,v),!0;case"mouseover":return Ei=ic(Ei,a,s,u,m,v),!0;case"pointerover":var j=v.pointerId;return nc.set(j,ic(nc.get(j)||null,a,s,u,m,v)),!0;case"gotpointercapture":return j=v.pointerId,ac.set(j,ic(ac.get(j)||null,a,s,u,m,v)),!0}return!1}function LO(a){var s=Ol(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,Ww(a.priority,function(){DO(u)});return}}else if(s===31){if(s=c(u),s!==null){a.blockedOn=s,Ww(a.priority,function(){DO(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 Kf(a){if(a.blockedOn!==null)return!1;for(var s=a.targetContainers;0<s.length;){var u=Xg(a.nativeEvent);if(u===null){u=a.nativeEvent;var m=new u.constructor(u.type,u);Wp=m,u.target.dispatchEvent(m),Wp=null}else return s=_l(u),s!==null&&RO(s),a.blockedOn=u,!1;s.shift()}return!0}function $O(a,s,u){Kf(a)&&u.delete(s)}function n$(){Zg=!1,Oi!==null&&Kf(Oi)&&(Oi=null),_i!==null&&Kf(_i)&&(_i=null),Ei!==null&&Kf(Ei)&&(Ei=null),nc.forEach($O),ac.forEach($O)}function Gf(a,s){a.blockedOn===s&&(a.blockedOn=null,Zg||(Zg=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,n$)))}var Yf=null;function zO(a){Yf!==a&&(Yf=a,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Yf===a&&(Yf=null);for(var s=0;s<a.length;s+=3){var u=a[s],m=a[s+1],v=a[s+2];if(typeof m!="function"){if(Wg(m||u)===null)continue;break}var j=_l(u);j!==null&&(a.splice(s,3),s-=3,Xy(j,{pending:!0,data:v,method:u.method,action:m},m,v))}}))}function lo(a){function s($){return Gf($,a)}Oi!==null&&Gf(Oi,a),_i!==null&&Gf(_i,a),Ei!==null&&Gf(Ei,a),nc.forEach(s),ac.forEach(s);for(var u=0;u<Ai.length;u++){var m=Ai[u];m.blockedOn===a&&(m.blockedOn=null)}for(;0<Ai.length&&(u=Ai[0],u.blockedOn===null);)LO(u),u.blockedOn===null&&Ai.shift();if(u=(a.ownerDocument||a).$$reactFormReplay,u!=null)for(m=0;m<u.length;m+=3){var v=u[m],j=u[m+1],_=v[Pr]||null;if(typeof j=="function")_||zO(u);else if(_){var P=null;if(j&&j.hasAttribute("formAction")){if(v=j,_=j[Pr]||null)P=_.formAction;else if(Wg(v)!==null)continue}else P=_.action;typeof P=="function"?u[m+1]=P:(u.splice(m,3),m-=3),zO(u)}}}function BO(){function a(j){j.canIntercept&&j.info==="react-transition"&&j.intercept({handler:function(){return new Promise(function(_){return v=_})},focusReset:"manual",scroll:"manual"})}function s(){v!==null&&(v(),v=null),m||setTimeout(u,20)}function u(){if(!m&&!navigation.transition){var j=navigation.currentEntry;j&&j.url!=null&&navigation.navigate(j.url,{state:j.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var m=!1,v=null;return navigation.addEventListener("navigate",a),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(u,100),function(){m=!0,navigation.removeEventListener("navigate",a),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),v!==null&&(v(),v=null)}}}function Jg(a){this._internalRoot=a}Vf.prototype.render=Jg.prototype.render=function(a){var s=this._internalRoot;if(s===null)throw Error(n(409));var u=s.current,m=Jr();PO(u,m,a,s,null,null)},Vf.prototype.unmount=Jg.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var s=a.containerInfo;PO(a.current,2,null,a,null,null),Af(),s[Nl]=null}};function Vf(a){this._internalRoot=a}Vf.prototype.unstable_scheduleHydration=function(a){if(a){var s=Xw();a={blockedOn:null,target:a,priority:s};for(var u=0;u<Ai.length&&s!==0&&s<Ai[u].priority;u++);Ai.splice(u,0,a),u===0&&LO(a)}};var UO=t.version;if(UO!=="19.2.4")throw Error(n(527,UO,"19.2.4"));H.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 a$={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Qf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Qf.isDisabled&&Qf.supportsFiber)try{mu=Qf.inject(a$),Kr=Qf}catch{}}return lc.createRoot=function(a,s){if(!i(a))throw Error(n(299));var u=!1,m="",v=V1,j=Q1,_=X1;return s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(m=s.identifierPrefix),s.onUncaughtError!==void 0&&(v=s.onUncaughtError),s.onCaughtError!==void 0&&(j=s.onCaughtError),s.onRecoverableError!==void 0&&(_=s.onRecoverableError)),s=CO(a,1,!1,null,null,u,m,null,v,j,_,BO),a[Nl]=s.current,Dg(a),new Jg(s)},lc.hydrateRoot=function(a,s,u){if(!i(a))throw Error(n(299));var m=!1,v="",j=V1,_=Q1,P=X1,$=null;return u!=null&&(u.unstable_strictMode===!0&&(m=!0),u.identifierPrefix!==void 0&&(v=u.identifierPrefix),u.onUncaughtError!==void 0&&(j=u.onUncaughtError),u.onCaughtError!==void 0&&(_=u.onCaughtError),u.onRecoverableError!==void 0&&(P=u.onRecoverableError),u.formState!==void 0&&($=u.formState)),s=CO(a,1,!0,s,u??null,m,v,$,j,_,P,BO),s.context=TO(null),u=s.current,m=Jr(),m=Fp(m),v=hi(m),v.callback=null,mi(u,v,m),u=m,s.current.lanes=u,yu(s,u),Qn(s),a[Nl]=s.current,Dg(a),new Vf(s)},lc.version="19.2.4",lc}var ZO;function g$(){if(ZO)return av.exports;ZO=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(),av.exports=y$(),av.exports}var v$=g$(),nu=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(){}},Us,$i,Ao,s2,x$=(s2=class extends nu{constructor(){super();je(this,Us);je(this,$i);je(this,Ao);me(this,Ao,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){B(this,$i)||this.setEventListener(B(this,Ao))}onUnsubscribe(){var t;this.hasListeners()||((t=B(this,$i))==null||t.call(this),me(this,$i,void 0))}setEventListener(t){var r;me(this,Ao,t),(r=B(this,$i))==null||r.call(this),me(this,$i,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){B(this,Us)!==t&&(me(this,Us,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof B(this,Us)=="boolean"?B(this,Us):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Us=new WeakMap,$i=new WeakMap,Ao=new WeakMap,s2),Pb=new x$,b$={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},zi,Tb,l2,j$=(l2=class{constructor(){je(this,zi,b$);je(this,Tb,!1)}setTimeoutProvider(e){me(this,zi,e)}setTimeout(e,t){return B(this,zi).setTimeout(e,t)}clearTimeout(e){B(this,zi).clearTimeout(e)}setInterval(e,t){return B(this,zi).setInterval(e,t)}clearInterval(e){B(this,zi).clearInterval(e)}},zi=new WeakMap,Tb=new WeakMap,l2),Rs=new j$;function w$(e){setTimeout(e,0)}var S$=typeof window>"u"||"Deno"in globalThis;function Sr(){}function N$(e,t){return typeof e=="function"?e(t):e}function ux(e){return typeof e=="number"&&e>=0&&e!==1/0}function v2(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Xi(e,t){return typeof e=="function"?e(t):e}function Nn(e,t){return typeof e=="function"?e(t):e}function JO(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:l,queryKey:o,stale:c}=e;if(o){if(n){if(t.queryHash!==Mb(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 e_(e,t){const{exact:r,status:n,predicate:i,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(r){if(rl(t.options.mutationKey)!==rl(l))return!1}else if(!Mc(t.options.mutationKey,l))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function Mb(e,t){return((t==null?void 0:t.queryKeyHashFn)||rl)(e)}function rl(e){return JSON.stringify(e,(t,r)=>cx(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 O$=Object.prototype.hasOwnProperty;function x2(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=t_(e)&&t_(t);if(!n&&!(cx(e)&&cx(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],g=e[y],x=t[y];if(g===x){f[y]=g,(n?p<l:O$.call(e,y))&&h++;continue}if(g===null||x===null||typeof g!="object"||typeof x!="object"){f[y]=x;continue}const b=x2(g,x,r+1);f[y]=b,b===g&&h++}return l===c&&h===l?e:f}function Ch(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 t_(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function cx(e){if(!r_(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!r_(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function r_(e){return Object.prototype.toString.call(e)==="[object Object]"}function _$(e){return new Promise(t=>{Rs.setTimeout(t,e)})}function dx(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?x2(e,t):t}function E$(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function A$(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Rb=Symbol();function b2(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Rb?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Db(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=()=>S$;return{isServer(){return e()},setIsServer(t){e=t}}})();function fx(){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 T$=w$;function P$(){let e=[],t=0,r=c=>{c()},n=c=>{c()},i=T$;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 Ut=P$(),Co,Bi,To,o2,M$=(o2=class extends nu{constructor(){super();je(this,Co,!0);je(this,Bi);je(this,To);me(this,To,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(){B(this,Bi)||this.setEventListener(B(this,To))}onUnsubscribe(){var t;this.hasListeners()||((t=B(this,Bi))==null||t.call(this),me(this,Bi,void 0))}setEventListener(t){var r;me(this,To,t),(r=B(this,Bi))==null||r.call(this),me(this,Bi,t(this.setOnline.bind(this)))}setOnline(t){B(this,Co)!==t&&(me(this,Co,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return B(this,Co)}},Co=new WeakMap,Bi=new WeakMap,To=new WeakMap,o2),Th=new M$;function R$(e){return Math.min(1e3*2**e,3e4)}function j2(e){return(e??"online")==="online"?Th.isOnline():!0}var hx=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function w2(e){let t=!1,r=0,n;const i=fx(),l=()=>i.status!=="pending",o=w=>{var N;if(!l()){const O=new hx(w);g(O),(N=e.onCancel)==null||N.call(e,O)}},c=()=>{t=!0},f=()=>{t=!1},h=()=>Pb.isFocused()&&(e.networkMode==="always"||Th.isOnline())&&e.canRun(),p=()=>j2(e.networkMode)&&e.canRun(),y=w=>{l()||(n==null||n(),i.resolve(w))},g=w=>{l()||(n==null||n(),i.reject(w))},x=()=>new Promise(w=>{var N;n=O=>{(l()||h())&&w(O)},(N=e.onPause)==null||N.call(e)}).then(()=>{var w;n=void 0,l()||(w=e.onContinue)==null||w.call(e)}),b=()=>{if(l())return;let w;const N=r===0?e.initialPromise:void 0;try{w=N??e.fn()}catch(O){w=Promise.reject(O)}Promise.resolve(w).then(y).catch(O=>{var M;if(l())return;const A=e.retry??(Rc.isServer()?0:3),T=e.retryDelay??R$,E=typeof T=="function"?T(r,O):T,C=A===!0||typeof A=="number"&&r<A||typeof A=="function"&&A(r,O);if(t||!C){g(O);return}r++,(M=e.onFail)==null||M.call(e,r,O),_$(E).then(()=>h()?void 0:x()).then(()=>{t?g(O):b()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(n==null||n(),i),cancelRetry:c,continueRetry:f,canStart:p,start:()=>(p()?b():x().then(b),i)}}var qs,u2,S2=(u2=class{constructor(){je(this,qs)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ux(this.gcTime)&&me(this,qs,Rs.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Rc.isServer()?1/0:300*1e3))}clearGcTimeout(){B(this,qs)&&(Rs.clearTimeout(B(this,qs)),me(this,qs,void 0))}},qs=new WeakMap,u2),Fs,Po,wn,Hs,Yt,rd,Ks,en,N2,Ra,c2,D$=(c2=class extends S2{constructor(t){super();je(this,en);je(this,Fs);je(this,Po);je(this,wn);je(this,Hs);je(this,Yt);je(this,rd);je(this,Ks);me(this,Ks,!1),me(this,rd,t.defaultOptions),this.setOptions(t.options),this.observers=[],me(this,Hs,t.client),me(this,wn,B(this,Hs).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,me(this,Fs,a_(this.options)),this.state=t.state??B(this,Fs),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=B(this,Yt))==null?void 0:t.promise}setOptions(t){if(this.options={...B(this,rd),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=a_(this.options);r.data!==void 0&&(this.setState(n_(r.data,r.dataUpdatedAt)),me(this,Fs,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&B(this,wn).remove(this)}setData(t,r){const n=dx(this.state.data,t,this.options);return Te(this,en,Ra).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){Te(this,en,Ra).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,i;const r=(n=B(this,Yt))==null?void 0:n.promise;return(i=B(this,Yt))==null||i.cancel(t),r?r.then(Sr).catch(Sr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return B(this,Fs)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Nn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Rb||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Xi(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:!v2(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=B(this,Yt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=B(this,Yt))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),B(this,wn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(B(this,Yt)&&(B(this,Ks)||Te(this,en,N2).call(this)?B(this,Yt).cancel({revert:!0}):B(this,Yt).cancelRetry()),this.scheduleGc()),B(this,wn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Te(this,en,Ra).call(this,{type:"invalidate"})}async fetch(t,r){var f,h,p,y,g,x,b,w,N,O,A,T;if(this.state.fetchStatus!=="idle"&&((f=B(this,Yt))==null?void 0:f.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(B(this,Yt))return B(this,Yt).continueRetry(),B(this,Yt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const E=this.observers.find(C=>C.options.queryFn);E&&this.setOptions(E.options)}const n=new AbortController,i=E=>{Object.defineProperty(E,"signal",{enumerable:!0,get:()=>(me(this,Ks,!0),n.signal)})},l=()=>{const E=b2(this.options,r),M=(()=>{const R={client:B(this,Hs),queryKey:this.queryKey,meta:this.meta};return i(R),R})();return me(this,Ks,!1),this.options.persister?this.options.persister(E,M,this):E(M)},c=(()=>{const E={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:B(this,Hs),state:this.state,fetchFn:l};return i(E),E})();(h=this.options.behavior)==null||h.onFetch(c,this),me(this,Po,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((p=c.fetchOptions)==null?void 0:p.meta))&&Te(this,en,Ra).call(this,{type:"fetch",meta:(y=c.fetchOptions)==null?void 0:y.meta}),me(this,Yt,w2({initialPromise:r==null?void 0:r.initialPromise,fn:c.fetchFn,onCancel:E=>{E instanceof hx&&E.revert&&this.setState({...B(this,Po),fetchStatus:"idle"}),n.abort()},onFail:(E,C)=>{Te(this,en,Ra).call(this,{type:"failed",failureCount:E,error:C})},onPause:()=>{Te(this,en,Ra).call(this,{type:"pause"})},onContinue:()=>{Te(this,en,Ra).call(this,{type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0}));try{const E=await B(this,Yt).start();if(E===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(E),(x=(g=B(this,wn).config).onSuccess)==null||x.call(g,E,this),(w=(b=B(this,wn).config).onSettled)==null||w.call(b,E,this.state.error,this),E}catch(E){if(E instanceof hx){if(E.silent)return B(this,Yt).promise;if(E.revert){if(this.state.data===void 0)throw E;return this.state.data}}throw Te(this,en,Ra).call(this,{type:"error",error:E}),(O=(N=B(this,wn).config).onError)==null||O.call(N,E,this),(T=(A=B(this,wn).config).onSettled)==null||T.call(A,this.state.data,E,this),E}finally{this.scheduleGc()}}},Fs=new WeakMap,Po=new WeakMap,wn=new WeakMap,Hs=new WeakMap,Yt=new WeakMap,rd=new WeakMap,Ks=new WeakMap,en=new WeakSet,N2=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Ra=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,...O2(n.data,this.options),fetchMeta:t.meta??null};case"success":const i={...n,...n_(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return me(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),Ut.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),B(this,wn).notify({query:this,type:"updated",action:t})})},c2);function O2(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:j2(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function n_(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function a_(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var $r,ze,nd,wr,Gs,Mo,ka,Ui,ad,Ro,Do,Ys,Vs,qi,ko,Ve,Nc,mx,px,yx,gx,vx,xx,bx,E2,d2,_2=(d2=class extends nu{constructor(t,r){super();je(this,Ve);je(this,$r);je(this,ze);je(this,nd);je(this,wr);je(this,Gs);je(this,Mo);je(this,ka);je(this,Ui);je(this,ad);je(this,Ro);je(this,Do);je(this,Ys);je(this,Vs);je(this,qi);je(this,ko,new Set);this.options=r,me(this,$r,t),me(this,Ui,null),me(this,ka,fx()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(B(this,ze).addObserver(this),i_(B(this,ze),this.options)?Te(this,Ve,Nc).call(this):this.updateResult(),Te(this,Ve,gx).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return jx(B(this,ze),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return jx(B(this,ze),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Te(this,Ve,vx).call(this),Te(this,Ve,xx).call(this),B(this,ze).removeObserver(this)}setOptions(t){const r=this.options,n=B(this,ze);if(this.options=B(this,$r).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Nn(this.options.enabled,B(this,ze))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Te(this,Ve,bx).call(this),B(this,ze).setOptions(this.options),r._defaulted&&!Ch(this.options,r)&&B(this,$r).getQueryCache().notify({type:"observerOptionsUpdated",query:B(this,ze),observer:this});const i=this.hasListeners();i&&s_(B(this,ze),n,this.options,r)&&Te(this,Ve,Nc).call(this),this.updateResult(),i&&(B(this,ze)!==n||Nn(this.options.enabled,B(this,ze))!==Nn(r.enabled,B(this,ze))||Xi(this.options.staleTime,B(this,ze))!==Xi(r.staleTime,B(this,ze)))&&Te(this,Ve,mx).call(this);const l=Te(this,Ve,px).call(this);i&&(B(this,ze)!==n||Nn(this.options.enabled,B(this,ze))!==Nn(r.enabled,B(this,ze))||l!==B(this,qi))&&Te(this,Ve,yx).call(this,l)}getOptimisticResult(t){const r=B(this,$r).getQueryCache().build(B(this,$r),t),n=this.createResult(r,t);return I$(this,n)&&(me(this,wr,n),me(this,Mo,this.options),me(this,Gs,B(this,ze).state)),n}getCurrentResult(){return B(this,wr)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&B(this,ka).status==="pending"&&B(this,ka).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(t){B(this,ko).add(t)}getCurrentQuery(){return B(this,ze)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=B(this,$r).defaultQueryOptions(t),n=B(this,$r).getQueryCache().build(B(this,$r),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return Te(this,Ve,Nc).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),B(this,wr)))}createResult(t,r){var L;const n=B(this,ze),i=this.options,l=B(this,wr),o=B(this,Gs),c=B(this,Mo),h=t!==n?t.state:B(this,nd),{state:p}=t;let y={...p},g=!1,x;if(r._optimisticResults){const k=this.hasListeners(),F=!k&&i_(t,r),q=k&&s_(t,n,r,i);(F||q)&&(y={...y,...O2(p.data,t.options)}),r._optimisticResults==="isRestoring"&&(y.fetchStatus="idle")}let{error:b,errorUpdatedAt:w,status:N}=y;x=y.data;let O=!1;if(r.placeholderData!==void 0&&x===void 0&&N==="pending"){let k;l!=null&&l.isPlaceholderData&&r.placeholderData===(c==null?void 0:c.placeholderData)?(k=l.data,O=!0):k=typeof r.placeholderData=="function"?r.placeholderData((L=B(this,Do))==null?void 0:L.state.data,B(this,Do)):r.placeholderData,k!==void 0&&(N="success",x=dx(l==null?void 0:l.data,k,r),g=!0)}if(r.select&&x!==void 0&&!O)if(l&&x===(o==null?void 0:o.data)&&r.select===B(this,ad))x=B(this,Ro);else try{me(this,ad,r.select),x=r.select(x),x=dx(l==null?void 0:l.data,x,r),me(this,Ro,x),me(this,Ui,null)}catch(k){me(this,Ui,k)}B(this,Ui)&&(b=B(this,Ui),x=B(this,Ro),w=Date.now(),N="error");const A=y.fetchStatus==="fetching",T=N==="pending",E=N==="error",C=T&&A,M=x!==void 0,D={status:N,fetchStatus:y.fetchStatus,isPending:T,isSuccess:N==="success",isError:E,isInitialLoading:C,isLoading:C,data:x,dataUpdatedAt:y.dataUpdatedAt,error:b,errorUpdatedAt:w,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:y.dataUpdateCount>h.dataUpdateCount||y.errorUpdateCount>h.errorUpdateCount,isFetching:A,isRefetching:A&&!T,isLoadingError:E&&!M,isPaused:y.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:E&&M,isStale:kb(t,r),refetch:this.refetch,promise:B(this,ka),isEnabled:Nn(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const k=D.data!==void 0,F=D.status==="error"&&!k,q=ne=>{F?ne.reject(D.error):k&&ne.resolve(D.data)},ie=()=>{const ne=me(this,ka,D.promise=fx());q(ne)},ee=B(this,ka);switch(ee.status){case"pending":t.queryHash===n.queryHash&&q(ee);break;case"fulfilled":(F||D.data!==ee.value)&&ie();break;case"rejected":(!F||D.error!==ee.reason)&&ie();break}}return D}updateResult(){const t=B(this,wr),r=this.createResult(B(this,ze),this.options);if(me(this,Gs,B(this,ze).state),me(this,Mo,this.options),B(this,Gs).data!==void 0&&me(this,Do,B(this,ze)),Ch(r,t))return;me(this,wr,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,l=typeof i=="function"?i():i;if(l==="all"||!l&&!B(this,ko).size)return!0;const o=new Set(l??B(this,ko));return this.options.throwOnError&&o.add("error"),Object.keys(B(this,wr)).some(c=>{const f=c;return B(this,wr)[f]!==t[f]&&o.has(f)})};Te(this,Ve,E2).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Te(this,Ve,gx).call(this)}},$r=new WeakMap,ze=new WeakMap,nd=new WeakMap,wr=new WeakMap,Gs=new WeakMap,Mo=new WeakMap,ka=new WeakMap,Ui=new WeakMap,ad=new WeakMap,Ro=new WeakMap,Do=new WeakMap,Ys=new WeakMap,Vs=new WeakMap,qi=new WeakMap,ko=new WeakMap,Ve=new WeakSet,Nc=function(t){Te(this,Ve,bx).call(this);let r=B(this,ze).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Sr)),r},mx=function(){Te(this,Ve,vx).call(this);const t=Xi(this.options.staleTime,B(this,ze));if(Rc.isServer()||B(this,wr).isStale||!ux(t))return;const n=v2(B(this,wr).dataUpdatedAt,t)+1;me(this,Ys,Rs.setTimeout(()=>{B(this,wr).isStale||this.updateResult()},n))},px=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(B(this,ze)):this.options.refetchInterval)??!1},yx=function(t){Te(this,Ve,xx).call(this),me(this,qi,t),!(Rc.isServer()||Nn(this.options.enabled,B(this,ze))===!1||!ux(B(this,qi))||B(this,qi)===0)&&me(this,Vs,Rs.setInterval(()=>{(this.options.refetchIntervalInBackground||Pb.isFocused())&&Te(this,Ve,Nc).call(this)},B(this,qi)))},gx=function(){Te(this,Ve,mx).call(this),Te(this,Ve,yx).call(this,Te(this,Ve,px).call(this))},vx=function(){B(this,Ys)&&(Rs.clearTimeout(B(this,Ys)),me(this,Ys,void 0))},xx=function(){B(this,Vs)&&(Rs.clearInterval(B(this,Vs)),me(this,Vs,void 0))},bx=function(){const t=B(this,$r).getQueryCache().build(B(this,$r),this.options);if(t===B(this,ze))return;const r=B(this,ze);me(this,ze,t),me(this,nd,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},E2=function(t){Ut.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(B(this,wr))}),B(this,$r).getQueryCache().notify({query:B(this,ze),type:"observerResultsUpdated"})})},d2);function k$(e,t){return Nn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function i_(e,t){return k$(e,t)||e.state.data!==void 0&&jx(e,t,t.refetchOnMount)}function jx(e,t,r){if(Nn(t.enabled,e)!==!1&&Xi(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&kb(e,t)}return!1}function s_(e,t,r,n){return(e!==t||Nn(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&kb(e,r)}function kb(e,t){return Nn(t.enabled,e)!==!1&&e.isStaleByTime(Xi(t.staleTime,e))}function I$(e,t){return!Ch(e.getCurrentResult(),t)}function Ph(e){return{onFetch:(t,r)=>{var p,y,g,x,b;const n=t.options,i=(g=(y=(p=t.fetchOptions)==null?void 0:p.meta)==null?void 0:y.fetchMore)==null?void 0:g.direction,l=((x=t.state.data)==null?void 0:x.pages)||[],o=((b=t.state.data)==null?void 0:b.pageParams)||[];let c={pages:[],pageParams:[]},f=0;const h=async()=>{let w=!1;const N=T=>{C$(T,()=>t.signal,()=>w=!0)},O=b2(t.options,t.fetchOptions),A=async(T,E,C)=>{if(w)return Promise.reject();if(E==null&&T.pages.length)return Promise.resolve(T);const R=(()=>{const F={client:t.client,queryKey:t.queryKey,pageParam:E,direction:C?"backward":"forward",meta:t.options.meta};return N(F),F})(),D=await O(R),{maxPages:L}=t.options,k=C?A$:E$;return{pages:k(T.pages,D,L),pageParams:k(T.pageParams,E,L)}};if(i&&l.length){const T=i==="backward",E=T?A2:wx,C={pages:l,pageParams:o},M=E(n,C);c=await A(C,M,T)}else{const T=e??l.length;do{const E=f===0?o[0]??n.initialPageParam:wx(n,c);if(f>0&&E==null)break;c=await A(c,E),f++}while(f<T)}return c};t.options.persister?t.fetchFn=()=>{var w,N;return(N=(w=t.options).persister)==null?void 0:N.call(w,h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=h}}}function wx(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 A2(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 L$(e,t){return t?wx(e,t)!=null:!1}function $$(e,t){return!t||!e.getPreviousPageParam?!1:A2(e,t)!=null}var z$=class extends _2{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:Ph()})}getOptimisticResult(e){return e.behavior=Ph(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var b,w;const{state:r}=e,n=super.createResult(e,t),{isFetching:i,isRefetching:l,isError:o,isRefetchError:c}=n,f=(w=(b=r.fetchMeta)==null?void 0:b.fetchMore)==null?void 0:w.direction,h=o&&f==="forward",p=i&&f==="forward",y=o&&f==="backward",g=i&&f==="backward";return{...n,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:L$(t,r.data),hasPreviousPage:$$(t,r.data),isFetchNextPageError:h,isFetchingNextPage:p,isFetchPreviousPageError:y,isFetchingPreviousPage:g,isRefetchError:c&&!h&&!y,isRefetching:l&&!p&&!g}}},id,ea,mr,Qs,ta,Mi,f2,B$=(f2=class extends S2{constructor(t){super();je(this,ta);je(this,id);je(this,ea);je(this,mr);je(this,Qs);me(this,id,t.client),this.mutationId=t.mutationId,me(this,mr,t.mutationCache),me(this,ea,[]),this.state=t.state||C2(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){B(this,ea).includes(t)||(B(this,ea).push(t),this.clearGcTimeout(),B(this,mr).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){me(this,ea,B(this,ea).filter(r=>r!==t)),this.scheduleGc(),B(this,mr).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){B(this,ea).length||(this.state.status==="pending"?this.scheduleGc():B(this,mr).remove(this))}continue(){var t;return((t=B(this,Qs))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,c,f,h,p,y,g,x,b,w,N,O,A,T,E,C,M,R;const r=()=>{Te(this,ta,Mi).call(this,{type:"continue"})},n={client:B(this,id),meta:this.options.meta,mutationKey:this.options.mutationKey};me(this,Qs,w2({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(D,L)=>{Te(this,ta,Mi).call(this,{type:"failed",failureCount:D,error:L})},onPause:()=>{Te(this,ta,Mi).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>B(this,mr).canRun(this)}));const i=this.state.status==="pending",l=!B(this,Qs).canStart();try{if(i)r();else{Te(this,ta,Mi).call(this,{type:"pending",variables:t,isPaused:l}),B(this,mr).config.onMutate&&await B(this,mr).config.onMutate(t,this,n);const L=await((c=(o=this.options).onMutate)==null?void 0:c.call(o,t,n));L!==this.state.context&&Te(this,ta,Mi).call(this,{type:"pending",context:L,variables:t,isPaused:l})}const D=await B(this,Qs).start();return await((h=(f=B(this,mr).config).onSuccess)==null?void 0:h.call(f,D,t,this.state.context,this,n)),await((y=(p=this.options).onSuccess)==null?void 0:y.call(p,D,t,this.state.context,n)),await((x=(g=B(this,mr).config).onSettled)==null?void 0:x.call(g,D,null,this.state.variables,this.state.context,this,n)),await((w=(b=this.options).onSettled)==null?void 0:w.call(b,D,null,t,this.state.context,n)),Te(this,ta,Mi).call(this,{type:"success",data:D}),D}catch(D){try{await((O=(N=B(this,mr).config).onError)==null?void 0:O.call(N,D,t,this.state.context,this,n))}catch(L){Promise.reject(L)}try{await((T=(A=this.options).onError)==null?void 0:T.call(A,D,t,this.state.context,n))}catch(L){Promise.reject(L)}try{await((C=(E=B(this,mr).config).onSettled)==null?void 0:C.call(E,void 0,D,this.state.variables,this.state.context,this,n))}catch(L){Promise.reject(L)}try{await((R=(M=this.options).onSettled)==null?void 0:R.call(M,void 0,D,t,this.state.context,n))}catch(L){Promise.reject(L)}throw Te(this,ta,Mi).call(this,{type:"error",error:D}),D}finally{B(this,mr).runNext(this)}}},id=new WeakMap,ea=new WeakMap,mr=new WeakMap,Qs=new WeakMap,ta=new WeakSet,Mi=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Ut.batch(()=>{B(this,ea).forEach(n=>{n.onMutationUpdate(t)}),B(this,mr).notify({mutation:this,type:"updated",action:t})})},f2);function C2(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ia,Rn,sd,h2,U$=(h2=class extends nu{constructor(t={}){super();je(this,Ia);je(this,Rn);je(this,sd);this.config=t,me(this,Ia,new Set),me(this,Rn,new Map),me(this,sd,0)}build(t,r,n){const i=new B$({client:t,mutationCache:this,mutationId:++Xf(this,sd)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){B(this,Ia).add(t);const r=Wf(t);if(typeof r=="string"){const n=B(this,Rn).get(r);n?n.push(t):B(this,Rn).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(B(this,Ia).delete(t)){const r=Wf(t);if(typeof r=="string"){const n=B(this,Rn).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&B(this,Rn).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Wf(t);if(typeof r=="string"){const n=B(this,Rn).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=B(this,Rn).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(){Ut.batch(()=>{B(this,Ia).forEach(t=>{this.notify({type:"removed",mutation:t})}),B(this,Ia).clear(),B(this,Rn).clear()})}getAll(){return Array.from(B(this,Ia))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>e_(r,n))}findAll(t={}){return this.getAll().filter(r=>e_(t,r))}notify(t){Ut.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Ut.batch(()=>Promise.all(t.map(r=>r.continue().catch(Sr))))}},Ia=new WeakMap,Rn=new WeakMap,sd=new WeakMap,h2);function Wf(e){var t;return(t=e.options.scope)==null?void 0:t.id}var La,Fi,zr,$a,Ya,xh,Sx,m2,q$=(m2=class extends nu{constructor(r,n){super();je(this,Ya);je(this,La);je(this,Fi);je(this,zr);je(this,$a);me(this,La,r),this.setOptions(n),this.bindMethods(),Te(this,Ya,xh).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=B(this,La).defaultMutationOptions(r),Ch(this.options,n)||B(this,La).getMutationCache().notify({type:"observerOptionsUpdated",mutation:B(this,zr),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&rl(n.mutationKey)!==rl(this.options.mutationKey)?this.reset():((i=B(this,zr))==null?void 0:i.state.status)==="pending"&&B(this,zr).setOptions(this.options)}onUnsubscribe(){var r;this.hasListeners()||(r=B(this,zr))==null||r.removeObserver(this)}onMutationUpdate(r){Te(this,Ya,xh).call(this),Te(this,Ya,Sx).call(this,r)}getCurrentResult(){return B(this,Fi)}reset(){var r;(r=B(this,zr))==null||r.removeObserver(this),me(this,zr,void 0),Te(this,Ya,xh).call(this),Te(this,Ya,Sx).call(this)}mutate(r,n){var i;return me(this,$a,n),(i=B(this,zr))==null||i.removeObserver(this),me(this,zr,B(this,La).getMutationCache().build(B(this,La),this.options)),B(this,zr).addObserver(this),B(this,zr).execute(r)}},La=new WeakMap,Fi=new WeakMap,zr=new WeakMap,$a=new WeakMap,Ya=new WeakSet,xh=function(){var n;const r=((n=B(this,zr))==null?void 0:n.state)??C2();me(this,Fi,{...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset})},Sx=function(r){Ut.batch(()=>{var n,i,l,o,c,f,h,p;if(B(this,$a)&&this.hasListeners()){const y=B(this,Fi).variables,g=B(this,Fi).context,x={client:B(this,La),meta:this.options.meta,mutationKey:this.options.mutationKey};if((r==null?void 0:r.type)==="success"){try{(i=(n=B(this,$a)).onSuccess)==null||i.call(n,r.data,y,g,x)}catch(b){Promise.reject(b)}try{(o=(l=B(this,$a)).onSettled)==null||o.call(l,r.data,null,y,g,x)}catch(b){Promise.reject(b)}}else if((r==null?void 0:r.type)==="error"){try{(f=(c=B(this,$a)).onError)==null||f.call(c,r.error,y,g,x)}catch(b){Promise.reject(b)}try{(p=(h=B(this,$a)).onSettled)==null||p.call(h,void 0,r.error,y,g,x)}catch(b){Promise.reject(b)}}}this.listeners.forEach(y=>{y(B(this,Fi))})})},m2),ra,p2,F$=(p2=class extends nu{constructor(t={}){super();je(this,ra);this.config=t,me(this,ra,new Map)}build(t,r,n){const i=r.queryKey,l=r.queryHash??Mb(i,r);let o=this.get(l);return o||(o=new D$({client:t,queryKey:i,queryHash:l,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){B(this,ra).has(t.queryHash)||(B(this,ra).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=B(this,ra).get(t.queryHash);r&&(t.destroy(),r===t&&B(this,ra).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ut.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return B(this,ra).get(t)}getAll(){return[...B(this,ra).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>JO(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>JO(t,n)):r}notify(t){Ut.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Ut.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ut.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},ra=new WeakMap,p2),wt,Hi,Ki,Io,Lo,Gi,$o,zo,y2,H$=(y2=class{constructor(e={}){je(this,wt);je(this,Hi);je(this,Ki);je(this,Io);je(this,Lo);je(this,Gi);je(this,$o);je(this,zo);me(this,wt,e.queryCache||new F$),me(this,Hi,e.mutationCache||new U$),me(this,Ki,e.defaultOptions||{}),me(this,Io,new Map),me(this,Lo,new Map),me(this,Gi,0)}mount(){Xf(this,Gi)._++,B(this,Gi)===1&&(me(this,$o,Pb.subscribe(async e=>{e&&(await this.resumePausedMutations(),B(this,wt).onFocus())})),me(this,zo,Th.subscribe(async e=>{e&&(await this.resumePausedMutations(),B(this,wt).onOnline())})))}unmount(){var e,t;Xf(this,Gi)._--,B(this,Gi)===0&&((e=B(this,$o))==null||e.call(this),me(this,$o,void 0),(t=B(this,zo))==null||t.call(this),me(this,zo,void 0))}isFetching(e){return B(this,wt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return B(this,Hi).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=B(this,wt).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=B(this,wt).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Xi(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return B(this,wt).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=B(this,wt).get(n.queryHash),l=i==null?void 0:i.state.data,o=N$(t,l);if(o!==void 0)return B(this,wt).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return Ut.batch(()=>B(this,wt).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=B(this,wt).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=B(this,wt);Ut.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=B(this,wt);return Ut.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Ut.batch(()=>B(this,wt).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(Sr).catch(Sr)}invalidateQueries(e,t={}){return Ut.batch(()=>(B(this,wt).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=Ut.batch(()=>B(this,wt).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let l=i.fetch(void 0,r);return r.throwOnError||(l=l.catch(Sr)),i.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(n).then(Sr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=B(this,wt).build(this,t);return r.isStaleByTime(Xi(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Sr).catch(Sr)}fetchInfiniteQuery(e){return e.behavior=Ph(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Sr).catch(Sr)}ensureInfiniteQueryData(e){return e.behavior=Ph(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Th.isOnline()?B(this,Hi).resumePausedMutations():Promise.resolve()}getQueryCache(){return B(this,wt)}getMutationCache(){return B(this,Hi)}getDefaultOptions(){return B(this,Ki)}setDefaultOptions(e){me(this,Ki,e)}setQueryDefaults(e,t){B(this,Io).set(rl(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...B(this,Io).values()],r={};return t.forEach(n=>{Mc(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){B(this,Lo).set(rl(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...B(this,Lo).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={...B(this,Ki).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Mb(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===Rb&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...B(this,Ki).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){B(this,wt).clear(),B(this,Hi).clear()}},wt=new WeakMap,Hi=new WeakMap,Ki=new WeakMap,Io=new WeakMap,Lo=new WeakMap,Gi=new WeakMap,$o=new WeakMap,zo=new WeakMap,y2),T2=S.createContext(void 0),ha=e=>{const t=S.useContext(T2);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},K$=({client:e,children:t})=>(S.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),d.jsx(T2.Provider,{value:e,children:t})),P2=S.createContext(!1),G$=()=>S.useContext(P2);P2.Provider;function Y$(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var V$=S.createContext(Y$()),Q$=()=>S.useContext(V$),X$=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?Db(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},W$=e=>{S.useEffect(()=>{e.clearReset()},[e])},Z$=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||Db(r,[e.error,n])),J$=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))}},ez=(e,t)=>e.isLoading&&e.isFetching&&!t,tz=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,l_=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function M2(e,t,r){var g,x,b,w;const n=G$(),i=Q$(),l=ha(),o=l.defaultQueryOptions(e);(x=(g=l.getDefaultOptions().queries)==null?void 0:g._experimental_beforeQuery)==null||x.call(g,o);const c=l.getQueryCache().get(o.queryHash);o._optimisticResults=n?"isRestoring":"optimistic",J$(o),X$(o,i,c),W$(i);const f=!l.getQueryCache().get(o.queryHash),[h]=S.useState(()=>new t(l,o)),p=h.getOptimisticResult(o),y=!n&&e.subscribed!==!1;if(S.useSyncExternalStore(S.useCallback(N=>{const O=y?h.subscribe(Ut.batchCalls(N)):Sr;return h.updateResult(),O},[h,y]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),S.useEffect(()=>{h.setOptions(o)},[o,h]),tz(o,p))throw l_(o,h,i);if(Z$({result:p,errorResetBoundary:i,throwOnError:o.throwOnError,query:c,suspense:o.suspense}))throw p.error;if((w=(b=l.getDefaultOptions().queries)==null?void 0:b._experimental_afterQuery)==null||w.call(b,o,p),o.experimental_prefetchInRender&&!Rc.isServer()&&ez(p,n)){const N=f?l_(o,h,i):c==null?void 0:c.promise;N==null||N.catch(Sr).finally(()=>{h.updateResult()})}return o.notifyOnChangeProps?p:h.trackResult(p)}function He(e,t){return M2(e,_2)}function Nx(e,t){const r=ha(),[n]=S.useState(()=>new q$(r,e));S.useEffect(()=>{n.setOptions(e)},[n,e]);const i=S.useSyncExternalStore(S.useCallback(o=>n.subscribe(Ut.batchCalls(o)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),l=S.useCallback((o,c)=>{n.mutate(o,c).catch(Sr)},[n]);if(i.error&&Db(n.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:l,mutateAsync:i.mutate}}function R2(e,t){return M2(e,z$)}var Oc=typeof window<"u"?S.useLayoutEffect:S.useEffect;function ov(e){const t=S.useRef({value:e,prev:null}),r=t.current.value;return e!==r&&(t.current={value:e,prev:r}),t.current.prev}function rz(e,t,r={},n={}){S.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 nz(e){const t=S.useRef(null);return S.useImperativeHandle(e,()=>t.current,[]),t}var D2=!1;function Dc(e){return e[e.length-1]}function az(e){return typeof e=="function"}function Yi(e,t){return az(e)?e(t):e}var iz=Object.prototype.hasOwnProperty,o_=Object.prototype.propertyIsEnumerable,sz=()=>Object.create(null),Os=(e,t)=>Ba(e,t,sz);function Ba(e,t,r=()=>({}),n=0){if(e===t)return e;if(n>500)return t;const i=t,l=d_(e)&&d_(i);if(!l&&!(Uo(e)&&Uo(i)))return i;const o=l?e:u_(e);if(!o)return i;const c=l?i:u_(i);if(!c)return i;const f=o.length,h=c.length,p=l?new Array(h):r();let y=0;for(let g=0;g<h;g++){const x=l?g:c[g],b=e[x],w=i[x];if(b===w){p[x]=b,(l?g<f:iz.call(e,x))&&y++;continue}if(b===null||w===null||typeof b!="object"||typeof w!="object"){p[x]=w;continue}const N=Ba(b,w,r,n+1);p[x]=N,N===b&&y++}return f===h&&y===f?e:p}function u_(e){const t=Object.getOwnPropertyNames(e);for(const i of t)if(!o_.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(!o_.call(e,i))return!1;n.push(i)}return n}function Uo(e){if(!c_(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const r=t.prototype;return!(!c_(r)||!r.hasOwnProperty("isPrototypeOf"))}function c_(e){return Object.prototype.toString.call(e)==="[object Object]"}function d_(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Xs(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(!Xs(e[n],t[n],r))return!1;return!0}if(Uo(e)&&Uo(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)&&!Xs(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||!Xs(e[o],t[o],r)))return!1;return i===l}return!1}function qo(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 lz(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function f_(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 lz(t)}var oz=["http:","https:","mailto:","tel:"];function Mh(e,t){if(!e)return!1;try{const r=new URL(e);return!t.has(r.protocol)}catch{return!1}}function oc(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+=f_(e.slice(r,i.index))+i[0],r=t.lastIndex;n=n+f_(r?e.slice(r):e);let l=!1;return n.startsWith("//")&&(l=!0,n="/"+n.replace(/^\/+/,"")),{path:n,handledProtocolRelativeURL:l}}function uz(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function cz(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 Fa(){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 Ds=4,k2=5;function dz(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 Ib(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=dz(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 km(e,t,r,n,i,l,o){var f,h,p,y,g,x,b,w,N,O,A,T,E;o==null||o(r);let c=n;{const C=r.fullPath??r.from,M=C.length,R=((f=r.options)==null?void 0:f.caseSensitive)??e,D=!!((p=(h=r.options)==null?void 0:h.params)!=null&&p.parse&&((g=(y=r.options)==null?void 0:y.skipRouteOnParseError)!=null&&g.params));for(;c<M;){const k=Ib(C,c,t);let F;const q=c,ie=k[5];switch(c=ie+1,l++,k[0]){case 0:{const ee=C.substring(k[2],k[3]);if(R){const ne=(x=i.static)==null?void 0:x.get(ee);if(ne)F=ne;else{i.static??(i.static=new Map);const z=ks(r.fullPath??r.from);z.parent=i,z.depth=l,F=z,i.static.set(ee,z)}}else{const ne=ee.toLowerCase(),z=(b=i.staticInsensitive)==null?void 0:b.get(ne);if(z)F=z;else{i.staticInsensitive??(i.staticInsensitive=new Map);const H=ks(r.fullPath??r.from);H.parent=i,H.depth=l,F=H,i.staticInsensitive.set(ne,H)}}break}case 1:{const ee=C.substring(q,k[1]),ne=C.substring(k[4],ie),z=R&&!!(ee||ne),H=ee?z?ee:ee.toLowerCase():void 0,Z=ne?z?ne:ne.toLowerCase():void 0,ae=!D&&((w=i.dynamic)==null?void 0:w.find(le=>!le.skipOnParamError&&le.caseSensitive===z&&le.prefix===H&&le.suffix===Z));if(ae)F=ae;else{const le=cv(1,r.fullPath??r.from,z,H,Z);F=le,le.depth=l,le.parent=i,i.dynamic??(i.dynamic=[]),i.dynamic.push(le)}break}case 3:{const ee=C.substring(q,k[1]),ne=C.substring(k[4],ie),z=R&&!!(ee||ne),H=ee?z?ee:ee.toLowerCase():void 0,Z=ne?z?ne:ne.toLowerCase():void 0,ae=!D&&((N=i.optional)==null?void 0:N.find(le=>!le.skipOnParamError&&le.caseSensitive===z&&le.prefix===H&&le.suffix===Z));if(ae)F=ae;else{const le=cv(3,r.fullPath??r.from,z,H,Z);F=le,le.parent=i,le.depth=l,i.optional??(i.optional=[]),i.optional.push(le)}break}case 2:{const ee=C.substring(q,k[1]),ne=C.substring(k[4],ie),z=R&&!!(ee||ne),H=ee?z?ee:ee.toLowerCase():void 0,Z=ne?z?ne:ne.toLowerCase():void 0,ae=cv(2,r.fullPath??r.from,z,H,Z);F=ae,ae.parent=i,ae.depth=l,i.wildcard??(i.wildcard=[]),i.wildcard.push(ae)}}i=F}if(D&&r.children&&!r.isRoot&&r.id&&r.id.charCodeAt(r.id.lastIndexOf("/")+1)===95){const k=ks(r.fullPath??r.from);k.kind=k2,k.parent=i,l++,k.depth=l,i.pathless??(i.pathless=[]),i.pathless.push(k),i=k}const L=(r.path||!r.children)&&!r.isRoot;if(L&&C.endsWith("/")){const k=ks(r.fullPath??r.from);k.kind=Ds,k.parent=i,l++,k.depth=l,i.index=k,i=k}i.parse=((A=(O=r.options)==null?void 0:O.params)==null?void 0:A.parse)??null,i.skipOnParamError=D,i.parsingPriority=((E=(T=r.options)==null?void 0:T.skipRouteOnParseError)==null?void 0:E.priority)??0,L&&!i.route&&(i.route=r,i.fullPath=r.fullPath??r.from)}if(r.children)for(const C of r.children)km(e,t,C,c,i,l,o)}function uv(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 Ri(e){var t,r,n;if(e.pathless)for(const i of e.pathless)Ri(i);if(e.static)for(const i of e.static.values())Ri(i);if(e.staticInsensitive)for(const i of e.staticInsensitive.values())Ri(i);if((t=e.dynamic)!=null&&t.length){e.dynamic.sort(uv);for(const i of e.dynamic)Ri(i)}if((r=e.optional)!=null&&r.length){e.optional.sort(uv);for(const i of e.optional)Ri(i)}if((n=e.wildcard)!=null&&n.length){e.wildcard.sort(uv);for(const i of e.wildcard)Ri(i)}}function ks(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 cv(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 fz(e,t){const r=ks("/"),n=new Uint16Array(6);for(const i of e)km(!1,n,i,1,r,0);Ri(r),t.masksTree=r,t.flatCache=Ic(1e3)}function hz(e,t){e||(e="/");const r=t.flatCache.get(e);if(r)return r;const n=Lb(e,t.masksTree);return t.flatCache.set(e,n),n}function mz(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=ks("/"),km(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(l,o)),Lb(n,o,r)}function pz(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=Lb(e,t.segmentTree,r)}catch(o){if(o instanceof URIError)l=null;else throw o}return l&&(l.branch=vz(l.route)),t.matchCache.set(n,l),l}function yz(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function gz(e,t=!1,r){const n=ks(e.fullPath),i=new Uint16Array(6),l={},o={};let c=0;return km(t,i,e,1,n,0,f=>{if(r==null||r(f,c),f.id in l&&Fa(),l[f.id]=f,c!==0&&f.path){const h=yz(f.fullPath);(!o[h]||f.fullPath.endsWith("/"))&&(o[h]=f)}c++}),Ri(n),{processedTree:{segmentTree:n,singleCache:Ic(1e3),matchCache:Ic(1e3),flatCache:null,masksTree:null},routesById:l,routesByPath:o}}function Lb(e,t,r=!1){const n=e.split("/"),i=bz(e,n,t,r);if(!i)return null;const[l]=I2(e,n,i);return{route:i.node.route,rawParams:l,parsedParams:i.parsedParams}}function I2(e,t,r){var p,y,g,x,b,w,N,O,A,T;const n=xz(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=((g=r.extract)==null?void 0:g.path)??0,h=((x=r.extract)==null?void 0:x.segment)??0;for(;c<n.length;o++,c++,f++,h++){const E=n[c];if(E.kind===Ds)break;if(E.kind===k2){h--,o--,f--;continue}const C=t[o],M=f;if(C&&(f+=C.length),E.kind===1){i??(i=r.node.fullPath.split("/"));const R=i[h],D=((b=E.prefix)==null?void 0:b.length)??0;if(R.charCodeAt(D)===123){const L=((w=E.suffix)==null?void 0:w.length)??0,k=R.substring(D+2,R.length-L-1),F=C.substring(D,C.length-L);l[k]=decodeURIComponent(F)}else{const L=R.substring(1);l[L]=decodeURIComponent(C)}}else if(E.kind===3){if(r.skipped&1<<c){o--,f=M-1;continue}i??(i=r.node.fullPath.split("/"));const R=i[h],D=((N=E.prefix)==null?void 0:N.length)??0,L=((O=E.suffix)==null?void 0:O.length)??0,k=R.substring(D+3,R.length-L-1),F=E.suffix||E.prefix?C.substring(D,C.length-L):C;F&&(l[k]=decodeURIComponent(F))}else if(E.kind===2){const R=E,D=e.substring(M+(((A=R.prefix)==null?void 0:A.length)??0),e.length-(((T=R.suffix)==null?void 0:T.length)??0)),L=decodeURIComponent(D);l["*"]=L,l._splat=L;break}}return r.rawParams&&Object.assign(l,r.rawParams),[l,{part:o,node:c,path:f,segment:h}]}function vz(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function xz(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function bz(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:g,index:x,skipped:b,depth:w,statics:N,dynamics:O,optionals:A}=y;let{extract:T,rawParams:E,parsedParams:C}=y;if(g.skipOnParamError){if(!dv(e,t,y))continue;E=y.rawParams,T=y.extract,C=y.parsedParams}n&&g.route&&g.kind!==Ds&&uc(h,y)&&(h=y);const M=x===o;if(M&&(g.route&&!l&&uc(p,y)&&(p=y),!g.optional&&!g.wildcard&&!g.index&&!g.pathless))continue;const R=M?void 0:t[x];let D;if(M&&g.index){const L={node:g.index,index:x,skipped:b,depth:w+1,statics:N,dynamics:O,optionals:A,extract:T,rawParams:E,parsedParams:C};let k=!0;if(g.index.skipOnParamError&&(dv(e,t,L)||(k=!1)),k){if(N===o&&!O&&!A&&!b)return L;uc(p,L)&&(p=L)}}if(g.wildcard&&uc(f,y))for(const L of g.wildcard){const{prefix:k,suffix:F}=L;if(k&&(M||!(L.caseSensitive?R:D??(D=R.toLowerCase())).startsWith(k)))continue;if(F){if(M)continue;const ie=t.slice(x).join("/").slice(-F.length);if((L.caseSensitive?ie:ie.toLowerCase())!==F)continue}const q={node:L,index:o,skipped:b,depth:w,statics:N,dynamics:O,optionals:A,extract:T,rawParams:E,parsedParams:C};if(!(L.skipOnParamError&&!dv(e,t,q))){f=q;break}}if(g.optional){const L=b|1<<w,k=w+1;for(let F=g.optional.length-1;F>=0;F--){const q=g.optional[F];c.push({node:q,index:x,skipped:L,depth:k,statics:N,dynamics:O,optionals:A,extract:T,rawParams:E,parsedParams:C})}if(!M)for(let F=g.optional.length-1;F>=0;F--){const q=g.optional[F],{prefix:ie,suffix:ee}=q;if(ie||ee){const ne=q.caseSensitive?R:D??(D=R.toLowerCase());if(ie&&!ne.startsWith(ie)||ee&&!ne.endsWith(ee))continue}c.push({node:q,index:x+1,skipped:b,depth:k,statics:N,dynamics:O,optionals:A+1,extract:T,rawParams:E,parsedParams:C})}}if(!M&&g.dynamic&&R)for(let L=g.dynamic.length-1;L>=0;L--){const k=g.dynamic[L],{prefix:F,suffix:q}=k;if(F||q){const ie=k.caseSensitive?R:D??(D=R.toLowerCase());if(F&&!ie.startsWith(F)||q&&!ie.endsWith(q))continue}c.push({node:k,index:x+1,skipped:b,depth:w+1,statics:N,dynamics:O+1,optionals:A,extract:T,rawParams:E,parsedParams:C})}if(!M&&g.staticInsensitive){const L=g.staticInsensitive.get(D??(D=R.toLowerCase()));L&&c.push({node:L,index:x+1,skipped:b,depth:w+1,statics:N+1,dynamics:O,optionals:A,extract:T,rawParams:E,parsedParams:C})}if(!M&&g.static){const L=g.static.get(R);L&&c.push({node:L,index:x+1,skipped:b,depth:w+1,statics:N+1,dynamics:O,optionals:A,extract:T,rawParams:E,parsedParams:C})}if(g.pathless){const L=w+1;for(let k=g.pathless.length-1;k>=0;k--){const F=g.pathless[k];c.push({node:F,index:x,skipped:b,depth:L,statics:N,dynamics:O,optionals:A,extract:T,rawParams:E,parsedParams:C})}}}if(p&&f)return uc(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 g=y===e.length?"/":e.slice(y);return h.rawParams??(h.rawParams=Object.create(null)),h.rawParams["**"]=decodeURIComponent(g),h}return null}function dv(e,t,r){try{const[n,i]=I2(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 uc(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===Ds)>(e.node.kind===Ds)||t.node.kind===Ds==(e.node.kind===Ds)&&t.depth>e.depth))):!0}function bh(e){return $b(e.filter(t=>t!==void 0).join("/"))}function $b(e){return e.replace(/\/{2,}/g,"/")}function L2(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Wi(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function $2(e){return Wi(L2(e))}function Rh(e,t){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function jz(e,t,r){return Rh(e,r)===Rh(t,r)}function wz({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 g=0,x=y.length;g<x;g++){const b=y[g];b===""?g?g===x-1&&c.push(b):c=[b]:b===".."?c.pop():b==="."||c.push(b)}}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 g=c[y];if(!g)continue;f=Ib(g,0,f);const x=f[0];if(x===0){h+=g;continue}const b=f[5],w=g.substring(0,f[1]),N=g.substring(f[4],b),O=g.substring(f[2],f[3]);x===1?h+=w||N?`${w}{$${O}}${N}`:`$${O}`:x===2?h+=w||N?`${w}{$}${N}`:"$":h+=`${w}{-$${O}}${N}`}h=$b(h);const p=h||"/";return o&&n&&n.set(o,p),p}function Sz(e){const t=new Map(e.map(i=>[encodeURIComponent(i),i])),r=Array.from(t.keys()).map(i=>i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),n=new RegExp(r,"g");return i=>i.replace(n,l=>t.get(l)??l)}function fv(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=>m_(i,r)).join("/"):m_(n,r)}function h_({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=Ib(e,p,f);const y=f[5];if(c=y+1,p===y)continue;const g=f[0];if(g===0){h+="/"+e.substring(p,y);continue}if(g===2){const x=t._splat;l._splat=x,l["*"]=x;const b=e.substring(p,f[1]),w=e.substring(f[4],y);if(!x){i=!0,(b||w)&&(h+="/"+b+w);continue}const N=fv("_splat",t,r);h+="/"+b+N+w;continue}if(g===1){const x=e.substring(f[2],f[3]);!i&&!(x in t)&&(i=!0),l[x]=t[x];const b=e.substring(p,f[1]),w=e.substring(f[4],y),N=fv(x,t,r)??"undefined";h+="/"+b+N+w;continue}if(g===3){const x=e.substring(f[2],f[3]),b=t[x];if(b==null)continue;l[x]=b;const w=e.substring(p,f[1]),N=e.substring(f[4],y),O=fv(x,t,r)??"";h+="/"+w+O+N;continue}}return e.endsWith("/")&&(h+="/"),{usedParams:l,interpolatedPath:h||"/",isMissingParams:i}}function m_(e,t){const r=encodeURIComponent(e);return(t==null?void 0:t(r))??r}function _r(e){return!!(e!=null&&e.isNotFound)}function Nz(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}var Oz="tsr-scroll-restoration-v1_3";function _z(){const e=Nz();if(!e)return null;let t={};try{const n=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");Uo(n)&&(t=n)}catch{}return{get state(){return t},set:n=>{t=Yi(n,t)||t},persist:()=>{try{e.setItem(Oz,JSON.stringify(t))}catch{}}}}var p_=_z(),Ez=e=>e.state.__TSR_key||e.href;function Az(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 Zf=!1,cc="window",y_="data-scroll-restoration-id";function Cz(e,t){if(!p_)return;const r=p_;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!r)return;e.isScrollRestorationSetup=!0,Zf=!1;const n=e.options.getScrollRestorationKey||Ez,i=new Map;window.history.scrollRestoration="manual";const l=c=>{if(!(Zf||!e.isScrollRestoring))if(c.target===document||c.target===window)i.set(cc,{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 g;if(p===cc)g=cc;else if(p.isConnected){const x=p.getAttribute(y_);g=x?`[${y_}="${x}"]`:Az(p)}g&&(f[g]=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}))){Zf=!0;try{const g=e.isScrollRestoring?r.state[f]:void 0;let x=!1;if(g)for(const b in g){const w=g[b];if(!Uo(w))continue;const{scrollX:N,scrollY:O}=w;if(!(!Number.isFinite(N)||!Number.isFinite(O))){if(b===cc)window.scrollTo({top:O,left:N,behavior:h}),x=!0;else if(b){let A;try{A=document.querySelector(b)}catch{continue}A&&(A.scrollLeft=N,A.scrollTop=O,x=!0)}}}if(!x){const b=e.history.location.hash.slice(1);if(b){const w=((y=window.history.state)==null?void 0:y.__hashScrollIntoViewOptions)??!0;if(w){const N=document.getElementById(b);N&&N.scrollIntoView(w)}}else{const w={top:0,left:0,behavior:h};if(window.scrollTo(w),p)for(const N of p){if(N===cc)continue;const O=typeof N=="function"?N():document.querySelector(N);O&&O.scrollTo(w)}}}}finally{Zf=!1}e.isScrollRestoring&&r.set(g=>(g[f]||(g[f]={}),g))}})}function Tz(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 hv(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function Pz(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]=hv(i):Array.isArray(l)?l.push(hv(i)):r[n]=[l,hv(i)]}return r}var Mz=Dz(JSON.parse),Rz=kz(JSON.stringify,JSON.parse);function Dz(e){return t=>{t[0]==="?"&&(t=t.substring(1));const r=Pz(t);for(const n in r){const i=r[n];if(typeof i=="string")try{r[n]=e(i)}catch{}}return r}}function kz(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=Tz(i,n);return l?`?${l}`:""}}var Ws="__root__";function Iz(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const r=new Response(null,{status:e.statusCode,headers:t});if(r.options=e,e.throw)throw r;return r}function Ur(e){return e instanceof Response&&!!e.options}function Lz(e){return{input:({url:t})=>{for(const r of e)t=Ox(r,t);return t},output:({url:t})=>{for(let r=e.length-1;r>=0;r--)t=z2(e[r],t);return t}}}function $z(e){const t=$2(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=bh(["/",t,o.pathname]),o)}}function Ox(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 z2(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 zz(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),g=r(e.isTransitioning),x=r(e.location),b=r(e.resolvedLocation),w=r(e.statusCode),N=r(e.redirect),O=r([]),A=r([]),T=r([]),E=n(()=>mv(o,O.state)),C=n(()=>mv(c,A.state)),M=n(()=>mv(f,T.state)),R=n(()=>O.state[0]),D=n(()=>O.state.some(H=>{var Z;return((Z=o.get(H))==null?void 0:Z.state.status)==="pending"})),L=n(()=>{var H;return{locationHref:x.state.href,resolvedLocationHref:(H=b.state)==null?void 0:H.href,status:h.state}}),k=n(()=>({status:h.state,loadedAt:p.state,isLoading:y.state,isTransitioning:g.state,matches:E.state,location:x.state,resolvedLocation:b.state,statusCode:w.state,redirect:N.state})),F=Ic(64);function q(H){let Z=F.get(H);return Z||(Z=n(()=>{const ae=O.state;for(const le of ae){const I=o.get(le);if(I&&I.routeId===H)return I.state}}),F.set(H,Z)),Z}const ie={status:h,loadedAt:p,isLoading:y,isTransitioning:g,location:x,resolvedLocation:b,statusCode:w,redirect:N,matchesId:O,pendingMatchesId:A,cachedMatchesId:T,activeMatchesSnapshot:E,pendingMatchesSnapshot:C,cachedMatchesSnapshot:M,firstMatchId:R,hasPendingMatches:D,matchRouteReactivity:L,activeMatchStoresById:o,pendingMatchStoresById:c,cachedMatchStoresById:f,__store:k,getMatchStoreByRouteId:q,setActiveMatches:ee,setPendingMatches:ne,setCachedMatches:z};ee(e.matches),l==null||l(ie);function ee(H){pv(H,o,O,r,i)}function ne(H){pv(H,c,A,r,i)}function z(H){pv(H,f,T,r,i)}return ie}function mv(e,t){const r=[];for(const n of t){const i=e.get(n);i&&r.push(i.state)}return r}function pv(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)}cz(r.state,l)||r.setState(()=>l)})}var _x=e=>{var t;if(!e.rendered)return e.rendered=!0,(t=e.onReady)==null?void 0:t.call(e)},Bz=e=>e.stores.matchesId.state.some(t=>{var r;return(r=e.stores.activeMatchStoresById.get(t))==null?void 0:r.state._forcePending}),Im=(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},g_=(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},Vi=(e,t,r)=>{var n,i,l;if(!(!Ur(r)&&!_r(r)))throw Ur(r)&&r.redirectHandled&&!r.options.reloadDocument||(t&&((n=t._nonReactive.beforeLoadPromise)==null||n.resolve(),(i=t._nonReactive.loaderPromise)==null||i.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=r,e.updateMatch(t.id,o=>({...o,status:Ur(r)?"redirected":o.status==="pending"?"success":o.status,context:Zs(e,t.index),isFetching:!1,error:r})),_r(r)&&!r.routeId&&(r.routeId=t.routeId),(l=t._nonReactive.loadPromise)==null||l.resolve()),Ur(r)&&(e.rendered=!0,r.options._fromLocation=e.location,r.redirectHandled=!0,r=e.router.resolveRedirect(r))),r},B2=(e,t)=>{const r=e.router.getMatch(t);return!!(!r||r._nonReactive.dehydrated)},v_=(e,t,r)=>{const n=Zs(e,r);e.updateMatch(t,i=>({...i,context:n}))},dc=(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),Vi(e,e.router.getMatch(i),r);try{(f=(c=o.options).onError)==null||f.call(c,r)}catch(h){r=h,Vi(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&&!Ur(r)&&!_r(r)&&(e.serialError??(e.serialError=r))},U2=(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&&!Im(e,t)&&(r.options.loader||r.options.beforeLoad||F2(r))&&typeof i=="number"&&i!==1/0&&(r.options.pendingComponent??((l=e.router.options)==null?void 0:l.defaultPendingComponent))){const o=setTimeout(()=>{_x(e)},i);n._nonReactive.pendingTimeout=o}},Uz=(e,t,r)=>{const n=e.router.getMatch(t);if(!n._nonReactive.beforeLoadPromise&&!n._nonReactive.loaderPromise)return;U2(e,t,r,n);const i=()=>{const l=e.router.getMatch(t);l.preload&&(l.status==="redirected"||l.status==="notFound")&&Vi(e,l,l.error)};return n._nonReactive.beforeLoadPromise?n._nonReactive.beforeLoadPromise.then(i):i()},qz=(e,t,r,n)=>{const i=e.router.getMatch(t);let l=i._nonReactive.loadPromise;i._nonReactive.loadPromise=qo(()=>{l==null||l.resolve(),l=void 0});const{paramsError:o,searchError:c}=i;o&&dc(e,r,o,"PARSE_PARAMS"),c&&dc(e,r,c,"VALIDATE_SEARCH"),U2(e,t,n,i);const f=new AbortController;let h=!1;const p=()=>{h||(h=!0,e.updateMatch(t,E=>({...E,isFetching:"beforeLoad",fetchCount:E.fetchCount+1,abortController:f})))},y=()=>{var E;(E=i._nonReactive.beforeLoadPromise)==null||E.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,C=>({...C,isFetching:!1}))};if(!n.options.beforeLoad){e.router.batch(()=>{p(),y()});return}i._nonReactive.beforeLoadPromise=qo();const g={...Zs(e,r,!1),...i.__routeContext},{search:x,params:b,cause:w}=i,N=Im(e,t),O={search:x,abortController:f,params:b,preload:N,context:g,location:e.location,navigate:E=>e.router.navigate({...E,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:N?"preload":w,matches:e.matches,routeId:n.id,...e.router.options.additionalContext},A=E=>{if(E===void 0){e.router.batch(()=>{p(),y()});return}(Ur(E)||_r(E))&&(p(),dc(e,r,E,"BEFORE_LOAD")),e.router.batch(()=>{p(),e.updateMatch(t,C=>({...C,__beforeLoadContext:E})),y()})};let T;try{if(T=n.options.beforeLoad(O),kc(T))return p(),T.catch(E=>{dc(e,r,E,"BEFORE_LOAD")}).then(A)}catch(E){p(),dc(e,r,E,"BEFORE_LOAD")}A(T)},Fz=(e,t)=>{const{id:r,routeId:n}=e.matches[t],i=e.router.looseRoutesById[n],l=()=>c(),o=()=>qz(e,r,t,i),c=()=>{if(B2(e,r))return;const f=Uz(e,r,i);return kc(f)?f.then(o):o()};return l()},Hz=(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,g,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:g,styles:y==null?void 0:y.styles}))},q2=(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=Im(e,r);return{params:o,deps:c,preload:!!y,parentMatchPromise:l,abortController:f,context:p,location:e.location,navigate:g=>e.router.navigate({...g,_fromLocation:e.location}),cause:y?"preload":h,route:i,...e.router.options.additionalContext}},x_=async(e,t,r,n,i)=>{var l,o,c,f,h;try{const p=e.router.getMatch(r);try{(!(D2??e.router.isServer)||p.ssr===!0)&&Lc(i);const y=i.options.loader,g=typeof y=="function"?y:y==null?void 0:y.handler,x=g==null?void 0:g(q2(e,t,r,n,i)),b=!!g&&kc(x);if((b||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||p._nonReactive.minPendingPromise)&&e.updateMatch(r,N=>({...N,isFetching:"loader"})),g){const N=b?await x:x;Vi(e,e.router.getMatch(r),N),N!==void 0&&e.updateMatch(r,O=>({...O,loaderData:N}))}i._lazyPromise&&await i._lazyPromise;const w=p._nonReactive.minPendingPromise;w&&await w,i._componentsPromise&&await i._componentsPromise,e.updateMatch(r,N=>({...N,error:void 0,context:Zs(e,n),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(y){let g=y;if((g==null?void 0:g.name)==="AbortError"){if(p.abortController.signal.aborted){(l=p._nonReactive.loaderPromise)==null||l.resolve(),p._nonReactive.loaderPromise=void 0;return}e.updateMatch(r,b=>({...b,status:b.status==="pending"?"success":b.status,isFetching:!1,context:Zs(e,n)}));return}const x=p._nonReactive.minPendingPromise;x&&await x,_r(y)&&await((c=(o=i.options.notFoundComponent)==null?void 0:o.preload)==null?void 0:c.call(o)),Vi(e,e.router.getMatch(r),y);try{(h=(f=i.options).onError)==null||h.call(f,y)}catch(b){g=b,Vi(e,e.router.getMatch(r),b)}!Ur(g)&&!_r(g)&&await Lc(i,["errorComponent"]),e.updateMatch(r,b=>({...b,error:g,context:Zs(e,n),status:"error",isFetching:!1}))}}catch(p){const y=e.router.getMatch(r);y&&(y._nonReactive.loaderPromise=void 0),Vi(e,y,p)}},Kz=async(e,t,r)=>{var x,b,w,N;async function n(O,A,T,E,C){const M=Date.now()-A.updatedAt,R=O?C.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:C.options.staleTime??e.router.options.defaultStaleTime??0,D=C.options.shouldReload,L=typeof D=="function"?D(q2(e,t,i,r,C)):D,{status:k,invalid:F}=E,q=M>=R&&(!!e.forceStaleReload||E.cause==="enter"||T!==void 0&&T!==E.id);o=k==="success"&&(F||(L??q)),O&&C.options.preload===!1||(o&&!e.sync&&p?(c=!0,(async()=>{var ie,ee;try{await x_(e,t,i,r,C);const ne=e.router.getMatch(i);(ie=ne._nonReactive.loaderPromise)==null||ie.resolve(),(ee=ne._nonReactive.loadPromise)==null||ee.resolve(),ne._nonReactive.loaderPromise=void 0,ne._nonReactive.loadPromise=void 0}catch(ne){Ur(ne)&&await e.router.navigate(ne.options)}})()):k!=="success"||o?await x_(e,t,i,r,C):v_(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(B2(e,i)){if(!e.router.getMatch(i))return e.matches[r];v_(e,i,r)}else{const O=e.router.getMatch(i),A=e.router.stores.matchesId.state[r],T=((x=A&&e.router.stores.activeMatchStoresById.get(A)||null)==null?void 0:x.routeId)===l?A:(b=e.router.stores.activeMatchesSnapshot.state.find(C=>C.routeId===l))==null?void 0:b.id,E=Im(e,i);if(O._nonReactive.loaderPromise){if(O.status==="success"&&!e.sync&&!O.preload&&p)return O;await O._nonReactive.loaderPromise;const C=e.router.getMatch(i),M=C._nonReactive.error||C.error;M&&Vi(e,C,M),C.status==="pending"&&await n(E,O,T,C,f)}else{const C=E&&!e.router.stores.activeMatchStoresById.has(i),M=e.router.getMatch(i);M._nonReactive.loaderPromise=qo(),C!==M.preload&&e.updateMatch(i,R=>({...R,preload:C})),await n(E,O,T,M,f)}}const y=e.router.getMatch(i);c||((w=y._nonReactive.loaderPromise)==null||w.resolve(),(N=y._nonReactive.loadPromise)==null||N.resolve(),y._nonReactive.loadPromise=void 0),clearTimeout(y._nonReactive.pendingTimeout),y._nonReactive.pendingTimeout=void 0,c||(y._nonReactive.loaderPromise=void 0),y._nonReactive.dehydrated=void 0;const g=c?y.isFetching:!1;return g!==y.isFetching||y.invalid!==!1?(e.updateMatch(i,O=>({...O,isFetching:g,invalid:!1})),e.router.getMatch(i)):y};async function b_(e){var g,x;const t=e,r=[];Bz(t.router)&&_x(t);let n;for(let b=0;b<t.matches.length;b++){try{const w=Fz(t,b);kc(w)&&await w}catch(w){if(Ur(w))throw w;if(_r(w))n=w;else if(!t.preload)throw w;break}if(t.serialError)break}const i=t.firstBadMatchIndex??t.matches.length,l=n&&!t.preload?g_(t,n):void 0,o=n&&t.preload?0:l!==void 0?Math.min(l+1,i):i;let c,f;for(let b=0;b<o;b++)r.push(Kz(t,r,b));try{await Promise.all(r)}catch{const b=await Promise.allSettled(r);for(const w of b){if(w.status!=="rejected")continue;const N=w.reason;if(Ur(N))throw N;_r(N)?c??(c=N):f??(f=N)}if(f!==void 0)throw f}const h=c??(n&&!t.preload?n:void 0);let p=t.serialError?t.firstBadMatchIndex??0:t.matches.length-1;if(!h&&n&&t.preload)return t.matches;if(h){const b=g_(t,h);b===void 0&&Fa();const w=t.matches[b],N=t.router.looseRoutesById[w.routeId],O=(g=t.router.options)==null?void 0:g.defaultNotFoundComponent;!N.options.notFoundComponent&&O&&(N.options.notFoundComponent=O),h.routeId=w.routeId;const A=w.routeId===t.router.routeTree.id;t.updateMatch(w.id,T=>({...T,...A?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:h},isFetching:!1})),p=b,await Lc(N,["notFoundComponent"])}else if(!t.preload){const b=t.matches[0];b.globalNotFound||(x=t.router.getMatch(b.id))!=null&&x.globalNotFound&&t.updateMatch(b.id,w=>({...w,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const b=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await Lc(b,["errorComponent"])}for(let b=0;b<=p;b++){const{id:w,routeId:N}=t.matches[b],O=t.router.looseRoutesById[N];try{const A=Hz(t,w,O);if(A){const T=await A;t.updateMatch(w,E=>({...E,...T}))}}catch(A){console.error(`Error executing head for route ${N}:`,A)}}const y=_x(t);if(kc(y)&&await y,h)throw h;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function j_(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=jh){!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===jh?(()=>{if(e._componentsPromise===void 0){const n=j_(e,jh);n?e._componentsPromise=n.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():j_(e,t);return e._lazyPromise?e._lazyPromise.then(r):r()}function F2(e){var t;for(const r of jh)if((t=e.options[r])!=null&&t.preload)return!0;return!1}var jh=["component","errorComponent","pendingComponent","notFoundComponent"],Zi="__TSR_index",w_="popstate",S_="beforeunload";function Gz(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,g;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 b=Dh(f.path,f.state);if(await x.blockerFn({currentLocation:t,nextLocation:b,action:f.type})){(g=e.onBlocked)==null||g.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=N_(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=N_(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(g=>g!==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 N_(e,t){t||(t={});const r=zb();return{...t,key:r,__TSR_key:r,[Zi]:e}}function Yz(e){var D,L;const t=typeof document<"u"?window:void 0,r=t.history.pushState,n=t.history.replaceState;let i=[];const l=()=>i,o=k=>i=k,c=(k=>k),f=(()=>Dh(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!((D=t.history.state)!=null&&D.__TSR_key)&&!((L=t.history.state)!=null&&L.key)){const k=zb();t.history.replaceState({[Zi]:0,key:k,__TSR_key:k},"")}let h=f(),p,y=!1,g=!1,x=!1,b=!1;const w=()=>h;let N,O;const A=()=>{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)},T=(k,F,q)=>{const ie=c(F);O||(p=h),h=Dh(F,q),N={href:ie,state:q,isPush:(N==null?void 0:N.isPush)||k==="push"},O||(O=Promise.resolve().then(()=>A()))},E=k=>{h=f(),R.notify({type:k})},C=async()=>{if(g){g=!1;return}const k=f(),F=k.state[Zi]-h.state[Zi],q=F===1,ie=F===-1,ee=!q&&!ie||y;y=!1;const ne=ee?"GO":ie?"BACK":"FORWARD",z=ee?{type:"GO",index:F}:{type:ie?"BACK":"FORWARD"};if(x)x=!1;else{const H=l();if(typeof document<"u"&&H.length){for(const Z of H)if(await Z.blockerFn({currentLocation:h,nextLocation:k,action:ne})){g=!0,t.history.go(1),R.notify(z);return}}}h=f(),R.notify(z)},M=k=>{if(b){b=!1;return}let F=!1;const q=l();if(typeof document<"u"&&q.length)for(const ie of q){const ee=ie.enableBeforeUnload??!0;if(ee===!0){F=!0;break}if(typeof ee=="function"&&ee()===!0){F=!0;break}}if(F)return k.preventDefault(),k.returnValue=""},R=Gz({getLocation:w,getLength:()=>t.history.length,pushState:(k,F)=>T("push",k,F),replaceState:(k,F)=>T("replace",k,F),back:k=>(k&&(x=!0),b=!0,t.history.back()),forward:k=>{k&&(x=!0),b=!0,t.history.forward()},go:k=>{y=!0,t.history.go(k)},createHref:k=>c(k),flush:A,destroy:()=>{t.history.pushState=r,t.history.replaceState=n,t.removeEventListener(S_,M,{capture:!0}),t.removeEventListener(w_,C)},onBlocked:()=>{p&&h!==p&&(h=p)},getBlockers:l,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(S_,M,{capture:!0}),t.addEventListener(w_,C),t.history.pushState=function(...k){const F=r.apply(t.history,k);return R._ignoreSubscribers||E("PUSH"),F},t.history.replaceState=function(...k){const F=n.apply(t.history,k);return R._ignoreSubscribers||E("REPLACE"),F},R}function Vz(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function Dh(e,t){const r=Vz(e),n=r.indexOf("#"),i=r.indexOf("?"),l=zb();return{href:r,pathname:r.substring(0,n>0?i>0?Math.min(n,i):n:i>0?i:r.length),hash:n>-1?r.substring(n):"",search:i>-1?r.slice(i,n===-1?void 0:n):"",state:t||{[Zi]:0,key:l,__TSR_key:l}}}function zb(){return(Math.random()+1).toString(36).substring(7)}function No(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 Qz=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=Sz(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=Yz()),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=zz(Wz(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=[],g=$2(f);g&&g!=="/"&&y.push($z({basepath:f})),h&&y.push(h),this.rewrite=y.length===0?void 0:y.length===1?y[0]:Lz(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=gz(this.routeTree,this.options.caseSensitive,(n,i)=>{n.init({originalIndex:i})});return this.options.routeMasks&&fz(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:g})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(f)){const O=this.options.parseSearch(h),A=this.options.stringifySearch(O);return{href:f+A+p,publicHref:y,pathname:oc(f).path,external:!1,searchStr:A,search:Os(n==null?void 0:n.search,O),hash:oc(p.slice(1)).path,state:Ba(n==null?void 0:n.state,g)}}const x=new URL(y,this.origin),b=Ox(this.rewrite,x),w=this.options.parseSearch(b.search),N=this.options.stringifySearch(w);return b.search=N,{href:b.href.replace(b.origin,""),publicHref:y,pathname:oc(b.pathname).path,external:!!this.rewrite&&b.origin!==this.origin,searchStr:N,search:Os(n==null?void 0:n.search,w),hash:oc(b.hash.slice(1)).path,state:Ba(n==null?void 0:n.state,g)}},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)=>wz({base:r,to:$b(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=>Zz({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 k,F;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),g=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,Yi(l.params,y)),b=this.getMatchedRoutes(g);let w=b.matchedRoutes;if((!b.foundRoute||b.foundRoute.path!=="/"&&b.routeParams["**"])&&this.options.notFoundRoute&&(w=[...w,this.options.notFoundRoute]),Object.keys(x).length>0)for(const q of w){const ie=((k=q.options.params)==null?void 0:k.stringify)??q.options.stringifyParams;if(ie)try{Object.assign(x,ie(x))}catch{}}const N=r.leaveParams?g:oc(h_({path:g,params:x,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let O=p;if(r._includeValidateSearch&&((F=this.options.search)!=null&&F.strict)){const q={};w.forEach(ie=>{if(ie.options.validateSearch)try{Object.assign(q,wh(ie.options.validateSearch,{...q,...O}))}catch{}}),O=q}O=Jz({search:O,dest:l,destRoutes:w,_includeValidateSearch:r._includeValidateSearch}),O=Os(p,O);const A=this.options.stringifySearch(O),T=l.hash===!0?o.hash:l.hash?Yi(l.hash,o.hash):void 0,E=T?`#${T}`:"";let C=l.state===!0?o.state:l.state?Yi(l.state,o.state):{};C=Ba(o.state,C);const M=`${N}${A}${E}`;let R,D,L=!1;if(this.rewrite){const q=new URL(M,this.origin),ie=z2(this.rewrite,q);R=q.href.replace(q.origin,""),ie.origin!==this.origin?(D=ie.href,L=!0):D=ie.pathname+ie.search+ie.hash}else R=uz(M),D=R;return{publicHref:D,href:R,pathname:N,search:O,searchStr:A,state:C,hash:T??"",external:L,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=hz(c.pathname,this.processedTree);if(p){Object.assign(h,p.rawParams);const{from:y,params:g,...x}=p.route,b=g===!1||g===null?Object.create(null):(g??!0)===!0?h:Object.assign(h,Yi(g,h));o={from:r.from,...x,params:b},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=Xs(i.state,this.latestLocation.state);return f.forEach(p=>{delete i.state[p]}),h},o=Wi(this.latestLocation.href)===Wi(i.href);let c=this.commitLocationPromise;if(this.commitLocationPromise=qo(()=>{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,g=Dh(c,{__TSR_index:r?y:y+1}),x=new URL(g.pathname,this.origin);f.to=Ox(this.rewrite,x).pathname,f.search=this.options.parseSearch(g.search),f.hash=g.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(Mh(p,this.protocolAllowlist))return Promise.resolve();if(!o.ignoreBlocker){const y=((h=(f=this.history).getBlockers)==null?void 0:h.call(f))??[];for(const g of y)if(g!=null&&g.blockerFn&&await g.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return 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,g=No(p,y);this.stores.redirect.state||this.emit({type:"onBeforeNavigate",...g}),this.emit({type:"onBeforeLoad",...g}),await b_({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,A;let x=null,b=null,w=null,N=null;this.batch(()=>{const T=this.stores.pendingMatchesSnapshot.state,E=T.length,C=this.stores.activeMatchesSnapshot.state;x=E?C.filter(D=>!this.stores.pendingMatchStoresById.has(D.id)):null;const M=new Set;for(const D of this.stores.pendingMatchStoresById.values())D.routeId&&M.add(D.routeId);const R=new Set;for(const D of this.stores.activeMatchStoresById.values())D.routeId&&R.add(D.routeId);b=E?C.filter(D=>!M.has(D.routeId)):null,w=E?T.filter(D=>!R.has(D.routeId)):null,N=E?T.filter(D=>R.has(D.routeId)):C,this.stores.isLoading.setState(()=>!1),this.stores.loadedAt.setState(()=>Date.now()),E&&(this.stores.setActiveMatches(T),this.stores.setPendingMatches([]),this.stores.setCachedMatches([...this.stores.cachedMatchesSnapshot.state,...x.filter(D=>D.status!=="error"&&D.status!=="notFound"&&D.status!=="redirected")]),this.clearExpiredCache())});for(const[T,E]of[[b,"onLeave"],[w,"onEnter"],[N,"onStay"]])if(T)for(const C of T)(A=(O=this.looseRoutesById[C.routeId].options)[E])==null||A.call(O,C)})})}})}catch(p){Ur(p)?(n=p,this.navigate({...n.options,replace:!0,ignoreBlocker:!0})):_r(p)&&(i=p);const y=n?n.status:i?404:this.stores.activeMatchesSnapshot.state.some(g=>g.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.setState(()=>y),this.stores.redirect.setState(()=>n)})}this.latestLoadPromise===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(No(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&&Mh(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 b_({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(Ur(f))return f.options.reloadDocument?void 0:await this.preloadRoute({...f.options,_fromLocation:n});_r(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=mz(l.pathname,(n==null?void 0:n.caseSensitive)??!1,(n==null?void 0:n.fuzzy)??!1,o.pathname,this.processedTree);return!c||r.params&&!Xs(c.rawParams,r.params,{partial:!0})?!1:(n==null?void 0:n.includeSearch)??!0?Xs(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??Rz,parseSearch:e.parseSearch??Mz,protocolAllowlist:e.protocolAllowlist??oz}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.state}setRoutes({routesById:e,routesByPath:t,processedTree:r}){this.routesById=e,this.routesByPath=t,this.processedTree=r;const n=this.options.notFoundRoute;n&&(n.init({originalIndex:99999999999}),this.routesById[n.id]=n)}get looseRoutesById(){return this.routesById}getParentContext(e){return e!=null&&e.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){var y,g;const r=this.getMatchedRoutes(e.pathname),{foundRoute:n,routeParams:i,parsedParams:l}=r;let{matchedRoutes:o}=r,c=!1;(n?n.path!=="/"&&i["**"]:Wi(e.pathname))&&(this.options.notFoundRoute?o=[...o,this.options.notFoundRoute]:c=!0);const f=c?t8(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 b=o[x],w=h[x-1];let N,O,A;{const ne=(w==null?void 0:w.search)??e.search,z=(w==null?void 0:w._strictSearch)??void 0;try{const H=wh(b.options.validateSearch,{...ne})??void 0;N={...ne,...H},O={...z,...H},A=void 0}catch(H){let Z=H;if(H instanceof kh||(Z=new kh(H.message,{cause:H})),t!=null&&t.throwOnError)throw Z;N=ne,O={},A=Z}}const T=((g=(y=b.options).loaderDeps)==null?void 0:g.call(y,{search:N}))??"",E=T?JSON.stringify(T):"",{interpolatedPath:C,usedParams:M}=h_({path:b.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),R=b.id+C+E,D=this.getMatch(R),L=p.get(b.id),k=(D==null?void 0:D._strictParams)??M;let F;if(!D)try{O_(b,M,l,k)}catch(ne){if(_r(ne)||Ur(ne)?F=ne:F=new Xz(ne.message,{cause:ne}),t!=null&&t.throwOnError)throw F}Object.assign(i,k);const q=L?"stay":"enter";let ie;if(D)ie={...D,cause:q,params:(L==null?void 0:L.params)??i,_strictParams:k,search:Os(L?L.search:D.search,N),_strictSearch:O};else{const ne=b.options.loader||b.options.beforeLoad||b.lazyFn||F2(b)?"pending":"success";ie={id:R,ssr:b.options.ssr,index:x,routeId:b.id,params:(L==null?void 0:L.params)??i,_strictParams:k,pathname:C,updatedAt:Date.now(),search:L?Os(L.search,N):N,_strictSearch:O,searchError:void 0,status:ne,isFetching:!1,error:void 0,paramsError:F,__routeContext:void 0,_nonReactive:{loadPromise:qo()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:q,loaderDeps:L?Ba(L.loaderDeps,T):T,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:b.options.staticData||{},fullPath:b.fullPath}}t!=null&&t.preload||(ie.globalNotFound=f===b.id),ie.searchError=A;const ee=this.getParentContext(w);ie.context={...ee,...ie.__routeContext,...ie.__beforeLoadContext},h[x]=ie}for(let x=0;x<h.length;x++){const b=h[x],w=this.looseRoutesById[b.routeId],N=this.getMatch(b.id),O=p.get(b.routeId);if(b.params=O?Os(O.params,i):i,!N){const A=h[x-1],T=this.getParentContext(A);if(w.options.context){const E={deps:b.loaderDeps,params:b.params,context:T??{},location:e,navigate:C=>this.navigate({...C,_fromLocation:e}),buildLocation:this.buildLocation,cause:b.cause,abortController:b.abortController,preload:!!b.preload,matches:h,routeId:w.id};b.__routeContext=w.options.context(E)??void 0}b.context={...T,...b.__routeContext,...b.__beforeLoadContext}}}return h}matchRoutesLightweight(e){var p;const{matchedRoutes:t,routeParams:r,parsedParams:n}=this.getMatchedRoutes(e.pathname),i=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 g of t)try{O_(g,r,n??{},y)}catch{}h=y}return{matchedRoutes:t,fullPath:i.fullPath,search:l,params:h}}},kh=class extends Error{},Xz=class extends Error{};function Wz(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 kh("Async validation not supported");if(r.issues)throw new kh(JSON.stringify(r.issues,void 0,2),{cause:r});return r.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function Zz({pathname:e,routesById:t,processedTree:r}){const n=Object.create(null),i=Wi(e);let l,o;const c=pz(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 Jz({search:e,dest:t,destRoutes:r,_includeValidateSearch:n}){return e8(r)(e,t,n??!1)}function e8(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,g)=>g(y),c));const p=f(h);return"postSearchFilters"in l.options&&l.options.postSearchFilters?l.options.postSearchFilters.reduce((y,g)=>g(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:Yi(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 t8(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 Ws}function O_(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 r8="Error preloading route! ☝️",H2=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=Ws:this.parentRoute||Fa();let i=n?Ws:r==null?void 0:r.path;i&&i!=="/"&&(i=L2(i));const l=(r==null?void 0:r.id)||i;let o=n?Ws:bh([this.parentRoute.id==="__root__"?"":this.parentRoute.id,l]);i==="__root__"&&(i="/"),o!=="__root__"&&(o=bh(["/",o]));const c=o==="__root__"?"/":bh([this.parentRoute.fullPath,i]);this._path=i,this._id=o,this._fullPath=c,this._to=Wi(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=>Iz({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.")}},n8=class extends H2{constructor(e){super(e)}};function a8(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 Bb(e){const t=e.errorComponent??Ub;return d.jsx(i8,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:r,reset:n})=>r?S.createElement(t,{error:r,reset:n}):e.children})}var i8=class extends S.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e){return{resetKey:e.getResetKey()}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidUpdate(e,t){t.error&&t.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}};function Ub({error:e}){const[t,r]=S.useState(!1);return d.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[d.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[d.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),d.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>r(n=>!n),children:t?"Hide Error":"Show Error"})]}),d.jsx("div",{style:{height:".25rem"}}),t?d.jsx("div",{children:d.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?d.jsx("code",{children:e.message}):null})}):null]})}function s8({children:e,fallback:t=null}){return K2()?d.jsx(Bo.Fragment,{children:e}):d.jsx(Bo.Fragment,{children:t})}function K2(){return Bo.useSyncExternalStore(l8,()=>!0,()=>!1)}function l8(){return()=>{}}var G2=S.createContext(null);function gr(e){return S.useContext(G2)}var Lm=S.createContext(void 0),o8=S.createContext(void 0),ht=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(ht||{});function u8({update:e,notify:t,unwatched:r}){return{link:n,unlink:i,propagate:l,checkDirty:o,shallowPropagate:c};function n(h,p,y){const g=p.depsTail;if(g!==void 0&&g.dep===h)return;const x=g!==void 0?g.nextDep:p.deps;if(x!==void 0&&x.dep===h){x.version=y,p.depsTail=x;return}const b=h.subsTail;if(b!==void 0&&b.version===y&&b.sub===p)return;const w=p.depsTail=h.subsTail={version:y,dep:h,sub:p,prevDep:g,nextDep:x,prevSub:b,nextSub:void 0};x!==void 0&&(x.prevDep=w),g!==void 0?g.nextDep=w:p.deps=w,b!==void 0?b.nextSub=w:h.subs=w}function i(h,p=h.sub){const y=h.dep,g=h.prevDep,x=h.nextDep,b=h.nextSub,w=h.prevSub;return x!==void 0?x.prevDep=g:p.depsTail=g,g!==void 0?g.nextDep=x:p.deps=x,b!==void 0?b.prevSub=w:y.subsTail=w,w!==void 0?w.nextSub=b:(y.subs=b)===void 0&&r(y),x}function l(h){let p=h.nextSub,y;e:do{const g=h.sub;let x=g.flags;if(x&60?x&12?x&4?!(x&48)&&f(h,g)?(g.flags=x|40,x&=1):x=0:g.flags=x&-9|32:x=0:g.flags=x|32,x&2&&t(g),x&1){const b=g.subs;if(b!==void 0){const w=(h=b).nextSub;w!==void 0&&(y={value:p,prev:y},p=w);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,g=0,x=!1;e:do{const b=h.dep,w=b.flags;if(p.flags&16)x=!0;else if((w&17)===17){if(e(b)){const N=b.subs;N.nextSub!==void 0&&c(N),x=!0}}else if((w&33)===33){(h.nextSub!==void 0||h.prevSub!==void 0)&&(y={value:h,prev:y}),h=b.deps,p=b,++g;continue}if(!x){const N=h.nextDep;if(N!==void 0){h=N;continue}}for(;g--;){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 A=h.nextDep;if(A!==void 0){h=A;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 qb(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 Ex=[];let Sh=0;const{link:__,unlink:c8,propagate:d8,checkDirty:Y2,shallowPropagate:E_}=u8({update(e){return e._update()},notify(e){Ex[Ax++]=e,e.flags&=~ht.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=ht.Mutable|ht.Dirty,Ih(e))}});let Jf=0,Ax=0,Jn,Cx=0;function V2(e){try{++Cx,e()}finally{--Cx||Q2()}}function Ih(e){const t=e.depsTail;let r=t!==void 0?t.nextDep:e.deps;for(;r!==void 0;)r=c8(r,e)}function Q2(){if(!(Cx>0)){for(;Jf<Ax;){const e=Ex[Jf];Ex[Jf++]=void 0,e.notify()}Jf=0,Ax=0}}function X2(e,t){const r=typeof e=="function",n=e,i={_snapshot:r?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:r?ht.None:ht.Mutable,get(){return Jn!==void 0&&__(i,Jn,Sh),i._snapshot},subscribe(l){const o=qb(l),c={current:!1},f=f8(()=>{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=Jn,c=Object.is;if(r)Jn=i,++Sh,i.depsTail=void 0;else if(l===void 0)return!1;r&&(i.flags=ht.Mutable|ht.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{Jn=o,r&&(i.flags&=~ht.RecursedCheck),Ih(i)}}};return r?(i.flags=ht.Mutable|ht.Dirty,i.get=function(){const l=i.flags;if(l&ht.Dirty||l&ht.Pending&&Y2(i.deps,i)){if(i._update()){const o=i.subs;o!==void 0&&E_(o)}}else l&ht.Pending&&(i.flags=l&~ht.Pending);return Jn!==void 0&&__(i,Jn,Sh),i._snapshot}):i.set=function(l){if(i._update(l)){const o=i.subs;o!==void 0&&(d8(o),E_(o),Q2())}},i}function f8(e){const t=()=>{const n=Jn;Jn=r,++Sh,r.depsTail=void 0,r.flags=ht.Watching|ht.RecursedCheck;try{return e()}finally{Jn=n,r.flags&=~ht.RecursedCheck,Ih(r)}},r={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:ht.Watching|ht.RecursedCheck,notify(){const n=this.flags;n&ht.Dirty||n&ht.Pending&&Y2(this.deps,this)?t():this.flags=ht.Watching},stop(){this.flags=ht.None,this.depsTail=void 0,Ih(this)}};return t(),r}class h8{constructor(t){this.atom=X2(t)}setState(t){this.atom.set(t)}get state(){return this.atom.get()}get(){return this.state}subscribe(t){return this.atom.subscribe(qb(t))}}class m8{constructor(t){this.atom=X2(t)}get state(){return this.atom.get()}get(){return this.state}subscribe(t){return this.atom.subscribe(qb(t))}}function A_(e){return typeof e=="function"?new m8(e):new h8(e)}var yv={exports:{}},gv={},vv={exports:{}},xv={};/**
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 C_;function p8(){if(C_)return xv;C_=1;var e=ru();function t(y,g){return y===g&&(y!==0||1/y===1/g)||y!==y&&g!==g}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,i=e.useEffect,l=e.useLayoutEffect,o=e.useDebugValue;function c(y,g){var x=g(),b=n({inst:{value:x,getSnapshot:g}}),w=b[0].inst,N=b[1];return l(function(){w.value=x,w.getSnapshot=g,f(w)&&N({inst:w})},[y,x,g]),i(function(){return f(w)&&N({inst:w}),y(function(){f(w)&&N({inst:w})})},[y]),o(x),x}function f(y){var g=y.getSnapshot;y=y.value;try{var x=g();return!r(y,x)}catch{return!0}}function h(y,g){return g()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:c;return xv.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,xv}var T_;function y8(){return T_||(T_=1,vv.exports=p8()),vv.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 P_;function g8(){if(P_)return gv;P_=1;var e=ru(),t=y8();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 gv.useSyncExternalStoreWithSelector=function(h,p,y,g,x){var b=l(null);if(b.current===null){var w={hasValue:!1,value:null};b.current=w}else w=b.current;b=c(function(){function O(M){if(!A){if(A=!0,T=M,M=g(M),x!==void 0&&w.hasValue){var R=w.value;if(x(R,M))return E=R}return E=M}if(R=E,n(T,M))return R;var D=g(M);return x!==void 0&&x(R,D)?(T=M,R):(T=M,E=D)}var A=!1,T,E,C=y===void 0?null:y;return[function(){return O(p())},C===null?void 0:function(){return O(C())}]},[p,y,g,x]);var N=i(h,b[0],b[1]);return o(function(){w.hasValue=!0,w.value=N},[N]),f(N),N},gv}var M_;function v8(){return M_||(M_=1,yv.exports=g8()),yv.exports}var W2=v8();function x8(e,t){return e===t}function cr(e,t,r=x8){const n=S.useCallback(o=>{if(!e)return()=>{};const{unsubscribe:c}=e.subscribe(o);return c},[e]),i=S.useCallback(()=>e==null?void 0:e.get(),[e]);return W2.useSyncExternalStoreWithSelector(n,i,i,t,r)}var b8={state:void 0,get:()=>{},subscribe:()=>()=>{}};function hl(e){const t=gr(),r=S.useContext(e.from?o8:Lm),n=e.from??r,i=n?e.from?t.stores.getMatchStoreByRouteId(n):t.stores.activeMatchStoresById.get(n):void 0,l=S.useRef(void 0);return cr(i??b8,o=>{if((e.shouldThrow??!0)&&!o&&Fa(),o===void 0)return;const c=e.select?e.select(o):o;if(e.structuralSharing??t.options.defaultStructuralSharing){const f=Ba(l.current,c);return l.current=f,f}return c})}function Z2(e){return hl({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function J2(e){const{select:t,...r}=e;return hl({...r,select:n=>t?t(n.loaderDeps):n.loaderDeps})}function eM(e){return hl({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 tM(e){return hl({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function ml(e){const t=gr();return S.useCallback(r=>t.navigate({...r,from:r.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,t])}function rM(e){return hl({...e,select:t=>e.select?e.select(t.context):t.context})}var $m=g2();function j8(e,t){const r=gr(),n=nz(t),{activeProps:i,inactiveProps:l,activeOptions:o,to:c,preload:f,preloadDelay:h,hashScrollIntoView:p,replace:y,startTransition:g,resetScroll:x,viewTransition:b,children:w,target:N,disabled:O,style:A,className:T,onClick:E,onBlur:C,onFocus:M,onMouseEnter:R,onMouseLeave:D,onTouchStart:L,ignoreBlocker:k,params:F,search:q,hash:ie,state:ee,mask:ne,reloadDocument:z,unsafeRelative:H,from:Z,_fromLocation:ae,...le}=e,I=K2(),Q=S.useMemo(()=>e,[r,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),oe=cr(r.stores.location,Me=>Me,(Me,fr)=>Me.href===fr.href),se=S.useMemo(()=>{const Me={_fromLocation:oe,...Q};return r.buildLocation(Me)},[r,oe,Q]),fe=se.maskedLocation?se.maskedLocation.publicHref:se.publicHref,xe=se.maskedLocation?se.maskedLocation.external:se.external,Se=S.useMemo(()=>E8(fe,xe,r.history,O),[O,xe,fe,r.history]),Re=S.useMemo(()=>{if(Se!=null&&Se.external)return Mh(Se.href,r.protocolAllowlist)?void 0:Se.href;if(!A8(c)&&!(typeof c!="string"||c.indexOf(":")===-1))try{return new URL(c),Mh(c,r.protocolAllowlist)?void 0:c}catch{}},[c,Se,r.protocolAllowlist]),ce=S.useMemo(()=>{if(Re)return!1;if(o!=null&&o.exact){if(!jz(oe.pathname,se.pathname,r.basepath))return!1}else{const Me=Rh(oe.pathname,r.basepath),fr=Rh(se.pathname,r.basepath);if(!(Me.startsWith(fr)&&(Me.length===fr.length||Me[fr.length]==="/")))return!1}return((o==null?void 0:o.includeSearch)??!0)&&!Xs(oe.search,se.search,{partial:!(o!=null&&o.exact),ignoreUndefined:!(o!=null&&o.explicitUndefined)})?!1:o!=null&&o.includeHash?I&&oe.hash===se.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,Re,I,se.hash,se.pathname,se.search,r.basepath]),de=ce?Yi(i,{})??w8:bv,Oe=ce?bv:Yi(l,{})??bv,ue=[T,de.className,Oe.className].filter(Boolean).join(" "),gt=(A||de.style||Oe.style)&&{...A,...de.style,...Oe.style},[Pe,vt]=S.useState(!1),xt=S.useRef(!1),Ht=e.reloadDocument||Re?!1:f??r.options.defaultPreload,he=h??r.options.defaultPreloadDelay??0,_t=S.useCallback(()=>{r.preloadRoute({...Q,_builtLocation:se}).catch(Me=>{console.warn(Me),console.warn(r8)})},[r,Q,se]);rz(n,S.useCallback(Me=>{Me!=null&&Me.isIntersecting&&_t()},[_t]),_8,{disabled:!!O||Ht!=="viewport"}),S.useEffect(()=>{xt.current||!O&&Ht==="render"&&(_t(),xt.current=!0)},[O,_t,Ht]);const hu=Me=>{const fr=Me.currentTarget.getAttribute("target"),Kn=N!==void 0?N:fr;if(!O&&!C8(Me)&&!Me.defaultPrevented&&(!Kn||Kn==="_self")&&Me.button===0){Me.preventDefault(),$m.flushSync(()=>{vt(!0)});const Pd=r.subscribe("onResolved",()=>{Pd(),vt(!1)});r.navigate({...Q,replace:y,resetScroll:x,hashScrollIntoView:p,startTransition:g,viewTransition:b,ignoreBlocker:k})}};if(Re)return{...le,ref:n,href:Re,...w&&{children:w},...N&&{target:N},...O&&{disabled:O},...A&&{style:A},...T&&{className:T},...E&&{onClick:E},...C&&{onBlur:C},...M&&{onFocus:M},...R&&{onMouseEnter:R},...D&&{onMouseLeave:D},...L&&{onTouchStart:L}};const Sl=Me=>{if(O||Ht!=="intent")return;if(!he){_t();return}const fr=Me.currentTarget;if(fc.has(fr))return;const Kn=setTimeout(()=>{fc.delete(fr),_t()},he);fc.set(fr,Kn)},Up=Me=>{O||Ht!=="intent"||_t()},Td=Me=>{if(O||!Ht||!he)return;const fr=Me.currentTarget,Kn=fc.get(fr);Kn&&(clearTimeout(Kn),fc.delete(fr))};return{...le,...de,...Oe,href:Se==null?void 0:Se.href,ref:n,onClick:oo([E,hu]),onBlur:oo([C,Td]),onFocus:oo([M,Sl]),onMouseEnter:oo([R,Sl]),onMouseLeave:oo([D,Td]),onTouchStart:oo([L,Up]),disabled:!!O,target:N,...gt&&{style:gt},...ue&&{className:ue},...O&&S8,...ce&&N8,...I&&Pe&&O8}}var bv={},w8={className:"active"},S8={role:"link","aria-disabled":!0},N8={"data-status":"active","aria-current":"page"},O8={"data-transitioning":"transitioning"},fc=new WeakMap,_8={rootMargin:"100px"},oo=e=>t=>{for(const r of e)if(r){if(t.defaultPrevented)return;r(t)}};function E8(e,t,r,n){if(!n)return t?{href:e,external:!0}:{href:r.createHref(e)||"/",external:!1}}function A8(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var _e=S.forwardRef((e,t)=>{const{_asChild:r,...n}=e,{type:i,...l}=j8(n,t),o=typeof n.children=="function"?n.children({isActive:l["data-status"]==="active"}):n.children;if(!r){const{disabled:c,...f}=l;return S.createElement("a",f,o)}return S.createElement(r,l,o)});function C8(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var T8=class extends H2{constructor(t){super(t),this.useMatch=r=>hl({select:r==null?void 0:r.select,from:this.id,structuralSharing:r==null?void 0:r.structuralSharing}),this.useRouteContext=r=>rM({...r,from:this.id}),this.useSearch=r=>tM({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useParams=r=>eM({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useLoaderDeps=r=>J2({...r,from:this.id}),this.useLoaderData=r=>Z2({...r,from:this.id}),this.useNavigate=()=>ml({from:this.fullPath}),this.Link=Bo.forwardRef((r,n)=>d.jsx(_e,{ref:n,from:this.fullPath,...r}))}};function P8(e){return new T8(e)}var M8=class extends n8{constructor(e){super(e),this.useMatch=t=>hl({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>rM({...t,from:this.id}),this.useSearch=t=>tM({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>eM({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>J2({...t,from:this.id}),this.useLoaderData=t=>Z2({...t,from:this.id}),this.useNavigate=()=>ml({from:this.fullPath}),this.Link=Bo.forwardRef((t,r)=>d.jsx(_e,{ref:r,from:this.fullPath,...t}))}};function R8(e){return new M8(e)}function Cr(e){return typeof e=="object"?new R_(e,{silent:!0}).createRoute(e):new R_(e,{silent:!0}).createRoute}var R_=class{constructor(e,t){this.path=e,this.createRoute=r=>{const n=P8(r);return n.isRoot=!1,n},this.silent=t==null?void 0:t.silent}};function D8(e){const t=gr(),r=`not-found-${cr(t.stores.location,n=>n.pathname)}-${cr(t.stores.status,n=>n)}`;return d.jsx(Bb,{getResetKey:()=>r,onCatch:(n,i)=>{var l;if(_r(n))(l=e.onCatch)==null||l.call(e,n,i);else throw n},errorComponent:({error:n})=>{var i;if(_r(n))return(i=e.fallback)==null?void 0:i.call(e,n);throw n},children:e.children})}function k8(){return d.jsx("p",{children:"Not Found"})}function xo(e){return d.jsx(d.Fragment,{children:e.children})}function nM(e,t,r){return t.options.notFoundComponent?d.jsx(t.options.notFoundComponent,{...r}):e.options.defaultNotFoundComponent?d.jsx(e.options.defaultNotFoundComponent,{...r}):d.jsx(k8,{})}function I8(e){return null}function L8(){return I8(gr()),null}var aM=S.memo(function({matchId:t}){const r=gr(),n=r.stores.activeMatchStoresById.get(t);n||Fa();const i=cr(r.stores.loadedAt,o=>o),l=cr(n,o=>o);return d.jsx($8,{router:r,matchId:t,resetKey:i,matchState:S.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 $8({router:e,matchId:t,resetKey:r,matchState:n}){var b,w;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??((b=e.options.notFoundRoute)==null?void 0:b.options.component):i.options.notFoundComponent,p=n.ssr===!1||n.ssr==="data-only",y=(!i.isRoot||i.options.wrapInSuspense||p)&&(i.options.wrapInSuspense??l??(((w=i.options.errorComponent)==null?void 0:w.preload)||p))?S.Suspense:xo,g=c?Bb:xo,x=h?D8:xo;return d.jsxs(i.isRoot?i.options.shellComponent??xo:xo,{children:[d.jsx(Lm.Provider,{value:t,children:d.jsx(y,{fallback:o,children:d.jsx(g,{getResetKey:()=>r,errorComponent:c||Ub,onCatch:(N,O)=>{if(_r(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 S.createElement(h,N)},children:p||n._displayPending?d.jsx(s8,{fallback:o,children:d.jsx(D_,{matchId:t})}):d.jsx(D_,{matchId:t})})})})}),n.parentRouteId===Ws?d.jsxs(d.Fragment,{children:[d.jsx(z8,{resetKey:r}),e.options.scrollRestoration&&D2?d.jsx(L8,{}):null]}):null]})}function z8({resetKey:e}){const t=gr(),r=S.useRef(void 0);return Oc(()=>{const n=t.latestLocation.href;(r.current===void 0||r.current!==n)&&(t.emit({type:"onRendered",...No(t.stores.location.state,t.stores.resolvedLocation.state)}),r.current=n)},[t.latestLocation.state.__TSR_key,e,t]),null}var D_=S.memo(function({matchId:t}){var h,p,y,g;const r=gr(),n=r.stores.activeMatchStoresById.get(t);n||Fa();const i=cr(n,x=>x),l=i.routeId,o=r.routesById[l],c=S.useMemo(()=>{var b;const x=(b=r.routesById[l].options.remountDeps??r.options.defaultRemountDeps)==null?void 0:b({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=S.useMemo(()=>{const x=o.options.component??r.options.defaultComponent;return x?d.jsx(x,{},c):d.jsx(iM,{})},[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 b=r.getMatch(i.id);if(b&&!b._nonReactive.minPendingPromise){const w=qo();b._nonReactive.minPendingPromise=w,setTimeout(()=>{w.resolve(),b._nonReactive.minPendingPromise=void 0},x)}}throw(y=r.getMatch(i.id))==null?void 0:y._nonReactive.loadPromise}if(i.status==="notFound")return _r(i.error)||Fa(),nM(r,o,i.error);if(i.status==="redirected")throw Ur(i.error)||Fa(),(g=r.getMatch(i.id))==null?void 0:g._nonReactive.loadPromise;if(i.status==="error")throw i.error;return f}),iM=S.memo(function(){const t=gr(),r=S.useContext(Lm);let n,i=!1,l;{const h=r?t.stores.activeMatchStoresById.get(r):void 0;[n,i]=cr(h,p=>[p==null?void 0:p.routeId,(p==null?void 0:p.globalNotFound)??!1]),l=cr(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||Fa(),nM(t,o,void 0);if(!l)return null;const f=d.jsx(aM,{matchId:l});return n===Ws?d.jsx(S.Suspense,{fallback:c,children:f}):f});function B8(){const e=gr(),t=S.useRef({router:e,mounted:!1}),[r,n]=S.useState(!1),i=cr(e.stores.isLoading,y=>y),l=cr(e.stores.hasPendingMatches,y=>y),o=ov(i),c=i||r||l,f=ov(c),h=i||l,p=ov(h);return e.startTransition=y=>{n(!0),S.startTransition(()=>{y(),n(!1)})},S.useEffect(()=>{const y=e.history.subscribe(e.load),g=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Wi(e.latestLocation.publicHref)!==Wi(g.publicHref)&&e.commitLocation({...g,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(g){console.error(g)}})()},[e]),Oc(()=>{o&&!i&&e.emit({type:"onLoad",...No(e.stores.location.state,e.stores.resolvedLocation.state)})},[o,e,i]),Oc(()=>{p&&!h&&e.emit({type:"onBeforeRouteMount",...No(e.stores.location.state,e.stores.resolvedLocation.state)})},[h,p,e]),Oc(()=>{if(f&&!c){const y=No(e.stores.location.state,e.stores.resolvedLocation.state);e.emit({type:"onResolved",...y}),V2(()=>{e.stores.status.setState(()=>"idle"),e.stores.resolvedLocation.setState(()=>e.stores.location.state)}),y.hrefChanged&&a8(e)}},[c,f,e]),null}function U8(){const e=gr(),t=e.routesById[Ws].options.pendingComponent??e.options.defaultPendingComponent,r=t?d.jsx(t,{}):null,n=d.jsxs(typeof document<"u"&&e.ssr?xo:S.Suspense,{fallback:r,children:[d.jsx(B8,{}),d.jsx(q8,{})]});return e.options.InnerWrap?d.jsx(e.options.InnerWrap,{children:n}):n}function q8(){const e=gr(),t=cr(e.stores.firstMatchId,i=>i),r=cr(e.stores.loadedAt,i=>i),n=t?d.jsx(aM,{matchId:t}):null;return d.jsx(Lm.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?n:d.jsx(Bb,{getResetKey:()=>r,errorComponent:Ub,onCatch:void 0,children:n})})}function F8(){const e=gr();return cr(e.stores.matchRouteReactivity,t=>t),S.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 H8(e){const t=gr(),r=S.useRef(void 0);return cr(t.stores.activeMatchesSnapshot,n=>{const i=n;if(t.options.defaultStructuralSharing){const l=Ba(r.current,i);return r.current=l,l}return i})}var K8=e=>({createMutableStore:A_,createReadonlyStore:A_,batch:V2}),G8=e=>new Y8(e),Y8=class extends Qz{constructor(e){super(e,K8)}};function V8({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(G2.Provider,{value:e,children:t});return e.options.Wrap?d.jsx(e.options.Wrap,{children:n}):n}function Q8({router:e,...t}){return d.jsx(V8,{router:e,...t,children:d.jsx(U8,{})})}function Fb(e){const r=gr();return S.useRef(void 0),cr(r.stores.__store,n=>n)}function sM(e){const t=gr(),r=S.useRef(void 0);return cr(t.stores.location,n=>{const i=n;if(t.options.defaultStructuralSharing){const l=Ba(r.current,i);return r.current=l,l}return i})}const lM=S.createContext({isOpen:!1,toggle:()=>{},close:()=>{}});function X8({children:e}){const[t,r]=S.useState(!1),n=S.useCallback(()=>r(o=>!o),[]),i=S.useCallback(()=>r(!1),[]),l=S.useMemo(()=>({isOpen:t,toggle:n,close:i}),[i,t,n]);return d.jsx(lM.Provider,{value:l,children:e})}function oM(){return S.useContext(lM)}function uM(e){if(!e)return;const t=new Date(e);if(!Number.isNaN(t.getTime()))return t.toLocaleString()}function W8(e){const t=uM(e);return t?`Last synced ${t}`:"Never synced"}function Hb(e){return typeof e!="number"||!Number.isFinite(e)?"Remote runs unknown":`${e} remote run${e===1?"":"s"}`}function cM(e,t,r){const n=r?` (${r})`:"";return`${e} of ${t} run${t===1?"":"s"} on remote${n}`}function Z8(e,t,r){return(e==null?void 0:e.configured)!==!0?[]:[t?`Project: ${t}`:void 0,r??Hb(e.run_count),W8(e.last_synced_at),e.repo?`Repo: ${e.repo}`:void 0].filter(n=>n!==void 0)}function J8(e){return(e==null?void 0:e.sync_status)==="syncing"}function eB(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==="push_conflict"?{state:"push_conflict",label:"Push conflict",actionLabel:"Sync Project",tone:"danger",summary:e.block_reason??"The remote results branch changed before local results could be pushed.",nextAction:e.push_conflict_policy==="backup_and_force_push"?"Sync stopped before changing the results branch. Refresh status, then retry if this server should replace the remote branch.":"Sync stopped before changing the results branch. Opt in to backup_and_force_push only if this server should replace the remote branch.",canSync:!1}:r==="conflicted"||r==="diverged"?{state:"conflicted",label:"Conflicted",actionLabel:"Sync Project",tone:"danger",summary:e.block_reason??(r==="diverged"?"Local and remote results histories have diverged.":"The results repo has unresolved conflicts."),nextAction:"Resolve the results repo conflicts manually, then sync the project again.",canSync:!1}:r==="dirty"?{state:"dirty",label:"Dirty",actionLabel:"Sync Metadata",tone:"warn",summary:e.block_reason??"Local result metadata has pending edits.",nextAction:e.auto_push===!0?"Sync Project will commit safe result metadata changes before syncing.":"Review or commit the pending result metadata; no reset will be performed.",canSync:!0}:r==="behind"?{state:"behind",label:"Behind",actionLabel:"Sync Project",tone:"info",summary:`Remote has ${e.behind??0} commit${e.behind===1?"":"s"} to pull.`,nextAction:"Sync Project will fast-forward when possible.",canSync:!0}:r==="ahead"?{state:"ahead",label:"Ahead",actionLabel:"Push Results",tone:"info",summary:`Local results are ${e.ahead??0} commit${e.ahead===1?"":"s"} ahead.`,nextAction:e.auto_push===!0?"Sync Project will push safe result changes.":"Enable auto_push or push the results repo manually.",canSync:!0}:{state:"clean",label:"Clean",actionLabel:"Sync Project",tone:"good",summary:"Local and remote result metadata are in sync.",canSync:!0}}function tB(e){return typeof e!="number"||!Number.isFinite(e)?"remote results":Hb(e)}function k_(e){const t=[`Synced ${tB(e.run_count)}`];e.repo&&t.push(`from ${e.repo}`);const r=uM(e.last_synced_at);return r&&t.push(`at ${r}`),`${t.join(" ")}.`}function rB(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 ${Hb(t)} ${t===1?"remains":"remain"} available.`:"The remote results cache remains available."}function Kb(e){return[rB(e),"Resolve the results repo issue, then sync remote results again."].filter(t=>t!==void 0).join(" ")}function dM(e){if(e.blocked||e.sync_status==="conflicted"||e.sync_status==="diverged"||e.sync_status==="push_conflict"){const r=e.repo?` for ${e.repo}`:"",n=e.block_reason??"Sync stopped before changing the results repo.";return{kind:"warning",message:`Sync stopped${r}: ${n}. ${Kb(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?`${k_(e)} Sync completed: ${t.join(", ")}.`:`${k_(e)} Project results were already up to date.`}}function fM(e,t){return{kind:"error",message:`Sync failed: ${e instanceof Error?e.message:String(e)}. ${Kb(t)}`}}async function Ye(e){const t=await fetch(e);if(!t.ok)throw new Error(`API error: ${t.status} ${t.statusText}`);return t.json()}async function nB(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 aB=50;function hM(e,t){const r=new URLSearchParams({limit:String(aB)});return t&&r.set("cursor",t),`${e}?${r.toString()}`}function mM(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 I_(e){return e.split("/").filter(t=>t.length>0).map(t=>encodeURIComponent(t)).join("/")}function jo(e){const t=e.projectId?`${st(e.projectId)}/runs/${encodeURIComponent(e.runId)}/evals/${encodeURIComponent(e.evalId)}/files/${I_(e.filePath)}`:`/api/runs/${encodeURIComponent(e.runId)}/evals/${encodeURIComponent(e.evalId)}/files/${I_(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 Gb={queryKey:["runs"],queryFn:()=>Ye("/api/runs"),refetchInterval:5e3},iB={queryKey:["runs","infinite"],initialPageParam:void 0,queryFn:({pageParam:e})=>Ye(hM("/api/runs",e)),getNextPageParam:e=>e.next_cursor,refetchInterval:5e3};function sB(e){return{queryKey:["runs",e],queryFn:()=>Ye(`/api/runs/${encodeURIComponent(e)}`),enabled:!!e}}function lB(e,t){const r=t?`${st(t)}/runs/${encodeURIComponent(e)}/log`:`/api/runs/${encodeURIComponent(e)}/log`;return{queryKey:["runs",e,"log",t??""],queryFn:()=>nB(r),enabled:!!e,refetchInterval:3e3}}function oB(e,t){return He(lB(e,t))}function uB(e){const t=e?`${st(e)}/feedback`:"/api/feedback";return{queryKey:["feedback",e??""],queryFn:()=>Ye(t)}}const pM={queryKey:["experiments"],queryFn:()=>Ye("/api/experiments")};function cB(e){return{queryKey:["compare","baseline",e??""],queryFn:()=>Ye(`/api/compare?baseline=${encodeURIComponent(e??"")}`),enabled:!!e}}const dB={queryKey:["compare"],queryFn:()=>Ye("/api/compare")},fB={queryKey:["targets"],queryFn:()=>Ye("/api/targets")};function hB(e,t){return{queryKey:["runs",e,"evals",t,"files"],queryFn:()=>Ye(`/api/runs/${encodeURIComponent(e)}/evals/${encodeURIComponent(t)}/files`),enabled:!!e&&!!t}}function mB(e,t,r){return{queryKey:["runs",e,"evals",t,"files",r],queryFn:()=>Ye(jo({runId:e,evalId:t,filePath:r})),enabled:!!e&&!!t&&!!r}}function pB(e,t){return{queryKey:["runs",e,"evals",t,"transcript"],queryFn:()=>Ye(`/api/runs/${encodeURIComponent(e)}/evals/${encodeURIComponent(t)}/transcript`),enabled:!!e&&!!t}}function yB(e,t){return{queryKey:["runs",e,"categories",t,"suites"],queryFn:()=>Ye(`/api/runs/${encodeURIComponent(e)}/categories/${encodeURIComponent(t)}/suites`),enabled:!!e&&!!t}}const gB={queryKey:["config"],queryFn:()=>Ye("/api/config"),staleTime:5e3};function Yb(e){const t=e?`${st(e)}/remote/status`:"/api/remote/status";return{queryKey:["remote-status",e??""],queryFn:()=>Ye(t),staleTime:5e3,refetchInterval:r=>J8(r.state.data)?1e3:!1}}function vB(){return He(Gb)}function xB(){var t;const e=R2(iB);return{...e,data:mM((t=e.data)==null?void 0:t.pages)}}function ld(e){return He(sB(e))}function yM(e){return He(uB(e))}function gM(){return He(pM)}function bB(){return He(dB)}function jB(e,t){return He(hB(e,t))}function wB(e,t,r){return He(mB(e,t,r))}function SB(e,t){return He(pB(e,t))}function vM(e,t){return He(yB(e,t))}function yt(e){return He(e?IB(e):gB)}function zm(e){return He(Yb(e))}const $c=.8,Bm="agentv";function nl(e,t=$c){return e>=t}const NB={queryKey:["projects"],queryFn:()=>Ye("/api/projects"),refetchInterval:1e4};function od(){return He(NB)}async function OB(e){const t=new URLSearchParams;e!=null&&e.trim()&&t.set("path",e.trim());const r=t.toString(),n=await fetch(`/api/filesystem/browse${r?`?${r}`:""}`);if(!n.ok){const l=await n.json().catch(()=>({error:n.statusText}));throw new Error(l.error??`Failed to browse folders: ${n.status}`)}const i=await n.json();return{path:i.path,parentPath:i.parent_path,current:{name:i.current.name,path:i.current.path,hasAgentv:i.current.has_agentv},entries:i.entries.map(l=>({name:l.name,path:l.path,hasAgentv:l.has_agentv}))}}async function _B(e){const t=await fetch("/api/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e})});if(!t.ok){const n=await t.json();throw new Error(n.error||`Failed to add project: ${t.status}`)}const r=await t.json();return{id:r.id,name:r.name,path:r.path,addedAt:r.added_at,lastOpenedAt:r.last_opened_at}}async function EB(e){const t=await fetch(`/api/projects/${encodeURIComponent(e)}`,{method:"DELETE"});if(!t.ok){const r=await t.json().catch(()=>({error:t.statusText}));throw new Error(r.error??`Failed to remove project: ${t.status}`)}}function st(e){return`/api/projects/${encodeURIComponent(e)}`}function Vb(e){return{queryKey:["projects",e,"runs"],queryFn:()=>Ye(`${st(e)}/runs`),enabled:!!e,refetchInterval:5e3}}function AB(e){return{queryKey:["projects",e,"runs","infinite"],initialPageParam:void 0,queryFn:({pageParam:t})=>Ye(hM(`${st(e)}/runs`,t)),getNextPageParam:t=>t.next_cursor,enabled:!!e,refetchInterval:5e3}}function CB(e){return He(Vb(e))}function TB(e){var r;const t=R2(AB(e));return{...t,data:mM((r=t.data)==null?void 0:r.pages)}}function PB(e,t){return{queryKey:["projects",e,"runs",t],queryFn:()=>Ye(`${st(e)}/runs/${encodeURIComponent(t)}`),enabled:!!e&&!!t}}function ud(e,t){return He(PB(e,t))}function xM(e,t,r){return{queryKey:["projects",e,"runs",t,"categories",r,"suites"],queryFn:()=>Ye(`${st(e)}/runs/${encodeURIComponent(t)}/categories/${encodeURIComponent(r)}/suites`),enabled:!!e&&!!t&&!!r}}function MB(e,t,r){return{queryKey:["projects",e,"runs",t,"evals",r,"files"],queryFn:()=>Ye(`${st(e)}/runs/${encodeURIComponent(t)}/evals/${encodeURIComponent(r)}/files`),enabled:!!e&&!!t&&!!r}}function RB(e,t,r,n){return{queryKey:["projects",e,"runs",t,"evals",r,"files",n],queryFn:()=>Ye(jo({projectId:e,runId:t,evalId:r,filePath:n})),enabled:!!e&&!!t&&!!r&&!!n}}function DB(e,t,r){return{queryKey:["projects",e,"runs",t,"evals",r,"transcript"],queryFn:()=>Ye(`${st(e)}/runs/${encodeURIComponent(t)}/evals/${encodeURIComponent(r)}/transcript`),enabled:!!e&&!!t&&!!r}}function Qb(e){return{queryKey:["projects",e,"experiments"],queryFn:()=>Ye(`${st(e)}/experiments`),enabled:!!e}}function bM(e,t){const r=`${st(e)}/compare`;return t?{queryKey:["projects",e,"compare","baseline",t],queryFn:()=>Ye(`${r}?baseline=${encodeURIComponent(t)}`),enabled:!!e}:{queryKey:["projects",e,"compare"],queryFn:()=>Ye(r),enabled:!!e}}function kB(e){return{queryKey:["projects",e,"targets"],queryFn:()=>Ye(`${st(e)}/targets`),enabled:!!e}}function IB(e){return{queryKey:["projects",e,"config"],queryFn:()=>Ye(`${st(e)}/config`),enabled:!!e,staleTime:5e3}}async function jM(e){const t=e?`${st(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 wM extends Error{constructor(t,r,n=[]){super(t),this.status=r,this.duplicates=n,this.name="CombineRunsApiError"}}async function L_(e,t,r,n,i){const l=r?`${st(r)}/runs/combine`:"/api/runs/combine",o=await fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({run_ids:e,duplicate_policy:t,...i!=null&&i.trim()?{experiment:i.trim()}:{}})});if(!o.ok){const c=await o.json().catch(()=>({error:o.statusText}));throw new wM(c.error??`Failed to combine runs: ${o.status}`,o.status,c.duplicates??[])}return o.json()}async function LB(e,t){const r=t?`${st(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 $B(e,t,r,n){const i=r?`${st(r)}/runs/${encodeURIComponent(e)}/tags`:`/api/runs/${encodeURIComponent(e)}/tags`,l=await fetch(i,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({tags:t,...n?{expected_tag_revision:n}:{}})});if(!l.ok){const o=await l.json().catch(()=>({error:l.statusText}));throw new Error(o.error??`Failed to save tags: ${l.status}`)}return l.json()}async function zB(e,t,r){const n=t?`${st(t)}/runs/${encodeURIComponent(e)}/tags`:`/api/runs/${encodeURIComponent(e)}/tags`,i=await fetch(n,{method:"DELETE",...r?{headers:{"Content-Type":"application/json"},body:JSON.stringify({expected_tag_revision:r})}:{}});if(!i.ok){const l=await i.json().catch(()=>({error:i.statusText}));throw new Error(l.error??`Failed to delete tags: ${i.status}`)}}async function BB(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 UB(e){const t=e?`${st(e)}/eval/discover`:"/api/eval/discover";return{queryKey:["eval-discover",e??""],queryFn:()=>Ye(t),staleTime:3e4}}function qB(e){return He(UB(e))}function FB(e){const t=e?`${st(e)}/eval/targets`:"/api/eval/targets";return{queryKey:["eval-targets",e??""],queryFn:()=>Ye(t),staleTime:3e4}}function HB(e){return He(FB(e))}async function SM(e,t){const r=t?`${st(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 KB(e,t){const r=t?`${st(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?`${st(t)}/eval/status/${e}`:`/api/eval/status/${e}`;return{queryKey:["eval-status",t??"",e],queryFn:()=>Ye(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 Xb(e,t){return He(GB(e,t))}function YB(e){const t=e?`${st(e)}/eval/runs`:"/api/eval/runs";return{queryKey:["eval-runs",e??""],queryFn:()=>Ye(t),refetchInterval:3e3}}function Wb(e){return He(YB(e))}async function VB(e,t){const r=t?`${st(t)}/eval/preview`:"/api/eval/preview",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!n.ok)throw new Error(`Preview failed: ${n.status}`);return n.json()}function QB(e){return`agentv.studio.initial-project-redirect:${e}`}function Zb(e,t){const r=`/projects/${encodeURIComponent(e)}`;return t?`${r}?tab=${encodeURIComponent(t)}`:r}function Ti(e,t){return t?`/projects/${encodeURIComponent(t)}/runs/${encodeURIComponent(e)}`:`/runs/${encodeURIComponent(e)}`}function $_(e,t,r){return r?`/projects/${encodeURIComponent(r)}/evals/${encodeURIComponent(e)}/${encodeURIComponent(t)}`:`/evals/${encodeURIComponent(e)}/${encodeURIComponent(t)}`}function z_(e,t){return t?`/projects/${encodeURIComponent(t)}/experiments/${encodeURIComponent(e)}`:`/experiments/${encodeURIComponent(e)}`}function B_(e,t){return t?`/projects/${encodeURIComponent(t)}/jobs/${encodeURIComponent(e)}`:`/jobs/${encodeURIComponent(e)}`}function U_(e,t,r){return r?`/projects/${encodeURIComponent(r)}/runs/${encodeURIComponent(e)}/category/${encodeURIComponent(t)}`:`/runs/${encodeURIComponent(e)}/category/${encodeURIComponent(t)}`}function q_(e,t,r){return r?`/projects/${encodeURIComponent(r)}/runs/${encodeURIComponent(e)}/suite/${encodeURIComponent(t)}`:`/runs/${encodeURIComponent(e)}/suite/${encodeURIComponent(t)}`}function XB(e){return e?Zb(e,"runs"):"/?tab=runs"}function WB(e,t,r=!1){if(!r)return t&&e.includes(t)?t:void 0}function ZB(e,t,r,n){return t===!1?{kind:"single-project-home"}:r&&e.includes(r)?{kind:"redirect",redirectPath:Zb(r,n)}:{kind:"dashboard"}}function NM(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 sr(e){if(!e)return"Run";const t=e.split("::").at(-1)||e,r=t.match(/^\d{4}-\d{2}-\d{2}T\d{2}[-:]\d{2}[-:]\d{2}(?:[-.]\d+)?Z/);return(r==null?void 0:r[0])??t}function JB(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=NM(o.projectId,t),f=Zb(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===sr(o.runId))||r.push({label:sr(o.runId),to:B_(o.runId,o.projectId)}):l.includes("/projects/$projectId_/runs/$runId/category/$category")?(r.some(c=>c.label===sr(o.runId))||r.push({label:sr(o.runId),to:Ti(o.runId,o.projectId)}),r.push({label:o.category??"Category",to:U_(o.runId,o.category??"Category",o.projectId)})):l.includes("/projects/$projectId_/runs/$runId/suite/$suite")?(r.some(c=>c.label===sr(o.runId))||r.push({label:sr(o.runId),to:Ti(o.runId,o.projectId)}),r.push({label:o.suite??"Suite",to:q_(o.runId,o.suite??"Suite",o.projectId)})):l.includes("/projects/$projectId_/runs/$runId")?r.push({label:sr(o.runId),to:Ti(o.runId,o.projectId)}):l.includes("/projects/$projectId_/evals/$runId/$evalId")?(r.some(c=>c.label===sr(o.runId))||r.push({label:sr(o.runId),to:Ti(o.runId,o.projectId)}),r.push({label:o.evalId??"Eval",to:$_(o.runId,o.evalId??"Eval",o.projectId)})):l.includes("/projects/$projectId_/experiments/$experimentName")?r.push({label:o.experimentName??"Experiment",to:z_(o.experimentName??"Experiment",o.projectId)}):l.includes("/runs/$runId/category/$category")?(r.some(c=>c.label===sr(o.runId))||r.push({label:sr(o.runId),to:Ti(o.runId)}),r.push({label:o.category??"Category",to:U_(o.runId,o.category??"Category")})):l.includes("/runs/$runId/suite/$suite")?(r.some(c=>c.label===sr(o.runId))||r.push({label:sr(o.runId),to:Ti(o.runId)}),r.push({label:o.suite??"Suite",to:q_(o.runId,o.suite??"Suite")})):l.includes("/jobs/$runId")?r.push({label:sr(o.runId),to:B_(o.runId)}):l.includes("/runs/$runId")?r.push({label:sr(o.runId),to:Ti(o.runId)}):l.includes("/evals/$runId/$evalId")?(r.some(c=>c.label===sr(o.runId))||r.push({label:sr(o.runId),to:Ti(o.runId)}),r.push({label:o.evalId??"Eval",to:$_(o.runId,o.evalId??"Eval")})):l.includes("/experiments/$experimentName")?r.push({label:o.experimentName??"Experiment",to:z_(o.experimentName??"Experiment")}):l==="/settings"&&r.push({label:"Settings",to:"/settings"})}}return r}function e6(){const e=H8(),{toggle:t}=oM(),{data:r}=od(),n=JB(e,r==null?void 0:r.projects),i=n.length>0;return d.jsxs("nav",{"aria-label":"Breadcrumb",className:"flex min-h-12 min-w-0 items-center gap-2 border-b border-gray-800 bg-gray-950 px-4 py-2 text-sm md:px-6",children:[d.jsx("button",{type:"button",onClick:t,className:"shrink-0 text-gray-400 hover:text-gray-200 md:hidden","aria-label":"Toggle navigation",children:d.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",role:"img","aria-label":"Toggle navigation",children:[d.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),d.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),d.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]})}),d.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[i?d.jsx(_e,{to:"/",className:"shrink-0 text-cyan-400 hover:text-cyan-300 hover:underline",children:"Projects"}):d.jsx("span",{className:"shrink-0 text-gray-400",children:"Projects"}),n.map((l,o)=>{const c=o===n.length-1;return d.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[d.jsx("span",{className:"shrink-0 text-gray-600",children:">"}),c?d.jsx("span",{className:"min-w-0 truncate text-gray-400",children:l.label}):d.jsx(_e,{to:l.to??"/",className:"min-w-0 truncate text-cyan-400 hover:text-cyan-300 hover:underline",children:l.label})]},`${l.label}-${o}`)})]})]})}function OM(e){return e&&e!=="default"?e:void 0}function t6(e,t){const r=[OM(t==null?void 0:t.experiment),t==null?void 0:t.target].filter(n=>!!n);return r.length>0?r.join(" · "):e}function zc(e){const t=e==null?void 0:e.trim();return t||void 0}function _M(e){const t=e.results[0],r=zc(e.sourceLabel),n=e.source==="remote",i=n&&r?r:t6(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,OM(t==null?void 0:t.experiment),l,n?void 0:e.source].filter(h=>!!h),c=zc(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 r6(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 n6(e){var r;return((r=e.split(/[\\/]+/).filter(n=>n&&n!=="."&&n!=="..").at(-1))==null?void 0:r.trim())||void 0}function a6(e){const t=zc(e)??"Uncategorized";return r6(t)?{label:n6(t)??"Uncategorized",mutedLabel:t}:{label:t}}function i6(e){return e.replace(/\.eval\.(ya?ml|json|jsonl)$/i,"").replace(/\.(ya?ml|json|jsonl)$/i,"")}function s6(e){const t=zc(e);if(!t||t==="Uncategorized")return;const r=t.replace(/\\/g,"/"),n=r.split("/").filter(l=>l.length>0).at(-1)??t;return{label:(r.includes("/")?i6(n):t)||t,title:t}}function EM(e){const t=e.map(n=>zc(n.suite)??"");return t.filter(n=>n&&n!=="Uncategorized").length>0&&new Set(t).size>1}const Lh="remote::";function AM(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 Ha(e){const t=e==null?void 0:e.trim();return t||void 0}function l6(e){const t=Ha(e);return t&&t!=="default"&&t!=="-"?t:void 0}function CM(e){let t=e.trim();return t.startsWith(Lh)&&(t=t.slice(Lh.length)),t.replace(/\.(jsonl|json)$/i,"")}function o6(e){const r=CM(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=Ha(e);return r?o6(r)?!0:CM(r)===AM(t):!1}function u6(e,t){const r=Ha(e);if(!r)return;const n=r.startsWith(Lh)?r.slice(Lh.length):r,i=n.lastIndexOf("::");if(i!==-1){const l=n.slice(i+2);if(Jb(l,t))return Ha(n.slice(0,i))}return n}function c6(e){return[Ha(e.display_name),Ha(e.title),u6(e.filename,e.timestamp)].find(r=>!!r&&!Jb(r,e.timestamp))}function d6(e){return`${Math.round(e*100)}%`}function f6(e,t){const r=[t],n=Ha(e.filename),i=Ha(e.display_name),l=Ha(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=AM(e.timestamp),n=l6(e.experiment),i=c6(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(d6(e.pass_rate));const h=f.join(" · "),p=h?`${o} · ${h}`:o;return{primary:o,secondary:h,label:p,title:f6(e,p)}}function tj({appName:e}){return e!==Bm?d.jsx("span",{className:"av-brand-name",children:e}):d.jsxs("span",{className:"av-brand-name","aria-label":"AgentV",children:[d.jsx("span",{className:"av-brand-name__letter","aria-hidden":"true",children:"A"}),d.jsx("span",{className:"av-brand-name__middle","aria-hidden":"true",children:"GENT"}),d.jsx("span",{className:"av-brand-name__letter","aria-hidden":"true",children:"V"})]})}function h6({suite:e,className:t=""}){const r=s6(e);return r?d.jsx("span",{className:`inline-flex max-w-full shrink-0 items-center rounded-md border border-cyan-900/60 bg-cyan-950/30 px-2 py-0.5 text-xs font-medium text-cyan-300 ${t}`,title:r.title,children:d.jsx("span",{className:"truncate",children:r.label})}):null}function qn({children:e}){const{isOpen:t,close:r}=oM(),i=sM().href;return S.useEffect(()=>{i&&r()},[r,i]),d.jsxs(d.Fragment,{children:[t&&d.jsx("div",{className:"fixed inset-0 z-30 bg-black/50 md:hidden",onClick:r,onKeyDown: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 ma({projectId:e}){const{data:t}=yt(e),r=(t==null?void 0:t.app_name)??Bm;return d.jsx("div",{className:"flex items-center gap-2 border-b border-gray-800 px-4 py-4",children:d.jsx(_e,{to:"/",className:"truncate text-lg font-semibold text-white hover:text-cyan-400",children:d.jsx(tj,{appName:r})})})}function TM({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 PM({result:e,passThreshold:t,showSuiteLabel:r}){const n=nl(e.score,t);return d.jsxs(d.Fragment,{children:[d.jsx("span",{className:`mt-0.5 shrink-0 text-xs ${n?"text-emerald-400":"text-red-400"}`,children:n?"✓":"✗"}),d.jsxs("span",{className:"min-w-0 flex-1",children:[d.jsx("span",{className:"block truncate",children:e.testId}),r?d.jsx(h6,{suite:e.suite,className:"mt-1 max-w-full text-[11px] leading-4"}):null]})]})}const F_=[{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 jv(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 H_({projectId:e}){const t=sM(),{data:r}=od(),n=(r==null?void 0:r.projects)??[],i=t.search,l=F_.some(c=>c.id===i.tab)?i.tab:"runs",o=!e&&n.length===0;return d.jsxs(qn,{children:[d.jsx(ma,{projectId:e}),d.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[d.jsxs("div",{className:"mb-4",children:[d.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Navigate"}),d.jsxs(_e,{to:"/",className:jv(t.pathname==="/"),children:[d.jsx("span",{className:"truncate",children:"Projects"}),n.length>0?d.jsx("span",{className:"shrink-0 text-xs tabular-nums text-gray-500",children:n.length}):null]}),d.jsx(_e,{to:"/settings",className:jv(t.pathname==="/settings"),children:d.jsx("span",{className:"truncate",children:"Settings"})})]}),o?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"}),F_.map(c=>d.jsxs(_e,{to:"/",search:{tab:c.id},className:jv(l===c.id),title:c.description,children:[d.jsx("span",{className:"truncate",children:c.label}),d.jsx("span",{className:"shrink-0 text-xs text-gray-500",children:c.description})]},c.id))]}):null]})]})}function m6(){const e=F8(),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:b,evalId:w}=t;return d.jsx(x6,{projectId:x,runId:b,currentEvalId:w})}if(i&&typeof i=="object"&&"projectId"in i){const{projectId:x,runId:b,category:w}=i;return d.jsx(j6,{projectId:x,runId:b,category:w})}if(l&&typeof l=="object"&&"projectId"in l){const{projectId:x,runId:b,suite:w}=l;return d.jsx(b6,{projectId:x,runId:b,suite:w})}if(r&&typeof r=="object"&&"projectId"in r){const{projectId:x,runId:b}=r;return d.jsx(K_,{projectId:x,currentRunId:b})}if(o&&typeof o=="object"&&"projectId"in o){const{projectId:x}=o;return d.jsx(K_,{projectId:x})}if(n&&typeof n=="object"&&"projectId"in n){const{projectId:x,experimentName:b}=n;return d.jsx(w6,{projectId:x,currentExperiment:b})}if(c&&typeof c=="object"&&"projectId"in c){const{projectId:x}=c;return d.jsx(H_,{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}),g=e({to:"/experiments/$experimentName",fuzzy:!0});if(p&&typeof p=="object"&&"runId"in p){const{runId:x,category:b}=p;return d.jsx(v6,{runId:x,category:b})}if(y&&typeof y=="object"&&"runId"in y){const{runId:x,suite:b}=y;return d.jsx(g6,{runId:x,suite:b})}if(h&&typeof h=="object"&&"runId"in h){const{runId:x,evalId:b}=h;return d.jsx(y6,{runId:x,currentEvalId:b})}if(g&&typeof g=="object"&&"experimentName"in g){const{experimentName:x}=g;return d.jsx(S6,{currentExperiment:x})}if(f&&typeof f=="object"&&"runId"in f){const{runId:x}=f;return d.jsx(p6,{currentRunId:x})}return d.jsx(H_,{})}function p6({currentRunId:e}){const{data:t}=vB(),{data:r}=yt(),{data:n}=Wb(),i=((n==null?void 0:n.runs)??[]).filter(l=>l.status==="starting"||l.status==="running").length;return d.jsxs(qn,{children:[d.jsxs("div",{className:"flex items-center gap-2 border-b border-gray-800 px-4 py-4",children:[d.jsx(_e,{to:"/",className:"truncate text-lg font-semibold text-white hover:text-cyan-400",children:d.jsx(tj,{appName:(r==null?void 0:r.app_name)??Bm})}),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(_e,{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(TM,{display:o})},l.filename)})]}),d.jsx("div",{className:"border-t border-gray-800 px-4 py-3",children:d.jsx(_e,{to:"/settings",className:"flex items-center gap-2 text-sm text-gray-400 hover:text-cyan-400",children:"Settings"})})]})}function y6({runId:e,currentEvalId:t}){const{data:r}=ld(e),{data:n}=yt(),i=(n==null?void 0:n.threshold)??(n==null?void 0:n.pass_threshold)??.8,l=EM((r==null?void 0:r.results)??[]);return d.jsxs(qn,{children:[d.jsx(ma,{}),d.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[d.jsx(_e,{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(o=>{const c=o.testId===t;return d.jsx(_e,{to:"/evals/$runId/$evalId",params:{runId:e,evalId:o.testId},className:`mb-0.5 flex items-start gap-2 rounded-md px-2 py-1.5 text-sm transition-colors ${c?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,children:d.jsx(PM,{result:o,passThreshold:i,showSuiteLabel:l})},o.testId)})]})]})}function g6({runId:e,suite:t}){const{data:r}=ld(e),{data:n}=yt(),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(qn,{children:[d.jsx(ma,{}),d.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[d.jsx(_e,{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=nl(o.score,i);return d.jsxs(_e,{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 v6({runId:e,category:t}){const{data:r}=vM(e,t),n=(r==null?void 0:r.suites)??[];return d.jsxs(qn,{children:[d.jsx(ma,{}),d.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[d.jsx(_e,{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(_e,{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 K_({projectId:e,currentRunId:t}){const{data:r}=CB(e);return d.jsxs(qn,{children:[d.jsx(ma,{projectId:e}),d.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[d.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Runs"}),r==null?void 0:r.runs.map(n=>{const i=ej(n),l=t===n.filename;return d.jsx(_e,{to:"/projects/$projectId/runs/$runId",params:{projectId:e,runId:n.filename},className:`mb-0.5 block rounded-md px-2 py-1.5 text-sm transition-colors ${l?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,title:i.title,children:d.jsx(TM,{display:i})},n.filename)})]})]})}function x6({projectId:e,runId:t,currentEvalId:r}){const{data:n}=ud(e,t),{data:i}=yt(e),l=(i==null?void 0:i.threshold)??(i==null?void 0:i.pass_threshold)??.8,o=EM((n==null?void 0:n.results)??[]);return d.jsxs(qn,{children:[d.jsx(ma,{projectId:e}),d.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[d.jsx(_e,{to:"/projects/$projectId/runs/$runId",params:{projectId:e,runId:t},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to run"}),d.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:t})]}),d.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[d.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Evaluations"}),n==null?void 0:n.results.map(c=>{const f=c.testId===r;return d.jsx(_e,{to:"/projects/$projectId/evals/$runId/$evalId",params:{projectId:e,runId:t,evalId:c.testId},className:`mb-0.5 flex items-start gap-2 rounded-md px-2 py-1.5 text-sm transition-colors ${f?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,children:d.jsx(PM,{result:c,passThreshold:l,showSuiteLabel:o})},c.testId)})]})]})}function b6({projectId:e,runId:t,suite:r}){const{data:n}=ud(e,t),{data:i}=yt(e),l=(i==null?void 0:i.threshold)??(i==null?void 0:i.pass_threshold)??.8,o=((n==null?void 0:n.results)??[]).filter(c=>(c.suite??"Uncategorized")===r);return d.jsxs(qn,{children:[d.jsx(ma,{projectId:e}),d.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[d.jsx(_e,{to:"/projects/$projectId/runs/$runId",params:{projectId:e,runId:t},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to run"}),d.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:t}),d.jsx("p",{className:"truncate text-xs text-gray-500",children:r})]}),d.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[d.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Evaluations"}),o.map(c=>{const f=nl(c.score,l);return d.jsxs(_e,{to:"/projects/$projectId/evals/$runId/$evalId",params:{projectId:e,runId:t,evalId:c.testId},className:"mb-0.5 flex items-center gap-2 rounded-md px-2 py-1.5 text-sm text-gray-400 transition-colors hover:bg-gray-800/50 hover:text-gray-200",children:[d.jsx("span",{className:`text-xs ${f?"text-emerald-400":"text-red-400"}`,children:f?"✓":"✗"}),d.jsx("span",{className:"truncate",children:c.testId})]},c.testId)})]})]})}function j6({projectId:e,runId:t,category:r}){const{data:n}=He(xM(e,t,r)),i=(n==null?void 0:n.suites)??[];return d.jsxs(qn,{children:[d.jsx(ma,{projectId:e}),d.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[d.jsx(_e,{to:"/projects/$projectId/runs/$runId",params:{projectId:e,runId:t},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to run"}),d.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:t}),d.jsx("p",{className:"truncate text-xs text-gray-500",children:r})]}),d.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[d.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Suites"}),i.map(l=>d.jsxs(_e,{to:"/projects/$projectId/runs/$runId/suite/$suite",params:{projectId:e,runId:t,suite:l.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 ${l.passed===l.total?"text-emerald-400":"text-red-400"}`,children:l.passed===l.total?"✓":"✗"}),d.jsx("span",{className:"truncate",children:l.name})]},l.name))]})]})}function w6({projectId:e,currentExperiment:t}){const{data:r}=He(Qb(e)),n=(r==null?void 0:r.experiments)??[];return d.jsxs(qn,{children:[d.jsx(ma,{projectId:e}),d.jsx("div",{className:"border-b border-gray-800 px-4 py-2",children:d.jsx(_e,{to:"/projects/$projectId",params:{projectId:e},search:{tab:"experiments"},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← All experiments"})}),d.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[d.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Experiments"}),n.map(i=>{const l=i.name===t;return d.jsx(_e,{to:"/projects/$projectId/experiments/$experimentName",params:{projectId:e,experimentName:i.name},className:`mb-0.5 block truncate rounded-md px-2 py-1.5 text-sm transition-colors ${l?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,children:i.name},i.name)})]})]})}function S6({currentExperiment:e}){const{data:t}=gM(),r=(t==null?void 0:t.experiments)??[];return d.jsxs(qn,{children:[d.jsx(ma,{}),d.jsx("div",{className:"border-b border-gray-800 px-4 py-2",children:d.jsx(_e,{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(_e,{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 N6(){return d.jsx(X8,{children:d.jsx(O6,{})})}function O6(){return d.jsxs("div",{className:"flex h-screen overflow-hidden",children:[d.jsx(m6,{}),d.jsxs("div",{className:"flex min-w-0 flex-1 flex-col overflow-hidden",children:[d.jsx(e6,{}),d.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:d.jsx(iM,{})})]})]})}const vr=R8({component:N6}),_6=Cr("/settings")({component:E6});function E6(){const{data:e,isLoading:t}=yt(),r=ha(),[n,i]=S.useState(""),[l,o]=S.useState(!1),[c,f]=S.useState(null),h=(e==null?void 0:e.threshold)??$c,p=n||String(h),y=(e==null?void 0:e.read_only)===!0,g=(e==null?void 0:e.app_name)??Bm,x=async()=>{const b=Number.parseFloat(n||String(h));if(Number.isNaN(b)||b<0||b>1){f({type:"error",text:"Threshold must be a number between 0 and 1"});return}o(!0),f(null);try{await BB({threshold:b}),await r.invalidateQueries({queryKey:["config"]}),i(""),f({type:"success",text:"Settings saved"}),setTimeout(()=>f(null),3e3)}catch{f({type:"error",text:"Failed to save settings"})}finally{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(tj,{appName:g})]})]}),d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-6",children:[d.jsx("h2",{className:"text-lg font-medium text-white",children:"Evaluation"}),d.jsx("p",{className:"mt-1 text-sm text-gray-400",children:"Configure how evaluation results are classified"}),d.jsx("div",{className:"mt-6 space-y-4",children:d.jsxs("div",{children:[d.jsx("label",{htmlFor:"pass-threshold",className:"block text-sm font-medium text-gray-300",children:"Pass Threshold"}),d.jsxs("p",{className:"mt-1 text-xs text-gray-500",children:["Score at or above this value is considered passing. Default: ",$c]}),d.jsxs("div",{className:"mt-2 flex items-center gap-3",children:[d.jsx("input",{id:"pass-threshold",type:"number",min:"0",max:"1",step:"0.05",value:p,onChange:b=>i(b.target.value),disabled: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 G_({entry:e,selected:t,current:r=!1,onSelect:n,onOpen:i}){return d.jsxs("div",{className:`grid grid-cols-[minmax(0,1fr)_auto] border-b border-gray-800/50 last:border-b-0 ${t?"bg-cyan-950/20":"transition-colors hover:bg-gray-900/30"}`,children:[d.jsxs("button",{type:"button",onClick:n,onDoubleClick:i,"aria-selected":t,className:"min-w-0 px-4 py-3 text-left focus:outline-none focus:ring-1 focus:ring-inset focus:ring-cyan-500",children:[d.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[d.jsx("span",{className:"truncate text-sm font-medium text-gray-200",children:e.name}),r?d.jsx("span",{className:"shrink-0 rounded-md border border-gray-700 px-2 py-0.5 text-xs font-medium text-gray-400",children:"this folder"}):null,e.hasAgentv?d.jsx("span",{className:"shrink-0 rounded-md border border-cyan-900/60 bg-cyan-950/30 px-2 py-0.5 text-xs font-medium text-cyan-300",children:".agentv"}):null]}),d.jsx("span",{className:"mt-1 block truncate text-xs text-gray-500",children:e.path})]}),d.jsx("button",{type:"button",onClick:i,className:"border-l border-gray-800 px-3 text-sm text-gray-400 transition-colors hover:bg-gray-900/40 hover:text-gray-200 focus:outline-none focus:ring-1 focus:ring-inset focus:ring-cyan-500",children:"Open"})]})}function A6({open:e,onClose:t,onAdded:r}){const n=S.useRef(null),[i,l]=S.useState(null),[o,c]=S.useState(""),[f,h]=S.useState(""),[p,y]=S.useState(null),[g,x]=S.useState(null),[b,w]=S.useState(!1),[N,O]=S.useState(!1),A=S.useCallback(async(D,L={})=>{w(!0),y(null),x(null);try{const k=await OB(D);l(k),c(k.path),h(L.selectCurrent&&k.current.hasAgentv?k.current.path:"")}catch(k){y(k.message)}finally{w(!1)}},[]);S.useEffect(()=>{var D;e&&(l(null),c(""),h(""),y(null),x(null),O(!1),(D=n.current)==null||D.focus(),A(void 0,{selectCurrent:!0}))},[A,e]),S.useEffect(()=>{if(!e)return;function D(L){L.key==="Escape"&&(L.preventDefault(),t())}return document.addEventListener("keydown",D),()=>document.removeEventListener("keydown",D)},[t,e]);const T=S.useMemo(()=>!i||!f?null:f===i.current.path?i.current:i.entries.find(D=>D.path===f)??null,[i,f]),E=!!(T!=null&&T.hasAgentv)&&!N;function C(D){D.preventDefault(),A(o,{selectCurrent:!0})}async function M(){if(!(!f||!E)){O(!0),x(null);try{const D=await _B(f);r(D),t()}catch(D){x(D.message)}finally{O(!1)}}}if(!e)return null;const R=f?T!=null&&T.hasAgentv?`Ready to add ${T.name}.`:"Selected folder does not contain an .agentv/ directory.":"Select a folder containing an .agentv/ directory.";return d.jsx("dialog",{ref:n,open:!0,"aria-modal":"true","aria-label":"Add project",tabIndex:-1,className:"fixed inset-0 z-50 flex h-full max-h-none w-full max-w-none items-center justify-center bg-black/70 p-4 text-left text-gray-100 backdrop:bg-black/70",children:d.jsxs("div",{className:"flex max-h-[90vh] w-full max-w-4xl flex-col overflow-hidden rounded-lg border border-gray-800 bg-gray-950 shadow-xl",children:[d.jsxs("div",{className:"flex items-center justify-between border-b border-gray-800 px-4 py-3",children:[d.jsx("h2",{className:"text-xl font-semibold text-white",children:"Add project"}),d.jsx("button",{type:"button",onClick:t,className:"rounded-md px-2 py-1 text-sm text-gray-400 transition-colors hover:bg-gray-800 hover:text-gray-200 focus:outline-none focus:ring-1 focus:ring-cyan-500",children:"Close"})]}),d.jsxs("div",{className:"space-y-4 overflow-y-auto p-4",children:[d.jsxs("form",{onSubmit:C,className:"flex flex-col gap-2 sm:flex-row",children:[d.jsx("label",{className:"sr-only",htmlFor:"add-project-path",children:"Folder path"}),d.jsx("input",{id:"add-project-path",value:o,onChange:D=>c(D.target.value),placeholder:"Folder path",className:"min-w-0 flex-1 rounded-md border border-gray-700 bg-gray-950 px-3 py-1.5 text-sm text-gray-100 placeholder:text-gray-600 focus:border-cyan-500 focus:outline-none focus:ring-1 focus:ring-cyan-500 disabled:opacity-50",disabled:b||N}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx("button",{type:"button",onClick:()=>(i==null?void 0:i.parentPath)&&void A(i.parentPath),disabled:!(i!=null&&i.parentPath)||b||N,className:"rounded-md border border-gray-700 px-3 py-1.5 text-sm text-gray-300 transition-colors hover:bg-gray-800 hover:text-gray-100 disabled:cursor-not-allowed disabled:opacity-50",children:"Up"}),d.jsx("button",{type:"button",onClick:()=>void A(o),disabled:b||N,className:"rounded-md border border-gray-700 px-3 py-1.5 text-sm text-gray-300 transition-colors hover:bg-gray-800 hover:text-gray-100 disabled:cursor-not-allowed disabled:opacity-50",children:"Refresh"}),d.jsx("button",{type:"submit",disabled:b||N,className:"rounded-md bg-cyan-500 px-3 py-1.5 text-sm font-medium text-gray-950 transition-colors hover:bg-cyan-400 disabled:cursor-not-allowed disabled:bg-gray-700 disabled:text-gray-500",children:"Go"})]})]}),p?d.jsx("div",{role:"alert",className:"rounded-lg border border-red-900/60 bg-red-950/30 p-3 text-sm text-red-400",children:p}):null,d.jsxs("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:[d.jsxs("div",{className:"border-b border-gray-800 bg-gray-900/50 px-4 py-3",children:[d.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-gray-500",children:"Current folder"}),d.jsx("p",{className:"mt-1 truncate text-sm text-gray-300",children:(i==null?void 0:i.path)??(b?"Loading folders...":"No folder loaded")})]}),d.jsx("div",{className:"max-h-80 overflow-y-auto",children:i?d.jsxs(d.Fragment,{children:[d.jsx(G_,{entry:i.current,current:!0,selected:f===i.current.path,onSelect:()=>h(i.current.path),onOpen:()=>void A(i.current.path,{selectCurrent:!0})}),i.entries.map(D=>d.jsx(G_,{entry:D,selected:f===D.path,onSelect:()=>h(D.path),onOpen:()=>void A(D.path,{selectCurrent:!0})},D.path)),i.entries.length===0?d.jsx("p",{className:"px-4 py-6 text-center text-sm text-gray-500",children:"No subfolders in this location."}):null]}):d.jsx("p",{className:"px-4 py-6 text-center text-sm text-gray-500",children:b?"Loading folders...":"Enter a folder path to browse."})})]}),d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900/50 p-3",children:d.jsxs("div",{className:"flex flex-col gap-1 sm:flex-row sm:items-center sm:justify-between",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-gray-500",children:"Selected"}),d.jsx("p",{className:"mt-1 truncate text-sm text-gray-200",children:f||"None"})]}),d.jsx("p",{className:`text-sm ${T!=null&&T.hasAgentv?"text-cyan-300":"text-gray-500"}`,children:R})]})}),g?d.jsx("div",{role:"alert",className:"rounded-lg border border-red-900/60 bg-red-950/30 p-3 text-sm text-red-400",children:g}):null]}),d.jsxs("div",{className:"flex items-center justify-between border-t border-gray-800 bg-gray-900/50 px-4 py-3",children:[d.jsx("p",{className:"text-xs tabular-nums text-gray-500",children:i?`${i.entries.length} folders`:"0 folders"}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx("button",{type:"button",onClick:t,className:"rounded-md px-3 py-1.5 text-sm text-gray-400 transition-colors hover:text-gray-200",children:"Cancel"}),d.jsx("button",{type:"button",onClick:()=>void M(),disabled:!E,className:"rounded-md bg-cyan-500 px-3 py-1.5 text-sm font-medium text-gray-950 transition-colors hover:bg-cyan-400 disabled:cursor-not-allowed disabled:bg-gray-700 disabled:text-gray-500",children:N?"Adding...":"Add project"})]})]})]})})}function MM(e){return e.executionStatus==="execution_error"}function Um(e,t){let r=0,n=0,i=0,l=0;for(const c of e){if(MM(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 Xt(e){return e.execution_error_count??0}function RM(e){return Math.max(0,e.total-Xt(e))}function Fo(e){return e.quality_count??Math.max(0,e.eval_count-Xt(e))}function DM(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=DM(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function We(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=DM(e))&&(n&&(n+=" "),n+=t);return n}var C6=["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 rj(e){if(typeof e!="string")return!1;var t=C6;return t.includes(e)}var T6=["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"],P6=new Set(T6);function kM(e){return typeof e!="string"?!1:P6.has(e)}function IM(e){return typeof e=="string"&&e.startsWith("data-")}function zn(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(kM(r)||IM(r))&&(t[r]=e[r]);return t}function cd(e){if(e==null)return null;if(S.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return zn(t)}return typeof e=="object"&&!Array.isArray(e)?zn(e):null}function Er(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(kM(r)||IM(r)||rj(r))&&(t[r]=e[r]);return t}function M6(e){return e==null?null:S.isValidElement(e)?Er(e.props):typeof e=="object"&&!Array.isArray(e)?Er(e):null}var R6=["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 D6(e,t){if(e==null)return{};var r,n,i=k6(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 k6(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 nj=S.forwardRef((e,t)=>{var{children:r,width:n,height:i,viewBox:l,className:o,style:c,title:f,desc:h}=e,p=D6(e,R6),y=l||{width:n,height:i,x:0,y:0},g=We("recharts-surface",o);return S.createElement("svg",Tx({},Er(p),{className:g,width:n,height:i,style:c,viewBox:"".concat(y.x," ").concat(y.y," ").concat(y.width," ").concat(y.height),ref:t}),S.createElement("title",null,f),S.createElement("desc",null,h),r)}),I6=["children","className"];function Px(){return Px=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},Px.apply(null,arguments)}function L6(e,t){if(e==null)return{};var r,n,i=$6(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 $6(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 an=S.forwardRef((e,t)=>{var{children:r,className:n}=e,i=L6(e,I6),l=We("recharts-layer",n);return S.createElement("g",Px({className:l},Er(i),{ref:t}),r)}),LM=S.createContext(null),z6=()=>S.useContext(LM);function it(e){return function(){return e}}const $M=Math.cos,$h=Math.sin,Fn=Math.sqrt,zh=Math.PI,qm=2*zh,Mx=Math.PI,Rx=2*Mx,Ts=1e-6,B6=Rx-Ts;function zM(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function U6(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return zM;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 q6{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?zM:U6(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,g=p*p+y*y;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(g>Ts)if(!(Math.abs(y*f-h*p)>Ts)||!l)this._append`L${this._x1=t},${this._y1=r}`;else{let x=n-o,b=i-c,w=f*f+h*h,N=x*x+b*b,O=Math.sqrt(w),A=Math.sqrt(g),T=l*Math.tan((Mx-Math.acos((w+g-N)/(2*O*A)))/2),E=T/A,C=T/O;Math.abs(E-1)>Ts&&this._append`L${t+E*p},${r+E*y}`,this._append`A${l},${l},0,0,${+(y*x>p*b)},${this._x1=t+C*f},${this._y1=r+C*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,g=o?i-l:l-i;this._x1===null?this._append`M${h},${p}`:(Math.abs(this._x1-h)>Ts||Math.abs(this._y1-p)>Ts)&&this._append`L${h},${p}`,n&&(g<0&&(g=g%Rx+Rx),g>B6?this._append`A${n},${n},0,1,${y},${t-c},${r-f}A${n},${n},0,1,${y},${this._x1=h},${this._y1=p}`:g>Ts&&this._append`A${n},${n},0,${+(g>=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 aj(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 q6(t)}function ij(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function BM(e){this._context=e}BM.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 Fm(e){return new BM(e)}function UM(e){return e[0]}function qM(e){return e[1]}function FM(e,t){var r=it(!0),n=null,i=Fm,l=null,o=aj(c);e=typeof e=="function"?e:e===void 0?UM:it(e),t=typeof t=="function"?t:t===void 0?qM:it(t);function c(f){var h,p=(f=ij(f)).length,y,g=!1,x;for(n==null&&(l=i(x=o())),h=0;h<=p;++h)!(h<p&&r(y=f[h],h,f))===g&&((g=!g)?l.lineStart():l.lineEnd()),g&&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:it(+f),c):e},c.y=function(f){return arguments.length?(t=typeof f=="function"?f:it(+f),c):t},c.defined=function(f){return arguments.length?(r=typeof f=="function"?f:it(!!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 eh(e,t,r){var n=null,i=it(!0),l=null,o=Fm,c=null,f=aj(h);e=typeof e=="function"?e:e===void 0?UM:it(+e),t=typeof t=="function"?t:it(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?qM:it(+r);function h(y){var g,x,b,w=(y=ij(y)).length,N,O=!1,A,T=new Array(w),E=new Array(w);for(l==null&&(c=o(A=f())),g=0;g<=w;++g){if(!(g<w&&i(N=y[g],g,y))===O)if(O=!O)x=g,c.areaStart(),c.lineStart();else{for(c.lineEnd(),c.lineStart(),b=g-1;b>=x;--b)c.point(T[b],E[b]);c.lineEnd(),c.areaEnd()}O&&(T[g]=+e(N,g,y),E[g]=+t(N,g,y),c.point(n?+n(N,g,y):T[g],r?+r(N,g,y):E[g]))}if(A)return c=null,A+""||null}function p(){return FM().defined(i).curve(o).context(l)}return h.x=function(y){return arguments.length?(e=typeof y=="function"?y:it(+y),n=null,h):e},h.x0=function(y){return arguments.length?(e=typeof y=="function"?y:it(+y),h):e},h.x1=function(y){return arguments.length?(n=y==null?null:typeof y=="function"?y:it(+y),h):n},h.y=function(y){return arguments.length?(t=typeof y=="function"?y:it(+y),r=null,h):t},h.y0=function(y){return arguments.length?(t=typeof y=="function"?y:it(+y),h):t},h.y1=function(y){return arguments.length?(r=y==null?null:typeof y=="function"?y:it(+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:it(!!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 HM{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 F6(e){return new HM(e,!0)}function H6(e){return new HM(e,!1)}const sj={draw(e,t){const r=Fn(t/zh);e.moveTo(r,0),e.arc(0,0,r,0,qm)}},K6={draw(e,t){const r=Fn(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},KM=Fn(1/3),G6=KM*2,Y6={draw(e,t){const r=Fn(t/G6),n=r*KM;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},V6={draw(e,t){const r=Fn(t),n=-r/2;e.rect(n,n,r,r)}},Q6=.8908130915292852,GM=$h(zh/10)/$h(7*zh/10),X6=$h(qm/10)*GM,W6=-$M(qm/10)*GM,Z6={draw(e,t){const r=Fn(t*Q6),n=X6*r,i=W6*r;e.moveTo(0,-r),e.lineTo(n,i);for(let l=1;l<5;++l){const o=qm*l/5,c=$M(o),f=$h(o);e.lineTo(f*r,-c*r),e.lineTo(c*n-f*i,f*n+c*i)}e.closePath()}},wv=Fn(3),J6={draw(e,t){const r=-Fn(t/(wv*3));e.moveTo(0,r*2),e.lineTo(-wv*r,-r),e.lineTo(wv*r,-r),e.closePath()}},vn=-.5,xn=Fn(3)/2,Dx=1/Fn(12),eU=(Dx/2+1)*3,tU={draw(e,t){const r=Fn(t/eU),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(vn*n-xn*i,xn*n+vn*i),e.lineTo(vn*l-xn*o,xn*l+vn*o),e.lineTo(vn*c-xn*f,xn*c+vn*f),e.lineTo(vn*n+xn*i,vn*i-xn*n),e.lineTo(vn*l+xn*o,vn*o-xn*l),e.lineTo(vn*c+xn*f,vn*f-xn*c),e.closePath()}};function rU(e,t){let r=null,n=aj(i);e=typeof e=="function"?e:it(e||sj),t=typeof t=="function"?t:it(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:it(l),i):e},i.size=function(l){return arguments.length?(t=typeof l=="function"?l:it(+l),i):t},i.context=function(l){return arguments.length?(r=l??null,i):r},i}function Bh(){}function Uh(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 YM(e){this._context=e}YM.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:Uh(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:Uh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function nU(e){return new YM(e)}function VM(e){this._context=e}VM.prototype={areaStart:Bh,areaEnd:Bh,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:Uh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function aU(e){return new VM(e)}function QM(e){this._context=e}QM.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:Uh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function iU(e){return new QM(e)}function XM(e){this._context=e}XM.prototype={areaStart:Bh,areaEnd:Bh,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 sU(e){return new XM(e)}function Y_(e){return e<0?-1:1}function V_(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(Y_(l)+Y_(o))*Math.min(Math.abs(l),Math.abs(o),.5*Math.abs(c))||0}function Q_(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Sv(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 qh(e){this._context=e}qh.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:Sv(this,this._t0,Q_(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,Sv(this,Q_(this,r=V_(this,e,t)),r);break;default:Sv(this,this._t0,r=V_(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function WM(e){this._context=new ZM(e)}(WM.prototype=Object.create(qh.prototype)).point=function(e,t){qh.prototype.point.call(this,t,e)};function ZM(e){this._context=e}ZM.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 lU(e){return new qh(e)}function oU(e){return new WM(e)}function JM(e){this._context=e}JM.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=X_(e),i=X_(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 X_(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 uU(e){return new JM(e)}function Hm(e,t){this._context=e,this._t=t}Hm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function cU(e){return new Hm(e,.5)}function dU(e){return new Hm(e,0)}function fU(e){return new Hm(e,1)}function al(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 hU(e,t){return e[t]}function mU(e){const t=[];return t.key=e,t}function pU(){var e=it([]),t=kx,r=al,n=hU;function i(l){var o=Array.from(e.apply(this,arguments),mU),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=ij(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:it(Array.from(l)),i):e},i.value=function(l){return arguments.length?(n=typeof l=="function"?l:it(+l),i):n},i.order=function(l){return arguments.length?(t=l==null?kx:typeof l=="function"?l:it(Array.from(l)),i):t},i.offset=function(l){return arguments.length?(r=l??al,i):r},i}function yU(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}al(e,t)}}function gU(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}al(e,t)}}function vU(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,g=p[n-1][1]||0,x=(y-g)/2,b=0;b<c;++b){var w=e[t[b]],N=w[n][1]||0,O=w[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,al(e,t)}}var Nv={},Ov={},W_;function xU(){return W_||(W_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==="__proto__"}e.isUnsafeProperty=t})(Ov)),Ov}var _v={},Z_;function eR(){return Z_||(Z_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){switch(typeof r){case"number":case"symbol":return!1;case"string":return r.includes(".")||r.includes("[")||r.includes("]")}}e.isDeepKey=t})(_v)),_v}var Ev={},J_;function lj(){return J_||(J_=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})(Ev)),Ev}var Av={},Cv={},eE;function bU(){return eE||(eE=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})(Cv)),Cv}var tE;function oj(){return tE||(tE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=bU(),r=lj();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})(Av)),Av}var rE;function uj(){return rE||(rE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=xU(),r=eR(),n=lj(),i=oj();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})(Nv)),Nv}var Tv,nE;function jU(){return nE||(nE=1,Tv=uj().get),Tv}var wU=jU();const Ho=as(wU);var SU=4;function Qi(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:SU,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function Nt(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return e.reduce((i,l,o)=>{var c=r[o-1];return typeof c=="string"?i+c+l:c!==void 0?i+Qi(c)+l:i+l},"")}var qr=e=>e===0?0:e>0?1:-1,oa=e=>typeof e=="number"&&e!=+e,il=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,ge=e=>(typeof e=="number"||e instanceof Number)&&!oa(e),ua=e=>ge(e)||typeof e=="string",NU=0,Bc=e=>{var t=++NU;return"".concat(e||"").concat(t)},Bn=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!ge(t)&&typeof t!="string")return n;var l;if(il(t)){if(r==null)return n;var o=t.indexOf("%");l=r*parseFloat(t.slice(0,o))/100}else l=+t;return oa(l)&&(l=n),i&&r!=null&&l>r&&(l=r),l},tR=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 Ot(e,t,r){return ge(e)&&ge(t)?Qi(e+r*(t-e)):t}function rR(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):Ho(n,t))===r)}var pt=e=>e===null||typeof e>"u",dd=e=>pt(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function Fr(e){return e!=null}function pl(){}var OU=["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 aE(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 iE(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?aE(Object(r),!0).forEach(function(n){_U(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):aE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _U(e,t,r){return(t=EU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function EU(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 CU(e,t){if(e==null)return{};var r,n,i=TU(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 TU(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 nR={symbolCircle:sj,symbolCross:K6,symbolDiamond:Y6,symbolSquare:V6,symbolStar:Z6,symbolTriangle:J6,symbolWye:tU},PU=Math.PI/180,MU=e=>{var t="symbol".concat(dd(e));return nR[t]||sj},RU=(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*PU;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}},DU=(e,t)=>{nR["symbol".concat(dd(e))]=t},cj=e=>{var{type:t="circle",size:r=64,sizeType:n="area"}=e,i=CU(e,OU),l=iE(iE({},i),{},{type:t,size:r,sizeType:n}),o="circle";typeof t=="string"&&(o=t);var c=()=>{var g=MU(o),x=rU().type(g).size(RU(r,n,o)),b=x();if(b!==null)return b},{className:f,cx:h,cy:p}=l,y=Er(l);return ge(h)&&ge(p)&&ge(r)?S.createElement("path",Ix({},y,{className:We("recharts-symbols",f),transform:"translate(".concat(h,", ").concat(p,")"),d:c()})):null};cj.registerSymbol=DU;var aR=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,dj=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(S.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(i=>{rj(i)&&typeof r[i]=="function"&&(n[i]=(l=>r[i](r,l)))}),n},kU=(e,t,r)=>n=>(e(t,r,n),null),Km=(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];rj(i)&&typeof l=="function"&&(n||(n={}),n[i]=kU(l,t,r))}),n};function sE(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 IU(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sE(Object(r),!0).forEach(function(n){LU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function LU(e,t,r){return(t=$U(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $U(e){var t=zU(e,"string");return typeof t=="symbol"?t:t+""}function zU(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function dr(e,t){var r=IU({},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 lE(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 iR(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lE(Object(r),!0).forEach(function(n){BU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function BU(e,t,r){return(t=UU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function UU(e){var t=qU(e,"string");return typeof t=="symbol"?t:t+""}function qU(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 jn=32,FU={align:"center",iconSize:14,inactiveColor:"#ccc",layout:"horizontal",verticalAlign:"middle",labelStyle:{}};function HU(e){if(typeof e=="object"&&e!==null&&"strokeDasharray"in e)return String(e.strokeDasharray)}function KU(e){var{data:t,iconType:r,inactiveColor:n}=e,i=jn/2,l=jn/6,o=jn/3,c=t.inactive?n:t.color,f=r??t.type;if(f==="none")return null;if(f==="plainline")return S.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:HU(t.payload),x1:0,y1:i,x2:jn,y2:i,className:"recharts-legend-icon"});if(f==="line")return S.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(i,"h").concat(o,`
67
- A`).concat(l,",").concat(l,",0,1,1,").concat(2*o,",").concat(i,`
68
- H`).concat(jn,"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 S.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(jn/8,"h").concat(jn,"v").concat(jn*3/4,"h").concat(-jn,"z"),className:"recharts-legend-icon"});if(S.isValidElement(t.legendIcon)){var h=iR({},t);return delete h.legendIcon,S.cloneElement(t.legendIcon,h)}return S.createElement(cj,{fill:c,cx:i,cy:i,size:jn,sizeType:"diameter",type:f})}function GU(e){var{payload:t,iconSize:r,layout:n,formatter:i,inactiveColor:l,iconType:o,labelStyle:c}=e,f={x:0,y:0,width:jn,height:jn},h={display:n==="horizontal"?"inline-block":"block",marginRight:10},p={display:"inline-block",verticalAlign:"middle",marginRight:4};return t.map((y,g)=>{var x=y.formatter||i,b=We({"recharts-legend-item":!0,["legend-item-".concat(g)]:!0,inactive:y.inactive});if(y.type==="none")return null;var w=typeof c=="object"?iR({},c):{};w.color=y.inactive?l:w.color||y.color;var N=x?x(y.value,y,g):y.value;return S.createElement("li",Fh({className:b,style:h,key:"legend-item-".concat(g)},Km(e,y,g)),S.createElement(nj,{width:r,height:r,viewBox:f,style:p,"aria-label":"".concat(y.value," legend icon")},S.createElement(KU,{data:y,iconType:o,inactiveColor:l})),S.createElement("span",{className:"recharts-legend-item-text",style:w},N))})}var YU=e=>{var t=dr(e,FU),{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 S.createElement("ul",{className:"recharts-default-legend",style:l},S.createElement(GU,Fh({},t,{payload:r})))},Pv={},Mv={},oE;function VU(){return oE||(oE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){const i=new Map;for(let 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})(Mv)),Mv}var Rv={},uE;function QU(){return uE||(uE=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})(Rv)),Rv}var Dv={},cE;function sR(){return cE||(cE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r}e.identity=t})(Dv)),Dv}var kv={},Iv={},Lv={},dE;function XU(){return dE||(dE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Number.isSafeInteger(r)&&r>=0}e.isLength=t})(Lv)),Lv}var fE;function lR(){return fE||(fE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=XU();function r(n){return n!=null&&typeof n!="function"&&t.isLength(n.length)}e.isArrayLike=r})(Iv)),Iv}var $v={},hE;function WU(){return hE||(hE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="object"&&r!==null}e.isObjectLike=t})($v)),$v}var mE;function ZU(){return mE||(mE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=lR(),r=WU();function n(i){return r.isObjectLike(i)&&t.isArrayLike(i)}e.isArrayLikeObject=n})(kv)),kv}var zv={},Bv={},pE;function JU(){return pE||(pE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=uj();function r(n){return function(i){return t.get(i,n)}}e.property=r})(Bv)),Bv}var Uv={},qv={},Fv={},Hv={},yE;function oR(){return yE||(yE=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})(Hv)),Hv}var Kv={},gE;function uR(){return gE||(gE=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})(Kv)),Kv}var Gv={},vE;function cR(){return vE||(vE=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})(Gv)),Gv}var xE;function e9(){return xE||(xE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=oR(),r=uR(),n=cR();function i(p,y,g){return typeof g!="function"?i(p,y,()=>{}):l(p,y,function x(b,w,N,O,A,T){const E=g(b,w,N,O,A,T);return E!==void 0?!!E:l(b,w,x,T)},new Map)}function l(p,y,g,x){if(y===p)return!0;switch(typeof y){case"object":return o(p,y,g,x);case"function":return Object.keys(y).length>0?l(p,{...y},g,x):n.isEqualsSameValueZero(p,y);default:return t.isObject(p)?typeof y=="string"?y==="":!0:n.isEqualsSameValueZero(p,y)}}function o(p,y,g,x){if(y==null)return!0;if(Array.isArray(y))return f(p,y,g,x);if(y instanceof Map)return c(p,y,g,x);if(y instanceof Set)return h(p,y,g,x);const b=Object.keys(y);if(p==null||r.isPrimitive(p))return b.length===0;if(b.length===0)return!0;if(x!=null&&x.has(y))return x.get(y)===p;x==null||x.set(y,p);try{for(let w=0;w<b.length;w++){const N=b[w];if(!r.isPrimitive(p)&&!(N in p)||y[N]===void 0&&p[N]!==void 0||y[N]===null&&p[N]!==null||!g(p[N],y[N],N,p,y,x))return!1}return!0}finally{x==null||x.delete(y)}}function c(p,y,g,x){if(y.size===0)return!0;if(!(p instanceof Map))return!1;for(const[b,w]of y.entries()){const N=p.get(b);if(g(N,w,b,p,y,x)===!1)return!1}return!0}function f(p,y,g,x){if(y.length===0)return!0;if(!Array.isArray(p))return!1;const b=new Set;for(let w=0;w<y.length;w++){const N=y[w];let O=!1;for(let A=0;A<p.length;A++){if(b.has(A))continue;const T=p[A];let E=!1;if(g(T,N,w,p,y,x)&&(E=!0),E){b.add(A),O=!0;break}}if(!O)return!1}return!0}function h(p,y,g,x){return y.size===0?!0:p instanceof Set?f([...p],[...y],g,x):!1}e.isMatchWith=i,e.isSetMatch=h})(Fv)),Fv}var bE;function dR(){return bE||(bE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=e9();function r(n,i){return t.isMatchWith(n,i,()=>{})}e.isMatch=r})(qv)),qv}var Yv={},Vv={},Qv={},jE;function t9(){return jE||(jE=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})(Qv)),Qv}var Xv={},wE;function fj(){return wE||(wE=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})(Xv)),Xv}var Wv={},SE;function fR(){return SE||(SE=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]",g="[object ArrayBuffer]",x="[object Object]",b="[object Error]",w="[object DataView]",N="[object Uint8Array]",O="[object Uint8ClampedArray]",A="[object Uint16Array]",T="[object Uint32Array]",E="[object BigUint64Array]",C="[object Int8Array]",M="[object Int16Array]",R="[object Int32Array]",D="[object BigInt64Array]",L="[object Float32Array]",k="[object Float64Array]";e.argumentsTag=l,e.arrayBufferTag=g,e.arrayTag=p,e.bigInt64ArrayTag=D,e.bigUint64ArrayTag=E,e.booleanTag=i,e.dataViewTag=w,e.dateTag=c,e.errorTag=b,e.float32ArrayTag=L,e.float64ArrayTag=k,e.functionTag=y,e.int16ArrayTag=M,e.int32ArrayTag=R,e.int8ArrayTag=C,e.mapTag=f,e.numberTag=n,e.objectTag=x,e.regexpTag=t,e.setTag=h,e.stringTag=r,e.symbolTag=o,e.uint16ArrayTag=A,e.uint32ArrayTag=T,e.uint8ArrayTag=N,e.uint8ClampedArrayTag=O})(Wv)),Wv}var Zv={},NE;function r9(){return NE||(NE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}e.isTypedArray=t})(Zv)),Zv}var OE;function hR(){return OE||(OE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=t9(),r=fj(),n=fR(),i=uR(),l=r9();function o(p,y){return c(p,void 0,p,new Map,y)}function c(p,y,g,x=new Map,b=void 0){const w=b==null?void 0:b(p,y,g,x);if(w!==void 0)return w;if(i.isPrimitive(p))return p;if(x.has(p))return x.get(p);if(Array.isArray(p)){const N=new Array(p.length);x.set(p,N);for(let O=0;O<p.length;O++)N[O]=c(p[O],O,g,x,b);return Object.hasOwn(p,"index")&&(N.index=p.index),Object.hasOwn(p,"input")&&(N.input=p.input),N}if(p instanceof Date)return new Date(p.getTime());if(p instanceof RegExp){const N=new RegExp(p.source,p.flags);return N.lastIndex=p.lastIndex,N}if(p instanceof Map){const N=new Map;x.set(p,N);for(const[O,A]of p)N.set(O,c(A,O,g,x,b));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,g,x,b));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,g,x,b);return N}if(p instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&p instanceof SharedArrayBuffer)return p.slice(0);if(p instanceof DataView){const N=new DataView(p.buffer.slice(0),p.byteOffset,p.byteLength);return x.set(p,N),f(N,p,g,x,b),N}if(typeof File<"u"&&p instanceof File){const N=new File([p],p.name,{type:p.type});return x.set(p,N),f(N,p,g,x,b),N}if(typeof Blob<"u"&&p instanceof Blob){const N=new Blob([p],{type:p.type});return x.set(p,N),f(N,p,g,x,b),N}if(p instanceof Error){const N=structuredClone(p);return x.set(p,N),N.message=p.message,N.name=p.name,N.stack=p.stack,N.cause=p.cause,N.constructor=p.constructor,f(N,p,g,x,b),N}if(p instanceof Boolean){const N=new Boolean(p.valueOf());return x.set(p,N),f(N,p,g,x,b),N}if(p instanceof Number){const N=new Number(p.valueOf());return x.set(p,N),f(N,p,g,x,b),N}if(p instanceof String){const N=new String(p.valueOf());return x.set(p,N),f(N,p,g,x,b),N}if(typeof p=="object"&&h(p)){const N=Object.create(Object.getPrototypeOf(p));return x.set(p,N),f(N,p,g,x,b),N}return p}function f(p,y,g=p,x,b){const w=[...Object.keys(y),...t.getSymbols(y)];for(let N=0;N<w.length;N++){const O=w[N],A=Object.getOwnPropertyDescriptor(p,O);(A==null||A.writable)&&(p[O]=c(y[O],O,g,x,b))}}function h(p){switch(r.getTag(p)){case n.argumentsTag:case n.arrayTag:case n.arrayBufferTag:case n.dataViewTag:case n.booleanTag:case n.dateTag:case n.float32ArrayTag:case n.float64ArrayTag:case n.int8ArrayTag:case n.int16ArrayTag:case n.int32ArrayTag:case n.mapTag:case n.numberTag:case n.objectTag:case n.regexpTag:case n.setTag:case n.stringTag:case n.symbolTag:case n.uint8ArrayTag:case n.uint8ClampedArrayTag:case n.uint16ArrayTag:case n.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=o,e.cloneDeepWithImpl=c,e.copyProperties=f})(Vv)),Vv}var _E;function n9(){return _E||(_E=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=hR();function r(n){return t.cloneDeepWithImpl(n,void 0,n,new Map,void 0)}e.cloneDeep=r})(Yv)),Yv}var EE;function a9(){return EE||(EE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=dR(),r=n9();function n(i){return i=r.cloneDeep(i),l=>t.isMatch(l,i)}e.matches=n})(Uv)),Uv}var Jv={},e0={},t0={},AE;function i9(){return AE||(AE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=hR(),r=fj(),n=fR();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 g={};return p.set(l,g),t.copyProperties(g,l,h,p),g}switch(Object.prototype.toString.call(l)){case n.numberTag:case n.stringTag:case n.booleanTag:{const g=new l.constructor(l==null?void 0:l.valueOf());return t.copyProperties(g,l),g}case n.argumentsTag:{const g={};return t.copyProperties(g,l),g.length=l.length,g[Symbol.iterator]=l[Symbol.iterator],g}default:return}}})}e.cloneDeepWith=i})(t0)),t0}var CE;function s9(){return CE||(CE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=i9();function r(n){return t.cloneDeepWith(n)}e.cloneDeep=r})(e0)),e0}var r0={},n0={},TE;function mR(){return TE||(TE=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})(n0)),n0}var a0={},PE;function l9(){return PE||(PE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=fj();function r(n){return n!==null&&typeof n=="object"&&t.getTag(n)==="[object Arguments]"}e.isArguments=r})(a0)),a0}var ME;function o9(){return ME||(ME=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=eR(),r=mR(),n=l9(),i=oj();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})(r0)),r0}var RE;function u9(){return RE||(RE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=dR(),r=lj(),n=s9(),i=uj(),l=o9();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})(Jv)),Jv}var DE;function c9(){return DE||(DE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=sR(),r=JU(),n=a9(),i=u9();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})(zv)),zv}var kE;function d9(){return kE||(kE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=VU(),r=QU(),n=sR(),i=ZU(),l=c9();function o(c,f=n.identity){return i.isArrayLikeObject(c)?t.uniqBy(Array.from(c),r.ary(l.iteratee(f),1)):[]}e.uniqBy=o})(Pv)),Pv}var i0,IE;function f9(){return IE||(IE=1,i0=d9().uniqBy),i0}var h9=f9();const LE=as(h9);function pR(e,t,r){return t===!0?LE(e,r):typeof t=="function"?LE(e,t):e}var hj=S.createContext(null),m9=e=>e,dt=()=>{var e=S.useContext(hj);return e?e.store.dispatch:m9},Nh=()=>{},p9=()=>Nh,y9=(e,t)=>e===t;function be(e){var t=S.useContext(hj),r=S.useMemo(()=>t?n=>{if(n!=null)return e(n)}:Nh,[t,e]);return W2.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:p9,t?t.store.getState:Nh,t?t.store.getState:Nh,r,y9)}function g9(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function v9(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function x9(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 $E=e=>Array.isArray(e)?e:[e];function b9(e){const t=Array.isArray(e[0])?e[0]:e;return x9(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function j9(e,t){const r=[],{length:n}=e;for(let i=0;i<n;i++)r.push(e[i].apply(null,t));return r}var w9=class{constructor(e){this.value=e}deref(){return this.value}},S9=typeof WeakRef<"u"?WeakRef:w9,N9=0,zE=1;function th(){return{s:N9,v:void 0,o:null,p:null}}function yR(e,t={}){let r=th();const{resultEqualityCheck:n}=t;let i,l=0;function o(){var y;let c=r;const{length:f}=arguments;for(let g=0,x=f;g<x;g++){const b=arguments[g];if(typeof b=="function"||typeof b=="object"&&b!==null){let w=c.o;w===null&&(c.o=w=new WeakMap);const N=w.get(b);N===void 0?(c=th(),w.set(b,c)):c=N}else{let w=c.p;w===null&&(c.p=w=new Map);const N=w.get(b);N===void 0?(c=th(),w.set(b,c)):c=N}}const h=c;let p;if(c.s===zE)p=c.v;else if(p=e.apply(null,arguments),l++,n){const g=((y=i==null?void 0:i.deref)==null?void 0:y.call(i))??i;g!=null&&n(g,p)&&(p=g,l!==0&&l--),i=typeof p=="object"&&p!==null||typeof p=="function"?new S9(p):p}return h.s=zE,h.v=p,p}return o.clearCache=()=>{r=th(),o.resetResultsCount()},o.resultsCount=()=>l,o.resetResultsCount=()=>{l=0},o}function O9(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()),g9(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const p={...r,...f},{memoize:y,memoizeOptions:g=[],argsMemoize:x=yR,argsMemoizeOptions:b=[]}=p,w=$E(g),N=$E(b),O=b9(i),A=y(function(){return l++,h.apply(null,arguments)},...w),T=x(function(){o++;const C=j9(O,arguments);return c=A.apply(null,C),c},...N);return Object.assign(T,{resultFunc:h,memoizedResultFunc:A,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=O9(yR),_9=Object.assign((e,t=V)=>{v9(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:()=>_9}),s0={},l0={},o0={},BE;function E9(){return BE||(BE=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})(o0)),o0}var u0={},c0={},UE;function gR(){return UE||(UE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"||r instanceof Symbol}e.isSymbol=t})(c0)),c0}var qE;function A9(){return qE||(qE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=gR(),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})(u0)),u0}var FE;function C9(){return FE||(FE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=E9(),r=A9(),n=oj();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,b)=>{let w=x;for(let N=0;N<b.length&&w!=null;++N)w=w[b[N]];return w},p=(x,b)=>b==null||x==null?b:typeof x=="object"&&"key"in x?Object.hasOwn(b,x.key)?b[x.key]:h(b,x.path):typeof x=="function"?x(b):Array.isArray(x)?h(b,x):typeof b=="object"?b[x]:b,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(b=>p(b,x))})).slice().sort((x,b)=>{for(let w=0;w<y.length;w++){const N=t.compareValues(x.criteria[w],b.criteria[w],c[w]);if(N!==0)return N}return 0}).map(x=>x.original)}e.orderBy=i})(l0)),l0}var d0={},HE;function T9(){return HE||(HE=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})(d0)),d0}var f0={},KE;function vR(){return KE||(KE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=mR(),r=lR(),n=oR(),i=cR();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})(f0)),f0}var GE;function P9(){return GE||(GE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=C9(),r=T9(),n=vR();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})(s0)),s0}var h0,YE;function M9(){return YE||(YE=1,h0=P9().sortBy),h0}var R9=M9();const Gm=as(R9);var xR=e=>e.legend.settings,D9=e=>e.legend.size,k9=e=>e.legend.payload,I9=V([k9,xR],(e,t)=>{var{itemSorter:r}=t,n=e.flat(1);return r?Gm(n,r):n});function L9(){return be(I9)}var rh=1;function bR(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,r]=S.useState({height:0,left:0,top:0,width:0}),n=S.useCallback(i=>{if(i!=null){var l=i.getBoundingClientRect(),o={height:l.height,left:l.left,top:l.top,width:l.width};(Math.abs(o.height-t.height)>rh||Math.abs(o.left-t.left)>rh||Math.abs(o.top-t.top)>rh||Math.abs(o.width-t.width)>rh)&&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 lr(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 $9=typeof Symbol=="function"&&Symbol.observable||"@@observable",VE=$9,m0=()=>Math.random().toString(36).substring(7).split("").join("."),z9={INIT:`@@redux/INIT${m0()}`,REPLACE:`@@redux/REPLACE${m0()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${m0()}`},Hh=z9;function mj(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 jR(e,t,r){if(typeof e!="function")throw new Error(lr(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(lr(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(lr(1));return r(jR)(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(lr(3));return i}function y(N){if(typeof N!="function")throw new Error(lr(4));if(f)throw new Error(lr(5));let O=!0;h();const A=c++;return o.set(A,N),function(){if(O){if(f)throw new Error(lr(6));O=!1,h(),o.delete(A),l=null}}}function g(N){if(!mj(N))throw new Error(lr(7));if(typeof N.type>"u")throw new Error(lr(8));if(typeof N.type!="string")throw new Error(lr(17));if(f)throw new Error(lr(9));try{f=!0,i=n(i,N)}finally{f=!1}return(l=o).forEach(A=>{A()}),N}function x(N){if(typeof N!="function")throw new Error(lr(10));n=N,g({type:Hh.REPLACE})}function b(){const N=y;return{subscribe(O){if(typeof O!="object"||O===null)throw new Error(lr(11));function A(){const E=O;E.next&&E.next(p())}return A(),{unsubscribe:N(A)}},[VE](){return this}}}return g({type:Hh.INIT}),{dispatch:g,subscribe:y,getState:p,replaceReducer:x,[VE]:b}}function B9(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:Hh.INIT})>"u")throw new Error(lr(12));if(typeof r(void 0,{type:Hh.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(lr(13))})}function wR(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{B9(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],g=r[y],x=o[y],b=g(x,c);if(typeof b>"u")throw c&&c.type,new Error(lr(14));h[y]=b,f=f||b!==x}return f=f||n.length!==Object.keys(o).length,f?h:o}}function Kh(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function U9(...e){return t=>(r,n)=>{const i=t(r,n);let l=()=>{throw new Error(lr(15))};const o={getState:i.getState,dispatch:(f,...h)=>l(f,...h)},c=e.map(f=>f(o));return l=Kh(...c)(i.dispatch),{...i,dispatch:l}}}function SR(e){return mj(e)&&"type"in e&&typeof e.type=="string"}var NR=Symbol.for("immer-nothing"),QE=Symbol.for("immer-draftable"),Ar=Symbol.for("immer-state");function Dn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var rn=Object,Ko=rn.getPrototypeOf,Gh="constructor",Ym="prototype",Lx="configurable",Yh="enumerable",Oh="writable",Uc="value",Va=e=>!!e&&!!e[Ar];function Un(e){var t;return e?OR(e)||Qm(e)||!!e[QE]||!!((t=e[Gh])!=null&&t[QE])||Xm(e)||Wm(e):!1}var q9=rn[Ym][Gh].toString(),XE=new WeakMap;function OR(e){if(!e||!pj(e))return!1;const t=Ko(e);if(t===null||t===rn[Ym])return!0;const r=rn.hasOwnProperty.call(t,Gh)&&t[Gh];if(r===Object)return!0;if(!bo(r))return!1;let n=XE.get(r);return n===void 0&&(n=Function.toString.call(r),XE.set(r,n)),n===q9}function Vm(e,t,r=!0){fd(e)===0?(r?Reflect.ownKeys(e):rn.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function fd(e){const t=e[Ar];return t?t.type_:Qm(e)?1:Xm(e)?2:Wm(e)?3:0}var WE=(e,t,r=fd(e))=>r===2?e.has(t):rn[Ym].hasOwnProperty.call(e,t),$x=(e,t,r=fd(e))=>r===2?e.get(t):e[t],Vh=(e,t,r,n=fd(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function F9(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Qm=Array.isArray,Xm=e=>e instanceof Map,Wm=e=>e instanceof Set,pj=e=>typeof e=="object",bo=e=>typeof e=="function",p0=e=>typeof e=="boolean";function H9(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var Da=e=>e.copy_||e.base_,yj=e=>e.modified_?e.copy_:e.base_;function zx(e,t){if(Xm(e))return new Map(e);if(Wm(e))return new Set(e);if(Qm(e))return Array[Ym].slice.call(e);const r=OR(e);if(t===!0||t==="class_only"&&!r){const n=rn.getOwnPropertyDescriptors(e);delete n[Ar];let i=Reflect.ownKeys(n);for(let l=0;l<i.length;l++){const o=i[l],c=n[o];c[Oh]===!1&&(c[Oh]=!0,c[Lx]=!0),(c.get||c.set)&&(n[o]={[Lx]:!0,[Oh]:!0,[Yh]:c[Yh],[Uc]:e[o]})}return rn.create(Ko(e),n)}else{const n=Ko(e);if(n!==null&&r)return{...e};const i=rn.create(n);return rn.assign(i,e)}}function gj(e,t=!1){return Zm(e)||Va(e)||!Un(e)||(fd(e)>1&&rn.defineProperties(e,{set:nh,add:nh,clear:nh,delete:nh}),rn.freeze(e),t&&Vm(e,(r,n)=>{gj(n,!0)},!1)),e}function K9(){Dn(2)}var nh={[Uc]:K9};function Zm(e){return e===null||!pj(e)?!0:rn.isFrozen(e)}var Qh="MapSet",Bx="Patches",ZE="ArrayMethods",_R={};function sl(e){const t=_R[e];return t||Dn(0,e),t}var JE=e=>!!_R[e],qc,ER=()=>qc,G9=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:JE(Qh)?sl(Qh):void 0,arrayMethodsPlugin_:JE(ZE)?sl(ZE):void 0});function eA(e,t){t&&(e.patchPlugin_=sl(Bx),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ux(e){qx(e),e.drafts_.forEach(Y9),e.drafts_=null}function qx(e){e===qc&&(qc=e.parent_)}var tA=e=>qc=G9(qc,e);function Y9(e){const t=e[Ar];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function rA(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[Ar].modified_&&(Ux(t),Dn(4)),Un(e)&&(e=nA(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(r[Ar].base_,e,t)}else e=nA(t,r);return V9(t,e,!0),Ux(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==NR?e:void 0}function nA(e,t){if(Zm(t))return t;const r=t[Ar];if(!r)return Xh(t,e.handledSet_,e);if(!Jm(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);TR(r,e)}return r.copy_}function V9(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&gj(t,r)}function AR(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Jm=(e,t)=>e.scope_===t,Q9=[];function CR(e,t,r,n){const i=Da(e),l=e.type_;if(n!==void 0&&$x(i,n,l)===t){Vh(i,n,r,l);return}if(!e.draftLocations_){const c=e.draftLocations_=new Map;Vm(i,(f,h)=>{if(Va(h)){const p=c.get(h)||[];p.push(f),c.set(h,p)}})}const o=e.draftLocations_.get(t)??Q9;for(const c of o)Vh(i,c,r,l)}function X9(e,t,r){e.callbacks_.push(function(i){var c;const l=t;if(!l||!Jm(l,i))return;(c=i.mapSetPlugin_)==null||c.fixSetContents(l);const o=yj(l);CR(e,l.draft_??l,o,r),TR(l,i)})}function TR(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)}AR(e)}}function W9(e,t,r){const{scope_:n}=e;if(Va(r)){const i=r[Ar];Jm(i,n)&&i.callbacks_.push(function(){_h(e);const o=yj(i);CR(e,r,o,t)})}else Un(r)&&e.callbacks_.push(function(){const l=Da(e);e.type_===3?l.has(r)&&Xh(r,n.handledSet_,n):$x(l,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Xh($x(e.copy_,t,e.type_),n.handledSet_,n)})}function Xh(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||Va(e)||t.has(e)||!Un(e)||Zm(e)||(t.add(e),Vm(e,(n,i)=>{if(Va(i)){const l=i[Ar];if(Jm(l,r)){const o=yj(l);Vh(e,n,o,e.type_),AR(l)}}else Un(i)&&Xh(i,t,r)})),e}function Z9(e,t){const r=Qm(e),n={type_:r?1:0,scope_:t?t.scope_:ER(),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=Fc);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===Ar)return e;let r=e.scope_.arrayMethodsPlugin_;const n=e.type_===1&&typeof t=="string";if(n&&r!=null&&r.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);const i=Da(e);if(!WE(i,t,e.type_))return J9(e,i,t);const l=i[t];if(e.finalized_||!Un(l)||n&&e.operationMethod&&(r!=null&&r.isMutatingArrayMethod(e.operationMethod))&&H9(t))return l;if(l===y0(e.base_,t)){_h(e);const o=e.type_===1?+t:t,c=Hx(e.scope_,l,e,o);return e.copy_[o]=c}return l},has(e,t){return t in Da(e)},ownKeys(e){return Reflect.ownKeys(Da(e))},set(e,t,r){const n=PR(Da(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=y0(Da(e),t),l=i==null?void 0:i[Ar];if(l&&l.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(F9(r,i)&&(r!==void 0||WE(e.base_,t,e.type_)))return!0;_h(e),Fx(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),W9(e,t,r)),!0},deleteProperty(e,t){return _h(e),y0(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Fx(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Da(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[Oh]:!0,[Lx]:e.type_!==1||t!=="length",[Yh]:n[Yh],[Uc]:r[t]}},defineProperty(){Dn(11)},getPrototypeOf(e){return Ko(e.base_)},setPrototypeOf(){Dn(12)}},Fc={};for(let e in Wh){let t=Wh[e];Fc[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}Fc.deleteProperty=function(e,t){return Fc.set.call(this,e,t,void 0)};Fc.set=function(e,t,r){return Wh.set.call(this,e[0],t,r,e[0])};function y0(e,t){const r=e[Ar];return(r?Da(r):e)[t]}function J9(e,t,r){var i;const n=PR(t,r);return n?Uc in n?n[Uc]:(i=n.get)==null?void 0:i.call(e.draft_):void 0}function PR(e,t){if(!(t in e))return;let r=Ko(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Ko(r)}}function Fx(e){e.modified_||(e.modified_=!0,e.parent_&&Fx(e.parent_))}function _h(e){e.copy_||(e.assigned_=new Map,e.copy_=zx(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var eq=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(r,n,i)=>{if(bo(r)&&!bo(n)){const o=n;n=r;const c=this;return function(h=o,...p){return c.produce(h,y=>n.call(this,y,...p))}}bo(n)||Dn(6),i!==void 0&&!bo(i)&&Dn(7);let l;if(Un(r)){const o=tA(this),c=Hx(o,r,void 0);let f=!0;try{l=n(c),f=!1}finally{f?Ux(o):qx(o)}return eA(o,i),rA(l,o)}else if(!r||!pj(r)){if(l=n(r),l===void 0&&(l=r),l===NR&&(l=void 0),this.autoFreeze_&&gj(l,!0),i){const o=[],c=[];sl(Bx).generateReplacementPatches_(r,l,{patches_:o,inversePatches_:c}),i(o,c)}return l}else Dn(1,r)},this.produceWithPatches=(r,n)=>{if(bo(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]},p0(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),p0(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),p0(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){Un(t)||Dn(8),Va(t)&&(t=On(t));const r=tA(this),n=Hx(r,t,void 0);return n[Ar].isManual_=!0,qx(r),n}finishDraft(t,r){const n=t&&t[Ar];(!n||!n.isManual_)&&Dn(9);const{scope_:i}=n;return eA(i,r),rA(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=sl(Bx).applyPatches_;return Va(t)?i(t,r):this.produce(t,l=>i(l,r))}};function Hx(e,t,r,n){const[i,l]=Xm(t)?sl(Qh).proxyMap_(t,r):Wm(t)?sl(Qh).proxySet_(t,r):Z9(t,r);return((r==null?void 0:r.scope_)??ER()).drafts_.push(i),l.callbacks_=(r==null?void 0:r.callbacks_)??[],l.key_=n,r&&n!==void 0?X9(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 On(e){return Va(e)||Dn(10,e),MR(e)}function MR(e){if(!Un(e)||Zm(e))return e;const t=e[Ar];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 Vm(r,(i,l)=>{Vh(r,i,MR(l))},n),t&&(t.finalized_=!1),r}var tq=new eq,RR=tq.produce;function DR(e){return({dispatch:r,getState:n})=>i=>l=>typeof l=="function"?l(r,n,e):i(l)}var rq=DR(),nq=DR,aq=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Kh:Kh.apply(null,arguments)};function sn(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error(nn(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>SR(n)&&n.type===e,r}var kR=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 aA(e){return Un(e)?RR(e,()=>{}):e}function ah(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function iq(e){return typeof e=="boolean"}var sq=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:l=!0}=t??{};let o=new kR;return r&&(iq(r)?o.push(rq):o.push(nq(r.extraArgument))),o},IR="RTK_autoBatch",ut=()=>e=>({payload:e,meta:{[IR]:!0}}),iA=e=>t=>{setTimeout(t,e)},LR=(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:iA(10):e.type==="callback"?e.queueNotification:iA(e.timeout),h=()=>{o=!1,l&&(l=!1,c.forEach(p=>p()))};return Object.assign({},n,{subscribe(p){const y=()=>i&&p(),g=n.subscribe(y);return c.add(p),()=>{g(),c.delete(p)}},dispatch(p){var y;try{return i=!((y=p==null?void 0:p.meta)!=null&&y[IR]),l=!i,l&&(o||(o=!0,f(h))),n.dispatch(p)}finally{i=!0}}})},lq=e=>function(r){const{autoBatch:n=!0}=r??{};let i=new kR(e);return n&&i.push(LR(typeof n=="object"?n:void 0)),i};function oq(e){const t=sq(),{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(mj(r))c=wR(r);else throw new Error(nn(1));let f;typeof n=="function"?f=n(t):f=t();let h=Kh;i&&(h=aq({trace:!1,...typeof i=="object"&&i}));const p=U9(...f),y=lq(p);let g=typeof o=="function"?o(y):y();const x=h(...g);return jR(c,l,x)}function $R(e){const t={},r=[];let n;const i={addCase(l,o){const c=typeof l=="string"?l:l.type;if(!c)throw new Error(nn(28));if(c in t)throw new Error(nn(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 uq(e){return typeof e=="function"}function cq(e,t){let[r,n,i]=$R(t),l;if(uq(e))l=()=>aA(e());else{const c=aA(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(Va(p)){const x=y(p,f);return x===void 0?p:x}else{if(Un(p))return RR(p,g=>y(g,f));{const g=y(p,f);if(g===void 0){if(p===null)return p;throw Error("A case reducer on a non-draftable value must not return undefined")}return g}}return p},c)}return o.getInitialState=l,o}var dq="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",fq=(e=21)=>{let t="",r=e;for(;r--;)t+=dq[Math.random()*64|0];return t},hq=Symbol.for("rtk-slice-createasyncthunk");function mq(e,t){return`${e}/${t}`}function pq({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[hq];return function(i){const{name:l,reducerPath:o=l}=i;if(!l)throw new Error(nn(11));const c=(typeof i.reducers=="function"?i.reducers(gq()):i.reducers)||{},f=Object.keys(c),h={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},p={addCase(E,C){const M=typeof E=="string"?E:E.type;if(!M)throw new Error(nn(12));if(M in h.sliceCaseReducersByType)throw new Error(nn(13));return h.sliceCaseReducersByType[M]=C,p},addMatcher(E,C){return h.sliceMatchers.push({matcher:E,reducer:C}),p},exposeAction(E,C){return h.actionCreators[E]=C,p},exposeCaseReducer(E,C){return h.sliceCaseReducersByName[E]=C,p}};f.forEach(E=>{const C=c[E],M={reducerName:E,type:mq(l,E),createNotation:typeof i.reducers=="function"};xq(C)?jq(M,C,p,t):vq(M,C,p)});function y(){const[E={},C=[],M=void 0]=typeof i.extraReducers=="function"?$R(i.extraReducers):[i.extraReducers],R={...E,...h.sliceCaseReducersByType};return cq(i.initialState,D=>{for(let L in R)D.addCase(L,R[L]);for(let L of h.sliceMatchers)D.addMatcher(L.matcher,L.reducer);for(let L of C)D.addMatcher(L.matcher,L.reducer);M&&D.addDefaultCase(M)})}const g=E=>E,x=new Map,b=new WeakMap;let w;function N(E,C){return w||(w=y()),w(E,C)}function O(){return w||(w=y()),w.getInitialState()}function A(E,C=!1){function M(D){let L=D[E];return typeof L>"u"&&C&&(L=ah(b,M,O)),L}function R(D=g){const L=ah(x,C,()=>new WeakMap);return ah(L,D,()=>{const k={};for(const[F,q]of Object.entries(i.selectors??{}))k[F]=yq(q,D,()=>ah(b,D,O),C);return k})}return{reducerPath:E,getSelectors:R,get selectors(){return R(M)},selectSlice:M}}const T={name:l,reducer:N,actions:h.actionCreators,caseReducers:h.sliceCaseReducersByName,getInitialState:O,...A(o),injectInto(E,{reducerPath:C,...M}={}){const R=C??o;return E.inject({reducerPath:R,reducer:N},M),{...T,...A(R,!0)}}};return T}}function yq(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 xr=pq();function gq(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function vq({type:e,reducerName:t,createNotation:r},n,i){let l,o;if("reducer"in n){if(r&&!bq(n))throw new Error(nn(17));l=n.reducer,o=n.prepare}else l=n;i.addCase(e,l).exposeCaseReducer(t,l).exposeAction(t,o?sn(e,o):sn(e))}function xq(e){return e._reducerDefinitionType==="asyncThunk"}function bq(e){return e._reducerDefinitionType==="reducerWithPrepare"}function jq({type:e,reducerName:t},r,n,i){if(!i)throw new Error(nn(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||ih,pending:c||ih,rejected:f||ih,settled:h||ih})}function ih(){}var wq="task",zR="listener",BR="completed",vj="cancelled",Sq=`task-${vj}`,Nq=`task-${BR}`,Kx=`${zR}-${vj}`,Oq=`${zR}-${BR}`,ep=class{constructor(e){ev(this,"name","TaskAbortError");ev(this,"message");this.code=e,this.message=`${wq} ${vj} (reason: ${e})`}},xj=(e,t)=>{if(typeof e!="function")throw new TypeError(nn(32))},Zh=()=>{},UR=(e,t=Zh)=>(e.catch(t),e),qR=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),Js=e=>{if(e.aborted)throw new ep(e.reason)};function FR(e,t){let r=Zh;return new Promise((n,i)=>{const l=()=>i(new ep(e.reason));if(e.aborted){l();return}r=qR(e,l),t.finally(()=>r()).then(n,i)}).finally(()=>{r=Zh})}var _q=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof ep?"cancelled":"rejected",error:r}}finally{t==null||t()}},Jh=e=>t=>UR(FR(e,t).then(r=>(Js(e),r))),HR=e=>{const t=Jh(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:Oo}=Object,sA={},tp="listenerMiddleware",Eq=(e,t)=>{const r=n=>qR(e,()=>n.abort(e.reason));return(n,i)=>{xj(n);const l=new AbortController;r(l);const o=_q(async()=>{Js(e),Js(l.signal);const c=await n({pause:Jh(l.signal),delay:HR(l.signal),signal:l.signal});return Js(l.signal),c},()=>l.abort(Nq));return i!=null&&i.autoJoin&&t.push(o.catch(Zh)),{result:Jh(e)(o),cancel(){l.abort(Sq)}}}},Aq=(e,t)=>{const r=async(n,i)=>{Js(t);let l=()=>{};const c=[new Promise((f,h)=>{let p=e({predicate:n,effect:(y,g)=>{g.unsubscribe(),f([y,g.getState(),g.getOriginalState()])}});l=()=>{p(),h()}})];i!=null&&c.push(new Promise(f=>setTimeout(f,i,null)));try{const f=await FR(t,Promise.race(c));return Js(t),f}finally{l()}};return(n,i)=>UR(r(n,i))},KR=e=>{let{type:t,actionCreator:r,matcher:n,predicate:i,effect:l}=e;if(t)i=sn(t).match;else if(r)t=r.type,i=r.match;else if(n)i=n;else if(!i)throw new Error(nn(21));return xj(l),{predicate:i,type:t,effect:l}},GR=Oo(e=>{const{type:t,predicate:r,effect:n}=KR(e);return{id:fq(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(nn(22))}}},{withTypes:()=>GR}),lA=(e,t)=>{const{type:r,effect:n,predicate:i}=KR(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)})},Cq=(e,t)=>()=>{for(const r of t.keys())Gx(r);e.clear()},oA=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},YR=Oo(sn(`${tp}/add`),{withTypes:()=>YR}),Tq=sn(`${tp}/removeAll`),VR=Oo(sn(`${tp}/remove`),{withTypes:()=>VR}),Pq=(...e)=>{console.error(`${tp}/error`,...e)},hd=(e={})=>{const t=new Map,r=new Map,n=x=>{const b=r.get(x)??0;r.set(x,b+1)},i=x=>{const b=r.get(x)??1;b===1?r.delete(x):r.set(x,b-1)},{extra:l,onError:o=Pq}=e;xj(o);const c=x=>(x.unsubscribe=()=>t.delete(x.id),t.set(x.id,x),b=>{x.unsubscribe(),b!=null&&b.cancelActive&&Gx(x)}),f=x=>{const b=lA(t,x)??GR(x);return c(b)};Oo(f,{withTypes:()=>f});const h=x=>{const b=lA(t,x);return b&&(b.unsubscribe(),x.cancelActive&&Gx(b)),!!b};Oo(h,{withTypes:()=>h});const p=async(x,b,w,N)=>{const O=new AbortController,A=Aq(f,O.signal),T=[];try{x.pending.add(O),n(x),await Promise.resolve(x.effect(b,Oo({},w,{getOriginalState:N,condition:(E,C)=>A(E,C).then(Boolean),take:A,delay:HR(O.signal),pause:Jh(O.signal),extra:l,signal:O.signal,fork:Eq(O.signal,T),unsubscribe:x.unsubscribe,subscribe:()=>{t.set(x.id,x)},cancelActiveListeners:()=>{x.pending.forEach((E,C,M)=>{E!==O&&(E.abort(Kx),M.delete(E))})},cancel:()=>{O.abort(Kx),x.pending.delete(O)},throwIfCancelled:()=>{Js(O.signal)}})))}catch(E){E instanceof ep||oA(o,E,{raisedBy:"effect"})}finally{await Promise.all(T),O.abort(Oq),i(x),x.pending.delete(O)}},y=Cq(t,r);return{middleware:x=>b=>w=>{if(!SR(w))return b(w);if(YR.match(w))return f(w.payload);if(Tq.match(w)){y();return}if(VR.match(w))return h(w.payload);let N=x.getState();const O=()=>{if(N===sA)throw new Error(nn(23));return N};let A;try{if(A=b(w),t.size>0){const T=x.getState(),E=Array.from(t.values());for(const C of E){let M=!1;try{M=C.predicate(w,T,N)}catch(R){M=!1,oA(o,R,{raisedBy:"predicate"})}M&&p(C,w,x,O)}}}finally{N=sA}return A},startListening:f,stopListening:h,clearListeners:y}};function nn(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Mq={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},QR=xr({name:"chartLayout",initialState:Mq,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:Rq,setLayout:Dq,setChartSize:kq,setScale:Iq}=QR.actions,Lq=QR.reducer;function XR(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function Ue(e){return Number.isFinite(e)}function ca(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}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 wo(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){$q(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 $q(e,t,r){return(t=zq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zq(e){var t=Bq(e,"string");return typeof t=="symbol"?t:t+""}function Bq(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Pt(e,t,r){return pt(e)||pt(t)?r:ua(t)?Ho(e,t,r):typeof t=="function"?t(e):r}var Uq=(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"&&ge(e[l]))return wo(wo({},e),{},{[l]:e[l]+(n||0)});if((c==="horizontal"||c==="vertical"&&l==="center")&&o!=="middle"&&ge(e[o]))return wo(wo({},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",WR=(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},ZR=(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:g,axisType:x}=e;if(!o)return null;var b=c==="scaleBand"&&o.bandwidth?o.bandwidth()/2:2,w=i==="category"&&o.bandwidth?o.bandwidth()/b:0;if(w=x==="angleAxis"&&l&&l.length>=2?qr(l[0]-l[1])*2*w:w,y||g){var N=(y||g||[]).map((O,A)=>{var T=n?n.indexOf(O):O,E=o.map(T);return Ue(E)?{coordinate:E+w,value:O,offset:w,index:A}:null}).filter(Fr);return N}return f&&h?h.map((O,A)=>{var T=o.map(O);return Ue(T)?{coordinate:T+w,value:O,index:A,offset:w}:null}).filter(Fr):o.ticks&&p!=null?o.ticks(p).map((O,A)=>{var T=o.map(O);return Ue(T)?{coordinate:T+w,value:O,index:A,offset:w}:null}).filter(Fr):o.domain().map((O,A)=>{var T=o.map(O);return Ue(T)?{coordinate:T+w,value:n?n[O]:O,index:A,offset:w}:null}).filter(Fr)},qq=(e,t)=>{if(!t||t.length!==2||!ge(t[0])||!ge(t[1]))return e;var r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!ge(e[0])||e[0]<r)&&(i[0]=r),(!ge(e[1])||e[1]>n)&&(i[1]=n),i[0]>n&&(i[0]=n),i[1]<r&&(i[1]=r),i},Fq=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],g=oa(p)?y:p;g>=0?(h[0]=l,l+=g,h[1]=l):(h[0]=o,o+=g,h[1]=o)}}}},Hq=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=oa(f[1])?f[0]:f[1];h>=0?(f[0]=l,l+=h,f[1]=l):(f[0]=0,f[1]=0)}}}},Kq={sign:Fq,expand:yU,none:al,silhouette:gU,wiggle:vU,positive:Hq},Gq=(e,t,r)=>{var n,i=(n=Kq[r])!==null&&n!==void 0?n:al,l=pU().keys(t).value((c,f)=>Number(Pt(c,f,0))).order(kx).offset(i),o=l(e);return o.forEach((c,f)=>{c.forEach((h,p)=>{var y=Pt(e[p],t[f],0);Array.isArray(y)&&y.length===2&&ge(y[0])&&ge(y[1])&&(h[0]=y[0],h[1]=y[1])})}),o};function Yq(e){return e==null?void 0:String(e)}function cA(e){var{axis:t,ticks:r,bandSize:n,entry:i,index:l,dataKey:o}=e;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!pt(i[t.dataKey])){var c=rR(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=Pt(i,pt(o)?t.dataKey:o),h=t.scale.map(f);return ge(h)?h:null}var dA=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=Pt(l,t.dataKey,t.scale.domain()[o]);if(pt(c))return null;var f=t.scale.map(c);return ge(f)?f-i/2+n:null},Vq=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]},Qq=e=>{var t=e.flat(2).filter(ge);return[Math.min(...t),Math.max(...t)]},Xq=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],Wq=(e,t,r)=>{if(e!=null)return Xq(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=XR(h,t,r),y=Qq(p);return!Ue(y[0])||!Ue(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]))},fA=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,hA=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Go=(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=Gm(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 mA(e){var{tooltipEntrySettings:t,dataKey:r,payload:n,value:i,name:l}=e;return wo(wo({},t),{},{dataKey:r,payload:n,value:i,name:l})}function rp(e,t){if(e)return String(e);if(typeof t=="string")return t}var Zq=(e,t)=>{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},Jq=(e,t)=>t==="centric"?e.angle:e.radius,Ja=e=>e.layout.width,ei=e=>e.layout.height,e7=e=>e.layout.scale,JR=e=>e.layout.margin,np=V(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),ap=V(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),t7="data-recharts-item-index",r7="data-recharts-item-id",md=60;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 sh(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){n7(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 n7(e,t,r){return(t=a7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a7(e){var t=i7(e,"string");return typeof t=="symbol"?t:t+""}function i7(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 s7=e=>e.brush.height;function l7(e){var t=ap(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:md;return r+i}return r},0)}function o7(e){var t=ap(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:md;return r+i}return r},0)}function u7(e){var t=np(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function c7(e){var t=np(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var Wt=V([Ja,ei,JR,s7,l7,o7,u7,c7,xR,D9],(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},g=sh(sh({},y),p),x=g.bottom;g.bottom+=n,g=Uq(g,f,h);var b=e-g.left-g.right,w=t-g.top-g.bottom;return sh(sh({brushBottom:x},g),{},{width:Math.max(b,0),height:Math.max(w,0)})}),d7=V(Wt,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),bj=V(Ja,ei,(e,t)=>({x:0,y:0,width:e,height:t})),f7=S.createContext(null),br=()=>S.useContext(f7)!=null,ip=e=>e.brush,sp=V([ip,Wt,JR],(e,t,r)=>({height:e.height,x:ge(e.x)?e.x:t.left,y:ge(e.y)?e.y:t.top+t.height+t.brushBottom-((r==null?void 0:r.bottom)||0),width:ge(e.width)?e.width:t.width})),g0={},v0={},x0={},yA;function h7(){return yA||(yA=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(),w()};let g=null;const x=()=>{g!=null&&clearTimeout(g),g=setTimeout(()=>{g=null,y()},n)},b=()=>{g!==null&&(clearTimeout(g),g=null)},w=()=>{b(),o=void 0,c=null},N=()=>{p()},O=function(...A){if(i!=null&&i.aborted)return;o=this,c=A;const T=g==null;x(),f&&T&&p()};return O.schedule=x,O.cancel=w,O.flush=N,i==null||i.addEventListener("abort",w,{once:!0}),O}e.debounce=t})(x0)),x0}var gA;function m7(){return gA||(gA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=h7();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 g=t.debounce(function(...w){p=n.apply(this,w),y=null},i,{edges:h}),x=function(...w){return f!=null&&(y===null&&(y=Date.now()),Date.now()-y>=f)?(p=n.apply(this,w),y=Date.now(),g.cancel(),g.schedule(),p):(g.apply(this,w),p)},b=()=>(g.flush(),p);return x.cancel=g.cancel,x.flush=b,x}e.debounce=r})(v0)),v0}var vA;function p7(){return vA||(vA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=m7();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})(g0)),g0}var b0,xA;function y7(){return xA||(xA=1,b0=p7().throttle),b0}var g7=y7();const v7=as(g7);var em=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++]))}},aa={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},e3=(e,t,r)=>{var{width:n=aa.width,height:i=aa.height,aspect:l,maxHeight:o}=r,c=il(n)?e:Number(n),f=il(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}},x7={width:0,height:0,overflow:"visible"},b7={width:0,overflowX:"visible"},j7={height:0,overflowY:"visible"},w7={},S7=e=>{var{width:t,height:r}=e,n=il(t),i=il(r);return n&&i?x7:n?b7:i?j7:w7};function N7(e){var{width:t,height:r,aspect:n}=e,i=t,l=r;return i===void 0&&l===void 0?(i=aa.width,l=aa.height):i===void 0?i=n&&n>0?void 0:aa.width:l===void 0&&(l=n&&n>0?void 0:aa.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 bA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function jA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bA(Object(r),!0).forEach(function(n){O7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function O7(e,t,r){return(t=_7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _7(e){var t=E7(e,"string");return typeof t=="symbol"?t:t+""}function E7(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 t3=S.createContext(aa.initialDimension);function A7(e){return ca(e.width)&&ca(e.height)}function r3(e){var{children:t,width:r,height:n}=e,i=S.useMemo(()=>({width:r,height:n}),[r,n]);return A7(i)?S.createElement(t3.Provider,{value:i},t):null}var jj=()=>S.useContext(t3),C7=S.forwardRef((e,t)=>{var{aspect:r,initialDimension:n=aa.initialDimension,width:i,height:l,minWidth:o=aa.minWidth,minHeight:c,maxHeight:f,children:h,debounce:p=aa.debounce,id:y,className:g,onResize:x,style:b={}}=e,w=S.useRef(null),N=S.useRef();N.current=x,S.useImperativeHandle(t,()=>w.current);var[O,A]=S.useState({containerWidth:n.width,containerHeight:n.height}),T=S.useCallback((D,L)=>{A(k=>{var F=Math.round(D),q=Math.round(L);return k.containerWidth===F&&k.containerHeight===q?k:{containerWidth:F,containerHeight:q}})},[]);S.useEffect(()=>{if(w.current==null||typeof ResizeObserver>"u")return pl;var D=q=>{var ie,ee=q[0];if(ee!=null){var{width:ne,height:z}=ee.contentRect;T(ne,z),(ie=N.current)===null||ie===void 0||ie.call(N,ne,z)}};p>0&&(D=v7(D,p,{trailing:!0,leading:!1}));var L=new ResizeObserver(D),{width:k,height:F}=w.current.getBoundingClientRect();return T(k,F),L.observe(w.current),()=>{L.disconnect()}},[T,p]);var{containerWidth:E,containerHeight:C}=O;em(!r||r>0,"The aspect(%s) must be greater than zero.",r);var{calculatedWidth:M,calculatedHeight:R}=e3(E,C,{width:i,height:l,aspect:r,maxHeight:f});return em(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),S.createElement("div",{id:y?"".concat(y):void 0,className:We("recharts-responsive-container",g),style:jA(jA({},b),{},{width:i,height:l,minWidth:o,minHeight:c,maxHeight:f}),ref:w},S.createElement("div",{style:S7({width:i,height:l})},S.createElement(r3,{width:M,height:R},h)))}),wj=S.forwardRef((e,t)=>{var r=jj();if(ca(r.width)&&ca(r.height))return e.children;var{width:n,height:i}=N7({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:l,calculatedHeight:o}=e3(void 0,void 0,{width:n,height:i,aspect:e.aspect,maxHeight:e.maxHeight});return ge(l)&&ge(o)?S.createElement(r3,{width:l,height:o},e.children):S.createElement(C7,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 lp=()=>{var e,t=br(),r=be(d7),n=be(sp),i=(e=be(ip))===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}},T7={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},n3=()=>{var e;return(e=be(Wt))!==null&&e!==void 0?e:T7},Nj=()=>be(Ja),Oj=()=>be(ei),P7=()=>be(e=>e.layout.margin),Ze=e=>e.layout.layoutType,yl=()=>be(Ze),a3=()=>{var e=yl();if(e==="horizontal"||e==="vertical")return e},i3=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},M7=()=>{var e=yl();return e!==void 0},pd=e=>{var t=dt(),r=br(),{width:n,height:i}=e,l=jj(),o=n,c=i;return l&&(o=l.width>0?l.width:n,c=l.height>0?l.height:i),S.useEffect(()=>{!r&&ca(o)&&ca(c)&&t(kq({width:o,height:c}))},[t,r,o,c]),null},s3=Symbol.for("immer-nothing"),wA=Symbol.for("immer-draftable"),ln=Symbol.for("immer-state");function kn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Hc=Object.getPrototypeOf;function Yo(e){return!!e&&!!e[ln]}function ll(e){var t;return e?l3(e)||Array.isArray(e)||!!e[wA]||!!((t=e.constructor)!=null&&t[wA])||yd(e)||up(e):!1}var R7=Object.prototype.constructor.toString(),SA=new WeakMap;function l3(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=SA.get(r);return n===void 0&&(n=Function.toString.call(r),SA.set(r,n)),n===R7}function tm(e,t,r=!0){op(e)===0?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function op(e){const t=e[ln];return t?t.type_:Array.isArray(e)?1:yd(e)?2:up(e)?3:0}function Vx(e,t){return op(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function o3(e,t,r){const n=op(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function D7(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function yd(e){return e instanceof Map}function up(e){return e instanceof Set}function Ps(e){return e.copy_||e.base_}function Qx(e,t){if(yd(e))return new Map(e);if(up(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=l3(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[ln];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(Hc(e),n)}else{const n=Hc(e);if(n!==null&&r)return{...e};const i=Object.create(n);return Object.assign(i,e)}}function _j(e,t=!1){return cp(e)||Yo(e)||!ll(e)||(op(e)>1&&Object.defineProperties(e,{set:lh,add:lh,clear:lh,delete:lh}),Object.freeze(e),t&&Object.values(e).forEach(r=>_j(r,!0))),e}function k7(){kn(2)}var lh={value:k7};function cp(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var I7={};function ol(e){const t=I7[e];return t||kn(0,e),t}var Kc;function u3(){return Kc}function L7(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function NA(e,t){t&&(ol("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Xx(e){Wx(e),e.drafts_.forEach($7),e.drafts_=null}function Wx(e){e===Kc&&(Kc=e.parent_)}function OA(e){return Kc=L7(Kc,e)}function $7(e){const t=e[ln];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function _A(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[ln].modified_&&(Xx(t),kn(4)),ll(e)&&(e=rm(t,e),t.parent_||nm(t,e)),t.patches_&&ol("Patches").generateReplacementPatches_(r[ln].base_,e,t.patches_,t.inversePatches_)):e=rm(t,r,[]),Xx(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==s3?e:void 0}function rm(e,t,r){if(cp(t))return t;const n=e.immer_.shouldUseStrictIteration(),i=t[ln];if(!i)return tm(t,(l,o)=>EA(e,i,t,l,o,r),n),t;if(i.scope_!==e)return t;if(!i.modified_)return nm(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),tm(o,(f,h)=>EA(e,i,l,f,h,r,c),n),nm(e,l,!1),r&&e.patches_&&ol("Patches").generatePatches_(i,r,e.patches_,e.inversePatches_)}return i.copy_}function EA(e,t,r,n,i,l,o){if(i==null||typeof i!="object"&&!o)return;const c=cp(i);if(!(c&&!o)){if(Yo(i)){const f=l&&t&&t.type_!==3&&!Vx(t.assigned_,n)?l.concat(n):void 0,h=rm(e,i,f);if(o3(r,n,h),Yo(h))e.canAutoFreeze_=!1;else return}else o&&r.add(i);if(ll(i)&&!c){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===i&&c)return;rm(e,i),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(yd(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&nm(e,i)}}}function nm(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&_j(t,r)}function z7(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:u3(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,l=Ej;r&&(i=[n],l=Gc);const{revoke:o,proxy:c}=Proxy.revocable(i,l);return n.draft_=c,n.revoke_=o,c}var Ej={get(e,t){if(t===ln)return e;const r=Ps(e);if(!Vx(r,t))return B7(e,r,t);const n=r[t];return e.finalized_||!ll(n)?n:n===j0(e.base_,t)?(w0(e),e.copy_[t]=Jx(n,e)):n},has(e,t){return t in Ps(e)},ownKeys(e){return Reflect.ownKeys(Ps(e))},set(e,t,r){const n=c3(Ps(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=j0(Ps(e),t),l=i==null?void 0:i[ln];if(l&&l.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(D7(r,i)&&(r!==void 0||Vx(e.base_,t)))return!0;w0(e),Zx(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 j0(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,w0(e),Zx(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Ps(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){kn(11)},getPrototypeOf(e){return Hc(e.base_)},setPrototypeOf(){kn(12)}},Gc={};tm(Ej,(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 Ej.set.call(this,e[0],t,r,e[0])};function j0(e,t){const r=e[ln];return(r?Ps(r):e)[t]}function B7(e,t,r){var i;const n=c3(t,r);return n?"value"in n?n.value:(i=n.get)==null?void 0:i.call(e.draft_):void 0}function c3(e,t){if(!(t in e))return;let r=Hc(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Hc(r)}}function Zx(e){e.modified_||(e.modified_=!0,e.parent_&&Zx(e.parent_))}function w0(e){e.copy_||(e.copy_=Qx(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var U7=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"&&kn(6),n!==void 0&&typeof n!="function"&&kn(7);let i;if(ll(t)){const l=OA(this),o=Jx(t,void 0);let c=!0;try{i=r(o),c=!1}finally{c?Xx(l):Wx(l)}return NA(l,n),_A(i,l)}else if(!t||typeof t!="object"){if(i=r(t),i===void 0&&(i=t),i===s3&&(i=void 0),this.autoFreeze_&&_j(i,!0),n){const l=[],o=[];ol("Patches").generateReplacementPatches_(t,i,l,o),n(l,o)}return i}else kn(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){ll(e)||kn(8),Yo(e)&&(e=q7(e));const t=OA(this),r=Jx(e,void 0);return r[ln].isManual_=!0,Wx(t),r}finishDraft(e,t){const r=e&&e[ln];(!r||!r.isManual_)&&kn(9);const{scope_:n}=r;return NA(n,t),_A(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=ol("Patches").applyPatches_;return Yo(e)?n(e,t):this.produce(e,i=>n(i,t))}};function Jx(e,t){const r=yd(e)?ol("MapSet").proxyMap_(e,t):up(e)?ol("MapSet").proxySet_(e,t):z7(e,t);return(t?t.scope_:u3()).drafts_.push(r),r}function q7(e){return Yo(e)||kn(10,e),d3(e)}function d3(e){if(!ll(e)||cp(e))return e;const t=e[ln];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 tm(r,(i,l)=>{o3(r,i,d3(l))},n),t&&(t.finalized_=!1),r}var F7=new U7;F7.produce;var H7={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},f3=xr({name:"legend",initialState:H7,reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(t.payload)},prepare:ut()},replaceLegendPayload:{reducer(e,t){var{prev:r,next:n}=t.payload,i=On(e).payload.indexOf(r);i>-1&&(e.payload[i]=n)},prepare:ut()},removeLegendPayload:{reducer(e,t){var r=On(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)},prepare:ut()}}}),{setLegendSize:AA,setLegendSettings:K7,addLegendPayload:G7,replaceLegendPayload:Y7,removeLegendPayload:V7}=f3.actions,Q7=f3.reducer,S0={exports:{}},N0={};/**
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 CA;function X7(){if(CA)return N0;CA=1;var e=ru();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 N0.useSyncExternalStoreWithSelector=function(f,h,p,y,g){var x=i(null);if(x.current===null){var b={hasValue:!1,value:null};x.current=b}else b=x.current;x=o(function(){function N(C){if(!O){if(O=!0,A=C,C=y(C),g!==void 0&&b.hasValue){var M=b.value;if(g(M,C))return T=M}return T=C}if(M=T,r(A,C))return M;var R=y(C);return g!==void 0&&g(M,R)?(A=C,M):(A=C,T=R)}var O=!1,A,T,E=p===void 0?null:p;return[function(){return N(h())},E===null?void 0:function(){return N(E())}]},[h,p,y,g]);var w=n(f,x[0],x[1]);return l(function(){b.hasValue=!0,b.value=w},[w]),c(w),w},N0}var TA;function W7(){return TA||(TA=1,S0.exports=X7()),S0.exports}W7();function Z7(e){e()}function J7(){let e=null,t=null;return{clear(){e=null,t=null},notify(){Z7(()=>{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 PA={notify(){},get:()=>[]};function eF(e,t){let r,n=PA,i=0,l=!1;function o(w){p();const N=n.subscribe(w);let O=!1;return()=>{O||(O=!0,N(),y())}}function c(){n.notify()}function f(){b.onStateChange&&b.onStateChange()}function h(){return l}function p(){i++,r||(r=e.subscribe(f),n=J7())}function y(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=PA)}function g(){l||(l=!0,p())}function x(){l&&(l=!1,y())}const b={addNestedSub:o,notifyNestedSubs:c,handleChangeWrapper:f,isSubscribed:h,trySubscribe:g,tryUnsubscribe:x,getListeners:()=>n};return b}var tF=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",rF=tF(),nF=()=>typeof navigator<"u"&&navigator.product==="ReactNative",aF=nF(),iF=()=>rF||aF?S.useLayoutEffect:S.useEffect,sF=iF();function MA(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function lF(e,t){if(MA(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])||!MA(e[r[i]],t[r[i]]))return!1;return!0}var O0=Symbol.for("react-redux-context"),_0=typeof globalThis<"u"?globalThis:{};function oF(){if(!S.createContext)return{};const e=_0[O0]??(_0[O0]=new Map);let t=e.get(S.createContext);return t||(t=S.createContext(null),e.set(S.createContext,t)),t}var uF=oF();function cF(e){const{children:t,context:r,serverState:n,store:i}=e,l=S.useMemo(()=>{const f=eF(i);return{store:i,subscription:f,getServerState:n?()=>n:void 0}},[i,n]),o=S.useMemo(()=>i.getState(),[i]);sF(()=>{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||uF;return S.createElement(c.Provider,{value:l},t)}var dF=cF,fF=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function hF(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function au(e,t){var r=new Set([...Object.keys(e),...Object.keys(t)]);for(var n of r)if(fF.has(n)){if(e[n]==null&&t[n]==null)continue;if(!lF(e[n],t[n]))return!1}else if(!hF(e[n],t[n]))return!1;return!0}var mF=["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 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 Vo(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){pF(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 pF(e,t,r){return(t=yF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yF(e){var t=gF(e,"string");return typeof t=="symbol"?t:t+""}function gF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vF(e,t){if(e==null)return{};var r,n,i=xF(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 xF(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 bF(e){return e.value}function jF(e){var{contextPayload:t}=e,r=vF(e,mF),n=pR(t,e.payloadUniqBy,bF),i=Vo(Vo({},r),{},{payload:n});return S.isValidElement(e.content)?S.cloneElement(e.content,i):typeof e.content=="function"?S.createElement(e.content,i):S.createElement(YU,i)}function wF(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}),Vo(Vo({},h),p)}function SF(e){var t=dt();return S.useEffect(()=>{t(K7(e))},[t,e]),null}function NF(e){var t=dt();return S.useEffect(()=>(t(AA(e)),()=>{t(AA({width:0,height:0}))}),[t,e]),null}function OF(e,t,r,n){return e==="vertical"&&t!=null?{height:t}:e==="horizontal"?{width:r||n}:null}var _F={align:"center",iconSize:14,inactiveColor:"#ccc",itemSorter:"value",layout:"horizontal",verticalAlign:"bottom"};function EF(e){var t=dr(e,_F),r=L9(),n=z6(),i=P7(),{width:l,height:o,wrapperStyle:c,portal:f}=t,[h,p]=bR([r]),y=Nj(),g=Oj();if(y==null||g==null)return null;var x=y-((i==null?void 0:i.left)||0)-((i==null?void 0:i.right)||0),b=OF(t.layout,o,l,x),w=f?c:Vo(Vo({position:"absolute",width:(b==null?void 0:b.width)||l||"auto",height:(b==null?void 0:b.height)||o||"auto"},wF(c,t,i,y,g,h)),c),N=f??n;if(N==null||r==null)return null;var O=S.createElement("div",{className:"recharts-legend-wrapper",style:w,ref:p},S.createElement(SF,{layout:t.layout,align:t.align,verticalAlign:t.verticalAlign,itemSorter:t.itemSorter}),!f&&S.createElement(NF,{width:h.width,height:h.height}),S.createElement(jF,eb({},t,b,{margin:i,chartWidth:y,chartHeight:g,contextPayload:r})));return $m.createPortal(O,N)}var h3=S.memo(EF,au);h3.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 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 hc(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){AF(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 AF(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=TF(e,"string");return typeof t=="symbol"?t:t+""}function TF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function PF(e){return Array.isArray(e)&&ua(e[0])&&ua(e[1])?e.join(" ~ "):e}var uo={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 MF(e,t){return t==null?e:Gm(e,t)}var RF=e=>{var{separator:t=uo.separator,contentStyle:r,itemStyle:n,labelStyle:i=uo.labelStyle,payload:l,formatter:o,itemSorter:c,wrapperClassName:f,labelClassName:h,label:p,labelFormatter:y,accessibilityLayer:g=uo.accessibilityLayer}=e,x=()=>{if(l&&l.length){var C={padding:0,margin:0},M=MF(l,c),R=M.map((D,L)=>{if(!D||D.type==="none")return null;var k=D.formatter||o||PF,{value:F,name:q}=D,ie=F,ee=q;if(k){var ne=k(F,q,D,L,l);if(Array.isArray(ne))[ie,ee]=ne;else if(ne!=null)ie=ne;else return null}var z=hc(hc({},uo.itemStyle),{},{color:D.color||uo.itemStyle.color},n);return S.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(L),style:z},ua(ee)?S.createElement("span",{className:"recharts-tooltip-item-name"},ee):null,ua(ee)?S.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,S.createElement("span",{className:"recharts-tooltip-item-value"},ie),S.createElement("span",{className:"recharts-tooltip-item-unit"},D.unit||""))});return S.createElement("ul",{className:"recharts-tooltip-item-list",style:C},R)}return null},b=hc(hc({},uo.contentStyle),r),w=hc({margin:0},i),N=!pt(p),O=N?p:"",A=We("recharts-default-tooltip",f),T=We("recharts-tooltip-label",h);N&&y&&l!==void 0&&l!==null&&(O=y(p,l));var E=g?{role:"status","aria-live":"assertive"}:{};return S.createElement("div",tb({className:A,style:b},E),S.createElement("p",{className:T,style:w},S.isValidElement(O)?O:"".concat(O)),x())},mc="recharts-tooltip-wrapper",DF={visibility:"hidden"};function kF(e){var{coordinate:t,translateX:r,translateY:n}=e;return We(mc,{["".concat(mc,"-right")]:ge(r)&&t&&ge(t.x)&&r>=t.x,["".concat(mc,"-left")]:ge(r)&&t&&ge(t.x)&&r<t.x,["".concat(mc,"-bottom")]:ge(n)&&t&&ge(t.y)&&n>=t.y,["".concat(mc,"-top")]:ge(n)&&t&&ge(t.y)&&n<t.y})}function kA(e){var{allowEscapeViewBox:t,coordinate:r,key:n,offset:i,position:l,reverseDirection:o,tooltipDimension:c,viewBox:f,viewBoxDimension:h}=e;if(l&&ge(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 g=f[n];if(g==null)return 0;if(o[n]){var x=p,b=g;return x<b?Math.max(y,g):Math.max(p,g)}if(h==null)return 0;var w=y+c,N=g+h;return w>N?Math.max(p,g):Math.max(y,g)}function IF(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 LF(e){var{allowEscapeViewBox:t,coordinate:r,offsetTop:n,offsetLeft:i,position:l,reverseDirection:o,tooltipBox:c,useTranslate3d:f,viewBox:h}=e,p,y,g;return c.height>0&&c.width>0&&r?(y=kA({allowEscapeViewBox:t,coordinate:r,key:"x",offset:i,position:l,reverseDirection:o,tooltipDimension:c.width,viewBox:h,viewBoxDimension:h.width}),g=kA({allowEscapeViewBox:t,coordinate:r,key:"y",offset:n,position:l,reverseDirection:o,tooltipDimension:c.height,viewBox:h,viewBoxDimension:h.height}),p=IF({translateX:y,translateY:g,useTranslate3d:f})):p=DF,{cssProperties:p,cssClasses:kF({translateX:y,translateY:g,coordinate:r})}}var $F=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),gd={isSsr:$F()};function m3(){var[e,t]=S.useState(()=>gd.isSsr||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return S.useEffect(()=>{if(window.matchMedia){var r=window.matchMedia("(prefers-reduced-motion: reduce)"),n=()=>{t(r.matches)};return r.addEventListener("change",n),()=>{r.removeEventListener("change",n)}}},[]),e}function 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 co(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){zF(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 zF(e,t,r){return(t=BF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BF(e){var t=UF(e,"string");return typeof t=="symbol"?t:t+""}function UF(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 qF(e){if(!(e.prefersReducedMotion&&e.isAnimationActive==="auto")&&e.isAnimationActive&&e.active)return"transform ".concat(e.animationDuration,"ms ").concat(e.animationEasing)}function FF(e){var t,r,n,i,l,o,c=m3(),[f,h]=S.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}));S.useEffect(()=>{var b=w=>{if(w.key==="Escape"){var N,O,A,T;h({dismissed:!0,dismissedAtCoordinate:{x:(N=(O=e.coordinate)===null||O===void 0?void 0:O.x)!==null&&N!==void 0?N:0,y:(A=(T=e.coordinate)===null||T===void 0?void 0:T.y)!==null&&A!==void 0?A:0}})}};return document.addEventListener("keydown",b),()=>{document.removeEventListener("keydown",b)}},[(t=e.coordinate)===null||t===void 0?void 0:t.x,(r=e.coordinate)===null||r===void 0?void 0:r.y]),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(co(co({},f),{},{dismissed:!1}));var{cssClasses:p,cssProperties:y}=LF({allowEscapeViewBox:e.allowEscapeViewBox,coordinate:e.coordinate,offsetLeft:typeof e.offset=="number"?e.offset:e.offset.x,offsetTop:typeof e.offset=="number"?e.offset:e.offset.y,position:e.position,reverseDirection:e.reverseDirection,tooltipBox:{height:e.lastBoundingBox.height,width:e.lastBoundingBox.width},useTranslate3d:e.useTranslate3d,viewBox:e.viewBox}),g=e.hasPortalFromProps?{}:co(co({transition:qF({prefersReducedMotion:c,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},y),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),x=co(co({},g),{},{visibility:!f.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return S.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:p,style:x,ref:e.innerRef},e.children)}var HF=S.memo(FF),p3=()=>{var e;return(e=be(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 LA(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 $A(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?LA(Object(r),!0).forEach(function(n){KF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):LA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function KF(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=YF(e,"string");return typeof t=="symbol"?t:t+""}function YF(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 zA={curveBasisClosed:aU,curveBasisOpen:iU,curveBasis:nU,curveBumpX:F6,curveBumpY:H6,curveLinearClosed:sU,curveLinear:Fm,curveMonotoneX:lU,curveMonotoneY:oU,curveNatural:uU,curveStep:cU,curveStepAfter:fU,curveStepBefore:dU},am=e=>Ue(e.x)&&Ue(e.y),BA=e=>e.base!=null&&am(e.base)&&am(e),pc=e=>e.x,yc=e=>e.y,VF=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(dd(e));if((r==="curveMonotone"||r==="curveBump")&&t){var n=zA["".concat(r).concat(t==="vertical"?"Y":"X")];if(n)return n}return zA[r]||Fm},UA={connectNulls:!1,type:"linear"},QF=e=>{var{type:t=UA.type,points:r=[],baseLine:n,layout:i,connectNulls:l=UA.connectNulls}=e,o=VF(t,i),c=l?r.filter(am):r;if(Array.isArray(n)){var f,h=r.map((b,w)=>$A($A({},b),{},{base:n[w]}));i==="vertical"?f=eh().y(yc).x1(pc).x0(b=>b.base.x):f=eh().x(pc).y1(yc).y0(b=>b.base.y);var p=f.defined(BA).curve(o),y=l?h.filter(BA):h;return p(y)}var g;i==="vertical"&&ge(n)?g=eh().y(yc).x1(pc).x0(n):ge(n)?g=eh().x(pc).y1(yc).y0(n):g=FM().x(pc).y(yc);var x=g.defined(am).curve(o);return x(c)},y3=e=>{var{className:t,points:r,path:n,pathRef:i}=e,l=yl();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?QF(o):n;return S.createElement("path",rb({},zn(e),dj(e),{className:We("recharts-curve",t),d:c===null?void 0:c,ref:i}))},XF=["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 qA(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 WF(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qA(Object(r),!0).forEach(function(n){ZF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ZF(e,t,r){return(t=JF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function JF(e){var t=eH(e,"string");return typeof t=="symbol"?t:t+""}function eH(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tH(e,t){if(e==null)return{};var r,n,i=rH(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 rH(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 nH=(e,t,r,n,i,l)=>"M".concat(e,",").concat(i,"v").concat(n,"M").concat(l,",").concat(t,"h").concat(r),aH=e=>{var{x:t=0,y:r=0,top:n=0,left:i=0,width:l=0,height:o=0,className:c}=e,f=tH(e,XF),h=WF({x:t,y:r,top:n,left:i,width:l,height:o},f);return!ge(t)||!ge(r)||!ge(l)||!ge(o)||!ge(n)||!ge(i)?null:S.createElement("path",nb({},Er(h),{className:We("recharts-cross",c),d:nH(t,r,l,o,n,i)}))};function iH(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 FA(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 HA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?FA(Object(r),!0).forEach(function(n){sH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):FA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sH(e,t,r){return(t=lH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lH(e){var t=oH(e,"string");return typeof t=="symbol"?t:t+""}function oH(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 uH=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),g3=(e,t,r)=>e.map(n=>"".concat(uH(n)," ").concat(t,"ms ").concat(r)).join(","),cH=(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)=>HA(HA({},r),{},{[n]:e(n,t[n])}),{});function KA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Bt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?KA(Object(r),!0).forEach(function(n){dH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):KA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function dH(e,t,r){return(t=fH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fH(e){var t=hH(e,"string");return typeof t=="symbol"?t:t+""}function hH(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 im=(e,t,r)=>e+(t-e)*r,ab=e=>{var{from:t,to:r}=e;return t!==r},v3=(e,t,r)=>{var n=Yc((i,l)=>{if(ab(l)){var[o,c]=e(l.from,l.to,l.velocity);return Bt(Bt({},l),{},{from:o,velocity:c})}return l},t);return r<1?Yc((i,l)=>ab(l)&&n[i]!=null?Bt(Bt({},l),{},{velocity:im(l.velocity,n[i].velocity,r),from:im(l.from,n[i].from,r)}):l,t):v3(e,n,r-1)};function mH(e,t,r,n,i,l){var o,c=n.reduce((g,x)=>Bt(Bt({},g),{},{[x]:{from:e[x],velocity:0,to:t[x]}}),{}),f=()=>Yc((g,x)=>x.from,c),h=()=>!Object.values(c).filter(ab).length,p=null,y=g=>{o||(o=g);var x=g-o,b=x/r.dt;c=v3(r,c,b),i(Bt(Bt(Bt({},e),t),f())),o=g,h()||(p=l.setTimeout(y))};return()=>(p=l.setTimeout(y),()=>{var g;(g=p)===null||g===void 0||g()})}function pH(e,t,r,n,i,l,o){var c=null,f=i.reduce((y,g)=>{var x=e[g],b=t[g];return x==null||b==null?y:Bt(Bt({},y),{},{[g]:[x,b]})},{}),h,p=y=>{h||(h=y);var g=(y-h)/n,x=Yc((w,N)=>im(...N,r(g)),f);if(l(Bt(Bt(Bt({},e),t),x)),g<1)c=o.setTimeout(p);else{var b=Yc((w,N)=>im(...N,r(1)),f);l(Bt(Bt(Bt({},e),t),b))}};return()=>(c=o.setTimeout(p),()=>{var y;(y=c)===null||y===void 0||y()})}const yH=(e,t,r,n,i,l)=>{var o=cH(e,t);return r==null?()=>(i(Bt(Bt({},e),t)),()=>{}):r.isStepper===!0?mH(e,t,r,o,i,l):pH(e,t,r,n,o,i,l)};var sm=1e-4,x3=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],b3=(e,t)=>e.map((r,n)=>r*t**n).reduce((r,n)=>r+n),GA=(e,t)=>r=>{var n=x3(e,t);return b3(n,r)},gH=(e,t)=>r=>{var n=x3(e,t),i=[...n.map((l,o)=>l*o).slice(1),0];return b3(i,r)},vH=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]]},xH=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=vH(r[0]);if(i)return i}}return r.length===4?r:[0,0,1,1]},bH=(e,t,r,n)=>{var i=GA(e,r),l=GA(t,n),o=gH(e,r),c=h=>h>1?1:h<0?0:h,f=h=>{for(var p=h>1?1:h,y=p,g=0;g<8;++g){var x=i(y)-p,b=o(y);if(Math.abs(x-p)<sm||b<sm)return l(y);y=c(y-x/b)}return l(y)};return f.isStepper=!1,f},YA=function(){return bH(...xH(...arguments))},jH=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,g=f*i/1e3+o;return Math.abs(g-c)<sm&&Math.abs(y)<sm?[c,0]:[g,y]};return l.isStepper=!0,l.dt=i,l},wH=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return YA(e);case"spring":return jH();default:if(e.split("(")[0]==="cubic-bezier")return YA(e)}return typeof e=="function"?e:null};function SH(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 NH{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 OH(){return SH(new NH)}var _H=S.createContext(OH);function EH(e,t){var r=S.useContext(_H);return S.useMemo(()=>t??r(e),[e,t,r])}var AH={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},VA={t:0},E0={t:1};function dp(e){var t=dr(e,AH),{isActive:r,canBegin:n,duration:i,easing:l,begin:o,onAnimationEnd:c,onAnimationStart:f,children:h}=t,p=m3(),y=r==="auto"?!gd.isSsr&&!p:r,g=EH(t.animationId,t.animationManager),[x,b]=S.useState(y?VA:E0),w=S.useRef(null);return S.useEffect(()=>{y||b(E0)},[y]),S.useEffect(()=>{if(!y||!n)return pl;var N=yH(VA,E0,wH(l),i,b,g.getTimeoutController()),O=()=>{w.current=N()};return g.start([f,o,O,i,c]),()=>{g.stop(),w.current&&w.current(),c()}},[y,n,i,l,o,f,c,g]),h(x.t)}function fp(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=S.useRef(Bc(t)),n=S.useRef(e);return n.current!==e&&(r.current=Bc(t),n.current=e),r.current}var CH=["radius"],TH=["radius"],QA,XA,WA,ZA,JA,eC,tC,rC,nC,aC;function iC(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 sC(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?iC(Object(r),!0).forEach(function(n){PH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function PH(e,t,r){return(t=MH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function MH(e){var t=RH(e,"string");return typeof t=="symbol"?t:t+""}function RH(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function lm(){return lm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},lm.apply(null,arguments)}function lC(e,t){if(e==null)return{};var r,n,i=DH(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 DH(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Xn(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var oC=(e,t,r,n,i)=>{var l=Qi(r),o=Qi(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 g=[0,0,0,0],x=0,b=4;x<b;x++){var w,N=(w=i[x])!==null&&w!==void 0?w:0;g[x]=N>c?c:N}y=Nt(QA||(QA=Xn(["M",",",""])),e,t+f*g[0]),g[0]>0&&(y+=Nt(XA||(XA=Xn(["A ",",",",0,0,",",",",",""])),g[0],g[0],p,e+h*g[0],t)),y+=Nt(WA||(WA=Xn(["L ",",",""])),e+r-h*g[1],t),g[1]>0&&(y+=Nt(ZA||(ZA=Xn(["A ",",",",0,0,",`,
81
- `,",",""])),g[1],g[1],p,e+r,t+f*g[1])),y+=Nt(JA||(JA=Xn(["L ",",",""])),e+r,t+n-f*g[2]),g[2]>0&&(y+=Nt(eC||(eC=Xn(["A ",",",",0,0,",`,
82
- `,",",""])),g[2],g[2],p,e+r-h*g[2],t+n)),y+=Nt(tC||(tC=Xn(["L ",",",""])),e+h*g[3],t+n),g[3]>0&&(y+=Nt(rC||(rC=Xn(["A ",",",",0,0,",`,
83
- `,",",""])),g[3],g[3],p,e,t+n-f*g[3])),y+="Z"}else if(c>0&&i===+i&&i>0){var O=Math.min(c,i);y=Nt(nC||(nC=Xn(["M ",",",`
84
- A `,",",",0,0,",",",",",`
85
- L `,",",`
86
- A `,",",",0,0,",",",",",`
87
- L `,",",`
88
- A `,",",",0,0,",",",",",`
89
- L `,",",`
90
- A `,",",",0,0,",",",","," Z"])),e,t+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=Nt(aC||(aC=Xn(["M ",","," h "," v "," h "," Z"])),e,t,r,n,-r);return y},uC={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},j3=e=>{var t=dr(e,uC),r=S.useRef(null),[n,i]=S.useState(-1);S.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var H=r.current.getTotalLength();H&&i(H)}catch{}},[]);var{x:l,y:o,width:c,height:f,radius:h,className:p}=t,{animationEasing:y,animationDuration:g,animationBegin:x,isAnimationActive:b,isUpdateAnimationActive:w}=t,N=S.useRef(c),O=S.useRef(f),A=S.useRef(l),T=S.useRef(o),E=S.useMemo(()=>({x:l,y:o,width:c,height:f,radius:h}),[l,o,c,f,h]),C=fp(E,"rectangle-");if(l!==+l||o!==+o||c!==+c||f!==+f||c===0||f===0)return null;var M=We("recharts-rectangle",p);if(!w){var R=Er(t),{radius:D}=R,L=lC(R,CH);return S.createElement("path",lm({},L,{x:Qi(l),y:Qi(o),width:Qi(c),height:Qi(f),radius:typeof h=="number"?h:void 0,className:M,d:oC(l,o,c,f,h)}))}var k=N.current,F=O.current,q=A.current,ie=T.current,ee="0px ".concat(n===-1?1:n,"px"),ne="".concat(n,"px ").concat(n,"px"),z=g3(["strokeDasharray"],g,typeof y=="string"?y:uC.animationEasing);return S.createElement(dp,{animationId:C,key:C,canBegin:n>0,duration:g,easing:y,isActive:w,begin:x},H=>{var Z=Ot(k,c,H),ae=Ot(F,f,H),le=Ot(q,l,H),I=Ot(ie,o,H);r.current&&(N.current=Z,O.current=ae,A.current=le,T.current=I);var Q;b?H>0?Q={transition:z,strokeDasharray:ne}:Q={strokeDasharray:ee}:Q={strokeDasharray:ne};var oe=Er(t),{radius:se}=oe,fe=lC(oe,TH);return S.createElement("path",lm({},fe,{radius:typeof h=="number"?h:void 0,className:M,d:oC(le,I,Z,ae,h),ref:r,style:sC(sC({},Q),t.style)}))})};function cC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function dC(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cC(Object(r),!0).forEach(function(n){kH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function kH(e,t,r){return(t=IH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function IH(e){var t=LH(e,"string");return typeof t=="symbol"?t:t+""}function LH(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 om=Math.PI/180,$H=e=>e*180/Math.PI,ur=(e,t,r,n)=>({x:e+Math.cos(-om*n)*r,y:t+Math.sin(-om*n)*r}),zH=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},BH=(e,t)=>{var{x:r,y:n}=e,{x:i,y:l}=t;return Math.sqrt((r-i)**2+(n-l)**2)},UH=(e,t)=>{var{x:r,y:n}=e,{cx:i,cy:l}=t,o=BH({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:$H(f),angleInRadian:f}},qH=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}},FH=(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},HH=(e,t)=>{var{relativeX:r,relativeY:n}=e,{radius:i,angle:l}=UH({x:r,y:n},t),{innerRadius:o,outerRadius:c}=t;if(i<o||i>c||i===0)return null;var{startAngle:f,endAngle:h}=qH(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?dC(dC({},t),{},{radius:i,angle:FH(p,t)}):null};function w3(e){var{cx:t,cy:r,radius:n,startAngle:i,endAngle:l}=e,o=ur(t,r,n,i),c=ur(t,r,n,l);return{points:[o,c],cx:t,cy:r,radius:n,startAngle:i,endAngle:l}}var fC,hC,mC,pC,yC,gC,vC;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 Is(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var KH=(e,t)=>{var r=qr(t-e),n=Math.min(Math.abs(t-e),359.999);return r*n},oh=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)/om,y=f?i:i+l*p,g=ur(t,r,h,y),x=ur(t,r,n,y),b=f?i-l*p:i,w=ur(t,r,h*Math.cos(p*om),b);return{center:g,circleTangency:x,lineTangency:w,theta:p}},S3=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:l,endAngle:o}=e,c=KH(l,o),f=l+c,h=ur(t,r,i,l),p=ur(t,r,i,f),y=Nt(fC||(fC=Is(["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 g=ur(t,r,n,l),x=ur(t,r,n,f);y+=Nt(hC||(hC=Is(["L ",",",`
95
- A `,",",`,0,
96
- `,",",`,
97
- `,","," Z"])),x.x,x.y,n,n,+(Math.abs(c)>180),+(l<=f),g.x,g.y)}else y+=Nt(mC||(mC=Is(["L ",","," Z"])),t,r);return y},GH=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:i,cornerRadius:l,forceCornerRadius:o,cornerIsExternal:c,startAngle:f,endAngle:h}=e,p=qr(h-f),{circleTangency:y,lineTangency:g,theta:x}=oh({cx:t,cy:r,radius:i,angle:f,sign:p,cornerRadius:l,cornerIsExternal:c}),{circleTangency:b,lineTangency:w,theta:N}=oh({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?Nt(pC||(pC=Is(["M ",",",`
98
- a`,",",",0,0,1,",`,0
99
- a`,",",",0,0,1,",`,0
100
- `])),g.x,g.y,l,l,l*2,l,l,-l*2):S3({cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:f,endAngle:h});var A=Nt(yC||(yC=Is(["M ",",",`
101
- A`,",",",0,0,",",",",",`
102
- A`,",",",0,",",",",",",",`
103
- A`,",",",0,0,",",",",",`
104
- `])),g.x,g.y,l,l,+(p<0),y.x,y.y,i,i,+(O>180),+(p<0),b.x,b.y,l,l,+(p<0),w.x,w.y);if(n>0){var{circleTangency:T,lineTangency:E,theta:C}=oh({cx:t,cy:r,radius:n,angle:f,sign:p,isExternal:!0,cornerRadius:l,cornerIsExternal:c}),{circleTangency:M,lineTangency:R,theta:D}=oh({cx:t,cy:r,radius:n,angle:h,sign:-p,isExternal:!0,cornerRadius:l,cornerIsExternal:c}),L=c?Math.abs(f-h):Math.abs(f-h)-C-D;if(L<0&&l===0)return"".concat(A,"L").concat(t,",").concat(r,"Z");A+=Nt(gC||(gC=Is(["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,+(L>180),+(p>0),T.x,T.y,l,l,+(p<0),E.x,E.y)}else A+=Nt(vC||(vC=Is(["L",",","Z"])),t,r);return A},YH={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},N3=e=>{var t=dr(e,YH),{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 g=We("recharts-sector",y),x=l-i,b=Bn(o,x,0,!0),w;return b>0&&Math.abs(h-p)<360?w=GH({cx:r,cy:n,innerRadius:i,outerRadius:l,cornerRadius:Math.min(b,x/2),forceCornerRadius:c,cornerIsExternal:f,startAngle:h,endAngle:p}):w=S3({cx:r,cy:n,innerRadius:i,outerRadius:l,startAngle:h,endAngle:p}),S.createElement("path",ib({},Er(t),{className:g,d:w}))};function VH(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(aR(t)){if(e==="centric"){var{cx:n,cy:i,innerRadius:l,outerRadius:o,angle:c}=t,f=ur(n,i,l,c),h=ur(n,i,o,c);return[{x:f.x,y:f.y},{x:h.x,y:h.y}]}return w3(t)}}var A0={},C0={},T0={},xC;function QH(){return xC||(xC=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=gR();function r(n){return t.isSymbol(n)?NaN:Number(n)}e.toNumber=r})(T0)),T0}var bC;function XH(){return bC||(bC=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=QH();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})(C0)),C0}var jC;function WH(){return jC||(jC=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=vR(),r=XH();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})(A0)),A0}var P0,wC;function ZH(){return wC||(wC=1,P0=WH().range),P0}var JH=ZH();const O3=as(JH);var Hn=e=>e.chartData,Aj=V([Hn],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),vd=(e,t,r,n)=>n?Aj(e):Hn(e),eK=(e,t,r)=>r?Aj(e):Hn(e),tK=V([vd],e=>{var{chartData:t,dataStartIndex:r,dataEndIndex:n}=e;return t!=null?t.slice(r,n+1):[]});V([Aj],e=>{var{chartData:t,dataStartIndex:r,dataEndIndex:n}=e;return t!=null?t.slice(r,n+1):[]});var rK=V([Hn],e=>{var{chartData:t,dataStartIndex:r,dataEndIndex:n}=e;return t!=null?t.slice(r,n+1):[]});function sa(e){if(Array.isArray(e)&&e.length===2){var[t,r]=e;if(Ue(t)&&Ue(r))return!0}return!1}function SC(e,t,r){return r?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function _3(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[r,n]=e,i,l;if(Ue(r))i=r;else if(typeof r=="function")return;if(Ue(n))l=n;else if(typeof n=="function")return;var o=[i,l];if(sa(o))return o}}function nK(e,t,r){if(!(!r&&t==null)){if(typeof e=="function"&&t!=null)try{var n=e(t,r);if(sa(n))return SC(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(ge(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"&&fA.test(i)){var f=fA.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(ge(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"&&hA.test(l)){var p=hA.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 g=[o,c];if(sa(g))return t==null?g:SC(g,t,r)}}}var iu=1e9,aK={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Tj,mt=!0,En="[DecimalError] ",el=En+"Invalid argument: ",Cj=En+"Exponent out of range: ",su=Math.floor,Ms=Math.pow,iK=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,tn,Vt=1e7,ct=7,E3=9007199254740991,um=su(E3/ct),pe={};pe.absoluteValue=pe.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};pe.comparedTo=pe.cmp=function(e){var t,r,n,i,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};pe.decimalPlaces=pe.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*ct;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};pe.dividedBy=pe.div=function(e){return Ka(this,new this.constructor(e))};pe.dividedToIntegerBy=pe.idiv=function(e){var t=this,r=t.constructor;return at(Ka(t,new r(e),0,1),r.precision)};pe.equals=pe.eq=function(e){return!this.cmp(e)};pe.exponent=function(){return It(this)};pe.greaterThan=pe.gt=function(e){return this.cmp(e)>0};pe.greaterThanOrEqualTo=pe.gte=function(e){return this.cmp(e)>=0};pe.isInteger=pe.isint=function(){return this.e>this.d.length-2};pe.isNegative=pe.isneg=function(){return this.s<0};pe.isPositive=pe.ispos=function(){return this.s>0};pe.isZero=function(){return this.s===0};pe.lessThan=pe.lt=function(e){return this.cmp(e)<0};pe.lessThanOrEqualTo=pe.lte=function(e){return this.cmp(e)<1};pe.logarithm=pe.log=function(e){var t,r=this,n=r.constructor,i=n.precision,l=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(tn))throw Error(En+"NaN");if(r.s<1)throw Error(En+(r.s?"NaN":"-Infinity"));return r.eq(tn)?new n(0):(mt=!1,t=Ka(Vc(r,l),Vc(e,l),l),mt=!0,at(t,i))};pe.minus=pe.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?T3(t,e):A3(t,(e.s=-e.s,e))};pe.modulo=pe.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(En+"NaN");return r.s?(mt=!1,t=Ka(r,e,0,1).times(e),mt=!0,r.minus(t)):at(new n(r),i)};pe.naturalExponential=pe.exp=function(){return C3(this)};pe.naturalLogarithm=pe.ln=function(){return Vc(this)};pe.negated=pe.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};pe.plus=pe.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?A3(t,e):T3(t,(e.s=-e.s,e))};pe.precision=pe.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(el+e);if(t=It(i)+1,n=i.d.length-1,r=n*ct+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};pe.squareRoot=pe.sqrt=function(){var e,t,r,n,i,l,o,c=this,f=c.constructor;if(c.s<1){if(!c.s)return new f(0);throw Error(En+"NaN")}for(e=It(c),mt=!1,i=Math.sqrt(+c),i==0||i==1/0?(t=ia(c.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=su((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(Ka(c,l,o+2)).times(.5),ia(l.d).slice(0,o)===(t=ia(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(at(l,r+1,0),l.times(l).eq(c)){n=l;break}}else if(t!="9999")break;o+=4}return mt=!0,at(n,r)};pe.times=pe.mul=function(e){var t,r,n,i,l,o,c,f,h,p=this,y=p.constructor,g=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=g.length,h=x.length,f<h&&(l=g,g=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]*g[i-n-1]+t,l[i--]=c%Vt|0,t=c/Vt|0;l[i]=(l[i]+t)%Vt|0}for(;!l[--o];)l.pop();return t?++r:l.shift(),e.d=l,e.e=r,mt?at(e,y.precision):e};pe.toDecimalPlaces=pe.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(da(e,0,iu),t===void 0?t=n.rounding:da(t,0,8),at(r,e+It(r)+1,t))};pe.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=ul(n,!0):(da(e,0,iu),t===void 0?t=i.rounding:da(t,0,8),n=at(new i(n),e+1,t),r=ul(n,!0,e+1)),r};pe.toFixed=function(e,t){var r,n,i=this,l=i.constructor;return e===void 0?ul(i):(da(e,0,iu),t===void 0?t=l.rounding:da(t,0,8),n=at(new l(i),e+It(i)+1,t),r=ul(n.abs(),!1,e+It(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};pe.toInteger=pe.toint=function(){var e=this,t=e.constructor;return at(new t(e),It(e)+1,t.rounding)};pe.toNumber=function(){return+this};pe.toPower=pe.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(tn);if(c=new f(c),!c.s){if(e.s<1)throw Error(En+"Infinity");return c}if(c.eq(tn))return c;if(n=f.precision,e.eq(tn))return at(c,n);if(t=e.e,r=e.d.length-1,o=t>=r,l=c.s,o){if((r=p<0?-p:p)<=E3){for(i=new f(tn),t=Math.ceil(n/ct+4),mt=!1;r%2&&(i=i.times(c),OC(i.d,t)),r=su(r/2),r!==0;)c=c.times(c),OC(c.d,t);return mt=!0,e.s<0?new f(tn).div(i):at(i,n)}}else if(l<0)throw Error(En+"NaN");return l=l<0&&e.d[Math.max(t,r)]&1?-1:1,c.s=1,mt=!1,i=e.times(Vc(c,n+h)),mt=!0,i=C3(i),i.s=l,i};pe.toPrecision=function(e,t){var r,n,i=this,l=i.constructor;return e===void 0?(r=It(i),n=ul(i,r<=l.toExpNeg||r>=l.toExpPos)):(da(e,1,iu),t===void 0?t=l.rounding:da(t,0,8),i=at(new l(i),e,t),r=It(i),n=ul(i,e<=r||r<=l.toExpNeg,e)),n};pe.toSignificantDigits=pe.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(da(e,1,iu),t===void 0?t=n.rounding:da(t,0,8)),at(new n(r),e,t)};pe.toString=pe.valueOf=pe.val=pe.toJSON=pe[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=It(e),r=e.constructor;return ul(e,t<=r.toExpNeg||t>=r.toExpPos)};function A3(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)),mt?at(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/ct),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)/Vt|0,f[l]%=Vt;for(r&&(f.unshift(r),++i),c=f.length;f[--c]==0;)f.pop();return t.d=f,t.e=i,mt?at(t,y):t}function da(e,t,r){if(e!==~~e||e<t||e>r)throw Error(el+e)}function ia(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=ct-n.length,r&&(l+=Di(r)),l+=n;o=e[t],n=o+"",r=ct-n.length,r&&(l+=Di(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return l+o}var Ka=(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%Vt|0,o=l/Vt|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*Vt+n[l]-i[l];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,l,o){var c,f,h,p,y,g,x,b,w,N,O,A,T,E,C,M,R,D,L=n.constructor,k=n.s==i.s?1:-1,F=n.d,q=i.d;if(!n.s)return new L(n);if(!i.s)throw Error(En+"Division by zero");for(f=n.e-i.e,R=q.length,C=F.length,x=new L(k),b=x.d=[],h=0;q[h]==(F[h]||0);)++h;if(q[h]>(F[h]||0)&&--f,l==null?A=l=L.precision:o?A=l+(It(n)-It(i))+1:A=l,A<0)return new L(0);if(A=A/ct+2|0,h=0,R==1)for(p=0,q=q[0],A++;(h<C||p)&&A--;h++)T=p*Vt+(F[h]||0),b[h]=T/q|0,p=T%q|0;else{for(p=Vt/(q[0]+1)|0,p>1&&(q=e(q,p),F=e(F,p),R=q.length,C=F.length),E=R,w=F.slice(0,R),N=w.length;N<R;)w[N++]=0;D=q.slice(),D.unshift(0),M=q[0],q[1]>=Vt/2&&++M;do p=0,c=t(q,w,R,N),c<0?(O=w[0],R!=N&&(O=O*Vt+(w[1]||0)),p=O/M|0,p>1?(p>=Vt&&(p=Vt-1),y=e(q,p),g=y.length,N=w.length,c=t(y,w,g,N),c==1&&(p--,r(y,R<g?D:q,g))):(p==0&&(c=p=1),y=q.slice()),g=y.length,g<N&&y.unshift(0),r(w,y,N),c==-1&&(N=w.length,c=t(q,w,R,N),c<1&&(p++,r(w,R<N?D:q,N))),N=w.length):c===0&&(p++,w=[0]),b[h++]=p,c&&w[0]?w[N++]=F[E]||0:(w=[F[E]],N=1);while((E++<C||w[0]!==void 0)&&A--)}return b[0]||b.shift(),x.e=f,at(x,o?l+It(x)+1:l)}})();function C3(e,t){var r,n,i,l,o,c,f=0,h=0,p=e.constructor,y=p.precision;if(It(e)>16)throw Error(Cj+It(e));if(!e.s)return new p(tn);for(mt=!1,c=y,o=new p(.03125);e.abs().gte(.1);)e=e.times(o),h+=5;for(n=Math.log(Ms(2,h))/Math.LN10*2+5|0,c+=n,r=i=l=new p(tn),p.precision=c;;){if(i=at(i.times(e),c),r=r.times(++f),o=l.plus(Ka(i,r,c)),ia(o.d).slice(0,c)===ia(l.d).slice(0,c)){for(;h--;)l=at(l.times(l),c);return p.precision=y,t==null?(mt=!0,at(l,y)):l}l=o}}function It(e){for(var t=e.e*ct,r=e.d[0];r>=10;r/=10)t++;return t}function M0(e,t,r){if(t>e.LN10.sd())throw mt=!0,r&&(e.precision=r),Error(En+"LN10 precision limit exceeded");return at(new e(e.LN10),t)}function Di(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,g=10,x=e,b=x.d,w=x.constructor,N=w.precision;if(x.s<1)throw Error(En+(x.s?"NaN":"-Infinity"));if(x.eq(tn))return new w(0);if(t==null?(mt=!1,h=N):h=t,x.eq(10))return t==null&&(mt=!0),M0(w,h);if(h+=g,w.precision=h,r=ia(b),n=r.charAt(0),l=It(x),Math.abs(l)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)x=x.times(e),r=ia(x.d),n=r.charAt(0),y++;l=It(x),n>1?(x=new w("0."+r),l++):x=new w(n+"."+r.slice(1))}else return f=M0(w,h+2,N).times(l+""),x=Vc(new w(n+"."+r.slice(1)),h-g).plus(f),w.precision=N,t==null?(mt=!0,at(x,N)):x;for(c=o=x=Ka(x.minus(tn),x.plus(tn),h),p=at(x.times(x),h),i=3;;){if(o=at(o.times(p),h),f=c.plus(Ka(o,new w(i),h)),ia(f.d).slice(0,h)===ia(c.d).slice(0,h))return c=c.times(2),l!==0&&(c=c.plus(M0(w,h+2,N).times(l+""))),c=Ka(c,new w(y),h),w.precision=N,t==null?(mt=!0,at(c,N)):c;c=f,i+=2}}function NC(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=su(r/ct),e.d=[],n=(r+1)%ct,r<0&&(n+=ct),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=ct;n<i;)e.d.push(+t.slice(n,n+=ct));t=t.slice(n),n=ct-t.length}else n-=i;for(;n--;)t+="0";if(e.d.push(+t),mt&&(e.e>um||e.e<-um))throw Error(Cj+r)}else e.s=0,e.e=0,e.d=[0];return e}function at(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+=ct,i=t,h=y[p=0];else{if(p=Math.ceil((n+1)/ct),l=y.length,p>=l)return e;for(h=l=y[p],o=1;l>=10;l/=10)o++;n%=ct,i=n-ct+o}if(r!==void 0&&(l=Ms(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/Ms(10,o-i):0:y[p-1])%10&1||r==(e.s<0?8:7))),t<1||!y[0])return f?(l=It(e),y.length=1,t=t-l-1,y[0]=Ms(10,(ct-t%ct)%ct),e.e=su(-t/ct)||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=Ms(10,ct-n),y[p]=i>0?(h/Ms(10,o-i)%Ms(10,i)|0)*l:0),f)for(;;)if(p==0){(y[0]+=l)==Vt&&(y[0]=1,++e.e);break}else{if(y[p]+=l,y[p]!=Vt)break;y[p--]=0,l=1}for(n=y.length;y[--n]===0;)y.pop();if(mt&&(e.e>um||e.e<-um))throw Error(Cj+It(e));return e}function T3(e,t){var r,n,i,l,o,c,f,h,p,y,g=e.constructor,x=g.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new g(e),mt?at(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/ct),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]=Vt-1;--f[l],f[i]+=Vt}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,mt?at(t,x):t):new g(0)}function ul(e,t,r){var n,i=It(e),l=ia(e.d),o=l.length;return t?(r&&(n=r-o)>0?l=l.charAt(0)+"."+l.slice(1)+Di(n):o>1&&(l=l.charAt(0)+"."+l.slice(1)),l=l+(i<0?"e":"e+")+i):i<0?(l="0."+Di(-i-1)+l,r&&(n=r-o)>0&&(l+=Di(n))):i>=o?(l+=Di(i+1-o),r&&(n=r-i-1)>0&&(l=l+"."+Di(n))):((n=i+1)<o&&(l=l.slice(0,n)+"."+l.slice(n)),r&&(n=r-o)>0&&(i+1===o&&(l+="."),l+=Di(n))),e.s<0?"-"+l:l}function OC(e,t){if(e.length>t)return e.length=t,!0}function P3(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(el+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 NC(o,l.toString())}else if(typeof l!="string")throw Error(el+l);if(l.charCodeAt(0)===45?(l=l.slice(1),o.s=-1):o.s=1,iK.test(l))NC(o,l);else throw Error(el+l)}if(i.prototype=pe,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=P3,i.config=i.set=sK,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 sK(e){if(!e||typeof e!="object")throw Error(En+"Object expected");var t,r,n,i=["precision",1,iu,"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(su(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(el+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(el+r+": "+n);return this}var Tj=P3(aK);tn=new Tj(1);const Be=Tj;function M3(e){var t;return e===0?t=1:t=Math.floor(new Be(e).abs().log(10).toNumber())+1,t}function R3(e,t,r){for(var n=new Be(e),i=0,l=[];n.lt(t)&&i<1e5;)l.push(n.toNumber()),n=n.add(r),i++;return l}var D3=e=>{var[t,r]=e,[n,i]=[t,r];return t>r&&([n,i]=[r,t]),[n,i]},Pj=(e,t,r)=>{if(e.lte(0))return new Be(0);var n=M3(e.toNumber()),i=new Be(10).pow(n),l=e.div(i),o=n!==1?.05:.1,c=new Be(Math.ceil(l.div(o).toNumber())).add(r).mul(o),f=c.mul(i);return t?new Be(f.toNumber()):new Be(Math.ceil(f.toNumber()))},k3=(e,t,r)=>{var n;if(e.lte(0))return new Be(0);var i=[1,2,2.5,5],l=e.toNumber(),o=Math.floor(new Be(l).abs().log(10).toNumber()),c=new Be(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 Be(10).pow(p))}var y=(n=i[h])!==null&&n!==void 0?n:1,g=new Be(y).mul(c);return t?g:new Be(Math.ceil(g.toNumber()))},lK=(e,t,r)=>{var n=new Be(1),i=new Be(e);if(!i.isint()&&r){var l=Math.abs(e);l<1?(n=new Be(10).pow(M3(e)-1),i=new Be(Math.floor(i.div(n).toNumber())).mul(n)):l>1&&(i=new Be(Math.floor(e)))}else e===0?i=new Be(Math.floor((t-1)/2)):r||(i=new Be(Math.floor(e)));for(var o=Math.floor((t-1)/2),c=[],f=0;f<t;f++)c.push(i.add(new Be(f-o).mul(n)).toNumber());return c},I3=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]:Pj;if(!Number.isFinite((r-t)/(n-1)))return{step:new Be(0),tickMin:new Be(0),tickMax:new Be(0)};var c=o(new Be(r).sub(t).div(n-1),i,l),f;t<=0&&r>=0?f=new Be(0):(f=new Be(t).add(r).div(2),f=f.sub(new Be(f).mod(c)));var h=Math.ceil(f.sub(t).div(c).toNumber()),p=Math.ceil(new Be(r).sub(f).div(c).toNumber()),y=h+p+1;return y>n?I3(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 Be(h).mul(c)),tickMax:f.add(new Be(p).mul(c))})},_C=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]=D3([r,n]);if(f===-1/0||h===1/0){var p=h===1/0?[f,...Array(i-1).fill(1/0)]:[...Array(i-1).fill(-1/0),h];return r>n?p.reverse():p}if(f===h)return lK(f,i,l);var y=o==="snap125"?k3:Pj,{step:g,tickMin:x,tickMax:b}=I3(f,h,c,l,0,y),w=R3(x,b.add(new Be(.1).mul(g)),g);return r>n?w.reverse():w},EC=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]=D3([n,i]);if(c===-1/0||f===1/0)return[n,i];if(c===f)return[c];var h=o==="snap125"?k3:Pj,p=Math.max(r,2),y=h(new Be(f).sub(c).div(p-1),l,0),g=[...R3(new Be(c),new Be(f),y),f];return l===!1&&(g=g.map(x=>Math.round(x))),n>i?g.reverse():g},L3=e=>e.rootProps.maxBarSize,oK=e=>e.rootProps.barGap,$3=e=>e.rootProps.barCategoryGap,uK=e=>e.rootProps.barSize,hp=e=>e.rootProps.stackOffset,z3=e=>e.rootProps.reverseStackOrder,Mj=e=>e.options.chartName,Rj=e=>e.rootProps.syncId,B3=e=>e.rootProps.syncMethod,Dj=e=>e.options.eventEmitter,Qt={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},_s={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},Wn={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},mp=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function pp(e,t,r){if(r!=="auto")return r;if(e!=null)return Za(e,t)?"category":"number"}function AC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function cm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?AC(Object(r),!0).forEach(function(n){cK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):AC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function cK(e,t,r){return(t=dK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dK(e){var t=fK(e,"string");return typeof t=="symbol"?t:t+""}function fK(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var CC={allowDataOverflow:_s.allowDataOverflow,allowDecimals:_s.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:_s.angleAxisId,includeHidden:!1,name:void 0,reversed:_s.reversed,scale:_s.scale,tick:_s.tick,tickCount:void 0,ticks:void 0,type:_s.type,unit:void 0,niceTicks:"auto"},TC={allowDataOverflow:Wn.allowDataOverflow,allowDecimals:Wn.allowDecimals,allowDuplicatedCategory:Wn.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Wn.radiusAxisId,includeHidden:Wn.includeHidden,name:void 0,reversed:Wn.reversed,scale:Wn.scale,tick:Wn.tick,tickCount:Wn.tickCount,ticks:void 0,type:Wn.type,unit:void 0,niceTicks:"auto"},hK=(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},kj=V([hK,i3],(e,t)=>{var r;if(e!=null)return e;var n=(r=pp(t,"angleAxis",CC.type))!==null&&r!==void 0?r:"category";return cm(cm({},CC),{},{type:n})}),mK=(e,t)=>e.polarAxis.radiusAxis[t],Ij=V([mK,i3],(e,t)=>{var r;if(e!=null)return e;var n=(r=pp(t,"radiusAxis",TC.type))!==null&&r!==void 0?r:"category";return cm(cm({},TC),{},{type:n})}),yp=e=>e.polarOptions,Lj=V([Ja,ei,Wt],zH),U3=V([yp,Lj],(e,t)=>{if(e!=null)return Bn(e.innerRadius,t,0)}),q3=V([yp,Lj],(e,t)=>{if(e!=null)return Bn(e.outerRadius,t,t*.8)}),pK=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:r}=e;return[t,r]},F3=V([yp],pK);V([kj,F3],mp);var H3=V([Lj,U3,q3],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});V([Ij,H3],mp);var K3=V([Ze,yp,U3,q3,Ja,ei],(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:Bn(o,i,i/2),cy:Bn(c,l,l/2),innerRadius:r,outerRadius:n,startAngle:f,endAngle:h,clockWise:!1}}}),Zt=(e,t)=>t,gp=(e,t,r)=>r;function $j(e){return e==null?void 0:e.id}function G3(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=$j(c);h.forEach((y,g)=>{var x=l==null||i?g:String(Pt(y,l,null)),b=Pt(y,c.dataKey,0),w;o.has(x)?w=o.get(x):w={},Object.assign(w,{[p]:b}),o.set(x,w)})}}),Array.from(o.values())}function vp(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var xp=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function bp(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function yK(e,t){if(e.length===t.length){for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return!1}var Jt=e=>{var t=Ze(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},lu=e=>e.tooltip.settings.axisId;function zj(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 gK=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!sa(t)){for(var r,n,i=0;i<t.length;i++){var l=t[i];Ue(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 Ji(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function vK(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Bj(e){let t,r,n;e.length!==2?(t=Ji,r=(c,f)=>Ji(e(c),f),n=(c,f)=>e(c)-f):(t=e===Ji||e===vK?e:xK,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 xK(){return 0}function Y3(e){return e===null?NaN:+e}function*bK(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const jK=Bj(Ji),xd=jK.right;Bj(Y3).center;class PC extends Map{constructor(t,r=NK){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(MC(this,t))}has(t){return super.has(MC(this,t))}set(t,r){return super.set(wK(this,t),r)}delete(t){return super.delete(SK(this,t))}}function MC({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function wK({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function SK({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function NK(e){return e!==null&&typeof e=="object"?e.valueOf():e}function OK(e=Ji){if(e===Ji)return V3;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 V3(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const _K=Math.sqrt(50),EK=Math.sqrt(10),AK=Math.sqrt(2);function dm(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>=_K?10:l>=EK?5:l>=AK?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?dm(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?dm(t,e,r):dm(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,dm(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 RC(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function DC(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function Q3(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?V3:OK(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),g=.5*Math.sqrt(p*y*(f-y)/f)*(h-f/2<0?-1:1),x=Math.max(r,Math.floor(t-h*y/f+g)),b=Math.min(n,Math.floor(t+(f-h)*y/f+g));Q3(e,t,x,b,i)}const l=e[t];let o=r,c=n;for(gc(e,r,t),i(e[n],l)>0&&gc(e,r,n);o<c;){for(gc(e,o,c),++o,--c;i(e[o],l)<0;)++o;for(;i(e[c],l)>0;)--c}i(e[r],l)===0?gc(e,r,c):(++c,gc(e,c,n)),c<=t&&(r=c+1),t<=c&&(n=c-1)}return e}function gc(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function CK(e,t,r){if(e=Float64Array.from(bK(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return DC(e);if(t>=1)return RC(e);var n,i=(n-1)*t,l=Math.floor(i),o=RC(Q3(e,l).subarray(0,l+1)),c=DC(e.subarray(l+1));return o+(c-o)*(i-l)}}function TK(e,t,r=Y3){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 PK(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 An(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function ti(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 Uj(){var e=new PC,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 PC;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 Uj(t,r).unknown(n)},An.apply(i,arguments),i}function qj(){var e=Uj().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 g=t().length,x=i<n,b=x?i:n,w=x?n:i;l=(w-b)/Math.max(1,g-f+h*2),c&&(l=Math.floor(l)),b+=(w-b-l*(g-f))*p,o=l*(1-f),c&&(b=Math.round(b),o=Math.round(o));var N=PK(g).map(function(O){return b+l*O});return r(x?N.reverse():N)}return e.domain=function(g){return arguments.length?(t(g),y()):t()},e.range=function(g){return arguments.length?([n,i]=g,n=+n,i=+i,y()):[n,i]},e.rangeRound=function(g){return[n,i]=g,n=+n,i=+i,c=!0,y()},e.bandwidth=function(){return o},e.step=function(){return l},e.round=function(g){return arguments.length?(c=!!g,y()):c},e.padding=function(g){return arguments.length?(f=Math.min(1,h=+g),y()):f},e.paddingInner=function(g){return arguments.length?(f=Math.min(1,g),y()):f},e.paddingOuter=function(g){return arguments.length?(h=+g,y()):h},e.align=function(g){return arguments.length?(p=Math.max(0,Math.min(1,g)),y()):p},e.copy=function(){return qj(t(),[n,i]).round(c).paddingInner(f).paddingOuter(h).align(p)},An.apply(y(),arguments)}function X3(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return X3(t())},e}function MK(){return X3(qj.apply(null,arguments).paddingInner(1))}function Fj(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function W3(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function bd(){}var Qc=.7,fm=1/Qc,_o="\\s*([+-]?\\d+)\\s*",Xc="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",la="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",RK=/^#([0-9a-f]{3,8})$/,DK=new RegExp(`^rgb\\(${_o},${_o},${_o}\\)$`),kK=new RegExp(`^rgb\\(${la},${la},${la}\\)$`),IK=new RegExp(`^rgba\\(${_o},${_o},${_o},${Xc}\\)$`),LK=new RegExp(`^rgba\\(${la},${la},${la},${Xc}\\)$`),$K=new RegExp(`^hsl\\(${Xc},${la},${la}\\)$`),zK=new RegExp(`^hsla\\(${Xc},${la},${la},${Xc}\\)$`),kC={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};Fj(bd,Wc,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:IC,formatHex:IC,formatHex8:BK,formatHsl:UK,formatRgb:LC,toString:LC});function IC(){return this.rgb().formatHex()}function BK(){return this.rgb().formatHex8()}function UK(){return Z3(this).formatHsl()}function LC(){return this.rgb().formatRgb()}function Wc(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=RK.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?$C(t):r===3?new Hr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?uh(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?uh(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=DK.exec(e))?new Hr(t[1],t[2],t[3],1):(t=kK.exec(e))?new Hr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=IK.exec(e))?uh(t[1],t[2],t[3],t[4]):(t=LK.exec(e))?uh(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=$K.exec(e))?UC(t[1],t[2]/100,t[3]/100,1):(t=zK.exec(e))?UC(t[1],t[2]/100,t[3]/100,t[4]):kC.hasOwnProperty(e)?$C(kC[e]):e==="transparent"?new Hr(NaN,NaN,NaN,0):null}function $C(e){return new Hr(e>>16&255,e>>8&255,e&255,1)}function uh(e,t,r,n){return n<=0&&(e=t=r=NaN),new Hr(e,t,r,n)}function qK(e){return e instanceof bd||(e=Wc(e)),e?(e=e.rgb(),new Hr(e.r,e.g,e.b,e.opacity)):new Hr}function cb(e,t,r,n){return arguments.length===1?qK(e):new Hr(e,t,r,n??1)}function Hr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Fj(Hr,cb,W3(bd,{brighter(e){return e=e==null?fm:Math.pow(fm,e),new Hr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Qc:Math.pow(Qc,e),new Hr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Hr(tl(this.r),tl(this.g),tl(this.b),hm(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:zC,formatHex:zC,formatHex8:FK,formatRgb:BC,toString:BC}));function zC(){return`#${Ls(this.r)}${Ls(this.g)}${Ls(this.b)}`}function FK(){return`#${Ls(this.r)}${Ls(this.g)}${Ls(this.b)}${Ls((isNaN(this.opacity)?1:this.opacity)*255)}`}function BC(){const e=hm(this.opacity);return`${e===1?"rgb(":"rgba("}${tl(this.r)}, ${tl(this.g)}, ${tl(this.b)}${e===1?")":`, ${e})`}`}function hm(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function tl(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ls(e){return e=tl(e),(e<16?"0":"")+e.toString(16)}function UC(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new In(e,t,r,n)}function Z3(e){if(e instanceof In)return new In(e.h,e.s,e.l,e.opacity);if(e instanceof bd||(e=Wc(e)),!e)return new In;if(e instanceof In)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),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 In(o,c,f,e.opacity)}function HK(e,t,r,n){return arguments.length===1?Z3(e):new In(e,t,r,n??1)}function In(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Fj(In,HK,W3(bd,{brighter(e){return e=e==null?fm:Math.pow(fm,e),new In(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Qc:Math.pow(Qc,e),new In(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new Hr(R0(e>=240?e-240:e+120,i,n),R0(e,i,n),R0(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new In(qC(this.h),ch(this.s),ch(this.l),hm(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=hm(this.opacity);return`${e===1?"hsl(":"hsla("}${qC(this.h)}, ${ch(this.s)*100}%, ${ch(this.l)*100}%${e===1?")":`, ${e})`}`}}));function qC(e){return e=(e||0)%360,e<0?e+360:e}function ch(e){return Math.max(0,Math.min(1,e||0))}function R0(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 KK(e,t){return function(r){return e+r*t}}function GK(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 YK(e){return(e=+e)==1?J3:function(t,r){return r-t?GK(t,r,e):Hj(isNaN(t)?r:t)}}function J3(e,t){var r=t-e;return r?KK(e,r):Hj(isNaN(e)?t:e)}const FC=(function e(t){var r=YK(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=J3(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 VK(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 QK(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function XK(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]=ou(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 WK(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function mm(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function ZK(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]=ou(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,D0=new RegExp(db.source,"g");function JK(e){return function(){return e}}function eG(e){return function(t){return e(t)+""}}function tG(e,t){var r=db.lastIndex=D0.lastIndex=0,n,i,l,o=-1,c=[],f=[];for(e=e+"",t=t+"";(n=db.exec(e))&&(i=D0.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:mm(n,i)})),r=D0.lastIndex;return r<t.length&&(l=t.slice(r),c[o]?c[o]+=l:c[++o]=l),c.length<2?f[0]?eG(f[0].x):JK(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 ou(e,t){var r=typeof t,n;return t==null||r==="boolean"?Hj(t):(r==="number"?mm:r==="string"?(n=Wc(t))?(t=n,FC):tG:t instanceof Wc?FC:t instanceof Date?WK:QK(t)?VK:Array.isArray(t)?XK:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?ZK:mm)(e,t)}function Kj(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function rG(e,t){t===void 0&&(t=e,e=ou);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 nG(e){return function(){return e}}function pm(e){return+e}var HC=[0,1];function Or(e){return e}function fb(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:nG(isNaN(t)?NaN:.5)}function aG(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function iG(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 sG(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=xd(e,c,1,n)-1;return l[f](i[f](c))}}function jd(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function jp(){var e=HC,t=HC,r=ou,n,i,l,o=Or,c,f,h;function p(){var g=Math.min(e.length,t.length);return o!==Or&&(o=aG(e[0],e[g-1])),c=g>2?sG:iG,f=h=null,y}function y(g){return g==null||isNaN(g=+g)?l:(f||(f=c(e.map(n),t,r)))(n(o(g)))}return y.invert=function(g){return o(i((h||(h=c(t,e.map(n),mm)))(g)))},y.domain=function(g){return arguments.length?(e=Array.from(g,pm),p()):e.slice()},y.range=function(g){return arguments.length?(t=Array.from(g),p()):t.slice()},y.rangeRound=function(g){return t=Array.from(g),r=Kj,p()},y.clamp=function(g){return arguments.length?(o=g?!0:Or,p()):o!==Or},y.interpolate=function(g){return arguments.length?(r=g,p()):r},y.unknown=function(g){return arguments.length?(l=g,y):l},function(g,x){return n=g,i=x,p()}}function Gj(){return jp()(Or,Or)}function lG(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function ym(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 Qo(e){return e=ym(Math.abs(e)),e?e[1]:NaN}function oG(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 uG(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var cG=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Zc(e){if(!(t=cG.exec(e)))throw new Error("invalid format: "+e);var t;return new Yj({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]})}Zc.prototype=Yj.prototype;function Yj(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+""}Yj.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 dG(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 fG(e,t){var r=ym(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")+ym(e,Math.max(0,t+l-1))[0]}function KC(e,t){var r=ym(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 GC={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:lG,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>KC(e*100,t),r:KC,s:fG,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function YC(e){return e}var VC=Array.prototype.map,QC=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function hG(e){var t=e.grouping===void 0||e.thousands===void 0?YC:oG(VC.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?YC:uG(VC.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,g){y=Zc(y);var x=y.fill,b=y.align,w=y.sign,N=y.symbol,O=y.zero,A=y.width,T=y.comma,E=y.precision,C=y.trim,M=y.type;M==="n"?(T=!0,M="g"):GC[M]||(E===void 0&&(E=12),C=!0,M="g"),(O||x==="0"&&b==="=")&&(O=!0,x="0",b="=");var R=(g&&g.prefix!==void 0?g.prefix:"")+(N==="$"?r:N==="#"&&/[boxX]/.test(M)?"0"+M.toLowerCase():""),D=(N==="$"?n:/[%p]/.test(M)?o:"")+(g&&g.suffix!==void 0?g.suffix:""),L=GC[M],k=/[defgprs%]/.test(M);E=E===void 0?6:/[gprs]/.test(M)?Math.max(1,Math.min(21,E)):Math.max(0,Math.min(20,E));function F(q){var ie=R,ee=D,ne,z,H;if(M==="c")ee=L(q)+ee,q="";else{q=+q;var Z=q<0||1/q<0;if(q=isNaN(q)?f:L(Math.abs(q),E),C&&(q=dG(q)),Z&&+q==0&&w!=="+"&&(Z=!1),ie=(Z?w==="("?w:c:w==="-"||w==="("?"":w)+ie,ee=(M==="s"&&!isNaN(q)&&gm!==void 0?QC[8+gm/3]:"")+ee+(Z&&w==="("?")":""),k){for(ne=-1,z=q.length;++ne<z;)if(H=q.charCodeAt(ne),48>H||H>57){ee=(H===46?i+q.slice(ne+1):q.slice(ne))+ee,q=q.slice(0,ne);break}}}T&&!O&&(q=t(q,1/0));var ae=ie.length+q.length+ee.length,le=ae<A?new Array(A-ae+1).join(x):"";switch(T&&O&&(q=t(le+q,le.length?A-ee.length:1/0),le=""),b){case"<":q=ie+q+ee+le;break;case"=":q=ie+le+q+ee;break;case"^":q=le.slice(0,ae=le.length>>1)+ie+q+ee+le.slice(ae);break;default:q=le+ie+q+ee;break}return l(q)}return F.toString=function(){return y+""},F}function p(y,g){var x=Math.max(-8,Math.min(8,Math.floor(Qo(g)/3)))*3,b=Math.pow(10,-x),w=h((y=Zc(y),y.type="f",y),{suffix:QC[8+x/3]});return function(N){return w(b*N)}}return{format:h,formatPrefix:p}}var dh,Vj,e4;mG({thousands:",",grouping:[3],currency:["$",""]});function mG(e){return dh=hG(e),Vj=dh.format,e4=dh.formatPrefix,dh}function pG(e){return Math.max(0,-Qo(Math.abs(e)))}function yG(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Qo(t)/3)))*3-Qo(Math.abs(e)))}function gG(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Qo(t)-Qo(e))+1}function t4(e,t,r,n){var i=ob(e,t,r),l;switch(n=Zc(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(l=yG(i,o))&&(n.precision=l),e4(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(l=gG(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=l-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(l=pG(i))&&(n.precision=l-(n.type==="%")*2);break}}return Vj(n)}function is(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 t4(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 r4(){var e=Gj();return e.copy=function(){return jd(e,r4())},An.apply(e,arguments),is(e)}function n4(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,pm),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return n4(e).unknown(t)},e=arguments.length?Array.from(e,pm):[0,1],is(r)}function a4(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 XC(e){return Math.log(e)}function WC(e){return Math.exp(e)}function vG(e){return-Math.log(-e)}function xG(e){return-Math.exp(-e)}function bG(e){return isFinite(e)?+("1e"+e):e<0?0:e}function jG(e){return e===10?bG:e===Math.E?Math.exp:t=>Math.pow(e,t)}function wG(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function ZC(e){return(t,r)=>-e(-t,r)}function Qj(e){const t=e(XC,WC),r=t.domain;let n=10,i,l;function o(){return i=wG(n),l=jG(n),r()[0]<0?(i=ZC(i),l=ZC(l),e(vG,xG)):e(XC,WC),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 g=i(h),x=i(p),b,w;const N=c==null?10:+c;let O=[];if(!(n%1)&&x-g<N){if(g=Math.floor(g),x=Math.ceil(x),h>0){for(;g<=x;++g)for(b=1;b<n;++b)if(w=g<0?b/l(-g):b*l(g),!(w<h)){if(w>p)break;O.push(w)}}else for(;g<=x;++g)for(b=n-1;b>=1;--b)if(w=g>0?b/l(-g):b*l(g),!(w<h)){if(w>p)break;O.push(w)}O.length*2<N&&(O=sb(h,p,N))}else O=sb(g,x,Math.min(x-g,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=Zc(f)).precision==null&&(f.trim=!0),f=Vj(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(a4(r(),{floor:c=>l(Math.floor(i(c))),ceil:c=>l(Math.ceil(i(c)))})),t}function i4(){const e=Qj(jp()).domain([1,10]);return e.copy=()=>jd(e,i4()).base(e.base()),An.apply(e,arguments),e}function JC(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function eT(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Xj(e){var t=1,r=e(JC(t),eT(t));return r.constant=function(n){return arguments.length?e(JC(t=+n),eT(t)):t},is(r)}function s4(){var e=Xj(jp());return e.copy=function(){return jd(e,s4()).constant(e.constant())},An.apply(e,arguments)}function tT(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function SG(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function NG(e){return e<0?-e*e:e*e}function Wj(e){var t=e(Or,Or),r=1;function n(){return r===1?e(Or,Or):r===.5?e(SG,NG):e(tT(r),tT(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},is(t)}function Zj(){var e=Wj(jp());return e.copy=function(){return jd(e,Zj()).exponent(e.exponent())},An.apply(e,arguments),e}function OG(){return Zj.apply(null,arguments).exponent(.5)}function rT(e){return Math.sign(e)*e*e}function _G(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function l4(){var e=Gj(),t=[0,1],r=!1,n;function i(l){var o=_G(e(l));return isNaN(o)?n:r?Math.round(o):o}return i.invert=function(l){return e.invert(rT(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,pm)).map(rT)),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 l4(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},An.apply(i,arguments),is(i)}function o4(){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]=TK(e,o/c);return l}function l(o){return o==null||isNaN(o=+o)?n:t[xd(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(Ji),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 o4().domain(e).range(t).unknown(n)},An.apply(l,arguments)}function u4(){var e=0,t=1,r=1,n=[.5],i=[0,1],l;function o(f){return f!=null&&f<=f?i[xd(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 u4().domain([e,t]).range(i).unknown(l)},An.apply(is(o),arguments)}function c4(){var e=[.5],t=[0,1],r,n=1;function i(l){return l!=null&&l<=l?t[xd(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 c4().domain(e).range(t).unknown(r)},An.apply(i,arguments)}const k0=new Date,I0=new Date;function qt(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=>qt(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)=>(k0.setTime(+l),I0.setTime(+o),e(k0),e(I0),Math.floor(r(k0,I0))),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 vm=qt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);vm.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?qt(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):vm);vm.range;const Ua=1e3,_n=Ua*60,qa=_n*60,Qa=qa*24,Jj=Qa*7,nT=Qa*30,L0=Qa*365,$s=qt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ua)},(e,t)=>(t-e)/Ua,e=>e.getUTCSeconds());$s.range;const ew=qt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ua)},(e,t)=>{e.setTime(+e+t*_n)},(e,t)=>(t-e)/_n,e=>e.getMinutes());ew.range;const tw=qt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*_n)},(e,t)=>(t-e)/_n,e=>e.getUTCMinutes());tw.range;const rw=qt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ua-e.getMinutes()*_n)},(e,t)=>{e.setTime(+e+t*qa)},(e,t)=>(t-e)/qa,e=>e.getHours());rw.range;const nw=qt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*qa)},(e,t)=>(t-e)/qa,e=>e.getUTCHours());nw.range;const wd=qt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*_n)/Qa,e=>e.getDate()-1);wd.range;const wp=qt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Qa,e=>e.getUTCDate()-1);wp.range;const d4=qt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Qa,e=>Math.floor(e/Qa));d4.range;function gl(e){return qt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*_n)/Jj)}const Sp=gl(0),xm=gl(1),EG=gl(2),AG=gl(3),Xo=gl(4),CG=gl(5),TG=gl(6);Sp.range;xm.range;EG.range;AG.range;Xo.range;CG.range;TG.range;function vl(e){return qt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/Jj)}const Np=vl(0),bm=vl(1),PG=vl(2),MG=vl(3),Wo=vl(4),RG=vl(5),DG=vl(6);Np.range;bm.range;PG.range;MG.range;Wo.range;RG.range;DG.range;const aw=qt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());aw.range;const iw=qt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());iw.range;const Xa=qt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Xa.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:qt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});Xa.range;const Wa=qt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Wa.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:qt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});Wa.range;function f4(e,t,r,n,i,l){const o=[[$s,1,Ua],[$s,5,5*Ua],[$s,15,15*Ua],[$s,30,30*Ua],[l,1,_n],[l,5,5*_n],[l,15,15*_n],[l,30,30*_n],[i,1,qa],[i,3,3*qa],[i,6,6*qa],[i,12,12*qa],[n,1,Qa],[n,2,2*Qa],[r,1,Jj],[t,1,nT],[t,3,3*nT],[e,1,L0]];function c(h,p,y){const g=p<h;g&&([h,p]=[p,h]);const x=y&&typeof y.range=="function"?y:f(h,p,y),b=x?x.range(h,+p+1):[];return g?b.reverse():b}function f(h,p,y){const g=Math.abs(p-h)/y,x=Bj(([,,N])=>N).right(o,g);if(x===o.length)return e.every(ob(h/L0,p/L0,y));if(x===0)return vm.every(Math.max(ob(h,p,y),1));const[b,w]=o[g/o[x-1][2]<o[x][2]/g?x-1:x];return b.every(w)}return[c,f]}const[kG,IG]=f4(Wa,iw,Np,d4,nw,tw),[LG,$G]=f4(Xa,aw,Sp,wd,rw,ew);function $0(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 z0(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 vc(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function zG(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),g=bc(l),x=xc(o),b=bc(o),w=xc(c),N=bc(c),O=xc(f),A=bc(f),T={a:H,A:Z,b:ae,B:le,c:null,d:uT,e:uT,f:oY,g:vY,G:bY,H:iY,I:sY,j:lY,L:h4,m:uY,M:cY,p:I,q:Q,Q:fT,s:hT,S:dY,u:fY,U:hY,V:mY,w:pY,W:yY,x:null,X:null,y:gY,Y:xY,Z:jY,"%":dT},E={a:oe,A:se,b:fe,B:xe,c:null,d:cT,e:cT,f:OY,g:kY,G:LY,H:wY,I:SY,j:NY,L:p4,m:_Y,M:EY,p:Se,q:Re,Q:fT,s:hT,S:AY,u:CY,U:TY,V:PY,w:MY,W:RY,x:null,X:null,y:DY,Y:IY,Z:$Y,"%":dT},C={a:k,A:F,b:q,B:ie,c:ee,d:lT,e:lT,f:tY,g:sT,G:iT,H:oT,I:oT,j:WG,L:eY,m:XG,M:ZG,p:L,q:QG,Q:nY,s:aY,S:JG,u:HG,U:KG,V:GG,w:FG,W:YG,x:ne,X:z,y:sT,Y:iT,Z:VG,"%":rY};T.x=M(r,T),T.X=M(n,T),T.c=M(t,T),E.x=M(r,E),E.X=M(n,E),E.c=M(t,E);function M(ce,de){return function(Oe){var ue=[],gt=-1,Pe=0,vt=ce.length,xt,Ht,he;for(Oe instanceof Date||(Oe=new Date(+Oe));++gt<vt;)ce.charCodeAt(gt)===37&&(ue.push(ce.slice(Pe,gt)),(Ht=aT[xt=ce.charAt(++gt)])!=null?xt=ce.charAt(++gt):Ht=xt==="e"?" ":"0",(he=de[xt])&&(xt=he(Oe,Ht)),ue.push(xt),Pe=gt+1);return ue.push(ce.slice(Pe,gt)),ue.join("")}}function R(ce,de){return function(Oe){var ue=vc(1900,void 0,1),gt=D(ue,ce,Oe+="",0),Pe,vt;if(gt!=Oe.length)return null;if("Q"in ue)return new Date(ue.Q);if("s"in ue)return new Date(ue.s*1e3+("L"in ue?ue.L:0));if(de&&!("Z"in ue)&&(ue.Z=0),"p"in ue&&(ue.H=ue.H%12+ue.p*12),ue.m===void 0&&(ue.m="q"in ue?ue.q:0),"V"in ue){if(ue.V<1||ue.V>53)return null;"w"in ue||(ue.w=1),"Z"in ue?(Pe=z0(vc(ue.y,0,1)),vt=Pe.getUTCDay(),Pe=vt>4||vt===0?bm.ceil(Pe):bm(Pe),Pe=wp.offset(Pe,(ue.V-1)*7),ue.y=Pe.getUTCFullYear(),ue.m=Pe.getUTCMonth(),ue.d=Pe.getUTCDate()+(ue.w+6)%7):(Pe=$0(vc(ue.y,0,1)),vt=Pe.getDay(),Pe=vt>4||vt===0?xm.ceil(Pe):xm(Pe),Pe=wd.offset(Pe,(ue.V-1)*7),ue.y=Pe.getFullYear(),ue.m=Pe.getMonth(),ue.d=Pe.getDate()+(ue.w+6)%7)}else("W"in ue||"U"in ue)&&("w"in ue||(ue.w="u"in ue?ue.u%7:"W"in ue?1:0),vt="Z"in ue?z0(vc(ue.y,0,1)).getUTCDay():$0(vc(ue.y,0,1)).getDay(),ue.m=0,ue.d="W"in ue?(ue.w+6)%7+ue.W*7-(vt+5)%7:ue.w+ue.U*7-(vt+6)%7);return"Z"in ue?(ue.H+=ue.Z/100|0,ue.M+=ue.Z%100,z0(ue)):$0(ue)}}function D(ce,de,Oe,ue){for(var gt=0,Pe=de.length,vt=Oe.length,xt,Ht;gt<Pe;){if(ue>=vt)return-1;if(xt=de.charCodeAt(gt++),xt===37){if(xt=de.charAt(gt++),Ht=C[xt in aT?de.charAt(gt++):xt],!Ht||(ue=Ht(ce,Oe,ue))<0)return-1}else if(xt!=Oe.charCodeAt(ue++))return-1}return ue}function L(ce,de,Oe){var ue=h.exec(de.slice(Oe));return ue?(ce.p=p.get(ue[0].toLowerCase()),Oe+ue[0].length):-1}function k(ce,de,Oe){var ue=x.exec(de.slice(Oe));return ue?(ce.w=b.get(ue[0].toLowerCase()),Oe+ue[0].length):-1}function F(ce,de,Oe){var ue=y.exec(de.slice(Oe));return ue?(ce.w=g.get(ue[0].toLowerCase()),Oe+ue[0].length):-1}function q(ce,de,Oe){var ue=O.exec(de.slice(Oe));return ue?(ce.m=A.get(ue[0].toLowerCase()),Oe+ue[0].length):-1}function ie(ce,de,Oe){var ue=w.exec(de.slice(Oe));return ue?(ce.m=N.get(ue[0].toLowerCase()),Oe+ue[0].length):-1}function ee(ce,de,Oe){return D(ce,t,de,Oe)}function ne(ce,de,Oe){return D(ce,r,de,Oe)}function z(ce,de,Oe){return D(ce,n,de,Oe)}function H(ce){return o[ce.getDay()]}function Z(ce){return l[ce.getDay()]}function ae(ce){return f[ce.getMonth()]}function le(ce){return c[ce.getMonth()]}function I(ce){return i[+(ce.getHours()>=12)]}function Q(ce){return 1+~~(ce.getMonth()/3)}function oe(ce){return o[ce.getUTCDay()]}function se(ce){return l[ce.getUTCDay()]}function fe(ce){return f[ce.getUTCMonth()]}function xe(ce){return c[ce.getUTCMonth()]}function Se(ce){return i[+(ce.getUTCHours()>=12)]}function Re(ce){return 1+~~(ce.getUTCMonth()/3)}return{format:function(ce){var de=M(ce+="",T);return de.toString=function(){return ce},de},parse:function(ce){var de=R(ce+="",!1);return de.toString=function(){return ce},de},utcFormat:function(ce){var de=M(ce+="",E);return de.toString=function(){return ce},de},utcParse:function(ce){var de=R(ce+="",!0);return de.toString=function(){return ce},de}}}var aT={"-":"",_:" ",0:"0"},er=/^\s*\d+/,BG=/^%/,UG=/[\\^$*+?|[\]().{}]/g;function Ke(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 qG(e){return e.replace(UG,"\\$&")}function xc(e){return new RegExp("^(?:"+e.map(qG).join("|")+")","i")}function bc(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function FG(e,t,r){var n=er.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function HG(e,t,r){var n=er.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function KG(e,t,r){var n=er.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function GG(e,t,r){var n=er.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function YG(e,t,r){var n=er.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function iT(e,t,r){var n=er.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function sT(e,t,r){var n=er.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function VG(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 QG(e,t,r){var n=er.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function XG(e,t,r){var n=er.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function lT(e,t,r){var n=er.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function WG(e,t,r){var n=er.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function oT(e,t,r){var n=er.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function ZG(e,t,r){var n=er.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function JG(e,t,r){var n=er.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function eY(e,t,r){var n=er.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function tY(e,t,r){var n=er.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function rY(e,t,r){var n=BG.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function nY(e,t,r){var n=er.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function aY(e,t,r){var n=er.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function uT(e,t){return Ke(e.getDate(),t,2)}function iY(e,t){return Ke(e.getHours(),t,2)}function sY(e,t){return Ke(e.getHours()%12||12,t,2)}function lY(e,t){return Ke(1+wd.count(Xa(e),e),t,3)}function h4(e,t){return Ke(e.getMilliseconds(),t,3)}function oY(e,t){return h4(e,t)+"000"}function uY(e,t){return Ke(e.getMonth()+1,t,2)}function cY(e,t){return Ke(e.getMinutes(),t,2)}function dY(e,t){return Ke(e.getSeconds(),t,2)}function fY(e){var t=e.getDay();return t===0?7:t}function hY(e,t){return Ke(Sp.count(Xa(e)-1,e),t,2)}function m4(e){var t=e.getDay();return t>=4||t===0?Xo(e):Xo.ceil(e)}function mY(e,t){return e=m4(e),Ke(Xo.count(Xa(e),e)+(Xa(e).getDay()===4),t,2)}function pY(e){return e.getDay()}function yY(e,t){return Ke(xm.count(Xa(e)-1,e),t,2)}function gY(e,t){return Ke(e.getFullYear()%100,t,2)}function vY(e,t){return e=m4(e),Ke(e.getFullYear()%100,t,2)}function xY(e,t){return Ke(e.getFullYear()%1e4,t,4)}function bY(e,t){var r=e.getDay();return e=r>=4||r===0?Xo(e):Xo.ceil(e),Ke(e.getFullYear()%1e4,t,4)}function jY(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ke(t/60|0,"0",2)+Ke(t%60,"0",2)}function cT(e,t){return Ke(e.getUTCDate(),t,2)}function wY(e,t){return Ke(e.getUTCHours(),t,2)}function SY(e,t){return Ke(e.getUTCHours()%12||12,t,2)}function NY(e,t){return Ke(1+wp.count(Wa(e),e),t,3)}function p4(e,t){return Ke(e.getUTCMilliseconds(),t,3)}function OY(e,t){return p4(e,t)+"000"}function _Y(e,t){return Ke(e.getUTCMonth()+1,t,2)}function EY(e,t){return Ke(e.getUTCMinutes(),t,2)}function AY(e,t){return Ke(e.getUTCSeconds(),t,2)}function CY(e){var t=e.getUTCDay();return t===0?7:t}function TY(e,t){return Ke(Np.count(Wa(e)-1,e),t,2)}function y4(e){var t=e.getUTCDay();return t>=4||t===0?Wo(e):Wo.ceil(e)}function PY(e,t){return e=y4(e),Ke(Wo.count(Wa(e),e)+(Wa(e).getUTCDay()===4),t,2)}function MY(e){return e.getUTCDay()}function RY(e,t){return Ke(bm.count(Wa(e)-1,e),t,2)}function DY(e,t){return Ke(e.getUTCFullYear()%100,t,2)}function kY(e,t){return e=y4(e),Ke(e.getUTCFullYear()%100,t,2)}function IY(e,t){return Ke(e.getUTCFullYear()%1e4,t,4)}function LY(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Wo(e):Wo.ceil(e),Ke(e.getUTCFullYear()%1e4,t,4)}function $Y(){return"+0000"}function dT(){return"%"}function fT(e){return+e}function hT(e){return Math.floor(+e/1e3)}var fo,g4,v4;zY({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 zY(e){return fo=zG(e),g4=fo.format,fo.parse,v4=fo.utcFormat,fo.utcParse,fo}function BY(e){return new Date(e)}function UY(e){return e instanceof Date?+e:+new Date(+e)}function sw(e,t,r,n,i,l,o,c,f,h){var p=Gj(),y=p.invert,g=p.domain,x=h(".%L"),b=h(":%S"),w=h("%I:%M"),N=h("%I %p"),O=h("%a %d"),A=h("%b %d"),T=h("%B"),E=h("%Y");function C(M){return(f(M)<M?x:c(M)<M?b:o(M)<M?w:l(M)<M?N:n(M)<M?i(M)<M?O:A:r(M)<M?T:E)(M)}return p.invert=function(M){return new Date(y(M))},p.domain=function(M){return arguments.length?g(Array.from(M,UY)):g().map(BY)},p.ticks=function(M){var R=g();return e(R[0],R[R.length-1],M??10)},p.tickFormat=function(M,R){return R==null?C:h(R)},p.nice=function(M){var R=g();return(!M||typeof M.range!="function")&&(M=t(R[0],R[R.length-1],M??10)),M?g(a4(R,M)):p},p.copy=function(){return jd(p,sw(e,t,r,n,i,l,o,c,f,h))},p}function qY(){return An.apply(sw(LG,$G,Xa,aw,Sp,wd,rw,ew,$s,g4).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function FY(){return An.apply(sw(kG,IG,Wa,iw,Np,wp,nw,tw,$s,v4).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Op(){var e=0,t=1,r,n,i,l,o=Or,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(g){var x,b;return arguments.length?([x,b]=g,o=y(x,b),h):[o(0),o(1)]}}return h.range=p(ou),h.rangeRound=p(Kj),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 ss(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function x4(){var e=is(Op()(Or));return e.copy=function(){return ss(e,x4())},ti.apply(e,arguments)}function b4(){var e=Qj(Op()).domain([1,10]);return e.copy=function(){return ss(e,b4()).base(e.base())},ti.apply(e,arguments)}function j4(){var e=Xj(Op());return e.copy=function(){return ss(e,j4()).constant(e.constant())},ti.apply(e,arguments)}function lw(){var e=Wj(Op());return e.copy=function(){return ss(e,lw()).exponent(e.exponent())},ti.apply(e,arguments)}function HY(){return lw.apply(null,arguments).exponent(.5)}function w4(){var e=[],t=Or;function r(n){if(n!=null&&!isNaN(n=+n))return t((xd(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(Ji),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)=>CK(e,l/n))},r.copy=function(){return w4(t).domain(e)},ti.apply(r,arguments)}function _p(){var e=0,t=.5,r=1,n=1,i,l,o,c,f,h=Or,p,y=!1,g;function x(w){return isNaN(w=+w)?g:(w=.5+((w=+p(w))-l)*(n*w<n*l?c:f),h(y?Math.max(0,Math.min(1,w)):w))}x.domain=function(w){return arguments.length?([e,t,r]=w,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(w){return arguments.length?(y=!!w,x):y},x.interpolator=function(w){return arguments.length?(h=w,x):h};function b(w){return function(N){var O,A,T;return arguments.length?([O,A,T]=N,h=rG(w,[O,A,T]),x):[h(0),h(.5),h(1)]}}return x.range=b(ou),x.rangeRound=b(Kj),x.unknown=function(w){return arguments.length?(g=w,x):g},function(w){return p=w,i=w(e),l=w(t),o=w(r),c=i===l?0:.5/(l-i),f=l===o?0:.5/(o-l),n=l<i?-1:1,x}}function S4(){var e=is(_p()(Or));return e.copy=function(){return ss(e,S4())},ti.apply(e,arguments)}function N4(){var e=Qj(_p()).domain([.1,1,10]);return e.copy=function(){return ss(e,N4()).base(e.base())},ti.apply(e,arguments)}function O4(){var e=Xj(_p());return e.copy=function(){return ss(e,O4()).constant(e.constant())},ti.apply(e,arguments)}function ow(){var e=Wj(_p());return e.copy=function(){return ss(e,ow()).exponent(e.exponent())},ti.apply(e,arguments)}function KY(){return ow.apply(null,arguments).exponent(.5)}const _4=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:qj,scaleDiverging:S4,scaleDivergingLog:N4,scaleDivergingPow:ow,scaleDivergingSqrt:KY,scaleDivergingSymlog:O4,scaleIdentity:n4,scaleImplicit:ub,scaleLinear:r4,scaleLog:i4,scaleOrdinal:Uj,scalePoint:MK,scalePow:Zj,scaleQuantile:o4,scaleQuantize:u4,scaleRadial:l4,scaleSequential:x4,scaleSequentialLog:b4,scaleSequentialPow:lw,scaleSequentialQuantile:w4,scaleSequentialSqrt:HY,scaleSequentialSymlog:j4,scaleSqrt:OG,scaleSymlog:s4,scaleThreshold:c4,scaleTime:qY,scaleUtc:FY,tickFormat:t4},Symbol.toStringTag,{value:"Module"}));function GY(e){var t=_4;if(e in t&&typeof t[e]=="function")return t[e]();var r="scale".concat(dd(e));if(r in t&&typeof t[r]=="function")return t[r]()}function mT(e,t,r){if(typeof e=="function")return e.copy().domain(t).range(r);if(e!=null){var n=GY(e);if(n!=null)return n.domain(t).range(r),n}}function uw(e,t,r,n){if(!(r==null||n==null))return typeof e.scale=="function"?mT(e.scale,r,n):mT(t,r,n)}function YY(e){return"scale".concat(dd(e))}function VY(e){return YY(e)in _4}var E4=(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 VY(n)?n:"point"}};function QY(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 A4(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=QY(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 XY(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):A4(e,void 0)}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 jm(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){WY(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 WY(e,t,r){return(t=ZY(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ZY(e){var t=JY(e,"string");return typeof t=="symbol"?t:t+""}function JY(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"],$t={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0,niceTicks:"auto"},C4=(e,t)=>e.cartesianAxis.xAxis[t],ri=(e,t)=>{var r=C4(e,t);return r??$t},zt={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:md},T4=(e,t)=>e.cartesianAxis.yAxis[t],ni=(e,t)=>{var r=T4(e,t);return r??zt},eV={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:""},cw=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??eV},Tr=(e,t,r)=>{switch(t){case"xAxis":return ri(e,r);case"yAxis":return ni(e,r);case"zAxis":return cw(e,r);case"angleAxis":return kj(e,r);case"radiusAxis":return Ij(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},tV=(e,t,r)=>{switch(t){case"xAxis":return ri(e,r);case"yAxis":return ni(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},Sd=(e,t,r)=>{switch(t){case"xAxis":return ri(e,r);case"yAxis":return ni(e,r);case"angleAxis":return kj(e,r);case"radiusAxis":return Ij(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},P4=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function M4(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 Ep=e=>e.graphicalItems.cartesianItems,rV=V([Zt,gp],M4),R4=(e,t,r)=>e.filter(r).filter(n=>(t==null?void 0:t.includeHidden)===!0?!0:!n.hide),uu=V([Ep,Tr,rV],R4,{memoizeOptions:{resultEqualityCheck:bp}}),D4=V([uu],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(vp)),k4=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),nV=V([uu],k4),I4=e=>e.map(t=>t.data).filter(Boolean).flat(1),aV=V([uu],e=>e.some(t=>!t.data)),L4=V([uu],I4,{memoizeOptions:{resultEqualityCheck:bp}}),$4=(e,t)=>{var{chartData:r=[],dataStartIndex:n,dataEndIndex:i}=t;return e.length>0?e:r.slice(n,i+1)},dw=V([L4,vd],$4),iV=(e,t,r)=>(t==null?void 0:t.dataKey)!=null?e.map(n=>({value:Pt(n,t.dataKey)})):r.length>0?r.map(n=>n.dataKey).flatMap(n=>e.map(i=>({value:Pt(i,n)}))):e.map(n=>({value:n})),z4=(e,t,r,n,i,l)=>{var{chartData:o=[],dataStartIndex:c,dataEndIndex:f}=n,h=iV(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(g=>({value:Pt(g,t.dataKey)})).filter(g=>g.value!=null);return[...y,...h]}return h},Nd=V([dw,Tr,uu,vd,aV,L4],z4);function Eo(e){if(ua(e)||e instanceof Date){var t=Number(e);if(Ue(t))return t}}function yT(e){if(Array.isArray(e)){var t=[Eo(e[0]),Eo(e[1])];return sa(t)?t:void 0}var r=Eo(e);if(r!=null)return[r,r]}function fa(e){return e.map(Eo).filter(Fr)}function sV(e,t){var r=Eo(e),n=Eo(t);return r==null&&n==null?0:r==null?-1:n==null?1:r-n}var lV=V([Nd],e=>e==null?void 0:e.map(t=>t.value).sort(sV));function B4(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function oV(e,t,r){if(!r)return[];if(!r.length)return[];var n;if(typeof t=="number"&&!oa(t))n=t;else if(Array.isArray(t)){var i=fa(t);i.length>0&&(n=Math.max(...i))}return n==null?[]:fa(r.flatMap(l=>{var o=Pt(e,l.dataKey),c,f;if(Array.isArray(o)?[c,f]=o:c=f=o,!(!Ue(c)||!Ue(f)))return[n-c,n+f]}))}var Ft=e=>{var t=Jt(e),r=lu(e);return Sd(e,t,r)},Zo=V([Ft],e=>e==null?void 0:e.dataKey),uV=V([D4,vd,Ft],G3),U4=(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($j);return[c,{stackedData:Gq(e,p,r),graphicalItems:h}]}))},mb=V([uV,D4,hp,z3],U4),q4=(e,t,r,n)=>{var{dataStartIndex:i,dataEndIndex:l}=t;if(n==null&&r!=="zAxis"){var o=Wq(e,i,l);if(!(o!=null&&o[0]===0&&o[1]===0))return o}},cV=V([Tr],e=>e.allowDataOverflow),fw=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=fa(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},F4=V([Tr],fw),H4=V([F4,cV],_3),dV=V([mb,Hn,Zt,H4],q4,{memoizeOptions:{resultEqualityCheck:xp}}),hw=e=>e.errorBars,fV=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>B4(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]}},K4=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,g=(p=i[h.id])===null||p===void 0?void 0:p.filter(x=>B4(l,x));y.forEach(x=>{var b,w=Pt(x,(b=r.dataKey)!==null&&b!==void 0?b:h.dataKey),N=oV(x,w,g);if(N.length>=2){var O=Math.min(...N),A=Math.max(...N);(c==null||O<c)&&(c=O),(f==null||A>f)&&(f=A)}var T=yT(w);T!=null&&(c=c==null?T[0]:Math.min(c,T[0]),f=f==null?T[1]:Math.max(f,T[1]))})}),(r==null?void 0:r.dataKey)!=null&&n.length===0&&t.forEach(h=>{var p=yT(Pt(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]))}),Ue(c)&&Ue(f))return[c,f]},hV=V([dw,Tr,nV,hw,Zt,tK],K4,{memoizeOptions:{resultEqualityCheck:xp}});function mV(e){var{value:t}=e;if(ua(t)||t instanceof Date)return t}var pV=(e,t,r)=>{var n=e.map(mV).filter(i=>i!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&tR(n))?O3(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},G4=e=>e.referenceElements.dots,cu=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),yV=V([G4,Zt,gp],cu),Y4=e=>e.referenceElements.areas,gV=V([Y4,Zt,gp],cu),V4=e=>e.referenceElements.lines,vV=V([V4,Zt,gp],cu),Q4=(e,t)=>{if(e!=null){var r=fa(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},xV=V(yV,Zt,Q4),X4=(e,t)=>{if(e!=null){var r=fa(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)]}},bV=V([gV,Zt],X4);function jV(e){var t;if(e.x!=null)return fa([e.x]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.x);return r==null||r.length===0?[]:fa(r)}function wV(e){var t;if(e.y!=null)return fa([e.y]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.y);return r==null||r.length===0?[]:fa(r)}var W4=(e,t)=>{if(e!=null){var r=e.flatMap(n=>t==="xAxis"?jV(n):wV(n));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},SV=V([vV,Zt],W4),NV=V(xV,SV,bV,(e,t,r)=>wm(e,r,t)),Z4=(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 nK(t,h,e.allowDataOverflow)},OV=V([Tr,F4,H4,dV,hV,NV,Ze,Zt],Z4,{memoizeOptions:{resultEqualityCheck:xp}}),_V=[0,1],J4=(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 O3(0,(p=r==null?void 0:r.length)!==null&&p!==void 0?p:0)}return f==="category"?pV(n,e,h):i==="expand"&&!h?_V:o}},mw=V([Tr,Ze,dw,Nd,hp,Zt,OV],J4),du=V([Tr,P4,Mj],E4),eD=(e,t,r)=>{var{niceTicks:n}=t;if(n!=="none"){var i=fw(t),l=Array.isArray(i)&&(i[0]==="auto"||i[1]==="auto");if((n==="snap125"||n==="adaptive")&&t!=null&&t.tickCount&&sa(e)){if(l)return _C(e,t.tickCount,t.allowDecimals,n);if(t.type==="number")return EC(e,t.tickCount,t.allowDecimals,n)}if(n==="auto"&&r==="linear"&&t!=null&&t.tickCount){if(l&&sa(e))return _C(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&sa(e))return EC(e,t.tickCount,t.allowDecimals,"adaptive")}}},pw=V([mw,Sd,du],eD),tD=(e,t,r,n)=>{if(n!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&sa(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},EV=V([Tr,mw,pw,Zt],tD),AV=V(Nd,Tr,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,n=Array.from(fa(e.map(y=>y.value))).sort((y,g)=>y-g),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}}),rD=V(AV,Ze,$3,Wt,(e,t,r,n,i)=>i,(e,t,r,n,i)=>{if(!Ue(e))return 0;var l=t==="vertical"?n.height:n.width;if(i==="gap")return e*l/2;if(i==="no-gap"){var o=Bn(r,e*l),c=e*l/2;return c-o-(c-o)/l*o}return 0}),CV=(e,t,r)=>{var n=ri(e,t);return n==null||typeof n.padding!="string"?0:rD(e,"xAxis",t,r,n.padding)},TV=(e,t,r)=>{var n=ni(e,t);return n==null||typeof n.padding!="string"?0:rD(e,"yAxis",t,r,n.padding)},PV=V(ri,CV,(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}}),MV=V(ni,TV,(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}}),RV=V([Wt,PV,sp,ip,(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]}),DV=V([Wt,Ze,MV,sp,ip,(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]}),Od=(e,t,r,n)=>{var i;switch(t){case"xAxis":return RV(e,r,n);case"yAxis":return DV(e,r,n);case"zAxis":return(i=cw(e,r))===null||i===void 0?void 0:i.range;case"angleAxis":return F3(e);case"radiusAxis":return H3(e,r);default:return}},nD=V([Tr,Od],mp),kV=V([du,EV],gK),yw=V([Tr,du,kV,nD],uw),aD=(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)}},gw=V([Ze,Nd,Sd,Zt],aD),Ap=V([yw],zj);V([yw],XY);V([yw,lV],A4);V([uu,hw,Zt],fV);function iD(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var Cp=(e,t)=>t,Tp=(e,t,r)=>r,IV=V(np,Cp,Tp,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(iD)),LV=V(ap,Cp,Tp,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(iD)),sD=(e,t)=>({width:e.width,height:t.height}),$V=(e,t)=>{var r=typeof t.width=="number"?t.width:md;return{width:r,height:e.height}},lD=V(Wt,ri,sD),zV=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},BV=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},UV=V(ei,Wt,IV,Cp,Tp,(e,t,r,n,i)=>{var l={},o;return r.forEach(c=>{var f=sD(t,c);o==null&&(o=zV(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}),qV=V(Ja,Wt,LV,Cp,Tp,(e,t,r,n,i)=>{var l={},o;return r.forEach(c=>{var f=$V(t,c);o==null&&(o=BV(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}),FV=(e,t)=>{var r=ri(e,t);if(r!=null)return UV(e,r.orientation,r.mirror)},HV=V([Wt,ri,FV,(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}}}),KV=(e,t)=>{var r=ni(e,t);if(r!=null)return qV(e,r.orientation,r.mirror)},GV=V([Wt,ni,KV,(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}}}),oD=V(Wt,ni,(e,t)=>{var r=typeof t.width=="number"?t.width:md;return{width:r,height:e.height}}),gT=(e,t,r)=>{switch(t){case"xAxis":return lD(e,r).width;case"yAxis":return oD(e,r).height;default:return}},uD=(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&&tR(h))return f}},vw=V([Ze,Nd,Tr,Zt],uD),vT=V([Ze,tV,du,Ap,vw,gw,Od,pw,Zt],(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}}}),YV=(e,t,r,n,i,l,o,c,f)=>{if(!(t==null||n==null)){var h=Za(e,f),{type:p,ticks:y,tickCount:g}=t,x=r==="scaleBand"&&typeof n.bandwidth=="function"?n.bandwidth()/2:2,b=p==="category"&&n.bandwidth?n.bandwidth()/x:0;b=f==="angleAxis"&&l!=null&&l.length>=2?qr(l[0]-l[1])*2*b:b;var w=y||i;return w?w.map((N,O)=>{var A=o?o.indexOf(N):N,T=n.map(A);return Ue(T)?{index:O,coordinate:T+b,value:N,offset:b}:null}).filter(Fr):h&&c?c.map((N,O)=>{var A=n.map(N);return Ue(A)?{coordinate:A+b,value:N,index:O,offset:b}:null}).filter(Fr):n.ticks?n.ticks(g).map((N,O)=>{var A=n.map(N);return Ue(A)?{coordinate:A+b,value:N,index:O,offset:b}:null}).filter(Fr):n.domain().map((N,O)=>{var A=n.map(N);return Ue(A)?{coordinate:A+b,value:o?o[N]:N,index:O,offset:b}:null}).filter(Fr)}},cD=V([Ze,Sd,du,Ap,pw,Od,vw,gw,Zt],YV),VV=(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?qr(n[0]-n[1])*2*h:h,c&&l?l.map((p,y)=>{var g=r.map(p);return Ue(g)?{coordinate:g+h,value:p,index:y,offset:h}:null}).filter(Fr):r.ticks?r.ticks(f).map((p,y)=>{var g=r.map(p);return Ue(g)?{coordinate:g+h,value:p,index:y,offset:h}:null}).filter(Fr):r.domain().map((p,y)=>{var g=r.map(p);return Ue(g)?{coordinate:g+h,value:i?i[p]:p,index:y,offset:h}:null}).filter(Fr)}},ts=V([Ze,Sd,Ap,Od,vw,gw,Zt],VV),rs=V(Tr,Ap,(e,t)=>{if(!(e==null||t==null))return jm(jm({},e),{},{scale:t})}),QV=V([Tr,du,mw,nD],uw),XV=V([QV],zj);V((e,t,r)=>cw(e,r),XV,(e,t)=>{if(!(e==null||t==null))return jm(jm({},e),{},{scale:t})});var WV=V([Ze,np,ap],(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}}),ZV=(e,t,r)=>{var n;return(n=e.renderedTicks[t])===null||n===void 0?void 0:n[r]};V([ZV],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 dD=e=>e.options.defaultTooltipEventType,fD=e=>e.options.validateTooltipEventTypes;function hD(e,t,r){if(e==null)return t;var n=e?"axis":"item";return r==null?t:r.includes(n)?n:t}function _d(e,t){var r=dD(e),n=fD(e);return hD(t,r,n)}function JV(e){return be(t=>_d(t,e))}var mD=(e,t)=>{var r,n=Number(t);if(!(oa(n)||t==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},eQ=e=>e.tooltip.settings,Li={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},tQ={itemInteraction:{click:Li,hover:Li},axisInteraction:{click:Li,hover:Li},keyboardInteraction:Li,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},pD=xr({name:"tooltip",initialState:tQ,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:ut()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:r,next:n}=t.payload,i=On(e).tooltipItemPayloads.indexOf(r);i>-1&&(e.tooltipItemPayloads[i]=n)},prepare:ut()},removeTooltipEntrySettings:{reducer(e,t){var r=On(e).tooltipItemPayloads.indexOf(t.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},prepare:ut()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate}}}),{addTooltipEntrySettings:rQ,replaceTooltipEntrySettings:nQ,removeTooltipEntrySettings:aQ,setTooltipSettingsState:iQ,setActiveMouseOverItemIndex:yD,mouseLeaveItem:sQ,mouseLeaveChart:gD,setActiveClickItemIndex:lQ,setMouseOverAxisIndex:vD,setMouseClickAxisIndex:oQ,setSyncInteraction:Ec,setKeyboardInteraction:Sm}=pD.actions,uQ=pD.reducer;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 fh(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){cQ(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 cQ(e,t,r){return(t=dQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dQ(e){var t=fQ(e,"string");return typeof t=="symbol"?t:t+""}function fQ(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 hQ(e,t,r){return t==="axis"?r==="click"?e.axisInteraction.click:e.axisInteraction.hover:r==="click"?e.itemInteraction.click:e.itemInteraction.hover}function mQ(e){return e.index!=null}var xD=(e,t,r,n)=>{if(t==null)return Li;var i=hQ(e,t,r);if(i==null)return Li;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(mQ(i)){if(l)return fh(fh({},i),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n,graphicalItemId:void 0};return fh(fh({},Li),{},{coordinate:i.coordinate})};function pQ(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 yQ(e,t){var r=pQ(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 gQ(e,t,r){if(r==null||t==null)return!0;var n=Pt(e,t);return n==null||!sa(r)?!0:yQ(n,r)}var Cc=(e,t,r,n)=>{var i=e==null?void 0:e.index;if(i==null)return null;var l=Number(i);if(!Ue(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||gQ(h,r,n)?String(f):null},bD=(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}}}},jD=(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})},wD=e=>e.options.tooltipPayloadSearcher,fu=e=>e.tooltip;function bT(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 jT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bT(Object(r),!0).forEach(function(n){vQ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vQ(e,t,r){return(t=xQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xQ(e){var t=bQ(e,"string");return typeof t=="symbol"?t:t+""}function bQ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function jQ(e){if(typeof e=="string"||typeof e=="number")return e}function wQ(e){if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e}function SQ(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e=="function")return t=>e(t)}function wT(e){if(typeof e=="string")return e}function NQ(e){if(!(e==null||typeof e!="object")){var t="name"in e?jQ(e.name):void 0,r="unit"in e?wQ(e.unit):void 0,n="dataKey"in e?SQ(e.dataKey):void 0,i="payload"in e?e.payload:void 0,l="color"in e?wT(e.color):void 0,o="fill"in e?wT(e.fill):void 0;return{name:t,unit:r,dataKey:n,payload:i,color:l,fill:o}}}function OQ(e,t){return e??t}var SD=(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((g,x)=>{var b,{dataDefinedOnItem:w,settings:N}=x,O=OQ(w,c),A=Array.isArray(O)?XR(O,h,p):O,T=(b=N==null?void 0:N.dataKey)!==null&&b!==void 0?b:n,E=N==null?void 0:N.nameKey,C;if(n&&Array.isArray(A)&&!Array.isArray(A[0])&&o==="axis"?C=rR(A,n,i):C=l(A,t,f,E),Array.isArray(C))C.forEach(R=>{var D,L,k=NQ(R),F=k==null?void 0:k.name,q=k==null?void 0:k.dataKey,ie=k==null?void 0:k.payload,ee=jT(jT({},N),{},{name:F,unit:k==null?void 0:k.unit,color:(D=k==null?void 0:k.color)!==null&&D!==void 0?D:N==null?void 0:N.color,fill:(L=k==null?void 0:k.fill)!==null&&L!==void 0?L:N==null?void 0:N.fill});g.push(mA({tooltipEntrySettings:ee,dataKey:q,payload:ie,value:Pt(ie,q),name:F==null?void 0:String(F)}))});else{var M;g.push(mA({tooltipEntrySettings:N,dataKey:T,payload:C,value:Pt(C,T),name:(M=Pt(C,E))!==null&&M!==void 0?M:N==null?void 0:N.name}))}return g},y)}},xw=V([Ft,P4,Mj],E4),_Q=V([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),EQ=V([Jt,lu],M4),xl=V([_Q,Ft,EQ],R4,{memoizeOptions:{resultEqualityCheck:bp}}),AQ=V([xl],e=>e.filter(vp)),ND=V([xl],I4,{memoizeOptions:{resultEqualityCheck:bp}}),CQ=V([xl],e=>e.some(t=>!t.data)),cl=V([ND,Hn],$4),TQ=V([AQ,Hn,Ft],G3),bw=V([cl,Ft,xl,Hn,CQ,ND],z4),OD=V([Ft],fw),PQ=V([Ft],e=>e.allowDataOverflow),_D=V([OD,PQ],_3),MQ=V([xl],e=>e.filter(vp)),RQ=V([TQ,MQ,hp,z3],U4),DQ=V([RQ,Hn,Jt,_D],q4),kQ=V([xl],k4),IQ=V([cl,Ft,kQ,hw,Jt,rK],K4,{memoizeOptions:{resultEqualityCheck:xp}}),LQ=V([G4,Jt,lu],cu),$Q=V([LQ,Jt],Q4),zQ=V([Y4,Jt,lu],cu),BQ=V([zQ,Jt],X4),UQ=V([V4,Jt,lu],cu),qQ=V([UQ,Jt],W4),FQ=V([$Q,qQ,BQ],wm),HQ=V([Ft,OD,_D,DQ,IQ,FQ,Ze,Jt],Z4),Jo=V([Ft,Ze,cl,bw,hp,Jt,HQ],J4),KQ=V([Jo,Ft,xw],eD),GQ=V([Ft,Jo,KQ,Jt],tD),ED=e=>{var t=Jt(e),r=lu(e),n=!1;return Od(e,t,r,n)},AD=V([Ft,ED],mp),YQ=V([Ft,xw,GQ,AD],uw),CD=V([YQ],zj),VQ=V([Ze,bw,Ft,Jt],uD),QQ=V([Ze,bw,Ft,Jt],aD),XQ=(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?qr(i[0]-i[1])*2*y:y,h&&o?o.map((g,x)=>{var b=n.map(g);return Ue(b)?{coordinate:b+y,value:g,index:x,offset:y}:null}).filter(Fr):n.domain().map((g,x)=>{var b=n.map(g);return Ue(b)?{coordinate:b+y,value:l?l[g]:g,index:x,offset:y}:null}).filter(Fr)}}},ai=V([Ze,Ft,xw,CD,ED,VQ,QQ,Jt],XQ),jw=V([dD,fD,eQ],(e,t,r)=>hD(r.shared,e,t)),TD=e=>e.tooltip.settings.trigger,ww=e=>e.tooltip.settings.defaultIndex,Ed=V([fu,jw,TD,ww],xD),dl=V([Ed,cl,Zo,Jo],Cc),PD=V([ai,dl],mD),MD=V([Ed],e=>{if(e)return e.dataKey}),WQ=V([Ed],e=>{if(e)return e.graphicalItemId}),RD=V([fu,jw,TD,ww],jD),ZQ=V([Ja,ei,Ze,Wt,ai,ww,RD],bD),JQ=V([Ed,ZQ],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),eX=V([Ed],e=>{var t;return(t=e==null?void 0:e.active)!==null&&t!==void 0?t:!1}),tX=V([RD,dl,Hn,Zo,PD,wD,jw],SD),rX=V([tX],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});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 NT(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){nX(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 nX(e,t,r){return(t=aX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function aX(e){var t=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)}var sX=()=>be(Ft),lX=()=>{var e=sX(),t=be(ai),r=be(CD);return Go(!e||!r?void 0:NT(NT({},e),{},{scale:r}),t)};function OT(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 ho(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?OT(Object(r),!0).forEach(function(n){oX(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):OT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function oX(e,t,r){return(t=uX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uX(e){var t=cX(e,"string");return typeof t=="symbol"?t:t+""}function cX(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var dX=(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}},fX=(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 ho(ho(ho({},n),ur(n.cx,n.cy,o,l)),{},{angle:l,radius:o})}var c=i.coordinate,{angle:f}=n;return ho(ho(ho({},n),ur(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 hX(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 DD=(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,g,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,b=(p=r[c])===null||p===void 0?void 0:p.coordinate,w=c>=o-1?(y=r[0])===null||y===void 0?void 0:y.coordinate:(g=r[c+1])===null||g===void 0?void 0:g.coordinate,N=void 0;if(!(x==null||b==null||w==null))if(qr(b-x)!==qr(w-b)){var O=[];if(qr(w-b)===qr(i[1]-i[0])){N=w;var A=b+i[1]-i[0];O[0]=Math.min(A,(A+x)/2),O[1]=Math.max(A,(A+x)/2)}else{N=x;var T=w+i[1]-i[0];O[0]=Math.min(b,(T+b)/2),O[1]=Math.max(b,(T+b)/2)}var E=[Math.min(b,(N+b)/2),Math.max(b,(N+b)/2)];if(e>E[0]&&e<=E[1]||e>=O[0]&&e<=O[1]){var C;return(C=r[c])===null||C===void 0?void 0:C.index}}else{var M=Math.min(x,w),R=Math.max(x,w);if(e>(M+b)/2&&e<=(R+b)/2){var D;return(D=r[c])===null||D===void 0?void 0:D.index}}}else if(t)for(var L=0;L<o;L++){var k=t[L];if(k!=null){var F=t[L+1],q=t[L-1];if(L===0&&F!=null&&e<=(k.coordinate+F.coordinate)/2||L===o-1&&q!=null&&e>(k.coordinate+q.coordinate)/2||L>0&&L<o-1&&q!=null&&F!=null&&e>(k.coordinate+q.coordinate)/2&&e<=(k.coordinate+F.coordinate)/2)return k.index}}return-1},mX=()=>be(Mj),Sw=(e,t)=>t,kD=(e,t,r)=>r,Nw=(e,t,r,n)=>n,pX=V(ai,e=>Gm(e,t=>t.coordinate)),Ow=V([fu,Sw,kD,Nw],xD),_w=V([Ow,cl,Zo,Jo],Cc),yX=(e,t,r)=>{if(t!=null){var n=fu(e);return t==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},ID=V([fu,Sw,kD,Nw],jD),Nm=V([Ja,ei,Ze,Wt,ai,Nw,ID],bD),gX=V([Ow,Nm],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),LD=V([ai,_w],mD),vX=V([ID,_w,Hn,Zo,LD,wD,Sw],SD),xX=V([Ow,_w],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),bX=(e,t,r,n,i,l,o)=>{if(!(!e||!r||!n||!i)&&hX(e,o)){var c=Zq(e,t),f=DD(c,l,i,r,n),h=dX(t,i,f,e);return{activeIndex:String(f),activeCoordinate:h}}},jX=(e,t,r,n,i,l,o)=>{if(!(!e||!n||!i||!l||!r)){var c=HH(e,r);if(c){var f=Jq(c,t),h=DD(f,o,l,n,i),p=fX(t,l,h,c);return{activeIndex:String(h),activeCoordinate:p}}}},wX=(e,t,r,n,i,l,o,c)=>{if(!(!e||!t||!n||!i||!l))return t==="horizontal"||t==="vertical"?bX(e,t,n,i,l,o,c):jX(e,t,r,n,i,l,o)},SX=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}}),NX=V(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(n=>parseInt(n,10)).concat(Object.values(Qt)),r=Array.from(new Set(t));return r.sort((n,i)=>n-i)},{memoizeOptions:{resultEqualityCheck:yK}});function _T(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ET(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_T(Object(r),!0).forEach(function(n){OX(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_T(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function OX(e,t,r){return(t=_X(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _X(e){var t=EX(e,"string");return typeof t=="symbol"?t:t+""}function EX(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var AX={},CX={zIndexMap:Object.values(Qt).reduce((e,t)=>ET(ET({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),AX)},TX=new Set(Object.values(Qt));function PX(e){return TX.has(e)}var $D=xr({name:"zIndex",initialState:CX,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]?e.zIndexMap[r].consumers+=1:e.zIndexMap[r]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:ut()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]&&(e.zIndexMap[r].consumers-=1,e.zIndexMap[r].consumers<=0&&!PX(r)&&delete e.zIndexMap[r])},prepare:ut()},registerZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:r,element:n,isPanorama:i}=t.payload;e.zIndexMap[r]?i?e.zIndexMap[r].panoramaElement=n:e.zIndexMap[r].element=n:e.zIndexMap[r]={consumers:0,element:i?void 0:n,panoramaElement:i?n:void 0}},prepare:ut()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]&&(t.payload.isPanorama?e.zIndexMap[r].panoramaElement=void 0:e.zIndexMap[r].element=void 0)},prepare:ut()}}}),{registerZIndexPortal:MX,unregisterZIndexPortal:B0,registerZIndexPortalElement:RX,unregisterZIndexPortalElement:DX}=$D.actions,kX=$D.reducer;function Cn(e){var{zIndex:t,children:r}=e,n=M7(),i=n&&t!==void 0&&t!==0,l=br(),o=S.useRef(void 0),c=S.useRef(new Set),f=dt(),h=be(y=>SX(y,t,l));if(S.useLayoutEffect(()=>{if(!i){var y=c.current;y.forEach(x=>{f(B0({zIndex:x}))}),y.clear(),o.current=void 0;return}if(c.current.has(t)||(f(MX({zIndex:t})),c.current.add(t)),h){o.current=h;var g=c.current;g.forEach(x=>{x!==t&&(f(B0({zIndex:x})),g.delete(x))})}},[f,t,i,h]),S.useLayoutEffect(()=>{var y=c.current;return()=>{y.forEach(g=>{f(B0({zIndex:g}))}),y.clear()}},[f]),!i)return r;var p=h??o.current;return p?$m.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 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 hh(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){IX(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 IX(e,t,r){return(t=LX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function LX(e){var t=$X(e,"string");return typeof t=="symbol"?t:t+""}function $X(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 zX(e){var{cursor:t,cursorComp:r,cursorProps:n}=e;return S.isValidElement(t)?S.cloneElement(t,n):S.createElement(r,n)}function BX(e){var t,{coordinate:r,payload:n,index:i,offset:l,tooltipAxisBandSize:o,layout:c,cursor:f,tooltipEventType:h,chartName:p}=e,y=r,g=n,x=i;if(!f||!y||p!=="ScatterChart"&&h!=="axis")return null;var b,w,N;if(p==="ScatterChart")b=y,w=aH,N=Qt.cursorLine;else if(p==="BarChart")b=iH(c,y,l,o),w=j3,N=Qt.cursorRectangle;else if(c==="radial"&&aR(y)){var{cx:O,cy:A,radius:T,startAngle:E,endAngle:C}=w3(y);b={cx:O,cy:A,startAngle:E,endAngle:C,innerRadius:T,outerRadius:T},w=N3,N=Qt.cursorLine}else b={points:VH(c,y,l)},w=y3,N=Qt.cursorLine;var M=typeof f=="object"&&"className"in f?f.className:void 0,R=hh(hh(hh(hh({stroke:"#ccc",pointerEvents:"none"},l),b),cd(f)),{},{payload:g,payloadIndex:x,className:We("recharts-tooltip-cursor",M)});return S.createElement(Cn,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:N},S.createElement(zX,{cursor:f,cursorComp:w,cursorProps:R}))}function UX(e){var t=lX(),r=n3(),n=yl(),i=mX();return t==null||r==null||n==null||i==null?null:S.createElement(BX,pb({},e,{offset:r,layout:n,tooltipAxisBandSize:t,chartName:i}))}var zD=S.createContext(null),qX=()=>S.useContext(zD),U0={exports:{}},CT;function FX(){return CT||(CT=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,g){if(typeof p!="function")throw new TypeError("The listener must be a function");var x=new i(p,y||f,g),b=r?r+h:h;return f._events[b]?f._events[b].fn?f._events[b]=[f._events[b],x]:f._events[b].push(x):(f._events[b]=x,f._eventsCount++),f}function 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 g=0,x=y.length,b=new Array(x);g<x;g++)b[g]=y[g].fn;return b},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,g,x,b){var w=r?r+h:h;if(!this._events[w])return!1;var N=this._events[w],O=arguments.length,A,T;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,g),!0;case 5:return N.fn.call(N.context,p,y,g,x),!0;case 6:return N.fn.call(N.context,p,y,g,x,b),!0}for(T=1,A=new Array(O-1);T<O;T++)A[T-1]=arguments[T];N.fn.apply(N.context,A)}else{var E=N.length,C;for(T=0;T<E;T++)switch(N[T].once&&this.removeListener(h,N[T].fn,void 0,!0),O){case 1:N[T].fn.call(N[T].context);break;case 2:N[T].fn.call(N[T].context,p);break;case 3:N[T].fn.call(N[T].context,p,y);break;case 4:N[T].fn.call(N[T].context,p,y,g);break;default:if(!A)for(C=1,A=new Array(O-1);C<O;C++)A[C-1]=arguments[C];N[T].fn.apply(N[T].context,A)}}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,g){var x=r?r+h:h;if(!this._events[x])return this;if(!p)return o(this,x),this;var b=this._events[x];if(b.fn)b.fn===p&&(!g||b.once)&&(!y||b.context===y)&&o(this,x);else{for(var w=0,N=[],O=b.length;w<O;w++)(b[w].fn!==p||g&&!b[w].once||y&&b[w].context!==y)&&N.push(b[w]);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})(U0)),U0.exports}var HX=FX();const KX=as(HX);var Jc=new KX,yb="recharts.syncEvent.tooltip",TT="recharts.syncEvent.brush",BD=(e,t)=>{if(t&&Array.isArray(e)){var r=Number.parseInt(t,10);if(!oa(r))return e[r]}},GX={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},UD=xr({name:"options",initialState:GX,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),YX=UD.reducer,{createEventEmitter:VX}=UD.actions;function QX(e){return e.tooltip.syncInteraction}var XX={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},qD=xr({name:"chartData",initialState:XX,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:PT,setDataStartEndIndexes:WX,setComputedData:Fse}=qD.actions,ZX=qD.reducer,JX=["x","y"];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 mo(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){eW(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 eW(e,t,r){return(t=tW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tW(e){var t=rW(e,"string");return typeof t=="symbol"?t:t+""}function rW(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nW(e,t){if(e==null)return{};var r,n,i=aW(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 aW(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function iW(){var e=be(Rj),t=be(Dj),r=dt(),n=be(B3),i=be(ai),l=yl(),o=lp(),c=be(f=>f.rootProps.className);S.useEffect(()=>{if(e==null)return pl;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 g;if(o&&p!==null&&p!==void 0&&(g=p.payload)!==null&&g!==void 0&&g.coordinate&&p.payload.sourceViewBox){var x=p.payload.coordinate,{x:b,y:w}=x,N=nW(x,JX),{x:O,y:A,width:T,height:E}=p.payload.sourceViewBox,C=mo(mo({},N),{},{x:o.x+(T?(b-O)/T:0)*o.width,y:o.y+(E?(w-A)/E:0)*o.height});r(mo(mo({},p),{},{payload:mo(mo({},p.payload),{},{coordinate:C})}))}else r(p);return}if(i!=null){var M;if(typeof n=="function"){var R={activeTooltipIndex:p.payload.index==null?void 0:Number(p.payload.index),isTooltipActive:p.payload.active,activeIndex:p.payload.index==null?void 0:Number(p.payload.index),activeLabel:p.payload.label,activeDataKey:p.payload.dataKey,activeCoordinate:p.payload.coordinate},D=n(i,R);M=i[D]}else n==="value"&&(M=i.find(z=>String(z.value)===p.payload.label));var{coordinate:L}=p.payload;if(L==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:k,y:F}=L,q=Math.min(k,o.x+o.width),ie=Math.min(F,o.y+o.height),ee={x:l==="horizontal"?M.coordinate:q,y:l==="horizontal"?ie:M.coordinate},ne=Ec({active:p.payload.active,coordinate:ee,dataKey:p.payload.dataKey,index:String(M.index),label:p.payload.label,sourceViewBox:p.payload.sourceViewBox,graphicalItemId:p.payload.graphicalItemId});r(ne)}}};return Jc.on(yb,f),()=>{Jc.off(yb,f)}},[c,r,t,e,n,i,l,o])}function sW(){var e=be(Rj),t=be(Dj),r=dt();S.useEffect(()=>{if(e==null)return pl;var n=(i,l,o)=>{t!==o&&e===i&&r(WX(l))};return Jc.on(TT,n),()=>{Jc.off(TT,n)}},[r,t,e])}function lW(){var e=dt();S.useEffect(()=>{e(VX())},[e]),iW(),sW()}function oW(e,t,r,n,i,l){var o=be(b=>yX(b,e,t)),c=be(WQ),f=be(Dj),h=be(Rj),p=be(B3),y=be(QX),g=(y==null?void 0:y.sourceViewBox)!=null,x=lp();S.useEffect(()=>{if(!g&&h!=null&&f!=null){var b=Ec({active:l,coordinate:r,dataKey:o,index:i,label:typeof n=="number"?String(n):n,sourceViewBox:x,graphicalItemId:c});Jc.emit(yb,h,b,f)}},[g,r,o,c,i,n,f,h,p,l,x])}function RT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function DT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?RT(Object(r),!0).forEach(function(n){uW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):RT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function uW(e,t,r){return(t=cW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cW(e){var t=dW(e,"string");return typeof t=="symbol"?t:t+""}function dW(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 fW(e){return e.dataKey}function hW(e,t){return S.isValidElement(e)?S.cloneElement(e,t):typeof e=="function"?S.createElement(e,t):S.createElement(RF,t)}var kT=[],mW={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 Ew(e){var t,r,n=dr(e,mW),{active:i,allowEscapeViewBox:l,animationDuration:o,animationEasing:c,content:f,filterNull:h,isAnimationActive:p,offset:y,payloadUniqBy:g,position:x,reverseDirection:b,useTranslate3d:w,wrapperStyle:N,cursor:O,shared:A,trigger:T,defaultIndex:E,portal:C,axisId:M}=n,R=dt(),D=typeof E=="number"?String(E):E;S.useEffect(()=>{R(iQ({shared:A,trigger:T,axisId:M,active:i,defaultIndex:D}))},[R,A,T,M,i,D]);var L=lp(),k=p3(),F=JV(A),{activeIndex:q,isActive:ie}=(t=be(Re=>xX(Re,F,T,D)))!==null&&t!==void 0?t:{},ee=be(Re=>vX(Re,F,T,D)),ne=be(Re=>LD(Re,F,T,D)),z=be(Re=>gX(Re,F,T,D)),H=ee,Z=qX(),ae=(r=i??ie)!==null&&r!==void 0?r:!1,[le,I]=bR([H,ae]),Q=F==="axis"?ne:void 0;oW(F,T,z,Q,q,ae);var oe=C??Z;if(oe==null||L==null||F==null)return null;var se=H??kT;ae||(se=kT),h&&se.length&&(se=pR(se.filter(Re=>Re.value!=null&&(Re.hide!==!0||n.includeHidden)),g,fW));var fe=se.length>0,xe=DT(DT({},n),{},{payload:se,label:Q,active:ae,activeIndex:q,coordinate:z,accessibilityLayer:k}),Se=S.createElement(HF,{allowEscapeViewBox:l,animationDuration:o,animationEasing:c,isAnimationActive:p,active:ae,coordinate:z,hasPayload:fe,offset:y,position:x,reverseDirection:b,useTranslate3d:w,viewBox:L,wrapperStyle:N,lastBoundingBox:le,innerRef:I,hasPortalFromProps:!!C},hW(f,xe));return S.createElement(S.Fragment,null,$m.createPortal(Se,oe),ae&&S.createElement(UX,{cursor:O,tooltipEventType:F,coordinate:z,payload:se,index:q}))}var Aw=e=>null;Aw.displayName="Cell";function pW(e,t,r){return(t=yW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yW(e){var t=gW(e,"string");return typeof t=="symbol"?t:t+""}function gW(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class vW{constructor(t){pW(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 IT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function xW(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?IT(Object(r),!0).forEach(function(n){bW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):IT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function 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=wW(e,"string");return typeof t=="symbol"?t:t+""}function wW(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var SW={cacheSize:2e3,enableCache:!0},FD=xW({},SW),LT=new vW(FD.cacheSize),NW={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},$T="recharts_measurement_span";function OW(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 zT=(e,t)=>{try{var r=document.getElementById($T);r||(r=document.createElement("span"),r.setAttribute("id",$T),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,NW,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(!FD.enableCache)return zT(t,r);var n=OW(t,r),i=LT.get(n);if(i)return i;var l=zT(t,r);return LT.set(n,l),l},HD;function _W(e,t,r){return(t=EW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function EW(e){var t=AW(e,"string");return typeof t=="symbol"?t:t+""}function AW(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 BT=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,UT=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,CW=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,TW=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,PW={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},MW=["cm","mm","pt","pc","in","Q","px"];function RW(e){return MW.includes(e)}var So="NaN";function DW(e,t){return e*PW[t]}class or{static parse(t){var r,[,n,i]=(r=TW.exec(t))!==null&&r!==void 0?r:[];return n==null?or.NaN:new or(parseFloat(n),i??"")}constructor(t,r){this.num=t,this.unit=r,this.num=t,this.unit=r,oa(t)&&(this.unit=""),r!==""&&!CW.test(r)&&(this.num=NaN,this.unit=""),RW(r)&&(this.num=DW(t,r),this.unit="px")}add(t){return this.unit!==t.unit?new or(NaN,""):new or(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new or(NaN,""):new or(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new or(NaN,""):new or(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new or(NaN,""):new or(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return oa(this.num)}}HD=or;_W(or,"NaN",new HD(NaN,""));function KD(e){if(e==null||e.includes(So))return So;for(var t=e;t.includes("*")||t.includes("/");){var r,[,n,i,l]=(r=BT.exec(t))!==null&&r!==void 0?r:[],o=or.parse(n??""),c=or.parse(l??""),f=i==="*"?o.multiply(c):o.divide(c);if(f.isNaN())return So;t=t.replace(BT,f.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var h,[,p,y,g]=(h=UT.exec(t))!==null&&h!==void 0?h:[],x=or.parse(p??""),b=or.parse(g??""),w=y==="+"?x.add(b):x.subtract(b);if(w.isNaN())return So;t=t.replace(UT,w.toString())}return t}var qT=/\(([^()]*)\)/;function kW(e){for(var t=e,r;(r=qT.exec(t))!=null;){var[,n]=r;t=t.replace(qT,KD(n))}return t}function IW(e){var t=e.replace(/\s+/g,"");return t=kW(t),t=KD(t),t}function LW(e){try{return IW(e)}catch{return So}}function q0(e){var t=LW(e.slice(5,-1));return t===So?"":t}var $W=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],zW=["dx","dy","angle","className","breakAll"];function gb(){return gb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},gb.apply(null,arguments)}function FT(e,t){if(e==null)return{};var r,n,i=BW(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 BW(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 GD=/[ \f\n\r\t\v\u2028\u2029]+/,YD=e=>{var{children:t,breakAll:r,style:n}=e;try{var i=[];pt(t)||(r?i=t.toString().split(""):i=t.toString().split(GD));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 VD(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function UW(e){return pt(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var QD=(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},[]),XD=e=>e.reduce((t,r)=>t.width>r.width?t:r),qW="…",HT=(e,t,r,n,i,l,o,c)=>{var f=e.slice(0,t),h=YD({breakAll:r,style:n,children:f+qW});if(!h)return[!1,[]];var p=QD(h.wordsWithComputedWidth,l,o,c),y=p.length>i||XD(p).width>Number(l);return[y,p]},FW=(e,t,r,n,i)=>{var{maxLines:l,children:o,style:c,breakAll:f}=e,h=ge(l),p=String(o),y=QD(t,n,r,i);if(!h||i)return y;var g=y.length>l||XD(y).width>Number(n);if(!g)return y;for(var x=0,b=p.length-1,w=0,N;x<=b&&w<=p.length-1;){var O=Math.floor((x+b)/2),A=O-1,[T,E]=HT(p,A,f,c,l,n,r,i),[C]=HT(p,O,f,c,l,n,r,i);if(!T&&!C&&(x=O+1),T&&C&&(b=O-1),!T&&C){N=E;break}w++}return N||y},KT=e=>{var t=pt(e)?[]:e.toString().split(GD);return[{words:t,width:void 0}]},HW=e=>{var{width:t,scaleToFit:r,children:n,style:i,breakAll:l,maxLines:o}=e;if((t||r)&&!gd.isSsr){var c,f,h=YD({breakAll:l,children:n,style:i});if(h){var{wordsWithComputedWidth:p,spaceWidth:y}=h;c=p,f=y}else return KT(n);return FW({breakAll:l,children:n,maxLines:o,style:i},c,f,t,!!r)}return KT(n)},WD="#808080",KW={angle:0,breakAll:!1,capHeight:"0.71em",fill:WD,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},Cw=S.forwardRef((e,t)=>{var r=dr(e,KW),{x:n,y:i,lineHeight:l,capHeight:o,fill:c,scaleToFit:f,textAnchor:h,verticalAnchor:p}=r,y=FT(r,$W),g=S.useMemo(()=>HW({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:b,angle:w,className:N,breakAll:O}=y,A=FT(y,zW);if(!ua(n)||!ua(i)||g.length===0)return null;var T=Number(n)+(ge(x)?x:0),E=Number(i)+(ge(b)?b:0);if(!Ue(T)||!Ue(E))return null;var C;switch(p){case"start":C=q0("calc(".concat(o,")"));break;case"middle":C=q0("calc(".concat((g.length-1)/2," * -").concat(l," + (").concat(o," / 2))"));break;default:C=q0("calc(".concat(g.length-1," * -").concat(l,")"));break}var M=[],R=g[0];if(f&&R!=null){var D=R.width,{width:L}=y;M.push("scale(".concat(ge(L)&&ge(D)?L/D:1,")"))}return w&&M.push("rotate(".concat(w,", ").concat(T,", ").concat(E,")")),M.length&&(A.transform=M.join(" ")),S.createElement("text",gb({},Er(A),{ref:t,x:T,y:E,className:We("recharts-text",N),textAnchor:h,fill:c.includes("url")?WD:c}),g.map((k,F)=>{var q=k.words.join(O?"":" ");return S.createElement("tspan",{x:T,dy:F===0?C:l,key:"".concat(q,"-").concat(F)},q)}))});Cw.displayName="Text";function GT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Zn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?GT(Object(r),!0).forEach(function(n){GW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):GT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function GW(e,t,r){return(t=YW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function YW(e){var t=VW(e,"string");return typeof t=="symbol"?t:t+""}function VW(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 QW=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,g=(p+y)/2,x=(f+h)/2,b=p+f/2,w=c>=0?1:-1,N=w*n,O=w>0?"end":"start",A=w>0?"start":"end",T=f>=0?1:-1,E=T*n,C=T>0?"end":"start",M=T>0?"start":"end",R=i;if(r==="top"){var D={x:p+f/2,y:o-N,horizontalAnchor:"middle",verticalAnchor:O};return R&&(D.height=Math.max(o-R.y,0),D.width=f),D}if(r==="bottom"){var L={x:y+h/2,y:o+c+N,horizontalAnchor:"middle",verticalAnchor:A};return R&&(L.height=Math.max(R.y+R.height-(o+c),0),L.width=h),L}if(r==="left"){var k={x:g-E,y:o+c/2,horizontalAnchor:C,verticalAnchor:"middle"};return R&&(k.width=Math.max(k.x-R.x,0),k.height=c),k}if(r==="right"){var F={x:g+x+E,y:o+c/2,horizontalAnchor:M,verticalAnchor:"middle"};return R&&(F.width=Math.max(R.x+R.width-F.x,0),F.height=c),F}var q=R?{width:x,height:c}:{};return r==="insideLeft"?Zn({x:g+E,y:o+c/2,horizontalAnchor:M,verticalAnchor:"middle"},q):r==="insideRight"?Zn({x:g+x-E,y:o+c/2,horizontalAnchor:C,verticalAnchor:"middle"},q):r==="insideTop"?Zn({x:p+f/2,y:o+N,horizontalAnchor:"middle",verticalAnchor:A},q):r==="insideBottom"?Zn({x:y+h/2,y:o+c-N,horizontalAnchor:"middle",verticalAnchor:O},q):r==="insideTopLeft"?Zn({x:p+E,y:o+N,horizontalAnchor:M,verticalAnchor:A},q):r==="insideTopRight"?Zn({x:p+f-E,y:o+N,horizontalAnchor:C,verticalAnchor:A},q):r==="insideBottomLeft"?Zn({x:y+E,y:o+c-N,horizontalAnchor:M,verticalAnchor:O},q):r==="insideBottomRight"?Zn({x:y+h-E,y:o+c-N,horizontalAnchor:C,verticalAnchor:O},q):r&&typeof r=="object"&&(ge(r.x)||il(r.x))&&(ge(r.y)||il(r.y))?Zn({x:l+Bn(r.x,x),y:o+Bn(r.y,c),horizontalAnchor:"end",verticalAnchor:"end"},q):Zn({x:b,y:o+c/2,horizontalAnchor:"middle",verticalAnchor:"middle"},q)},XW=["labelRef"],WW=["content"];function YT(e,t){if(e==null)return{};var r,n,i=ZW(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 ZW(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 VT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ac(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?VT(Object(r),!0).forEach(function(n){JW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):VT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function JW(e,t,r){return(t=eZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eZ(e){var t=tZ(e,"string");return typeof t=="symbol"?t:t+""}function tZ(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 za(){return za=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},za.apply(null,arguments)}var ZD=S.createContext(null),rZ=e=>{var{x:t,y:r,upperWidth:n,lowerWidth:i,width:l,height:o,children:c}=e,f=S.useMemo(()=>({x:t,y:r,upperWidth:n,lowerWidth:i,width:l,height:o}),[t,r,n,i,l,o]);return S.createElement(ZD.Provider,{value:f},c)},JD=()=>{var e=S.useContext(ZD),t=lp();return e||(t?Sj(t):void 0)},nZ=S.createContext(null),aZ=()=>{var e=S.useContext(nZ),t=be(K3);return e||t},iZ=e=>{var{value:t,formatter:r}=e,n=pt(e.children)?t:e.children;return typeof r=="function"?r(n):n},Tw=e=>e!=null&&typeof e=="function",sZ=(e,t)=>{var r=qr(t-e),n=Math.min(Math.abs(t-e),360);return r*n},lZ=(e,t,r,n,i)=>{var{offset:l,className:o}=e,{cx:c,cy:f,innerRadius:h,outerRadius:p,startAngle:y,endAngle:g,clockWise:x}=i,b=(h+p)/2,w=sZ(y,g),N=w>=0?1:-1,O,A;switch(t){case"insideStart":O=y+N*l,A=x;break;case"insideEnd":O=g-N*l,A=!x;break;case"end":O=g+N*l,A=x;break;default:throw new Error("Unsupported position ".concat(t))}A=w<=0?A:!A;var T=ur(c,f,b,O),E=ur(c,f,b,O+(A?1:-1)*359),C="M".concat(T.x,",").concat(T.y,`
108
- A`).concat(b,",").concat(b,",0,1,").concat(A?0:1,`,
109
- `).concat(E.x,",").concat(E.y),M=pt(e.id)?Bc("recharts-radial-line-"):e.id;return S.createElement("text",za({},n,{dominantBaseline:"central",className:We("recharts-radial-bar-label",o)}),S.createElement("defs",null,S.createElement("path",{id:M,d:C})),S.createElement("textPath",{xlinkHref:"#".concat(M)},r))},oZ=(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}=ur(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 g=(l+o)/2,{x,y:b}=ur(n,i,g,h);return{x,y:b,textAnchor:"middle",verticalAnchor:"middle"}},Eh=e=>e!=null&&"cx"in e&&ge(e.cx),uZ={angle:0,offset:5,zIndex:Qt.label,position:"middle",textBreakAll:!1};function cZ(e){if(!Eh(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 ki(e){var t=dr(e,uZ),{viewBox:r,parentViewBox:n,position:i,value:l,children:o,content:c,className:f="",textBreakAll:h,labelRef:p}=t,y=aZ(),g=JD(),x=i==="center"?g:y??g,b,w,N;r==null?b=x:Eh(r)?b=r:b=Sj(r);var O=cZ(b);if(!b||pt(l)&&pt(o)&&!S.isValidElement(c)&&typeof c!="function")return null;var A=Ac(Ac({},t),{},{viewBox:b});if(S.isValidElement(c)){var{labelRef:T}=A,E=YT(A,XW);return S.cloneElement(c,E)}if(typeof c=="function"){var{content:C}=A,M=YT(A,WW);if(w=S.createElement(c,M),S.isValidElement(w))return w}else w=iZ(t);var R=Er(t);if(Eh(b)){if(i==="insideStart"||i==="insideEnd"||i==="end")return lZ(t,i,w,R,b);N=oZ(b,t.offset,t.position)}else{if(!O)return null;var D=QW({viewBox:O,position:i,offset:t.offset,parentViewBox:Eh(n)?void 0:n});N=Ac(Ac({x:D.x,y:D.y,textAnchor:D.horizontalAnchor,verticalAnchor:D.verticalAnchor},D.width!==void 0?{width:D.width}:{}),D.height!==void 0?{height:D.height}:{})}return S.createElement(Cn,{zIndex:t.zIndex},S.createElement(Cw,za({ref:p,className:We("recharts-label",f)},R,N,{textAnchor:VD(R.textAnchor)?R.textAnchor:N.textAnchor,breakAll:h}),w))}ki.displayName="Label";var dZ=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?S.createElement(ki,za({key:"label-implicit"},n)):ua(e)?S.createElement(ki,za({key:"label-implicit",value:e},n)):S.isValidElement(e)?e.type===ki?S.cloneElement(e,Ac({key:"label-implicit"},n)):S.createElement(ki,za({key:"label-implicit",content:e},n)):Tw(e)?S.createElement(ki,za({key:"label-implicit",content:e},n)):e&&typeof e=="object"?S.createElement(ki,za({},e,{key:"label-implicit"},n)):null};function fZ(e){var{label:t,labelRef:r}=e,n=JD();return dZ(t,n,r)||null}var hZ=["valueAccessor"],mZ=["dataKey","clockWise","id","textBreakAll","zIndex"];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 QT(e,t){if(e==null)return{};var r,n,i=pZ(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 pZ(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var yZ=e=>{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(UW(t))return t},ek=S.createContext(void 0),tk=ek.Provider,rk=S.createContext(void 0);rk.Provider;function gZ(){return S.useContext(ek)}function vZ(){return S.useContext(rk)}function Ah(e){var{valueAccessor:t=yZ}=e,r=QT(e,hZ),{dataKey:n,clockWise:i,id:l,textBreakAll:o,zIndex:c}=r,f=QT(r,mZ),h=gZ(),p=vZ(),y=h||p;return!y||!y.length?null:S.createElement(Cn,{zIndex:c??Qt.label},S.createElement(an,{className:"recharts-label-list"},y.map((g,x)=>{var b,w=pt(n)?t(g,x):Pt(g.payload,n),N=pt(l)?{}:{id:"".concat(l,"-").concat(x)};return S.createElement(ki,Om({key:"label-".concat(x)},Er(g),f,N,{fill:(b=r.fill)!==null&&b!==void 0?b:g.fill,parentViewBox:g.parentViewBox,value:w,textBreakAll:o,viewBox:g.viewBox,index:x,zIndex:0}))})))}Ah.displayName="LabelList";function nk(e){var{label:t}=e;return t?t===!0?S.createElement(Ah,{key:"labelList-implicit"}):S.isValidElement(t)||Tw(t)?S.createElement(Ah,{key:"labelList-implicit",content:t}):typeof t=="object"?S.createElement(Ah,Om({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}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)}var ak=e=>{var{cx:t,cy:r,r:n,className:i}=e,l=We("recharts-dot",i);return ge(t)&&ge(r)&&ge(n)?S.createElement("circle",vb({},zn(e),dj(e),{className:l,cx:t,cy:r,r:n})):null},xZ={radiusAxis:{},angleAxis:{}},ik=xr({name:"polarAxis",initialState:xZ,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:Hse,removeRadiusAxis:Kse,addAngleAxis:Gse,removeAngleAxis:Yse}=ik.actions,bZ=ik.reducer;function jZ(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var F0={exports:{}},rt={};/**
110
- * @license React
111
- * react-is.production.js
112
- *
113
- * Copyright (c) Meta Platforms, Inc. and affiliates.
114
- *
115
- * This source code is licensed under the MIT license found in the
116
- * LICENSE file in the root directory of this source tree.
117
- */var XT;function wZ(){if(XT)return rt;XT=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"),g=Symbol.for("react.view_transition"),x=Symbol.for("react.client.reference");function b(w){if(typeof w=="object"&&w!==null){var N=w.$$typeof;switch(N){case e:switch(w=w.type,w){case r:case i:case n:case f:case h:case g:return w;default:switch(w=w&&w.$$typeof,w){case o:case c:case y:case p:return w;case l:return w;default:return N}}case t:return N}}}return rt.ContextConsumer=l,rt.ContextProvider=o,rt.Element=e,rt.ForwardRef=c,rt.Fragment=r,rt.Lazy=y,rt.Memo=p,rt.Portal=t,rt.Profiler=i,rt.StrictMode=n,rt.Suspense=f,rt.SuspenseList=h,rt.isContextConsumer=function(w){return b(w)===l},rt.isContextProvider=function(w){return b(w)===o},rt.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===e},rt.isForwardRef=function(w){return b(w)===c},rt.isFragment=function(w){return b(w)===r},rt.isLazy=function(w){return b(w)===y},rt.isMemo=function(w){return b(w)===p},rt.isPortal=function(w){return b(w)===t},rt.isProfiler=function(w){return b(w)===i},rt.isStrictMode=function(w){return b(w)===n},rt.isSuspense=function(w){return b(w)===f},rt.isSuspenseList=function(w){return b(w)===h},rt.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===r||w===i||w===n||w===f||w===h||typeof w=="object"&&w!==null&&(w.$$typeof===y||w.$$typeof===p||w.$$typeof===o||w.$$typeof===l||w.$$typeof===c||w.$$typeof===x||w.getModuleId!==void 0)},rt.typeOf=b,rt}var WT;function SZ(){return WT||(WT=1,F0.exports=wZ()),F0.exports}var NZ=SZ(),ZT=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",JT=null,H0=null,sk=e=>{if(e===JT&&Array.isArray(H0))return H0;var t=[];return S.Children.forEach(e,r=>{pt(r)||(NZ.isFragment(r)?t=t.concat(sk(r.props.children)):t.push(r))}),H0=t,JT=e,t};function OZ(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(i=>ZT(i)):n=[ZT(t)],sk(e).forEach(i=>{var l=Ho(i,"type.displayName")||Ho(i,"type.name");l&&n.indexOf(l)!==-1&&r.push(i)}),r}var lk=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0,K0={},eP;function _Z(){return eP||(eP=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})(K0)),K0}var G0,tP;function EZ(){return tP||(tP=1,G0=_Z().isPlainObject),G0}var AZ=EZ();const CZ=as(AZ);var rP,nP,aP,iP,sP;function lP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function oP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lP(Object(r),!0).forEach(function(n){TZ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function TZ(e,t,r){return(t=PZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function PZ(e){var t=MZ(e,"string");return typeof t=="symbol"?t:t+""}function MZ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _m(){return _m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_m.apply(null,arguments)}function jc(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var uP=(e,t,r,n,i)=>{var l=r-n,o;return o=Nt(rP||(rP=jc(["M ",",",""])),e,t),o+=Nt(nP||(nP=jc(["L ",",",""])),e+r,t),o+=Nt(aP||(aP=jc(["L ",",",""])),e+r-l/2,t+i),o+=Nt(iP||(iP=jc(["L ",",",""])),e+r-l/2-n,t+i),o+=Nt(sP||(sP=jc(["L ",","," Z"])),e,t),o},RZ={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},DZ=e=>{var t=dr(e,RZ),{x:r,y:n,upperWidth:i,lowerWidth:l,height:o,className:c}=t,{animationEasing:f,animationDuration:h,animationBegin:p,isUpdateAnimationActive:y}=t,g=S.useRef(null),[x,b]=S.useState(-1),w=S.useRef(i),N=S.useRef(l),O=S.useRef(o),A=S.useRef(r),T=S.useRef(n),E=fp(e,"trapezoid-");if(S.useEffect(()=>{if(g.current&&g.current.getTotalLength)try{var ee=g.current.getTotalLength();ee&&b(ee)}catch{}},[]),r!==+r||n!==+n||i!==+i||l!==+l||o!==+o||i===0&&l===0||o===0)return null;var C=We("recharts-trapezoid",c);if(!y)return S.createElement("g",null,S.createElement("path",_m({},Er(t),{className:C,d:uP(r,n,i,l,o)})));var M=w.current,R=N.current,D=O.current,L=A.current,k=T.current,F="0px ".concat(x===-1?1:x,"px"),q="".concat(x,"px ").concat(x,"px"),ie=g3(["strokeDasharray"],h,f);return S.createElement(dp,{animationId:E,key:E,canBegin:x>0,duration:h,easing:f,isActive:y,begin:p},ee=>{var ne=Ot(M,i,ee),z=Ot(R,l,ee),H=Ot(D,o,ee),Z=Ot(L,r,ee),ae=Ot(k,n,ee);g.current&&(w.current=ne,N.current=z,O.current=H,A.current=Z,T.current=ae);var le=ee>0?{transition:ie,strokeDasharray:q}:{strokeDasharray:F};return S.createElement("path",_m({},Er(t),{className:C,d:uP(Z,ae,ne,z,H),ref:g,style:oP(oP({},le),t.style)}))})},kZ=["option","shapeType","activeClassName","inActiveClassName"];function IZ(e,t){if(e==null)return{};var r,n,i=LZ(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 LZ(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function cP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Em(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cP(Object(r),!0).forEach(function(n){$Z(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $Z(e,t,r){return(t=zZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zZ(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 UZ(e,t){return Em(Em({},t),e)}function qZ(e,t){return e==="symbols"}function dP(e){var{shapeType:t,elementProps:r}=e;switch(t){case"rectangle":return S.createElement(j3,r);case"trapezoid":return S.createElement(DZ,r);case"sector":return S.createElement(N3,r);case"symbols":if(qZ(t))return S.createElement(cj,r);break;case"curve":return S.createElement(y3,r);default:return null}}function FZ(e){return S.isValidElement(e)?e.props:e}function ok(e){var{option:t,shapeType:r,activeClassName:n="recharts-active-shape",inActiveClassName:i="recharts-shape"}=e,l=IZ(e,kZ),o;if(S.isValidElement(t))o=S.cloneElement(t,Em(Em({},l),FZ(t)));else if(typeof t=="function")o=t(l,l.index);else if(CZ(t)&&typeof t!="boolean"){var c=UZ(t,l);o=S.createElement(dP,{shapeType:r,elementProps:c})}else{var f=l;o=S.createElement(dP,{shapeType:r,elementProps:f})}return l.isActive?S.createElement(an,{className:n},o):S.createElement(an,{className:i},o)}var uk=(e,t,r)=>{var n=dt();return(i,l)=>o=>{e==null||e(i,l,o),n(yD({activeIndex:String(l),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:r}))}},ck=e=>{var t=dt();return(r,n)=>i=>{e==null||e(r,n,i),t(sQ())}},dk=(e,t,r)=>{var n=dt();return(i,l)=>o=>{e==null||e(i,l,o),n(lQ({activeIndex:String(l),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:r}))}};function fk(e){var{tooltipEntrySettings:t}=e,r=dt(),n=br(),i=S.useRef(null);return S.useLayoutEffect(()=>{n||(i.current===null?r(rQ(t)):i.current!==t&&r(nQ({prev:i.current,next:t})),i.current=t)},[t,r,n]),S.useLayoutEffect(()=>()=>{i.current&&(r(aQ(i.current)),i.current=null)},[r]),null}function hk(e){var{legendPayload:t}=e,r=dt(),n=br(),i=S.useRef(null);return S.useLayoutEffect(()=>{n||(i.current===null?r(G7(t)):i.current!==t&&r(Y7({prev:i.current,next:t})),i.current=t)},[r,n,t]),S.useLayoutEffect(()=>()=>{i.current&&(r(V7(i.current)),i.current=null)},[r]),null}var Y0,HZ=()=>{var[e]=S.useState(()=>Bc("uid-"));return e},KZ=(Y0=f$.useId)!==null&&Y0!==void 0?Y0:HZ;function GZ(e,t){var r=KZ();return t||(e?"".concat(e,"-").concat(r):r)}var YZ=S.createContext(void 0),mk=e=>{var{id:t,type:r,children:n}=e,i=GZ("recharts-".concat(r),t);return S.createElement(YZ.Provider,{value:i},n(i))},VZ={cartesianItems:[],polarItems:[]},pk=xr({name:"graphicalItems",initialState:VZ,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:ut()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:r,next:n}=t.payload,i=On(e).cartesianItems.indexOf(r);i>-1&&(e.cartesianItems[i]=n)},prepare:ut()},removeCartesianGraphicalItem:{reducer(e,t){var r=On(e).cartesianItems.indexOf(t.payload);r>-1&&e.cartesianItems.splice(r,1)},prepare:ut()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:ut()},removePolarGraphicalItem:{reducer(e,t){var r=On(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)},prepare:ut()},replacePolarGraphicalItem:{reducer(e,t){var{prev:r,next:n}=t.payload,i=On(e).polarItems.indexOf(r);i>-1&&(e.polarItems[i]=n)},prepare:ut()}}}),{addCartesianGraphicalItem:QZ,replaceCartesianGraphicalItem:XZ,removeCartesianGraphicalItem:WZ,addPolarGraphicalItem:Vse,removePolarGraphicalItem:Qse,replacePolarGraphicalItem:Xse}=pk.actions,ZZ=pk.reducer,JZ=e=>{var t=dt(),r=S.useRef(null);return S.useLayoutEffect(()=>{r.current===null?t(QZ(e)):r.current!==e&&t(XZ({prev:r.current,next:e})),r.current=e},[t,e]),S.useLayoutEffect(()=>()=>{r.current&&(t(WZ(r.current)),r.current=null)},[t]),null},yk=S.memo(JZ),eJ=["points"];function fP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function V0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fP(Object(r),!0).forEach(function(n){tJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function tJ(e,t,r){return(t=rJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rJ(e){var t=nJ(e,"string");return typeof t=="symbol"?t:t+""}function nJ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Am(){return Am=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},Am.apply(null,arguments)}function aJ(e,t){if(e==null)return{};var r,n,i=iJ(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 iJ(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 sJ(e){var{option:t,dotProps:r,className:n}=e;if(S.isValidElement(t))return S.cloneElement(t,r);if(typeof t=="function")return t(r);var i=We(n,typeof t!="boolean"?t.className:""),l=r??{},{points:o}=l,c=aJ(l,eJ);return S.createElement(ak,Am({},c,{className:i}))}function lJ(e,t){return e==null?!1:t?!0:e.length===1}function oJ(e){var{points:t,dot:r,className:n,dotClassName:i,dataKey:l,baseProps:o,needClip:c,clipPathId:f,zIndex:h=Qt.scatter}=e;if(!lJ(t,r))return null;var p=lk(r),y=M6(r),g=t.map((b,w)=>{var N,O,A=V0(V0(V0({r:3},o),y),{},{index:w,cx:(N=b.x)!==null&&N!==void 0?N:void 0,cy:(O=b.y)!==null&&O!==void 0?O:void 0,dataKey:l,value:b.value,payload:b.payload,points:t});return S.createElement(sJ,{key:"dot-".concat(w),option:r,dotProps:A,className:i})}),x={};return c&&f!=null&&(x.clipPath="url(#clipPath-".concat(p?"":"dots-").concat(f,")")),S.createElement(Cn,{zIndex:h},S.createElement(an,Am({className:n},x),g))}function hP(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 mP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hP(Object(r),!0).forEach(function(n){uJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function uJ(e,t,r){return(t=cJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cJ(e){var t=dJ(e,"string");return typeof t=="symbol"?t:t+""}function dJ(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 gk=0,fJ={xAxis:{},yAxis:{},zAxis:{}},vk=xr({name:"cartesianAxis",initialState:fJ,reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:ut()},replaceXAxis:{reducer(e,t){var{prev:r,next:n}=t.payload;e.xAxis[r.id]!==void 0&&(r.id!==n.id&&delete e.xAxis[r.id],e.xAxis[n.id]=n)},prepare:ut()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:ut()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:ut()},replaceYAxis:{reducer(e,t){var{prev:r,next:n}=t.payload;e.yAxis[r.id]!==void 0&&(r.id!==n.id&&delete e.yAxis[r.id],e.yAxis[n.id]=n)},prepare:ut()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:ut()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:ut()},replaceZAxis:{reducer(e,t){var{prev:r,next:n}=t.payload;e.zAxis[r.id]!==void 0&&(r.id!==n.id&&delete e.zAxis[r.id],e.zAxis[n.id]=n)},prepare:ut()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:ut()},updateYAxisWidth(e,t){var{id:r,width:n}=t.payload,i=e.yAxis[r];if(i){var 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]=mP(mP({},i),{},{width:n,widthHistory:c})}}}}),{addXAxis:hJ,replaceXAxis:mJ,removeXAxis:pJ,addYAxis:yJ,replaceYAxis:gJ,removeYAxis:vJ,addZAxis:Wse,replaceZAxis:Zse,removeZAxis:Jse,updateYAxisWidth:xJ}=vk.actions,bJ=vk.reducer,jJ=V([Wt],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),wJ=V([jJ,Ja,ei],(e,t,r)=>{if(!(!e||t==null||r==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,r-e.top-e.bottom)}}),Pw=()=>be(wJ),SJ=()=>be(rX);function pP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Q0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pP(Object(r),!0).forEach(function(n){NJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function NJ(e,t,r){return(t=OJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function OJ(e){var t=_J(e,"string");return typeof t=="symbol"?t:t+""}function _J(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 EJ=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=Q0(Q0(Q0({},c),cd(i)),dj(i)),h;return S.isValidElement(i)?h=S.cloneElement(i,f):typeof i=="function"?h=i(f):h=S.createElement(ak,f),S.createElement(an,{className:"recharts-active-dot",clipPath:o},h)};function AJ(e){var{points:t,mainColor:r,activeDot:n,itemDataKey:i,clipPath:l,zIndex:o=Qt.activeDot}=e,c=be(dl),f=SJ();if(t==null||f==null)return null;var h=t.find(p=>f.includes(p.payload));return pt(h)?null:S.createElement(Cn,{zIndex:o},S.createElement(EJ,{point:h,childIndex:Number(c),mainColor:r,dataKey:i,activeDot:n,clipPath:l}))}var yP=(e,t,r)=>{var n=r??e;if(!pt(n))return Bn(n,t,0)},CJ=(e,t,r)=>{var n={},i=e.filter(vp),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,g]=h,x=g.map(w=>w.dataKey),b=yP(t,r,(p=g[0])===null||p===void 0?void 0:p.barSize);return{stackId:y,dataKeys:x,barSize:b}}),f=l.map(h=>{var p=[h.dataKey].filter(g=>g!=null),y=yP(t,r,h.barSize);return{stackId:void 0,dataKeys:p,barSize:y}});return[...c,...f]};function gP(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?gP(Object(r),!0).forEach(function(n){TJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function TJ(e,t,r){return(t=PJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function PJ(e){var t=MJ(e,"string");return typeof t=="symbol"?t:t+""}function MJ(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 RJ(e,t,r,n,i){var l,o=n.length;if(!(o<1)){var c=Bn(e,r,0,!0),f,h=[];if(Ue((l=n[0])===null||l===void 0?void 0:l.barSize)){var p=!1,y=r/o,g=n.reduce((A,T)=>A+(T.barSize||0),0);g+=(o-1)*c,g>=r&&(g-=(o-1)*c,c=0),g>=r&&y>0&&(p=!0,y*=.9,g=o*y);var x=(r-g)/2>>0,b={offset:x-c,size:0};f=n.reduce((A,T)=>{var E,C={stackId:T.stackId,dataKeys:T.dataKeys,position:{offset:b.offset+b.size+c,size:p?y:(E=T.barSize)!==null&&E!==void 0?E:0}},M=[...A,C];return b=C.position,M},h)}else{var w=Bn(t,r,0,!0);r-2*w-(o-1)*c<=0&&(c=0);var N=(r-2*w-(o-1)*c)/o;N>1&&(N>>=0);var O=Ue(i)?Math.min(N,i):N;f=n.reduce((A,T,E)=>[...A,{stackId:T.stackId,dataKeys:T.dataKeys,position:{offset:w+(N+c)*E+(N-O)/2,size:O}}],h)}return f}}var DJ=(e,t,r,n,i,l,o)=>{var c=pt(o)?t:o,f=RJ(r,n,i!==l?i:l,e,c);return i!==l&&f!=null&&(f=f.map(h=>mh(mh({},h),{},{position:mh(mh({},h.position),{},{offset:h.position.offset-i/2})}))),f},kJ=(e,t)=>{var r=$j(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)}}}},IJ=(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 LJ(e,t){return e&&typeof e=="object"&&"zIndex"in e&&typeof e.zIndex=="number"&&Ue(e.zIndex)?e.zIndex:t}var $J=e=>{var{chartData:t}=e,r=dt(),n=br();return S.useEffect(()=>n?()=>{}:(r(PT(t)),()=>{r(PT(void 0))}),[t,r,n]),null},vP={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},xk=xr({name:"brush",initialState:vP,reducers:{setBrushSettings(e,t){return t.payload==null?vP:t.payload}}}),{setBrushSettings:ele}=xk.actions,zJ=xk.reducer;function BJ(e){return(e%180+180)%180}var UJ=function(t){var{width:r,height:n}=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,l=BJ(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)},qJ={dots:[],areas:[],lines:[]},bk=xr({name:"referenceElements",initialState:qJ,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=On(e).dots.findIndex(n=>n===t.payload);r!==-1&&e.dots.splice(r,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var r=On(e).areas.findIndex(n=>n===t.payload);r!==-1&&e.areas.splice(r,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var r=On(e).lines.findIndex(n=>n===t.payload);r!==-1&&e.lines.splice(r,1)}}}),{addDot:tle,removeDot:rle,addArea:nle,removeArea:ale,addLine:ile,removeLine:sle}=bk.actions,FJ=bk.reducer,HJ=S.createContext(void 0),KJ=e=>{var{children:t}=e,[r]=S.useState("".concat(Bc("recharts"),"-clip")),n=Pw();if(n==null)return null;var{x:i,y:l,width:o,height:c}=n;return S.createElement(HJ.Provider,{value:r},S.createElement("defs",null,S.createElement("clipPath",{id:r},S.createElement("rect",{x:i,y:l,height:c,width:o}))),t)};function jk(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 GJ(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return UJ(n,r)}function YJ(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 VJ(e,t){return jk(e,t+1)}function QJ(e,t,r,n,i){for(var l=(n||[]).slice(),{start:o,end:c}=t,f=0,h=1,p=o,y=function(){var b=n==null?void 0:n[f];if(b===void 0)return{v:jk(n,h)};var w=f,N,O=()=>(N===void 0&&(N=r(b,w)),N),A=b.coordinate,T=f===0||ed(e,A,O,p,c);T||(f=0,p=o,h+=1),T&&(p=A+e*(O()/2+i),f+=h)},g;h<=l.length;)if(g=y(),g)return g.v;return[]}function XJ(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,g=!0,x=function(){var E=n[w];if(E==null)return 0;var C=w,M,R=()=>(M===void 0&&(M=r(E,C)),M),D=E.coordinate,L=w===p||ed(e,D,R,y,f);if(!L)return g=!1,1;L&&(y=D+e*(R()/2+i))},b,w=p;w<o&&(b=x(),!(b!==0&&b===1));w+=h);if(g){for(var N=[],O=p;O<o;O+=h){var A=n[O];A!=null&&N.push(A)}return N}}return[]}function xP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function pr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xP(Object(r),!0).forEach(function(n){WJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function WJ(e,t,r){return(t=ZJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ZJ(e){var t=JJ(e,"string");return typeof t=="symbol"?t:t+""}function JJ(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 eee(e,t,r,n,i){for(var l=(n||[]).slice(),o=l.length,{start:c}=t,{end:f}=t,h=function(g){var x=l[g];if(x==null)return 1;var b=x,w,N=()=>(w===void 0&&(w=r(x,g)),w);if(g===o-1){var O=e*(b.coordinate+e*N()/2-f);l[g]=b=pr(pr({},b),{},{tickCoord:O>0?b.coordinate-O*e:b.coordinate})}else l[g]=b=pr(pr({},b),{},{tickCoord:b.coordinate});if(b.tickCoord!=null){var A=ed(e,b.tickCoord,N,c,f);A&&(f=b.tickCoord-e*(N()/2+i),l[g]=pr(pr({},b),{},{isShow:!0}))}},p=o-1;p>=0;p--)h(p);return l}function tee(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),g=e*(p.coordinate+e*y/2-h);if(o[c-1]=p=pr(pr({},p),{},{tickCoord:g>0?p.coordinate-g*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]=pr(pr({},p),{},{isShow:!0}))}}}for(var b=l?c-1:c,w=function(A){var T=o[A];if(T==null)return 1;var E=T,C,M=()=>(C===void 0&&(C=r(T,A)),C);if(A===0){var R=e*(E.coordinate-e*M()/2-f);o[A]=E=pr(pr({},E),{},{tickCoord:R<0?E.coordinate-R*e:E.coordinate})}else o[A]=E=pr(pr({},E),{},{tickCoord:E.coordinate});if(E.tickCoord!=null){var D=ed(e,E.tickCoord,M,f,h);D&&(f=E.tickCoord+e*(M()/2+i),o[A]=pr(pr({},E),{},{isShow:!0}))}},N=0;N<b;N++)w(N);return o}function Mw(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(ge(f)||gd.isSsr){var g;return(g=VJ(i,ge(f)?f:0))!==null&&g!==void 0?g:[]}var x=[],b=c==="top"||c==="bottom"?"width":"height",w=p&&b==="width"?Tc(p,{fontSize:t,letterSpacing:r}):{width:0,height:0},N=(C,M)=>{var R=typeof h=="function"?h(C.value,M):C.value;return b==="width"?GJ(Tc(R,{fontSize:t,letterSpacing:r}),w,y):Tc(R,{fontSize:t,letterSpacing:r})[b]},O=i[0],A=i[1],T=i.length>=2&&O!=null&&A!=null?qr(A.coordinate-O.coordinate):1,E=YJ(l,T,b);return f==="equidistantPreserveStart"?QJ(T,E,N,i,o):f==="equidistantPreserveEnd"?XJ(T,E,N,i,o):(f==="preserveStart"||f==="preserveStartEnd"?x=tee(T,E,N,i,o,f==="preserveStartEnd"):x=eee(T,E,N,i,o),x.filter(C=>C.isShow))}var ree=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},nee={xAxis:{},yAxis:{}},wk=xr({name:"renderedTicks",initialState:nee,reducers:{setRenderedTicks:(e,t)=>{var{axisType:r,axisId:n,ticks:i}=t.payload;e[r][n]=i},removeRenderedTicks:(e,t)=>{var{axisType:r,axisId:n}=t.payload;delete e[r][n]}}}),{setRenderedTicks:aee,removeRenderedTicks:iee}=wk.actions,see=wk.reducer,lee=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function oee(e,t){if(e==null)return{};var r,n,i=uee(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 uee(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 fl(){return fl=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},fl.apply(null,arguments)}function bP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function St(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bP(Object(r),!0).forEach(function(n){cee(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function cee(e,t,r){return(t=dee(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dee(e){var t=fee(e,"string");return typeof t=="symbol"?t:t+""}function fee(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 Ga={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd",zIndex:Qt.axis};function hee(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=St(St(St({},f),zn(c)),{},{fill:"none"});if(l==="top"||l==="bottom"){var p=+(l==="top"&&!o||l==="bottom"&&o);h=St(St({},h),{},{x1:t,y1:r+p*i,x2:t+n,y2:r+p*i})}else{var y=+(l==="left"&&!o||l==="right"&&o);h=St(St({},h),{},{x1:t+y*n,y1:r,x2:t+y*n,y2:r+i})}return S.createElement("line",fl({},h,{className:We("recharts-cartesian-axis-line",Ho(c,"className"))}))}function mee(e,t,r,n,i,l,o,c,f){var h,p,y,g,x,b,w=c?-1:1,N=e.tickSize||o,O=ge(e.tickCoord)?e.tickCoord:e.coordinate;switch(l){case"top":h=p=e.coordinate,g=r+ +!c*i,y=g-w*N,b=y-w*f,x=O;break;case"left":y=g=e.coordinate,p=t+ +!c*n,h=p-w*N,x=h-w*f,b=O;break;case"right":y=g=e.coordinate,p=t+ +c*n,h=p+w*N,x=h+w*f,b=O;break;default:h=p=e.coordinate,g=r+ +c*i,y=g+w*N,b=y+w*f,x=O;break}return{line:{x1:h,y1:y,x2:p,y2:g},tick:{x,y:b}}}function pee(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function yee(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function gee(e){var{option:t,tickProps:r,value:n}=e,i,l=We(r.className,"recharts-cartesian-axis-tick-value");if(S.isValidElement(t))i=S.cloneElement(t,St(St({},r),{},{className:l}));else if(typeof t=="function")i=t(St(St({},r),{},{className:l}));else{var o="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(o=We(o,jZ(t))),i=S.createElement(Cw,fl({},r,{className:o}),n)}return i}function vee(e){var{ticks:t,axisType:r,axisId:n}=e,i=dt();return S.useEffect(()=>{if(n==null||r==null)return pl;var l=t.map(o=>({value:o.value,coordinate:o.coordinate,offset:o.offset,index:o.index}));return i(aee({ticks:l,axisId:n,axisType:r})),()=>{i(iee({axisId:n,axisType:r}))}},[i,t,n,r]),null}var xee=S.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:g,y:x,width:b,height:w,tickSize:N,tickMargin:O,fontSize:A,letterSpacing:T,getTicksConfig:E,events:C,axisType:M,axisId:R}=e,D=Mw(St(St({},E),{},{ticks:r}),A,T),L=zn(E),k=cd(n),F=VD(L.textAnchor)?L.textAnchor:pee(p,y),q=yee(p,y),ie={};typeof i=="object"&&(ie=i);var ee=St(St({},L),{},{fill:"none"},ie),ne=D.map(Z=>St({entry:Z},mee(Z,g,x,b,w,p,N,y,O))),z=ne.map(Z=>{var{entry:ae,line:le}=Z;return S.createElement(an,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(ae.value,"-").concat(ae.coordinate,"-").concat(ae.tickCoord)},i&&S.createElement("line",fl({},ee,le,{className:We("recharts-cartesian-axis-tick-line",Ho(i,"className"))})))}),H=ne.map((Z,ae)=>{var le,I,{entry:Q,tick:oe}=Z,se=St(St(St(St({verticalAnchor:q},L),{},{textAnchor:F,stroke:"none",fill:l},oe),{},{index:ae,payload:Q,visibleTicksCount:D.length,tickFormatter:o,padding:f},h),{},{angle:(le=(I=h==null?void 0:h.angle)!==null&&I!==void 0?I:L.angle)!==null&&le!==void 0?le:0}),fe=St(St({},se),k);return S.createElement(an,fl({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(Q.value,"-").concat(Q.coordinate,"-").concat(Q.tickCoord)},Km(C,Q,ae)),n&&S.createElement(gee,{option:n,tickProps:fe,value:"".concat(typeof o=="function"?o(Q.value,ae):Q.value).concat(c||"")}))});return S.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(M,"-ticks")},S.createElement(vee,{ticks:D,axisId:R,axisType:M}),H.length>0&&S.createElement(Cn,{zIndex:Qt.label},S.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(M,"-tick-labels"),ref:t},H)),z.length>0&&S.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(M,"-tick-lines")},z))}),bee=S.forwardRef((e,t)=>{var{axisLine:r,width:n,height:i,className:l,hide:o,ticks:c,axisType:f,axisId:h}=e,p=oee(e,lee),[y,g]=S.useState(""),[x,b]=S.useState(""),w=S.useRef(null);S.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var O;return ree({ticks:w.current,label:(O=e.labelRef)===null||O===void 0?void 0:O.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var N=S.useCallback(O=>{if(O){var A=O.getElementsByClassName("recharts-cartesian-axis-tick-value");w.current=A;var T=A[0];if(T){var E=window.getComputedStyle(T),C=E.fontSize,M=E.letterSpacing;(C!==y||M!==x)&&(g(C),b(M))}}},[y,x]);return o||n!=null&&n<=0||i!=null&&i<=0?null:S.createElement(Cn,{zIndex:e.zIndex},S.createElement(an,{className:We("recharts-cartesian-axis",l)},S.createElement(hee,{x:e.x,y:e.y,width:n,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:zn(e)}),S.createElement(xee,{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}),S.createElement(rZ,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},S.createElement(fZ,{label:e.label,labelRef:e.labelRef}),e.children)))}),Rw=S.forwardRef((e,t)=>{var r=dr(e,Ga);return S.createElement(bee,fl({},r,{ref:t}))});Rw.displayName="CartesianAxis";var jee=["x1","y1","x2","y2","key"],wee=["offset"],See=["xAxisId","yAxisId"],Nee=["xAxisId","yAxisId"];function jP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function yr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jP(Object(r),!0).forEach(function(n){Oee(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Oee(e,t,r){return(t=_ee(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _ee(e){var t=Eee(e,"string");return typeof t=="symbol"?t:t+""}function Eee(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 zs(){return zs=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},zs.apply(null,arguments)}function Cm(e,t){if(e==null)return{};var r,n,i=Aee(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 Aee(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Cee=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 S.createElement("rect",{x:n,y:i,ry:c,width:l,height:o,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function Sk(e){var{option:t,lineItemProps:r}=e,n;if(S.isValidElement(t))n=S.cloneElement(t,r);else if(typeof t=="function")n=t(r);else{var i,{x1:l,y1:o,x2:c,y2:f,key:h}=r,p=Cm(r,jee),y=(i=zn(p))!==null&&i!==void 0?i:{},{offset:g}=y,x=Cm(y,wee);n=S.createElement("line",zs({},x,{x1:l,y1:o,x2:c,y2:f,fill:"none",key:h}))}return n}function Tee(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=Cm(e,See),f=i.map((h,p)=>{var y=yr(yr({},c),{},{x1:t,y1:h,x2:t+r,y2:h,key:"line-".concat(p),index:p});return S.createElement(Sk,{key:"line-".concat(p),option:n,lineItemProps:y})});return S.createElement("g",{className:"recharts-cartesian-grid-horizontal"},f)}function Pee(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=Cm(e,Nee),f=i.map((h,p)=>{var y=yr(yr({},c),{},{x1:h,y1:t,x2:h,y2:t+r,key:"line-".concat(p),index:p});return S.createElement(Sk,{option:n,lineItemProps:y,key:"line-".concat(p)})});return S.createElement("g",{className:"recharts-cartesian-grid-vertical"},f)}function Mee(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,g)=>y-g);i!==h[0]&&h.unshift(0);var p=h.map((y,g)=>{var x=h[g+1],b=x==null,w=b?i+o-y:x-y;if(w<=0)return null;var N=g%t.length;return S.createElement("rect",{key:"react-".concat(g),y,x:n,height:w,width:l,stroke:"none",fill:t[N],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return S.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},p)}function Ree(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,g)=>y-g);i!==h[0]&&h.unshift(0);var p=h.map((y,g)=>{var x=h[g+1],b=x==null,w=b?i+o-y:x-y;if(w<=0)return null;var N=g%r.length;return S.createElement("rect",{key:"react-".concat(g),x:y,y:l,width:w,height:c,stroke:"none",fill:r[N],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return S.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},p)}var Dee=(e,t)=>{var{xAxis:r,width:n,height:i,offset:l}=e;return WR(Mw(yr(yr(yr({},Ga),r),{},{ticks:ZR(r),viewBox:{x:0,y:0,width:n,height:i}})),l.left,l.left+l.width,t)},kee=(e,t)=>{var{yAxis:r,width:n,height:i,offset:l}=e;return WR(Mw(yr(yr(yr({},Ga),r),{},{ticks:ZR(r),viewBox:{x:0,y:0,width:n,height:i}})),l.top,l.top+l.height,t)},Iee={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:Qt.grid};function Pp(e){var t=Nj(),r=Oj(),n=n3(),i=yr(yr({},dr(e,Iee)),{},{x:ge(e.x)?e.x:n.left,y:ge(e.y)?e.y:n.top,width:ge(e.width)?e.width:n.width,height:ge(e.height)?e.height:n.height}),{xAxisId:l,yAxisId:o,x:c,y:f,width:h,height:p,syncWithTicks:y,horizontalValues:g,verticalValues:x}=i,b=br(),w=be(L=>vT(L,"xAxis",l,b)),N=be(L=>vT(L,"yAxis",o,b));if(!ca(h)||!ca(p)||!ge(c)||!ge(f))return null;var O=i.verticalCoordinatesGenerator||Dee,A=i.horizontalCoordinatesGenerator||kee,{horizontalPoints:T,verticalPoints:E}=i;if((!T||!T.length)&&typeof A=="function"){var C=g&&g.length,M=A({yAxis:N?yr(yr({},N),{},{ticks:C?g:N.ticks}):void 0,width:t??h,height:r??p,offset:n},C?!0:y);em(Array.isArray(M),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof M,"]")),Array.isArray(M)&&(T=M)}if((!E||!E.length)&&typeof O=="function"){var R=x&&x.length,D=O({xAxis:w?yr(yr({},w),{},{ticks:R?x:w.ticks}):void 0,width:t??h,height:r??p,offset:n},R?!0:y);em(Array.isArray(D),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof D,"]")),Array.isArray(D)&&(E=D)}return S.createElement(Cn,{zIndex:i.zIndex},S.createElement("g",{className:"recharts-cartesian-grid"},S.createElement(Cee,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),S.createElement(Mee,zs({},i,{horizontalPoints:T})),S.createElement(Ree,zs({},i,{verticalPoints:E})),S.createElement(Tee,zs({},i,{offset:n,horizontalPoints:T,xAxis:w,yAxis:N})),S.createElement(Pee,zs({},i,{offset:n,verticalPoints:E,xAxis:w,yAxis:N}))))}Pp.displayName="CartesianGrid";var Lee={},Nk=xr({name:"errorBars",initialState:Lee,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:lle,replaceErrorBar:ole,removeErrorBar:ule}=Nk.actions,$ee=Nk.reducer,zee=["children"];function Bee(e,t){if(e==null)return{};var r,n,i=Uee(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 Uee(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 qee={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},Fee=S.createContext(qee);function Ok(e){var{children:t}=e,r=Bee(e,zee);return S.createElement(Fee.Provider,{value:r},t)}function Dw(e,t){var r,n,i=be(h=>ri(h,e)),l=be(h=>ni(h,t)),o=(r=i==null?void 0:i.allowDataOverflow)!==null&&r!==void 0?r:$t.allowDataOverflow,c=(n=l==null?void 0:l.allowDataOverflow)!==null&&n!==void 0?n:zt.allowDataOverflow,f=o||c;return{needClip:f,needClipX:o,needClipY:c}}function _k(e){var{xAxisId:t,yAxisId:r,clipPathId:n}=e,i=Pw(),{needClipX:l,needClipY:o,needClip:c}=Dw(t,r);if(!c||!i)return null;var{x:f,y:h,width:p,height:y}=i;return S.createElement("clipPath",{id:"clipPath-".concat(n)},S.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 Ek=(e,t,r,n)=>rs(e,"xAxis",t,n),Ak=(e,t,r,n)=>ts(e,"xAxis",t,n),Ck=(e,t,r,n)=>rs(e,"yAxis",r,n),Tk=(e,t,r,n)=>ts(e,"yAxis",r,n),Hee=V([Ze,Ek,Ck,Ak,Tk],(e,t,r,n,i)=>Za(e,"xAxis")?Go(t,n,!1):Go(r,i,!1)),Kee=(e,t,r,n,i)=>i;function Gee(e){return e.type==="line"}var Yee=V([Ep,Kee],(e,t)=>e.filter(Gee).find(r=>r.id===t)),Vee=V([Ze,Ek,Ck,Ak,Tk,Yee,Hee,vd],(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:g}=l,x;if(g!=null&&g.length>0?x=g:x=f==null?void 0:f.slice(h,p+1),x!=null)return pte({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:i,dataKey:y,bandSize:o,displayedData:x})}});function Qee(e){var t=cd(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 Xee=["id"],Wee=["type","layout","connectNulls","needClip","shape"],Zee=["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 wP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function na(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wP(Object(r),!0).forEach(function(n){Jee(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Jee(e,t,r){return(t=ete(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ete(e){var t=tte(e,"string");return typeof t=="symbol"?t:t+""}function tte(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 kw(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}var nte=e=>{var{dataKey:t,name:r,stroke:n,legendType:i,hide:l}=e;return[{inactive:l,dataKey:t,type:i,color:n,value:rp(r,t),payload:e}]},ate=S.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:pl,settings:{stroke:n,strokeWidth:i,fill:l,dataKey:t,nameKey:void 0,name:rp(o,t),hide:c,type:h,color:n,unit:f,graphicalItemId:p}};return S.createElement(fk,{tooltipEntrySettings:y})}),Pk=(e,t)=>"".concat(t,"px ").concat(e,"px");function ite(e,t){for(var r=e.length%2!==0?[...e,0]:e,n=[],i=0;i<t;++i)n.push(...r);return n}var ste=(e,t,r)=>{var n=r.reduce((g,x)=>g+x,0);if(!n)return Pk(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[...ite(r,i),...o,...y].map(g=>"".concat(g,"px")).join(", ")};function lte(e){var{clipPathId:t,points:r,props:n}=e,{dot:i,dataKey:l,needClip:o}=n,{id:c}=n,f=kw(n,Xee),h=zn(f);return S.createElement(oJ,{points:r,dot:i,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:l,baseProps:h,needClip:o,clipPathId:t})}function ote(e){var{showLabels:t,children:r,points:n}=e,i=S.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 na(na({},f),{},{value:l.value,payload:l.payload,viewBox:f,parentViewBox:void 0,fill:void 0})}),[n]);return S.createElement(tk,{value:t?i:void 0},r)}function SP(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=kw(l,Wee),g=na(na({},Er(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 S.createElement(S.Fragment,null,(n==null?void 0:n.length)>1&&S.createElement(ok,td({shapeType:"curve",option:p},g,{pathRef:r})),S.createElement(lte,{points:n,clipPathId:t,props:l}))}function ute(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function cte(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:g,width:x,height:b,onAnimationEnd:w,onAnimationStart:N}=r,O=i.current,A=fp(o,"recharts-line-"),T=S.useRef(A),[E,C]=S.useState(!1),M=!E,R=S.useCallback(()=>{typeof w=="function"&&w(),C(!1)},[w]),D=S.useCallback(()=>{typeof N=="function"&&N(),C(!0)},[N]),L=ute(n.current),k=S.useRef(0);T.current!==A&&(k.current=l.current,T.current=A);var F=k.current;return S.createElement(ote,{points:o,showLabels:M},r.children,S.createElement(dp,{animationId:A,begin:h,duration:p,isActive:f,easing:y,onAnimationEnd:R,onAnimationStart:D,key:A},q=>{var ie=Ot(F,L+F,q),ee=Math.min(ie,L),ne;if(f)if(c){var z="".concat(c).split(/[,\s]+/gim).map(ae=>parseFloat(ae));ne=ste(ee,L,z)}else ne=Pk(L,ee);else ne=c==null?void 0:String(c);if(q>0&&L>0&&(i.current=o,l.current=Math.max(l.current,ee)),O){var H=O.length/o.length,Z=q===1?o:o.map((ae,le)=>{var I=Math.floor(le*H);if(O[I]){var Q=O[I];return na(na({},ae),{},{x:Ot(Q.x,ae.x,q),y:Ot(Q.y,ae.y,q)})}return g?na(na({},ae),{},{x:Ot(x*2,ae.x,q),y:Ot(b/2,ae.y,q)}):na(na({},ae),{},{x:ae.x,y:ae.y})});return i.current=Z,S.createElement(SP,{props:r,points:Z,clipPathId:t,pathRef:n,strokeDasharray:ne})}return S.createElement(SP,{props:r,points:o,clipPathId:t,pathRef:n,strokeDasharray:ne})}),S.createElement(nk,{label:r.label}))}function dte(e){var{clipPathId:t,props:r}=e,n=S.useRef(null),i=S.useRef(0),l=S.useRef(null);return S.createElement(cte,{props:r,clipPathId:t,previousPointsRef:n,longestAnimatedLengthRef:i,pathRef:l})}var fte=(e,t)=>{var r,n;return{x:(r=e.x)!==null&&r!==void 0?r:void 0,y:(n=e.y)!==null&&n!==void 0?n:void 0,value:e.value,errorVal:Pt(e.payload,t)}};class hte extends S.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:g,zIndex:x}=this.props;if(t)return null;var b=We("recharts-line",i),w=y,{r:N,strokeWidth:O}=Qee(r),A=lk(r),T=N*2+O,E=g?"url(#clipPath-".concat(A?"":"dots-").concat(w,")"):void 0;return S.createElement(Cn,{zIndex:x},S.createElement(an,{className:b},g&&S.createElement("defs",null,S.createElement(_k,{clipPathId:w,xAxisId:l,yAxisId:o}),!A&&S.createElement("clipPath",{id:"clipPath-dots-".concat(w)},S.createElement("rect",{x:f-T/2,y:c-T/2,width:h+T,height:p+T}))),S.createElement(Ok,{xAxisId:l,yAxisId:o,data:n,dataPointFormatter:fte,errorBarOffset:0},S.createElement(dte,{props:this.props,clipPathId:w}))),S.createElement(AJ,{activeDot:this.props.activeDot,points:n,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:E}))}}var Mk={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:"auto",label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:Qt.line,type:"linear"};function mte(e){var t=dr(e,Mk),{activeDot:r,animateNewValues:n,animationBegin:i,animationDuration:l,animationEasing:o,connectNulls:c,dot:f,hide:h,isAnimationActive:p,label:y,legendType:g,xAxisId:x,yAxisId:b,id:w}=t,N=kw(t,Zee),{needClip:O}=Dw(x,b),A=Pw(),T=yl(),E=br(),C=be(k=>Vee(k,x,b,E,w));if(T!=="horizontal"&&T!=="vertical"||C==null||A==null)return null;var{height:M,width:R,x:D,y:L}=A;return S.createElement(hte,td({},N,{id:w,connectNulls:c,dot:f,activeDot:r,animateNewValues:n,animationBegin:i,animationDuration:l,animationEasing:o,isAnimationActive:p,hide:h,label:y,legendType:g,xAxisId:x,yAxisId:b,points:C,layout:T,height:M,width:R,left:D,top:L,needClip:O}))}function pte(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=Pt(h,o);if(t==="horizontal"){var g=cA({axis:r,ticks:i,bandSize:c,entry:h,index:p}),x=pt(y)?null:n.scale.map(y);return{x:g,y:x??null,value:y,payload:h}}var b=pt(y)?null:r.scale.map(y),w=cA({axis:n,ticks:l,bandSize:c,entry:h,index:p});return b==null||w==null?null:{x:b,y:w,value:y,payload:h}}).filter(Boolean)}function yte(e){var t=dr(e,Mk),r=br();return S.createElement(mk,{id:t.id,type:"line"},n=>S.createElement(S.Fragment,null,S.createElement(hk,{legendPayload:nte(t)}),S.createElement(ate,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:n}),S.createElement(yk,{type:"line",id:n,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:r}),S.createElement(mte,td({},t,{id:n}))))}var Rk=S.memo(yte,au);Rk.displayName="Line";function bl(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:gk}function jl(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:gk}var gte="Invariant failed";function vte(e,t){throw new Error(gte)}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 Iw(e){return S.createElement(ok,xb({shapeType:"rectangle",activeClassName:"recharts-active-bar",inActiveClassName:"recharts-inactive-bar"},e))}var xte=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(n,i)=>{if(ge(t))return t;var l=ge(n)||pt(n);return l?t(n,i):(l||vte(),r)}},bte=(e,t,r)=>r,jte=(e,t)=>t,Ad=V([Ep,jte],(e,t)=>e.filter(r=>r.type==="bar").find(r=>r.id===t)),wte=V([Ad],e=>e==null?void 0:e.maxBarSize),Ste=(e,t,r,n)=>n,Nte=V([Ze,Ep,bl,jl,bte],(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")),Ote=(e,t,r)=>{var n=Ze(e),i=bl(e,t),l=jl(e,t);if(!(i==null||l==null))return n==="horizontal"?mb(e,"yAxis",l,r):mb(e,"xAxis",i,r)},_te=(e,t)=>{var r=Ze(e),n=bl(e,t),i=jl(e,t);if(!(n==null||i==null))return r==="horizontal"?gT(e,"xAxis",n):gT(e,"yAxis",i)},Ete=V([Nte,uK,_te],CJ),Ate=(e,t,r)=>{var n,i,l=Ad(e,t);if(l==null)return 0;var o=bl(e,t),c=jl(e,t);if(o==null||c==null)return 0;var f=Ze(e),h=L3(e),{maxBarSize:p}=l,y=pt(p)?h:p,g,x;return f==="horizontal"?(g=rs(e,"xAxis",o,r),x=ts(e,"xAxis",o,r)):(g=rs(e,"yAxis",c,r),x=ts(e,"yAxis",c,r)),(n=(i=Go(g,x,!0))!==null&&i!==void 0?i:y)!==null&&n!==void 0?n:0},Dk=(e,t,r)=>{var n=Ze(e),i=bl(e,t),l=jl(e,t);if(!(i==null||l==null)){var o,c;return n==="horizontal"?(o=rs(e,"xAxis",i,r),c=ts(e,"xAxis",i,r)):(o=rs(e,"yAxis",l,r),c=ts(e,"yAxis",l,r)),Go(o,c)}},Cte=V([Ete,L3,oK,$3,Ate,Dk,wte],DJ),Tte=(e,t,r)=>{var n=bl(e,t);if(n!=null)return rs(e,"xAxis",n,r)},Pte=(e,t,r)=>{var n=jl(e,t);if(n!=null)return rs(e,"yAxis",n,r)},Mte=(e,t,r)=>{var n=bl(e,t);if(n!=null)return ts(e,"xAxis",n,r)},Rte=(e,t,r)=>{var n=jl(e,t);if(n!=null)return ts(e,"yAxis",n,r)},Dte=V([Cte,Ad],IJ),kte=V([Ote,Ad],kJ),Ite=V([Wt,bj,Tte,Pte,Mte,Rte,Dte,Ze,eK,Dk,kte,Ad,Ste],(e,t,r,n,i,l,o,c,f,h,p,y,g)=>{var{chartData:x,dataStartIndex:b,dataEndIndex:w}=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(b,w+1),O!=null)return cre({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:g,dataStartIndex:b})}}),Lte=["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 $te(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}var kk=S.createContext(void 0),Bte=e=>{var t=S.useContext(kk);if(t!=null)return t.stackId;if(e!=null)return Yq(e)},Ute=(e,t)=>"recharts-bar-stack-clip-path-".concat(e,"-").concat(t),qte=e=>{var t=S.useContext(kk);if(t!=null){var{stackId:r}=t;return"url(#".concat(Ute(r,e),")")}},Ik=e=>{var{index:t}=e,r=$te(e,Lte),n=qte(t);return S.createElement(an,bb({className:"recharts-bar-stack-layer",clipPath:n},r))},Fte=["onMouseEnter","onMouseLeave","onClick"],Hte=["value","background","tooltipPosition"],Kte=["id"],Gte=["onMouseEnter","onClick","onMouseLeave"];function ns(){return ns=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},ns.apply(null,arguments)}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 Nr(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){Yte(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 Yte(e,t,r){return(t=Vte(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vte(e){var t=Qte(e,"string");return typeof t=="symbol"?t:t+""}function Qte(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 Tm(e,t){if(e==null)return{};var r,n,i=Xte(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 Xte(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 Wte=e=>{var{dataKey:t,name:r,fill:n,legendType:i,hide:l}=e;return[{inactive:l,dataKey:t,type:i,color:n,value:rp(r,t),payload:e}]},Zte=S.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:pl,settings:{stroke:r,strokeWidth:n,fill:i,dataKey:t,nameKey:void 0,name:rp(l,t),hide:o,type:f,color:i,unit:c,graphicalItemId:h}};return S.createElement(fk,{tooltipEntrySettings:p})});function Jte(e){var t=be(dl),{data:r,dataKey:n,background:i,allOtherBarProps:l}=e,{onMouseEnter:o,onMouseLeave:c,onClick:f}=l,h=Tm(l,Fte),p=uk(o,n,l.id),y=ck(c),g=dk(f,n,l.id);if(!i||r==null)return null;var x=cd(i);return S.createElement(Cn,{zIndex:LJ(i,Qt.barBackground)},r.map((b,w)=>{var{value:N,background:O,tooltipPosition:A}=b,T=Tm(b,Hte);if(!O)return null;var E=p(b,w),C=y(b,w),M=g(b,w),R=Nr(Nr(Nr(Nr(Nr({option:i,isActive:String(w)===t},T),{},{fill:"#eee"},O),x),Km(h,b,w)),{},{onMouseEnter:E,onMouseLeave:C,onClick:M,dataKey:n,index:w,className:"recharts-bar-background-rectangle"});return S.createElement(Iw,ns({key:"background-bar-".concat(w)},R))}))}function ere(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 Nr(Nr({},o),{},{value:l.value,payload:l.payload,parentViewBox:l.parentViewBox,viewBox:o,fill:l.fill})});return S.createElement(tk,{value:t?i:void 0},r)}function tre(e){var{shape:t,activeBar:r,baseProps:n,entry:i,index:l,dataKey:o}=e,c=be(dl),f=be(MD),h=r&&String(i.originalDataIndex)===c&&(f==null||o===f),[p,y]=S.useState(!1),[g,x]=S.useState(!1);S.useEffect(()=>{var T;return h?(y(!0),T=requestAnimationFrame(()=>{x(!0)})):x(!1),()=>{cancelAnimationFrame(T)}},[h]);var b=S.useCallback(()=>{h||y(!1)},[h]),w=h&&g,N=h||p,O;h?r===!0?O=t:O=r:O=t;var A=S.createElement(Iw,ns({},n,{name:String(n.name)},i,{isActive:w,option:O,index:l,dataKey:o,onTransitionEnd:b}));return N?S.createElement(Cn,{zIndex:Qt.activeBar},S.createElement(Ik,{index:i.originalDataIndex},A)):A}function rre(e){var{shape:t,baseProps:r,entry:n,index:i,dataKey:l}=e;return S.createElement(Iw,ns({},r,{name:String(r.name)},n,{isActive:!1,option:t,index:i,dataKey:l}))}function nre(e){var t,{data:r,props:n}=e,i=(t=zn(n))!==null&&t!==void 0?t:{},{id:l}=i,o=Tm(i,Kte),{shape:c,dataKey:f,activeBar:h}=n,{onMouseEnter:p,onClick:y,onMouseLeave:g}=n,x=Tm(n,Gte),b=uk(p,f,l),w=ck(g),N=dk(y,f,l);return r?S.createElement(S.Fragment,null,r.map((O,A)=>S.createElement(Ik,ns({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(A),className:"recharts-bar-rectangle"},Km(x,O,A),{onMouseEnter:b(O,A),onMouseLeave:w(O,A),onClick:N(O,A)}),h?S.createElement(tre,{shape:c,activeBar:h,baseProps:o,entry:O,index:A,dataKey:f}):S.createElement(rre,{shape:c,baseProps:o,entry:O,index:A,dataKey:f})))):null}function are(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,g=fp(t,"recharts-bar-"),[x,b]=S.useState(!1),w=!x,N=S.useCallback(()=>{typeof h=="function"&&h(),b(!1)},[h]),O=S.useCallback(()=>{typeof p=="function"&&p(),b(!0)},[p]);return S.createElement(ere,{showLabels:w,rects:n},S.createElement(dp,{animationId:g,begin:o,duration:c,isActive:l,easing:f,onAnimationEnd:N,onAnimationStart:O,key:g},A=>{var T=A===1?n:n==null?void 0:n.map((E,C)=>{var M=y&&y[C];if(M)return Nr(Nr({},E),{},{x:Ot(M.x,E.x,A),y:Ot(M.y,E.y,A),width:Ot(M.width,E.width,A),height:Ot(M.height,E.height,A)});if(i==="horizontal"){var R=Ot(0,E.height,A),D=Ot(E.stackedBarStart,E.y,A);return Nr(Nr({},E),{},{y:D,height:R})}var L=Ot(0,E.width,A),k=Ot(E.stackedBarStart,E.x,A);return Nr(Nr({},E),{},{width:L,x:k})});return A>0&&(r.current=T??null),T==null?null:S.createElement(an,null,S.createElement(nre,{props:t,data:T}))}),S.createElement(nk,{label:t.label}),t.children)}function ire(e){var t=S.useRef(null);return S.createElement(are,{previousRectanglesRef:t,props:e})}var Lk=0,sre=(e,t)=>{var r=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:r,errorVal:Pt(e,t)}};class lre extends S.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=We("recharts-bar",i),y=h;return S.createElement(an,{className:p,id:h},c&&S.createElement("defs",null,S.createElement(_k,{clipPathId:y,xAxisId:l,yAxisId:o})),S.createElement(an,{className:"recharts-bar-rectangles",clipPath:c?"url(#clipPath-".concat(y,")"):void 0},S.createElement(Jte,{data:r,dataKey:n,background:f,allOtherBarProps:this.props}),S.createElement(ire,this.props)))}}var ore={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",background:!1,hide:!1,isAnimationActive:"auto",label:!1,legendType:"rect",minPointSize:Lk,xAxisId:0,yAxisId:0,zIndex:Qt.bar};function ure(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}=Dw(t,r),g=yl(),x=br(),b=OZ(e.children,Aw),w=be(A=>Ite(A,e.id,x,b));if(g!=="vertical"&&g!=="horizontal")return null;var N,O=w==null?void 0:w[0];return O==null||O.height==null||O.width==null?N=0:N=g==="vertical"?O.height/2:O.width/2,S.createElement(Ok,{xAxisId:t,yAxisId:r,data:w,dataPointFormatter:sre,errorBarOffset:N},S.createElement(lre,ns({},e,{layout:g,needClip:y,data:w,xAxisId:t,yAxisId:r,hide:n,legendType:i,minPointSize:l,activeBar:o,animationBegin:c,animationDuration:f,animationEasing:h,isAnimationActive:p})))}function cre(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:g,offset:x,cells:b,parentViewBox:w,dataStartIndex:N}=e,O=t==="horizontal"?f:c,A=y?O.scale.domain():null,T=Vq({numericAxis:O}),E=O.scale.map(T);return g.map((C,M)=>{var R,D,L,k,F,q;if(y){var ie=y[M+N];if(ie==null)return null;R=qq(ie,A)}else R=Pt(C,r),Array.isArray(R)||(R=[T,R]);var ee=xte(n,Lk)(R[1],M);if(t==="horizontal"){var ne,z=f.scale.map(R[0]),H=f.scale.map(R[1]);if(z==null||H==null)return null;D=dA({axis:c,ticks:h,bandSize:o,offset:l.offset,entry:C,index:M}),L=(ne=H??z)!==null&&ne!==void 0?ne:void 0,k=l.size;var Z=z-H;if(F=oa(Z)?0:Z,q={x:D,y:x.top,width:k,height:x.height},Math.abs(ee)>0&&Math.abs(F)<Math.abs(ee)){var ae=qr(F||ee)*(Math.abs(ee)-Math.abs(F));L-=ae,F+=ae}}else{var le=c.scale.map(R[0]),I=c.scale.map(R[1]);if(le==null||I==null)return null;if(D=le,L=dA({axis:f,ticks:p,bandSize:o,offset:l.offset,entry:C,index:M}),k=I-le,F=l.size,q={x:x.left,y:L,width:x.width,height:F},Math.abs(ee)>0&&Math.abs(k)<Math.abs(ee)){var Q=qr(k||ee)*(Math.abs(ee)-Math.abs(k));k+=Q}}if(D==null||L==null||k==null||F==null||!i&&(k===0||F===0))return null;var oe=Nr(Nr({},C),{},{stackedBarStart:E,x:D,y:L,width:k,height:F,value:y?R:R[1],payload:C,background:q,tooltipPosition:{x:D+k/2,y:L+F/2},parentViewBox:w,originalDataIndex:M},b&&b[M]&&b[M].props);return oe}).filter(Boolean)}function dre(e){var t=dr(e,ore),r=Bte(t.stackId),n=br();return S.createElement(mk,{id:t.id,type:"bar"},i=>S.createElement(S.Fragment,null,S.createElement(hk,{legendPayload:Wte(t)}),S.createElement(Zte,{dataKey:t.dataKey,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:i}),S.createElement(yk,{type:"bar",id:i,data:void 0,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,stackId:r,hide:t.hide,barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize,isPanorama:n,hasCustomShape:t.shape!=null}),S.createElement(Cn,{zIndex:t.zIndex},S.createElement(ure,ns({},t,{id:i})))))}var Lw=S.memo(dre,au);Lw.displayName="Bar";var fre=["domain","range"],hre=["domain","range"];function OP(e,t){if(e==null)return{};var r,n,i=mre(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 mre(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function _P(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 $k(e,t){if(e===t)return!0;var{domain:r,range:n}=e,i=OP(e,fre),{domain:l,range:o}=t,c=OP(t,hre);return!_P(r,l)||!_P(n,o)?!1:au(i,c)}var pre=["type"],yre=["dangerouslySetInnerHTML","ticks","scale"],gre=["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 EP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function AP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?EP(Object(r),!0).forEach(function(n){vre(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):EP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vre(e,t,r){return(t=xre(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xre(e){var t=bre(e,"string");return typeof t=="symbol"?t:t+""}function bre(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 wb(e,t){if(e==null)return{};var r,n,i=jre(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 jre(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function wre(e){var t=dt(),r=S.useRef(null),n=a3(),{type:i}=e,l=wb(e,pre),o=pp(n,"xAxis",i),c=S.useMemo(()=>{if(o!=null)return AP(AP({},l),{},{type:o})},[l,o]);return S.useLayoutEffect(()=>{c!=null&&(r.current===null?t(hJ(c)):r.current!==c&&t(mJ({prev:r.current,next:c})),r.current=c)},[c,t]),S.useLayoutEffect(()=>()=>{r.current&&(t(pJ(r.current)),r.current=null)},[t]),null}var Sre=e=>{var{xAxisId:t,className:r}=e,n=be(bj),i=br(),l="xAxis",o=be(O=>cD(O,l,t,i)),c=be(O=>lD(O,t)),f=be(O=>HV(O,t)),h=be(O=>C4(O,t));if(c==null||f==null||h==null)return null;var{dangerouslySetInnerHTML:p,ticks:y,scale:g}=e,x=wb(e,yre),{id:b,scale:w}=h,N=wb(h,gre);return S.createElement(Rw,jb({},x,N,{x:f.x,y:f.y,width:c.width,height:c.height,className:We("recharts-".concat(l," ").concat(l),r),viewBox:n,ticks:o,axisType:l,axisId:t}))},Nre={allowDataOverflow:$t.allowDataOverflow,allowDecimals:$t.allowDecimals,allowDuplicatedCategory:$t.allowDuplicatedCategory,angle:$t.angle,axisLine:Ga.axisLine,height:$t.height,hide:!1,includeHidden:$t.includeHidden,interval:$t.interval,label:!1,minTickGap:$t.minTickGap,mirror:$t.mirror,orientation:$t.orientation,padding:$t.padding,reversed:$t.reversed,scale:$t.scale,tick:$t.tick,tickCount:$t.tickCount,tickLine:Ga.tickLine,tickSize:Ga.tickSize,type:$t.type,niceTicks:$t.niceTicks,xAxisId:0},Ore=e=>{var t=dr(e,Nre);return S.createElement(S.Fragment,null,S.createElement(wre,{allowDataOverflow:t.allowDataOverflow,allowDecimals:t.allowDecimals,allowDuplicatedCategory:t.allowDuplicatedCategory,angle:t.angle,dataKey:t.dataKey,domain:t.domain,height:t.height,hide:t.hide,id:t.xAxisId,includeHidden:t.includeHidden,interval:t.interval,minTickGap:t.minTickGap,mirror:t.mirror,name:t.name,orientation:t.orientation,padding:t.padding,reversed:t.reversed,scale:t.scale,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,niceTicks:t.niceTicks}),S.createElement(Sre,t))},Mp=S.memo(Ore,$k);Mp.displayName="XAxis";var _re=["type"],Ere=["dangerouslySetInnerHTML","ticks","scale"],Are=["id","scale"];function Sb(){return Sb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Sb.apply(null,arguments)}function CP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function TP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?CP(Object(r),!0).forEach(function(n){Cre(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):CP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Cre(e,t,r){return(t=Tre(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Tre(e){var t=Pre(e,"string");return typeof t=="symbol"?t:t+""}function Pre(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=Mre(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 Mre(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Rre(e){var t=dt(),r=S.useRef(null),n=a3(),{type:i}=e,l=Nb(e,_re),o=pp(n,"yAxis",i),c=S.useMemo(()=>{if(o!=null)return TP(TP({},l),{},{type:o})},[o,l]);return S.useLayoutEffect(()=>{c!=null&&(r.current===null?t(yJ(c)):r.current!==c&&t(gJ({prev:r.current,next:c})),r.current=c)},[c,t]),S.useLayoutEffect(()=>()=>{r.current&&(t(vJ(r.current)),r.current=null)},[t]),null}function Dre(e){var{yAxisId:t,className:r,width:n,label:i}=e,l=S.useRef(null),o=S.useRef(null),c=be(bj),f=br(),h=dt(),p="yAxis",y=be(M=>oD(M,t)),g=be(M=>GV(M,t)),x=be(M=>cD(M,p,t,f)),b=be(M=>T4(M,t));if(S.useLayoutEffect(()=>{if(!(n!=="auto"||!y||Tw(i)||S.isValidElement(i)||b==null)){var M=l.current;if(M){var R=M.getCalculatedWidth();Math.round(y.width)!==Math.round(R)&&h(xJ({id:t,width:R}))}}},[x,y,h,i,t,n,b]),y==null||g==null||b==null)return null;var{dangerouslySetInnerHTML:w,ticks:N,scale:O}=e,A=Nb(e,Ere),{id:T,scale:E}=b,C=Nb(b,Are);return S.createElement(Rw,Sb({},A,C,{ref:l,labelRef:o,x:g.x,y:g.y,tickTextProps:n==="auto"?{width:void 0}:{width:n},width:y.width,height:y.height,className:We("recharts-".concat(p," ").concat(p),r),viewBox:c,ticks:x,axisType:p,axisId:t}))}var kre={allowDataOverflow:zt.allowDataOverflow,allowDecimals:zt.allowDecimals,allowDuplicatedCategory:zt.allowDuplicatedCategory,angle:zt.angle,axisLine:Ga.axisLine,hide:!1,includeHidden:zt.includeHidden,interval:zt.interval,label:!1,minTickGap:zt.minTickGap,mirror:zt.mirror,orientation:zt.orientation,padding:zt.padding,reversed:zt.reversed,scale:zt.scale,tick:zt.tick,tickCount:zt.tickCount,tickLine:Ga.tickLine,tickSize:Ga.tickSize,type:zt.type,niceTicks:zt.niceTicks,width:zt.width,yAxisId:0},Ire=e=>{var t=dr(e,kre);return S.createElement(S.Fragment,null,S.createElement(Rre,{interval:t.interval,id:t.yAxisId,scale:t.scale,type:t.type,domain:t.domain,allowDataOverflow:t.allowDataOverflow,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,padding:t.padding,includeHidden:t.includeHidden,reversed:t.reversed,ticks:t.ticks,width:t.width,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:t.angle,minTickGap:t.minTickGap,tick:t.tick,tickFormatter:t.tickFormatter,niceTicks:t.niceTicks}),S.createElement(Dre,t))},Rp=S.memo(Ire,$k);Rp.displayName="YAxis";var Lre=(e,t)=>t,$w=V([Lre,Ze,K3,Jt,AD,ai,pX,Wt],wX);function $re(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function zw(e){var t=e.currentTarget.getBoundingClientRect(),r,n;if($re(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 zk=sn("mouseClick"),Bk=hd();Bk.startListening({actionCreator:zk,effect:(e,t)=>{var r=e.payload,n=$w(t.getState(),zw(r));(n==null?void 0:n.activeIndex)!=null&&t.dispatch(oQ({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var Ob=sn("mouseMove"),Uk=hd(),po=null,Es=null,X0=null;Uk.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"));po!==null&&(cancelAnimationFrame(po),po=null),Es!==null&&(typeof i!="number"||!o)&&(clearTimeout(Es),Es=null),X0=zw(r);var c=()=>{var f=t.getState(),h=_d(f,f.tooltip.settings.shared);if(!X0){po=null,Es=null;return}if(h==="axis"){var p=$w(f,X0);(p==null?void 0:p.activeIndex)!=null?t.dispatch(vD({activeIndex:p.activeIndex,activeDataKey:void 0,activeCoordinate:p.activeCoordinate})):t.dispatch(gD())}po=null,Es=null};if(!o){c();return}i==="raf"?po=requestAnimationFrame(c):typeof i=="number"&&Es===null&&(Es=setTimeout(c,i))}});function zre(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 PP={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},qk=xr({name:"rootProps",initialState:PP,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:PP.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}}}),Bre=qk.reducer,{updateOptions:Ure}=qk.actions,qre=null,Fre={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)},Fk=xr({name:"polarOptions",initialState:qre,reducers:Fre}),{updatePolarOptions:cle}=Fk.actions,Hre=Fk.reducer,Hk=sn("keyDown"),Kk=sn("focus"),Gk=sn("blur"),Dp=hd(),yo=null,As=null,ph=null;Dp.startListening({actionCreator:Hk,effect:(e,t)=>{ph=e.payload,yo!==null&&(cancelAnimationFrame(yo),yo=null);var r=t.getState(),{throttleDelay:n,throttledEvents:i}=r.eventSettings,l=i==="all"||i.includes("keydown");As!==null&&(typeof n!="number"||!l)&&(clearTimeout(As),As=null);var o=()=>{try{var c=t.getState(),f=c.rootProps.accessibilityLayer!==!1;if(!f)return;var{keyboardInteraction:h}=c.tooltip,p=ph;if(p!=="ArrowRight"&&p!=="ArrowLeft"&&p!=="Enter")return;var y=Cc(h,cl(c),Zo(c),Jo(c)),g=y==null?-1:Number(y),x=!Number.isFinite(g)||g<0,b=ai(c),w=cl(c),N=_d(c,c.tooltip.settings.shared);if(p==="Enter"){if(x)return;var O=Nm(c,N,"hover",String(h.index));t.dispatch(Sm({active:!h.active,activeIndex:h.index,activeCoordinate:O}));return}var A=WV(c),T=A==="left-to-right"?1:-1,E=p==="ArrowRight"?1:-1,C;if(x){var M=Zo(c),R=Jo(c),D=E*T,L=ee=>({active:!1,index:String(ee),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(C=-1,D>0){for(var k=0;k<w.length;k++)if(Cc(L(k),w,M,R)!=null){C=k;break}}else for(var F=w.length-1;F>=0;F--)if(Cc(L(F),w,M,R)!=null){C=F;break}if(C<0)return}else{C=g+E*T;var q=(b==null?void 0:b.length)||w.length;if(q===0||C>=q||C<0)return}var ie=Nm(c,N,"hover",String(C));t.dispatch(Sm({active:!0,activeIndex:C.toString(),activeCoordinate:ie}))}finally{yo=null,As=null}};if(!l){o();return}n==="raf"?yo=requestAnimationFrame(o):typeof n=="number"&&As===null&&(o(),ph=null,As=setTimeout(()=>{ph?o():(As=null,yo=null)},n))}});Dp.startListening({actionCreator:Kk,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=_d(r,r.tooltip.settings.shared),c=Nm(r,o,"hover",String(l));t.dispatch(Sm({active:!0,activeIndex:l,activeCoordinate:c}))}}}});Dp.startListening({actionCreator:Gk,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:i}=r.tooltip;i.active&&t.dispatch(Sm({active:!1,activeIndex:i.index,activeCoordinate:i.coordinate}))}}});function Yk(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 bn=sn("externalEvent"),Vk=hd(),yh=new Map,wc=new Map,W0=new Map;Vk.startListening({actionCreator:bn,effect:(e,t)=>{var{handler:r,reactEvent:n}=e.payload;if(r!=null){var i=n.type,l=Yk(n);W0.set(i,{handler:r,reactEvent:l});var o=yh.get(i);o!==void 0&&(cancelAnimationFrame(o),yh.delete(i));var c=t.getState(),{throttleDelay:f,throttledEvents:h}=c.eventSettings,p=h,y=p==="all"||(p==null?void 0:p.includes(i)),g=wc.get(i);g!==void 0&&(typeof f!="number"||!y)&&(clearTimeout(g),wc.delete(i));var x=()=>{var N=W0.get(i);try{if(!N)return;var{handler:O,reactEvent:A}=N,T=t.getState(),E={activeCoordinate:JQ(T),activeDataKey:MD(T),activeIndex:dl(T),activeLabel:PD(T),activeTooltipIndex:dl(T),isTooltipActive:eX(T)};O&&O(E,A)}finally{yh.delete(i),wc.delete(i),W0.delete(i)}};if(!y){x();return}if(f==="raf"){var b=requestAnimationFrame(x);yh.set(i,b)}else if(typeof f=="number"){if(!wc.has(i)){x();var w=setTimeout(x,f);wc.set(i,w)}}else x()}}});var Kre=V([fu],e=>e.tooltipItemPayloads),Gre=V([Kre,(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)}}}),Qk=sn("touchMove"),Xk=hd(),Cs=null,Pi=null,MP=null,Sc=null;Xk.startListening({actionCreator:Qk,effect:(e,t)=>{var r=e.payload;if(!(r.touches==null||r.touches.length===0)){Sc=Yk(r);var n=t.getState(),{throttleDelay:i,throttledEvents:l}=n.eventSettings,o=l==="all"||l.includes("touchmove");Cs!==null&&(cancelAnimationFrame(Cs),Cs=null),Pi!==null&&(typeof i!="number"||!o)&&(clearTimeout(Pi),Pi=null),MP=Array.from(r.touches).map(f=>zw({clientX:f.clientX,clientY:f.clientY,currentTarget:r.currentTarget}));var c=()=>{if(Sc!=null){var f=t.getState(),h=_d(f,f.tooltip.settings.shared);if(h==="axis"){var p,y=(p=MP)===null||p===void 0?void 0:p[0];if(y==null){Cs=null,Pi=null;return}var g=$w(f,y);(g==null?void 0:g.activeIndex)!=null&&t.dispatch(vD({activeIndex:g.activeIndex,activeDataKey:void 0,activeCoordinate:g.activeCoordinate}))}else if(h==="item"){var x,b=Sc.touches[0];if(document.elementFromPoint==null||b==null)return;var w=document.elementFromPoint(b.clientX,b.clientY);if(!w||!w.getAttribute)return;var N=w.getAttribute(t7),O=(x=w.getAttribute(r7))!==null&&x!==void 0?x:void 0,A=xl(f).find(C=>C.id===O);if(N==null||A==null||O==null)return;var{dataKey:T}=A,E=Gre(f,N,O);t.dispatch(yD({activeDataKey:T,activeIndex:N,activeCoordinate:E,activeGraphicalItemId:O}))}Cs=null,Pi=null}};if(!o){c();return}i==="raf"?Cs=requestAnimationFrame(c):typeof i=="number"&&Pi===null&&(c(),Sc=null,Pi=setTimeout(()=>{Sc?c():(Pi=null,Cs=null)},i))}}});var Wk={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},Zk=xr({name:"eventSettings",initialState:Wk,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),{setEventSettings:Yre}=Zk.actions,Vre=Zk.reducer,Qre=wR({brush:zJ,cartesianAxis:bJ,chartData:ZX,errorBars:$ee,eventSettings:Vre,graphicalItems:ZZ,layout:Lq,legend:Q7,options:YX,polarAxis:bZ,polarOptions:Hre,referenceElements:FJ,renderedTicks:see,rootProps:Bre,tooltip:uQ,zIndex:kX}),Xre=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return oq({reducer:Qre,preloadedState:t,middleware:n=>{var i;return n({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((i="es6")!==null&&i!==void 0?i:"")}).concat([Bk.middleware,Uk.middleware,Dp.middleware,Vk.middleware,Xk.middleware])},enhancers:n=>{var i=n;return typeof n=="function"&&(i=n()),i.concat(LR({type:"raf"}))},devTools:{serialize:{replacer:zre},name:"recharts-".concat(r)}})};function Wre(e){var{preloadedState:t,children:r,reduxStoreName:n}=e,i=br(),l=S.useRef(null);if(i)return r;l.current==null&&(l.current=Xre(t,n));var o=hj;return S.createElement(dF,{context:o,store:l.current},r)}function Zre(e){var{layout:t,margin:r}=e,n=dt(),i=br();return S.useEffect(()=>{i||(n(Dq(t)),n(Rq(r)))},[n,i,t,r]),null}var Jre=S.memo(Zre,au);function ene(e){var t=dt();return S.useEffect(()=>{t(Ure(e))},[t,e]),null}var tne=e=>{var t=dt();return S.useEffect(()=>{t(Yre(e))},[t,e]),null},rne=S.memo(tne,au);function RP(e){var{zIndex:t,isPanorama:r}=e,n=S.useRef(null),i=dt();return S.useLayoutEffect(()=>(n.current&&i(RX({zIndex:t,element:n.current,isPanorama:r})),()=>{i(DX({zIndex:t,isPanorama:r}))}),[i,t,r]),S.createElement("g",{tabIndex:-1,ref:n,className:"recharts-zIndex-layer_".concat(t)})}function DP(e){var{children:t,isPanorama:r}=e,n=be(NX);if(!n||n.length===0)return t;var i=n.filter(o=>o<0),l=n.filter(o=>o>0);return S.createElement(S.Fragment,null,i.map(o=>S.createElement(RP,{key:o,zIndex:o,isPanorama:r})),t,l.map(o=>S.createElement(RP,{key:o,zIndex:o,isPanorama:r})))}var nne=["children"];function ane(e,t){if(e==null)return{};var r,n,i=ine(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 ine(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Pm(){return Pm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Pm.apply(null,arguments)}var sne={width:"100%",height:"100%",display:"block"},lne=S.forwardRef((e,t)=>{var r=Nj(),n=Oj(),i=p3();if(!ca(r)||!ca(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),S.createElement(nj,Pm({},o,{title:c,desc:f,role:p,tabIndex:h,width:r,height:n,style:sne,ref:t}),l)}),one=e=>{var{children:t}=e,r=be(sp);if(!r)return null;var{width:n,height:i,y:l,x:o}=r;return S.createElement(nj,{width:n,height:i,x:o,y:l},t)},kP=S.forwardRef((e,t)=>{var{children:r}=e,n=ane(e,nne),i=br();return i?S.createElement(one,null,S.createElement(DP,{isPanorama:!0},r)):S.createElement(lne,Pm({ref:t},n),S.createElement(DP,{isPanorama:!1},r))});function une(){var e=dt(),[t,r]=S.useState(null),n=be(e7);return S.useEffect(()=>{if(t!=null){var i=t.getBoundingClientRect(),l=i.width/t.offsetWidth;Ue(l)&&l!==n&&e(Iq(l))}},[t,e,n]),r}function IP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function cne(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?IP(Object(r),!0).forEach(function(n){dne(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):IP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function dne(e,t,r){return(t=fne(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fne(e){var t=hne(e,"string");return typeof t=="symbol"?t:t+""}function hne(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 es(){return es=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},es.apply(null,arguments)}var mne=()=>(lW(),null);function Mm(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var pne=S.forwardRef((e,t)=>{var r,n,i=S.useRef(null),[l,o]=S.useState({containerWidth:Mm((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:Mm((n=e.style)===null||n===void 0?void 0:n.height)}),c=S.useCallback((h,p)=>{o(y=>{var g=Math.round(h),x=Math.round(p);return y.containerWidth===g&&y.containerHeight===x?y:{containerWidth:g,containerHeight:x}})},[]),f=S.useCallback(h=>{if(typeof t=="function"&&t(h),i.current!=null&&(i.current.disconnect(),i.current=null),h!=null&&typeof ResizeObserver<"u"){var{width:p,height:y}=h.getBoundingClientRect();c(p,y);var g=b=>{var w=b[0];if(w!=null){var{width:N,height:O}=w.contentRect;c(N,O)}},x=new ResizeObserver(g);x.observe(h),i.current=x}},[t,c]);return S.useEffect(()=>()=>{var h=i.current;h!=null&&h.disconnect()},[c]),S.createElement(S.Fragment,null,S.createElement(pd,{width:l.containerWidth,height:l.containerHeight}),S.createElement("div",es({ref:f},e)))}),yne=S.forwardRef((e,t)=>{var{width:r,height:n}=e,[i,l]=S.useState({containerWidth:Mm(r),containerHeight:Mm(n)}),o=S.useCallback((f,h)=>{l(p=>{var y=Math.round(f),g=Math.round(h);return p.containerWidth===y&&p.containerHeight===g?p:{containerWidth:y,containerHeight:g}})},[]),c=S.useCallback(f=>{if(typeof t=="function"&&t(f),f!=null){var{width:h,height:p}=f.getBoundingClientRect();o(h,p)}},[t,o]);return S.createElement(S.Fragment,null,S.createElement(pd,{width:i.containerWidth,height:i.containerHeight}),S.createElement("div",es({ref:c},e)))}),gne=S.forwardRef((e,t)=>{var{width:r,height:n}=e;return S.createElement(S.Fragment,null,S.createElement(pd,{width:r,height:n}),S.createElement("div",es({ref:t},e)))}),vne=S.forwardRef((e,t)=>{var{width:r,height:n}=e;return typeof r=="string"||typeof n=="string"?S.createElement(yne,es({},e,{ref:t})):typeof r=="number"&&typeof n=="number"?S.createElement(gne,es({},e,{width:r,height:n,ref:t})):S.createElement(S.Fragment,null,S.createElement(pd,{width:r,height:n}),S.createElement("div",es({ref:t},e)))});function xne(e){return e?pne:vne}var bne=S.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:g,onTouchEnd:x,onTouchMove:b,onTouchStart:w,style:N,width:O,responsive:A,dispatchTouchEvents:T=!0}=e,E=S.useRef(null),C=dt(),[M,R]=S.useState(null),[D,L]=S.useState(null),k=une(),F=jj(),q=(F==null?void 0:F.width)>0?F.width:O,ie=(F==null?void 0:F.height)>0?F.height:i,ee=S.useCallback(de=>{k(de),typeof t=="function"&&t(de),R(de),L(de),de!=null&&(E.current=de)},[k,t,R,L]),ne=S.useCallback(de=>{C(zk(de)),C(bn({handler:l,reactEvent:de}))},[C,l]),z=S.useCallback(de=>{C(Ob(de)),C(bn({handler:h,reactEvent:de}))},[C,h]),H=S.useCallback(de=>{C(gD()),C(bn({handler:p,reactEvent:de}))},[C,p]),Z=S.useCallback(de=>{C(Ob(de)),C(bn({handler:y,reactEvent:de}))},[C,y]),ae=S.useCallback(()=>{C(Kk())},[C]),le=S.useCallback(()=>{C(Gk())},[C]),I=S.useCallback(de=>{C(Hk(de.key))},[C]),Q=S.useCallback(de=>{C(bn({handler:o,reactEvent:de}))},[C,o]),oe=S.useCallback(de=>{C(bn({handler:c,reactEvent:de}))},[C,c]),se=S.useCallback(de=>{C(bn({handler:f,reactEvent:de}))},[C,f]),fe=S.useCallback(de=>{C(bn({handler:g,reactEvent:de}))},[C,g]),xe=S.useCallback(de=>{C(bn({handler:w,reactEvent:de}))},[C,w]),Se=S.useCallback(de=>{T&&C(Qk(de)),C(bn({handler:b,reactEvent:de}))},[C,T,b]),Re=S.useCallback(de=>{C(bn({handler:x,reactEvent:de}))},[C,x]),ce=xne(A);return S.createElement(zD.Provider,{value:M},S.createElement(LM.Provider,{value:D},S.createElement(ce,{width:q??(N==null?void 0:N.width),height:ie??(N==null?void 0:N.height),className:We("recharts-wrapper",n),style:cne({position:"relative",cursor:"default",width:q,height:ie},N),onClick:ne,onContextMenu:Q,onDoubleClick:oe,onFocus:ae,onBlur:le,onKeyDown:I,onMouseDown:se,onMouseEnter:z,onMouseLeave:H,onMouseMove:Z,onMouseUp:fe,onTouchEnd:Re,onTouchMove:Se,onTouchStart:xe,ref:ee},S.createElement(mne,null),r)))}),jne=["width","height","responsive","children","className","style","compact","title","desc"];function wne(e,t){if(e==null)return{};var r,n,i=Sne(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 Sne(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 Nne=S.forwardRef((e,t)=>{var{width:r,height:n,responsive:i,children:l,className:o,style:c,compact:f,title:h,desc:p}=e,y=wne(e,jne),g=zn(y);return f?S.createElement(S.Fragment,null,S.createElement(pd,{width:r,height:n}),S.createElement(kP,{otherAttributes:g,title:h,desc:p},l)):S.createElement(bne,{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},S.createElement(kP,{otherAttributes:g,title:h,desc:p,ref:t},S.createElement(KJ,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 LP(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 One(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?LP(Object(r),!0).forEach(function(n){_ne(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):LP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _ne(e,t,r){return(t=Ene(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ene(e){var t=Ane(e,"string");return typeof t=="symbol"?t:t+""}function Ane(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Cne={top:5,right:5,bottom:5,left:5},Tne=One({accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:Cne,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},Wk),Jk=S.forwardRef(function(t,r){var n,i=dr(t.categoricalChartProps,Tne),{chartName:l,defaultTooltipEventType:o,validateTooltipEventTypes:c,tooltipPayloadSearcher:f,categoricalChartProps:h}=t,p={chartName:l,defaultTooltipEventType:o,validateTooltipEventTypes:c,tooltipPayloadSearcher:f,eventEmitter:void 0};return S.createElement(Wre,{preloadedState:{options:p},reduxStoreName:(n=h.id)!==null&&n!==void 0?n:l},S.createElement($J,{chartData:h.data}),S.createElement(Jre,{layout:i.layout,margin:i.margin}),S.createElement(rne,{throttleDelay:i.throttleDelay,throttledEvents:i.throttledEvents}),S.createElement(ene,{baseValue:i.baseValue,accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className,reverseStackOrder:i.reverseStackOrder}),S.createElement(Nne,_b({},i,{ref:r})))}),Pne=["axis"],Mne=S.forwardRef((e,t)=>S.createElement(Jk,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:Pne,tooltipPayloadSearcher:BD,categoricalChartProps:e,ref:t})),Rne=["axis","item"],e5=S.forwardRef((e,t)=>S.createElement(Jk,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:Rne,tooltipPayloadSearcher:BD,categoricalChartProps:e,ref:t}));const Ii="",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}],Z0=10;function Dne(e,t,r=new Date){const n=kne(e),i=Lne(e,n),l=$ne(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:zne(p.map(y=>y.score)),experimentOptions:i,categoryOptions:l,totalScores:n.length,filteredScores:p.length,categoryAvailable:o,hasTimestampedScores:c}}function kne(e){return e.runs&&e.runs.length>0?e.runs.flatMap(t=>Ine(t)):e.cells.flatMap(t=>t.tests.flatMap(r=>{const n=t5(r,t.experiment);return n?[n]:[]}))}function Ine(e){const t=Une(e.started_at);return e.tests.flatMap(r=>{const n=t5(r,e.experiment);return n?[{...n,startedAtMs:t}]:[]})}function t5(e,t){if(!Number.isFinite(e.score))return;const r=Bne(e.category);return{score:e.score,experiment:t,...r&&{category:r}}}function Lne(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 $ne(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 zne(e){if(e.length===0)return[];const t=Array.from({length:Z0},(r,n)=>({range:`${n*10}-${(n+1)*10}%`,count:0}));for(const r of e){const n=Math.max(0,Math.min(r,1)),i=Math.min(Math.floor(n*Z0),Z0-1);t[i].count++}return t}function Bne(e){const t=e==null?void 0:e.trim();return t||void 0}function Une(e){const t=Date.parse(e);return Number.isFinite(t)?t:void 0}const Tt={green:"#34d399",red:"#f87171",gray:"#4b5563",cyan:"#22d3ee",gridLine:"#1f2937",labelText:"#9ca3af"},$P=["#22d3ee","#34d399","#facc15","#f87171","#a78bfa","#fb923c","#f472b6","#60a5fa"];function qne(e){return $P[e%$P.length]}function Fne({data:e,projectId:t}){const[r,n]=S.useState(!0),[i,l]=S.useState(""),o=e.targets,c=He(t?bM(t,i||void 0):cB(i||void 0)),f=i?c.data:void 0,h=S.useMemo(()=>Xne(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(Hne,{data:f,baseline:i}),e.runs&&e.runs.length>0&&o.length>1&&d.jsx(Kne,{runs:e.runs,targets:o}),i&&f&&d.jsx(Gne,{data:f,baseline:i}),d.jsx(Yne,{data:e}),h.length>1&&o.length>0&&d.jsx(Wne,{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 Bw({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 eu({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 Hne({data:e,baseline:t}){const r=S.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(eu,{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(eu,{title:"Normalized Gain (g)",children:d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900/30 p-3",children:d.jsx(wj,{width:"100%",height:Math.max(200,n.length*32),children:d.jsxs(e5,{data:n,layout:"vertical",margin:{left:120,right:20,top:5,bottom:5},children:[d.jsx(Pp,{strokeDasharray:"3 3",stroke:Tt.gridLine,horizontal:!1}),d.jsx(Mp,{type:"number",tick:{fill:Tt.labelText,fontSize:11},axisLine:{stroke:Tt.gridLine}}),d.jsx(Rp,{type:"category",dataKey:"name",tick:{fill:Tt.labelText,fontSize:11},width:120,axisLine:{stroke:Tt.gridLine}}),d.jsx(Ew,{content:d.jsx(Bw,{})}),d.jsx(Lw,{dataKey:"g",name:"Normalized Gain",children:n.map(i=>d.jsx(Aw,{fill:i.isNull?Tt.gray:i.g>0?Tt.green:i.g<0?Tt.red:Tt.gray},i.name))})]})})})})}function Kne({runs:e,targets:t}){const{tags:r,grid:n}=S.useMemo(()=>{const i=new Map;for(const c of e)for(const f of c.tags??[]){let 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(eu,{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 Gne({data:e,baseline:t}){const r=S.useMemo(()=>e.cells.filter(n=>n.target!==t&&n.delta!==void 0&&n.delta<0).sort((n,i)=>(n.delta??0)-(i.delta??0)),[e.cells,t]);return r.length===0?null:d.jsx(eu,{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 zP={experiment:Ii,category:Ii,timePeriod:"all"};function Yne({data:e}){const[t,r]=S.useState(zP),n=S.useMemo(()=>Dne(e,t),[e,t]);S.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),g=h.timePeriod==="all"||n.hasTimestampedScores;return p&&y&&g?h:{experiment:p?h.experiment:Ii,category:y?h.category:Ii,timePeriod:g?h.timePeriod:"all"}})},[n.experimentOptions,n.categoryOptions,n.hasTimestampedScores]);const i=(h,p)=>{r(y=>({...y,[h]:p}))},l=()=>r(zP),o=t.experiment!==Ii||t.category!==Ii||t.timePeriod!=="all",c=n.totalScores>0,f=Qne(n,t);return d.jsx(eu,{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(J0,{id:"score-distribution-experiment",label:"Experiment",value:t.experiment,onChange:h=>i("experiment",h),disabled:n.experimentOptions.length===0,children:[d.jsx("option",{value:Ii,children:"All experiments"}),n.experimentOptions.map(h=>d.jsxs("option",{value:h.value,children:[h.label," (",h.count,")"]},h.value))]}),d.jsxs(J0,{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:Ii,children:"All categories"}),n.categoryOptions.map(h=>d.jsxs("option",{value:h.value,children:[h.label," (",h.count,")"]},h.value))]}),d.jsx(J0,{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(wj,{width:"100%",height:200,children:d.jsxs(e5,{data:n.buckets,margin:{left:10,right:10,top:5,bottom:5},children:[d.jsx(Pp,{strokeDasharray:"3 3",stroke:Tt.gridLine,vertical:!1}),d.jsx(Mp,{dataKey:"range",tick:{fill:Tt.labelText,fontSize:11},axisLine:{stroke:Tt.gridLine}}),d.jsx(Rp,{tick:{fill:Tt.labelText,fontSize:11},axisLine:{stroke:Tt.gridLine}}),d.jsx(Ew,{content:d.jsx(Bw,{})}),d.jsx(Lw,{dataKey:"count",name:"Tests",fill:Tt.cyan,radius:[2,2,0,0]})]})})}):d.jsx(Vne,{message:f})]})})}function J0({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 Vne({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 Qne(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 Xne(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 Wne({data:e,targets:t}){return d.jsx(eu,{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(wj,{width:"100%",height:250,children:d.jsxs(Mne,{data:e,margin:{left:10,right:20,top:5,bottom:5},children:[d.jsx(Pp,{strokeDasharray:"3 3",stroke:Tt.gridLine}),d.jsx(Mp,{dataKey:"date",tick:{fill:Tt.labelText,fontSize:11},axisLine:{stroke:Tt.gridLine}}),d.jsx(Rp,{domain:[0,1],tick:{fill:Tt.labelText,fontSize:11},axisLine:{stroke:Tt.gridLine}}),d.jsx(Ew,{content:d.jsx(Bw,{})}),d.jsx(h3,{wrapperStyle:{fontSize:12,color:Tt.labelText}}),t.map((r,n)=>d.jsx(Rk,{type:"monotone",dataKey:r,stroke:qne(n),strokeWidth:2,dot:{r:3},connectNulls:!0},r))]})})})})}function $n({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 r5({data:e,isLoading:t,isError:r,error:n,projectId:i,readOnly:l}){var A,T;const[o,c]=S.useState("aggregated"),[f,h]=S.useState([]),{allTags:p,tagCounts:y}=S.useMemo(()=>{const E=new Map;for(const C of(e==null?void 0:e.runs)??[])for(const M of C.tags??[])E.set(M,(E.get(M)??0)+1);return{allTags:[...E.keys()].sort(),tagCounts:E}},[e==null?void 0:e.runs]),g=S.useMemo(()=>{if(!e||f.length===0)return e;const E=new Set(f),C=(e.runs??[]).filter(k=>(k.tags??[]).some(F=>E.has(F))),M=new Map,R=new Set,D=new Set;for(const k of C){R.add(k.experiment),D.add(k.target);const F=`${k.experiment}::${k.target}`,q=M.get(F)??{experiment:k.experiment,target:k.target,eval_count:0,quality_count:0,passed_count:0,execution_error_count:0,score_sum:0,tests:[]},ie=Fo(k);q.eval_count+=k.eval_count,q.quality_count+=ie,q.passed_count+=k.passed_count,q.execution_error_count+=Xt(k),q.score_sum+=k.avg_score*ie;for(const ee of k.tests)q.tests.push(ee);M.set(F,q)}const L=[...M.values()].map(k=>{const F=new Map;for(const q of k.tests)F.set(q.test_id,q);return{experiment:k.experiment,target:k.target,eval_count:k.eval_count,quality_count:k.quality_count,passed_count:k.passed_count,execution_error_count:k.execution_error_count,pass_rate:k.quality_count>0?k.passed_count/k.quality_count:0,avg_score:k.quality_count>0?k.score_sum/k.quality_count:0,tests:[...F.values()].slice(-100)}});return{...e,experiments:[...R].sort(),targets:[...D].sort(),cells:L,runs:C}},[e,f]),x=E=>{h(C=>C.includes(E)?C.filter(M=>M!==E):[...C,E])},b=()=>h([]),w=((A=g==null?void 0:g.runs)==null?void 0:A.length)??0,N=e&&e.cells.length>0,O=f.length>0&&g&&(((T=g.runs)==null?void 0:T.length)??0)===0;return d.jsxs("div",{className:"space-y-4",children:[d.jsx(Jne,{mode:o,onModeChange:c,runsCount:w}),t&&d.jsx(mae,{}),!t&&r&&n&&d.jsx(fae,{message:`Failed to load comparison data: ${n.message}`}),!t&&!r&&!N&&d.jsx(hae,{}),!t&&!r&&N&&d.jsxs(d.Fragment,{children:[p.length>0&&d.jsx(Zne,{allTags:p,tagCounts:y,selected:f,onToggle:x,onClear:b}),O?d.jsx(kp,{headline:`No runs match ${f.map(E=>`\`${E}\``).join(" + ")}`,body:"Clear the filter or pick a different tag combination.",action:{label:"Clear filter",onClick:b}}):g&&d.jsxs(d.Fragment,{children:[o==="aggregated"&&d.jsx(tae,{data:g,projectId:i}),o==="per-run"&&d.jsx(sae,{data:g,projectId:i,readOnly:l??!1})]})]})]})}function Zne({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 Jne({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(eae,{mode:e,onChange:t,runsCount:r})]})}function eae({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(BP,{active:e==="aggregated",onClick:()=>t("aggregated"),children:"Aggregated"}),d.jsxs(BP,{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 BP({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 tae({data:e,projectId:t}){const{experiments:r,targets:n,cells:i}=e,l=S.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(kp,{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(dae,{}),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(rae,{target:o,experiments:r,cellMap:l},o))})]})}),d.jsx(Fne,{data:e,projectId:t})]})}function rae({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(nae,{cell:i}):d.jsx(aae,{})},n)})]})}function nae({cell:e}){const[t,r]=S.useState(!1),n=Math.round(e.avg_score*100),i=Fo(e),l=Xt(e);return d.jsxs("div",{className:"space-y-2",children:[d.jsxs("button",{type:"button",className:"group flex w-full flex-col gap-1 rounded-md border border-gray-800 bg-gray-900/40 px-3 py-2 text-left transition-colors hover:border-gray-700 hover:bg-gray-900/70",onClick:()=>r(o=>!o),"aria-expanded":t,children:[d.jsx($n,{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(iae,{tests:e.tests})]})}function aae(){return d.jsx("div",{className:"text-center text-gray-600",children:"—"})}function iae({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 sae({data:e,projectId:t,readOnly:r}){const n=e.runs??[],[i,l]=S.useState(new Set),[o,c]=S.useState(!1),[f,h]=S.useState(null),p=x=>{l(b=>{const w=new Set(b);return w.has(x)?w.delete(x):w.add(x),w})},y=()=>l(new Set),g=S.useMemo(()=>n.filter(x=>i.has(x.run_id)),[n,i]);return n.length===0?d.jsx(kp,{headline:"No runs yet",body:"Run an evaluation to populate the per-run view."}):o&&g.length>=2?d.jsx(uae,{runs:g,onBack:()=>c(!1)}):d.jsxs("div",{className:"space-y-3",children:[d.jsx("div",{className:"flex items-center justify-between text-sm text-gray-400",children:d.jsxs("span",{children:[d.jsx("span",{className:"font-medium text-gray-300",children:n.length})," run",n.length===1?"":"s"," — select two or more to compare side-by-side"]})}),d.jsx("div",{className:"overflow-x-auto rounded-lg border border-gray-800",children:d.jsxs("table",{className:"w-full text-left text-sm",children:[d.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:d.jsxs("tr",{children:[d.jsx("th",{className:"w-10 px-3 py-3","aria-label":"Select"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Timestamp"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Tags"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Experiment"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Target"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Tests"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Pass Rate"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Avg"})]})}),d.jsx("tbody",{className:"divide-y divide-gray-800/50",children:n.map(x=>d.jsx(lae,{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 lae({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=Fo(e),p=Xt(e),y=!c,g=S.useRef(null),x=e.tags??[],b=e.metadata_dirty===!0,w=x[0]??e.run_id,N=pae(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":b?"rounded-md border border-yellow-900/60 bg-yellow-950/20 px-2 py-0.5 text-xs text-yellow-300 transition-colors hover:border-yellow-700":"rounded-md border border-dashed border-gray-700 px-2 py-0.5 text-xs text-gray-500 transition-colors hover:border-cyan-800 hover:text-cyan-400",A=S.useRef(n);return S.useEffect(()=>{var T;A.current&&!n&&((T=g.current)==null||T.focus()),A.current=n},[n]),d.jsxs(d.Fragment,{children:[d.jsxs("tr",{className:`transition-colors ${t?"bg-cyan-950/20 hover:bg-cyan-950/30":"hover:bg-gray-900/30"}`,children:[d.jsx("td",{className:"px-3 py-3 align-middle",children:d.jsx("input",{type:"checkbox",className:"h-4 w-4 cursor-pointer rounded border-gray-700 bg-gray-900 text-cyan-500 accent-cyan-500 focus:ring-cyan-500",checked:t,onChange:r,"aria-label":`Select run ${w}`})}),d.jsxs("td",{className:"px-4 py-3 align-middle",title:e.run_id,children:[d.jsx("div",{className:"font-medium text-gray-200 tabular-nums",children:n5(e.started_at)}),N&&d.jsx("div",{className:"text-xs text-gray-500",children:N})]}),d.jsx("td",{className:"px-4 py-3 align-middle",children:y?d.jsx("button",{ref:g,type:"button",onClick:T=>{T.stopPropagation(),i()},className:O,"aria-label":x.length>0?"Edit tags":"Add tags",children:x.length>0?d.jsx(UP,{tags:x,dirty:b}):b?d.jsx(d.Fragment,{children:"Pending clear"}):d.jsx(d.Fragment,{children:"+ tags"})}):x.length>0?d.jsx(UP,{tags:x,dirty:b}):d.jsx("span",{className:b?"text-yellow-400":"text-gray-600",children:b?"Pending clear":"—"})}),d.jsx("td",{className:"px-4 py-3 align-middle text-gray-300",children:e.experiment}),d.jsx("td",{className:"px-4 py-3 align-middle text-gray-300",children:e.target}),d.jsxs("td",{className:"px-4 py-3 align-middle text-right tabular-nums text-gray-400",children:[d.jsx("div",{children: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($n,{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(oae,{runId:e.run_id,currentTags:x,tagRevision:e.tag_revision,source:e.source,projectId:o,onClose:l})})})]})}function UP({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 oae({runId:e,currentTags:t,tagRevision:r,source:n,projectId:i,onClose:l}){const[o,c]=S.useState(t),[f,h]=S.useState(""),[p,y]=S.useState(null),g=ha(),x=S.useRef(null);S.useEffect(()=>{var E;(E=x.current)==null||E.focus()},[]);const b=Nx({mutationFn:()=>$B(e,o,i,r),onSuccess:()=>{g.invalidateQueries({queryKey:["compare"]}),g.invalidateQueries({queryKey:["runs"]}),g.invalidateQueries({queryKey:["remote-status",i??""]}),i&&(g.invalidateQueries({queryKey:["projects",i,"compare"]}),g.invalidateQueries({queryKey:["projects",i,"runs"]})),l()},onError:E=>y(E.message)}),w=Nx({mutationFn:()=>zB(e,i,r),onSuccess:()=>{g.invalidateQueries({queryKey:["compare"]}),g.invalidateQueries({queryKey:["runs"]}),g.invalidateQueries({queryKey:["remote-status",i??""]}),i&&(g.invalidateQueries({queryKey:["projects",i,"compare"]}),g.invalidateQueries({queryKey:["projects",i,"runs"]})),l()},onError:E=>y(E.message)}),N=b.isPending||w.isPending,O=o.length!==t.length||o.some((E,C)=>E!==t[C]),A=()=>{const E=f.trim();if(E!==""){if(o.includes(E)){h("");return}c([...o,E]),h(""),y(null)}},T=E=>{c(o.filter(C=>C!==E))};return d.jsxs("div",{className:"space-y-2 rounded-md border border-gray-800 bg-gray-900/60 p-3",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-xs font-medium uppercase tracking-wider text-gray-400",children:"Tag run"}),d.jsx("span",{className:"text-xs text-gray-500",children:"Multi-valued. Enter or comma adds; Backspace removes the last chip."})]}),n==="remote"?d.jsx("div",{className:"rounded-md border border-yellow-900/60 bg-yellow-950/20 px-3 py-2 text-xs text-yellow-300",children:"Remote tag edits are saved as local metadata. Use Sync Metadata to push them to the results repo."}):null,d.jsxs("div",{className:"flex flex-wrap items-center gap-2 rounded-md border border-gray-700 bg-gray-950 px-2 py-1.5 focus-within:border-cyan-500 focus-within:ring-1 focus-within:ring-cyan-500",children:[o.map(E=>d.jsxs("span",{className:"inline-flex items-center gap-1 rounded-md border border-cyan-900/60 bg-cyan-950/30 px-2 py-0.5 text-xs font-medium text-cyan-300",children:[E,d.jsx("button",{type:"button",onClick:()=>T(E),disabled:N,className:"text-cyan-500 transition-colors hover:text-cyan-200 disabled:opacity-50","aria-label":`Remove tag ${E}`,children:"×"})]},E)),d.jsx("input",{ref:x,type:"text",className:"flex-1 min-w-[140px] bg-transparent text-sm text-gray-100 placeholder:text-gray-600 focus:outline-none disabled:opacity-50",placeholder:o.length===0?"e.g. baseline, v2-prompt, slow":"Add tag…",value:f,onChange:E=>{y(null),h(E.target.value)},maxLength:60,disabled:N,onKeyDown:E=>{E.key==="Enter"||E.key===","?(E.preventDefault(),A()):E.key==="Backspace"&&f===""&&o.length>0?(E.preventDefault(),c(o.slice(0,-1))):E.key==="Escape"&&l()},onBlur:A})]}),d.jsxs("div",{className:"flex items-center justify-end gap-2",children:[d.jsx("button",{type:"button",onClick:l,disabled:N,className:"rounded-md px-3 py-1.5 text-sm text-gray-400 transition-colors hover:text-gray-200 disabled:opacity-50",children:"Cancel"}),t.length>0&&d.jsx("button",{type:"button",onClick:()=>{N||w.mutate()},disabled:N,className:"rounded-md border border-red-900/60 px-3 py-1.5 text-sm text-red-400 transition-colors hover:border-red-800 hover:bg-red-950/30 hover:text-red-300 disabled:opacity-50",children:"Clear all"}),d.jsx("button",{type:"button",disabled:!O||N,onClick:()=>{N||!O||b.mutate()},className:"rounded-md bg-cyan-500 px-3 py-1.5 text-sm font-medium text-gray-950 transition-colors hover:bg-cyan-400 disabled:cursor-not-allowed disabled:bg-gray-700 disabled:text-gray-500",children:b.isPending?"Saving…":"Save"})]}),p&&d.jsx("div",{className:"rounded-md border border-red-900/60 bg-red-950/30 px-3 py-1.5 text-xs text-red-400",children:p})]})}function uae({runs:e,onBack:t}){const r=S.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=S.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(cae,{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($n,{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 cae({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:n5(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 dae(){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 fae({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 hae(){return d.jsx(kp,{headline:"No comparison data yet",body:"Run evaluations with different experiment and target combinations to populate this view."})}function kp({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 mae(){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 n5(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 pae(e){const t=e.split("::");return t.length<2?null:t.slice(0,-1).join(" · ")}function a5({projectId:e}){const{data:t,isLoading:r}=e?He(Qb(e)):gM();if(r)return d.jsx(yae,{});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=Fo(i),o=Xt(i);return d.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[d.jsx("td",{className:"px-4 py-3",children:e?d.jsx(_e,{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(_e,{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($n,{rate:i.pass_rate})}),d.jsx("td",{className:"px-4 py-3 text-gray-400",title:qP(i.last_run).full,children:qP(i.last_run).date})]},i.name)})})]})})}function qP(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 yae(){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 gae(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 vae({project:e,canRemove:t=!1,onRemove:r}){const n=Math.round(e.pass_rate*100),i=Xt(e),[l,o]=S.useState(!1),[c,f]=S.useState(!1),[h,p]=S.useState(!1),[y,g]=S.useState(null),x=S.useId(),b=S.useId(),w=S.useRef(null),N=S.useRef(null),O=S.useRef(null);S.useEffect(()=>{if(!l)return;function C(R){var L,k;const D=R.target;(L=w.current)!=null&&L.contains(D)||(k=N.current)!=null&&k.contains(D)||o(!1)}function M(R){var D;R.key==="Escape"&&(o(!1),(D=w.current)==null||D.focus())}return document.addEventListener("pointerdown",C),document.addEventListener("keydown",M),()=>{document.removeEventListener("pointerdown",C),document.removeEventListener("keydown",M)}},[l]),S.useEffect(()=>{var C;c&&((C=O.current)==null||C.focus())},[c]);function A(){o(!1),g(null),f(!0)}async function T(){if(!(!r||h)){p(!0),g(null);try{await r(e)}catch(C){g(C.message),p(!1)}}}function E(){var C;h||(f(!1),g(null),(C=w.current)==null||C.focus())}return d.jsxs("article",{className:"group relative rounded-lg border border-gray-800 bg-gray-900/50 transition-colors hover:border-cyan-800 hover:bg-gray-900",children:[d.jsxs(_e,{to:"/projects/$projectId",params:{projectId:e.id},className:"block p-5 focus:outline-none focus:ring-1 focus:ring-inset focus:ring-cyan-500",children:[d.jsx("div",{className:"flex items-start justify-between",children:d.jsxs("div",{className:"min-w-0 flex-1 pr-10",children:[d.jsx("h3",{className:"truncate text-lg font-semibold text-white group-hover:text-cyan-400",children:e.name}),d.jsx("p",{className:"mt-1 truncate text-xs text-gray-500",children:e.path})]})}),d.jsxs("div",{className:"mt-4 grid grid-cols-4 gap-3",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-xs text-gray-500",children:"Runs"}),d.jsx("p",{className:"text-lg font-semibold text-white",children:e.run_count})]}),d.jsxs("div",{children:[d.jsx("p",{className:"text-xs text-gray-500",children:"Pass Rate"}),d.jsx("p",{className:`text-lg font-semibold ${e.run_count===0?"text-gray-500":n>=80?"text-emerald-400":n>=50?"text-yellow-400":"text-red-400"}`,children:e.run_count>0?`${n}%`:"--"})]}),d.jsxs("div",{children:[d.jsx("p",{className:"text-xs text-gray-500",children:"Errors"}),d.jsx("p",{className:`text-lg font-semibold ${i>0?"text-amber-300":"text-gray-500"}`,children:i})]}),d.jsxs("div",{children:[d.jsx("p",{className:"text-xs text-gray-500",children:"Last Run"}),d.jsx("p",{className:"text-sm text-gray-300",children:gae(e.last_run)})]})]})]}),t&&r?d.jsxs("div",{className:"absolute right-3 top-3 z-10",children:[d.jsx("button",{ref:w,type:"button","aria-haspopup":"menu","aria-expanded":l,"aria-controls":l?x:void 0,"aria-label":`Open ${e.name} project menu`,onClick:()=>o(C=>!C),className:"flex h-8 w-8 items-center justify-center rounded-md text-lg leading-none text-gray-500 transition-colors hover:bg-gray-800 hover:text-gray-200 focus:outline-none focus:ring-1 focus:ring-cyan-500",children:d.jsx("span",{"aria-hidden":"true",children:"..."})}),l?d.jsx("div",{ref:N,id:x,role:"menu","aria-label":`${e.name} actions`,className:"absolute right-0 top-10 w-44 overflow-hidden rounded-md border border-gray-800 bg-gray-950 py-1 shadow-xl",children:d.jsx("button",{type:"button",role:"menuitem",onClick:A,className:"block w-full px-3 py-2 text-left text-sm text-red-400 transition-colors hover:bg-red-950/30 hover:text-red-300 focus:bg-red-950/30 focus:outline-none",children:"Remove project"})}):null]}):null,c?d.jsx("dialog",{ref:O,open:!0,"aria-modal":"true","aria-labelledby":b,tabIndex:-1,onKeyDown:C=>{C.key==="Escape"&&(C.preventDefault(),E())},className:"fixed inset-0 z-50 flex h-full max-h-none w-full max-w-none items-center justify-center bg-black/70 p-4 text-left text-gray-100 backdrop:bg-black/70",children:d.jsxs("div",{className:"w-full max-w-md overflow-hidden rounded-lg border border-gray-800 bg-gray-950 shadow-xl",children:[d.jsx("div",{className:"border-b border-gray-800 px-4 py-3",children:d.jsx("h2",{id:b,className:"text-lg font-semibold text-white",children:"Remove project?"})}),d.jsxs("div",{className:"space-y-3 p-4",children:[d.jsxs("p",{className:"text-sm text-gray-300",children:["Remove ",d.jsx("span",{className:"font-medium text-white",children:e.name})," from this Dashboard registry."]}),d.jsxs("p",{className:"text-sm text-gray-500",children:["The project folder and files stay on disk at ",e.path,"."]}),y?d.jsx("div",{role:"alert",className:"rounded-lg border border-red-900/60 bg-red-950/30 p-3 text-sm text-red-400",children:y}):null]}),d.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-gray-800 bg-gray-900/50 px-4 py-3",children:[d.jsx("button",{type:"button",onClick:E,disabled:h,className:"rounded-md px-3 py-1.5 text-sm text-gray-400 transition-colors hover:text-gray-200 disabled:cursor-not-allowed disabled:opacity-50",children:"Cancel"}),d.jsx("button",{type:"button",onClick:()=>void T(),disabled:h,className:"rounded-md border border-red-900/60 px-3 py-1.5 text-sm font-medium text-red-400 transition-colors hover:border-red-800 hover:bg-red-950/30 hover:text-red-300 disabled:cursor-not-allowed disabled:opacity-50",children:h?"Removing...":"Remove project"})]})]})}):null]})}function xae(e){return e.map(t=>({path:t.path,relativePath:t.relative_path,category:t.category}))}function bae(e){return(e.split(",").at(-1)??"").trim()}function jae(e,t){const r=bae(t).toLowerCase();return r?e.filter(n=>n.relativePath.toLowerCase().includes(r)||n.category.toLowerCase().includes(r)):e}function wae(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 Sae(e,t,r){return t?e:Uw(e,r)}function Uw(e,t){return e||String(t??$c)}function Nae({suiteFilter:e,testIds:t,target:r,experiment:n,tags:i,thresholdInput:l,studioThreshold:o,workers:c,dryRun:f}){const h={};e.trim()&&(h.suite_filter=e.trim()),t.length>0&&(h.test_ids=t),r&&(h.target=r),n.trim()&&(h.experiment=n.trim()),i.length>0&&(h.tags=i);const p=Uw(l,o);return p&&(h.threshold=Number.parseFloat(p)),c&&(h.workers=Number.parseInt(c,10)),f&&(h.dry_run=!0),h}const ex="default";function wl({open:e,onClose:t,projectId:r,prefill:n}){const i=ha(),l=ml(),[o,c]=S.useState((n==null?void 0:n.suiteFilter)??""),[f,h]=S.useState(""),[p,y]=S.useState((n==null?void 0:n.testIds)??[]),[g,x]=S.useState((n==null?void 0:n.target)??""),[b,w]=S.useState(ex),[N,O]=S.useState(""),[A,T]=S.useState([]),[E,C]=S.useState(""),[M,R]=S.useState(!1),[D,L]=S.useState(""),[k,F]=S.useState(!1),[q,ie]=S.useState(!1),[ee,ne]=S.useState(null),[z,H]=S.useState(null),[Z,ae]=S.useState(!1),[le,I]=S.useState(null),{data:Q}=qB(r),{data:oe}=HB(r),{data:se}=Xb(ee,r),{data:fe}=yt(r),xe=S.useMemo(()=>xae((Q==null?void 0:Q.eval_files)??[]),[Q]),Se=S.useMemo(()=>jae(xe,o),[xe,o]),Re=S.useMemo(()=>(oe==null?void 0:oe.targets)??[],[oe]),ce=S.useMemo(()=>Uw(E,fe==null?void 0:fe.threshold),[fe==null?void 0:fe.threshold,E]),de=S.useMemo(()=>Sae(E,M,fe==null?void 0:fe.threshold),[fe==null?void 0:fe.threshold,E,M]);S.useEffect(()=>{e&&(c((n==null?void 0:n.suiteFilter)??""),y((n==null?void 0:n.testIds)??[]),x((n==null?void 0:n.target)??""),w(ex),O(""),T([]),h(""),C(""),R(!1),L(""),F(!1),ie(!1),ne(null),H(null),ae(!1),I(null))},[e,n]),S.useEffect(()=>{((se==null?void 0:se.status)==="finished"||(se==null?void 0:se.status)==="failed")&&(i.invalidateQueries({queryKey:["runs"]}),i.invalidateQueries({queryKey:["projects"]}))},[se==null?void 0:se.status,i]);const Oe=S.useCallback(()=>{const he=HP(A,FP(N));return Nae({suiteFilter:o,testIds:p,target:g,experiment:b,tags:he,thresholdInput:E,studioThreshold:fe==null?void 0:fe.threshold,workers:D,dryRun:k})},[k,b,fe==null?void 0:fe.threshold,o,N,A,g,p,E,D]);S.useEffect(()=>{const he=Oe();if(!he.suite_filter&&(!he.test_ids||he.test_ids.length===0)){I(null);return}VB(he,r).then(_t=>I(_t.command)).catch(()=>I(null))},[Oe,r]);function ue(){const he=f.trim();he&&!p.includes(he)&&y([...p,he]),h("")}function gt(he){y(p.filter(_t=>_t!==he))}function Pe(){const he=FP(N);he.length>0&&T(HP(A,he)),O("")}function vt(he){T(A.filter(_t=>_t!==he))}async function xt(){H(null),ae(!0);try{const he=Oe(),_t=await SM(he,r);ne(_t.id)}catch(he){H(he.message)}finally{ae(!1)}}if(!e)return null;if(ee&&se){let he=function(){t(),l({to:XB(r)})};return d.jsx(KP,{onClose:t,title:"Eval Run",children:d.jsx(Oae,{status:se,onClose:t,onRunInBackground:he,runId:ee})})}const Ht=!!(o.trim()||p.length>0);return d.jsx(KP,{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:he=>c(he.target.value),placeholder:"evals/**/*.eval.yaml",className:"w-full rounded-md border border-gray-700 bg-gray-800 px-3 py-2 text-sm text-white placeholder-gray-500 focus:border-cyan-600 focus:outline-none"}),xe.length>0&&d.jsx("div",{className:"mt-1.5 max-h-44 overflow-y-auto rounded-md border border-gray-800 bg-gray-950/60 p-1",children:Se.length>0?Se.map(he=>d.jsxs("button",{type:"button",onClick:()=>c(_t=>wae(_t,he.relativePath)),className:"block w-full rounded px-2 py-1 text-left text-xs text-gray-400 hover:bg-gray-800 hover:text-gray-200",children:[d.jsx("span",{className:"block truncate",children:he.relativePath}),he.category&&d.jsx("span",{className:"block truncate text-[11px] text-gray-600",children:he.category})]},he.relativePath)):d.jsx("div",{className:"px-2 py-1 text-xs text-gray-500",children:"No matching eval files"})})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"test-id-input",className:"mb-1 block text-sm font-medium text-gray-300",children:"Test ID Filter"}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx("input",{id:"test-id-input",type:"text",value:f,onChange:he=>h(he.target.value),onKeyDown:he=>{he.key==="Enter"&&(he.preventDefault(),ue())},placeholder:"auth-*, retrieval-basic",className:"flex-1 rounded-md border border-gray-700 bg-gray-800 px-3 py-2 text-sm text-white placeholder-gray-500 focus:border-cyan-600 focus:outline-none"}),d.jsx("button",{type:"button",onClick:ue,disabled:!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(he=>d.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-cyan-900/40 px-2.5 py-0.5 text-xs text-cyan-300",children:[he,d.jsx("button",{type:"button",onClick:()=>gt(he),className:"text-cyan-400 hover:text-white",children:"×"})]},he))})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"target-override",className:"mb-1 block text-sm font-medium text-gray-300",children:"Target Override"}),d.jsxs("select",{id:"target-override",value:g,onChange:he=>x(he.target.value),className:"w-full rounded-md border border-gray-700 bg-gray-800 px-3 py-2 text-sm text-white focus:border-cyan-600 focus:outline-none",children:[d.jsx("option",{value:"",children:"Use eval's configured target"}),Re.map(he=>d.jsx("option",{value:he,children:he},he))]})]}),d.jsxs("div",{className:"rounded-md border border-gray-800 bg-gray-950/40 p-3",children:[d.jsxs("div",{className:"grid gap-3 sm:grid-cols-[minmax(0,0.8fr)_minmax(0,1.2fr)]",children:[d.jsxs("div",{children:[d.jsx("label",{htmlFor:"experiment-input",className:"mb-1 block text-xs font-medium text-gray-400",children:"Experiment"}),d.jsx("input",{id:"experiment-input",type:"text",value:b,onChange:he=>w(he.target.value),placeholder:ex,className:"w-full rounded-md border border-gray-700 bg-gray-800 px-3 py-1.5 text-sm text-white placeholder-gray-500 focus:border-cyan-600 focus:outline-none"})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"tags-input",className:"mb-1 block text-xs font-medium text-gray-400",children:"Tags"}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx("input",{id:"tags-input",type:"text",value:N,onChange:he=>O(he.target.value),onKeyDown:he=>{(he.key==="Enter"||he.key===",")&&(he.preventDefault(),Pe())},onBlur:Pe,placeholder:"baseline, prompt-v2",className:"min-w-0 flex-1 rounded-md border border-gray-700 bg-gray-800 px-3 py-1.5 text-sm text-white placeholder-gray-500 focus:border-cyan-600 focus:outline-none"}),d.jsx("button",{type:"button",onClick:Pe,disabled:!N.trim(),className:"rounded-md bg-gray-700 px-3 py-1.5 text-sm text-white hover:bg-gray-600 disabled:opacity-50",children:"Add"})]})]})]}),A.length>0&&d.jsx("div",{className:"mt-2 flex flex-wrap gap-1",children:A.map(he=>d.jsxs("span",{className:"inline-flex items-center gap-1 rounded-md border border-cyan-900/60 bg-cyan-950/30 px-2 py-0.5 text-xs font-medium text-cyan-300",children:[he,d.jsx("button",{type:"button",onClick:()=>vt(he),className:"text-cyan-400 hover:text-white","aria-label":`Remove tag ${he}`,children:"×"})]},he))}),d.jsx("p",{className:"mt-2 text-xs text-gray-500",children:"Saved with the new run only; existing runs stay unchanged."})]}),d.jsxs("div",{children:[d.jsxs("button",{type:"button",onClick:()=>ie(!q),className:"text-sm text-gray-400 hover:text-gray-200",children:[q?"▾":"▸"," Advanced Options"]}),q&&d.jsxs("div",{className:"mt-2 grid grid-cols-2 gap-3",children:[d.jsxs("div",{children:[d.jsx("label",{htmlFor:"threshold-input",className:"mb-1 block text-xs text-gray-400",children:"Threshold (0–1)"}),d.jsx("input",{id:"threshold-input",type:"number",value:de,onChange:he=>{R(!0),C(he.target.value)},min:"0",max:"1",step:"0.1",placeholder:ce,className:"w-full rounded-md border border-gray-700 bg-gray-800 px-3 py-1.5 text-sm text-white placeholder-gray-500 focus:border-cyan-600 focus:outline-none"})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"workers-input",className:"mb-1 block text-xs text-gray-400",children:"Workers"}),d.jsx("input",{id:"workers-input",type:"number",value:D,onChange:he=>L(he.target.value),min:"1",max:"50",placeholder:"3",className:"w-full rounded-md border border-gray-700 bg-gray-800 px-3 py-1.5 text-sm text-white placeholder-gray-500 focus:border-cyan-600 focus:outline-none"})]}),d.jsx("div",{className:"col-span-2",children:d.jsxs("label",{className:"flex items-center gap-2 text-sm text-gray-400",children:[d.jsx("input",{type:"checkbox",checked:k,onChange:he=>F(he.target.checked),className:"rounded border-gray-600 bg-gray-800"}),"Dry run (mock provider responses)"]})})]})]}),le&&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:le})]}),z&&d.jsx("div",{className:"rounded-md border border-red-900/50 bg-red-950/20 p-2 text-sm text-red-400",children:z}),d.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[d.jsx("button",{type:"button",onClick:t,className:"rounded-md bg-gray-700 px-4 py-2 text-sm text-white hover:bg-gray-600",children:"Cancel"}),d.jsx("button",{type:"button",onClick:xt,disabled:!Ht||Z,className:"rounded-md bg-cyan-600 px-4 py-2 text-sm font-medium text-white hover:bg-cyan-500 disabled:opacity-50",children:Z?"Launching…":"Run Now"})]})]})})}function FP(e){return e.split(",").map(t=>t.trim()).filter(t=>t.length>0)}function HP(e,t){const r=new Set(e),n=[...e];for(const i of t)r.has(i)||(r.add(i),n.push(i));return n}function KP({children:e,onClose:t,title:r}){return d.jsx("div",{className:"fixed inset-0 z-50 flex items-start justify-center bg-black/60 pt-[10vh]",children:d.jsxs("div",{className:"max-h-[80vh] w-full max-w-lg overflow-y-auto rounded-lg border border-gray-700 bg-gray-900 shadow-xl",children:[d.jsxs("div",{className:"flex items-center justify-between border-b border-gray-800 px-5 py-3",children:[d.jsx("h2",{className:"text-lg font-semibold text-white",children:r}),d.jsx("button",{type:"button",onClick:t,className:"text-gray-400 hover:text-white",children:"✕"})]}),d.jsx("div",{className:"px-5 py-4",children:e})]})})}function Oae({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 tx(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 _ae(e){return`${e} local run${e===1?"":"s"} selected`}function Eae(e,t){return`Combined ${e} local run${e===1?"":"s"} into ${t}.`}function Aae(e){return`Deleted ${e} local run${e===1?"":"s"}.`}function Cae(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 Tae(e,t){const r=Cae(e.timestamp),n=e.status==="starting"||e.status==="running",i=ej(e,{includePassRate:!1}),l=i.label,o=Xt(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 Ip({runs:e,projectId:t,emptyMessage:r,hasNextPage:n=!1,isFetchingNextPage:i=!1,onLoadMore:l,enableCombine:o=!1,remoteBranch:c}){const{data:f}=yt(t),h=ha(),p=(f==null?void 0:f.threshold)??$c,y=S.useRef(null),g=S.useRef(null),x=S.useRef(!1),[b,w]=S.useState([]),[N,O]=S.useState(null),[A,T]=S.useState(!1),[E,C]=S.useState(!1),M=S.useMemo(()=>e.map(z=>Tae(z,p)),[p,e]),R=S.useMemo(()=>e.filter(z=>o&&!tx(z)).map(z=>z.filename),[o,e]),D=new Set(b),L=S.useMemo(()=>new Map(e.map(z=>[z.filename,z])),[e]);S.useEffect(()=>{i||(x.current=!1)},[i]),S.useEffect(()=>{if(!n||!l)return;const z=[];if(y.current&&z.push(y.current),g.current&&z.push(g.current),z.length===0)return;const H=new IntersectionObserver(Z=>{Z.some(ae=>ae.isIntersecting)&&!i&&!x.current&&(x.current=!0,l())},{rootMargin:"200px 0px"});for(const Z of z)H.observe(Z);return()=>H.disconnect()},[n,i,l]),S.useEffect(()=>{const z=new Set(R);w(H=>H.filter(Z=>z.has(Z)))},[R]);async function k(){if(t){await Promise.all([h.invalidateQueries({queryKey:["projects",t,"runs"]}),h.invalidateQueries({queryKey:["projects",t,"experiments"]}),h.invalidateQueries({queryKey:["projects",t,"compare"]}),h.invalidateQueries({queryKey:["projects",t,"targets"]})]);return}await Promise.all([h.invalidateQueries({queryKey:["runs"]}),h.invalidateQueries({queryKey:["experiments"]}),h.invalidateQueries({queryKey:["compare"]}),h.invalidateQueries({queryKey:["targets"]})])}async function F(){if(b.length<2||A)return;const z=[...b],H=[...new Set(z.map(ae=>{var le,I;return((I=(le=L.get(ae))==null?void 0:le.experiment)==null?void 0:I.trim())||"default"}).filter(Boolean))].sort();let Z;if(H.length>1){const ae=window.prompt(`Selected runs span experiments (${H.join(", ")}). Enter a new experiment name for the combined run:`);if(ae===null)return;if(Z=ae.trim(),!Z){O({kind:"error",message:"Experiment name is required to combine runs from multiple experiments."});return}}O(null),T(!0);try{let ae;try{ae=await L_(z,"error",t,void 0,Z)}catch(le){if(!(le instanceof wM)||le.status!==409)throw le;const I=le.duplicates.length;if(!window.confirm(`${I} duplicate (test_id, target) pair${I===1?"":"s"} found. Replace duplicates with the latest timestamp?`))return;ae=await L_(z,"latest",t,void 0,Z)}w([]),O({kind:"success",message:Eae(z.length,ae.display_name),combinedRunId:ae.run_id,sourceRunIds:z}),await k()}catch(ae){O({kind:"error",message:ae.message})}finally{T(!1)}}async function q(){b.length===0||E||await ee(b,"selected")}async function ie(){const z=(N==null?void 0:N.sourceRunIds)??[];z.length===0||E||await ee(z,"combined-sources")}async function ee(z,H){const Z=z.length,ae=Z===1?"run":"runs",le=H==="combined-sources"?`Delete the ${Z} source local ${ae} used for the combined run? The combined run will remain.`:`Delete ${Z} local ${ae}? This removes the run workspace and artifacts from disk.`;if(window.confirm(le)){O(null),C(!0);try{for(const Q of z)await LB(Q,t);w([]),O({kind:"success",message:Aae(Z)}),await k()}catch(Q){O({kind:"error",message:Q.message})}finally{C(!1)}}}function ne(z){w(H=>H.includes(z)?H.filter(Z=>Z!==z):[...H,z])}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:_ae(b.length)}),d.jsx("p",{className:"text-xs text-gray-500",children:"Select completed local runs to combine or delete. Remote runs stay read-only here."}),N&&d.jsx("div",{className:`mt-2 rounded-md border px-3 py-2 text-sm ${N.kind==="success"?"border-emerald-900/60 bg-emerald-950/20 text-emerald-300":"border-red-900/60 bg-red-950/20 text-red-300"}`,role:N.kind==="error"?"alert":"status",children:d.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:[d.jsx("span",{children:N.message}),N.combinedRunId?t?d.jsx(_e,{to:"/projects/$projectId/runs/$runId",params:{projectId:t,runId:N.combinedRunId},className:"font-medium text-cyan-300 hover:text-cyan-200 hover:underline",children:"Open combined run"}):d.jsx(_e,{to:"/runs/$runId",params:{runId:N.combinedRunId},className:"font-medium text-cyan-300 hover:text-cyan-200 hover:underline",children:"Open combined run"}):null,N.sourceRunIds&&N.sourceRunIds.length>0?d.jsx("button",{type:"button",onClick:()=>void ie(),disabled:E||A,className:"font-medium text-red-300 hover:text-red-200 hover:underline disabled:cursor-not-allowed disabled:text-gray-500",children:E?"Deleting sources...":"Delete source runs"}):null]})})]}),d.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[d.jsx("button",{type:"button",onClick:()=>void q(),disabled:b.length===0||E||A,className:"whitespace-nowrap rounded-md border border-red-900/70 px-3 py-1.5 text-sm font-medium text-red-300 hover:border-red-700 hover:bg-red-950/40 disabled:cursor-not-allowed disabled:border-gray-800 disabled:text-gray-500",children:E?"Deleting...":"Delete selected"}),d.jsx("button",{type:"button",onClick:()=>void F(),disabled:b.length<2||A||E,className:"whitespace-nowrap rounded-md bg-cyan-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-cyan-500 disabled:cursor-not-allowed disabled:bg-gray-700 disabled:text-gray-400",children:A?"Combining...":"Combine selected"})]})]}),d.jsxs("div",{className:"space-y-2 sm:hidden",children:[M.map(z=>{const{run:H,ts:Z,label:ae,display:le,errors:I,qualityCount:Q,passedCount:oe,failedCount:se,metadataDirty:fe}=z,xe=tx(H),Se=!xe&&R.includes(H.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:D.has(H.filename),disabled:!Se,onChange:()=>ne(H.filename),title:xe,"aria-label":xe?`${ae}: ${xe}`:`Select ${ae}`,className:"mt-1 h-4 w-4 shrink-0 rounded border-gray-700 bg-gray-900 text-cyan-500 disabled:opacity-30"}),d.jsx(QP,{view:z,className:"mt-1 shrink-0"}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsx(GP,{projectId:t,runId:H.filename,label:le.primary,title:le.title,className:"block truncate text-sm font-medium text-cyan-400 hover:text-cyan-300 hover:underline"}),le.secondary?d.jsx("p",{className:"mt-0.5 truncate text-xs text-gray-500",title:le.title,children:le.secondary}):null,d.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[d.jsx(YP,{onRemote:H.on_remote===!0,branch:c}),fe?d.jsx(VP,{}):null,d.jsx("span",{className:"text-xs text-gray-500",title:Z.full,children:Z.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(go,{label:"Pass Rate",valueClassName:"text-gray-300",children:d.jsx($n,{rate:H.pass_rate})}),d.jsx(go,{label:"Total",valueClassName:"text-gray-300",children:Q}),d.jsx(go,{label:"Passed",valueClassName:"text-emerald-300",children:oe}),d.jsx(go,{label:"Failures",valueClassName:"text-red-400",children:se>0?se:d.jsx("span",{className:"text-gray-600",children:"0"})}),d.jsx(go,{label:"Errors",valueClassName:"text-amber-300",children:I>0?I:d.jsx("span",{className:"text-gray-600",children:"0"})}),d.jsx(go,{label:"Remote",valueClassName:"text-gray-400",children:H.on_remote===!0?"On remote":"Local only"})]})]},H.filename)}),(n||i)&&d.jsx("div",{ref:g,className:"rounded-lg border border-gray-800 bg-gray-900/40 px-4 py-3 text-center text-xs text-gray-500",children:i?"Loading more runs...":"Scroll to load more..."})]}),d.jsx("div",{className:"hidden max-w-full overflow-x-auto rounded-lg border border-gray-800 sm:block",children:d.jsxs("table",{className:"min-w-[780px] w-full whitespace-nowrap text-left text-sm",children:[d.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:d.jsxs("tr",{children:[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:"Remote"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Passed"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Failures"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Errors"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Total"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Pass Rate"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"When"})]})}),d.jsxs("tbody",{className:"divide-y divide-gray-800/50",children:[M.map(z=>{const{run:H,ts:Z,label:ae,display:le,errors:I,qualityCount:Q,passedCount:oe,failedCount:se,metadataDirty:fe}=z,xe=tx(H),Se=!xe&&R.includes(H.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:D.has(H.filename),disabled:!Se,onChange:()=>ne(H.filename),title:xe,"aria-label":xe?`${ae}: ${xe}`:`Select ${ae}`,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(QP,{view:z})}),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(GP,{projectId:t,runId:H.filename,label:le.primary,title:le.title,className:"block min-w-0 truncate font-medium text-cyan-400 hover:text-cyan-300 hover:underline"}),fe?d.jsx(VP,{}):null]}),le.secondary?d.jsx("div",{className:"mt-0.5 truncate text-xs text-gray-500",title:le.title,children:le.secondary}):null]})}),d.jsx("td",{className:"px-4 py-3",children:d.jsx(YP,{onRemote:H.on_remote===!0,branch:c})}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-emerald-300",children:oe}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-red-400",children:se>0?se:d.jsx("span",{className:"text-gray-600",children:"0"})}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums",children:I>0?d.jsx("span",{className:"text-amber-300",children:I}):d.jsx("span",{className:"text-gray-600",children:"0"})}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:Q}),d.jsx("td",{className:"px-4 py-3",children:d.jsx($n,{rate:H.pass_rate})}),d.jsx("td",{className:"px-4 py-3 text-gray-400",title:Z.full,children:Z.date})]},H.filename)}),(n||i)&&d.jsx("tr",{ref:y,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 GP({projectId:e,runId:t,label:r,title:n,className:i}){return e?d.jsx(_e,{to:"/projects/$projectId/runs/$runId",params:{projectId:e,runId:t},className:i,title:n,children:r}):d.jsx(_e,{to:"/runs/$runId",params:{runId:t},className:i,title:n,children:r})}function YP({onRemote:e,branch:t}){return e?d.jsxs("span",{className:"inline-flex items-center gap-1 rounded-md border border-cyan-900/60 bg-cyan-950/20 px-2 py-0.5 text-xs font-medium text-cyan-300",title:t?`On ${t}`:"On the remote results branch","aria-label":t?`On remote branch ${t}`:"On the remote results branch",children:[d.jsx(Pae,{}),"Synced"]}):d.jsxs("span",{className:"inline-flex items-center gap-1 rounded-md border border-gray-800 bg-gray-900/70 px-2 py-0.5 text-xs font-medium text-gray-500",title:"Local only — not pushed","aria-label":"Local only — not pushed",children:[d.jsx(Mae,{}),"Local only"]})}function Pae(){return d.jsxs("svg",{viewBox:"0 0 24 24",className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[d.jsx("path",{d:"M7 18a4 4 0 0 1-.5-7.97A5 5 0 0 1 16 9a3.5 3.5 0 0 1 1 6.86"}),d.jsx("path",{d:"m9 14 2 2 4-4"})]})}function Mae(){return d.jsx("svg",{viewBox:"0 0 24 24",className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:d.jsx("path",{d:"M7 18a4 4 0 0 1-.5-7.97A5 5 0 0 1 16 9a3.5 3.5 0 0 1 1 6.86"})})}function VP(){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 QP({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 go({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 i5({remoteStatus:e,syncInFlight:t,onSync:r,projectName:n,syncFeedback:i,onRemoteSummary:l}){var b,w;const o=(e==null?void 0:e.configured)===!0,c=eB(e,t),f=t===!0||!c.canSync,h={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"}[c.tone],p=(i==null?void 0:i.kind)==="success"?"border-emerald-900/60 bg-emerald-950/20 text-emerald-300":(i==null?void 0:i.kind)==="warning"?"border-yellow-900/60 bg-yellow-950/20 text-yellow-300":"border-red-900/60 bg-red-950/20 text-red-300",y=((b=e==null?void 0:e.dirty_paths)==null?void 0:b.length)??0,g=((w=e==null?void 0:e.conflicted_paths)==null?void 0:w.length)??0,x=Z8(e,n,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.jsxs("div",{className:"min-w-0",children:[d.jsx("p",{className:"text-sm font-medium text-gray-200",children:"Recent Runs"}),o&&l?d.jsx("p",{className:"mt-0.5 text-xs text-gray-500",children:l}):null]}),o?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 ${h}`,children:c.label}),r?d.jsx("button",{type:"button",onClick:r,disabled:f,title:c.canSync?void 0:c.nextAction,className:"rounded-md border border-cyan-800 bg-cyan-950/40 px-3 py-1.5 text-sm font-medium text-cyan-300 transition-colors hover:bg-cyan-900/50 disabled:cursor-not-allowed disabled:opacity-60",children:t?"Syncing...":c.actionLabel}):null]}):null]}),o?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:x.map(N=>d.jsx("span",{children:N},N))}),d.jsx("p",{className:c.tone==="danger"?"text-red-300":"text-gray-400",children:c.summary}),c.nextAction?d.jsx("p",{className:"text-xs text-gray-500",children:c.nextAction}):null,y>0||g>0?d.jsxs("div",{className:"flex flex-wrap gap-2 text-xs",children:[y>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:[y," dirty path",y===1?"":"s"]}):null,g>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:[g," conflicted path",g===1?"":"s"]}):null]}):null]}):d.jsxs("p",{className:"text-sm text-gray-500",children:["Remote results are not configured. Add"," ",d.jsx("code",{className:"rounded bg-gray-800 px-1 text-gray-400",children:"results"})," to"," ",d.jsx("code",{className:"rounded bg-gray-800 px-1 text-gray-400",children:".agentv/config.yaml"})," to enable."]}),i?d.jsx("div",{className:`rounded-md border px-3 py-2 text-sm ${p}`,role:i.kind==="error"?"alert":"status",children:i.message}):null,e!=null&&e.last_error?d.jsxs("div",{className:"rounded-md border border-red-900/60 bg-red-950/20 px-3 py-2 text-sm text-red-300",role:"alert",children:[d.jsx("p",{className:"font-medium",children:"Remote sync error"}),d.jsx("p",{children:e.last_error}),d.jsx("p",{className:"mt-1 text-xs text-red-200/80",children:Kb(e)})]}):null,e!=null&&e.git_diff_summary&&c.state!=="clean"?d.jsx("pre",{className:"max-h-32 overflow-auto whitespace-pre-wrap rounded-md border border-gray-800 bg-gray-950/60 px-3 py-2 text-xs text-gray-500",children:e.git_diff_summary}):null]})}const XP="remote::";function Rae(e){return e.startsWith(XP)?e.slice(XP.length):e}function Lp(e){const t=new Map;for(const r of e){const n=Rae(r.filename),i=t.get(n);if(!i){t.set(n,r);continue}const l=i.source==="remote"&&r.source==="local"?r:i;t.set(n,{...l,on_remote:i.on_remote===!0||r.on_remote===!0})}return[...t.values()]}function s5({projectId:e}={}){var y,g;const[t,r]=S.useState(null),n=He(e?kB(e):fB),i=He(e?Vb(e):Gb),l=((y=n.data)==null?void 0:y.targets)??[],o=((g=i.data)==null?void 0:g.runs)??[],c=n.error??i.error,f=n.isLoading||i.isLoading,h=S.useMemo(()=>l.find(x=>x.name===t)??null,[t,l]);S.useEffect(()=>{t&&!l.some(x=>x.name===t)&&r(null)},[t,l]);const p=S.useMemo(()=>{if(!h)return[];const x=new Map;for(const b of o){if((b.target??"default")!==h.name)continue;const N=b.experiment??"default",O=x.get(N)??[];O.push(b),x.set(N,O)}return[...x.entries()].map(([b,w])=>Dae(b,Lp(w))).sort((b,w)=>b.latestTimestamp&&w.latestTimestamp&&b.latestTimestamp!==w.latestTimestamp?w.latestTimestamp.localeCompare(b.latestTimestamp):b.latestTimestamp?-1:w.latestTimestamp?1:b.name.localeCompare(w.name))},[o,h]);return f?d.jsx(Lae,{}):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:" / "}),Fo(h)," evals passed",Xt(h)>0&&d.jsxs("span",{className:"ml-2 text-amber-400",children:["· ",Xt(h)," execution errors"]})]})]}),d.jsx("div",{className:"w-full max-w-52",children:d.jsx($n,{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:kae(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 ",Iae(x.latestTimestamp)]})]})]}),d.jsx("div",{className:"w-full max-w-52",children:d.jsx($n,{rate:x.passRate})})]}),d.jsx(Ip,{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 b=Fo(x),w=Xt(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($n,{rate:x.pass_rate})}),d.jsxs("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:[d.jsx("span",{className:"text-emerald-400",children:x.passed_count}),d.jsx("span",{className:"text-gray-600",children:" / "}),d.jsx("span",{children:b})]}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-amber-400",children:w>0?w:d.jsx("span",{className:"text-gray-600",children:"0"})})]},x.name)})})]})})}function Dae(e,t){let r=0,n=0,i=0,l=0,o=null;for(const c of t){const f=Xt(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 kae(e){return e==="default"?"Default experiment":e}function Iae(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 Lae(){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 WP=[{id:"runs",label:"🏃 Recent Runs"},{id:"experiments",label:"🧪 Experiments"},{id:"analytics",label:"📊 Analytics"},{id:"targets",label:"🤖 Targets"}],$ae=Cr("/")({component:zae});function zae(){const e=ml(),n=Fb().location.search.tab,{data:i,isLoading:l}=od(),{data:o,isLoading:c}=yt(),f=(i==null?void 0:i.projects)??[],[h,p]=S.useState(void 0);S.useEffect(()=>{if(l||c)return;const g=o==null?void 0:o.current_project_id;if(!g){p(null);return}const x=QB(g),b=typeof window<"u"&&window.sessionStorage.getItem(x)==="1",w=WB(f.map(N=>N.id),g,b);typeof window<"u"&&w&&window.sessionStorage.setItem(x,"1"),p(w??null)},[o==null?void 0:o.current_project_id,c,f,l]);const y=ZB(f.map(g=>g.id),o==null?void 0:o.project_dashboard,h??void 0,n);return S.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(Bae,{}):d.jsx(Uae,{})}function Bae(){const{data:e}=od(),{data:t}=yt(),r=ha(),[n,i]=S.useState(!1),[l,o]=S.useState(!1),[c,f]=S.useState(null),h=(e==null?void 0:e.projects)??[],p=(t==null?void 0:t.read_only)===!0;async function y(g){await EB(g.id),r.setQueryData(["projects"],x=>x&&{projects:x.projects.filter(b=>b.id!==g.id)}),f(`Project removed from Dashboard: ${g.name}. Files were left on disk.`),r.invalidateQueries({queryKey:["projects"]})}return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Projects"}),d.jsx("div",{className:"flex gap-2",children:!p&&d.jsxs(d.Fragment,{children:[d.jsx("button",{type:"button",onClick:()=>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("button",{type:"button",onClick:()=>{f(null),i(!0)},className:"rounded-md bg-cyan-500 px-3 py-1.5 text-sm font-medium text-gray-950 transition-colors hover:bg-cyan-400",children:"Add Project"})]})})]}),c&&d.jsx("div",{className:"rounded-lg border border-cyan-900/60 bg-cyan-950/30 p-3 text-sm text-cyan-300",children:c}),h.length===0?d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900/50 p-8 text-center",children:[d.jsx("p",{className:"text-lg text-gray-300",children:"No projects registered yet."}),d.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"Add a project path to start browsing runs, experiments, analytics, and targets."})]}):d.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:h.map(g=>d.jsx(vae,{project:g,canRemove:!p,onRemove:y},g.id))}),!p&&d.jsx(wl,{open:l,onClose:()=>o(!1)}),!p&&d.jsx(A6,{open:n,onClose:()=>i(!1),onAdded:g=>{f(`Project registered: ${g.name}`),r.invalidateQueries({queryKey:["projects"]})}})]})}function Uae(){const r=Fb().location.search.tab,n=ml(),i=ha(),{data:l,isLoading:o,error:c,hasNextPage:f,fetchNextPage:h,isFetchingNextPage:p}=xB(),{data:y}=zm(),{data:g}=yt(),[x,b]=S.useState(!1),[w,N]=S.useState(!1),[O,A]=S.useState(null),T=(g==null?void 0:g.read_only)===!0,E=WP.some(L=>L.id===r)?r:"runs",C=Lp((l==null?void 0:l.runs)??[]),M=C.filter(L=>L.on_remote===!0).length,R=(y==null?void 0:y.configured)===!0?cM(M,C.length,y.branch):void 0;async function D(){N(!0),A(null);try{const L=await jM();i.setQueryData(Yb().queryKey,L),A(dM(L)),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(L){A(fM(L,y)),i.invalidateQueries({queryKey:["remote-status",""]}).catch(()=>{})}finally{N(!1)}}return S.useEffect(()=>{if((O==null?void 0:O.kind)!=="success")return;const L=window.setTimeout(()=>A(null),7e3);return()=>window.clearTimeout(L)},[O]),d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Evaluation Runs"}),(g==null?void 0:g.project_name)&&d.jsx("p",{className:"mt-0.5 text-sm text-gray-500",children:g.project_name})]}),!T&&d.jsx("button",{type:"button",onClick:()=>b(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Run Eval"})]}),d.jsx("div",{className:"border-b border-gray-800",children:d.jsx("div",{className:"flex flex-wrap gap-1 sm:flex-nowrap",children:WP.map(L=>d.jsx("button",{type:"button",onClick:()=>n({to:"/",search:{tab:L.id}}),className:`px-4 py-2 text-sm font-medium transition-colors ${E===L.id?"border-b-2 border-cyan-400 text-cyan-400":"text-gray-400 hover:text-gray-300"}`,children:L.label},L.id))})}),E==="runs"&&d.jsx(Fae,{runs:C,isLoading:o,error:c,remoteStatus:y,syncInFlight:w,syncFeedback:O,onSyncRemote:D,projectName:g==null?void 0:g.project_name,onRemoteSummary:R,hasNextPage:f,isFetchingNextPage:p,onLoadMore:()=>void h(),readOnly:T}),E==="experiments"&&d.jsx(a5,{}),E==="analytics"&&d.jsx(qae,{readOnly:T}),E==="targets"&&d.jsx(s5,{}),!T&&d.jsx(wl,{open:x,onClose:()=>b(!1)})]})}function qae({readOnly:e}){const{data:t,isLoading:r,isError:n,error:i}=bB();return d.jsx(r5,{data:t,isLoading:r,isError:n,error:i,readOnly:e})}function Fae({runs:e,isLoading:t,error:r,remoteStatus:n,syncInFlight:i,syncFeedback:l,onSyncRemote:o,projectName:c,onRemoteSummary:f,hasNextPage:h,isFetchingNextPage:p,onLoadMore:y,readOnly:g}){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(Hae,{}),d.jsx(i5,{remoteStatus:n,syncInFlight:i,onSync:o,projectName:c,syncFeedback:l,onRemoteSummary:f}),d.jsx(Ip,{runs:e,enableCombine:!g,remoteBranch:n==null?void 0:n.branch,hasNextPage:h,isFetchingNextPage:p,onLoadMore:y})]})}function Hae(){const{data:e}=Wb(),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(_e,{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 l5(e){return e==="finished"||e==="failed"}function Kae(e,t){return t||!e?!1:!l5(e)}function Gae(e,t,r,n){return t||n&&!l5(n)?!1:!!(e.some(i=>i.executionStatus==="execution_error")||r!==void 0&&e.length<r)}function Yae(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 o5({results:e,runDir:t,suiteFilter:r,target:n,projectId:i,isReadOnly:l,plannedTestCount:o,runStatus:c}){const f=ml(),[h,p]=S.useState(null),[y,g]=S.useState(null);if(!Gae(e,l,o,c))return null;const x=!!t&&!!r,b=t?r?"":"Original eval file path missing from benchmark.json — cannot determine what to resume":"Run directory unavailable (remote run cannot be resumed in place)";async function w(N){if(!(!x||!t||!r)){p(N),g(null);try{const O=Yae({mode:N,runDir:t,suiteFilter:r,target:n}),A=await SM(O,i);f(i?{to:"/projects/$projectId/jobs/$runId",params:{projectId:i,runId:A.id}}:{to:"/jobs/$runId",params:{runId:A.id}})}catch(O){g(O instanceof Error?O.message:"Failed to launch resume"),p(null)}}}return d.jsxs("div",{className:"flex flex-col items-end gap-1",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("button",{type:"button",onClick:()=>w("resume"),disabled:!x||h!==null,title:x?"Skip already-completed tests, run the rest":b,className:"rounded-md bg-amber-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-amber-500 disabled:cursor-not-allowed disabled:opacity-50","data-testid":"resume-run-button",children:h==="resume"?"Resuming…":"↻ Resume run"}),d.jsx("button",{type:"button",onClick:()=>w("rerun"),disabled:!x||h!==null,title:x?"Re-run failed/errored tests, keep passing results":b,className:"rounded-md border border-amber-600/60 bg-transparent px-3 py-1.5 text-sm font-medium text-amber-300 hover:bg-amber-950/40 disabled:cursor-not-allowed disabled:opacity-50","data-testid":"rerun-failed-button",children:h==="rerun"?"Re-running…":"Rerun failed cases"})]}),y&&d.jsx("p",{className:"text-xs text-red-400",children:y})]})}function u5(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function c5(e){return typeof e=="string"&&e.trim().length>0?e.trim():void 0}function Vae(e){const t=c5(e);if(t)try{const r=new URL(t);return!["http:","https:"].includes(r.protocol)||r.username||r.password?void 0:(r.search="",r.hash="",r.toString())}catch{return}}function Qae(e){const t=c5(e.provider);return t===void 0||t.toLowerCase()==="phoenix"}function Xae(e){if(e)return{provider:e.external_trace_provider??e["external_trace.provider"],ui_url:e.external_trace_ui_url??e.external_trace_url??e["external_trace.ui_url"]??e["external_trace.url"]}}function Wae(e){const t=e,r=u5(e.metadata)?e.metadata:void 0;return[t.external_trace,t.externalTrace,r==null?void 0:r.external_trace,r==null?void 0:r.externalTrace,Xae(r)]}function Zae(e){for(const t of e)for(const r of Wae(t)){if(!u5(r)||!Qae(r))continue;const n=Vae(r.ui_url??r.uiUrl??r.url??r.href);if(n)return n}}const d5=[{id:"all",label:"All"},{id:"passing",label:"Passing"},{id:"failing",label:"Failing"},{id:"errors",label:"Errors"},{id:"grader_errors",label:"Grader errors"},{id:"unreviewed",label:"Unreviewed"}],f5="all",h5="all";function Ln(e){if(typeof e!="string")return;const t=e.trim();return t||void 0}function ZP(e){return[...new Set([...e].filter(t=>t.trim().length>0))].sort((t,r)=>t.localeCompare(r))}function m5(e,t){return Ln(e.name)??Ln(e.type)??`Grader ${t+1}`}function p5(e,t){var r,n;return e.verdict==="fail"||e.score<t||(r=e.assertions)!=null&&r.some(i=>!i.passed)?!0:((n=e.scores)==null?void 0:n.some(i=>p5(i,t)))??!1}function y5(e){if(!e||e.length===0)return[];const t=[];return e.forEach((r,n)=>{t.push(m5(r,n),r.type??"",r.verdict??"");for(const i of r.assertions??[])t.push(i.text,i.evidence??"");t.push(...y5(r.scores))}),t.filter(r=>r.length>0)}function Jae(e){const t=new Map;return e==null||e.forEach((r,n)=>{const i=m5(r,n);t.has(i)||t.set(i,r)}),t}function eie(e){const t=e.tokenUsage;if(!t)return;const r=[t.input,t.output,t.reasoning,t.cached].filter(n=>typeof n=="number"&&Number.isFinite(n));if(r.length!==0)return r.reduce((n,i)=>n+i,0)}function tie(e){const t=Ln(e.model);if(t)return t;const r=e.metadata;if(r)return Ln(r.model)??Ln(r.model_name)??Ln(r.target_model)??Ln(r.provider_model)}function rie(e){const t=Ln(e.target)??"default",r=Ln(e.targetUsed);return r&&r!==t?`${t} -> ${r}`:t}function nie(e,t,r,n){var N;const i=MM(e),l=!i&&e.score>=r,o=i?"error":l?"passing":"failing",c=Jae(e.scores),f=[...c.keys()],h=((N=e.scores)==null?void 0:N.some(O=>p5(O,r)))??!1,p=tie(e),y=rie(e),g=Ln(e.suite),x=Ln(e.category),b=eie(e),w=[e.testId,y,p??"",g??"",x??"",e.executionStatus??"",e.error??"",...y5(e.scores),...(e.assertions??[]).flatMap(O=>[O.text,O.evidence??""])];return{key:`${e.testId}:${e.target??""}:${e.timestamp??""}:${t}`,result:e,index:t,testId:e.testId,status:o,statusLabel:i?"Error":l?"Passing":"Failing",passing:l,executionError:i,graderError:h,reviewed:n.has(e.testId),targetLabel:y,...p&&{modelLabel:p},...g&&{suiteLabel:g},...x&&{categoryLabel:x},...b!==void 0&&{tokenTotal:b},graderNames:f,graderScores:c,searchText:w.join(" ").toLowerCase()}}function aie(e){return e.some(t=>t.targetLabel!=="default"||t.modelLabel)}function iie(e,t){const r=e.some(f=>f.suiteLabel),n=e.some(f=>f.categoryLabel),i=e.some(f=>f.result.durationMs!=null),l=e.some(f=>f.result.costUsd!=null||f.tokenTotal!=null),o=e.some(f=>f.result.error);return[{id:"status",label:"Status",kind:"base",defaultVisible:!0},{id:"test",label:"Test ID",kind:"base",defaultVisible:!0},{id:"model_target",label:"Model / Target",kind:"base",defaultVisible:aie(e)},{id:"score",label:"Score",kind:"base",defaultVisible:!0},...r?[{id:"suite",label:"Suite",kind:"base",defaultVisible:!0}]:[],...n?[{id:"category",label:"Category",kind:"base",defaultVisible:!1}]:[],...i?[{id:"duration",label:"Duration",kind:"base",defaultVisible:!0}]:[],...l?[{id:"cost_tokens",label:"Cost / Tokens",kind:"base",defaultVisible:!0}]:[],{id:"review",label:"Review",kind:"base",defaultVisible:!1},...o?[{id:"error",label:"Error",kind:"base",defaultVisible:!1}]:[],...t.map(f=>({id:`grader:${f}`,label:f,kind:"grader",defaultVisible:!0}))]}function sie(e){return e==="scorer_errors"?"grader_errors":d5.some(t=>t.id===e)?e:"all"}function lie(e){const t=e.filter(r=>r.defaultVisible).map(r=>r.id);return t.length>0?t:e.slice(0,4).map(r=>r.id)}function oie(e,t,r,n){var p,y;const i=new Set(t.map(g=>g.id)),l=((p=e==null?void 0:e.visibleColumnIds)==null?void 0:p.map(g=>g.startsWith("scorer:")?`grader:${g.slice(7)}`:g).filter(g=>i.has(g)))??[],o=l.length>0?l:lie(t),c=e!=null&&e.target&&r.includes(e.target)?e.target:f5,f=(e==null?void 0:e.grader)??(e==null?void 0:e.scorer),h=f&&n.includes(f)?f:h5;return{view:sie(e==null?void 0:e.view),search:((y=e==null?void 0:e.search)==null?void 0:y.trim())??"",target:c,grader:h,visibleColumnIds:o}}function uie(e,t){switch(t){case"passing":return e.status==="passing";case"failing":return e.status==="failing";case"errors":return e.status==="error";case"grader_errors":return e.graderError;case"unreviewed":return!e.reviewed;case"all":return!0}}function cie(e){return{all:e.length,passing:e.filter(t=>t.status==="passing").length,failing:e.filter(t=>t.status==="failing").length,errors:e.filter(t=>t.status==="error").length,grader_errors:e.filter(t=>t.graderError).length,unreviewed:e.filter(t=>!t.reviewed).length}}function die(e){const t=new Set(e.reviewedTestIds??[]),r=e.results.map((p,y)=>nie(p,y,e.passThreshold,t)),n=ZP(r.map(p=>p.targetLabel)),i=ZP(r.flatMap(p=>p.graderNames)),l=iie(r,i),o=oie(e.state,l,n,i),c=o.search.toLowerCase(),f=new Set(o.visibleColumnIds),h=r.filter(p=>!(!uie(p,o.view)||o.target!==f5&&p.targetLabel!==o.target||o.grader!==h5&&!p.graderScores.has(o.grader)||c&&!p.searchText.includes(c)));return{rows:r,filteredRows:h,columns:l,visibleColumns:l.filter(p=>f.has(p.id)),state:o,targetOptions:n,graderOptions:i,viewCounts:cie(r)}}function fie(e){return e?`/api/projects/${encodeURIComponent(e)}/feedback`:"/api/feedback"}async function hie(e,t,r){const n=await fetch(fie(r),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reviews:[{test_id:e,comment:t}]})});if(!n.ok)throw new Error(`Failed to save feedback: ${n.status}`);return n.json()}function mie({testId:e,projectId:t}){var y;const{data:r}=yM(t),n=ha(),i=(y=r==null?void 0:r.reviews)==null?void 0:y.find(g=>g.test_id===e),[l,o]=S.useState((i==null?void 0:i.comment)??""),[c,f]=S.useState(!1);S.useEffect(()=>{o((i==null?void 0:i.comment)??""),f(!1)},[i==null?void 0:i.comment]);const h=Nx({mutationFn:()=>hie(e,l,t),onSuccess:()=>{n.invalidateQueries({queryKey:["feedback",t??""]}),f(!0),setTimeout(()=>f(!1),2e3)}}),p=S.useCallback(()=>{h.mutate()},[h]);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:l,onChange:g=>{o(g.target.value),f(!1)},placeholder:"Add feedback for this test...",className:"w-full rounded-md border border-gray-700 bg-gray-800 p-3 text-sm text-gray-200 placeholder-gray-500 focus:border-cyan-400 focus:outline-none",rows:3}),d.jsxs("div",{className:"mt-2 flex items-center gap-3",children:[d.jsx("button",{type:"button",onClick:p,disabled:h.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:h.isPending?"Saving...":"Save Feedback"}),c&&d.jsx("span",{className:"text-sm text-emerald-400",children:"Saved"}),h.isError&&d.jsx("span",{className:"text-sm text-red-400",children:"Error saving feedback"})]})]})}function pie(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 yie(e){if(e.type==="file")return e.storage==="git"&&e.ref?e.ref:e.storage&&e.storage!=="local"?e.storage:void 0}function g5(e){const t=[];for(const r of e)r.type==="dir"&&(t.push(r.path),r.children&&t.push(...g5(r.children)));return t}function v5({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,h=yie(e);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?"📂":"📁":pie(e.name)}),d.jsx("span",{className:"truncate",children:e.name}),h&&d.jsx("span",{className:"ml-auto max-w-32 flex-shrink-0 truncate rounded border border-gray-700 px-1.5 py-0.5 text-[10px] uppercase tracking-wide text-gray-400",title:[e.kind?`kind: ${e.kind}`:void 0,e.ref?`ref: ${e.ref}`:void 0,e.key?`key: ${e.key}`:void 0].filter(Boolean).join(`
118
- `),children:h})]}),o&&c&&e.children&&d.jsx("div",{children:e.children.map(p=>d.jsx(v5,{node:p,selectedPath:t,onSelect:r,openFolders:n,toggleFolder:i,depth:l+1},p.path))})]})}function gie({files:e,selectedPath:t,onSelect:r}){const[n,i]=S.useState(()=>new Set(g5(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(v5,{node:o,selectedPath:t,onSelect:r,openFolders:n,toggleFolder:l},o.path))]})}const vie="modulepreload",xie=function(e){return"/"+e},JP={},bie=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=xie(h),h in JP)return;JP[h]=!0;const p=h.endsWith(".css"),y=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${y}`))return;const g=document.createElement("link");if(g.rel=p?"stylesheet":vie,p||(g.as="script"),g.crossOrigin="",g.href=h,f&&g.setAttribute("nonce",f),document.head.appendChild(g),p)return new Promise((x,b)=>{g.addEventListener("load",x),g.addEventListener("error",()=>b(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)})},jie=S.lazy(()=>bie(()=>import("./index-DitffAxS.js"),[]));function wie({value:e,language:t="json",height:r="400px"}){return d.jsx(S.Suspense,{fallback:d.jsx("div",{className:"flex items-center justify-center rounded-lg bg-gray-900 p-8 text-gray-500",children:"Loading editor..."}),children:d.jsx(jie,{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 Rm({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 Sie={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 Cd(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Nie(e){return!Cd(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 Oie(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(!Nie(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 $p(e){if(e!==void 0)return e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(1)}s`}function _ie(e){if(typeof e=="number")return`$${e.toFixed(4)}`}function qw(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 x5(e){if(e===void 0)return"";if(typeof e=="string")return e;try{return JSON.stringify(e,null,2)}catch{return String(e)}}function Eie(e){if(Array.isArray(e)){const t=e.map(r=>{if(Cd(r)&&r.type==="text"&&typeof r.text=="string")return r.text}).filter(r=>r!==void 0);if(t.length===e.length&&t.length>0)return t.join(`
119
- `)}return x5(e)}function Dm(e,t){for(const r of t){const n=e[r];if(typeof n=="string"&&n.trim())return n}}function Cb(e,t){for(const r of t)if(e[r]!==void 0)return e[r]}function b5(e,t){const r=e[t];return Cd(r)?r:void 0}function Aie(e,t){const r=b5(e,"function");return Dm(e,["tool","name","tool_name"])??(r?Dm(r,["name"]):void 0)??`Tool ${t+1}`}function Cie(e){const t=b5(e,"function");return Cb(e,["input","arguments","args","parameters"])??(t?Cb(t,["arguments"]):void 0)}function Tie(e){return Cb(e,["output","result","content"])}function Pie(e){return e!=null&&!(typeof e=="string"&&e.length===0)}function Bs({label:e,value:t,tone:r="default"}){return Pie(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:x5(t)})})]}):null}function Br({children:e}){return d.jsx("span",{className:"rounded-md border border-gray-800 bg-gray-950 px-2 py-0.5 text-xs text-gray-400",children:e})}function rx({href:e,children:t,download:r=!1}){return e?d.jsx("a",{href:e,target:"_blank",rel:"noreferrer",download:r,className:"rounded-md px-3 py-1.5 text-sm text-cyan-400 transition-colors hover:text-cyan-300 hover:underline",children:t}):null}function e2({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 Mie({call:e,index:t}){const r=Aie(e,t),n=Dm(e,["id","call_id","tool_call_id"]),i=Dm(e,["status"]),l=typeof e.duration_ms=="number"?$p(e.duration_ms):void 0,o=Cd(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(Br,{children:["id: ",n]}),l&&d.jsxs(Br,{children:["duration: ",l]}),i&&d.jsxs(Br,{children:["status: ",i]})]}),d.jsx(Bs,{label:"Arguments",value:Cie(e)}),d.jsx(Bs,{label:"Result",value:Tie(e)}),d.jsx(Bs,{label:"Error",value:e.error,tone:"error"}),d.jsx(Bs,{label:"Metadata",value:o})]})]})}function Rie({line:e}){const t=$p(e.duration_ms),r=qw(e.token_usage);return d.jsxs("details",{className:"rounded-md border border-amber-900/50 bg-gray-950/60 p-3",children:[d.jsxs("summary",{className:"cursor-pointer text-sm font-medium text-amber-300",children:[e.name?`Tool result · ${e.name}`:"Tool result",t&&d.jsx("span",{className:"ml-2 tabular-nums text-xs text-gray-500",children:t})]}),d.jsxs("div",{className:"mt-3 space-y-3",children:[d.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.name&&d.jsxs(Br,{children:["name: ",e.name]}),t&&d.jsxs(Br,{children:["duration: ",t]}),r&&d.jsxs(Br,{children:["tokens: ",r]})]}),d.jsx(Bs,{label:"Result",value:e.content}),d.jsx(Bs,{label:"Metadata",value:e.metadata})]})]})}function Die({line:e,ordinal:t}){const r=Sie[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=Eie(e.content),i=$p(e.duration_ms),l=qw(e.token_usage),o=Array.isArray(e.tool_calls)?e.tool_calls.filter(Cd):[];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(Rie,{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(Mie,{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(Bs,{label:"Metadata",value:e.metadata})})]})]})]})}function kie({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=$p(r==null?void 0:r.transcript_duration_ms),c=qw(r==null?void 0:r.transcript_token_usage),f=_ie(r==null?void 0:r.transcript_cost_usd);return d.jsxs("div",{className:"flex flex-wrap gap-2",children:[d.jsxs(Br,{children:[e.length," messages"]}),n&&d.jsxs(Br,{children:["provider: ",n]}),i&&d.jsxs(Br,{children:["model: ",i]}),l&&d.jsxs(Br,{children:["session: ",l]}),o&&d.jsxs(Br,{children:["duration: ",o]}),c&&d.jsxs(Br,{children:["tokens: ",c]}),f&&d.jsxs(Br,{children:["cost: ",f]}),t&&d.jsx(Br,{children:t})]})}function Iie({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(e2,{path:r,onOpenFile:c,children:"Open answer.md in Files"}),d.jsx(rx,{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(kie,{entries:f,transcriptPath:n})]}),d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsx(e2,{path:n,onOpenFile:c,children:"Open raw JSONL in Files"}),d.jsx(rx,{href:l,children:"Open raw JSONL"}),d.jsx(rx,{href:o,download:!0,children:"Download JSONL"})]})]})}),d.jsx("div",{className:"space-y-3",children:f.map((p,y)=>d.jsx(Die,{line:p,ordinal:y},`${p.message_index}-${p.role}-${y}`))})]})}function j5(e){for(const t of e){if(t.type==="file")return t.path;if(t.children){const r=j5(t.children);if(r)return r}}return null}function Fw({eval:e,runId:t,projectId:r}){const[n,i]=S.useState("checks"),[l,o]=S.useState(null),{data:c}=yt(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(Bie,{result:e,projectId:r})}),n==="files"&&d.jsx("div",{className:"h-full p-4",children:d.jsx(qie,{result:e,runId:t,projectId:r,selectedPath:l,onSelectedPathChange:o})}),n==="transcript"&&d.jsx("div",{className:"overflow-auto p-4",children:d.jsx(Uie,{result:e,runId:t,projectId:r,onOpenFile:p})}),n==="source"&&d.jsx("div",{className:"overflow-auto p-4",children:d.jsx(zie,{result:e})}),!f&&n==="feedback"&&d.jsx("div",{className:"p-4",children:d.jsx(mie,{testId:e.testId,projectId:r})})]})]})}function Lie(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 Sn({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 w5({file:e}){var r,n;const t=Lie(e.size_bytes);return d.jsxs("dl",{className:"grid gap-3 md:grid-cols-2",children:[d.jsx(Sn,{label:"Path",value:e.display_path}),d.jsx(Sn,{label:"SHA-256",value:e.content_sha256}),d.jsx(Sn,{label:"Size",value:t}),d.jsx(Sn,{label:"Omitted",value:((r=e.omitted)==null?void 0:r.message)??((n=e.omitted)==null?void 0:n.reason)})]})}function Pc({value:e,language:t}){return d.jsx("pre",{className:"max-h-96 overflow-auto rounded-md border border-gray-800 bg-gray-950 p-3 text-xs text-gray-200",children:d.jsx("code",{"data-language":t,children:e})})}function $ie({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(w5,{file:e}),e.command&&e.command.length>0&&d.jsx(Pc,{value:JSON.stringify(e.command,null,2),language:"json"}),e.content&&d.jsx(Pc,{value:e.content})]})]})}function zie({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(Sn,{label:"Eval file",value:(r=t.eval_file)==null?void 0:r.display_path}),d.jsx(Sn,{label:"Test ID",value:t.test_id??e.testId}),d.jsx(Sn,{label:"Suite",value:e.suite}),d.jsx(Sn,{label:"Category",value:e.category}),d.jsx(Sn,{label:"Target",value:e.target})]})]}),((n=t.source_test)==null?void 0:n.yaml)&&d.jsxs("section",{className:"space-y-3",children:[d.jsx("h4",{className:"text-sm font-medium text-gray-300",children:"Source Test"}),d.jsx(Pc,{value:t.source_test.yaml,language:"yaml"})]}),((i=t.eval_file)==null?void 0:i.content)&&d.jsxs("section",{className:"space-y-3",children:[d.jsx("h4",{className:"text-sm font-medium text-gray-300",children:"Eval File Snapshot"}),d.jsx(w5,{file:t.eval_file}),d.jsx(Pc,{value:t.eval_file.content,language:"yaml"})]}),t.graders&&t.graders.length>0&&d.jsxs("section",{className:"space-y-3",children:[d.jsx("h4",{className:"text-sm font-medium text-gray-300",children:"Graders"}),d.jsx("div",{className:"space-y-3",children:t.graders.map(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(Sn,{label:"Weight",value:l.weight}),d.jsx(Sn,{label:"Required",value:l.required}),d.jsx(Sn,{label:"Min score",value:l.min_score})]}),d.jsx(Pc,{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($ie,{file:l},`${l.kind}-${l.display_path}-${l.grader_name??""}-${o}`))})]})]})}function t2({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 Bie({result:e,projectId:t}){const{data:r}=yt(t),n=(r==null?void 0:r.threshold)??(r==null?void 0:r.pass_threshold)??.8,i=!nl(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(!nl(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(Rm,{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(Rm,{score:p.score})})]},`${p.name??p.type??y}`))})]}),o?d.jsx("div",{className:"space-y-6",children:l.map((p,y)=>{const g=p.name??p.type??`Grader ${y+1}`;return d.jsxs("div",{className:"space-y-2",children:[d.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wider text-gray-300",children:g}),p.assertions.map((x,b)=>d.jsx(t2,{assertion:x},`${x.text}-${b}`))]},`${p.name??p.type??y}`)})}):c.length>0?d.jsx("div",{className:"space-y-2",children:c.map((p,y)=>d.jsx(t2,{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 S5(e,t){if(!t)return!1;for(const r of e)if(r.type==="file"&&r.path===t||r.children&&S5(r.children,t))return!0;return!1}function Uie({result:e,runId:t,projectId:r,onOpenFile:n}){const i=e.testId,{data:l,isLoading:o,error:c}=r?He(DB(r,t,i)):SB(t,i),f=l==null?void 0:l.transcript_path,h=l==null?void 0:l.answer_path,p=(l==null?void 0:l.status)==="ok"?l.content??"":"",y=S.useMemo(()=>Oie(p),[p]);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 artifact..."});if(c)return d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-4",children:[d.jsx("h3",{className:"text-sm font-medium text-red-300",children:"Transcript could not be loaded"}),d.jsx("p",{className:"mt-2 text-sm text-gray-300",children:c.message})]});if(!l||l.status==="missing")return d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[d.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"No structured transcript"}),d.jsx("p",{className:"mt-2 text-sm text-gray-500",children:(l==null?void 0:l.message)??"This run does not include canonical transcript.jsonl. Dashboard does not parse response.md or markdown transcripts for this view."})]});if(l.status==="dangling"||l.status==="unsupported")return d.jsxs("div",{className:"rounded-lg border border-amber-900/50 bg-amber-950/20 p-4",children:[d.jsx("h3",{className:"text-sm font-medium text-amber-300",children:l.status==="dangling"?"Transcript artifact unavailable":"Transcript pointer unsupported"}),d.jsx("p",{className:"mt-2 text-sm text-gray-300",children:l.message??"The transcript artifact could not be resolved."}),f?d.jsx("p",{className:"mt-2 font-mono text-xs text-gray-500",children:f}):null,l.pointer?d.jsx("p",{className:"mt-2 font-mono text-xs text-gray-500",children:l.pointer}):null]});if(y.error)return d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-4",children:[d.jsx("h3",{className:"text-sm font-medium text-red-300",children:"Transcript could not be parsed"}),d.jsx("p",{className:"mt-2 text-sm text-gray-300",children:y.error}),d.jsx("div",{className:"mt-3 flex flex-wrap gap-2",children:f?d.jsxs(d.Fragment,{children:[d.jsx("button",{type:"button",onClick:()=>n(f),className:"rounded-md border border-gray-700 px-3 py-1.5 text-sm text-gray-300 transition-colors hover:border-cyan-900/60 hover:text-cyan-300",children:"Open raw JSONL in Files"}),d.jsx("a",{href:jo({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"})]}):null})]});if(y.entries.length===0)return d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[d.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Empty transcript"}),d.jsxs("p",{className:"mt-2 text-sm text-gray-500",children:[d.jsx("code",{children:f})," exists but contains no JSONL rows."]})]});const g=h?jo({projectId:r,runId:t,evalId:i,filePath:h,raw:!0}):void 0,x=f?jo({projectId:r,runId:t,evalId:i,filePath:f,raw:!0}):void 0,b=f?jo({projectId:r,runId:t,evalId:i,filePath:f,download:!0}):void 0;return d.jsx(Iie,{entries:y.entries,finalAnswer:h?l.answer_content??e.output:void 0,answerPath:h,transcriptPath:f,answerHref:g,transcriptHref:x,transcriptDownloadHref:b,onOpenFile:n})}function qie({result:e,runId:t,projectId:r,selectedPath:n,onSelectedPathChange:i}){const l=e.testId,{data:o}=r?He(MB(r,t,l)):jB(t,l),c=(o==null?void 0:o.files)??[],[f,h]=S.useState(null),[p,y]=S.useState(!1),g=n??f,x=S5(c,g)?g:c.length>0?j5(c):null,{data:b,isLoading:w}=r?He(RB(r,t,l,x??"")):wB(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?w?"Loading...":(b==null?void 0:b.content)??"":"",O=x?(b==null?void 0:b.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(gie,{files:c,selectedPath:x,onSelect:A=>{h(A),i(A),y(!1)}})}),d.jsx("div",{className:`${p?"hidden":"block"} md:block flex-1 h-full`,children:d.jsx(wie,{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 Ct={view:"results_view",search:"results_q",target:"results_target",grader:"results_grader",legacyScorer:"results_scorer",columns:"results_cols",detail:"results_detail"};function nx(){var t;if(typeof window>"u")return{};const e=new URLSearchParams(window.location.search);return{view:e.get(Ct.view)??void 0,search:e.get(Ct.search)??void 0,target:e.get(Ct.target)??void 0,grader:e.get(Ct.grader)??e.get(Ct.legacyScorer)??void 0,visibleColumnIds:((t=e.get(Ct.columns))==null?void 0:t.split(",").map(r=>r.trim()).filter(Boolean))??void 0}}function Fie(e){if(typeof window>"u")return;const t=new URLSearchParams(window.location.search);e.view==="all"?t.delete(Ct.view):t.set(Ct.view,e.view),e.search?t.set(Ct.search,e.search):t.delete(Ct.search),e.target==="all"?t.delete(Ct.target):t.set(Ct.target,e.target),t.delete(Ct.legacyScorer),e.grader==="all"?t.delete(Ct.grader):t.set(Ct.grader,e.grader),e.visibleColumnIds.length>0?t.set(Ct.columns,e.visibleColumnIds.join(",")):t.delete(Ct.columns);const r=t.toString(),n=`${window.location.pathname}${r?`?${r}`:""}${window.location.hash}`;window.history.replaceState(window.history.state,"",n)}function r2(){return typeof window>"u"?null:new URLSearchParams(window.location.search).get(Ct.detail)}function ax(e){if(typeof window>"u")return;const t=new URLSearchParams(window.location.search);e?t.set(Ct.detail,e):t.delete(Ct.detail);const r=t.toString(),n=`${window.location.pathname}${r?`?${r}`:""}${window.location.hash}`;window.history.replaceState(window.history.state,"",n)}function Hie(e){return`${Math.round(e*100)}%`}function Kie(e){if(e==null)return"-";if(e<1e3)return`${Math.round(e)}ms`;if(e<6e4)return`${(e/1e3).toFixed(1)}s`;const t=Math.floor(e/6e4),r=Math.round(e%6e4/1e3);return`${t}m ${r}s`}function Gie(e){if(e!=null)return e===0?"$0":e<.01?`$${e.toFixed(5)}`:`$${e.toFixed(4)}`}function Yie(e){if(e!=null)return e>=1e6?`${(e/1e6).toFixed(1)}M tok`:e>=1e3?`${(e/1e3).toFixed(1)}k tok`:`${e} tok`}function Vie(e){const t=e.tokenUsage;if(!t)return;const r=[t.input!=null?`${t.input} in`:void 0,t.output!=null?`${t.output} out`:void 0,t.reasoning!=null?`${t.reasoning} reason`:void 0,t.cached!=null?`${t.cached} cached`:void 0].filter(n=>!!n);return r.length>0?r.join(" / "):void 0}function Qie(e){return e>=.8?"text-emerald-300":e>=.5?"text-yellow-300":"text-red-300"}function N5(e){var t,r;return e.verdict==="fail"||(t=e.assertions)!=null&&t.some(n=>!n.passed)?!0:((r=e.scores)==null?void 0:r.some(N5))??!1}function Hw({results:e,runId:t,projectId:r,passThreshold:n,title:i="Results",emptyMessage:l}){const[o,c]=S.useState(()=>nx()),[f,h]=S.useState(()=>r2()),{data:p}=yM(r),y=S.useMemo(()=>(p==null?void 0:p.reviews.map(E=>E.test_id))??[],[p==null?void 0:p.reviews]),g=S.useMemo(()=>die({results:e,passThreshold:n,reviewedTestIds:y,state:o}),[n,e,y,o]),x=new Set(g.state.visibleColumnIds),b=f!=null?g.filteredRows.find(E=>E.key===f)??null:null;S.useEffect(()=>{const E=()=>{c(nx()),h(r2())};return window.addEventListener("popstate",E),()=>window.removeEventListener("popstate",E)},[]),S.useEffect(()=>{!f||b||(ax(null),h(null))},[b,f]);function w(E){const C={...g.state,...E};Fie(C),c(nx())}function N(){if(typeof window>"u")return;const E=new URLSearchParams(window.location.search);for(const R of Object.values(Ct))E.delete(R);const C=E.toString(),M=`${window.location.pathname}${C?`?${C}`:""}${window.location.hash}`;window.history.replaceState(window.history.state,"",M),c({}),h(null)}function O(E){const C=new Set(g.state.visibleColumnIds);C.has(E)?C.delete(E):C.add(E),w({visibleColumnIds:[...C]})}function A(E){ax(E),h(E)}function T(){ax(null),h(null)}return e.length===0?d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:l??d.jsx("p",{className:"text-lg text-gray-400",children:"No evaluations found"})}):d.jsxs("section",{className:"space-y-3",children:[d.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-baseline sm:justify-between",children:[d.jsx("h3",{className:"text-sm font-medium text-gray-400",children:i}),d.jsxs("p",{className:"text-xs text-gray-500",children:[g.filteredRows.length," of ",g.rows.length," rows"]})]}),d.jsxs("div",{className:"space-y-3 rounded-lg border border-gray-800 bg-gray-900/40 p-3",children:[d.jsx("div",{className:"flex flex-wrap gap-2",children:d5.map(E=>d.jsxs("button",{type:"button",onClick:()=>w({view:E.id}),className:`inline-flex items-center gap-2 rounded-md border px-2.5 py-1.5 text-sm transition-colors ${g.state.view===E.id?"border-cyan-900/60 bg-cyan-950/30 text-cyan-300":"border-gray-800 bg-gray-950/70 text-gray-400 hover:border-gray-700 hover:text-gray-200"}`,children:[d.jsx("span",{children:E.label}),d.jsx("span",{className:"tabular-nums text-xs text-gray-500",children:g.viewCounts[E.id]})]},E.id))}),d.jsxs("div",{className:"grid gap-2 lg:grid-cols-[minmax(220px,1fr)_minmax(150px,220px)_minmax(150px,220px)_auto_auto]",children:[d.jsxs("label",{className:"min-w-0",children:[d.jsx("span",{className:"sr-only",children:"Search results"}),d.jsx("input",{type:"search",value:g.state.search,onChange:E=>w({search:E.target.value}),placeholder:"Search tests, targets, graders, assertions",className:"w-full rounded-md border border-gray-700 bg-gray-950 px-3 py-1.5 text-sm text-gray-100 placeholder:text-gray-600 focus:border-cyan-500 focus:outline-none focus:ring-1 focus:ring-cyan-500"})]}),d.jsxs("label",{children:[d.jsx("span",{className:"sr-only",children:"Filter by target"}),d.jsxs("select",{value:g.state.target,onChange:E=>w({target:E.target.value}),className:"w-full rounded-md border border-gray-700 bg-gray-950 px-3 py-1.5 text-sm text-gray-100 focus:border-cyan-500 focus:outline-none focus:ring-1 focus:ring-cyan-500",children:[d.jsx("option",{value:"all",children:"All targets"}),g.targetOptions.map(E=>d.jsx("option",{value:E,children:E},E))]})]}),d.jsxs("label",{children:[d.jsx("span",{className:"sr-only",children:"Filter by grader"}),d.jsxs("select",{value:g.state.grader,onChange:E=>w({grader:E.target.value}),className:"w-full rounded-md border border-gray-700 bg-gray-950 px-3 py-1.5 text-sm text-gray-100 focus:border-cyan-500 focus:outline-none focus:ring-1 focus:ring-cyan-500",children:[d.jsx("option",{value:"all",children:"All graders"}),g.graderOptions.map(E=>d.jsx("option",{value:E,children:E},E))]})]}),d.jsxs("details",{className:"group relative",children:[d.jsx("summary",{className:"list-none rounded-md border border-gray-700 bg-gray-950 px-3 py-1.5 text-sm text-gray-300 transition-colors hover:border-gray-600 hover:text-gray-100 focus:border-cyan-500 focus:outline-none focus:ring-1 focus:ring-cyan-500",children:"Display"}),d.jsxs("div",{className:"absolute right-0 z-10 mt-2 w-64 max-w-[calc(100vw-2rem)] rounded-lg border border-gray-800 bg-gray-950 p-3",children:[d.jsx("div",{className:"mb-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Columns"}),d.jsx("div",{className:"max-h-72 space-y-2 overflow-auto pr-1",children:g.columns.map(E=>d.jsxs("label",{className:"flex items-center gap-2 text-sm text-gray-300",children:[d.jsx("input",{type:"checkbox",checked:x.has(E.id),onChange:()=>O(E.id),className:"h-4 w-4 rounded border-gray-700 bg-gray-900 text-cyan-500"}),d.jsx("span",{className:"min-w-0 truncate",title:E.label,children:E.label})]},E.id))})]})]}),d.jsx("button",{type:"button",onClick:N,className:"rounded-md px-3 py-1.5 text-sm text-gray-400 transition-colors hover:text-gray-200",children:"Clear"})]})]}),d.jsxs("div",{className:b?"grid min-w-0 gap-4 xl:grid-cols-[minmax(0,1fr)_minmax(360px,42rem)]":"",children:[d.jsx("div",{className:"min-w-0",children:g.filteredRows.length===0?d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[d.jsx("p",{className:"text-lg text-gray-400",children:"No matching evaluations"}),d.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"Adjust the result filters or display preset."})]}):d.jsx("div",{className:"max-w-full overflow-x-auto rounded-lg border border-gray-800",children:d.jsxs("table",{className:"w-full whitespace-nowrap text-left text-sm",style:{minWidth:`${Math.max(860,g.visibleColumns.length*136)}px`},children:[d.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:d.jsx("tr",{children:g.visibleColumns.map(E=>d.jsx("th",{className:`px-4 py-3 font-medium text-gray-400 ${n2(E.id)?"text-right":""}`,title:E.label,children:d.jsx("span",{className:"block max-w-48 truncate",children:E.label})},E.id))})}),d.jsx("tbody",{className:"divide-y divide-gray-800/50",children:g.filteredRows.map(E=>{const C=f===E.key;return d.jsx("tr",{className:`transition-colors ${C?"bg-cyan-950/20":"hover:bg-gray-900/30"}`,children:g.visibleColumns.map(M=>d.jsx("td",{className:`px-4 py-3 align-middle ${n2(M.id)?"text-right tabular-nums":""}`,children:d.jsx(Xie,{column:M,row:E,passThreshold:n,onOpenDetail:A,isSelected:C})},`${E.key}:${M.id}`))},E.key)})})]})})}),b&&d.jsx(Jie,{row:b,runId:t,projectId:r,onClose:T})]})]})}function n2(e){return["duration","cost_tokens"].includes(e)||e.startsWith("grader:")}function Xie({column:e,row:t,passThreshold:r,onOpenDetail:n,isSelected:i}){if(e.id.startsWith("grader:")){const l=e.id.slice(7);return d.jsx(rse,{score:t.graderScores.get(l),passThreshold:r})}switch(e.id){case"status":return d.jsx(Wie,{status:t.status,label:t.statusLabel});case"test":return d.jsx(Zie,{row:t,onOpenDetail:n,isSelected:i});case"model_target":return d.jsx(ese,{row:t});case"score":return t.executionError?d.jsx("span",{className:"inline-flex rounded-md border border-amber-900/60 bg-amber-950/20 px-2 py-0.5 text-xs font-medium text-amber-300",children:"Execution error"}):d.jsx($n,{rate:t.result.score});case"suite":return d.jsx(ix,{value:t.suiteLabel});case"category":return d.jsx(ix,{value:t.categoryLabel});case"duration":return d.jsx("span",{className:"text-gray-400",children:Kie(t.result.durationMs)});case"cost_tokens":return d.jsx(tse,{row:t});case"review":return d.jsx("span",{className:t.reviewed?"text-emerald-300":"text-gray-500",children:t.reviewed?"Reviewed":"Unreviewed"});case"error":return d.jsx(ix,{value:t.result.error,tone:"text-red-300"});default:return d.jsx("span",{className:"text-gray-600",children:"-"})}}function Wie({status:e,label:t}){const r=e==="passing"?"border-emerald-900/60 bg-emerald-950/20 text-emerald-300":e==="error"?"border-amber-900/60 bg-amber-950/20 text-amber-300":"border-red-900/60 bg-red-950/20 text-red-300",n=e==="passing"?"bg-emerald-400":e==="error"?"bg-amber-400":"bg-red-400";return d.jsxs("span",{className:`inline-flex items-center gap-1.5 rounded-md border px-2 py-0.5 text-xs ${r}`,children:[d.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${n}`}),t]})}function Zie({row:e,onOpenDetail:t,isSelected:r}){return d.jsxs("div",{className:"max-w-[24rem] min-w-0",children:[d.jsx("button",{type:"button",onClick:()=>t(e.key),className:"block min-w-0 truncate text-left font-medium text-cyan-400 hover:text-cyan-300 hover:underline",title:e.testId,"aria-pressed":r,children:e.testId}),e.result.error?d.jsx("div",{className:"mt-0.5 truncate text-xs text-red-300",title:e.result.error,children:e.result.error}):null]})}function Jie({row:e,runId:t,projectId:r,onClose:n}){return d.jsxs("aside",{className:"min-w-0 rounded-lg border border-gray-800 bg-gray-950/80 xl:sticky xl:top-4 xl:max-h-[calc(100vh-2rem)]",children:[d.jsxs("div",{className:"flex min-w-0 items-start justify-between gap-3 border-b border-gray-800 px-4 py-3",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-gray-500",children:"Row detail"}),d.jsx("h4",{className:"mt-1 truncate text-base font-semibold text-white",title:e.testId,children:e.testId}),d.jsxs("p",{className:"mt-1 truncate text-xs text-gray-500",title:e.targetLabel,children:[e.targetLabel,e.suiteLabel?` · ${e.suiteLabel}`:""]})]}),d.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[r?d.jsx(_e,{to:"/projects/$projectId/evals/$runId/$evalId",params:{projectId:r,runId:t,evalId:e.testId},className:"rounded-md border border-gray-800 px-2.5 py-1.5 text-xs text-gray-400 transition-colors hover:border-gray-700 hover:text-gray-200",children:"Full page"}):d.jsx(_e,{to:"/evals/$runId/$evalId",params:{runId:t,evalId:e.testId},className:"rounded-md border border-gray-800 px-2.5 py-1.5 text-xs text-gray-400 transition-colors hover:border-gray-700 hover:text-gray-200",children:"Full page"}),d.jsx("button",{type:"button",onClick:n,className:"rounded-md border border-gray-800 px-2.5 py-1.5 text-xs text-gray-400 transition-colors hover:border-gray-700 hover:text-gray-200",children:"Close"})]})]}),d.jsx("div",{className:"h-[36rem] min-h-[28rem] overflow-hidden xl:h-[calc(100vh-9rem)]",children:d.jsx(Fw,{eval:e.result,runId:t,projectId:r})})]})}function ese({row:e}){return d.jsxs("div",{className:"max-w-[16rem] min-w-0",children:[d.jsx("div",{className:"truncate text-gray-300",title:e.targetLabel,children:e.targetLabel}),e.modelLabel?d.jsx("div",{className:"mt-0.5 truncate text-xs text-gray-500",title:e.modelLabel,children:e.modelLabel}):null]})}function tse({row:e}){const t=Gie(e.result.costUsd),r=Yie(e.tokenTotal),n=Vie(e.result);return!t&&!r?d.jsx("span",{className:"text-gray-600",children:"-"}):d.jsxs("div",{className:"min-w-0 text-right",children:[t?d.jsx("div",{className:"tabular-nums text-gray-300",children:t}):null,r?d.jsx("div",{className:"text-xs tabular-nums text-gray-500",title:n,children:r}):null]})}function rse({score:e,passThreshold:t}){if(!e)return d.jsx("span",{className:"text-gray-600",children:"-"});const r=e.score<t||N5(e);return d.jsxs("div",{className:"min-w-0 text-right",children:[d.jsx("div",{className:`tabular-nums ${Qie(e.score)}`,children:Hie(e.score)}),d.jsx("div",{className:r?"text-xs text-red-300":"text-xs text-gray-500",children:r?"Fail":e.verdict??"Pass"})]})}function ix({value:e,tone:t="text-gray-400"}){return e?d.jsx("span",{className:`block max-w-[14rem] truncate ${t}`,title:e,children:e}):d.jsx("span",{className:"text-gray-600",children:"-"})}function tu({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(vo,{label:"Pass Rate",value:`${o}%`,accent:c,large:!0}),d.jsx("div",{className:"h-6 w-px bg-gray-700"}),d.jsx(vo,{label:"Passed",value:String(t),accent:"text-emerald-400"}),d.jsx(vo,{label:"Failures",value:String(r),accent:"text-red-400"}),i>0&&d.jsx(vo,{label:"Execution Errors",value:String(i),accent:"text-amber-400"}),d.jsx(vo,{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(vo,{label:"Cost",value:`$${l.toFixed(4)}`,accent:"text-amber-400"})]})]})}function vo({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 nse(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,b])=>{const w=Um(b,t);return{name:x,passed:w.passed,failed:w.failed,executionErrors:w.executionErrors,total:w.total,avgScore:w.avgScore}}).sort((x,b)=>x.name.localeCompare(b.name)),o=l.reduce((x,b)=>x+b.total,0),c=l.reduce((x,b)=>x+b.passed,0),f=l.reduce((x,b)=>x+b.failed,0),h=l.reduce((x,b)=>x+b.executionErrors,0),p=o-h,y=l.reduce((x,b)=>x+b.avgScore*(b.total-b.executionErrors),0),g=a6(n);return{name:n,displayName:g.label,mutedDisplayName:g.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 O5({results:e,runId:t,projectId:r}){const{data:n}=yt(r),i=(n==null?void 0:n.threshold)??(n==null?void 0:n.pass_threshold)??.8,l=Zae(e),o=e.length,c=Um(e,i),f=e.reduce((p,y)=>p+(y.costUsd??0),0),h=nse(e,i);return o===0?d.jsxs("div",{className:"space-y-6",children:[d.jsx(tu,{total:0,passed:0,failed:0,passRate:0}),d.jsx(a2,{href:l}),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(tu,{total:o,passed:c.passed,failed:c.failed,passRate:c.passRate,executionErrors:c.executionErrors,totalCost:f>0?f:void 0}),d.jsx(a2,{href:l}),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:h.map(p=>{const y=d.jsxs("span",{className:"flex min-w-0 items-baseline gap-2",children:[d.jsx("span",{className:"truncate",children:p.displayName}),p.mutedDisplayName?d.jsx("span",{className:"truncate text-xs font-normal text-gray-500",title:p.mutedDisplayName,children:p.mutedDisplayName}):null]});return d.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[d.jsx("td",{className:"w-[18rem] max-w-[18rem] px-4 py-2.5 font-medium text-gray-200",children:r?d.jsx(_e,{to:"/projects/$projectId/runs/$runId/category/$category",params:{projectId:r,runId:t,category:p.name},className:"flex min-w-0 text-cyan-400 hover:text-cyan-300 hover:underline",title:p.mutedDisplayName??p.displayName,children:y}):d.jsx(_e,{to:"/runs/$runId/category/$category",params:{runId:t,category:p.name},className:"flex min-w-0 text-cyan-400 hover:text-cyan-300 hover:underline",title:p.mutedDisplayName??p.displayName,children:y})}),d.jsx("td",{className:"px-4 py-2.5",children:d.jsx($n,{rate:p.total-p.executionErrors>0?p.passed/(p.total-p.executionErrors):0})}),d.jsx("td",{className:"px-4 py-2.5 text-right tabular-nums text-emerald-400",children:p.passed}),d.jsx("td",{className:"px-4 py-2.5 text-right tabular-nums text-red-400",children:p.failed>0?p.failed:d.jsx("span",{className:"text-gray-600",children:"0"})}),d.jsx("td",{className:"px-4 py-2.5 text-right tabular-nums text-amber-400",children:p.executionErrors>0?p.executionErrors:d.jsx("span",{className:"text-gray-600",children:"0"})}),d.jsx("td",{className:"px-4 py-2.5 text-right tabular-nums text-gray-400",children:p.total})]},p.name)})})]})})]}),d.jsx(Hw,{results:e,runId:t,projectId:r,passThreshold:i,title:"All Evals"}),d.jsx(ase,{runId:t,projectId:r})]})}function a2({href:e}){return e?d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900/50 p-4",children:d.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[d.jsxs("div",{children:[d.jsx("h3",{className:"text-sm font-medium text-gray-200",children:"External trace"}),d.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"Phoenix"})]}),d.jsx("a",{href:e,target:"_blank",rel:"noreferrer",className:"inline-flex items-center rounded-md border border-cyan-900/70 px-2.5 py-1 text-sm font-medium text-cyan-300 transition-colors hover:border-cyan-700 hover:bg-cyan-950/40 hover:text-cyan-200 hover:underline",children:"Open in Phoenix"})]})}):null}function ase({runId:e,projectId:t}){const[r,n]=S.useState(!1),{data:i,isLoading:l,error:o}=oB(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 zp({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 Bp({runId:e,status:t,isReadOnly:r,projectId:n}){const[i,l]=S.useState(!1),[o,c]=S.useState(null);if(!Kae(t,r))return null;async function f(){l(!0),c(null);try{await KB(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 _5=Cr("/runs/$runId")({component:ise});function ise(){var w;const{runId:e}=_5.useParams(),{data:t,isLoading:r,error:n}=ld(e),{data:i}=yt(),{data:l}=zm(),[o,c]=S.useState(!1),f=(i==null?void 0:i.read_only)===!0;if(r)return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(N=>d.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},N))})]});if(n)return d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load run: ",n.message]});const h=(w=t==null?void 0:t.results)==null?void 0:w[0],p=h==null?void 0:h.target,y=p?{target:p}:void 0,g=t==null?void 0:t.status,x=g==="starting"||g==="running",b=_M({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:b.heading,children:b.heading}),b.sourceBadge?d.jsx("span",{className:"rounded-md border border-cyan-900/60 bg-cyan-950/20 px-2 py-0.5 text-xs font-medium text-cyan-300",children:b.sourceBadge}):null]}),b.meta?d.jsx("p",{className:"mt-1 text-sm text-gray-500",children:b.meta}):null,b.sourceContext.length>0?d.jsx("div",{className:"mt-2 flex flex-wrap items-center gap-2 text-xs text-gray-500",children:b.sourceContext.map(N=>d.jsxs("span",{children:[d.jsxs("span",{className:"text-gray-600",children:[N.label,":"]})," ",N.value]},`${N.label}:${N.value}`))}):null]}),d.jsxs("div",{className:"flex flex-wrap items-center gap-3 sm:justify-end",children:[!f&&x?d.jsx(Bp,{runId:e,status:g,isReadOnly:f}):d.jsx(o5,{results:(t==null?void 0:t.results)??[],runDir:t==null?void 0:t.run_dir,suiteFilter:t==null?void 0:t.suite_filter,target:p??void 0,isReadOnly:f,plannedTestCount:t==null?void 0:t.planned_test_count,runStatus:g}),g&&d.jsx(zp,{status:g}),!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(O5,{results:(t==null?void 0:t.results)??[],runId:e}),!f&&d.jsx(wl,{open:o,onClose:()=>c(!1),prefill:y})]})}const sx=[{id:"runs",label:"🏃 Recent Runs",title:"Recent Runs"},{id:"experiments",label:"🧪 Experiments",title:"Experiments"},{id:"analytics",label:"📊 Analytics",title:"Analytics"},{id:"targets",label:"🤖 Targets",title:"Targets"}],E5=Cr("/projects/$projectId")({component:sse});function sse(){var x;const{projectId:e}=E5.useParams(),n=Fb().location.search.tab,i=ml(),[l,o]=S.useState(!1),{data:c}=yt(e),{data:f}=od(),h=(c==null?void 0:c.read_only)===!0,p=NM(e,f==null?void 0:f.projects),y=sx.some(b=>b.id===n)?n:"runs",g=((x=sx.find(b=>b.id===y))==null?void 0:x.title)??"Recent Runs";return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h1",{className:"text-2xl font-semibold text-white",children:g}),!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:sx.map(b=>d.jsx("button",{type:"button",onClick:()=>i({to:"/projects/$projectId",params:{projectId:e},search:{tab:b.id}}),className:`shrink-0 px-4 py-2 text-sm font-medium transition-colors ${y===b.id?"border-b-2 border-cyan-400 text-cyan-400":"text-gray-400 hover:text-gray-300"}`,children:b.label},b.id))})}),y==="runs"&&d.jsx(lse,{projectId:e,projectName:p,readOnly:h}),y==="experiments"&&d.jsx(a5,{projectId:e}),y==="analytics"&&d.jsx(ose,{projectId:e,readOnly:h}),y==="targets"&&d.jsx(s5,{projectId:e}),!h&&d.jsx(wl,{open:l,onClose:()=>o(!1),projectId:e})]})}function lse({projectId:e,projectName:t,readOnly:r}){const n=ha(),{data:i,isLoading:l,error:o,hasNextPage:c,fetchNextPage:f,isFetchingNextPage:h}=TB(e),{data:p}=Wb(e),{data:y}=zm(e),[g,x]=S.useState(!1),[b,w]=S.useState(null),N=((p==null?void 0:p.runs)??[]).filter(C=>C.status==="starting"||C.status==="running"),O=Lp((i==null?void 0:i.runs)??[]),A=O.filter(C=>C.on_remote===!0).length,T=(y==null?void 0:y.configured)===!0?cM(A,O.length,y.branch):void 0;async function E(){x(!0),w(null);try{const C=await jM(e);n.setQueryData(Yb(e).queryKey,C);const M=dM(C);w(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(C){w(fM(C,y)),n.invalidateQueries({queryKey:["remote-status",e]}).catch(()=>{})}finally{x(!1)}}return S.useEffect(()=>{if((b==null?void 0:b.kind)!=="success")return;const C=window.setTimeout(()=>w(null),7e3);return()=>window.clearTimeout(C)},[b]),l?d.jsx("div",{className:"space-y-2",children:["s1","s2","s3"].map(C=>d.jsx("div",{className:"h-12 animate-pulse rounded-lg bg-gray-900"},C))}):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:[N.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:N.map(C=>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:C.id}),d.jsx("span",{className:"flex-shrink-0 text-xs text-gray-500",children:new Date(C.started_at).toLocaleTimeString()})]}),d.jsx(_e,{to:"/projects/$projectId/jobs/$runId",params:{projectId:e,runId:C.id},className:"flex-shrink-0 text-xs text-cyan-400 hover:text-cyan-300",children:"View Log →"})]},C.id))})]}),d.jsx(i5,{remoteStatus:y,syncInFlight:g,onSync:E,projectName:t,syncFeedback:b,onRemoteSummary:T}),d.jsx(Ip,{runs:O,projectId:e,enableCombine:!r,remoteBranch:y==null?void 0:y.branch,hasNextPage:c,isFetchingNextPage:h,onLoadMore:()=>void f()})]})}function ose({projectId:e,readOnly:t}){const{data:r,isLoading:n,isError:i,error:l}=He(bM(e));return d.jsx(r5,{data:r,isLoading:n,isError:i,error:l,projectId:e,readOnly:t})}const A5=Cr("/jobs/$runId")({component:use});function use(){const{runId:e}=A5.useParams(),{data:t,isLoading:r,error:n}=Xb(e),{data:i}=yt(),l=(i==null?void 0:i.read_only)===!0;if(r)return d.jsxs("div",{className:"space-y-4",children:[d.jsx(lx,{}),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(lx,{}),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(lx,{}),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(Bp,{runId:e,status:t.status,isReadOnly:l}),d.jsx(zp,{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 lx(){return d.jsx(_e,{to:"/",search:{tab:"runs"},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to Runs"})}function C5({experimentName:e,projectId:t}){var g;const{data:r,isLoading:n}=He(t?Qb(t):pM),{data:i,isLoading:l}=He(t?Vb(t):Gb);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=(g=r==null?void 0:r.experiments)==null?void 0:g.find(x=>x.name===e),f=Lp(((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: ",i2(c.last_run)]})]})]}),c&&d.jsxs("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-4",children:[d.jsx(vh,{label:"Runs",value:String(p)}),d.jsx(vh,{label:"Targets",value:String(y)}),d.jsx(vh,{label:"Pass Rate",value:`${Math.round(h*100)}%`,accent:"text-cyan-400"}),d.jsx(vh,{label:"Last Run",value:i2(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(Ip,{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 vh({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 i2(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=Cr("/experiments/$experimentName")({component:cse});function cse(){const{experimentName:e}=T5.useParams();return d.jsx(C5,{experimentName:e})}const P5=Cr("/evals/$runId/$evalId")({component:dse});function dse(){const{runId:e,evalId:t}=P5.useParams(),{data:r,isLoading:n,error:i}=ld(e),{data:l}=yt(),[o,c]=S.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(g=>g.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=nl(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(Fw,{eval:h,runId:e}),!f&&d.jsx(wl,{open:o,onClose:()=>c(!1),prefill:{testIds:[t],target:h.target}})]})}const M5=Cr("/runs/$runId_/suite/$suite")({component:fse});function fse(){const{runId:e,suite:t}=M5.useParams(),{data:r,isLoading:n,error:i}=ld(e),{data:l}=yt(),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=Um(c,o),p=c.reduce((y,g)=>y+(g.costUsd??0),0);return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-semibold text-white",children:t}),d.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:["Suite in run: ",e]})]}),d.jsx(tu,{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(Hw,{results:c,runId:e,passThreshold:o,title:"Suite Evals"})]})}const R5=Cr("/runs/$runId_/category/$category")({component:hse});function hse(){const{runId:e,category:t}=R5.useParams(),{data:r,isLoading:n,error:i}=vM(e,t);if(n)return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(g=>d.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},g))})]});if(i)return d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load category: ",i.message]});const l=(r==null?void 0:r.suites)??[],o=l.reduce((g,x)=>g+x.total,0),c=l.reduce((g,x)=>g+x.passed,0),f=l.reduce((g,x)=>g+x.failed,0),h=l.reduce((g,x)=>g+Xt(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(tu,{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(g=>d.jsxs(_e,{to:"/runs/$runId/suite/$suite",params:{runId:e,suite:g.name},className:"rounded-lg border border-gray-800 bg-gray-900 p-3 text-left transition-colors hover:border-gray-700",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-sm font-medium text-gray-200 truncate",children:g.name}),d.jsxs("span",{className:"ml-2 text-xs text-gray-500",children:[g.passed,"/",RM(g)]})]}),d.jsx("div",{className:"mt-2",children:d.jsx(Rm,{score:g.avg_score})}),d.jsxs("div",{className:"mt-1 flex gap-3 text-xs",children:[d.jsxs("span",{className:"text-emerald-400",children:[g.passed," passed"]}),g.failed>0&&d.jsxs("span",{className:"text-red-400",children:[g.failed," failed"]}),Xt(g)>0&&d.jsxs("span",{className:"text-amber-400",children:[Xt(g)," execution errors"]})]})]},g.name))})]})]})}const D5=Cr("/projects/$projectId_/runs/$runId")({component:mse});function mse(){var N;const{projectId:e,runId:t}=D5.useParams(),{data:r,isLoading:n,error:i}=ud(e,t),{data:l}=yt(e),{data:o}=zm(e),[c,f]=S.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,g=y?{target:y}:void 0,x=r==null?void 0:r.status,b=x==="starting"||x==="running",w=_M({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:w.heading,children:w.heading}),w.sourceBadge?d.jsx("span",{className:"rounded-md border border-cyan-900/60 bg-cyan-950/20 px-2 py-0.5 text-xs font-medium text-cyan-300",children:w.sourceBadge}):null]}),w.meta?d.jsx("p",{className:"mt-1 text-sm text-gray-500",children:w.meta}):null,w.sourceContext.length>0?d.jsx("div",{className:"mt-2 flex flex-wrap items-center gap-2 text-xs text-gray-500",children:w.sourceContext.map(O=>d.jsxs("span",{children:[d.jsxs("span",{className:"text-gray-600",children:[O.label,":"]})," ",O.value]},`${O.label}:${O.value}`))}):null]}),d.jsxs("div",{className:"flex flex-wrap items-center gap-3 sm:justify-end",children:[!h&&b?d.jsx(Bp,{runId:t,status:x,isReadOnly:h,projectId:e}):d.jsx(o5,{results:(r==null?void 0:r.results)??[],runDir:r==null?void 0:r.run_dir,suiteFilter:r==null?void 0:r.suite_filter,target:y??void 0,projectId:e,isReadOnly:h,plannedTestCount:r==null?void 0:r.planned_test_count,runStatus:x}),x&&d.jsx(zp,{status:x}),!h&&!b&&d.jsx("button",{type:"button",onClick:()=>f(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Run evals"})]})]}),d.jsx(O5,{results:(r==null?void 0:r.results)??[],runId:t,projectId:e}),!h&&d.jsx(wl,{open:c,onClose:()=>f(!1),projectId:e,prefill:g})]})}const k5=Cr("/projects/$projectId_/jobs/$runId")({component:pse});function pse(){const{projectId:e,runId:t}=k5.useParams(),{data:r,isLoading:n,error:i}=Xb(t,e),{data:l}=yt(e),o=(l==null?void 0:l.read_only)===!0;if(n)return d.jsxs("div",{className:"space-y-4",children:[d.jsx(ox,{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(ox,{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(ox,{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(Bp,{runId:t,status:r.status,isReadOnly:o,projectId:e}),d.jsx(zp,{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 ox({projectId:e}){return d.jsx(_e,{to:"/projects/$projectId",params:{projectId:e},search:{tab:"runs"},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to Runs"})}const I5=Cr("/projects/$projectId_/experiments/$experimentName")({component:yse});function yse(){const{projectId:e,experimentName:t}=I5.useParams();return d.jsx(C5,{experimentName:t,projectId:e})}const L5=Cr("/projects/$projectId_/evals/$runId/$evalId")({component:gse});function gse(){const{projectId:e,runId:t,evalId:r}=L5.useParams(),{data:n,isLoading:i,error:l}=ud(e,t),{data:o}=yt(e),[c,f]=S.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,g=nl(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 ${g?"text-emerald-400":"text-red-400"}`,children:g?"✓":"✗"}),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(Fw,{eval:p,runId:t,projectId:e}),!h&&d.jsx(wl,{open:c,onClose:()=>f(!1),projectId:e,prefill:{testIds:[r],target:p.target}})]})}const $5=Cr("/projects/$projectId_/runs/$runId_/suite/$suite")({component:vse});function vse(){const{projectId:e,runId:t,suite:r}=$5.useParams(),{data:n,isLoading:i,error:l}=ud(e,t),{data:o}=yt(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(g=>d.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},g))})]});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(g=>(g.suite??"Uncategorized")===r),h=f.length,p=Um(f,c),y=f.reduce((g,x)=>g+(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(tu,{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(Hw,{results:f,runId:t,projectId:e,passThreshold:c,title:"Suite Evals"})]})}const z5=Cr("/projects/$projectId_/runs/$runId_/category/$category")({component:xse});function xse(){const{projectId:e,runId:t,category:r}=z5.useParams(),{data:n,isLoading:i,error:l}=He(xM(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,b)=>x+b.total,0),f=o.reduce((x,b)=>x+b.passed,0),h=o.reduce((x,b)=>x+b.failed,0),p=o.reduce((x,b)=>x+Xt(b),0),y=c-p,g=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(tu,{total:c,passed:f,failed:h,passRate:g,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(_e,{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,"/",RM(x)]})]}),d.jsx("div",{className:"mt-2",children:d.jsx(Rm,{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"]}),Xt(x)>0&&d.jsxs("span",{className:"text-amber-400",children:[Xt(x)," execution errors"]})]})]},x.name))})]})]})}const bse=_6.update({id:"/settings",path:"/settings",getParentRoute:()=>vr}),jse=$ae.update({id:"/",path:"/",getParentRoute:()=>vr}),wse=_5.update({id:"/runs/$runId",path:"/runs/$runId",getParentRoute:()=>vr}),Sse=E5.update({id:"/projects/$projectId",path:"/projects/$projectId",getParentRoute:()=>vr}),Nse=A5.update({id:"/jobs/$runId",path:"/jobs/$runId",getParentRoute:()=>vr}),Ose=T5.update({id:"/experiments/$experimentName",path:"/experiments/$experimentName",getParentRoute:()=>vr}),_se=P5.update({id:"/evals/$runId/$evalId",path:"/evals/$runId/$evalId",getParentRoute:()=>vr}),Ese=M5.update({id:"/runs/$runId_/suite/$suite",path:"/runs/$runId/suite/$suite",getParentRoute:()=>vr}),Ase=R5.update({id:"/runs/$runId_/category/$category",path:"/runs/$runId/category/$category",getParentRoute:()=>vr}),Cse=D5.update({id:"/projects/$projectId_/runs/$runId",path:"/projects/$projectId/runs/$runId",getParentRoute:()=>vr}),Tse=k5.update({id:"/projects/$projectId_/jobs/$runId",path:"/projects/$projectId/jobs/$runId",getParentRoute:()=>vr}),Pse=I5.update({id:"/projects/$projectId_/experiments/$experimentName",path:"/projects/$projectId/experiments/$experimentName",getParentRoute:()=>vr}),Mse=L5.update({id:"/projects/$projectId_/evals/$runId/$evalId",path:"/projects/$projectId/evals/$runId/$evalId",getParentRoute:()=>vr}),Rse=$5.update({id:"/projects/$projectId_/runs/$runId_/suite/$suite",path:"/projects/$projectId/runs/$runId/suite/$suite",getParentRoute:()=>vr}),Dse=z5.update({id:"/projects/$projectId_/runs/$runId_/category/$category",path:"/projects/$projectId/runs/$runId/category/$category",getParentRoute:()=>vr}),kse={IndexRoute:jse,SettingsRoute:bse,ExperimentsExperimentNameRoute:Ose,JobsRunIdRoute:Nse,ProjectsProjectIdRoute:Sse,RunsRunIdRoute:wse,EvalsRunIdEvalIdRoute:_se,ProjectsProjectIdExperimentsExperimentNameRoute:Pse,ProjectsProjectIdJobsRunIdRoute:Tse,ProjectsProjectIdRunsRunIdRoute:Cse,RunsRunIdCategoryCategoryRoute:Ase,RunsRunIdSuiteSuiteRoute:Ese,ProjectsProjectIdEvalsRunIdEvalIdRoute:Mse,ProjectsProjectIdRunsRunIdCategoryCategoryRoute:Dse,ProjectsProjectIdRunsRunIdSuiteSuiteRoute:Rse},Ise=vr._addFileChildren(kse)._addFileTypes(),Lse=new H$({defaultOptions:{queries:{staleTime:5e3,refetchOnWindowFocus:!0}}}),$se=G8({routeTree:Ise}),B5=document.getElementById("root");if(!B5)throw new Error("Root element not found");v$.createRoot(B5).render(d.jsx(S.StrictMode,{children:d.jsx(K$,{client:Lse,children:d.jsx(Q8,{router:$se})})}));export{Bo as W,S as r};