openmerit 0.1.12 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/README.md +11 -27
- package/dist/pi/scout-extension.mjs +23 -10
- package/dist/terminal/scout-update.json +1 -1
- package/dist/terminal/src/browser.mjs +2 -4
- package/dist/terminal/src/cli.mjs +6 -56
- package/dist/terminal/src/install.mjs +3 -2
- package/dist/terminal/src/scout-instructions.js +23 -10
- package/dist/terminal/src/scout-pi.js +1 -1
- package/dist/terminal/src/scout.js +181 -0
- package/dist/terminal/src/telemetry.mjs +8 -60
- package/docs/agent-evaluations.md +8 -148
- package/docs/commands.md +4 -86
- package/docs/getting-started.md +2 -16
- package/docs/index.md +4 -27
- package/docs/inference-terminal.md +13 -655
- package/docs/pi-extension.md +1 -1
- package/docs/roadmap.md +4 -17
- package/docs/scout.md +34 -251
- package/docs/security.md +8 -33
- package/docs/testing.md +7 -47
- package/docs/troubleshooting.md +3 -3
- package/package.json +13 -46
- package/dist/core/src/index.d.ts +0 -101
- package/dist/core/src/index.js +0 -1649
- package/dist/core/src/store.d.ts +0 -35
- package/dist/core/src/store.js +0 -102
- package/dist/eval/src/adapters.mjs +0 -112
- package/dist/eval/src/cli.mjs +0 -151
- package/dist/eval/src/config.mjs +0 -108
- package/dist/eval/src/process.mjs +0 -44
- package/dist/eval/src/report.mjs +0 -59
- package/dist/eval/src/runner.mjs +0 -123
- package/dist/eval/src/scout.mjs +0 -48
- package/dist/protocol/src/index.d.ts +0 -484
- package/dist/protocol/src/index.js +0 -47
- package/dist/protocol/src/schemas.d.ts +0 -576
- package/dist/protocol/src/schemas.js +0 -280
- package/dist/terminal/public/app.js +0 -298
- package/dist/terminal/public/brands/anthropic.png +0 -0
- package/dist/terminal/public/brands/baai.png +0 -0
- package/dist/terminal/public/brands/baseten.png +0 -0
- package/dist/terminal/public/brands/cerebras.png +0 -0
- package/dist/terminal/public/brands/cohere.png +0 -0
- package/dist/terminal/public/brands/deepseek.ico +0 -0
- package/dist/terminal/public/brands/google.png +0 -0
- package/dist/terminal/public/brands/groq.ico +0 -0
- package/dist/terminal/public/brands/huggingface.svg +0 -8
- package/dist/terminal/public/brands/lm-studio.png +0 -0
- package/dist/terminal/public/brands/meta.ico +0 -0
- package/dist/terminal/public/brands/mistral.png +0 -0
- package/dist/terminal/public/brands/nomic.png +0 -0
- package/dist/terminal/public/brands/ollama.png +0 -0
- package/dist/terminal/public/brands/openai.png +0 -0
- package/dist/terminal/public/brands/openrouter.png +0 -0
- package/dist/terminal/public/brands/qwen.png +0 -0
- package/dist/terminal/public/brands/vllm.ico +0 -0
- package/dist/terminal/public/brands/vllm.png +0 -0
- package/dist/terminal/public/favicon.svg +0 -1
- package/dist/terminal/public/flow.css +0 -1
- package/dist/terminal/public/flow.js +0 -770
- package/dist/terminal/public/index.html +0 -22
- package/dist/terminal/public/styles.css +0 -1046
- package/dist/terminal/src/activity-merge.mjs +0 -66
- package/dist/terminal/src/collect.mjs +0 -370
- package/dist/terminal/src/coverage.mjs +0 -33
- package/dist/terminal/src/demo-policy.mjs +0 -205
- package/dist/terminal/src/discovery.mjs +0 -99
- package/dist/terminal/src/enterprise-sample.mjs +0 -151
- package/dist/terminal/src/hardware.mjs +0 -57
- package/dist/terminal/src/history.mjs +0 -32
- package/dist/terminal/src/log-continuity.mjs +0 -26
- package/dist/terminal/src/project-activity.mjs +0 -157
- package/dist/terminal/src/repository-background.mjs +0 -37
- package/dist/terminal/src/repository-index.mjs +0 -267
- package/dist/terminal/src/repository-policy.mjs +0 -3
- package/dist/terminal/src/repository-syntax.mjs +0 -236
- package/dist/terminal/src/repository-worker.mjs +0 -15
- package/dist/terminal/src/sample.mjs +0 -171
- package/dist/terminal/src/scout-credentials.d.ts +0 -12
- package/dist/terminal/src/scout-credentials.ts +0 -44
- package/dist/terminal/src/scout-instructions.d.ts +0 -5
- package/dist/terminal/src/scout-instructions.ts +0 -106
- package/dist/terminal/src/scout-pi.d.ts +0 -44
- package/dist/terminal/src/scout-pi.ts +0 -76
- package/dist/terminal/src/server.mjs +0 -95
- package/dist/terminal/src/service-registry.mjs +0 -78
- package/dist/terminal/src/services.mjs +0 -44
- package/dist/terminal/src/topology.mjs +0 -30
- package/dist/terminal/src/updates.d.ts +0 -62
- package/dist/terminal/src/updates.ts +0 -313
- package/docs/adapter-guide.md +0 -191
- package/docs/architecture.md +0 -61
- package/docs/automation.md +0 -76
- package/docs/budgets.md +0 -39
- package/docs/demo-backfill.md +0 -31
- package/docs/demo-fieldkit.md +0 -49
- package/docs/demo-placement.md +0 -32
- package/docs/demo-spam.md +0 -17
- package/docs/demo-support.md +0 -44
- package/docs/demo.md +0 -74
- package/docs/first-trial.md +0 -62
- package/docs/interactive-demo.md +0 -118
- package/docs/lifecycle.md +0 -32
- package/docs/metrics-and-evidence.md +0 -48
- package/docs/operations.md +0 -40
- package/docs/pareto-spec.md +0 -76
- package/docs/ux-reference.md +0 -32
|
@@ -1,298 +0,0 @@
|
|
|
1
|
-
var DA=Object.create;var yg=Object.defineProperty;var xA=Object.getOwnPropertyDescriptor;var zA=Object.getOwnPropertyNames;var LA=Object.getPrototypeOf,kA=Object.prototype.hasOwnProperty;var Oa=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}};var UA=(e,t,n,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of zA(t))!kA.call(e,l)&&l!==n&&yg(e,l,{get:()=>t[l],enumerable:!(a=xA(t,l))||a.enumerable});return e};var Pa=(e,t,n)=>(n=e!=null?DA(LA(e)):{},UA(t||!e||!e.__esModule?yg(n,"default",{value:e,enumerable:!0}):n,e));var L0=Oa(te=>{"use strict";/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react.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 Ef=Symbol.for("react.transitional.element"),fT=Symbol.for("react.portal"),pT=Symbol.for("react.fragment"),mT=Symbol.for("react.strict_mode"),hT=Symbol.for("react.profiler"),gT=Symbol.for("react.consumer"),vT=Symbol.for("react.context"),yT=Symbol.for("react.forward_ref"),bT=Symbol.for("react.suspense"),ST=Symbol.for("react.memo"),_0=Symbol.for("react.lazy"),AT=Symbol.for("react.activity"),ET=Symbol.for("react.view_transition"),T0=Symbol.iterator;function TT(e){return e===null||typeof e!="object"?null:(e=T0&&e[T0]||e["@@iterator"],typeof e=="function"?e:null)}var R0={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C0=Object.assign,O0={};function ho(e,t,n){this.props=e,this.context=t,this.refs=O0,this.updater=n||R0}ho.prototype.isReactComponent={};ho.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};ho.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function N0(){}N0.prototype=ho.prototype;function Tf(e,t,n){this.props=e,this.context=t,this.refs=O0,this.updater=n||R0}var wf=Tf.prototype=new N0;wf.constructor=Tf;C0(wf,ho.prototype);wf.isPureReactComponent=!0;var w0=Array.isArray;function Af(){}var Ge={H:null,A:null,T:null,S:null},D0=Object.prototype.hasOwnProperty;function Mf(e,t,n){var a=n.ref;return{$$typeof:Ef,type:e,key:t,ref:a!==void 0?a:null,props:n}}function wT(e,t){return Mf(e.type,t,e.props)}function $f(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ef}function MT(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var M0=/\/+/g;function Sf(e,t){return typeof e=="object"&&e!==null&&e.key!=null?MT(""+e.key):t.toString(36)}function $T(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Af,Af):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function mo(e,t,n,a,l){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"bigint":case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case Ef:case fT:o=!0;break;case _0:return o=e._init,mo(o(e._payload),t,n,a,l)}}if(o)return l=l(e),o=a===""?"."+Sf(e,0):a,w0(l)?(n="",o!=null&&(n=o.replace(M0,"$&/")+"/"),mo(l,t,n,"",function(d){return d})):l!=null&&($f(l)&&(l=wT(l,n+(l.key==null||e&&e.key===l.key?"":(""+l.key).replace(M0,"$&/")+"/")+o)),t.push(l)),1;o=0;var s=a===""?".":a+":";if(w0(e))for(var r=0;r<e.length;r++)a=e[r],i=s+Sf(a,r),o+=mo(a,t,n,i,l);else if(r=TT(e),typeof r=="function")for(e=r.call(e),r=0;!(a=e.next()).done;)a=a.value,i=s+Sf(a,r++),o+=mo(a,t,n,i,l);else if(i==="object"){if(typeof e.then=="function")return mo($T(e),t,n,a,l);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return o}function _u(e,t,n){if(e==null)return e;var a=[],l=0;return mo(e,a,"","",function(i){return t.call(n,i,l++)}),a}function _T(e){if(e._status===-1){var t=e._result,n=t();n.then(function(a){(e._status===0||e._status===-1)&&(e._status=1,e._result=a,n.status===void 0&&(n.status="fulfilled",n.value=a))},function(a){(e._status===0||e._status===-1)&&(e._status=2,e._result=a,n.status===void 0&&(n.status="rejected",n.reason=a))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var $0=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function x0(e){var t=Ge.T,n={};n.types=t!==null?t.types:null,Ge.T=n;try{var a=e(),l=Ge.S;l!==null&&l(n,a),typeof a=="object"&&a!==null&&typeof a.then=="function"&&a.then(Af,$0)}catch(i){$0(i)}finally{t!==null&&n.types!==null&&(t.types=n.types),Ge.T=t}}function z0(e){var t=Ge.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else x0(z0.bind(null,e))}var RT={map:_u,forEach:function(e,t,n){_u(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return _u(e,function(){t++}),t},toArray:function(e){return _u(e,function(t){return t})||[]},only:function(e){if(!$f(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};te.Activity=AT;te.Children=RT;te.Component=ho;te.Fragment=pT;te.Profiler=hT;te.PureComponent=Tf;te.StrictMode=mT;te.Suspense=bT;te.ViewTransition=ET;te.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ge;te.__COMPILER_RUNTIME={__proto__:null,c:function(e){return Ge.H.useMemoCache(e)}};te.addTransitionType=z0;te.cache=function(e){return function(){return e.apply(null,arguments)}};te.cacheSignal=function(){return null};te.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var a=C0({},e.props),l=e.key;if(t!=null)for(i in t.key!==void 0&&(l=""+t.key),t)!D0.call(t,i)||i==="key"||i==="__self"||i==="__source"||i==="ref"&&t.ref===void 0||(a[i]=t[i]);var i=arguments.length-2;if(i===1)a.children=n;else if(1<i){for(var o=Array(i),s=0;s<i;s++)o[s]=arguments[s+2];a.children=o}return Mf(e.type,l,a)};te.createContext=function(e){return e={$$typeof:vT,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:gT,_context:e},e};te.createElement=function(e,t,n){var a,l={},i=null;if(t!=null)for(a in t.key!==void 0&&(i=""+t.key),t)D0.call(t,a)&&a!=="key"&&a!=="__self"&&a!=="__source"&&(l[a]=t[a]);var o=arguments.length-2;if(o===1)l.children=n;else if(1<o){for(var s=Array(o),r=0;r<o;r++)s[r]=arguments[r+2];l.children=s}if(e&&e.defaultProps)for(a in o=e.defaultProps,o)l[a]===void 0&&(l[a]=o[a]);return Mf(e,i,l)};te.createRef=function(){return{current:null}};te.forwardRef=function(e){return{$$typeof:yT,render:e}};te.isValidElement=$f;te.lazy=function(e){return{$$typeof:_0,_payload:{_status:-1,_result:e},_init:_T}};te.memo=function(e,t){return{$$typeof:ST,type:e,compare:t===void 0?null:t}};te.startTransition=x0;te.unstable_useCacheRefresh=function(){return Ge.H.useCacheRefresh()};te.use=function(e){return Ge.H.use(e)};te.useActionState=function(e,t,n){return Ge.H.useActionState(e,t,n)};te.useCallback=function(e,t){return Ge.H.useCallback(e,t)};te.useContext=function(e){return Ge.H.useContext(e)};te.useDebugValue=function(){};te.useDeferredValue=function(e,t){return Ge.H.useDeferredValue(e,t)};te.useEffect=function(e,t){return Ge.H.useEffect(e,t)};te.useEffectEvent=function(e){return Ge.H.useEffectEvent(e)};te.useId=function(){return Ge.H.useId()};te.useImperativeHandle=function(e,t,n){return Ge.H.useImperativeHandle(e,t,n)};te.useInsertionEffect=function(e,t){return Ge.H.useInsertionEffect(e,t)};te.useLayoutEffect=function(e,t){return Ge.H.useLayoutEffect(e,t)};te.useMemo=function(e,t){return Ge.H.useMemo(e,t)};te.useOptimistic=function(e,t){return Ge.H.useOptimistic(e,t)};te.useReducer=function(e,t,n){return Ge.H.useReducer(e,t,n)};te.useRef=function(e){return Ge.H.useRef(e)};te.useState=function(e){return Ge.H.useState(e)};te.useSyncExternalStore=function(e,t,n){return Ge.H.useSyncExternalStore(e,t,n)};te.useTransition=function(){return Ge.H.useTransition()};te.version="19.3.0"});var tl=Oa((_4,k0)=>{"use strict";k0.exports=L0()});var Q0=Oa(Fe=>{"use strict";/**
|
|
10
|
-
* @license React
|
|
11
|
-
* scheduler.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
|
-
*/function Of(e,t){var n=e.length;e.push(t);e:for(;0<n;){var a=n-1>>>1,l=e[a];if(0<Ru(l,t))e[a]=t,e[n]=l,n=a;else break e}}function Da(e){return e.length===0?null:e[0]}function Ou(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var a=0,l=e.length,i=l>>>1;a<i;){var o=2*(a+1)-1,s=e[o],r=o+1,d=e[r];if(0>Ru(s,n))r<l&&0>Ru(d,s)?(e[a]=d,e[r]=n,a=r):(e[a]=s,e[o]=n,a=o);else if(r<l&&0>Ru(d,n))e[a]=d,e[r]=n,a=r;else break e}}return t}function Ru(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}Fe.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(q0=performance,Fe.unstable_now=function(){return q0.now()}):(_f=Date,H0=_f.now(),Fe.unstable_now=function(){return _f.now()-H0});var q0,_f,H0,nl=[],kl=[],DT=1,Jn=null,Pt=3,Nf=!1,Ls=!1,ks=!1,Df=!1,Y0=typeof setTimeout=="function"?setTimeout:null,I0=typeof clearTimeout=="function"?clearTimeout:null,G0=typeof setImmediate<"u"?setImmediate:null;function Cu(e){for(var t=Da(kl);t!==null;){if(t.callback===null)Ou(kl);else if(t.startTime<=e)Ou(kl),t.sortIndex=t.expirationTime,Of(nl,t);else break;t=Da(kl)}}function xf(e){if(ks=!1,Cu(e),!Ls)if(Da(nl)!==null)Ls=!0,vo||(vo=!0,go());else{var t=Da(kl);t!==null&&zf(xf,t.startTime-e)}}var vo=!1,Us=-1,V0=5,X0=-1;function K0(){return Df?!0:!(Fe.unstable_now()-X0<V0)}function Rf(){if(Df=!1,vo){var e=Fe.unstable_now();X0=e;var t=!0;try{e:{Ls=!1,ks&&(ks=!1,I0(Us),Us=-1),Nf=!0;var n=Pt;try{t:{for(Cu(e),Jn=Da(nl);Jn!==null&&!(Jn.expirationTime>e&&K0());){var a=Jn.callback;if(typeof a=="function"){Jn.callback=null,Pt=Jn.priorityLevel;var l=a(Jn.expirationTime<=e);if(e=Fe.unstable_now(),typeof l=="function"){Jn.callback=l,Cu(e),t=!0;break t}Jn===Da(nl)&&Ou(nl),Cu(e)}else Ou(nl);Jn=Da(nl)}if(Jn!==null)t=!0;else{var i=Da(kl);i!==null&&zf(xf,i.startTime-e),t=!1}}break e}finally{Jn=null,Pt=n,Nf=!1}t=void 0}}finally{t?go():vo=!1}}}var go;typeof G0=="function"?go=function(){G0(Rf)}:typeof MessageChannel<"u"?(Cf=new MessageChannel,j0=Cf.port2,Cf.port1.onmessage=Rf,go=function(){j0.postMessage(null)}):go=function(){Y0(Rf,0)};var Cf,j0;function zf(e,t){Us=Y0(function(){e(Fe.unstable_now())},t)}Fe.unstable_IdlePriority=5;Fe.unstable_ImmediatePriority=1;Fe.unstable_LowPriority=4;Fe.unstable_NormalPriority=3;Fe.unstable_Profiling=null;Fe.unstable_UserBlockingPriority=2;Fe.unstable_cancelCallback=function(e){e.callback=null};Fe.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):V0=0<e?Math.floor(1e3/e):5};Fe.unstable_getCurrentPriorityLevel=function(){return Pt};Fe.unstable_next=function(e){switch(Pt){case 1:case 2:case 3:var t=3;break;default:t=Pt}var n=Pt;Pt=t;try{return e()}finally{Pt=n}};Fe.unstable_requestPaint=function(){Df=!0};Fe.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Pt;Pt=e;try{return t()}finally{Pt=n}};Fe.unstable_scheduleCallback=function(e,t,n){var a=Fe.unstable_now();switch(typeof n=="object"&&n!==null?(n=n.delay,n=typeof n=="number"&&0<n?a+n:a):n=a,e){case 1:var l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;default:l=5e3}return l=n+l,e={id:DT++,callback:t,priorityLevel:e,startTime:n,expirationTime:l,sortIndex:-1},n>a?(e.sortIndex=n,Of(kl,e),Da(nl)===null&&e===Da(kl)&&(ks?(I0(Us),Us=-1):ks=!0,zf(xf,n-a))):(e.sortIndex=l,Of(nl,e),Ls||Nf||(Ls=!0,vo||(vo=!0,go()))),e};Fe.unstable_shouldYield=K0;Fe.unstable_wrapCallback=function(e){var t=Pt;return function(){var n=Pt;Pt=t;try{return e.apply(this,arguments)}finally{Pt=n}}}});var F0=Oa((N4,Z0)=>{"use strict";Z0.exports=Q0()});var W0=Oa(Wt=>{"use strict";/**
|
|
18
|
-
* @license React
|
|
19
|
-
* react-dom.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 xT=tl();function P0(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function Ul(){}var un={d:{f:Ul,r:function(){throw Error(P0(522))},D:Ul,C:Ul,L:Ul,m:Ul,X:Ul,S:Ul,M:Ul},p:0,findDOMNode:null},zT=Symbol.for("react.portal"),LT=Symbol.for("react.recoverable"),J0=Symbol.for("react.optimistic_key");function kT(e,t,n){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:zT,key:a==null?null:a===J0?J0:""+a,children:e,containerInfo:t,implementation:n}}var Bs=xT.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function Nu(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Wt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=un;Wt.browser=function(e){return{$$typeof:LT,_reason:e}};Wt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(P0(299));return kT(e,t,null,n)};Wt.flushSync=function(e){var t=Bs.T,n=un.p;try{if(Bs.T=null,un.p=2,e)return e()}finally{Bs.T=t,un.p=n,un.d.f()}};Wt.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,un.d.C(e,t))};Wt.prefetchDNS=function(e){typeof e=="string"&&un.d.D(e)};Wt.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,a=Nu(n,t.crossOrigin),l=typeof t.integrity=="string"?t.integrity:void 0,i=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?un.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:a,integrity:l,fetchPriority:i}):n==="script"&&un.d.X(e,{crossOrigin:a,integrity:l,fetchPriority:i,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Wt.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var n=Nu(t.as,t.crossOrigin);un.d.M(e,{crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0})}}else t==null&&un.d.M(e)};Wt.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var n=t.as,a=Nu(n,t.crossOrigin);un.d.L(e,n,{crossOrigin:a,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};Wt.preloadModule=function(e,t){if(typeof e=="string")if(t){var n=Nu(t.as,t.crossOrigin);un.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0})}else un.d.m(e)};Wt.requestFormReset=function(e){un.d.r(e)};Wt.unstable_batchedUpdates=function(e,t){return e(t)};Wt.useFormState=function(e,t,n){return Bs.H.useFormState(e,t,n)};Wt.useFormStatus=function(){return Bs.H.useHostTransitionStatus()};Wt.version="19.3.0"});var nv=Oa((x4,tv)=>{"use strict";function ev(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ev)}catch(e){console.error(e)}}ev(),tv.exports=W0()});var jS=Oa(fd=>{"use strict";/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react-dom-client.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 Et=F0(),Gy=tl(),UT=nv();function x(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function jy(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Mr(e){for(var t=e,n=t;n&&!n.alternate;)t=n,(t.flags&4098)!==0&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function Yy(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Iy(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function av(e){if(Mr(e)!==e)throw Error(x(188))}function BT(e){var t=e.alternate;if(!t){if(t=Mr(e),t===null)throw Error(x(188));return t!==e?null:e}for(var n=e,a=t;;){var l=n.return;if(l===null)break;var i=l.alternate;if(i===null){if(a=l.return,a!==null){n=a;continue}break}if(l.child===i.child){for(i=l.child;i;){if(i===n)return av(l),e;if(i===a)return av(l),t;i=i.sibling}throw Error(x(188))}if(n.return!==a.return)n=l,a=i;else{for(var o=!1,s=l.child;s;){if(s===n){o=!0,n=l,a=i;break}if(s===a){o=!0,a=l,n=i;break}s=s.sibling}if(!o){for(s=i.child;s;){if(s===n){o=!0,n=i,a=l;break}if(s===a){o=!0,a=i,n=l;break}s=s.sibling}if(!o)throw Error(x(189))}}if(n.alternate!==a)throw Error(x(190))}if(n.tag!==3)throw Error(x(188));return n.stateNode.current===n?e:t}function Vy(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=Vy(e),t!==null)return t;e=e.sibling}return null}function $n(e,t,n,a,l,i){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,a,l,i)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&$n(e.child,t,n,a,l,i))return!0;e=e.sibling}return!1}function Ki(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function lv(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),!(e.tag===3||e.tag===5||e.tag===27));)e=e.return;return t}function Xy(e){var t=[null,null],n=Ki(e);return n===null||Ky(t,e,n.child,{foundSelf:!1}),t}function Ky(e,t,n,a){for(;n!==null;){if(n===t)a.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(a.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&Ky(e,t,n.child,a))return!0;n=n.sibling}return!1}function At(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(x(559))}}var wo=null,fp=null;function qT(e,t,n){return e===n?!0:e===t?(wo=e,!0):!1}function HT(e,t,n){return e===n?(fp=e,!1):e===t?(fp!==null&&(wo=e),!0):!1}function iv(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function pp(e,t,n){for(var a=0,l=e;l;l=n(l))a++;l=0;for(var i=t;i;i=n(i))l++;for(;0<a-l;)e=n(e),a--;for(;0<l-a;)t=n(t),l--;for(;a--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var qe=Object.assign,GT=Symbol.for("react.element"),Du=Symbol.for("react.transitional.element"),Vs=Symbol.for("react.portal"),Mo=Symbol.for("react.fragment"),Qy=Symbol.for("react.strict_mode"),mp=Symbol.for("react.profiler"),Zy=Symbol.for("react.consumer"),Ba=Symbol.for("react.context"),Tm=Symbol.for("react.forward_ref"),hp=Symbol.for("react.suspense"),gp=Symbol.for("react.suspense_list"),wm=Symbol.for("react.memo"),Gl=Symbol.for("react.lazy"),vp=Symbol.for("react.activity"),jT=Symbol.for("react.legacy_hidden"),YT=Symbol.for("react.memo_cache_sentinel"),yp=Symbol.for("react.view_transition"),IT=Symbol.for("react.recoverable"),ov=Symbol.iterator;function qs(e){return e===null||typeof e!="object"?null:(e=ov&&e[ov]||e["@@iterator"],typeof e=="function"?e:null)}var VT=Symbol.for("react.client.reference");function bp(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===VT?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Mo:return"Fragment";case mp:return"Profiler";case Qy:return"StrictMode";case hp:return"Suspense";case gp:return"SuspenseList";case vp:return"Activity";case yp:return"ViewTransition"}if(typeof e=="object")switch(e.$$typeof){case Vs:return"Portal";case Ba:return e.displayName||"Context";case Zy:return(e._context.displayName||"Context")+".Consumer";case Tm:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case wm:return t=e.displayName||null,t!==null?t:bp(e.type)||"Memo";case Gl:t=e._payload,e=e._init;try{return bp(e(t))}catch{}}return null}var Xs=Array.isArray,F=Gy.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ee=UT.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,zi={pending:!1,data:null,method:null,action:null},Sp=[],$o=-1;function Va(e){return{current:e}}function Gt(e){0>$o||(e.current=Sp[$o],Sp[$o]=null,$o--)}function Ie(e,t){$o++,Sp[$o]=e.current,e.current=t}var ja=Va(null),ur=Va(null),Fl=Va(null),yc=Va(null);function bc(e,t){switch(Ie(Fl,t),Ie(ur,e),Ie(ja,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Sy(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Sy(t),e=vS(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Gt(ja),Ie(ja,e)}function Xo(){Gt(ja),Gt(ur),Gt(Fl)}function Ap(e){var t=e.memoizedState;t!==null&&(ns._currentValue=t.memoizedState,Ie(yc,e)),t=ja.current;var n=vS(t,e.type);t!==n&&(Ie(ur,e),Ie(ja,n))}function Sc(e){ur.current===e&&(Gt(ja),Gt(ur)),yc.current===e&&(Gt(yc),ns._currentValue=zi)}var Lf,sv;function ql(e){if(Lf===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Lf=t&&t[1]||"",sv=-1<n.stack.indexOf(`
|
|
34
|
-
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
35
|
-
`+Lf+e+sv}var kf=!1;function Uf(e,t){if(!e||kf)return"";kf=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var p=function(){throw Error()};if(Object.defineProperty(p.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(p,[])}catch(v){var f=v}Reflect.construct(e,[],p)}else{try{p.call()}catch(v){f=v}p=!1;try{var c=Object.getOwnPropertyDescriptor(e.prototype,"props");Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),p=!0,new e}finally{p&&(c!==void 0?Object.defineProperty(e.prototype,"props",c):delete e.prototype.props)}}}else{try{throw Error()}catch(v){f=v}(p=e())&&typeof p.catch=="function"&&p.catch(function(){})}}catch(v){if(v&&f&&typeof v.stack=="string")return[v.stack,f.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var l=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");l&&l.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=a.DetermineComponentFrameRoot(),o=i[0],s=i[1];if(o&&s){var r=o.split(`
|
|
36
|
-
`),d=s.split(`
|
|
37
|
-
`);for(l=a=0;a<r.length&&!r[a].includes("DetermineComponentFrameRoot");)a++;for(;l<d.length&&!d[l].includes("DetermineComponentFrameRoot");)l++;if(a===r.length||l===d.length)for(a=r.length-1,l=d.length-1;1<=a&&0<=l&&r[a]!==d[l];)l--;for(;1<=a&&0<=l;a--,l--)if(r[a]!==d[l]){if(a!==1||l!==1)do if(a--,l--,0>l||r[a]!==d[l]){var u=`
|
|
38
|
-
`+r[a].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=a&&0<=l);break}}}finally{kf=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?ql(n):""}function XT(e,t){switch(e.tag){case 26:case 27:case 5:return ql(e.type);case 16:return ql("Lazy");case 13:return e.child!==t&&t!==null?ql("Suspense Fallback"):ql("Suspense");case 19:return ql("SuspenseList");case 0:case 15:return Uf(e.type,!1);case 11:return Uf(e.type.render,!1);case 1:return Uf(e.type,!0);case 31:return ql("Activity");case 30:return ql("ViewTransition");default:return""}}function rv(e){try{var t="",n=null;do t+=XT(e,n),n=e,e=e.return;while(e);return t}catch(a){return`
|
|
39
|
-
Error generating stack: `+a.message+`
|
|
40
|
-
`+a.stack}}var Ep=Object.prototype.hasOwnProperty,Mm=Et.unstable_scheduleCallback,Bf=Et.unstable_cancelCallback,KT=Et.unstable_shouldYield,QT=Et.unstable_requestPaint,Bn=Et.unstable_now,ZT=Et.unstable_getCurrentPriorityLevel,Fy=Et.unstable_ImmediatePriority,Jy=Et.unstable_UserBlockingPriority,Ac=Et.unstable_NormalPriority,FT=Et.unstable_LowPriority,Py=Et.unstable_IdlePriority,JT=Et.log,PT=Et.unstable_setDisableYieldValue,$r=null,qn=null;function Il(e){if(typeof JT=="function"&&PT(e),qn&&typeof qn.setStrictMode=="function")try{qn.setStrictMode($r,e)}catch{}}var Hn=Math.clz32?Math.clz32:tw,WT=Math.log,ew=Math.LN2;function tw(e){return e>>>=0,e===0?32:31-(WT(e)/ew|0)|0}var xu=256,zu=262144,Lu=4194304;function Ci(e){var t=e&42;if(t!==0)return t;switch(e&-e){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 e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Kc(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var l=0,i=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=a&134217727;return s!==0?(a=s&~i,a!==0?l=Ci(a):(o&=s,o!==0?l=Ci(o):n||(n=s&~e,n!==0&&(l=Ci(n))))):(s=a&~i,s!==0?l=Ci(s):o!==0?l=Ci(o):n||(n=a&~e,n!==0&&(l=Ci(n)))),l===0?0:t!==0&&t!==l&&(t&i)===0&&(i=l&-l,n=t&-t,i>=n||i===32&&(n&4194048)!==0)?t:l}function _r(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Wy(e,t){(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var a=31-Hn(n),l=1<<a;t|=e[a],n&=~l}return t}function nw(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 e1(){var e=Lu;return Lu<<=1,(Lu&62914560)===0&&(Lu=4194304),e}function qf(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Rr(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function aw(e,t,n,a,l,i){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,r=e.expirationTimes,d=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Hn(n),p=1<<u;s[u]=0,r[u]=-1;var f=d[u];if(f!==null)for(d[u]=null,u=0;u<f.length;u++){var c=f[u];c!==null&&(c.lane&=-536870913)}n&=~p}a!==0&&t1(e,a,0),i!==0&&l===0&&e.tag!==0&&(e.suspendedLanes|=i&~(o&~t))}function t1(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-Hn(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|n&261930}function n1(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-Hn(n),l=1<<a;l&t|e[a]&t&&(e[a]|=t),n&=~l}}function a1(e,t){var n=t&-t;return n=(n&42)!==0?1:$m(n),(n&(e.suspendedLanes|t))!==0?0:n}function $m(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function _m(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function l1(){var e=Ee.p;return e!==0?e:(e=window.event,e===void 0?32:qS(e.type))}function uv(e,t){var n=Ee.p;try{return Ee.p=e,t()}finally{Ee.p=n}}var hl=Math.random().toString(36).slice(2),qt="__reactFiber$"+hl,_n="__reactProps$"+hl,is="__reactContainer$"+hl,cv="__reactEvents$"+hl,lw="__reactListeners$"+hl,iw="__reactHandles$"+hl,dv="__reactResources$"+hl,Cr="__reactMarker$"+hl,Ec="__reactLoad$"+hl;function Qc(e){delete e[qt],delete e[_n],delete e[lw],delete e[iw]}function Di(e){var t;if(t=e[qt])return t;for(var n=e.parentNode;n;){if(t=n[is]||n[qt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Ry(e);e!==null;){if(n=e[qt])return n;e=Ry(e)}return t}e=n,n=e.parentNode}return null}function os(e){if(e=e[qt]||e[is]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ks(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(x(33))}function ko(e){var t=e[dv];return t||(t=e[dv]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ot(e){e[Cr]=!0}function i1(e){e[Ec]=void 0}var o1=new Set,s1={};function Qi(e,t){Ko(e,t),Ko(e+"Capture",t)}function Ko(e,t){for(s1[e]=t,e=0;e<t.length;e++)o1.add(t[e])}var ow=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]*$"),fv={},pv={};function sw(e){return Ep.call(pv,e)?!0:Ep.call(fv,e)?!1:ow.test(e)?pv[e]=!0:(fv[e]=!0,!1)}var ye=!1;function mv(){var e=ye;return ye=!1,e}function Wu(e,t,n){if(sw(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,n)}}function ku(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,n)}}function al(e,t,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,a)}}function zn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function r1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function rw(e,t,n){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var l=a.get,i=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(o){n=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Tp(e){if(!e._valueTracker){var t=r1(e)?"checked":"value";e._valueTracker=rw(e,t,""+e[t])}}function u1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=r1(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}var uw=/[\n"\\]/g;function na(e){return e.replace(uw,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function wp(e,t,n,a,l,i,o,s){e.name="",o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.type=o:e.removeAttribute("type"),t!=null?o==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+zn(t)):e.value!==""+zn(t)&&(e.value=""+zn(t)):o!=="submit"&&o!=="reset"||e.removeAttribute("value"),t!=null?o==="number"&&e.value==t?Hf(e,zn(e.value)):Hf(e,zn(t)):n!=null?Hf(e,zn(n)):a!=null&&e.removeAttribute("value"),l==null&&i!=null&&(e.defaultChecked=!!i),l!=null&&(e.checked=l&&typeof l!="function"&&typeof l!="symbol"),s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?e.name=""+zn(s):e.removeAttribute("name")}function c1(e,t,n,a,l,i,o,s){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||n!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){Tp(e);return}n=n!=null?""+zn(n):"",t=t!=null?""+zn(t):n,s||t===e.value||(e.value=t),e.defaultValue=t}a=a??l,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=s?e.checked:!!a,e.defaultChecked=!!a,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.name=o),Tp(e)}function Hf(e,t){e.defaultValue!==""+t&&(e.defaultValue=""+t)}function Uo(e,t,n,a){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&a&&(e[n].defaultSelected=!0)}else{for(n=""+zn(n),t=null,l=0;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,a&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function d1(e,t,n){if(t!=null&&(t=""+zn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+zn(n):""}function f1(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(x(92));if(Xs(a)){if(1<a.length)throw Error(x(93));a=a[0]}n=a}n==null&&(n=""),t=n}n=zn(t),e.defaultValue=n,a=e.textContent,a===n&&a!==""&&a!==null&&(e.value=a),Tp(e)}function Qo(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var cw=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 hv(e,t,n){var a=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,n):typeof n!="number"||n===0||cw.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function p1(e,t,n){if(t!=null&&typeof t!="object")throw Error(x(62));if(e=e.style,n!=null){for(var a in n)!n.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="",ye=!0);for(var l in t)a=t[l],t.hasOwnProperty(l)&&n[l]!==a&&(hv(e,l,a),ye=!0)}else for(var i in t)t.hasOwnProperty(i)&&hv(e,i,t[i])}function Rm(e){if(e.indexOf("-")===-1)return!1;switch(e){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 dw=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"],["maskType","mask-type"],["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"]]),fw=/^[\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 ec(e){return fw.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function qa(){}var Mp=null;function Cm(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var _o=null,Bo=null;function gv(e){var t=os(e);if(t&&(e=t.stateNode)){var n=e[_n]||null;e:switch(e=t.stateNode,t.type){case"input":if(wp(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+na(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var l=a[_n]||null;if(!l)throw Error(x(90));wp(a,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name)}}for(t=0;t<n.length;t++)a=n[t],a.form===e.form&&u1(a)}break e;case"textarea":d1(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Uo(e,!!n.multiple,t,!1)}}}var Gf=!1;function m1(e,t,n){if(Gf)return e(t,n);Gf=!0;try{var a=e(t);return a}finally{if(Gf=!1,(_o!==null||Bo!==null)&&(rd(),_o&&(t=_o,e=Bo,Bo=_o=null,gv(t),e)))for(t=0;t<e.length;t++)gv(e[t])}}function cr(e,t){var n=e.stateNode;if(n===null)return null;var a=n[_n]||null;if(a===null)return null;n=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(x(231,t,typeof n));return n}var ul=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),$p=!1;if(ul)try{yo={},Object.defineProperty(yo,"passive",{get:function(){$p=!0}}),window.addEventListener("test",yo,yo),window.removeEventListener("test",yo,yo)}catch{$p=!1}var yo,Vl=null,Om=null,tc=null;function h1(){if(tc)return tc;var e,t=Om,n=t.length,a,l="value"in Vl?Vl.value:Vl.textContent,i=l.length;for(e=0;e<n&&t[e]===l[e];e++);var o=n-e;for(a=1;a<=o&&t[n-a]===l[i-a];a++);return tc=l.slice(e,1<a?1-a:void 0)}function nc(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Uu(){return!0}function vv(){return!1}function pn(e){function t(n,a,l,i,o){this._reactName=n,this._targetInst=l,this.type=a,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(n=e[s],this[s]=n?n(i):i[s]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Uu:vv,this.isPropagationStopped=vv,this}return qe(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Uu)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Uu)},persist:function(){},isPersistent:Uu}),t}var di={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Zc=pn(di),Or=qe({},di,{view:0,detail:0}),pw=pn(Or),jf,Yf,Hs,Fc=qe({},Or,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Nm,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Hs&&(Hs&&e.type==="mousemove"?(jf=e.screenX-Hs.screenX,Yf=e.screenY-Hs.screenY):Yf=jf=0,Hs=e),jf)},movementY:function(e){return"movementY"in e?e.movementY:Yf}}),yv=pn(Fc),mw=qe({},Fc,{dataTransfer:0}),hw=pn(mw),gw=qe({},Or,{relatedTarget:0}),If=pn(gw),vw=qe({},di,{animationName:0,elapsedTime:0,pseudoElement:0}),yw=pn(vw),bw=qe({},di,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Sw=pn(bw),Aw=qe({},di,{data:0}),bv=pn(Aw),Ew={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Tw={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"},ww={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Mw(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=ww[e])?!!t[e]:!1}function Nm(){return Mw}var $w=qe({},Or,{key:function(e){if(e.key){var t=Ew[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=nc(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Tw[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Nm,charCode:function(e){return e.type==="keypress"?nc(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?nc(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),_w=pn($w),Rw=qe({},Fc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Sv=pn(Rw),Cw=qe({},di,{submitter:0}),Ow=pn(Cw),Nw=qe({},Or,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Nm}),Dw=pn(Nw),xw=qe({},di,{propertyName:0,elapsedTime:0,pseudoElement:0}),zw=pn(xw),Lw=qe({},Fc,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),kw=pn(Lw),Uw=qe({},di,{newState:0,oldState:0,source:0}),Bw=pn(Uw),qw=[9,13,27,32],Dm=ul&&"CompositionEvent"in window,Fs=null;ul&&"documentMode"in document&&(Fs=document.documentMode);var Hw=ul&&"TextEvent"in window&&!Fs,g1=ul&&(!Dm||Fs&&8<Fs&&11>=Fs),Av=" ",Ev=!1;function v1(e,t){switch(e){case"keyup":return qw.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function y1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ro=!1;function Gw(e,t){switch(e){case"compositionend":return y1(t);case"keypress":return t.which!==32?null:(Ev=!0,Av);case"textInput":return e=t.data,e===Av&&Ev?null:e;default:return null}}function jw(e,t){if(Ro)return e==="compositionend"||!Dm&&v1(e,t)?(e=h1(),tc=Om=Vl=null,Ro=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return g1&&t.locale!=="ko"?null:t.data;default:return null}}var Yw={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 Tv(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Yw[e.type]:t==="textarea"}function b1(e,t,n,a){_o?Bo?Bo.push(a):Bo=[a]:_o=a,t=Ic(t,"onChange"),0<t.length&&(n=new Zc("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var Js=null,dr=null;function Iw(e){mS(e,0)}function Jc(e){var t=Ks(e);if(u1(t))return e}function wv(e,t){if(e==="change")return t}var S1=!1;ul&&(ul?(qu="oninput"in document,qu||(Vf=document.createElement("div"),Vf.setAttribute("oninput","return;"),qu=typeof Vf.oninput=="function"),Bu=qu):Bu=!1,S1=Bu&&(!document.documentMode||9<document.documentMode));var Bu,qu,Vf;function Mv(){Js&&(Js.detachEvent("onpropertychange",A1),dr=Js=null)}function A1(e){if(e.propertyName==="value"&&Jc(dr)){var t=[];b1(t,dr,e,Cm(e)),m1(Iw,t)}}function Vw(e,t,n){e==="focusin"?(Mv(),Js=t,dr=n,Js.attachEvent("onpropertychange",A1)):e==="focusout"&&Mv()}function Xw(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Jc(dr)}function Kw(e,t){if(e==="click")return Jc(t)}function Qw(e,t){if(e==="input"||e==="change")return Jc(t)}function Zw(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var jn=typeof Object.is=="function"?Object.is:Zw;function fr(e,t){if(jn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(a=0;a<n.length;a++){var l=n[a];if(!Ep.call(t,l)||!jn(e[l],t[l]))return!1}return!0}function _p(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function $v(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function _v(e,t){var n=$v(e);e=0;for(var a;n;){if(n.nodeType===3){if(a=e+n.textContent.length,e<=t&&a>=t)return{node:n,offset:t-e};e=a}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=$v(n)}}function E1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?E1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function T1(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=_p(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=_p(e.document)}return t}function xm(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Fw=ul&&"documentMode"in document&&11>=document.documentMode,Co=null,Rp=null,Ps=null,Cp=!1;function Rv(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Cp||Co==null||Co!==_p(a)||(a=Co,"selectionStart"in a&&xm(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Ps&&fr(Ps,a)||(Ps=a,a=Ic(Rp,"onSelect"),0<a.length&&(t=new Zc("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=Co)))}function _i(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Oo={animationend:_i("Animation","AnimationEnd"),animationiteration:_i("Animation","AnimationIteration"),animationstart:_i("Animation","AnimationStart"),transitionrun:_i("Transition","TransitionRun"),transitionstart:_i("Transition","TransitionStart"),transitioncancel:_i("Transition","TransitionCancel"),transitionend:_i("Transition","TransitionEnd")},Xf={},w1={};ul&&(w1=document.createElement("div").style,"AnimationEvent"in window||(delete Oo.animationend.animation,delete Oo.animationiteration.animation,delete Oo.animationstart.animation),"TransitionEvent"in window||delete Oo.transitionend.transition);function Zi(e){if(Xf[e])return Xf[e];if(!Oo[e])return e;var t=Oo[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in w1)return Xf[e]=t[n];return e}var M1=Zi("animationend"),$1=Zi("animationiteration"),_1=Zi("animationstart"),Jw=Zi("transitionrun"),Pw=Zi("transitionstart"),Ww=Zi("transitioncancel"),R1=Zi("transitionend"),C1=new Map,Op="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError 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(" ");Op.push("scrollEnd");function Sa(e,t){C1.set(e,t),Qi(t,[e])}var eM=0;function cl(e,t){if(e.name!=null&&e.name!=="auto")return e.name;if(t.autoName!==null)return t.autoName;e=ba.identifierPrefix;var n=eM++;return e="_"+e+"t_"+n.toString(32)+"_",t.autoName=e}function Cv(e){if(e==null||typeof e=="string")return e;var t=null,n=Vo;if(n!==null)for(var a=0;a<n.length;a++){var l=e[n[a]];if(l!=null){if(l==="none")return"none";t=t==null?l:t+(" "+l)}}return t??e.default}function gl(e,t){return e=Cv(e),t=Cv(t),t==null?e==="auto"?null:e:t==="auto"?null:t}var Tc=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Wn=[],No=0,zm=0;function Pc(){for(var e=No,t=zm=No=0;t<e;){var n=Wn[t];Wn[t++]=null;var a=Wn[t];Wn[t++]=null;var l=Wn[t];Wn[t++]=null;var i=Wn[t];if(Wn[t++]=null,a!==null&&l!==null){var o=a.pending;o===null?l.next=l:(l.next=o.next,o.next=l),a.pending=l}i!==0&&O1(n,l,i)}}function Wc(e,t,n,a){Wn[No++]=e,Wn[No++]=t,Wn[No++]=n,Wn[No++]=a,zm|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Lm(e,t,n,a){return Wc(e,t,n,a),wc(e)}function Fi(e,t){return Wc(e,null,null,t),wc(e)}function O1(e,t,n){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n);for(var l=!1,i=e.return;i!==null;)i.childLanes|=n,a=i.alternate,a!==null&&(a.childLanes|=n),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(l=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,l&&t!==null&&(l=31-Hn(n),e=i.hiddenUpdates,a=e[l],a===null?e[l]=[t]:a.push(t),t.lane=n|536870912),i):null}function wc(e){if(50<rr)throw rr=0,fc=null,Error(x(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Do={};function tM(e,t,n,a){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function wn(e,t,n,a){return new tM(e,t,n,a)}function km(e){return e=e.prototype,!(!e||!e.isReactComponent)}function sl(e,t){var n=e.alternate;return n===null?(n=wn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&1206910976,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function N1(e,t){e.flags&=1206910978;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ac(e,t,n,a,l,i){var o=0;if(a=e,typeof a=="function")km(a)&&(o=1);else if(typeof a=="string")o=_3(e,n,ja.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(a){case vp:return e=wn(31,n,t,l),e.elementType=vp,e.lanes=i,e;case Mo:return Li(n.children,l,i,t);case Qy:o=8,l|=24;break;case mp:return e=wn(12,n,t,l|2),e.elementType=mp,e.lanes=i,e;case hp:return e=wn(13,n,t,l),e.elementType=hp,e.lanes=i,e;case gp:return e=wn(19,n,t,l),e.elementType=gp,e.lanes=i,e;case jT:case yp:return e=l|32,e=wn(30,n,t,e),e.elementType=yp,e.lanes=i,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case Ba:o=10;break e;case Zy:o=9;break e;case Tm:o=11;break e;case wm:o=14;break e;case Gl:o=16,a=null;break e}o=29,n=Error(x(130,e===null?"null":typeof e,"")),a=null}return t=wn(o,n,t,l),t.elementType=e,t.type=a,t.lanes=i,t}function Li(e,t,n,a){return e=wn(7,e,a,t),e.lanes=n,e}function Kf(e,t,n){return e=wn(6,e,null,t),e.lanes=n,e}function D1(e){var t=wn(18,null,null,0);return t.stateNode=e,t}function Qf(e,t,n){return t=wn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ov=new WeakMap;function aa(e,t){if(typeof e=="object"&&e!==null){var n=Ov.get(e);return n!==void 0?n:(t={value:e,source:t,stack:rv(t)},Ov.set(e,t),t)}return{value:e,source:t,stack:rv(t)}}var xo=[],zo=0,Mc=null,pr=0,ea=[],ta=0,oi=null,Ha=1,Ga="";function il(e,t){xo[zo++]=pr,xo[zo++]=Mc,Mc=e,pr=t}function x1(e,t,n){ea[ta++]=Ha,ea[ta++]=Ga,ea[ta++]=oi,oi=e;var a=Ha;e=Ga;var l=32-Hn(a)-1;a&=~(1<<l),n+=1;var i=32-Hn(t)+l;if(30<i){var o=l-l%5;i=(a&(1<<o)-1).toString(32),a>>=o,l-=o,Ha=1<<32-Hn(t)+l|n<<l|a,Ga=i+e}else Ha=1<<i|n<<l|a,Ga=e}function ed(e){e.return!==null&&(il(e,1),x1(e,1,0))}function Um(e){for(;e===Mc;)Mc=xo[--zo],xo[zo]=null,pr=xo[--zo],xo[zo]=null;for(;e===oi;)oi=ea[--ta],ea[ta]=null,Ga=ea[--ta],ea[ta]=null,Ha=ea[--ta],ea[ta]=null}function z1(e,t){ea[ta++]=Ha,ea[ta++]=Ga,ea[ta++]=oi,Ha=t.id,Ga=t.overflow,oi=e}var Nt=null,Ye=null,re=!1,Jl=null,la=!1,Np=Error(x(519));function si(e){var t=Error(x(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw mr(aa(t,e)),Np}function Nv(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[qt]=e,t[_n]=a,n){case"dialog":ce("cancel",t),ce("close",t);break;case"iframe":case"object":case"embed":ce("load",t);break;case"video":case"audio":for(n=0;n<yr.length;n++)ce(yr[n],t);break;case"source":ce("error",t);break;case"img":case"image":case"link":ce("error",t),ce("load",t);break;case"details":ce("toggle",t);break;case"input":ce("invalid",t),c1(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":ce("invalid",t);break;case"textarea":ce("invalid",t),f1(t,a.value,a.defaultValue,a.children)}n=a.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||a.suppressHydrationWarning===!0||gS(t.textContent,n)?(a.popover!=null&&(ce("beforetoggle",t),ce("toggle",t)),a.onScroll!=null&&ce("scroll",t),a.onScrollEnd!=null&&ce("scrollend",t),a.onClick!=null&&(t.onclick=qa),t=!0):t=!1,t||si(e,!0)}function $c(e){for(Nt=e.return;Nt;)switch(Nt.tag){case 5:case 31:case 13:la=!1;return;case 27:case 3:la=!0;return;default:Nt=Nt.return}}function bo(e){if(e!==Nt)return!1;if(!re)return $c(e),re=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||hm(e.type,e.memoizedProps)),n=!n),n&&Ye&&si(e),$c(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(x(317));Ye=_y(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(x(317));Ye=_y(e)}else t===27?(t=Ye,fi(e.type)?(e=bm,bm=null,Ye=e):Ye=t):Ye=Nt?ia(e.stateNode.nextSibling):null;return!0}function qi(){Ye=Nt=null,re=!1}function Zf(){var e=Jl;return e!==null&&(En===null?En=e:En.push.apply(En,e),Jl=null),e}function mr(e){Jl===null?Jl=[e]:Jl.push(e)}var Dp=Va(null),Ji=null,ol=null;function Xl(e,t,n){Ie(Dp,t._currentValue),t._currentValue=n}function rl(e){e._currentValue=Dp.current,Gt(Dp)}function lc(e,t,n){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===n)break;e=e.return}}function xp(e,t,n,a){var l=e.child;for(l!==null&&(l.return=e);l!==null;){var i=l.dependencies;if(i!==null){var o=l.child;i=i.firstContext;e:for(;i!==null;){var s=i;i=l;for(var r=0;r<t.length;r++)if(s.context===t[r]){i.lanes|=n,s=i.alternate,s!==null&&(s.lanes|=n),lc(i.return,n,e),a||(o=null);break e}i=s.next}}else if(l.tag===18){if(o=l.return,o===null)throw Error(x(341));o.lanes|=n,i=o.alternate,i!==null&&(i.lanes|=n),lc(o,n,e),o=null}else l.tag===13&&l.memoizedState!==null&&l.memoizedState.dehydrated===null?(l.lanes|=n,o=l.alternate,o!==null&&(o.lanes|=n),lc(l.return,n,e),o=l.child,o=o!==null?o.sibling:null):o=l.child;if(o!==null)o.return=l;else for(o=l;o!==null;){if(o===e){o=null;break}if(l=o.sibling,l!==null){l.return=o.return,o=l;break}o=o.return}l=o}}function Hi(e,t,n,a){e=null;for(var l=t,i=!1;l!==null;){if(!i){if((l.flags&524288)!==0)i=!0;else if((l.flags&262144)!==0)break}if(l.tag===10){var o=l.alternate;if(o===null)throw Error(x(387));if(o=o.memoizedProps,o!==null){var s=l.type;jn(l.pendingProps.value,o.value)||(e!==null?e.push(s):e=[s])}}else if(l===yc.current){if(o=l.alternate,o===null)throw Error(x(387));o.memoizedState.memoizedState!==l.memoizedState.memoizedState&&(e!==null?e.push(ns):e=[ns])}l=l.return}return e!==null&&xp(t,e,n,a),t.flags|=262144,e!==null}function _c(e){for(e=e.firstContext;e!==null;){if(!jn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Gi(e){Ji=e,ol=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ht(e){return L1(Ji,e)}function Hu(e,t){return Ji===null&&Gi(e),L1(e,t)}function L1(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ol===null){if(e===null)throw Error(x(308));ol=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ol=ol.next=t;return n}var nM=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},aM=Et.unstable_scheduleCallback,lM=Et.unstable_NormalPriority,vt={$$typeof:Ba,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Bm(){return{controller:new nM,data:new Map,refCount:0}}function Nr(e){e.refCount--,e.refCount===0&&aM(lM,function(){e.controller.abort()})}function Dv(e,t){if((e.pendingLanes&4194048)!==0){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var a=t[e];n.indexOf(a)===-1&&n.push(a)}}}var Qs=null;function iM(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Ws=null,zp=0,ji=0,qo=null;function oM(e,t){if(Ws===null){var n=Ws=[];zp=0,ji=fh(),qo={status:"pending",value:void 0,then:function(a){n.push(a)}}}return zp++,t.then(xv,xv),t}function xv(){if(--zp===0&&(Qs=null,Ws!==null)){qo!==null&&(qo.status="fulfilled");var e=Ws;Ws=null,ji=0,qo=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function sM(e,t){var n=[],a={status:"pending",value:null,reason:null,then:function(l){n.push(l)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var l=0;l<n.length;l++)(0,n[l])(t)},function(l){for(a.status="rejected",a.reason=l,l=0;l<n.length;l++)(0,n[l])(void 0)}),a}var zv=F.S;F.S=function(e,t){if(Wb=Bn(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&oM(e,t),Qs!==null)for(var n=Wo;n!==null;)Dv(n,Qs),n=n.next;if(n=e.types,n!==null){for(var a=Wo;a!==null;)Dv(a,n),a=a.next;if(ji!==0){a=Qs,a===null&&(a=Qs=[]);for(var l=0;l<n.length;l++){var i=n[l];a.indexOf(i)===-1&&a.push(i)}}}zv!==null&&zv(e,t)};var ki=Va(null);function qm(){var e=ki.current;return e!==null?e:Be.pooledCache}function ic(e,t){t===null?Ie(ki,ki.current):Ie(ki,t.pool)}function k1(){var e=qm();return e===null?null:{parent:vt._currentValue,pool:e}}var ss=Error(x(460)),Hm=Error(x(474)),td=Error(x(542)),Rc={then:function(){}};function Lv(e){return e=e.status,e==="fulfilled"||e==="rejected"}function U1(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(qa,qa),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Uv(e),e===void 0&&!("reason"in t)?Error(x(600)):e;default:if(typeof t.status=="string")t.then(qa,qa);else{if(e=Be,e!==null&&100<e.shellSuspendCounter)throw Error(x(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var l=t;l.status="fulfilled",l.value=a}},function(a){if(t.status==="pending"){var l=t;l.status="rejected",l.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Uv(e),e}throw Ui=t,ss}}function Oi(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Ui=n,ss):n}}var Ui=null;function kv(){if(Ui===null)throw Error(x(459));var e=Ui;return Ui=null,e}function Uv(e){if(e===ss||e===td)throw Error(x(483))}var Ho=null,hr=0;function Gu(e){var t=hr;return hr+=1,Ho===null&&(Ho=[]),U1(Ho,e,t)}function Bl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ju(e,t){throw t.$$typeof===GT?Error(x(525)):(e=Object.prototype.toString.call(t),Error(x(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function B1(e){function t(m,h){if(e){var g=m.deletions;g===null?(m.deletions=[h],m.flags|=16):g.push(h)}}function n(m,h){if(!e)return null;for(;h!==null;)t(m,h),h=h.sibling;return null}function a(m){for(var h=new Map;m!==null;)m.key===null?h.set(m.index,m):h.set(m.key,m),m=m.sibling;return h}function l(m,h){return m=sl(m,h),m.index=0,m.sibling=null,m}function i(m,h,g){return m.index=g,e?(g=m.alternate,g!==null?(g=g.index,g<h?(m.flags|=2,h):g):(m.flags|=134217730,h)):(m.flags|=1048576,h)}function o(m){return e&&m.alternate===null&&(m.flags|=134217730),m}function s(m,h,g,b){return h===null||h.tag!==6?(h=Kf(g,m.mode,b),h.return=m,h):(h=l(h,g),h.return=m,h)}function r(m,h,g,b){var M=g.type;return M===Mo?(m=u(m,h,g.props.children,b,g.key),Bl(m,g),m):h!==null&&(h.elementType===M||typeof M=="object"&&M!==null&&M.$$typeof===Gl&&Oi(M)===h.type)?(h=l(h,g.props),Bl(h,g),h.return=m,h):(h=ac(g.type,g.key,g.props,null,m.mode,b),Bl(h,g),h.return=m,h)}function d(m,h,g,b){return h===null||h.tag!==4||h.stateNode.containerInfo!==g.containerInfo||h.stateNode.implementation!==g.implementation?(h=Qf(g,m.mode,b),h.return=m,h):(h=l(h,g.children||[]),h.return=m,h)}function u(m,h,g,b,M){return h===null||h.tag!==7?(h=Li(g,m.mode,b,M),h.return=m,h):(h=l(h,g),h.return=m,h)}function p(m,h,g){if(typeof h=="string"&&h!==""||typeof h=="number"||typeof h=="bigint")return h=Kf(""+h,m.mode,g),h.return=m,h;if(typeof h=="object"&&h!==null){switch(h.$$typeof){case Du:return g=ac(h.type,h.key,h.props,null,m.mode,g),Bl(g,h),g.return=m,g;case Vs:return h=Qf(h,m.mode,g),h.return=m,h;case Gl:return h=Oi(h),p(m,h,g)}if(Xs(h)||qs(h))return h=Li(h,m.mode,g,null),h.return=m,h;if(typeof h.then=="function")return p(m,Gu(h),g);if(h.$$typeof===Ba)return p(m,Hu(m,h),g);ju(m,h)}return null}function f(m,h,g,b){var M=h!==null?h.key:null;if(typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint")return M!==null?null:s(m,h,""+g,b);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Du:return g.key===M?r(m,h,g,b):null;case Vs:return g.key===M?d(m,h,g,b):null;case Gl:return g=Oi(g),f(m,h,g,b)}if(Xs(g)||qs(g))return M!==null?null:u(m,h,g,b,null);if(typeof g.then=="function")return f(m,h,Gu(g),b);if(g.$$typeof===Ba)return f(m,h,Hu(m,g),b);ju(m,g)}return null}function c(m,h,g,b,M){if(typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint")return m=m.get(g)||null,s(h,m,""+b,M);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Du:return m=m.get(b.key===null?g:b.key)||null,r(h,m,b,M);case Vs:return m=m.get(b.key===null?g:b.key)||null,d(h,m,b,M);case Gl:return b=Oi(b),c(m,h,g,b,M)}if(Xs(b)||qs(b))return m=m.get(g)||null,u(h,m,b,M,null);if(typeof b.then=="function")return c(m,h,g,Gu(b),M);if(b.$$typeof===Ba)return c(m,h,g,Hu(h,b),M);ju(h,b)}return null}function v(m,h,g,b){for(var M=null,$=null,w=h,T=h=0,O=null;w!==null&&T<g.length;T++){w.index>T?(O=w,w=null):O=w.sibling;var E=f(m,w,g[T],b);if(E===null){w===null&&(w=O);break}e&&w&&E.alternate===null&&t(m,w),h=i(E,h,T),$===null?M=E:$.sibling=E,$=E,w=O}if(T===g.length)return n(m,w),re&&il(m,T),M;if(w===null){for(;T<g.length;T++)w=p(m,g[T],b),w!==null&&(h=i(w,h,T),$===null?M=w:$.sibling=w,$=w);return re&&il(m,T),M}for(w=a(w);T<g.length;T++)O=c(w,m,T,g[T],b),O!==null&&(e&&(E=O.alternate,E!==null&&w.delete(E.key===null?T:E.key)),h=i(O,h,T),$===null?M=O:$.sibling=O,$=O);return e&&w.forEach(function(_){return t(m,_)}),re&&il(m,T),M}function S(m,h,g,b){if(g==null)throw Error(x(151));for(var M=null,$=null,w=h,T=h=0,O=null,E=g.next();w!==null&&!E.done;T++,E=g.next()){w.index>T?(O=w,w=null):O=w.sibling;var _=f(m,w,E.value,b);if(_===null){w===null&&(w=O);break}e&&w&&_.alternate===null&&t(m,w),h=i(_,h,T),$===null?M=_:$.sibling=_,$=_,w=O}if(E.done)return n(m,w),re&&il(m,T),M;if(w===null){for(;!E.done;T++,E=g.next())E=p(m,E.value,b),E!==null&&(h=i(E,h,T),$===null?M=E:$.sibling=E,$=E);return re&&il(m,T),M}for(w=a(w);!E.done;T++,E=g.next())E=c(w,m,T,E.value,b),E!==null&&(e&&(O=E.alternate,O!==null&&w.delete(O.key===null?T:O.key)),h=i(E,h,T),$===null?M=E:$.sibling=E,$=E);return e&&w.forEach(function(C){return t(m,C)}),re&&il(m,T),M}function y(m,h,g,b){if(typeof g=="object"&&g!==null&&g.type===Mo&&g.key===null&&g.props.ref===void 0&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case Du:e:{for(var M=g.key;h!==null;){if(h.key===M){if(M=g.type,M===Mo){if(h.tag===7){n(m,h.sibling),b=l(h,g.props.children),Bl(b,g),b.return=m,m=b;break e}}else if(h.elementType===M||typeof M=="object"&&M!==null&&M.$$typeof===Gl&&Oi(M)===h.type){n(m,h.sibling),b=l(h,g.props),Bl(b,g),b.return=m,m=b;break e}n(m,h);break}else t(m,h);h=h.sibling}g.type===Mo?(b=Li(g.props.children,m.mode,b,g.key),Bl(b,g),b.return=m,m=b):(b=ac(g.type,g.key,g.props,null,m.mode,b),Bl(b,g),b.return=m,m=b)}return o(m);case Vs:e:{for(M=g.key;h!==null;){if(h.key===M)if(h.tag===4&&h.stateNode.containerInfo===g.containerInfo&&h.stateNode.implementation===g.implementation){n(m,h.sibling),b=l(h,g.children||[]),b.return=m,m=b;break e}else{n(m,h);break}else t(m,h);h=h.sibling}b=Qf(g,m.mode,b),b.return=m,m=b}return o(m);case Gl:return g=Oi(g),y(m,h,g,b)}if(Xs(g))return v(m,h,g,b);if(qs(g)){if(M=qs(g),typeof M!="function")throw Error(x(150));return g=M.call(g),S(m,h,g,b)}if(typeof g.then=="function")return y(m,h,Gu(g),b);if(g.$$typeof===Ba)return y(m,h,Hu(m,g),b);ju(m,g)}return typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint"?(g=""+g,h!==null&&h.tag===6?(n(m,h.sibling),b=l(h,g),b.return=m,m=b):(n(m,h),b=Kf(g,m.mode,b),b.return=m,m=b),o(m)):n(m,h)}return function(m,h,g,b){try{hr=0;var M=y(m,h,g,b);return Ho=null,M}catch(w){if(w===ss||w===td)throw w;var $=wn(29,w,null,m.mode);return $.lanes=b,$.return=m,$}}}var Yi=B1(!0),q1=B1(!1),jl=!1;function Gm(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Lp(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Pl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Wl(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Ae&2)!==0){var l=a.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),a.pending=t,t=wc(e),O1(e,null,n),t}return Wc(e,a,t,n),wc(e)}function er(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,n1(e,n)}}function Ff(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var l=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};i===null?l=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?l=i=t:i=i.next=t}else l=i=t;n={baseState:a.baseState,firstBaseUpdate:l,lastBaseUpdate:i,shared:a.shared,callbacks:a.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var kp=!1;function tr(){if(kp){var e=qo;if(e!==null)throw e}}function nr(e,t,n,a){kp=!1;var l=e.updateQueue;jl=!1;var i=l.firstBaseUpdate,o=l.lastBaseUpdate,s=l.shared.pending;if(s!==null){l.shared.pending=null;var r=s,d=r.next;r.next=null,o===null?i=d:o.next=d,o=r;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=d:s.next=d,u.lastBaseUpdate=r))}if(i!==null){var p=l.baseState;o=0,u=d=r=null,s=i;do{var f=s.lane&-536870913,c=f!==s.lane;if(c?(pe&f)===f:(a&f)===f){f!==0&&f===ji&&(kp=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});e:{var v=e,S=s;f=t;var y=n;switch(S.tag){case 1:if(v=S.payload,typeof v=="function"){p=v.call(y,p,f);break e}p=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=S.payload,f=typeof v=="function"?v.call(y,p,f):v,f==null)break e;p=qe({},p,f);break e;case 2:jl=!0}}f=s.callback,f!==null&&(e.flags|=64,c&&(e.flags|=8192),c=l.callbacks,c===null?l.callbacks=[f]:c.push(f))}else c={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(d=u=c,r=p):u=u.next=c,o|=f;if(s=s.next,s===null){if(s=l.shared.pending,s===null)break;c=s,s=c.next,c.next=null,l.lastBaseUpdate=c,l.shared.pending=null}}while(!0);u===null&&(r=p),l.baseState=r,l.firstBaseUpdate=d,l.lastBaseUpdate=u,i===null&&(l.shared.lanes=0),ci|=o,e.lanes=o,e.memoizedState=p}}function H1(e,t){if(typeof e!="function")throw Error(x(191,e));e.call(t)}function G1(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)H1(n[e],t)}var ri=Va(null),Cc=Va(0);function Bv(e,t){e=ml,Ie(Cc,e),Ie(ri,t),ml=e|t.baseLanes}function Up(){Ie(Cc,ml),Ie(ri,ri.current)}function jm(){ml=Cc.current,Gt(ri),Gt(Cc)}var It=Va(null),en=null;function ei(e){var t=e.alternate;Ie(jt,jt.current&1),Ie(It,e),en===null&&(t===null||ri.current!==null||t.memoizedState!==null)&&(en=e)}function Bp(e){Ie(jt,jt.current),Ie(It,e),en===null&&(en=e)}function j1(e){e.tag===22?(Ie(jt,jt.current),Ie(It,e),en===null&&(en=e)):ti()}function ti(){Ie(jt,jt.current),Ie(It,It.current)}function Ln(e){Gt(It),en===e&&(en=null),Gt(jt)}var jt=Va(0);function gr(e,t){Ie(It,It.current),Ie(jt,t)}function Ym(e){Gt(jt),Gt(It),en===e&&(en=null)}function Oc(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||ym(n)||gh(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!=="independent"){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var dl=0,le=null,xe=null,gt=null,Nc=!1,Go=!1,Ii=!1,Dc=0,vr=0,jo=null,rM=0;function rt(){throw Error(x(321))}function Im(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!jn(e[n],t[n]))return!1;return!0}function Vm(e,t,n,a,l,i){return dl=i,le=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,F.H=e===null||e.memoizedState===null?bb:Sb,Ii=!1,i=n(a,l),Ii=!1,Go&&(i=I1(t,n,a,l)),Y1(e),i}function Y1(e){F.H=xc;var t=xe!==null&&xe.next!==null;if(dl=0,gt=xe=le=null,Nc=!1,vr=0,jo=null,t)throw Error(x(300));e===null||yt||(e=e.dependencies,e!==null&&_c(e)&&(yt=!0))}function I1(e,t,n,a){le=e;var l=0;do{if(Go&&(jo=null),vr=0,Go=!1,25<=l)throw Error(x(301));if(l+=1,gt=xe=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}F.H=gM,i=t(n,a)}while(Go);return i}function uM(){var e=F.H,t=e.useState()[0];return t=typeof t.then=="function"?Dr(t):t,e=e.useState()[0],(xe!==null?xe.memoizedState:null)!==e&&(le.flags|=1024),t}function Xm(){var e=Dc!==0;return Dc=0,e}function Km(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Qm(e){if(Nc){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Nc=!1}dl=0,gt=xe=le=null,Go=!1,vr=Dc=0,jo=null}function fn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return gt===null?le.memoizedState=gt=e:gt=gt.next=e,gt}function pt(){if(xe===null){var e=le.alternate;e=e!==null?e.memoizedState:null}else e=xe.next;var t=gt===null?le.memoizedState:gt.next;if(t!==null)gt=t,xe=e;else{if(e===null)throw le.alternate===null?Error(x(467)):Error(x(310));xe=e,e={memoizedState:xe.memoizedState,baseState:xe.baseState,baseQueue:xe.baseQueue,queue:xe.queue,next:null},gt===null?le.memoizedState=gt=e:gt=gt.next=e}return gt}function nd(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Dr(e){var t=vr;return vr+=1,jo===null&&(jo=[]),e=U1(jo,e,t),t=le,(gt===null?t.memoizedState:gt.next)===null&&(t=t.alternate,F.H=t===null||t.memoizedState===null?bb:Sb),e}function ad(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Dr(e);if(e.$$typeof===IT)return;if(e.$$typeof===Ba)return Ht(e)}throw Error(x(438,String(e)))}function Zm(e){var t=null,n=le.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=le.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(l){return l.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=nd(),le.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),a=0;a<e;a++)n[a]=YT;return t.index++,n}function fl(e,t){return typeof t=="function"?t(e):t}function oc(e){var t=pt();return Fm(t,xe,e)}function Fm(e,t,n){var a=e.queue;if(a===null)throw Error(x(311));a.lastRenderedReducer=n;var l=e.baseQueue,i=a.pending;if(i!==null){if(l!==null){var o=l.next;l.next=i.next,i.next=o}t.baseQueue=l=i,a.pending=null}if(i=e.baseState,l===null)e.memoizedState=i;else{t=l.next;var s=o=null,r=null,d=t,u=!1;do{var p=d.lane&-536870913;if(p!==d.lane?(pe&p)===p:(dl&p)===p){var f=d.revertLane;if(f===0)r!==null&&(r=r.next={lane:0,revertLane:0,gesture:null,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),p===ji&&(u=!0);else if((dl&f)===f){d=d.next,f===ji&&(u=!0);continue}else p={lane:0,revertLane:d.revertLane,gesture:null,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null},r===null?(s=r=p,o=i):r=r.next=p,le.lanes|=f,ci|=f;p=d.action,Ii&&n(i,p),i=d.hasEagerState?d.eagerState:n(i,p)}else f={lane:p,revertLane:d.revertLane,gesture:d.gesture,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null},r===null?(s=r=f,o=i):r=r.next=f,le.lanes|=p,ci|=p;d=d.next}while(d!==null&&d!==t);if(r===null?o=i:r.next=s,!jn(i,e.memoizedState)&&(yt=!0,u&&(n=qo,n!==null)))throw n;e.memoizedState=i,e.baseState=o,e.baseQueue=r,a.lastRenderedState=i}return l===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Jf(e){var t=pt(),n=t.queue;if(n===null)throw Error(x(311));n.lastRenderedReducer=e;var a=n.dispatch,l=n.pending,i=t.memoizedState;if(l!==null){n.pending=null;var o=l=l.next;do i=e(i,o.action),o=o.next;while(o!==l);jn(i,t.memoizedState)||(yt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,a]}function V1(e,t,n){var a=le,l=pt(),i=re;if(i){if(n===void 0)throw Error(x(407));n=n()}else n=t();var o=!jn((xe||l).memoizedState,n);if(o&&(l.memoizedState=n,yt=!0),l=l.queue,Jm(Q1.bind(null,a,l,e),[e]),e=l.getSnapshot!==t||o||gt!==null&&(gt.memoizedState.tag&1)!==0,Zo(e?9:8,{destroy:void 0},K1.bind(null,a,l,n,t),null),e){if(a.flags|=2048,Be===null)throw Error(x(349));i||(dl&127)!==0||X1(a,t,n)}return n}function X1(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=le.updateQueue,t===null?(t=nd(),le.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function K1(e,t,n,a){t.value=n,t.getSnapshot=a,Z1(t)&&F1(e)}function Q1(e,t,n){return n(function(){Z1(t)&&F1(e)})}function Z1(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!jn(e,n)}catch{return!0}}function F1(e){var t=Fi(e,2);t!==null&&Mn(t,e,2)}function qp(e){var t=fn();if(typeof e=="function"){var n=e;if(e=n(),Ii){Il(!0);try{n()}finally{Il(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:fl,lastRenderedState:e},t}function J1(e,t,n,a){return e.baseState=n,Fm(e,xe,typeof a=="function"?a:fl)}function cM(e,t,n,a,l){if(id(e))throw Error(x(485));if(e=t.action,e!==null){var i={payload:l,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(o){i.listeners.push(o)}};F.T!==null?n(!0):i.isTransition=!1,a(i),n=t.pending,n===null?(i.next=t.pending=i,P1(t,i)):(i.next=n.next,t.pending=n.next=i)}}function P1(e,t){var n=t.action,a=t.payload,l=e.state;if(t.isTransition){var i=F.T,o={};o.types=i!==null?i.types:null,F.T=o;try{var s=n(l,a),r=F.S;r!==null&&r(o,s),qv(e,t,s)}catch(d){Hp(e,t,d)}finally{i!==null&&o.types!==null&&(i.types=o.types),F.T=i}}else try{i=n(l,a),qv(e,t,i)}catch(d){Hp(e,t,d)}}function qv(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(a){Hv(e,t,a)},function(a){return Hp(e,t,a)}):Hv(e,t,n)}function Hv(e,t,n){t.status="fulfilled",t.value=n,W1(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,P1(e,n)))}function Hp(e,t,n){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=n,W1(t),t=t.next;while(t!==a)}e.action=null}function W1(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function eb(e,t){return t}function Gv(e,t){if(re){var n=Be.formState;if(n!==null){e:{var a=le;if(re){if(Ye){t:{for(var l=Ye,i=la;l.nodeType!==8;){if(!i){l=null;break t}if(l=ia(l.nextSibling),l===null){l=null;break t}}i=l.data,l=i==="F!"||i==="F"?l:null}if(l){Ye=ia(l.nextSibling),a=l.data==="F!";break e}}si(a)}a=!1}a&&(t=n[0])}}return n=fn(),n.memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:eb,lastRenderedState:t},n.queue=a,n=gb.bind(null,le,a),a.dispatch=n,a=qp(!1),i=th.bind(null,le,!1,a.queue),a=fn(),l={state:t,dispatch:null,action:e,pending:null},a.queue=l,n=cM.bind(null,le,l,i,n),l.dispatch=n,a.memoizedState=e,[t,n,!1]}function jv(e){var t=pt();return tb(t,xe,e)}function tb(e,t,n){if(t=Fm(e,t,eb)[0],e=oc(fl)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=Dr(t)}catch(o){throw o===ss?td:o}else a=t;t=pt();var l=t.queue,i=l.dispatch;return n!==t.memoizedState&&(le.flags|=2048,Zo(9,{destroy:void 0},dM.bind(null,l,n),null)),[a,i,e]}function dM(e,t){e.action=t}function Yv(e){var t=pt(),n=xe;if(n!==null)return tb(t,n,e);pt(),t=t.memoizedState,n=pt();var a=n.queue.dispatch;return n.memoizedState=e,[t,a,!1]}function Zo(e,t,n,a){return e={tag:e,create:n,deps:a,inst:t,next:null},t=le.updateQueue,t===null&&(t=nd(),le.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(a=n.next,n.next=e,e.next=a,t.lastEffect=e),e}function nb(){return pt().memoizedState}function sc(e,t,n,a){var l=fn();le.flags|=e,l.memoizedState=Zo(1|t,{destroy:void 0},n,a===void 0?null:a)}function ld(e,t,n,a){var l=pt();a=a===void 0?null:a;var i=l.memoizedState.inst;xe!==null&&a!==null&&Im(a,xe.memoizedState.deps)?l.memoizedState=Zo(t,i,n,a):(le.flags|=e,l.memoizedState=Zo(1|t,i,n,a))}function Iv(e,t){sc(8390656,8,e,t)}function Jm(e,t){ld(2048,8,e,t)}function fM(e){le.flags|=4;var t=le.updateQueue;if(t===null)t=nd(),le.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ab(e){var t=pt().memoizedState;return fM({ref:t,nextImpl:e}),function(){if((Ae&2)!==0)throw Error(x(440));return t.impl.apply(void 0,arguments)}}function lb(e,t){return ld(4,2,e,t)}function ib(e,t){return ld(4,4,e,t)}function ob(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function sb(e,t,n){n=n!=null?n.concat([e]):null,ld(4,4,ob.bind(null,t,e),n)}function Pm(){}function rb(e,t){var n=pt();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&Im(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function ub(e,t){var n=pt();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&Im(t,a[1]))return a[0];if(a=e(),Ii){Il(!0);try{e()}finally{Il(!1)}}return n.memoizedState=[a,t],a}function Wm(e,t,n){return n===void 0||(dl&1073741824)!==0&&(pe&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=tS(),le.lanes|=e,ci|=e,n)}function cb(e,t,n,a){return jn(n,t)?n:ri.current!==null?(e=Wm(e,n,a),jn(e,t)||(yt=!0),e):(dl&106)===0||(dl&1073741824)!==0&&(pe&261930)===0?(yt=!0,e.memoizedState=n):(e=tS(),le.lanes|=e,ci|=e,t)}function db(e,t,n,a,l){var i=Ee.p;Ee.p=i!==0&&8>i?i:8;var o=F.T,s={};s.types=o!==null?o.types:null,F.T=s,th(e,!1,t,n);try{var r=l(),d=F.S;if(d!==null&&d(s,r),r!==null&&typeof r=="object"&&typeof r.then=="function"){var u=sM(r,a);ar(e,t,u,Gn(e))}else ar(e,t,a,Gn(e))}catch(p){ar(e,t,{then:function(){},status:"rejected",reason:p},Gn())}finally{Ee.p=i,o!==null&&s.types!==null&&(o.types=s.types),F.T=o}}function pM(){}function Gp(e,t,n,a){if(e.tag!==5)throw Error(x(476));var l=fb(e).queue;db(e,l,t,zi,n===null?pM:function(){return pb(e),n(a)})}function fb(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:zi,baseState:zi,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fl,lastRenderedState:zi},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fl,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function pb(e){var t=fb(e);t.next===null&&(t=e.alternate.memoizedState),ar(e,t.next.queue,{},Gn())}function eh(){return Ht(ns)}function mb(){return pt().memoizedState}function hb(){return pt().memoizedState}function mM(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Gn();e=Pl(n);var a=Wl(t,e,n);a!==null&&(Mn(a,t,n),er(a,t,n)),t={cache:Bm()},e.payload=t;return}t=t.return}}function hM(e,t,n){var a=Gn();n={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},id(e)?vb(t,n):(n=Lm(e,t,n,a),n!==null&&(Mn(n,e,a),yb(n,t,a)))}function gb(e,t,n){var a=Gn();ar(e,t,n,a)}function ar(e,t,n,a){var l={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(id(e))vb(t,l);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,s=i(o,n);if(l.hasEagerState=!0,l.eagerState=s,jn(s,o))return Wc(e,t,l,0),Be===null&&Pc(),!1}catch{}if(n=Lm(e,t,l,a),n!==null)return Mn(n,e,a),yb(n,t,a),!0}return!1}function th(e,t,n,a){if(a={lane:2,revertLane:fh(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},id(e)){if(t)throw Error(x(479))}else t=Lm(e,n,a,2),t!==null&&Mn(t,e,2)}function id(e){var t=e.alternate;return e===le||t!==null&&t===le}function vb(e,t){Go=Nc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function yb(e,t,n){if((n&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,n1(e,n)}}var xc={readContext:Ht,use:ad,useCallback:rt,useContext:rt,useEffect:rt,useImperativeHandle:rt,useLayoutEffect:rt,useInsertionEffect:rt,useMemo:rt,useReducer:rt,useRef:rt,useState:rt,useDebugValue:rt,useDeferredValue:rt,useTransition:rt,useSyncExternalStore:rt,useId:rt,useHostTransitionStatus:rt,useFormState:rt,useActionState:rt,useOptimistic:rt,useMemoCache:rt,useCacheRefresh:rt,useEffectEvent:rt},bb={readContext:Ht,use:ad,useCallback:function(e,t){return fn().memoizedState=[e,t===void 0?null:t],e},useContext:Ht,useEffect:Iv,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,sc(4194308,4,ob.bind(null,t,e),n)},useLayoutEffect:function(e,t){return sc(4194308,4,e,t)},useInsertionEffect:function(e,t){sc(4,2,e,t)},useMemo:function(e,t){var n=fn();t=t===void 0?null:t;var a=e();if(Ii){Il(!0);try{e()}finally{Il(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=fn();if(n!==void 0){var l=n(t);if(Ii){Il(!0);try{n(t)}finally{Il(!1)}}}else l=t;return a.memoizedState=a.baseState=l,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:l},a.queue=e,e=e.dispatch=hM.bind(null,le,e),[a.memoizedState,e]},useRef:function(e){var t=fn();return e={current:e},t.memoizedState=e},useState:function(e){e=qp(e);var t=e.queue,n=gb.bind(null,le,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Pm,useDeferredValue:function(e,t){var n=fn();return Wm(n,e,t)},useTransition:function(){var e=qp(!1);return e=db.bind(null,le,e.queue,!0,!1),fn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=le,l=fn();if(re){if(n===void 0)throw Error(x(407));n=n()}else{if(n=t(),Be===null)throw Error(x(349));(pe&127)!==0||X1(a,t,n)}l.memoizedState=n;var i={value:n,getSnapshot:t};return l.queue=i,Iv(Q1.bind(null,a,i,e),[e]),a.flags|=2048,Zo(9,{destroy:void 0},K1.bind(null,a,i,n,t),null),n},useId:function(){var e=fn(),t=Be.identifierPrefix;if(re){var n=Ga,a=Ha;n=(a&~(1<<32-Hn(a)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Dc++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=rM++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:eh,useFormState:Gv,useActionState:Gv,useOptimistic:function(e){var t=fn();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=th.bind(null,le,!0,n),n.dispatch=t,[e,t]},useMemoCache:Zm,useCacheRefresh:function(){return fn().memoizedState=mM.bind(null,le)},useEffectEvent:function(e){var t=fn(),n={impl:e};return t.memoizedState=n,function(){if((Ae&2)!==0)throw Error(x(440));return n.impl.apply(void 0,arguments)}}},Sb={readContext:Ht,use:ad,useCallback:rb,useContext:Ht,useEffect:Jm,useImperativeHandle:sb,useInsertionEffect:lb,useLayoutEffect:ib,useMemo:ub,useReducer:oc,useRef:nb,useState:function(){return oc(fl)},useDebugValue:Pm,useDeferredValue:function(e,t){var n=pt();return cb(n,xe.memoizedState,e,t)},useTransition:function(){var e=oc(fl)[0],t=pt().memoizedState;return[typeof e=="boolean"?e:Dr(e),t]},useSyncExternalStore:V1,useId:mb,useHostTransitionStatus:eh,useFormState:jv,useActionState:jv,useOptimistic:function(e,t){var n=pt();return J1(n,xe,e,t)},useMemoCache:Zm,useCacheRefresh:hb,useEffectEvent:ab},gM={readContext:Ht,use:ad,useCallback:rb,useContext:Ht,useEffect:Jm,useImperativeHandle:sb,useInsertionEffect:lb,useLayoutEffect:ib,useMemo:ub,useReducer:Jf,useRef:nb,useState:function(){return Jf(fl)},useDebugValue:Pm,useDeferredValue:function(e,t){var n=pt();return xe===null?Wm(n,e,t):cb(n,xe.memoizedState,e,t)},useTransition:function(){var e=Jf(fl)[0],t=pt().memoizedState;return[typeof e=="boolean"?e:Dr(e),t]},useSyncExternalStore:V1,useId:mb,useHostTransitionStatus:eh,useFormState:Yv,useActionState:Yv,useOptimistic:function(e,t){var n=pt();return xe!==null?J1(n,xe,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Zm,useCacheRefresh:hb,useEffectEvent:ab};function Pf(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:qe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var jp={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=Gn(),l=Pl(a);l.payload=t,n!=null&&(l.callback=n),t=Wl(e,l,a),t!==null&&(Mn(t,e,a),er(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=Gn(),l=Pl(a);l.tag=1,l.payload=t,n!=null&&(l.callback=n),t=Wl(e,l,a),t!==null&&(Mn(t,e,a),er(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Gn(),a=Pl(n);a.tag=2,t!=null&&(a.callback=t),t=Wl(e,a,n),t!==null&&(Mn(t,e,n),er(t,e,n))}};function Vv(e,t,n,a,l,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,i,o):t.prototype&&t.prototype.isPureReactComponent?!fr(n,a)||!fr(l,i):!0}function Xv(e,t,n,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,a),t.state!==e&&jp.enqueueReplaceState(t,t.state,null)}function Vi(e,t){var n=t;if("ref"in t){n={};for(var a in t)a!=="ref"&&(n[a]=t[a])}if(e=e.defaultProps){n===t&&(n=qe({},n));for(var l in e)n[l]===void 0&&(n[l]=e[l])}return n}function Ab(e){Tc(e)}function Eb(e){console.error(e)}function Tb(e){Tc(e)}function zc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Kv(e,t,n){try{var a=e.onCaughtError;a(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(l){setTimeout(function(){throw l})}}function Yp(e,t,n){return n=Pl(n),n.tag=3,n.payload={element:null},n.callback=function(){zc(e,t)},n}function wb(e){return e=Pl(e),e.tag=3,e}function Mb(e,t,n,a){var l=n.type.getDerivedStateFromError;if(typeof l=="function"){var i=a.value;e.payload=function(){return l(i)},e.callback=function(){Kv(t,n,a)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch=="function"&&(e.callback=function(){Kv(t,n,a),typeof l!="function"&&(ni===null?ni=new Set([this]):ni.add(this));var s=a.stack;this.componentDidCatch(a.value,{componentStack:s!==null?s:""})})}function vM(e,t,n,a,l){if(n.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=n.alternate,t!==null&&Hi(t,n,l,!0),n=It.current,n!==null){switch(n.tag){case 31:case 13:case 19:return en===null?jc():n.alternate===null&&ut===0&&(ut=3),n.flags&=-257,n.flags|=65536,n.lanes=l,a===Rc?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),ip(e,a,l)),!1;case 22:return n.flags|=65536,a===Rc?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([a]):n.add(a)),ip(e,a,l)),!1}throw Error(x(435,n.tag))}return ip(e,a,l),jc(),!1}if(re)return t=It.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=l,a!==Np&&(e=Error(x(422),{cause:a}),mr(aa(e,n)))):(a!==Np&&(t=Error(x(423),{cause:a}),mr(aa(t,n))),e=e.current.alternate,e.flags|=65536,l&=-l,e.lanes|=l,a=aa(a,n),l=Yp(e.stateNode,a,l),Ff(e,l),ut!==4&&(ut=2)),!1;var i=Error(x(520),{cause:a});if(i=aa(i,n),sr===null?sr=[i]:sr.push(i),ut!==4&&(ut=2),t===null)return!0;a=aa(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=l&-l,n.lanes|=e,e=Yp(n.stateNode,a,e),Ff(n,e),!1;case 1:if(t=n.type,i=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(ni===null||!ni.has(i))))return n.flags|=65536,l&=-l,n.lanes|=l,l=wb(l),Mb(l,e,n,a),Ff(n,l),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var nh=Error(x(461)),yt=!1;function St(e,t,n,a){t.child=e===null?q1(t,null,n,a):Yi(t,e.child,n,a)}function Qv(e,t,n,a,l){n=n.render;var i=t.ref;if("ref"in a){var o={};for(var s in a)s!=="ref"&&(o[s]=a[s])}else o=a;return Gi(t),a=Vm(e,t,n,o,i,l),s=Xm(),e!==null&&!yt?(Km(e,t,l),pl(e,t,l)):(re&&s&&ed(t),t.flags|=1,St(e,t,a,l),t.child)}function Zv(e,t,n,a,l){if(e===null){var i=n.type;return typeof i=="function"&&!km(i)&&i.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=i,$b(e,t,i,a,l)):(e=ac(n.type,null,a,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!lh(e,l)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:fr,n(o,a)&&e.ref===t.ref)return pl(e,t,l)}return t.flags|=1,e=sl(i,a),e.ref=t.ref,e.return=t,t.child=e}function $b(e,t,n,a,l){if(e!==null){var i=e.memoizedProps;if(fr(i,a)&&e.ref===t.ref)if(yt=!1,t.pendingProps=a=i,lh(e,l))(e.flags&131072)!==0&&(yt=!0);else return t.lanes=e.lanes,pl(e,t,l)}return Ip(e,t,n,a,l)}function _b(e,t,n,a){var l=a.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(i=i!==null?i.baseLanes|n:n,e!==null){for(a=t.child=e.child,l=0;a!==null;)l=l|a.lanes|a.childLanes,a=a.sibling;a=l&~i}else a=0,t.child=null;return Fv(e,t,i,n,a)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ic(t,i!==null?i.cachePool:null),i!==null?Bv(t,i):Up(),j1(t);else return a=t.lanes=536870912,Fv(e,t,i!==null?i.baseLanes|n:n,n,a)}else i!==null?(ic(t,i.cachePool),Bv(t,i),ti(),t.memoizedState=null):(e!==null&&ic(t,null),Up(),ti());return St(e,t,l,n),t.child}function lr(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Fv(e,t,n,a,l){var i=qm();return i=i===null?null:{parent:vt._currentValue,pool:i},t.memoizedState={baseLanes:n,cachePool:i},e!==null&&ic(t,null),Up(),j1(t),e!==null&&Hi(e,t,a,!0),t.childLanes=l,null}function rc(e,t){return t=od({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Jv(e,t,n){return Yi(t,e.child,null,n),e=rc(t,t.pendingProps),e.flags|=2,Ln(t),t.memoizedState=null,e}function yM(e,t,n){var a=t.pendingProps,l=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(re){if(a.mode==="hidden")return e=rc(t,a),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},lr(null,e);if(Bp(t),(e=Ye)?(e=_S(e,la),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:oi!==null?{id:Ha,overflow:Ga}:null,retryLane:536870912,hydrationErrors:null},n=D1(e),n.return=t,t.child=n,Nt=t,Ye=null)):e=null,e===null)throw si(t);return t.lanes=536870912,null}return rc(t,a)}var i=e.memoizedState;if(i!==null){var o=i.dehydrated;if(Bp(t),l)if(t.flags&256)t.flags&=-257,t=Jv(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(x(558));else if(yt||Hi(e,t,n,!1),l=(n&e.childLanes)!==0,yt||l){if(ri.current===null){if(a=Be,a!==null&&(o=a1(a,n),o!==0&&o!==i.retryLane))throw i.retryLane=o,Fi(e,o),Mn(a,e,o),nh;jc()}t=Jv(e,t,n)}else e=i.treeContext,Ye=ia(o.nextSibling),Nt=t,re=!0,Jl=null,la=!1,e!==null&&z1(t,e),t=rc(t,a),t.flags|=134221824;return t}return e=sl(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ao(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(x(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Ip(e,t,n,a,l){return Gi(t),n=Vm(e,t,n,a,void 0,l),a=Xm(),e!==null&&!yt?(Km(e,t,l),pl(e,t,l)):(re&&a&&ed(t),t.flags|=1,St(e,t,n,l),t.child)}function Pv(e,t,n,a,l,i){return Gi(t),t.updateQueue=null,n=I1(t,a,n,l),Y1(e),a=Xm(),e!==null&&!yt?(Km(e,t,i),pl(e,t,i)):(re&&a&&ed(t),t.flags|=1,St(e,t,n,i),t.child)}function Wv(e,t,n,a,l){if(Gi(t),t.stateNode===null){var i=Do,o=n.contextType;typeof o=="object"&&o!==null&&(i=Ht(o)),i=new n(a,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=jp,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=a,i.state=t.memoizedState,i.refs={},Gm(t),o=n.contextType,i.context=typeof o=="object"&&o!==null?Ht(o):Do,i.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o=="function"&&(Pf(t,n,o,a),i.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(o=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),o!==i.state&&jp.enqueueReplaceState(i,i.state,null),nr(t,a,i,l),tr(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){i=t.stateNode;var s=t.memoizedProps,r=Vi(n,s);i.props=r;var d=i.context,u=n.contextType;o=Do,typeof u=="object"&&u!==null&&(o=Ht(u));var p=n.getDerivedStateFromProps;u=typeof p=="function"||typeof i.getSnapshotBeforeUpdate=="function",s=t.pendingProps!==s,u||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(s||d!==o)&&Xv(t,i,a,o),jl=!1;var f=t.memoizedState;i.state=f,nr(t,a,i,l),tr(),d=t.memoizedState,s||f!==d||jl?(typeof p=="function"&&(Pf(t,n,p,a),d=t.memoizedState),(r=jl||Vv(t,n,r,a,f,d,o))?(u||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=d),i.props=a,i.state=d,i.context=o,a=r):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{i=t.stateNode,Lp(e,t),o=t.memoizedProps,u=Vi(n,o),i.props=u,p=t.pendingProps,f=i.context,d=n.contextType,r=Do,typeof d=="object"&&d!==null&&(r=Ht(d)),s=n.getDerivedStateFromProps,(d=typeof s=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(o!==p||f!==r)&&Xv(t,i,a,r),jl=!1,f=t.memoizedState,i.state=f,nr(t,a,i,l),tr();var c=t.memoizedState;o!==p||f!==c||jl||e!==null&&e.dependencies!==null&&_c(e.dependencies)?(typeof s=="function"&&(Pf(t,n,s,a),c=t.memoizedState),(u=jl||Vv(t,n,u,a,f,c,r)||e!==null&&e.dependencies!==null&&_c(e.dependencies))?(d||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(a,c,r),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(a,c,r)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=c),i.props=a,i.state=c,i.context=r,a=u):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),a=!1)}return i=a,Ao(e,t),a=(t.flags&128)!==0,i||a?(i=t.stateNode,n=a&&typeof n.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&a?(t.child=Yi(t,e.child,null,l),t.child=Yi(t,null,n,l)):St(e,t,n,l),t.memoizedState=i.state,e=t.child):e=pl(e,t,l),e}function ey(e,t,n,a){return qi(),t.flags|=256,St(e,t,n,a),t.child}var Vp={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Xp(e){return{baseLanes:e,cachePool:k1()}}function Kp(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Un),e}function Rb(e,t,n){var a=t.pendingProps,l=!1,i=(t.flags&128)!==0,o;if((o=i)||(o=e!==null&&e.memoizedState===null?!1:(jt.current&2)!==0),o&&(l=!0,t.flags&=-129),o=(t.flags&32)!==0,t.flags&=-33,e===null){if(re){if(l?ei(t):ti(),(e=Ye)?(e=_S(e,la),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:oi!==null?{id:Ha,overflow:Ga}:null,retryLane:536870912,hydrationErrors:null},n=D1(e),n.return=t,t.child=n,Nt=t,Ye=null)):e=null,e===null)throw si(t);return gh(e)?t.lanes=32:t.lanes=536870912,null}return i=a.children,a=a.fallback,l?(ti(),l=t.mode,i=od({mode:"hidden",children:i},l),a=Li(a,l,n,null),i.return=t,a.return=t,i.sibling=a,t.child=i,a=t.child,a.memoizedState=Xp(n),a.childLanes=Kp(e,o,n),t.memoizedState=Vp,lr(null,a)):(ei(t),ah(t,i))}var s=e.memoizedState;if(s!==null){var r=s.dehydrated;if(r!==null)return bM(e,t,i,o,a,r,s,n)}return l?(ti(),l=a.fallback,i=t.mode,s=e.child,r=s.sibling,a=sl(s,{mode:"hidden",children:a.children}),a.subtreeFlags=s.subtreeFlags&1206910976,r!==null?l=sl(r,l):(l=Li(l,i,n,null),l.flags|=2),l.return=t,a.return=t,a.sibling=l,t.child=a,lr(null,a),a=t.child,l=e.child.memoizedState,l===null?l=Xp(n):(i=l.cachePool,i!==null?(s=vt._currentValue,i=i.parent!==s?{parent:s,pool:s}:i):i=k1(),l={baseLanes:l.baseLanes|n,cachePool:i}),a.memoizedState=l,a.childLanes=Kp(e,o,n),t.memoizedState=Vp,lr(e.child,a)):(ei(t),n=e.child,e=n.sibling,n=sl(n,{mode:"visible",children:a.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function ah(e,t){return t=od({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function od(e,t){return e=wn(22,e,null,t),e.lanes=0,e}function Yu(e,t,n){return Yi(t,e.child,null,n),e=ah(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function bM(e,t,n,a,l,i,o,s){if(n)return t.flags&256?(ei(t),t.flags&=-257,Yu(e,t,s)):t.memoizedState!==null?(ti(),t.child=e.child,t.flags|=128,null):(ti(),i=l.fallback,o=t.mode,l=od({mode:"visible",children:l.children},o),i=Li(i,o,s,null),i.flags|=2,l.return=t,i.return=t,l.sibling=i,t.child=l,Yi(t,e.child,null,s),l=t.child,l.memoizedState=Xp(s),l.childLanes=Kp(e,a,s),t.memoizedState=Vp,lr(null,l));if(ei(t),gh(i)){if(a=i.nextSibling&&i.nextSibling.dataset,a)var r=a.dgst;return a=r,a!==""&&(l=Error(x(419)),l.stack="",l.digest=a,mr({value:l,source:null,stack:null})),Yu(e,t,s)}if(yt||Hi(e,t,s,!1),a=(s&e.childLanes)!==0,yt||a){if(ri.current!==null)return Yu(e,t,s);if(a=Be,a!==null&&(l=a1(a,s),l!==0&&l!==o.retryLane))throw o.retryLane=l,Fi(e,l),Mn(a,e,l),nh;return ym(i)||jc(),Yu(e,t,s)}return ym(i)?(t.flags|=192,t.child=e.child,null):(e=o.treeContext,Ye=ia(i.nextSibling),Nt=t,re=!0,Jl=null,la=!1,e!==null&&z1(t,e),t=ah(t,l.children),t.flags|=134221824,t)}function ty(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),lc(e.return,t,n)}function ny(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Oc(n)===null&&(t=e),e=e.sibling}return t}function Iu(e,t,n,a,l,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:l,treeForkCount:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=a,o.tail=n,o.tailMode=l,o.treeForkCount=i)}function Wf(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function Qp(e,t,n){var a=t.pendingProps,l=a.revealOrder,i=a.tail;a=a.children;var o=jt.current;if(t.flags&128)return gr(t,o),null;var s=(o&2)!==0;if(s?(o=o&1|2,t.flags|=128):o&=1,gr(t,o),l==="backwards"&&e!==null?(Wf(e),St(e,t,a,n),Wf(e)):St(e,t,a,n),a=re?pr:0,!s&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ty(e,n,t);else if(e.tag===19)ty(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(l){case"backwards":n=ny(t.child),n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null,Wf(t)),Iu(t,!0,l,null,i,a);break;case"unstable_legacy-backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&Oc(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}Iu(t,!0,n,null,i,a);break;case"together":Iu(t,!1,null,null,void 0,a);break;case"independent":t.memoizedState=null;break;default:n=ny(t.child),n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),Iu(t,!1,l,n,i,a)}return t.child}function ay(e,t,n){var a=t.pendingProps;return Xl(t,t.type,a.value),St(e,t,a.children,n),t.child}function pl(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ci|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Hi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(x(153));if(t.child!==null){for(e=t.child,n=sl(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=sl(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function lh(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&_c(e)))}function SM(e,t,n){switch(t.tag){case 3:bc(t,t.stateNode.containerInfo),Xl(t,vt,e.memoizedState.cache),qi();break;case 27:case 5:Ap(t);break;case 4:bc(t,t.stateNode.containerInfo);break;case 10:Xl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Bp(t),null;break;case 13:var a=t.memoizedState;if(a!==null){if(a.dehydrated!==null)return ei(t),t.flags|=128,null;a=Hi(e,t,n,!1);var l=t.child.childLanes;return a||(n&l)!==0?Rb(e,t,n):(ei(t),e=pl(e,t,n),e!==null?e.sibling:null)}ei(t);break;case 19:if(t.flags&128)return Qp(e,t,n);if(l=(e.flags&128)!==0,a=(n&t.childLanes)!==0,a||(Hi(e,t,n,!1),a=(n&t.childLanes)!==0),l){if(a)return Qp(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),gr(t,jt.current),a)break;return null;case 22:return t.lanes=0,_b(e,t,n,t.pendingProps);case 24:Xl(t,vt,e.memoizedState.cache)}return pl(e,t,n)}function Cb(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)yt=!0;else{if(!lh(e,n)&&(t.flags&128)===0)return yt=!1,SM(e,t,n);yt=(e.flags&131072)!==0}else yt=!1,re&&(t.flags&1048576)!==0&&x1(t,pr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=Oi(t.elementType),t.type=e,typeof e=="function")km(e)?(a=Vi(e,a),t.tag=1,t=Wv(null,t,e,a,n)):(t.tag=0,t=Ip(null,t,e,a,n));else{if(e!=null){var l=e.$$typeof;if(l===Tm){t.tag=11,t=Qv(null,t,e,a,n);break e}else if(l===wm){t.tag=14,t=Zv(null,t,e,a,n);break e}else if(l===Ba){t.tag=10,t.type=e,t=ay(null,t,n);break e}}throw t=bp(e)||e,Error(x(306,t,""))}}return t;case 0:return Ip(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,l=Vi(a,t.pendingProps),Wv(e,t,a,l,n);case 3:e:{if(bc(t,t.stateNode.containerInfo),e===null)throw Error(x(387));a=t.pendingProps;var i=t.memoizedState;l=i.element,Lp(e,t),nr(t,a,null,n);var o=t.memoizedState;if(a=o.cache,Xl(t,vt,a),a!==i.cache&&xp(t,[vt],n,!0),tr(),a=o.element,i.isDehydrated)if(i={element:a,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=ey(e,t,a,n);break e}else if(a!==l){l=aa(Error(x(424)),t),mr(l),t=ey(e,t,a,n);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Ye=ia(e.firstChild),Nt=t,re=!0,Jl=null,la=!0,n=q1(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling;else{if(qi(),a===l){t=pl(e,t,n);break e}St(e,t,a,n)}t=t.child}return t;case 26:return Ao(e,t),e===null?(n=Oy(t.type,null,t.pendingProps,null))?t.memoizedState=n:re||(t.stateNode=yS(t.type,t.pendingProps,Fl.current,t)):t.memoizedState=Oy(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ap(t),e===null&&re&&(a=t.stateNode=RS(t.type,t.pendingProps,Fl.current),Nt=t,la=!0,l=Ye,fi(t.type)?(bm=l,Ye=ia(a.firstChild)):Ye=l),St(e,t,t.pendingProps.children,n),Ao(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&re&&((l=a=Ye)&&(a=f3(a,t.type,t.pendingProps,la),a!==null?(t.stateNode=a,Nt=t,Ye=ia(a.firstChild),la=!1,l=!0):l=!1),l||si(t)),Ap(t),l=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,hm(l,i)?a=null:o!==null&&hm(l,o)&&(t.flags|=32),t.memoizedState!==null&&(l=Vm(e,t,uM,null,null,n),ns._currentValue=l),Ao(e,t),St(e,t,a,n),t.child;case 6:return e===null&&re&&((e=n=Ye)&&(n=p3(n,t.pendingProps,la),n!==null?(t.stateNode=n,Nt=t,Ye=null,e=!0):e=!1),e||si(t)),null;case 13:return Rb(e,t,n);case 4:return bc(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Yi(t,null,a,n):St(e,t,a,n),t.child;case 11:return Qv(e,t,t.type,t.pendingProps,n);case 7:return a=t.pendingProps,Ao(e,t),St(e,t,a,n),t.child;case 8:return St(e,t,t.pendingProps.children,n),t.child;case 12:return St(e,t,t.pendingProps.children,n),t.child;case 10:return ay(e,t,n);case 9:return l=t.type._context,a=t.pendingProps.children,Gi(t),l=Ht(l),a=a(l),t.flags|=1,St(e,t,a,n),t.child;case 14:return Zv(e,t,t.type,t.pendingProps,n);case 15:return $b(e,t,t.type,t.pendingProps,n);case 19:return Qp(e,t,n);case 31:return yM(e,t,n);case 22:return _b(e,t,n,t.pendingProps);case 24:return Gi(t),a=Ht(vt),e===null?(l=qm(),l===null&&(l=Be,i=Bm(),l.pooledCache=i,i.refCount++,i!==null&&(l.pooledCacheLanes|=n),l=i),t.memoizedState={parent:a,cache:l},Gm(t),Xl(t,vt,l)):((e.lanes&n)!==0&&(Lp(e,t),nr(t,null,null,n),tr()),l=e.memoizedState,i=t.memoizedState,l.parent!==a?(l={parent:a,cache:a},t.memoizedState=l,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=l),Xl(t,vt,a)):(a=i.cache,Xl(t,vt,a),a!==l.cache&&xp(t,[vt],n,!0))),St(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),a=t.pendingProps,a.name!=null&&a.name!=="auto"?t.flags|=e===null?18882560:18874368:re&&ed(t),e!==null&&e.memoizedProps.name!==a.name?t.flags|=4194816:Ao(e,t),St(e,t,a.children,n),t.child;case 29:throw t.pendingProps}throw Error(x(156,t.tag))}function ll(e){e.flags|=4}function ep(e,t,n,a,l){var i;if((i=(e.mode&32)!==0)&&(i=n===null?xy(t,a):xy(t,a)&&(a.src!==n.src||a.srcSet!==n.srcSet)),i){if(e.flags|=16777216,(l&335544128)===l)if(e.stateNode.complete)e.flags|=8192;else if(lS())e.flags|=8192;else throw Ui=Rc,Hm}else e.flags&=-16777217}function ly(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!DS(t))if(lS())e.flags|=8192;else throw Ui=Rc,Hm}function Vu(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?e1():536870912,e.lanes|=t,Fo|=t)}function Gs(e,t){if(!re)switch(e.tailMode){case"visible":break;case"collapsed":for(var n=e.tail,a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function je(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,a=0;if(t)for(var l=e.child;l!==null;)n|=l.lanes|l.childLanes,a|=l.subtreeFlags&1206910976,a|=l.flags&1206910976,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,a|=l.subtreeFlags,a|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=a,e.childLanes=n,t}function AM(e,t,n){var a=t.pendingProps;switch(Um(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return je(t),null;case 1:return je(t),null;case 3:return n=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),rl(vt),Xo(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(bo(t)?ll(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Zf())),je(t),null;case 26:var l=t.type,i=t.memoizedState;return e===null?(ll(t),i!==null?(je(t),ly(t,i)):(je(t),ep(t,l,null,a,n))):i?i!==e.memoizedState?(ll(t),je(t),ly(t,i)):(je(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&ll(t),je(t),ep(t,l,e,a,n)),null;case 27:if(Sc(t),n=Fl.current,l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&ll(t);else{if(!a){if(t.stateNode===null)throw Error(x(166));return je(t),t.subtreeFlags&=-33554433,null}e=ja.current,bo(t)?Nv(t,e):(e=RS(l,a,n),t.stateNode=e,ll(t))}return je(t),t.subtreeFlags&=-33554433,null;case 5:if(Sc(t),l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&ll(t);else{if(!a){if(t.stateNode===null)throw Error(x(166));return je(t),t.subtreeFlags&=-33554433,null}if(i=ja.current,bo(t))Nv(t,i);else{var o=Sr(Fl.current);switch(i){case 1:i=o.createElementNS("http://www.w3.org/2000/svg",l);break;case 2:i=o.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;default:switch(l){case"svg":i=o.createElementNS("http://www.w3.org/2000/svg",l);break;case"math":i=o.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;case"script":i=o.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof a.is=="string"?o.createElement("select",{is:a.is}):o.createElement("select"),a.multiple?i.multiple=!0:a.size&&(i.size=a.size);break;default:i=typeof a.is=="string"?o.createElement(l,{is:a.is}):o.createElement(l)}}i[qt]=t,i[_n]=a;e:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)i.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;o.sibling===null;){if(o.return===null||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=i;e:switch(Yt(i,l,a),l){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&ll(t)}}return je(t),t.subtreeFlags&=-33554433,ep(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&ll(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(x(166));if(e=Fl.current,bo(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,l=Nt,l!==null)switch(l.tag){case 27:case 5:a=l.memoizedProps}e[qt]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||gS(e.nodeValue,n)),e||si(t,!0)}else e=Sr(e).createTextNode(a),e[qt]=t,t.stateNode=e}return je(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(a=bo(t),n!==null){if(e===null){if(!a)throw Error(x(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(x(557));e[qt]=t}else qi(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;je(t),e=!1}else n=Zf(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Ln(t),t):(Ln(t),null);if((t.flags&128)!==0)throw Error(x(558))}return je(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(l=bo(t),a!==null&&a.dehydrated!==null){if(e===null){if(!l)throw Error(x(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(x(317));l[qt]=t}else qi(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;je(t),l=!1}else l=Zf(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),l=!0;if(!l)return t.flags&256?(Ln(t),t):(Ln(t),null)}return Ln(t),(t.flags&128)!==0?(t.lanes=n,t):(n=a!==null,e=e!==null&&e.memoizedState!==null,n&&(a=t.child,l=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(l=a.alternate.memoizedState.cachePool.pool),i=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(i=a.memoizedState.cachePool.pool),i!==l&&(a.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Vu(t,t.updateQueue),je(t),null);case 4:return Xo(),e===null&&ph(t.stateNode.containerInfo),t.flags|=67108864,je(t),null;case 10:return rl(t.type),je(t),null;case 19:if(Ym(t),a=t.memoizedState,a===null)return je(t),null;if(l=(t.flags&128)!==0,i=a.rendering,i===null)if(l)Gs(a,!1);else{if(ut!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=Oc(e),i!==null){for(t.flags|=128,Gs(a,!1),e=i.updateQueue,t.updateQueue=e,Vu(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)N1(n,e),n=n.sibling;return gr(t,jt.current&1|2),re&&il(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&Bn()>Hc&&(t.flags|=128,l=!0,Gs(a,!1),t.lanes=4194304)}else{if(!l)if(e=Oc(i),e!==null){if(t.flags|=128,l=!0,e=e.updateQueue,t.updateQueue=e,Vu(t,e),Gs(a,!0),a.tail===null&&a.tailMode!=="collapsed"&&a.tailMode!=="visible"&&!i.alternate&&!re)return je(t),null}else 2*Bn()-a.renderingStartTime>Hc&&n!==536870912&&(t.flags|=128,l=!0,Gs(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(e=a.last,e!==null?e.sibling=i:t.child=i,a.last=i)}if(a.tail!==null){e=a.tail;e:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break e}n=n.sibling}n=!0}return a.rendering=e,a.tail=e.sibling,a.renderingStartTime=Bn(),e.sibling=null,i=jt.current,i=l?i&1|2:i&1,a.tailMode==="visible"||a.tailMode==="collapsed"||!n||re?gr(t,i):(n=i,Ie(It,t),Ie(jt,n),en===null&&(en=t)),re&&il(t,a.treeForkCount),e}return je(t),null;case 22:case 23:return Ln(t),jm(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(n&536870912)!==0&&(t.flags&128)===0&&(je(t),t.subtreeFlags&6&&(t.flags|=8192)):je(t),n=t.updateQueue,n!==null&&Vu(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==n&&(t.flags|=2048),e!==null&&Gt(ki),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),rl(vt),je(t),null;case 25:return null;case 30:return t.flags|=33554432,je(t),null}throw Error(x(156,t.tag))}function EM(e,t){switch(Um(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return rl(vt),Xo(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Sc(t),null;case 31:if(t.memoizedState!==null){if(Ln(t),t.alternate===null)throw Error(x(340));qi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Ln(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(x(340));qi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ym(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return Xo(),null;case 10:return rl(t.type),null;case 22:case 23:return Ln(t),jm(),e!==null&&Gt(ki),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return rl(vt),null;case 25:return null;default:return null}}function Ob(e,t){switch(Um(t),t.tag){case 3:rl(vt),Xo();break;case 26:case 27:case 5:Sc(t);break;case 4:Xo();break;case 31:t.memoizedState!==null&&Ln(t);break;case 13:Ln(t);break;case 19:Ym(t);break;case 10:rl(t.type);break;case 22:case 23:Ln(t),jm(),e!==null&&Gt(ki);break;case 24:rl(vt)}}function xr(e,t){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var l=a.next;n=l;do{if((n.tag&e)===e){a=void 0;var i=n.create,o=n.inst;a=i(),o.destroy=a}n=n.next}while(n!==l)}}catch(s){Ne(t,t.return,s)}}function ui(e,t,n){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var i=l.next;a=i;do{if((a.tag&e)===e){var o=a.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,l=t;var r=n,d=s;try{d()}catch(u){Ne(l,r,u)}}}a=a.next}while(a!==i)}}catch(u){Ne(t,t.return,u)}}function Nb(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{G1(t,n)}catch(a){Ne(e,e.return,a)}}}function Db(e,t,n){n.props=Vi(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){Ne(e,t,a)}}function ka(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:var l=e.stateNode,i=cl(e.memoizedProps,l);(l.ref===null||l.ref.name!==i)&&(l.ref=ES(i)),a=l.ref;break;case 7:if(e.stateNode===null){var o=new Yn(e);$n(e.child,!1,c3,o,void 0,void 0),e.stateNode=o}a=e.stateNode;break;default:a=e.stateNode}typeof n=="function"?e.refCleanup=n(a):n.current=a}}catch(s){Ne(e,t,s)}}function Bt(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(l){Ne(e,t,l)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(l){Ne(e,t,l)}else n.current=null}function Lc(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)$S(e.stateNode,t[n])}function iy(e){for(var t=e.return;t!==null&&(oh(t)&&$S(e.stateNode,t.stateNode),!ih(t));)t=t.return}function ir(e){for(var t=e.return;t!==null&&(oh(t)&&d3(e.stateNode,t.stateNode),!ih(t));)t=t.return}function ih(e){return e.tag===5||e.tag===3||e.tag===27}function oh(e){return e&&e.tag===7&&e.stateNode!==null}function Zp(e){var t=e.type,n=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&a.focus();break e;case"img":n.src?a.src=n.src:n.srcSet&&(a.srcset=n.srcSet)}}catch(l){Ne(e,e.return,l)}}function tp(e,t,n){try{var a=e.stateNode;XM(a,e.type,n,t),a[_n]=t}catch(l){Ne(e,e.return,l)}}function xb(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&fi(e.type)||e.tag===4}function np(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||xb(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&fi(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Fp(e,t,n,a){var l=e.tag;if(l===5||l===6)l=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(l,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(l),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=qa)),Lc(e,a),ye=!0;else if(l!==4&&(l===27&&(Lc(e,a),a=null,fi(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Fp(e,t,n,a),e=e.sibling;e!==null;)Fp(e,t,n,a),e=e.sibling}function kc(e,t,n,a){var l=e.tag;if(l===5||l===6)l=e.stateNode,t?n.insertBefore(l,t):n.appendChild(l),Lc(e,a),ye=!0;else if(l!==4&&(l===27&&(Lc(e,a),a=null,fi(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(kc(e,t,n,a),e=e.sibling;e!==null;)kc(e,t,n,a),e=e.sibling}function zb(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,l=t.attributes;l.length;)t.removeAttributeNode(l[0]);Yt(t,a,n),t[qt]=e,t[_n]=n}catch(i){Ne(e,e.return,i)}}var Uc=!1,kn=null;function oy(e){(e.tag===30||(e.subtreeFlags&33554432)!==0)&&(Uc=!0)}var Ua=null;function sy(){var e=Ua;return Ua=null,e}var Tn=0;function rs(e,t,n,a,l){return Tn=0,Lb(e.child,t,n,a,l)}function Lb(e,t,n,a,l){for(var i=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(a!==null){var s=gm(o);a.push(s),s.view&&(i=!0)}else i||gm(o).view&&(i=!0);Uc=!0,bS(o,Tn===0?t:t+"_"+Tn,n),Tn++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&l||Lb(e.child,t,n,a,l)&&(i=!0));e=e.sibling}return i}function Ia(e,t){for(;e!==null;)e.tag===5?SS(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||Ia(e.child,t)),e=e.sibling}function uc(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(uc(e),e.tag===30&&(e.flags&18874368)!==0&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name==="auto")throw Error(x(544));var n=t.name;t=gl(t.default,t.share),t!=="none"&&(rs(e,n,t,null,!1)||Ia(e.child,!1))}e=e.sibling}}function Jp(e,t){if(e.tag===30){var n=e.stateNode,a=e.memoizedProps,l=cl(a,n),i=gl(a.default,n.paired?a.share:a.enter);i!=="none"?rs(e,l,i,null,!1)?(uc(e),n.paired||t||Jo(e,a.onEnter)):Ia(e.child,!1):uc(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Jp(e,t),e=e.sibling;else uc(e)}function Pp(e){if(kn!==null&&kn.size!==0){var t=kn;if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var n=e.memoizedProps,a=n.name;if(a!=null&&a!=="auto"){var l=t.get(a);if(l!==void 0){var i=gl(n.default,n.share);if(i!=="none"&&(rs(e,a,i,null,!1)?(i=e.stateNode,l.paired=i,i.paired=l,Jo(e,n.onShare)):Ia(e.child,!1)),t.delete(a),t.size===0)break}}}Pp(e)}e=e.sibling}}}function Wp(e){if(e.tag===30){var t=e.memoizedProps,n=cl(t,e.stateNode),a=kn!==null?kn.get(n):void 0,l=gl(t.default,a!==void 0?t.share:t.exit);l!=="none"&&(rs(e,n,l,null,!1)?a!==void 0?(l=e.stateNode,a.paired=l,l.paired=a,kn.delete(n),Jo(e,t.onShare)):Jo(e,t.onExit):Ia(e.child,!1)),kn!==null&&Pp(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Wp(e),e=e.sibling;else kn!==null&&Pp(e)}function kb(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=cl(t,e.stateNode);t=gl(t.default,t.update),e.flags&=-5,t!=="none"&&rs(e,n,t,e.memoizedState=[],!1)}else(e.subtreeFlags&33554432)!==0&&kb(e);e=e.sibling}}function em(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var t=e.stateNode;t.paired!==null&&(t.paired=null,Ia(e.child,!1))}em(e)}e=e.sibling}}function cc(e){if(e.tag===30)e.stateNode.paired=null,Ia(e.child,!1),em(e);else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)cc(e),e=e.sibling;else em(e)}function Ub(e){for(e=e.child;e!==null;)e.tag===30?Ia(e.child,!1):(e.subtreeFlags&33554432)!==0&&Ub(e),e=e.sibling}function sh(e,t,n,a,l,i,o){for(var s=!1;t!==null;){if(t.tag===5){var r=t.stateNode;if(i!==null&&Tn<i.length){var d=i[Tn],u=gm(r);(d.view||u.view)&&(s=!0);var p;if(p=(e.flags&4)===0)if(u.clip)p=!0;else{p=d.rect;var f=u.rect;p=p.y!==f.y||p.x!==f.x||p.height!==f.height||p.width!==f.width}p&&(e.flags|=4),u.abs?u=!d.abs:(d=d.rect,u=u.rect,u=d.height!==u.height||d.width!==u.width),u&&(e.flags|=32)}else e.flags|=32;(e.flags&4)!==0&&bS(r,Tn===0?n:n+"_"+Tn,l),s&&(e.flags&4)!==0||(Ua===null&&(Ua=[]),Ua.push(r,Tn===0?a:a+"_"+Tn,t.memoizedProps)),Tn++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:sh(e,t.child,n,a,l,i,o)&&(s=!0));t=t.sibling}return s}function Bb(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,a=e.stateNode,l=cl(n,a),i=gl(n.default,n.update);if(t){a=a.clones;var o=a===null?null:a.map(PM)}else o=e.memoizedState,e.memoizedState=null;a=e;var s=e.child;Tn=0,l=sh(a,s,l,l,i,o,!1),(e.flags&4)!==0&&l&&(t||Jo(e,n.onUpdate))}else(e.subtreeFlags&33554432)!==0&&Bb(e,t);e=e.sibling}}var Rt=!1,we=!1,xa=!1,ap=!1,ry=typeof WeakSet=="function"?WeakSet:Set,Ct=null,za=!1,Zs=!1,Bc=!1,tm=!1;function TM(e,t,n){if(e=e.containerInfo,pm=as,e=T1(e),xm(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var i=l.anchorOffset,o=l.focusNode;l=l.focusOffset;try{a.nodeType,o.nodeType}catch{a=null;break e}var s=0,r=-1,d=-1,u=0,p=0,f=e,c=null;t:for(;;){for(var v;f!==a||i!==0&&f.nodeType!==3||(r=s+i),f!==o||l!==0&&f.nodeType!==3||(d=s+l),f.nodeType===3&&(s+=f.nodeValue.length),(v=f.firstChild)!==null;)c=f,f=v;for(;;){if(f===e)break t;if(c===a&&++u===i&&(r=s),c===o&&++p===l&&(d=s),(v=f.nextSibling)!==null)break;f=c,c=f.parentNode}f=v}a=r===-1||d===-1?null:{start:r,end:d}}else a=null}a=a||{start:0,end:0}}else a=null;for(mm={focusedElem:e,selectionRange:a},as=!1,n=(n&335544064)===n,Ct=t,t=n?9270:1024;Ct!==null;){if(e=Ct,n&&(a=e.deletions,a!==null))for(i=0;i<a.length;i++)n&&Wp(a[i]);if(e.alternate===null&&(e.flags&2)!==0)n&&oy(e),Xu(n);else{if(e.tag===22){if(a=e.alternate,e.memoizedState!==null){a!==null&&a.memoizedState===null&&n&&Wp(a),Xu(n);continue}else if(a!==null&&a.memoizedState!==null){n&&oy(e),Xu(n);continue}}a=e.child,(e.subtreeFlags&t)!==0&&a!==null?(a.return=e,Ct=a):(n&&kb(e),Xu(n))}}kn=null}function Xu(e){for(;Ct!==null;){var t=Ct,n=e,a=t.alternate,l=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if((l&1024)!==0&&a!==null){n=void 0,l=a.memoizedProps,a=a.memoizedState;var i=t.stateNode;try{var o=Vi(t.type,l);n=i.getSnapshotBeforeUpdate(o,a),i.__reactInternalSnapshotBeforeUpdate=n}catch(s){Ne(t,t.return,s)}}break;case 3:if((l&1024)!==0){if(a=t.stateNode.containerInfo,n=a.nodeType,n===9)vm(a);else if(n===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":vm(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&a!==null&&(n=cl(a.memoizedProps,a.stateNode),l=t.memoizedProps,l=gl(l.default,l.update),l!=="none"&&rs(a,n,l,a.memoizedState=[],!0));break;default:if((l&1024)!==0)throw Error(x(163))}if(a=t.sibling,a!==null){a.return=t.return,Ct=a;break}Ct=t.return}}function qb(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:La(e,n),a&4&&xr(5,n);break;case 1:if(La(e,n),a&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(o){Ne(n,n.return,o)}else{var l=Vi(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(l,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){Ne(n,n.return,o)}}a&64&&Nb(n),a&512&&ka(n,n.return);break;case 3:if(La(e,n),a&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{G1(e,t)}catch(o){Ne(n,n.return,o)}}break;case 27:t===null&&a&4&&zb(n);case 26:case 5:La(e,n),t===null&&a&4&&Zp(n),a&512&&ka(n,n.return);break;case 12:La(e,n);break;case 31:La(e,n),a&4&&Yb(e,n);break;case 13:La(e,n),a&4&&Ib(e,n),a&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=LM.bind(null,n),m3(e,n))));break;case 22:if(a=n.memoizedState!==null||Rt,!a){var i=t!==null&&t.memoizedState!==null||we;t=Rt,l=we,Rt=a,(we=i)&&!l?(a=2,(n.subtreeFlags&8772)!==0&&(a|=1),ga(e,n,a)):La(e,n),Rt=t,we=l}break;case 30:La(e,n),a&512&&ka(n,n.return);break;case 7:a&512&&ka(n,n.return);default:La(e,n)}}function nm(e,t){for(e=e.child;e!==null;)Hb(e,t),e=e.sibling}function Hb(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var a=n.style;typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"}else{var l=e.stateNode,i=e.memoizedProps.style,o=i!=null&&i.hasOwnProperty("display")?i.display:null;l.style.display=o==null||typeof o=="boolean"?"":(""+o).trim()}}catch(r){Ne(e,e.return,r)}am(e,t);break;case 6:try{e.stateNode.nodeValue=t?"":e.memoizedProps,ye=!0}catch(r){Ne(e,e.return,r)}break;case 18:try{var s=e.stateNode;t?wy(s,!0):wy(e.stateNode,!1)}catch(r){Ne(e,e.return,r)}break;case 22:case 23:e.memoizedState===null&&nm(e,t);break;default:nm(e,t)}}function am(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){e:{var n=e,a=t;switch(n.tag){case 4:Hb(n,a);break e;case 22:n.memoizedState===null&&am(n,a);break e;default:am(n,a)}}e=e.sibling}}function Gb(e){var t=e.alternate;t!==null&&(e.alternate=null,Gb(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Qc(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Je=null,An=!1;function ha(e,t,n){for(n=n.child;n!==null;)jb(e,t,n),n=n.sibling}function jb(e,t,n){if(qn&&typeof qn.onCommitFiberUnmount=="function")try{qn.onCommitFiberUnmount($r,n)}catch{}switch(n.tag){case 26:we||Bt(n,t),ha(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!we&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:we||Bt(n,t),ir(n);var a=Je,l=An;fi(n.type)&&(Je=n.stateNode,An=!1),ha(e,t,n),CS(n.stateNode,n.type,n.memoizedProps),Je=a,An=l;break;case 5:we||Bt(n,t),ir(n);case 6:if(n.tag===6&&ir(n),a=Je,l=An,Je=null,ha(e,t,n),Je=a,An=l,Je!==null)if(An)try{(Je.nodeType===9?Je.body:Je.nodeName==="HTML"?Je.ownerDocument.body:Je).removeChild(n.stateNode),ye=!0}catch(i){Ne(n,t,i)}else try{Je.removeChild(n.stateNode),ye=!0}catch(i){Ne(n,t,i)}break;case 18:Je!==null&&(An?(e=Je,Ty(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),ls(e)):Ty(Je,n.stateNode));break;case 4:a=Je,l=An,Je=n.stateNode.containerInfo,An=!0,ha(e,t,n),Je=a,An=l;break;case 0:case 11:case 14:case 15:ui(2,n,t),we||ui(4,n,t),ha(e,t,n);break;case 1:we||(Bt(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"&&Db(n,t,a)),ha(e,t,n);break;case 21:ha(e,t,n);break;case 22:we=(a=we)||n.memoizedState!==null,ha(e,t,n),we=a;break;case 30:Bt(n,t),ha(e,t,n);break;case 7:we||Bt(n,t),ha(e,t,n);break;default:ha(e,t,n)}}function Yb(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ls(e)}catch(n){Ne(t,t.return,n)}}}function Ib(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ls(e)}catch(n){Ne(t,t.return,n)}}function wM(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ry),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ry),t;default:throw Error(x(435,e.tag))}}function Ku(e,t){var n=wM(e);t.forEach(function(a){if(!n.has(a)){n.add(a);var l=kM.bind(null,e,a);a.then(l,l)}})}function cn(e,t,n){var a=t.deletions;if(a!==null)for(var l=0;l<a.length;l++){var i=a[l],o=e,s=t,r=s;e:for(;r!==null;){switch(r.tag){case 27:if(fi(r.type)){Je=r.stateNode,An=!1;break e}break;case 5:Je=r.stateNode,An=!1;break e;case 3:case 4:Je=r.stateNode.containerInfo,An=!0;break e}r=r.return}if(Je===null)throw Error(x(160));jb(o,s,i),Je=null,An=!1,o=i.alternate,o!==null&&(o.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Vb(t,e,n),t=t.sibling}var va=null;function Vb(e,t,n){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(l&4&&(a=e.updateQueue,a=a!==null?a.events:null,a!==null))for(var i=0;i<a.length;i++){var o=a[i];o.ref.impl=o.nextImpl}cn(t,e,n),dn(e),l&4&&(ui(3,e,e.return),xr(3,e),ui(5,e,e.return));break;case 1:cn(t,e,n),dn(e),l&512&&(we||a===null||Bt(a,a.return)),l&64&&Rt&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(i=va,cn(t,e,n),dn(e),l&512&&(we||a===null||Bt(a,a.return)),l&4)if(l=a!==null?a.memoizedState:null,n=e.memoizedState,a===null)if(n===null)if(e.stateNode===null)if(Rt)e.stateNode=yS(e.type,e.memoizedProps,t.containerInfo,e);else{e:{t=e.type,n=e.memoizedProps,l=i.ownerDocument||i;t:switch(t){case"title":a=l.getElementsByTagName("title")[0],(!a||a[Cr]||a[qt]||a.namespaceURI==="http://www.w3.org/2000/svg"||a.hasAttribute("itemprop"))&&(a=l.createElement(t),l.head.insertBefore(a,l.querySelector("head > title"))),Yt(a,t,n),a[qt]=e,Ot(a),t=a;break e;case"link":if(i=Dy("link","href",l).get(t+(n.href||""))){for(o=0;o<i.length;o++)if(a=i[o],a.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&a.getAttribute("rel")===(n.rel==null?null:n.rel)&&a.getAttribute("title")===(n.title==null?null:n.title)&&a.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){i.splice(o,1);break t}}a=l.createElement(t),Yt(a,t,n),l.head.appendChild(a);break;case"meta":if(i=Dy("meta","content",l).get(t+(n.content||""))){for(o=0;o<i.length;o++)if(a=i[o],a.getAttribute("content")===(n.content==null?null:""+n.content)&&a.getAttribute("name")===(n.name==null?null:n.name)&&a.getAttribute("property")===(n.property==null?null:n.property)&&a.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&a.getAttribute("charset")===(n.charSet==null?null:n.charSet)){i.splice(o,1);break t}}a=l.createElement(t),Yt(a,t,n),l.head.appendChild(a);break;default:throw Error(x(468,t))}a[qt]=e,Ot(a),t=a}e.stateNode=t}else Rt||Sm(i,e.type,e.stateNode);else e.stateNode=Ny(i,n,e.memoizedProps);else l!==n?(l===null?(t=a.stateNode,t===null||we||t.parentNode.removeChild(t)):l.count--,n===null?Rt||Sm(i,e.type,e.stateNode):Ny(i,n,e.memoizedProps)):n===null&&e.stateNode!==null&&tp(e,e.memoizedProps,a.memoizedProps);break;case 27:cn(t,e,n),dn(e),l&512&&(we||a===null||Bt(a,a.return)),a!==null&&l&4&&tp(e,e.memoizedProps,a.memoizedProps);break;case 5:if(i=xa,xa=!1,cn(t,e,n),xa=i,dn(e),l&512&&(we||a===null||Bt(a,a.return)),e.flags&32){t=e.stateNode;try{Qo(t,""),ye=!0}catch(u){Ne(e,e.return,u)}}l&4&&e.stateNode!=null&&(t=e.memoizedProps,tp(e,t,a!==null?a.memoizedProps:t)),l&1024&&(ap=!0);break;case 6:if(cn(t,e,n),dn(e),l&4){if(e.stateNode===null)throw Error(x(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,ye=!0}catch(u){Ne(e,e.return,u)}}break;case 3:if(ye=!1,mc=null,i=va,va=Ar(t.containerInfo),cn(t,e,n),va=i,dn(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{ls(t.containerInfo)}catch(u){Ne(e,e.return,u)}ap&&(ap=!1,Xb(e)),ye=!1;break;case 4:l=xa,xa=Rt,a=mv(),i=va,va=Ar(e.stateNode.containerInfo),cn(t,e,n),dn(e),va=i,ye&&Zs&&(Bc=!0),ye=a,xa=l;break;case 12:cn(t,e,n),dn(e);break;case 31:cn(t,e,n),dn(e),l&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Ku(e,t)));break;case 13:cn(t,e,n),dn(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(sd=Bn()),l&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Ku(e,t)));break;case 22:i=e.memoizedState!==null,o=a!==null&&a.memoizedState!==null;var s=Rt,r=we,d=xa;Rt=s||i,xa=d||i,we=r||o,cn(t,e,n),we=r,xa=d,Rt=s,dn(e),l&8192&&(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,!i||a===null||o||Rt||we||(t=o||we,n=Rt,a=we,Rt=i||Rt,we=t,Hl(e,2),Rt=n,we=a),!i&&xa||nm(e,i)),l&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,Ku(e,n))));break;case 19:cn(t,e,n),dn(e),l&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Ku(e,t)));break;case 30:l&512&&(we||a===null||Bt(a,a.return)),l=mv(),i=Zs,o=(n&335544064)===n,s=e.memoizedProps,Zs=o&&gl(s.default,s.update)!=="none",cn(t,e,n),dn(e),o&&a!==null&&ye&&(e.flags|=4),Zs=i,ye=l;break;case 21:break;case 7:l&512&&(we||a===null||Bt(a,a.return)),a&&a.stateNode!==null&&(a.stateNode._fragmentFiber=e);default:cn(t,e,n),dn(e)}}function dn(e){var t=e.flags;if(t&2){try{for(var n,a=e.return;a!==null;){if(xb(a)){n=a;break}a=a.return}a=null;for(var l=e.return;l!==null;){if(oh(l)){var i=l.stateNode;a===null?a=[i]:a.push(i)}if(ih(l))break;l=l.return}var o=a;if(n==null)throw Error(x(160));switch(n.tag){case 27:var s=n.stateNode,r=np(e);kc(e,r,s,o);break;case 5:var d=n.stateNode;n.flags&32&&(Qo(d,""),n.flags&=-33);var u=np(e);kc(e,u,d,o);break;case 3:case 4:var p=n.stateNode.containerInfo,f=np(e);Fp(e,f,p,o);break;default:throw Error(x(161))}}catch(c){Ne(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Xb(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Xb(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,as=!0,t.reset(),as=!1),e=e.sibling}}function So(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Kb(t,e),t=t.sibling;else Bb(t,!1)}function Kb(e,t){var n=e.alternate;if(n===null)Jp(e,!1);else switch(e.tag){case 3:if(tm=za=!1,sy(),So(t,e),!za&&!Bc){if(e=Ua,e!==null)for(var a=0;a<e.length;a+=3){n=e[a];var l=e[a+1];SS(n,e[a+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+l+")"})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===""&&(e.style.viewTransitionName="none",e.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),tm=!0}Ua=null;break;case 5:So(t,e);break;case 4:a=za,za=!1,So(t,e),za&&(Bc=!0),za=a;break;case 22:e.memoizedState===null&&(n.memoizedState!==null?Jp(e,!1):So(t,e));break;case 30:a=za,l=sy(),za=!1,So(t,e),za&&(e.flags|=4);var i=e.memoizedProps,o=e.stateNode;t=cl(i,o),o=cl(n.memoizedProps,o);var s=gl(i.default,i.update);s==="none"?t=!1:(i=n.memoizedState,n.memoizedState=null,n=e.child,Tn=0,t=sh(e,n,t,o,s,i,!0),Tn!==(i===null?0:i.length)&&(e.flags|=32)),(e.flags&4)!==0&&t?(Jo(e,e.memoizedProps.onUpdate),Ua=l):l!==null&&(l.push.apply(l,Ua),Ua=l),za=(e.flags&32)!==0?!0:a;break;default:So(t,e)}}function La(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)qb(e,t.alternate,t),t=t.sibling}function Hl(e,t){for(e=e.child;e!==null;){var n=e,a=t;switch(n.tag){case 0:case 11:case 14:case 15:ui(4,n,n.return),Hl(n,a);break;case 1:Bt(n,n.return);var l=n.stateNode;typeof l.componentWillUnmount=="function"&&Db(n,n.return,l),Hl(n,a);break;case 27:(a&2)!==0&&CS(n.stateNode,n.type,n.memoizedProps);case 5:Bt(n,n.return),n.tag!==5&&n.tag!==27||ir(n),Hl(n,a);break;case 6:ir(n);break;case 26:Bt(n,n.return),l=n.stateNode,n.memoizedState!==null||l===null||we||l.parentNode.removeChild(l),Hl(n,a);break;case 22:n.memoizedState===null&&Hl(n,a);break;case 30:Bt(n,n.return),Hl(n,a);break;case 7:Bt(n,n.return);default:Hl(n,a)}e=e.sibling}}function ga(e,t,n){for(n=(t.subtreeFlags&8772)!==0?n:n&-2,t=t.child;t!==null;){var a=t.alternate,l=e,i=t,o=i.flags,s=(n&1)!==0;switch(i.tag){case 0:case 11:case 15:ga(l,i,n),xr(4,i);break;case 1:if(ga(l,i,n),a=i,l=a.stateNode,typeof l.componentDidMount=="function")try{l.componentDidMount()}catch(u){Ne(a,a.return,u)}if(a=i,l=a.updateQueue,l!==null){var r=a.stateNode;try{var d=l.shared.hiddenCallbacks;if(d!==null)for(l.shared.hiddenCallbacks=null,l=0;l<d.length;l++)H1(d[l],r)}catch(u){Ne(a,a.return,u)}}s&&o&64&&Nb(i),ka(i,i.return);break;case 27:(n&2)!==0&&zb(i);case 5:i.tag!==5&&i.tag!==27||iy(i),ga(l,i,n),s&&a===null&&o&4&&Zp(i),ka(i,i.return);break;case 6:iy(i);break;case 26:r=i.stateNode,i.memoizedState!==null||r===null||Rt||Sm(Ar(r.ownerDocument),i.type,r),ga(l,i,n),s&&a===null&&o&4&&Zp(i),ka(i,i.return);break;case 12:ga(l,i,n);break;case 31:ga(l,i,n),s&&o&4&&Yb(l,i);break;case 13:ga(l,i,n),s&&o&4&&Ib(l,i);break;case 22:i.memoizedState===null&&ga(l,i,n),ka(i,i.return);break;case 30:ga(l,i,n),ka(i,i.return);break;case 7:ka(i,i.return);default:ga(l,i,n)}t=t.sibling}}function rh(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Nr(n))}function uh(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Nr(e))}function Pn(e,t,n,a){var l=(n&335544064)===n;if(t.subtreeFlags&(l?10262:10256))for(t=t.child;t!==null;)Qb(e,t,n,a),t=t.sibling;else l&&Ub(t)}function Qb(e,t,n,a){var l=(n&335544064)===n;l&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&cc(t);var i=t.flags;switch(t.tag){case 0:case 11:case 15:Pn(e,t,n,a),i&2048&&xr(9,t);break;case 1:Pn(e,t,n,a);break;case 3:Pn(e,t,n,a),l&&tm&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,e.style.viewTransitionName==="root"&&(e.style.viewTransitionName=""),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName==="none"&&(e.style.viewTransitionName="")),i&2048&&(i=null,t.alternate!==null&&(i=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==i&&(t.refCount++,i!=null&&Nr(i)));break;case 12:if(i&2048){Pn(e,t,n,a),i=t.stateNode;try{var o=t.memoizedProps,s=o.id,r=o.onPostCommit;typeof r=="function"&&r(s,t.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(d){Ne(t,t.return,d)}}else Pn(e,t,n,a);break;case 31:Pn(e,t,n,a);break;case 13:Pn(e,t,n,a);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState!==null?(l&&s!==null&&s.memoizedState===null&&cc(s),o._visibility&2?Pn(e,t,n,a):or(e,t)):(l&&s!==null&&s.memoizedState!==null&&cc(t),o._visibility&2?Pn(e,t,n,a):(o._visibility|=2,Eo(e,t,n,a,(t.subtreeFlags&10256)!==0||!1))),i&2048&&rh(s,t);break;case 24:Pn(e,t,n,a),i&2048&&uh(t.alternate,t);break;case 30:l&&(i=t.alternate,i!==null&&(Ia(i.child,!0),Ia(t.child,!0))),Pn(e,t,n,a);break;default:Pn(e,t,n,a)}}function Eo(e,t,n,a,l){for(l=l&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,o=t,s=n,r=a,d=o.flags;switch(o.tag){case 0:case 11:case 15:Eo(i,o,s,r,l),xr(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState!==null?u._visibility&2?Eo(i,o,s,r,l):or(i,o):(u._visibility|=2,Eo(i,o,s,r,l)),l&&d&2048&&rh(o.alternate,o);break;case 24:Eo(i,o,s,r,l),l&&d&2048&&uh(o.alternate,o);break;default:Eo(i,o,s,r,l)}t=t.sibling}}function or(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,a=t,l=a.flags;switch(a.tag){case 22:or(n,a),l&2048&&rh(a.alternate,a);break;case 24:or(n,a),l&2048&&uh(a.alternate,a);break;default:or(n,a)}t=t.sibling}}var Ni=8192;function Ri(e,t,n){if(e.subtreeFlags&Ni)for(e=e.child;e!==null;)Zb(e,t,n),e=e.sibling}function Zb(e,t,n){switch(e.tag){case 26:Ri(e,t,n),e.flags&Ni&&(e.memoizedState!==null?R3(n,va,e.memoizedState,e.memoizedProps):(e=e.stateNode,(t&335544128)===t&&zy(n,e)));break;case 5:Ri(e,t,n),e.flags&Ni&&(e=e.stateNode,(t&335544128)===t&&zy(n,e));break;case 3:case 4:var a=va;va=Ar(e.stateNode.containerInfo),Ri(e,t,n),va=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Ni,Ni=16777216,Ri(e,t,n),Ni=a):Ri(e,t,n));break;case 30:if((e.flags&Ni)!==0&&(a=e.memoizedProps.name,a!=null&&a!=="auto")){var l=e.stateNode;l.paired=null,kn===null&&(kn=new Map),kn.set(a,l)}Ri(e,t,n);break;default:Ri(e,t,n)}}function Fb(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function js(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];Ct=a,Pb(a,e)}Fb(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Jb(e),e=e.sibling}function Jb(e){switch(e.tag){case 0:case 11:case 15:js(e),e.flags&2048&&ui(9,e,e.return);break;case 3:js(e);break;case 12:js(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,dc(e)):js(e);break;default:js(e)}}function dc(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];Ct=a,Pb(a,e)}Fb(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:ui(8,t,t.return),dc(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,dc(t));break;default:dc(t)}e=e.sibling}}function Pb(e,t){for(;Ct!==null;){var n=Ct;switch(n.tag){case 0:case 11:case 15:ui(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var a=n.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:Nr(n.memoizedState.cache)}if(a=n.child,a!==null)a.return=n,Ct=a;else e:for(n=e;Ct!==null;){a=Ct;var l=a.sibling,i=a.return;if(Gb(a),a===n){Ct=null;break e}if(l!==null){l.return=i,Ct=l;break e}Ct=i}}}var MM={getCacheForType:function(e){var t=Ht(vt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ht(vt).controller.signal}},$M=typeof WeakMap=="function"?WeakMap:Map,Ae=0,Be=null,de=null,pe=0,Ce=0,xn=null,Kl=!1,us=!1,ch=!1,ml=0,ut=0,ci=0,Bi=0,qc=0,Un=0,Fo=0,sr=null,En=null,lm=!1,sd=0,Wb=0,Hc=1/0,Gc=null,ni=null,et=0,ba=null,Xi=null,Ya=0,im=0,om=null,eS=null,Yo=null,Io=null,Vo=null,rr=0,fc=null;function Gn(){return(Ae&2)!==0&&pe!==0?pe&-pe:F.T!==null?fh():l1()}function tS(){if(Un===0)if((pe&536870912)===0||re){var e=zu;zu<<=1,(zu&3932160)===0&&(zu=262144),Un=e}else Un=536870912;return e=It.current,e!==null&&(e.flags|=32),Un}function Jo(e,t){if(t!=null){var n=e.stateNode,a=n.ref;a===null&&(a=n.ref=ES(cl(e.memoizedProps,n))),Io===null&&(Io=[]),Io.push(t.bind(null,a))}}function Mn(e,t,n){(e===Be&&(Ce===2||Ce===9)||e.cancelPendingCommit!==null)&&(Po(e,0),Ql(e,pe,Un,!1)),Rr(e,n),((Ae&2)===0||e!==Be)&&(e===Be&&((Ae&2)===0&&(Bi|=n),ut===4&&Ql(e,pe,Un,!1)),Xa(e))}function nS(e,t,n){if((Ae&6)!==0)throw Error(x(327));var a=!n&&(t&127)===0&&(t&e.expiredLanes)===0||_r(e,t),l=a?CM(e,t):lp(e,t,!0),i=a;do{if(l===0){us&&!a&&Ql(e,t,0,!1);break}else{if(n=e.current.alternate,i&&!_M(n)){l=lp(e,t,!1),i=!1;continue}if(l===2){if(i=t,e.errorRecoveryDisabledLanes&i)var o=0;else o=e.pendingLanes&-536870913,o=o!==0?o:o&536870912?536870912:0;if(o!==0){t=o;e:{var s=e;l=sr;var r=s.current.memoizedState.isDehydrated;if(r&&(Po(s,o).flags|=256),o=lp(s,o,!1),o!==2&&o!==6){if(ch&&!r){s.errorRecoveryDisabledLanes|=i,Bi|=i,l=4;break e}i=En,En=l,i!==null&&(En===null?En=i:En.push.apply(En,i))}l=o}if(i=!1,l!==2)continue}}if(l===1){Po(e,0),Ql(e,t,0,!0);break}e:{switch(a=e,i=l,i){case 0:case 1:throw Error(x(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Ql(a,t,Un,!Kl);break e;case 2:En=null;break;case 3:case 5:break;default:throw Error(x(329))}if((t&62914560)===t&&(l=sd+300-Bn(),10<l)){if(Ql(a,t,Un,!Kl),Kc(a,0,!0)!==0)break e;Ya=t,a.timeoutHandle=mh(uy.bind(null,a,n,En,Gc,lm,t,Un,Bi,Fo,Kl,i,"Throttled",-0,0),l);break e}uy(a,n,En,Gc,lm,t,Un,Bi,Fo,Kl,i,null,-0,0)}}break}while(!0);Xa(e)}function uy(e,t,n,a,l,i,o,s,r,d,u,p,f,c){e.timeoutHandle=-1;var v=t.subtreeFlags,S=(i&335544064)===i;if(p=null,(S||v&8192||(v&16785408)===16785408)&&(p={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:qa},kn=null,Zb(t,i,p),S&&(v=p,S=e.containerInfo,S=(S.nodeType===9?S:S.ownerDocument).__reactViewTransition,S!=null&&(v.count++,v.waitingForViewTransition=!0,v=Er.bind(v),S.finished.then(v,v))),v=(i&62914560)===i?sd-Bn():(i&4194048)===i?Wb-Bn():0,v=C3(p,v),v!==null)){Ya=i,e.cancelPendingCommit=v(dy.bind(null,e,t,i,n,a,l,o,s,r,d,u,p,null,f,c)),Ql(e,i,o,!d);return}dy(e,t,i,n,a,l,o,s,r,d,u,p)}function _M(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var a=0;a<n.length;a++){var l=n[a],i=l.getSnapshot;l=l.value;try{if(!jn(i(),l))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ql(e,t,n,a){t=Wy(e,t),t&=~qc,t&=~Bi,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var l=t;0<l;){var i=31-Hn(l),o=1<<i;a[i]=-1,l&=~o}n!==0&&t1(e,n,t)}function rd(){return(Ae&6)===0?(zr(0,!1),!1):!0}function dh(){if(de!==null){if(Ce===0)var e=de.return;else e=de,ol=Ji=null,Qm(e),Ho=null,hr=0,e=de;for(;e!==null;)Ob(e.alternate,e),e=e.return;de=null}}function Po(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,ZM(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Ya=0,dh(),Be=e,de=n=sl(e.current,null),pe=t,Ce=0,xn=null,Kl=!1,us=_r(e,t),ch=!1,Fo=Un=qc=Bi=ci=ut=0,En=sr=null,lm=!1,ml=Wy(e,t),Pc(),n}function aS(e,t){le=null,F.H=xc,t===ss||t===td?(t=kv(),Ce=3):t===Hm?(t=kv(),Ce=4):Ce=t===nh?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,xn=t,de===null&&(ut=1,zc(e,aa(t,e.current)))}function lS(){var e=It.current;return e===null?!0:(pe&4194048)===pe?en===null:(pe&62914560)===pe||(pe&536870912)!==0?e===en:!1}function iS(){var e=F.H;return F.H=xc,e===null?xc:e}function oS(){var e=F.A;return F.A=MM,e}function jc(){ut=4,Kl||(pe&4194048)!==pe&&It.current!==null||(us=!0),(ci&134217727)===0&&(Bi&134217727)===0||Be===null||Ql(Be,pe,Un,!1)}function lp(e,t,n){var a=Ae;Ae|=2;var l=iS(),i=oS();(Be!==e||pe!==t)&&(Gc=null,Po(e,t)),t=!1;var o=ut;e:do try{if(Ce!==0&&de!==null){var s=de,r=xn;switch(Ce){case 8:dh(),o=6;break e;case 3:case 2:case 9:case 6:It.current===null&&(t=!0);var d=Ce;if(Ce=0,xn=null,Lo(e,s,r,d),n&&us){o=0;break e}break;default:d=Ce,Ce=0,xn=null,Lo(e,s,r,d)}}RM(),o=ut;break}catch(u){aS(e,u)}while(!0);return t&&e.shellSuspendCounter++,ol=Ji=null,Ae=a,F.H=l,F.A=i,de===null&&(Be=null,pe=0,Pc()),o}function RM(){for(;de!==null;)sS(de)}function CM(e,t){var n=Ae;Ae|=2;var a=iS(),l=oS();Be!==e||pe!==t?(Gc=null,Hc=Bn()+500,Po(e,t)):us=_r(e,t);e:do try{if(Ce!==0&&de!==null){t=de;var i=xn;t:switch(Ce){case 1:Ce=0,xn=null,Lo(e,t,i,1);break;case 2:case 9:if(Lv(i)){Ce=0,xn=null,cy(t);break}t=function(){Ce!==2&&Ce!==9||Be!==e||(Ce=7),Xa(e)},i.then(t,t);break e;case 3:Ce=7;break e;case 4:Ce=5;break e;case 7:Lv(i)?(Ce=0,xn=null,cy(t)):(Ce=0,xn=null,Lo(e,t,i,7));break;case 5:var o=null;switch(de.tag){case 26:o=de.memoizedState;case 5:case 27:var s=de;if(o?DS(o):s.stateNode.complete){Ce=0,xn=null;var r=s.sibling;if(r!==null)de=r;else{var d=s.return;d!==null?(de=d,ud(d)):de=null}break t}}Ce=0,xn=null,Lo(e,t,i,5);break;case 6:Ce=0,xn=null,Lo(e,t,i,6);break;case 8:dh(),ut=6;break e;default:throw Error(x(462))}}OM();break}catch(u){aS(e,u)}while(!0);return ol=Ji=null,F.H=a,F.A=l,Ae=n,de!==null?0:(Be=null,pe=0,Pc(),ut)}function OM(){for(;de!==null&&!KT();)sS(de)}function sS(e){var t=Cb(e.alternate,e,ml);e.memoizedProps=e.pendingProps,t===null?ud(e):de=t}function cy(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Pv(n,t,t.pendingProps,t.type,void 0,pe);break;case 11:t=Pv(n,t,t.pendingProps,t.type.render,t.ref,pe);break;case 5:Qm(t);var a=t;a===Nt&&(re?($c(a),a.tag===5&&a.stateNode!=null&&(Ye=a.stateNode)):($c(a),re=!0));default:Ob(n,t),t=de=N1(t,ml),t=Cb(n,t,ml)}e.memoizedProps=e.pendingProps,t===null?ud(e):de=t}function Lo(e,t,n,a){ol=Ji=null,Qm(t),Ho=null,hr=0;var l=t.return;try{if(vM(e,l,t,n,pe)){ut=1,zc(e,aa(n,e.current)),de=null;return}}catch(i){if(l!==null)throw de=l,i;ut=1,zc(e,aa(n,e.current)),de=null;return}t.flags&32768?(re||a===1?e=!0:us||(pe&536870912)!==0?e=!1:(Kl=e=!0,(a===2||a===9||a===3||a===6)&&(a=It.current,a!==null&&a.tag===13&&(a.flags|=16384))),rS(t,e)):ud(t)}function ud(e){var t=e;do{if((t.flags&32768)!==0){rS(t,Kl);return}e=t.return;var n=AM(t.alternate,t,ml);if(n!==null){de=n;return}if(t=t.sibling,t!==null){de=t;return}de=t=e}while(t!==null);ut===0&&(ut=5)}function rS(e,t){do{var n=EM(e.alternate,e);if(n!==null){n.flags&=32767,de=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){de=e;return}de=e=n}while(e!==null);ut=6,de=null}function dy(e,t,n,a,l,i,o,s,r,d,u,p){e.cancelPendingCommit=null;do cd();while(et!==0);if((Ae&6)!==0)throw Error(x(327));if(t!==null){if(t===e.current)throw Error(x(177));e===Be&&(de=Be=null,pe=0),Xi=t,ba=e,Ya=n,om=l,eS=a,NM(e,t,n,o,s,r,p)}}function NM(e,t,n,a,l,i,o){var s=t.lanes|t.childLanes;if(im=s,s|=zm,aw(e,n,s,a,l,i),Io=null,(n&335544064)===n?(Vo=iM(e),a=10262):(Vo=null,a=10256),(t.subtreeFlags&a)!==0||(t.flags&a)!==0?(e.callbackNode=null,e.callbackPriority=0,UM(Ac,function(){return cm(),null})):(e.callbackNode=null,e.callbackPriority=0),Uc=!1,a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=F.T,F.T=null,l=Ee.p,Ee.p=2,i=Ae,Ae|=4;try{TM(e,t,n)}finally{Ae=i,Ee.p=l,F.T=a}}et=1,Uc?Yo=t3(o,e.containerInfo,Vo,sm,rm,xM,um,cm,DM,null,null):(sm(),rm(),um())}function DM(e){if(et!==0){var t=ba.onRecoverableError;t(e,{componentStack:null})}}function xM(){et===3&&(et=0,Kb(Xi,ba),et=4)}function sm(){if(et===1){et=0;var e=ba,t=Xi,n=Ya,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=F.T,F.T=null;var l=Ee.p;Ee.p=2;var i=Ae;Ae|=4;try{Zs=Bc=!1,Vb(t,e,n),n=mm;var o=T1(e.containerInfo),s=n.focusedElem,r=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&E1(s.ownerDocument.documentElement,s)){if(r!==null&&xm(s)){var d=r.start,u=r.end;if(u===void 0&&(u=d),"selectionStart"in s)s.selectionStart=d,s.selectionEnd=Math.min(u,s.value.length);else{var p=s.ownerDocument||document,f=p&&p.defaultView||window;if(f.getSelection){var c=f.getSelection(),v=s.textContent.length,S=Math.min(r.start,v),y=r.end===void 0?S:Math.min(r.end,v);!c.extend&&S>y&&(o=y,y=S,S=o);var m=_v(s,S),h=_v(s,y);if(m&&h&&(c.rangeCount!==1||c.anchorNode!==m.node||c.anchorOffset!==m.offset||c.focusNode!==h.node||c.focusOffset!==h.offset)){var g=p.createRange();g.setStart(m.node,m.offset),c.removeAllRanges(),S>y?(c.addRange(g),c.extend(h.node,h.offset)):(g.setEnd(h.node,h.offset),c.addRange(g))}}}}for(p=[],c=s;c=c.parentNode;)c.nodeType===1&&p.push({element:c,left:c.scrollLeft,top:c.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<p.length;s++){var b=p[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}as=!!pm,mm=pm=null}finally{Ae=i,Ee.p=l,F.T=a}}e.current=t,et=2}}function rm(){if(et===2){et=0;var e=ba,t=Xi,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=F.T,F.T=null;var a=Ee.p;Ee.p=2;var l=Ae;Ae|=4;try{qb(e,t.alternate,t)}finally{Ae=l,Ee.p=a,F.T=n}}et=3}}function um(){if(et===4||et===3){et=0;var e=Yo;Yo=null,QT();var t=ba,n=Xi,a=Ya,l=eS,i=(a&335544064)===a?10262:10256;if((n.subtreeFlags&i)!==0||(n.flags&i)!==0?et=5:(et=0,Xi=ba=null,uS(t,t.pendingLanes)),i=t.pendingLanes,i===0&&(ni=null),_m(a),n=n.stateNode,qn&&typeof qn.onCommitFiberRoot=="function")try{qn.onCommitFiberRoot($r,n,void 0,(n.current.flags&128)===128)}catch{}if(l!==null){n=F.T,i=Ee.p,Ee.p=2,F.T=null;try{for(var o=t.onRecoverableError,s=0;s<l.length;s++){var r=l[s];o(r.value,{componentStack:r.stack})}}finally{F.T=n,Ee.p=i}}if(l=Io,o=Vo,Vo=null,l!==null&&(Io=null,o===null&&(o=[]),e!==null))for(r=0;r<l.length;r++)n=(0,l[r])(o),n!==void 0&&e.finished.finally(n);(Ya&3)!==0&&cd(),Xa(t),i=t.pendingLanes,(a&261930)!==0&&(i&42)!==0?t===fc?rr++:(rr=0,fc=t):(rr=0,fc=null),zr(0,!1)}}function uS(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Nr(t)))}function cd(){return Yo!==null&&(Yo.skipTransition(),Yo=null),sm(),rm(),um(),cm()}function cm(){if(et!==5)return!1;var e=ba,t=im;im=0;var n=_m(Ya),a=F.T,l=Ee.p;try{Ee.p=32>n?32:n,F.T=null,n=om,om=null;var i=ba,o=Ya;if(et=0,Xi=ba=null,Ya=0,(Ae&6)!==0)throw Error(x(331));var s=Ae;if(Ae|=4,Jb(i.current),Qb(i,i.current,o,n),Ae=s,zr(0,!1),qn&&typeof qn.onPostCommitFiberRoot=="function")try{qn.onPostCommitFiberRoot($r,i)}catch{}return!0}finally{Ee.p=l,F.T=a,uS(e,t)}}function fy(e,t,n){t=aa(n,t),t=Yp(e.stateNode,t,2),e=Wl(e,t,2),e!==null&&(Rr(e,2),Xa(e))}function Ne(e,t,n){if(e.tag===3)fy(e,e,n);else for(;t!==null;){if(t.tag===3){fy(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(ni===null||!ni.has(a))){e=aa(n,e),n=wb(2),a=Wl(t,n,2),a!==null&&(Mb(n,a,t,e),Rr(a,2),Xa(a));break}}t=t.return}}function ip(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new $M;var l=new Set;a.set(t,l)}else l=a.get(t),l===void 0&&(l=new Set,a.set(t,l));l.has(n)||(ch=!0,l.add(n),e=zM.bind(null,e,t,n),t.then(e,e))}function zM(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Be===e&&(pe&n)===n&&((ut===4||ut===3&&(pe&62914560)===pe&&300>Bn()-sd)&&(Ae&2)===0?Po(e,0):qc|=n,Fo===pe&&(Fo=0)),Xa(e)}function cS(e,t){t===0&&(t=e1()),e=Fi(e,t),e!==null&&(Rr(e,t),Xa(e))}function LM(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),cS(e,n)}function kM(e,t){var n=0;switch(e.tag){case 31:case 13:var a=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(x(314))}a!==null&&a.delete(t),cS(e,n)}function UM(e,t){return Mm(e,t)}var Wo=null,To=null,dm=!1,Yc=!1,op=!1,Zl=0;function Xa(e){e!==To&&e.next===null&&(To===null?Wo=To=e:To=To.next=e),Yc=!0,dm||(dm=!0,qM())}function zr(e,t){if(!op&&Yc){op=!0;do for(var n=!1,a=Wo;a!==null;){if(!t)if(e!==0){var l=a.pendingLanes;if(l===0)var i=0;else{var o=a.suspendedLanes,s=a.pingedLanes;i=(1<<31-Hn(42|e)+1)-1,i&=l&~(o&~s),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(n=!0,py(a,i))}else i=pe,i=Kc(a,a===Be?i:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(i&3)===0||_r(a,i)||(n=!0,py(a,i));a=a.next}while(n);op=!1}}function BM(){dS()}function dS(){Yc=dm=!1;var e=0;Zl!==0&&QM()&&(e=Zl);for(var t=Bn(),n=null,a=Wo;a!==null;){var l=a.next,i=fS(a,t);i===0?(a.next=null,n===null?Wo=l:n.next=l,l===null&&(To=n)):(n=a,(e!==0||(i&3)!==0)&&(Yc=!0)),a=l}et!==0&&et!==5||zr(e,!1),Zl!==0&&(Zl=0)}function fS(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,l=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var o=31-Hn(i),s=1<<o,r=l[o];r===-1?((s&n)===0||(s&a)!==0)&&(l[o]=nw(s,t)):r<=t&&(e.expiredLanes|=s),i&=~s}if(t=Be,n=pe,n=Kc(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,n===0||e===t&&(Ce===2||Ce===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Bf(a),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||_r(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&Bf(a),_m(n)){case 2:case 8:n=Jy;break;case 32:n=Ac;break;case 268435456:n=Py;break;default:n=Ac}return a=pS.bind(null,e),n=Mm(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&Bf(a),e.callbackPriority=2,e.callbackNode=null,2}function pS(e,t){if(et!==0&&et!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(cd()&&e.callbackNode!==n)return null;var a=pe;return a=Kc(e,e===Be?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(nS(e,a,t),fS(e,Bn()),e.callbackNode!=null&&e.callbackNode===n?pS.bind(null,e):null)}function py(e,t){if(cd())return null;nS(e,t,!0)}function qM(){FM(function(){(Ae&6)!==0?Mm(Fy,BM):dS()})}function fh(){if(Zl===0){var e=ji;e===0&&(e=xu,xu<<=1,(xu&261888)===0&&(xu=256)),Zl=e}return Zl}function my(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ec(e)}function HM(e,t,n,a,l){if(t==="submit"&&n&&n.stateNode===l){var i=my((l[_n]||null).action),o=a.submitter;o&&(t=(t=o[_n]||null)?my(t.formAction):o.getAttribute("formAction"),t!==null&&(i=t,o=null));var s=new Zc("action","action",null,a,l);e.push({event:s,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Zl!==0){var r=new FormData(l,o);Gp(n,{pending:!0,data:r,method:l.method,action:i},null,r)}}else typeof i=="function"&&(s.preventDefault(),r=new FormData(l,o),Gp(n,{pending:!0,data:r,method:l.method,action:i},i,r))},currentTarget:l}]})}}for(Qu=0;Qu<Op.length;Qu++)Zu=Op[Qu],hy=Zu.toLowerCase(),gy=Zu[0].toUpperCase()+Zu.slice(1),Sa(hy,"on"+gy);var Zu,hy,gy,Qu;Sa(M1,"onAnimationEnd");Sa($1,"onAnimationIteration");Sa(_1,"onAnimationStart");Sa("dblclick","onDoubleClick");Sa("focusin","onFocus");Sa("focusout","onBlur");Sa(Jw,"onTransitionRun");Sa(Pw,"onTransitionStart");Sa(Ww,"onTransitionCancel");Sa(R1,"onTransitionEnd");Ko("onMouseEnter",["mouseout","mouseover"]);Ko("onMouseLeave",["mouseout","mouseover"]);Ko("onPointerEnter",["pointerout","pointerover"]);Ko("onPointerLeave",["pointerout","pointerover"]);Qi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Qi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Qi("onBeforeInput",["compositionend","keypress","textInput","paste"]);Qi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Qi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Qi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var yr="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(" "),GM=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(yr));function mS(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var a=e[n],l=a.event;a=a.listeners;e:{var i=void 0;if(t)for(var o=a.length-1;0<=o;o--){var s=a[o],r=s.instance,d=s.currentTarget;if(s=s.listener,r!==i&&l.isPropagationStopped())break e;i=s,l.currentTarget=d;try{i(l)}catch(u){Tc(u)}l.currentTarget=null,i=r}else for(o=0;o<a.length;o++){if(s=a[o],r=s.instance,d=s.currentTarget,s=s.listener,r!==i&&l.isPropagationStopped())break e;i=s,l.currentTarget=d;try{i(l)}catch(u){Tc(u)}l.currentTarget=null,i=r}}}}function ce(e,t){var n=t[cv];n===void 0&&(n=t[cv]=new Set);var a=e+"__bubble";n.has(a)||(hS(t,e,2,!1),n.add(a))}function sp(e,t,n){var a=0;t&&(a|=4),hS(n,e,a,t)}var Fu="_reactListening"+Math.random().toString(36).slice(2);function ph(e){if(!e[Fu]){e[Fu]=!0,o1.forEach(function(n){n!=="selectionchange"&&(GM.has(n)||sp(n,!1,e),sp(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Fu]||(t[Fu]=!0,sp("selectionchange",!1,t))}}function hS(e,t,n,a){switch(qS(t)){case 2:var l=x3;break;case 8:l=z3;break;default:l=Sh}n=l.bind(null,t,n,e),l=void 0,!$p||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),a?l!==void 0?e.addEventListener(t,n,{capture:!0,passive:l}):e.addEventListener(t,n,!0):l!==void 0?e.addEventListener(t,n,{passive:l}):e.addEventListener(t,n,!1)}function rp(e,t,n,a,l){var i=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var o=a.tag;if(o===3||o===4){var s=a.stateNode.containerInfo;if(s===l)break;if(o===4)for(o=a.return;o!==null;){var r=o.tag;if((r===3||r===4)&&o.stateNode.containerInfo===l)return;o=o.return}for(;s!==null;){if(o=Di(s),o===null)return;if(r=o.tag,r===5||r===6||r===26||r===27){a=i=o;continue e}s=s.parentNode}}a=a.return}m1(function(){var d=i,u=Cm(n),p=[];e:{var f=C1.get(e);if(f!==void 0){var c=Zc,v=e;switch(e){case"keypress":if(nc(n)===0)break e;case"keydown":case"keyup":c=_w;break;case"focusin":v="focus",c=If;break;case"focusout":v="blur",c=If;break;case"beforeblur":case"afterblur":c=If;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":c=yv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":c=hw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":c=Dw;break;case M1:case $1:case _1:c=yw;break;case R1:c=zw;break;case"scroll":case"scrollend":c=pw;break;case"wheel":c=kw;break;case"copy":case"cut":case"paste":c=Sw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":c=Sv;break;case"submit":c=Ow;break;case"toggle":case"beforetoggle":c=Bw}var S=(t&4)!==0,y=!S&&(e==="scroll"||e==="scrollend"),m=S?f!==null?f+"Capture":null:f;S=[];for(var h=d,g;h!==null;){var b=h;if(g=b.stateNode,b=b.tag,b!==5&&b!==26&&b!==27||g===null||m===null||(b=cr(h,m),b!=null&&S.push(br(h,b,g))),y)break;h=h.return}0<S.length&&(f=new c(f,v,null,n,u),p.push({event:f,listeners:S}))}}if((t&7)===0){e:{if(c=e==="mouseover"||e==="pointerover",f=e==="mouseout"||e==="pointerout",c&&n!==Mp&&(v=n.relatedTarget||n.fromElement)&&(Di(v)||v[is]))break e;(f||c)&&(v=u.window===u?u:(c=u.ownerDocument)?c.defaultView||c.parentWindow:window,f?(c=n.relatedTarget||n.toElement,f=d,c=c?Di(c):null,c!==null&&(y=Mr(c),S=c.tag,c!==y||S!==5&&S!==27&&S!==6)&&(c=null)):(f=null,c=d),f!==c&&(S=yv,b="onMouseLeave",m="onMouseEnter",h="mouse",(e==="pointerout"||e==="pointerover")&&(S=Sv,b="onPointerLeave",m="onPointerEnter",h="pointer"),y=f==null?v:Ks(f),g=c==null?v:Ks(c),v=new S(b,h+"leave",f,n,u),v.target=y,v.relatedTarget=g,b=null,Di(u)===d&&(S=new S(m,h+"enter",c,n,u),S.target=g,S.relatedTarget=y,b=S),y=b,S=f&&c?pp(f,c,jM):null,f!==null&&vy(p,v,f,S,!1),c!==null&&y!==null&&vy(p,y,c,S,!0)))}e:{if(f=d?Ks(d):window,c=f.nodeName&&f.nodeName.toLowerCase(),c==="select"||c==="input"&&f.type==="file")var M=wv;else if(Tv(f))if(S1)M=Qw;else{M=Xw;var $=Vw}else c=f.nodeName,!c||c.toLowerCase()!=="input"||f.type!=="checkbox"&&f.type!=="radio"?d&&Rm(d.elementType)&&(M=wv):M=Kw;if(M&&(M=M(e,d))){b1(p,M,n,u);break e}$&&$(e,f,d)}switch($=d?Ks(d):window,e){case"focusin":(Tv($)||$.contentEditable==="true")&&(Co=$,Rp=d,Ps=null);break;case"focusout":Ps=Rp=Co=null;break;case"mousedown":Cp=!0;break;case"contextmenu":case"mouseup":case"dragend":Cp=!1,Rv(p,n,u);break;case"selectionchange":if(Fw)break;case"keydown":case"keyup":Rv(p,n,u)}var w;if(Dm)e:{switch(e){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else Ro?v1(e,n)&&(T="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(g1&&n.locale!=="ko"&&(Ro||T!=="onCompositionStart"?T==="onCompositionEnd"&&Ro&&(w=h1()):(Vl=u,Om="value"in Vl?Vl.value:Vl.textContent,Ro=!0)),$=Ic(d,T),0<$.length&&(T=new bv(T,e,null,n,u),p.push({event:T,listeners:$}),w?T.data=w:(w=y1(n),w!==null&&(T.data=w)))),(w=Hw?Gw(e,n):jw(e,n))&&(T=Ic(d,"onBeforeInput"),0<T.length&&($=new bv("onBeforeInput","beforeinput",null,n,u),p.push({event:$,listeners:T}),$.data=w)),HM(p,e,d,n,u)}mS(p,t)})}function br(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ic(e,t){for(var n=t+"Capture",a=[];e!==null;){var l=e,i=l.stateNode;if(l=l.tag,l!==5&&l!==26&&l!==27||i===null||(l=cr(e,n),l!=null&&a.unshift(br(e,l,i)),l=cr(e,t),l!=null&&a.push(br(e,l,i))),e.tag===3)return a;e=e.return}return[]}function jM(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function vy(e,t,n,a,l){for(var i=t._reactName,o=[];n!==null&&n!==a;){var s=n,r=s.alternate,d=s.stateNode;if(s=s.tag,r!==null&&r===a)break;s!==5&&s!==26&&s!==27||d===null||(r=d,l?(d=cr(n,i),d!=null&&o.unshift(br(n,d,r))):l||(d=cr(n,i),d!=null&&o.push(br(n,d,r)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var YM=/\r\n?/g,IM=/\u0000|\uFFFD/g;function yy(e){return(typeof e=="string"?e:""+e).replace(YM,`
|
|
41
|
-
`).replace(IM,"")}function gS(e,t){return t=yy(t),yy(e)===t}function Oe(e,t,n,a,l,i){switch(n){case"children":if(typeof a=="string")t==="body"||t==="textarea"&&a===""||Qo(e,a);else if(typeof a=="number"||typeof a=="bigint")t!=="body"&&Qo(e,""+a);else return;break;case"className":ku(e,"class",a);break;case"tabIndex":ku(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":ku(e,n,a);break;case"style":p1(e,a,i);return;case"data":if(t!=="object"){ku(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=ec(a),e.setAttribute(n,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(n,"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 i=="function"&&(n==="formAction"?(t!=="input"&&Oe(e,t,"name",l.name,l,null),Oe(e,t,"formEncType",l.formEncType,l,null),Oe(e,t,"formMethod",l.formMethod,l,null),Oe(e,t,"formTarget",l.formTarget,l,null)):(Oe(e,t,"encType",l.encType,l,null),Oe(e,t,"method",l.method,l,null),Oe(e,t,"target",l.target,l,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=ec(a),e.setAttribute(n,a);break;case"onClick":a!=null&&(e.onclick=qa);return;case"onScroll":a!=null&&ce("scroll",e);return;case"onScrollEnd":a!=null&&ce("scrollend",e);return;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(x(61));if(n=a.__html,n!=null){if(l.children!=null)throw Error(x(60));i?.__html!==n&&(e.innerHTML=n)}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}n=ec(a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,a):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":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":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":a===!0?e.setAttribute(n,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,a):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(n,a):e.removeAttribute(n);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(n):e.setAttribute(n,a);break;case"popover":ce("beforetoggle",e),ce("toggle",e),Wu(e,"popover",a);break;case"xlinkActuate":al(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":al(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":al(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":al(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":al(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":al(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":al(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":al(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":al(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Wu(e,"is",a);break;case"innerText":case"textContent":return;default:if(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")n=dw.get(n)||n,Wu(e,n,a);else return}ye=!0}function fm(e,t,n,a,l,i){switch(n){case"style":p1(e,a,i);return;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(x(61));if(n=a.__html,n!=null){if(l.children!=null)throw Error(x(60));i?.__html!==n&&(e.innerHTML=n)}}break;case"children":if(typeof a=="string")Qo(e,a);else if(typeof a=="number"||typeof a=="bigint")Qo(e,""+a);else return;break;case"onScroll":a!=null&&ce("scroll",e);return;case"onScrollEnd":a!=null&&ce("scrollend",e);return;case"onClick":a!=null&&(e.onclick=qa);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!s1.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(l=n.endsWith("Capture"),i=n.slice(2,l?n.length-7:void 0),t=e[_n]||null,t=t!=null?t[n]:null,typeof t=="function"&&e.removeEventListener(i,t,l),typeof a=="function")){typeof t!="function"&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(i,a,l);break e}ye=!0,n in e?e[n]=a:a===!0?e.setAttribute(n,""):Wu(e,n,a)}return}ye=!0}function Yt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ce("error",e),ce("load",e);var a=!1,l=!1,i;for(i in n)if(n.hasOwnProperty(i)){var o=n[i];if(o!=null)switch(i){case"src":a=!0;break;case"srcSet":l=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(x(137,t));default:Oe(e,t,i,o,n,null)}}l&&Oe(e,t,"srcSet",n.srcSet,n,null),a&&Oe(e,t,"src",n.src,n,null);return;case"input":ce("invalid",e);var s=i=o=l=null,r=null,d=null;for(a in n)if(n.hasOwnProperty(a)){var u=n[a];if(u!=null)switch(a){case"name":l=u;break;case"type":o=u;break;case"checked":r=u;break;case"defaultChecked":d=u;break;case"value":i=u;break;case"defaultValue":s=u;break;case"children":case"dangerouslySetInnerHTML":if(u!=null)throw Error(x(137,t));break;default:Oe(e,t,a,u,n,null)}}c1(e,i,s,r,d,o,l,!1);return;case"select":ce("invalid",e),a=o=i=null;for(l in n)if(n.hasOwnProperty(l)&&(s=n[l],s!=null))switch(l){case"value":i=s;break;case"defaultValue":o=s;break;case"multiple":a=s;default:Oe(e,t,l,s,n,null)}t=i,n=o,e.multiple=!!a,t!=null?Uo(e,!!a,t,!1):n!=null&&Uo(e,!!a,n,!0);return;case"textarea":ce("invalid",e),i=l=a=null;for(o in n)if(n.hasOwnProperty(o)&&(s=n[o],s!=null))switch(o){case"value":a=s;break;case"defaultValue":l=s;break;case"children":i=s;break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(x(91));break;default:Oe(e,t,o,s,n,null)}f1(e,a,l,i);return;case"option":for(r in n)n.hasOwnProperty(r)&&(a=n[r],a!=null)&&(r==="selected"?e.selected=a&&typeof a!="function"&&typeof a!="symbol":Oe(e,t,r,a,n,null));return;case"dialog":ce("beforetoggle",e),ce("toggle",e),ce("cancel",e),ce("close",e);break;case"iframe":case"object":ce("load",e);break;case"video":case"audio":for(a=0;a<yr.length;a++)ce(yr[a],e);break;case"image":ce("error",e),ce("load",e);break;case"details":ce("toggle",e);break;case"embed":case"source":case"link":ce("error",e),ce("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(d in n)if(n.hasOwnProperty(d)&&(a=n[d],a!=null))switch(d){case"children":case"dangerouslySetInnerHTML":throw Error(x(137,t));default:Oe(e,t,d,a,n,null)}return;default:if(Rm(t)){for(u in n)n.hasOwnProperty(u)&&(a=n[u],a!==void 0&&fm(e,t,u,a,n,void 0));return}}for(s in n)n.hasOwnProperty(s)&&(a=n[s],a!=null&&Oe(e,t,s,a,n,null))}var VM={};function XM(e,t,n,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var l=null,i=null,o=null,s=null,r=null,d=null,u=null;for(c in n){var p=n[c];if(n.hasOwnProperty(c)&&p!=null)switch(c){case"checked":break;case"value":break;case"defaultValue":r=p;default:a.hasOwnProperty(c)||Oe(e,t,c,null,a,p)}}for(var f in a){var c=a[f];if(p=n[f],a.hasOwnProperty(f)&&(c!=null||p!=null))switch(f){case"type":c!==p&&(ye=!0),i=c;break;case"name":c!==p&&(ye=!0),l=c;break;case"checked":c!==p&&(ye=!0),d=c;break;case"defaultChecked":c!==p&&(ye=!0),u=c;break;case"value":c!==p&&(ye=!0),o=c;break;case"defaultValue":c!==p&&(ye=!0),s=c;break;case"children":case"dangerouslySetInnerHTML":if(c!=null)throw Error(x(137,t));break;default:c!==p&&Oe(e,t,f,c,a,p)}}wp(e,o,s,r,d,u,i,l);return;case"select":c=o=s=f=null;for(i in n)if(r=n[i],n.hasOwnProperty(i)&&r!=null)switch(i){case"value":break;case"multiple":c=r;default:a.hasOwnProperty(i)||Oe(e,t,i,null,a,r)}for(l in a)if(i=a[l],r=n[l],a.hasOwnProperty(l)&&(i!=null||r!=null))switch(l){case"value":i!==r&&(ye=!0),f=i;break;case"defaultValue":i!==r&&(ye=!0),s=i;break;case"multiple":i!==r&&(ye=!0),o=i;default:i!==r&&Oe(e,t,l,i,a,r)}t=s,n=o,a=c,f!=null?Uo(e,!!n,f,!1):!!a!=!!n&&(t!=null?Uo(e,!!n,t,!0):Uo(e,!!n,n?[]:"",!1));return;case"textarea":c=f=null;for(s in n)if(l=n[s],n.hasOwnProperty(s)&&l!=null&&!a.hasOwnProperty(s))switch(s){case"value":break;case"children":break;default:Oe(e,t,s,null,a,l)}for(o in a)if(l=a[o],i=n[o],a.hasOwnProperty(o)&&(l!=null||i!=null))switch(o){case"value":l!==i&&(ye=!0),f=l;break;case"defaultValue":l!==i&&(ye=!0),c=l;break;case"children":break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(x(91));break;default:l!==i&&Oe(e,t,o,l,a,i)}d1(e,f,c);return;case"option":for(var v in n)f=n[v],n.hasOwnProperty(v)&&f!=null&&!a.hasOwnProperty(v)&&(v==="selected"?e.selected=!1:Oe(e,t,v,null,a,f));for(r in a)f=a[r],c=n[r],a.hasOwnProperty(r)&&f!==c&&(f!=null||c!=null)&&(r==="selected"?(f!==c&&(ye=!0),e.selected=f&&typeof f!="function"&&typeof f!="symbol"):Oe(e,t,r,f,a,c));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 S in n)f=n[S],n.hasOwnProperty(S)&&f!=null&&!a.hasOwnProperty(S)&&Oe(e,t,S,null,a,f);for(d in a)if(f=a[d],c=n[d],a.hasOwnProperty(d)&&f!==c&&(f!=null||c!=null))switch(d){case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(x(137,t));break;default:Oe(e,t,d,f,a,c)}return;default:if(Rm(t)){for(var y in n)f=n[y],n.hasOwnProperty(y)&&f!==void 0&&!a.hasOwnProperty(y)&&fm(e,t,y,void 0,a,f);for(u in a)f=a[u],c=n[u],!a.hasOwnProperty(u)||f===c||f===void 0&&c===void 0||fm(e,t,u,f,a,c);return}}for(var m in n)f=n[m],n.hasOwnProperty(m)&&f!=null&&!a.hasOwnProperty(m)&&Oe(e,t,m,null,a,f);for(p in a)f=a[p],c=n[p],!a.hasOwnProperty(p)||f===c||f==null&&c==null||Oe(e,t,p,f,a,c)}function by(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function KM(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),a=0;a<n.length;a++){var l=n[a],i=l.transferSize,o=l.initiatorType,s=l.duration;if(i&&s&&by(o)){for(o=0,s=l.responseEnd,a+=1;a<n.length;a++){var r=n[a],d=r.startTime;if(d>s)break;var u=r.transferSize,p=r.initiatorType;u&&by(p)&&(r=r.responseEnd,o+=u*(r<s?1:(s-d)/(r-d)))}if(--a,t+=8*(i+o)/(l.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var pm=null,mm=null;function Sr(e){return e.nodeType===9?e:e.ownerDocument}function Sy(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function vS(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function yS(e,t,n,a){return n=Sr(n).createElement(e),n[qt]=a,n[_n]=t,Yt(n,e,t),Ot(n),n}function hm(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var up=null;function QM(){var e=window.event;return e&&e.type==="popstate"?e===up?!1:(up=e,!0):(up=null,!1)}var mh=typeof setTimeout=="function"?setTimeout:void 0,ZM=typeof clearTimeout=="function"?clearTimeout:void 0,Ay=typeof Promise=="function"?Promise:void 0,Ey=typeof requestAnimationFrame=="function"?requestAnimationFrame:mh,FM=typeof queueMicrotask=="function"?queueMicrotask:typeof Ay<"u"?function(e){return Ay.resolve(null).then(e).catch(JM)}:mh;function JM(e){setTimeout(function(){throw e})}function fi(e){return e==="head"}function Ty(e,t){var n=t,a=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"||n==="/&"){if(a===0){e.removeChild(l),ls(t);return}a--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")a++;else if(n==="html")dp(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,dp(n);for(var i=n.firstChild;i;){var o=i.nextSibling,s=i.nodeName;i[Cr]||s==="SCRIPT"||s==="STYLE"||s==="LINK"&&i.rel.toLowerCase()==="stylesheet"||n.removeChild(i),i=o}}else n==="body"&&dp(e.ownerDocument.body);n=l}while(n);ls(t)}function wy(e,t){var n=e;e=0;do{var a=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),a&&a.nodeType===8)if(n=a.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=a}while(n)}function bS(e,t,n){if(t=CSS.escape(t)!==t?"r-"+btoa(t).replace(/=/g,""):t,e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display==="inline"){if(t=e.getClientRects(),t.length===1)var a=1;else for(var l=a=0;l<t.length;l++){var i=t[l];0<i.width&&0<i.height&&a++}a===1&&(e=e.style,e.display=t.length===1?"inline-block":"block",e.marginTop="-"+n.paddingTop,e.marginBottom="-"+n.paddingBottom)}}function SS(e,t){e=e.style,t=t.style;var n=t!=null?t.hasOwnProperty("viewTransitionName")?t.viewTransitionName:t.hasOwnProperty("view-transition-name")?t["view-transition-name"]:null:null;e.viewTransitionName=n==null||typeof n=="boolean"?"":(""+n).trim(),n=t!=null?t.hasOwnProperty("viewTransitionClass")?t.viewTransitionClass:t.hasOwnProperty("view-transition-class")?t["view-transition-class"]:null:null,e.viewTransitionClass=n==null||typeof n=="boolean"?"":(""+n).trim(),e.display==="inline-block"&&(t==null?e.display=e.margin="":(n=t.display,e.display=n==null||typeof n=="boolean"?"":n,n=t.margin,n!=null?e.margin=n:(n=t.hasOwnProperty("marginTop")?t.marginTop:t["margin-top"],e.marginTop=n==null||typeof n=="boolean"?"":n,t=t.hasOwnProperty("marginBottom")?t.marginBottom:t["margin-bottom"],e.marginBottom=t==null||typeof t=="boolean"?"":t)))}function AS(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position==="absolute"||t.position==="fixed",clip:t.clipPath!=="none"||t.overflow!=="visible"||t.filter!=="none"||t.mask!=="none"||t.mask!=="none"||t.borderRadius!=="0px",view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function gm(e){var t=e.getBoundingClientRect(),n=getComputedStyle(e);return AS(t,n,e)}function PM(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return AS(t,n,e)}function WM(e){return e.documentElement.clientHeight}function e3(e){this.addEventListener("load",e),this.addEventListener("error",e)}function t3(e,t,n,a,l,i,o,s,r){var d=t.nodeType===9?t:t.ownerDocument;try{var u=d.startViewTransition({update:function(){var f=d.defaultView,c=f.navigation&&f.navigation.transition,v=d.fonts.status;a();var S=[];if(v==="loaded"&&(WM(d),d.fonts.status==="loading"&&S.push(d.fonts.ready)),v=S.length,e!==null)for(var y=e.suspenseyImages,m=0,h=0;h<y.length;h++){var g=y[h];if(!g.complete){var b=g.getBoundingClientRect();if(0<b.bottom&&0<b.right&&b.top<f.innerHeight&&b.left<f.innerWidth){if(m+=xS(g),m>hc){S.length=v;break}g=new Promise(e3.bind(g)),S.push(g)}}}if(0<S.length)return f=Promise.race([Promise.all(S),new Promise(function(M){return setTimeout(M,500)})]).then(l,l),(c?Promise.allSettled([c.finished,f]):f).then(i,i);if(l(),c)return c.finished.then(i,i);i()},types:n});d.__reactViewTransition=u;var p=[];return u.ready.then(function(){for(var f=d.documentElement.getAnimations({subtree:!0}),c=0;c<f.length;c++){var v=f[c],S=v.effect,y=S.pseudoElement;if(y!=null&&y.startsWith("::view-transition")){p.push(v),v=S.getKeyframes();for(var m=y=void 0,h=!0,g=0;g<v.length;g++){var b=v[g],M=b.width;if(y===void 0)y=M;else if(y!==M){h=!1;break}if(M=b.height,m===void 0)m=M;else if(m!==M){h=!1;break}delete b.width,delete b.height,b.transform==="none"&&delete b.transform}h&&y!==void 0&&m!==void 0&&(S.setKeyframes(v),h=getComputedStyle(S.target,S.pseudoElement),h.width!==y||h.height!==m)&&(h=v[0],h.width=y,h.height=m,h=v[v.length-1],h.width=y,h.height=m,S.setKeyframes(v))}}o()},function(f){d.__reactViewTransition===u&&(d.__reactViewTransition=null);try{typeof f=="object"&&f!==null&&f.name==="InvalidStateError"&&(f.message==="View transition was skipped because document visibility state is hidden."||f.message==="Skipping view transition because document visibility state has become hidden."||f.message==="Skipping view transition because viewport size changed."||f.message==="Transition was aborted because of invalid state")&&(f=null),f!==null&&r(f)}finally{a(),l(),o()}}),u.finished.finally(function(){for(var f=0;f<p.length;f++)p[f].cancel();d.__reactViewTransition===u&&(d.__reactViewTransition=null),s()}),u}catch{return a(),l(),o(),null}}function xi(e,t){this._scope=document.documentElement,this._selector="::view-transition-"+e+"("+t+")"}xi.prototype.animate=function(e,t){return t=typeof t=="number"?{duration:t}:qe({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)};xi.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),a=[],l=0;l<n.length;l++){var i=n[l].effect;i!==null&&i.target===e&&i.pseudoElement===t&&a.push(n[l])}return a};xi.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function ES(e){return{name:e,group:new xi("group",e),imagePair:new xi("image-pair",e),old:new xi("old",e),new:new xi("new",e)}}function Yn(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Yn.prototype.addEventListener=function(e,t,n){var a=null,l=null;if(!(n!=null&&typeof n!="boolean"&&(a=n.signal||null,a!==null&&a.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var i=this._eventListeners;if(TS(i,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!="boolean"&&n.once===!0&&(s=function(r){o.removeEventListener(e,t,n),typeof t=="function"?t.call(this,r):t.handleEvent(r)}),a!==null&&(l=o.removeEventListener.bind(o,e,t,n),a.addEventListener("abort",l,{once:!0}),l=a.removeEventListener.bind(a,"abort",l)),a=es(n),i.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:l}),$n(this._fragmentFiber.child,!1,n3,e,s,a)}this._eventListeners=i}};function n3(e,t,n,a){return At(e).addEventListener(t,n,a),!1}Yn.prototype.removeEventListener=function(e,t,n){var a=this._eventListeners;if(a!==null&&(t=TS(a,e,t,n),t!==-1)){var l=a[t];n=l.attachedListener;var i=l.cleanup;l=es(l.optionsOrUseCapture),$n(this._fragmentFiber.child,!1,a3,e,n,l),a.splice(t,1),i!==null&&i()}};function a3(e,t,n,a){return At(e).removeEventListener(t,n,a),!1}function es(e){return e!=null&&typeof e!="boolean"&&(e.once===!0||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function My(e){return e==null?"c=0":typeof e=="boolean"?"c="+(e?"1":"0"):"c="+(e.capture?"1":"0")}function TS(e,t,n,a){if(e.length===0)return-1;a=My(a);for(var l=0;l<e.length;l++){var i=e[l];if(i.type===t&&i.listener===n&&My(i.optionsOrUseCapture)===a)return l}return-1}Yn.prototype.dispatchEvent=function(e){var t=Ki(this._fragmentFiber);if(t===null)return!0;t=At(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var a=t.nodeType===9?t.createComment(""):document.createTextNode("");if(n)for(var l=0;l<n.length;l++){var i=n[l];a.addEventListener(i.type,i.attachedListener,es(i.optionsOrUseCapture))}if(t.appendChild(a),e=a.dispatchEvent(e),n)for(l=0;l<n.length;l++)i=n[l],a.removeEventListener(i.type,i.attachedListener,es(i.optionsOrUseCapture));return t.removeChild(a),e}return t.dispatchEvent(e)};Yn.prototype.focus=function(e){$n(this._fragmentFiber.child,!0,wS,e,void 0,void 0)};function wS(e,t){return e.tag===6?!1:(e=At(e),h3(e,t))}Yn.prototype.focusLast=function(e){var t=[];$n(this._fragmentFiber.child,!0,hh,t,void 0,void 0);for(var n=t.length-1;0<=n&&!wS(t[n],e);n--);};function hh(e,t){return t.push(e),!1}Yn.prototype.blur=function(){var e=Ki(this._fragmentFiber);e!==null&&(e=At(e),e=Sr(e).activeElement,e!==null&&$n(this._fragmentFiber.child,!1,l3,e,void 0,void 0))};function l3(e,t){return e.tag===6?!1:(e=At(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Yn.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),$n(this._fragmentFiber.child,!1,i3,e,void 0,void 0)};function i3(e,t){return e.tag===6||(e=At(e),t.observe(e)),!1}Yn.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),$n(this._fragmentFiber.child,!1,o3,e,void 0,void 0);for(var n=t=0;n<ya.length;n++){var a=ya[n];a.fragmentInstance===this&&a.observer===e?e.unobserve(a.instance):ya[t++]=a}ya.length=t}};function o3(e,t){return e.tag===6||(e=At(e),t.unobserve(e)),!1}var ya=[],cp=!1;function s3(e,t,n){ya.push({fragmentInstance:e,observer:t,instance:n}),cp||(cp=!0,g3(function(){cp=!1;var a=ya;ya=[];for(var l=0;l<a.length;l++){var i=a[l];i.observer.unobserve(i.instance)}}))}Yn.prototype.getClientRects=function(){var e=[];return $n(this._fragmentFiber.child,!1,r3,e,void 0,void 0),e};function r3(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=At(e),t.push.apply(t,e.getClientRects());return!1}Yn.prototype.getRootNode=function(e){var t=Ki(this._fragmentFiber);return t===null?this:At(t).getRootNode(e)};Yn.prototype.compareDocumentPosition=function(e){var t=Ki(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];$n(this._fragmentFiber.child,!1,hh,n,void 0,void 0);var a=At(t);if(n.length===0){if(n=a,lv(this._fragmentFiber)){e:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break e}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var l=a=n.compareDocumentPosition(e);return n===e?l=Node.DOCUMENT_POSITION_CONTAINS:a&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=Xy(t)[1],n===null?l=Node.DOCUMENT_POSITION_PRECEDING:(e=At(n).compareDocumentPosition(e),l=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),l|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=At(n[0]),l=At(n[n.length-1]);var i=lv(this._fragmentFiber)?t.parentElement:a;if(i==null)return Node.DOCUMENT_POSITION_DISCONNECTED;a=i.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,i=i.compareDocumentPosition(l)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=l.compareDocumentPosition(e),r=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=a&&i&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=a&&t===e||i&&l===e||r||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!a&&t===e||!i&&l===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||u3(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function u3(e,t,n,a,l){var i=Di(l);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!i)e:{for(;i!==null;){if(i.tag===7&&(i===t||i.alternate===t)){n=!0;break e}i=i.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(i===null)return i=l.ownerDocument,l===i||l===i.documentElement||l===i.body;e:{for(i=t,t=Ki(t);i!==null;){if(!(i.tag!==5&&i.tag!==3&&i.tag!==27||i!==t&&i.alternate!==t)){i=!0;break e}i=i.return}i=!1}return i}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!i)&&!(t=i===n)&&(t=pp(n,i,iv),t===null?t=!1:($n(t,!0,qT,i,n),i=wo,wo=null,t=i!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!i)&&!(t=i===a)&&(t=pp(a,i,iv),t===null?t=!1:($n(t,!0,HT,i,a),i=wo,fp=wo=null,t=i!==null)),t):!1}function $y(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Yn.prototype.scrollIntoView=function(e){if(typeof e=="object")throw Error(x(566));var t=[];$n(this._fragmentFiber.child,!1,hh,t,void 0,void 0);var n=e!==!1;if(t.length===0){var a=Xy(this._fragmentFiber);if(a=n?a[1]||a[0]||Ki(this._fragmentFiber):a[0]||a[1],a===null)return;if(a.tag===6){e=At(a),$y(e,n);return}if(a=At(a),a.nodeType!==9){if(a.nodeType===11){n="host"in a?a.host:null,n!==null&&n.scrollIntoView(e);return}a.scrollIntoView(e)}}for(a=n?t.length-1:0;a!==(n?-1:t.length);){var l=t[a];l.tag===6?(l=At(l),$y(l,n)):At(l).scrollIntoView(e),a+=n?-1:1}};function c3(e,t){return e=At(e),MS(e,t),!1}function MS(e,t){e.reactFragments==null&&(e.reactFragments=new Set),e.reactFragments.add(t)}function $S(e,t){var n=t._eventListeners;if(n!==null)for(var a=0;a<n.length;a++){var l=n[a];e.addEventListener(l.type,l.attachedListener,es(l.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(i){for(var o=0,s=0;s<ya.length;s++){var r=ya[s];(r.fragmentInstance!==t||r.observer!==i||r.instance!==e)&&(ya[o++]=r)}ya.length=o,i.observe(e)}),MS(e,t))}function d3(e,t){var n=t._eventListeners;if(n!==null)for(var a=0;a<n.length;a++){var l=n[a];e.removeEventListener(l.type,l.attachedListener,es(l.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(i){typeof i.rootMargin=="string"?s3(t,i,e):i.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function vm(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":vm(n),Qc(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function f3(e,t,n,a){for(;e.nodeType===1;){var l=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Cr])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==l.rel||e.getAttribute("href")!==(l.href==null||l.href===""?null:l.href)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin)||e.getAttribute("title")!==(l.title==null?null:l.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(l.src==null?null:l.src)||e.getAttribute("type")!==(l.type==null?null:l.type)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=l.name==null?null:""+l.name;if(l.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=ia(e.nextSibling),e===null)break}return null}function p3(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=ia(e.nextSibling),e===null))return null;return e}function _S(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=ia(e.nextSibling),e===null))return null;return e}function ym(e){return e.data==="$?"||e.data==="$~"}function gh(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function m3(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var a=function(){t(),n.removeEventListener("DOMContentLoaded",a)};n.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function ia(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var bm=null;function _y(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return ia(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function Ry(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function h3(e,t){function n(){a=!0}if(e.ownerDocument.activeElement===e)return!0;var a=!1;try{e.ownerDocument.addEventListener("focus",n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener("focus",n,!0)}return a}function g3(e){Ey(function(){Ey(function(t){return e(t)})})}function RS(e,t,n){switch(t=Sr(n),e){case"html":if(e=t.documentElement,!e)throw Error(x(452));return e;case"head":if(e=t.head,!e)throw Error(x(453));return e;case"body":if(e=t.body,!e)throw Error(x(454));return e;default:throw Error(x(451))}}function CS(e,t,n){for(var a in n){var l=n[a];n.hasOwnProperty(a)&&l!=null&&Oe(e,t,a,null,VM,l)}n.dangerouslySetInnerHTML!=null&&(e.textContent=""),e.onclick===qa&&(e.onclick=null),Qc(e)}function dp(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Qc(e)}var oa=new Map,Cy=new Set;function Ar(e){if(typeof e.getRootNode=="function"){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var vl=Ee.d;Ee.d={f:v3,r:y3,D:b3,C:S3,L:A3,m:E3,X:w3,S:T3,M:M3};function v3(){var e=vl.f(),t=rd();return e||t}function y3(e){var t=os(e);t!==null&&t.tag===5&&t.type==="form"?pb(t):vl.r(e)}var cs=typeof document>"u"?null:document;function OS(e,t,n){var a=cs;if(a&&typeof t=="string"&&t){var l=na(t);l='link[rel="'+e+'"][href="'+l+'"]',typeof n=="string"&&(l+='[crossorigin="'+n+'"]'),Cy.has(l)||(Cy.add(l),e={rel:e,crossOrigin:n,href:t},a.querySelector(l)===null&&(t=a.createElement("link"),Yt(t,"link",e),Ot(t),a.head.appendChild(t)))}}function b3(e){vl.D(e),OS("dns-prefetch",e,null)}function S3(e,t){vl.C(e,t),OS("preconnect",e,t)}function A3(e,t,n){vl.L(e,t,n);var a=cs;if(a&&e&&t){var l='link[rel="preload"][as="'+na(t)+'"]';t==="image"&&n&&n.imageSrcSet?(l+='[imagesrcset="'+na(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(l+='[imagesizes="'+na(n.imageSizes)+'"]')):l+='[href="'+na(e)+'"]';var i=l;switch(t){case"style":i=ts(e);break;case"script":i=ds(e)}if(!(oa.has(i)||(e=qe({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),oa.set(i,e),a.querySelector(l)!==null||t==="style"&&a.querySelector(Lr(i))||t==="script"&&a.querySelector(kr(i))))){var o=a.createElement("link");Yt(o,"link",e),t==="style"&&(o[Ec]=!0,o.onload=o.onerror=function(){i1(o)}),Ot(o),a.head.appendChild(o)}}}function E3(e,t){vl.m(e,t);var n=cs;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",l='link[rel="modulepreload"][as="'+na(a)+'"][href="'+na(e)+'"]',i=l;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=ds(e)}if(!oa.has(i)&&(e=qe({rel:"modulepreload",href:e},t),oa.set(i,e),n.querySelector(l)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(kr(i)))return}a=n.createElement("link"),Yt(a,"link",e),Ot(a),n.head.appendChild(a)}}}function T3(e,t,n){vl.S(e,t,n);var a=cs;if(a&&e){var l=ko(a).hoistableStyles,i=ts(e);t=t||"default";var o=l.get(i);if(!o){var s={loading:0,preload:null};if(o=a.querySelector(Lr(i)))s.loading=5;else{e=qe({rel:"stylesheet",href:e,"data-precedence":t},n),(n=oa.get(i))&&vh(e,n);var r=o=a.createElement("link");Ot(r),Yt(r,"link",e),r._p=new Promise(function(d,u){r.onload=d,r.onerror=u}),r.addEventListener("load",function(){s.loading|=1}),r.addEventListener("error",function(){s.loading|=2}),s.loading|=4,pc(o,t,a)}o={type:"stylesheet",instance:o,count:1,state:s},l.set(i,o)}}}function w3(e,t){vl.X(e,t);var n=cs;if(n&&e){var a=ko(n).hoistableScripts,l=ds(e),i=a.get(l);i||(i=n.querySelector(kr(l)),i||(e=qe({src:e,async:!0},t),(t=oa.get(l))&&yh(e,t),i=n.createElement("script"),Ot(i),Yt(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(l,i))}}function M3(e,t){vl.M(e,t);var n=cs;if(n&&e){var a=ko(n).hoistableScripts,l=ds(e),i=a.get(l);i||(i=n.querySelector(kr(l)),i||(e=qe({src:e,async:!0,type:"module"},t),(t=oa.get(l))&&yh(e,t),i=n.createElement("script"),Ot(i),Yt(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(l,i))}}function Oy(e,t,n,a){var l=(l=Fl.current)?Ar(l):null;if(!l)throw Error(x(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(n=ts(n.href),t=ko(l).hoistableStyles,a=t.get(n),a||(a={type:"style",instance:null,count:0,state:null},t.set(n,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=ts(n.href);var i=ko(l).hoistableStyles,o=i.get(e);if(o||(l=l.ownerDocument||l,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,o),(i=l.querySelector(Lr(e)))?i._p||(o.instance=i,o.state.loading=5):(i=oa.get(e),i||(i={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},oa.set(e,i)),$3(l,e,i,o.state))),t&&a===null)throw Error(x(528,""));return o}if(t&&a!==null)throw Error(x(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(n=ds(n),t=ko(l).hoistableScripts,a=t.get(n),a||(a={type:"script",instance:null,count:0,state:null},t.set(n,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(x(444,e))}}function ts(e){return'href="'+na(e)+'"'}function Lr(e){return'link[rel="stylesheet"]['+e+"]"}function NS(e){return qe({},e,{"data-precedence":e.precedence,precedence:null})}function $3(e,t,n,a){if(t=e.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[Ec]!==!0){a.loading=1;return}}else t=e.createElement("link"),t[Ec]=!0,t.onload=t.onerror=i1.bind(null,t),Yt(t,"link",n),Ot(t),e.head.appendChild(t);a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2})}function ds(e){return'[src="'+na(e)+'"]'}function kr(e){return"script[async]"+e}function Ny(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+na(n.href)+'"]');if(a)return t.instance=a,Ot(a),a;var l=qe({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Ot(a),Yt(a,"style",l),pc(a,n.precedence,e),t.instance=a;case"stylesheet":l=ts(n.href);var i=e.querySelector(Lr(l));if(i)return t.state.loading|=4,t.instance=i,Ot(i),i;a=NS(n),(l=oa.get(l))&&vh(a,l),i=(e.ownerDocument||e).createElement("link"),Ot(i);var o=i;return o._p=new Promise(function(s,r){o.onload=s,o.onerror=r}),Yt(i,"link",a),t.state.loading|=4,pc(i,n.precedence,e),t.instance=i;case"script":return i=ds(n.src),(l=e.querySelector(kr(i)))?(t.instance=l,Ot(l),l):(a=n,(l=oa.get(i))&&(a=qe({},n),yh(a,l)),e=e.ownerDocument||e,l=e.createElement("script"),Ot(l),Yt(l,"link",a),e.head.appendChild(l),t.instance=l);case"void":return null;default:throw Error(x(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,pc(a,n.precedence,e));return t.instance}function pc(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),l=a.length?a[a.length-1]:null,i=l,o=0;o<a.length;o++){var s=a[o];if(s.dataset.precedence===t)i=s;else if(i!==l)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function vh(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function yh(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var mc=null;function Dy(e,t,n){if(mc===null){var a=new Map,l=mc=new Map;l.set(n,a)}else l=mc,a=l.get(n),a||(a=new Map,l.set(n,a));if(a.has(e))return a;for(a.set(e,null),n=n.getElementsByTagName(e),l=0;l<n.length;l++){var i=n[l];if(!(i[Cr]||i[qt]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var o=i.getAttribute(t)||"";o=e+o;var s=a.get(o);s?s.push(i):a.set(o,[i])}}return a}function Sm(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function _3(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function xy(e,t){return e==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function DS(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function xS(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function zy(e,t){typeof t.decode=="function"&&(e.imgCount++,t.complete||(e.imgBytes+=xS(t),e.suspenseyImages.push(t)),e=O3.bind(e),t.decode().then(e,e))}function R3(e,t,n,a){if(n.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var l=ts(a.href),i=t.querySelector(Lr(l));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Er.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=i,Ot(i);return}i=t.ownerDocument||t,a=NS(a),(l=oa.get(l))&&vh(a,l),i=i.createElement("link"),Ot(i);var o=i;o._p=new Promise(function(s,r){o.onload=s,o.onerror=r}),Yt(i,"link",a),n.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=Er.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var hc=0;function C3(e,t){return e.stylesheets&&e.count===0&&gc(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var a=setTimeout(function(){if(e.stylesheets&&gc(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&hc===0&&(hc=62500*KM());var l=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&gc(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>hc?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(l)}}:null}function zS(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)gc(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function Er(){this.count--,zS(this)}function O3(){this.imgCount--,zS(this)}var Vc=null;function gc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Vc=new Map,t.forEach(N3,e),Vc=null,Er.call(e))}function N3(e,t){if(!(t.state.loading&4)){var n=Vc.get(e);if(n)var a=n.get(null);else{n=new Map,Vc.set(e,n);for(var l=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<l.length;i++){var o=l[i];(o.nodeName==="LINK"||o.getAttribute("media")!=="not all")&&(n.set(o.dataset.precedence,o),a=o)}a&&n.set(null,a)}l=t.instance,o=l.getAttribute("data-precedence"),i=n.get(o)||a,i===a&&n.set(null,l),n.set(o,l),this.count++,a=Er.bind(this),l.addEventListener("load",a),l.addEventListener("error",a),i?i.parentNode.insertBefore(l,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(l,e.firstChild)),t.state.loading|=4}}var ns={$$typeof:Ba,Provider:null,Consumer:null,_currentValue:zi,_currentValue2:zi,_threadCount:0};function D3(e,t,n,a,l,i,o,s,r){this.tag=1,this.containerInfo=e,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=qf(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qf(0),this.hiddenUpdates=qf(null),this.identifierPrefix=a,this.onUncaughtError=l,this.onCaughtError=i,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=r,this.transitionTypes=null,this.incompleteTransitions=new Map}function LS(e,t,n,a,l,i,o,s,r,d,u,p){return e=new D3(e,t,n,o,r,d,u,p,s),t=1,i===!0&&(t|=24),i=wn(3,null,null,t),e.current=i,i.stateNode=e,t=Bm(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:a,isDehydrated:n,cache:t},Gm(i),e}function kS(e){return e?(e=Do,e):Do}function US(e,t,n,a,l,i){l=kS(l),a.context===null?a.context=l:a.pendingContext=l,a=Pl(t),a.payload={element:n},i=i===void 0?null:i,i!==null&&(a.callback=i),n=Wl(e,a,t),n!==null&&(Mn(n,e,t),er(n,e,t))}function Ly(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function bh(e,t){Ly(e,t),(e=e.alternate)&&Ly(e,t)}function BS(e){if(e.tag===13||e.tag===31){var t=Fi(e,67108864);t!==null&&Mn(t,e,67108864),bh(e,67108864)}}function ky(e){if(e.tag===13||e.tag===31){var t=Gn();t=$m(t);var n=Fi(e,t);n!==null&&Mn(n,e,t),bh(e,t)}}var as=!0;function x3(e,t,n,a){var l=F.T;F.T=null;var i=Ee.p;try{Ee.p=2,Sh(e,t,n,a)}finally{Ee.p=i,F.T=l}}function z3(e,t,n,a){var l=F.T;F.T=null;var i=Ee.p;try{Ee.p=8,Sh(e,t,n,a)}finally{Ee.p=i,F.T=l}}function Sh(e,t,n,a){if(as){var l=Am(a);if(l===null)rp(e,t,a,Xc,n),Uy(e,a);else if(k3(l,e,t,n,a))a.stopPropagation();else if(Uy(e,a),t&4&&-1<L3.indexOf(e)){for(;l!==null;){var i=os(l);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var o=Ci(i.pendingLanes);if(o!==0){var s=i;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var r=1<<31-Hn(o);s.entanglements[1]|=r,o&=~r}Xa(i),(Ae&6)===0&&(Hc=Bn()+500,zr(0,!1))}}break;case 31:case 13:s=Fi(i,2),s!==null&&Mn(s,i,2),rd(),bh(i,2)}if(i=Am(a),i===null&&rp(e,t,a,Xc,n),i===l)break;l=i}l!==null&&a.stopPropagation()}else rp(e,t,a,null,n)}}function Am(e){return e=Cm(e),Ah(e)}var Xc=null;function Ah(e){if(Xc=null,e=Di(e),e!==null){var t=Mr(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=Yy(t),e!==null)return e;e=null}else if(n===31){if(e=Iy(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Xc=e,null}function qS(e){switch(e){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"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"fullscreenerror":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"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ZT()){case Fy:return 2;case Jy:return 8;case Ac:case FT:return 32;case Py:return 268435456;default:return 32}default:return 32}}var Em=!1,ai=null,li=null,ii=null,Tr=new Map,wr=new Map,Yl=[],L3="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 Uy(e,t){switch(e){case"focusin":case"focusout":ai=null;break;case"dragenter":case"dragleave":li=null;break;case"mouseover":case"mouseout":ii=null;break;case"pointerover":case"pointerout":Tr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":wr.delete(t.pointerId)}}function Ys(e,t,n,a,l,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:a,nativeEvent:i,targetContainers:[l]},t!==null&&(t=os(t),t!==null&&BS(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function k3(e,t,n,a,l){switch(t){case"focusin":return ai=Ys(ai,e,t,n,a,l),!0;case"dragenter":return li=Ys(li,e,t,n,a,l),!0;case"mouseover":return ii=Ys(ii,e,t,n,a,l),!0;case"pointerover":var i=l.pointerId;return Tr.set(i,Ys(Tr.get(i)||null,e,t,n,a,l)),!0;case"gotpointercapture":return i=l.pointerId,wr.set(i,Ys(wr.get(i)||null,e,t,n,a,l)),!0}return!1}function HS(e){var t=Di(e.target);if(t!==null){var n=Mr(t);if(n!==null){if(t=n.tag,t===13){if(t=Yy(n),t!==null){e.blockedOn=t,uv(e.priority,function(){ky(n)});return}}else if(t===31){if(t=Iy(n),t!==null){e.blockedOn=t,uv(e.priority,function(){ky(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function vc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Am(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);Mp=a,n.target.dispatchEvent(a),Mp=null}else return t=os(n),t!==null&&BS(t),e.blockedOn=n,!1;t.shift()}return!0}function By(e,t,n){vc(e)&&n.delete(t)}function U3(){Em=!1,ai!==null&&vc(ai)&&(ai=null),li!==null&&vc(li)&&(li=null),ii!==null&&vc(ii)&&(ii=null),Tr.forEach(By),wr.forEach(By)}function Ju(e,t){e.blockedOn===t&&(e.blockedOn=null,Em||(Em=!0,Et.unstable_scheduleCallback(Et.unstable_NormalPriority,U3)))}var Pu=null;function qy(e){Pu!==e&&(Pu=e,Et.unstable_scheduleCallback(Et.unstable_NormalPriority,function(){Pu===e&&(Pu=null);for(var t=0;t<e.length;t+=3){var n=e[t],a=e[t+1],l=e[t+2];if(typeof a!="function"){if(Ah(a||n)===null)continue;break}var i=os(n);i!==null&&(e.splice(t,3),t-=3,Gp(i,{pending:!0,data:l,method:n.method,action:a},a,l))}}))}function ls(e){function t(r){return Ju(r,e)}ai!==null&&Ju(ai,e),li!==null&&Ju(li,e),ii!==null&&Ju(ii,e),Tr.forEach(t),wr.forEach(t);for(var n=0;n<Yl.length;n++){var a=Yl[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Yl.length&&(n=Yl[0],n.blockedOn===null);)HS(n),n.blockedOn===null&&Yl.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(a=0;a<n.length;a+=3){var l=n[a],i=n[a+1],o=l[_n]||null;if(typeof i=="function")o||qy(n);else if(o){var s=null;if(i&&i.hasAttribute("formAction")){if(l=i,o=i[_n]||null)s=o.formAction;else if(Ah(l)!==null)continue}else s=o.action;typeof s=="function"?n[a+1]=s:(n.splice(a,3),a-=3),qy(n)}}}function GS(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(o){return l=o})},focusReset:"manual",scroll:"manual"})}function t(){l!==null&&(l(),l=null),a||setTimeout(n,20)}function n(){if(!a&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,l=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),l!==null&&(l(),l=null)}}}function Eh(e){this._internalRoot=e}dd.prototype.render=Eh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(x(409));var n=t.current,a=Gn();US(n,a,e,t,null,null)};dd.prototype.unmount=Eh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;US(e.current,2,null,e,null,null),rd(),t[is]=null}};function dd(e){this._internalRoot=e}dd.prototype.unstable_scheduleHydration=function(e){if(e){var t=l1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Yl.length&&t!==0&&t<Yl[n].priority;n++);Yl.splice(n,0,e),n===0&&HS(e)}};var Hy=Gy.version;if(Hy!=="19.3.0")throw Error(x(527,Hy,"19.3.0"));Ee.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(x(188)):(e=Object.keys(e).join(","),Error(x(268,e)));return e=BT(t),e=e!==null?Vy(e):null,e=e===null?null:e.stateNode,e};var B3={bundleType:0,version:"19.3.0",rendererPackageName:"react-dom",currentDispatcherRef:F,reconcilerVersion:"19.3.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(Is=__REACT_DEVTOOLS_GLOBAL_HOOK__,!Is.isDisabled&&Is.supportsFiber))try{$r=Is.inject(B3),qn=Is}catch{}var Is;fd.createRoot=function(e,t){if(!jy(e))throw Error(x(299));var n=!1,a="",l=Ab,i=Eb,o=Tb;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(l=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=LS(e,1,!1,null,null,n,a,null,l,i,o,GS),e[is]=t.current,ph(e),new Eh(t)};fd.hydrateRoot=function(e,t,n){if(!jy(e))throw Error(x(299));var a=!1,l="",i=Ab,o=Eb,s=Tb,r=null;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onUncaughtError!==void 0&&(i=n.onUncaughtError),n.onCaughtError!==void 0&&(o=n.onCaughtError),n.onRecoverableError!==void 0&&(s=n.onRecoverableError),n.formState!==void 0&&(r=n.formState)),t=LS(e,1,!0,t,n??null,a,l,r,i,o,s,GS),t.context=kS(null),n=t.current,a=Gn(),a=$m(a),l=Pl(a),l.callback=null,Wl(n,l,a),n=a,t.current.lanes=n,Rr(t,n),Xa(t),e[is]=t.current,ph(e),new dd(t)};fd.version="19.3.0"});var VS=Oa((L4,IS)=>{"use strict";function YS(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(YS)}catch(e){console.error(e)}}YS(),IS.exports=jS()});var KS=Oa(pd=>{"use strict";/**
|
|
42
|
-
* @license React
|
|
43
|
-
* react-jsx-runtime.production.js
|
|
44
|
-
*
|
|
45
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
46
|
-
*
|
|
47
|
-
* This source code is licensed under the MIT license found in the
|
|
48
|
-
* LICENSE file in the root directory of this source tree.
|
|
49
|
-
*/var q3=Symbol.for("react.transitional.element"),H3=Symbol.for("react.fragment");function XS(e,t,n){var a=null;if(n!==void 0&&(a=""+n),t.key!==void 0&&(a=""+t.key),"key"in t){n={};for(var l in t)l!=="key"&&(n[l]=t[l])}else n=t;return t=n.ref,{$$typeof:q3,type:e,key:a,ref:t!==void 0?t:null,props:n}}pd.Fragment=H3;pd.jsx=XS;pd.jsxs=XS});var Th=Oa((U4,QS)=>{"use strict";QS.exports=KS()});var Ld=[["Support",["billing escalation","refund queue","onboarding tickets","SLA exceptions","customer handoff","incident follow-up","CSAT themes"]],["Engineering",["checkout regression","API migration","dependency upgrade","flaky test suite","release notes","auth refactor","performance budget"]],["Research",["competitor landscape","market signals","customer interviews","pricing study","industry brief","source verification","product opportunities"]],["Finance",["invoice exceptions","expense reconciliation","renewal forecast","vendor spending","revenue variance","purchase approvals","quarterly narrative"]],["Security",["access review","dependency advisory","policy exceptions","incident timeline","threat brief","audit evidence","service permissions"]],["Operations",["capacity forecast","deployment checklist","on-call handoff","runbook updates","queue anomalies","availability report","change requests"]],["Sales",["account research","proposal draft","pipeline review","meeting preparation","lead enrichment","deal risks","renewal outreach"]],["Legal",["supplier terms","contract changes","policy updates","obligation register","clause comparison","document redaction","agreement summary"]],["Data",["schema changes","quality checks","warehouse queries","catalog enrichment","metric definitions","report narrative","lineage review"]],["Knowledge",["document ingestion","retrieval quality","index refresh","duplicate articles","citation coverage","search relevance","content freshness"]]],pu=[["GPT-5","OpenAI","cloud",3600,2.2,"generation"],["Claude Sonnet 4.5","Anthropic","cloud",4200,2.6,"generation"],["Gemini 2.5 Flash","Google","cloud",900,.3,"generation"],["DeepSeek R1","Baseten","cloud",14e3,.8,"reasoning"],["Mistral Medium 3","Mistral","cloud",1800,.7,"generation"],["GPT-5 mini","OpenAI","cloud",1400,.4,"generation"],["Claude Opus 4.1","Anthropic","cloud",11e3,6,"reasoning"],["Gemini 2.5 Pro","Google","cloud",7e3,1.8,"reasoning"],["GPT-5 nano","OpenAI","cloud",480,.08,"generation"],["Claude Haiku 3.5","Anthropic","cloud",700,.2,"generation"],["gpt-oss-120b","Groq","cloud",2e3,.25,"generation"],["qwen-3.8-27b","Cerebras","cloud",2400,.65,"generation"],["text-embedding-3-large","OpenAI","cloud",160,.02,"embedding"],["embed-v4","Cohere","cloud",190,.025,"embedding"],["Qwen3 \xB7 8B","Ollama","local",1400,0,"generation"],["Qwen3 \xB7 30B","Ollama","local",4200,0,"reasoning"],["Llama 3.3 \xB7 70B","vLLM","local",3100,0,"generation"],["Gemma 3 \xB7 27B","LM Studio","local",2600,0,"generation"],["DeepSeek R1 \xB7 14B","Ollama","local",6200,0,"reasoning"],["nomic-embed-text","Ollama","local",90,0,"embedding"],["bge-reranker-v2-m3","vLLM","local",75,0,"reranking"]],kd=["OpenAI","Anthropic","Google","DeepSeek","Mistral","OpenAI","Anthropic","Google","OpenAI","Anthropic","OpenAI","Qwen","OpenAI","Cohere","Qwen","Qwen","Meta","Google","DeepSeek","Nomic","BAAI"],bg=["router.quality","router.latency","router.cost","router.private"],Ud=["llm-gateway","llm-gateway-eu","batch-proxy"],BA=["Intake","Research","Delivery","Review"],qA=[["direct","router"],["gateway","router"],["direct","gateway"],["router","gateway"],["direct"],["direct","router","gateway"],["gateway"],["router"],["direct"],["gateway","router"],["gateway","direct"],["gateway"],["direct"],["gateway"],["local","router"],["local","router"],["local","gateway"],["local"],["router","local"],["local"],["local","gateway"]],HA=[[2,5,8,9,14],[0,1,3,5,15,16],[3,6,7,10,11],[0,4,7,14,17],[1,3,6,15,18],[2,4,5,14,16,18],[1,2,5,9,11],[0,1,6,7,17],[0,5,10,14,15,16],[2,8,11,14,17]];function Sg(e=Date.now()){let t=41,n=()=>(t=t*16807%2147483647,(t-1)/2147483646),a=E=>E[Math.floor(n()*E.length)],l=Ld.flatMap(([E],_)=>BA.map((C,N)=>({id:`${E.toLowerCase()}.${C.toLowerCase()}`,name:N===3?null:`${E.toLowerCase()}.${C.toLowerCase()}`}))),i=Ld.flatMap(([,E],_)=>E.flatMap((C,N)=>["Review","Prepare"].map((k,j)=>({id:`task-${_*14+N*2+j+1}`,name:N%3===0?null:`${C.replaceAll(" ","_").toLowerCase()}.${k.toLowerCase()}`,teamIndex:_,agent:l[_*4+(N*2+j)%4]})))),o=0,s=i.map((E,_)=>(o+=[1.7,1.5,.8,.65,1.1,1.4,.9,.6,1.2,1.8][E.teamIndex]*(.5+_%7*.25),o)),r=()=>{let E=n()*o;return i[s.findIndex(_=>_>E)]},d=[],u=Array.from({length:96},(E,_)=>30+80*(1+Math.sin((_-24)/15))+(_>=67&&_<=74?170:0)+n()*45),p=u.reduce((E,_)=>E+_,0),f=0;for(let E=0;E<96;E++){f+=u[E];let _=Math.round(f/p*9600);for(;d.length<_;){let C=d.length,N=C>=9576,k=N?a(i.filter(zt=>zt.agent.id===l[(C-9576)*7%l.length].id)):C<i.length?i[C*53%i.length]:r(),j=C<21?C:[2,8,9].includes(k.teamIndex)&&C%9===0?20:C%11===0?[12,13,19][k.teamIndex%3]:a(HA[k.teamIndex]),[K,J,ae,q,U,z]=pu[j],B=n()<.09&&[4,11,13,20].includes(j)?"unknown":a(qA[j]),X=B==="unknown"?"Unattributed route":B==="local"?J:B==="direct"?`${J} API`:B==="router"?ae==="local"?"router.private":a(bg.slice(0,3)):a(Ud),P=!N&&n()<(E>=68&&E<=73?.085:.012),he=Math.round(320+n()**2*(z==="embedding"?32e3:24e3)),Le=N?null:P||z==="embedding"||z==="reranking"?0:Math.round(60+n()**2*(z==="reasoning"?6500:2400)),Te=z==="embedding"||z==="reranking"?0:Math.round(he*(C%5===0?.7:n()*.35)),Xt=ae==="local"||N||C%19===0?null:(he-Te*.8+Le*4)*U/1e6,nt=N?e-(9600-C)*2300:e-(96-E)*9e5+n()*9e5;d.push({id:`sample-request-${C+1}`,sourceId:"sample-activity",requestId:`req-${String(C+1).padStart(5,"0")}`,occurredAt:new Date(nt).toISOString(),model:K,modelCreator:kd[j],provider:J,location:ae,workload:`services/${Ld[k.teamIndex][0].toLowerCase()}`,scope:"agent",agentId:k.agent.id,agent:k.agent.name,taskId:k.id,task:k.name,route:X,routeKind:B,status:N?"running":P?"failed":"completed",inputTokens:he,outputTokens:Le,cacheReadTokens:Te,durationMs:N||C%43===0?null:Math.round(q*(.4+n()*1.4)*(C%71===0?5:1)),cost:Xt,currency:"USD",costKind:C%9===0?"estimated":"reported"})}}let c=new Date(e).toISOString(),v=[5.2,18.6,42.4,16.8,9.1,.27,1.2],S=new Set(d.filter(E=>E.status==="running").map(E=>E.model)),y=pu.map(([E,_,C],N)=>{let k=C==="local"&&(N!==15&&N!==18||S.has(E));return{id:`sample-model-${N}`,name:E,modelCreator:kd[N],creatorSources:["sample-activity"],provider:_,location:C,state:C==="cloud"?"observed":k?"loaded":"installed",sourceId:C==="cloud"?"sample-activity":_==="Ollama"?"ollama":_==="vLLM"?"runtime-vllm":"runtime-studio",memoryBytes:k?v[N-14]*1073741824:null,parameters:N>=14?["8B","30B","70B","27B","14B","137M","568M"][N-14]:null,quantization:N>=14?N>=19?"F16":"Q4_K_M":null}}),m=new Map;for(let E of d)m.set(`${E.provider}:${E.model}`,(m.get(`${E.provider}:${E.model}`)??0)+1);y.sort((E,_)=>m.get(`${_.provider}:${_.name}`)-m.get(`${E.provider}:${E.name}`));let h=Array.from({length:240},(E,_)=>({at:new Date(e-(239-_)*15e3).toISOString(),cpuPercent:Math.min(97,46+Math.sin(_/13)*15+(_>155&&_<184?24:0)+n()*12),memoryUsed:(110+Math.sin(_/32)*12+(_>155?18:0)+n()*2)*1073741824})),g=[...new Set(y.filter(E=>E.location==="cloud").map(E=>E.provider))],b=E=>`pool-${E.toLowerCase().replaceAll(" ","-")}`,M=pu.flatMap(([E,_,C],N)=>Array.from({length:N<6?2:1},(k,j)=>({id:`deployment-${N}-${j}`,name:C==="local"?`${_.toLowerCase().replaceAll(" ","-")}-local`:`${_.toLowerCase()}-${j?"eu-1":"us-1"}`,model:E,modelCreator:kd[N],servingMode:C==="local"?"self-hosted":_==="Baseten"?"dedicated":"shared",provider:_,location:C,state:C==="local"?y.find(K=>K.name===E).state:"configured",sourceId:C==="cloud"?"inventory":y.find(K=>K.name===E).sourceId,poolIds:[b(_)]})));d.forEach((E,_)=>{let C=pu.findIndex(([N])=>N===E.model);E.deploymentId=E.routeKind==="unknown"?null:`deployment-${C}-${C<6&&_%4===0?1:0}`,E.path=E.routeKind==="unknown"?[]:[{name:E.route,kind:E.routeKind}],E.routeKind==="router"&&E.path.push(E.location==="local"?{name:E.provider,kind:"local"}:{name:_%4===0?"llm-gateway-eu":"llm-gateway",kind:"gateway"}),["router","gateway"].includes(E.routeKind)&&E.location==="cloud"&&E.path.push({name:`${E.provider} API`,kind:"direct"}),E.routeKind==="gateway"&&E.location==="local"&&E.path.push({name:E.provider,kind:"local"})});let $=[...g.map((E,_)=>({id:b(E),name:`${E.toLowerCase()}-project-01`,kind:"quota",sourceId:"sample-capacity",windowSeconds:60,observedAt:E==="Cohere"?null:new Date(e-(E==="Baseten"?18e4:12e3)).toISOString(),resetAt:new Date(e+28e3).toISOString(),metrics:E==="Cohere"?{}:{requestsUsed:[842,318,126,427,193,256][_%6],requestsLimit:1e3,tokensUsed:E==="Anthropic"?882e3:18e4+_*71e3,tokensLimit:1e6,running:8+_*3,concurrencyLimit:80}})),...["Ollama","vLLM","LM Studio"].map((E,_)=>({id:b(E),name:`${E} / host unspecified`,kind:"runtime",sourceId:"sample-capacity",observedAt:new Date(e-8e3).toISOString(),metrics:{running:[8,18,3][_],waiting:[2,7,0][_],..._<2?{concurrencyLimit:[12,24][_],cachePercent:[54,86][_]}:{},memoryUsedBytes:[33.2,43.6,16.8][_]*1073741824,memoryTotalBytes:[64,64,24][_]*1073741824}})),...Ud.map((E,_)=>({id:b(E),name:E,kind:"gateway",sourceId:"sample-capacity",observedAt:new Date(e-11e3).toISOString(),metrics:{running:[46,14,6][_],concurrencyLimit:[50,40,20][_],waiting:[4,0,0][_]}}))],T=[["this-machine","devbox-01","","","AMD EPYC \xB7 32 cores",32,256,["RTX 4090",24,1],["LM Studio"]],["gpu-01","gpu-01","dc-01","rack-07","AMD EPYC \xB7 64 cores",64,256,["NVIDIA L40S",48,2],["Ollama"]],["gpu-02","gpu-02","dc-01","rack-07","AMD EPYC \xB7 96 cores",96,512,["NVIDIA H100",80,2],["vLLM"]],["gpu-03","gpu-03","dc-01","rack-07","AMD EPYC \xB7 64 cores",64,256,["NVIDIA L40S",48,2],[]],["gpu-04","gpu-04","dc-02","rack-03","Intel Xeon \xB7 48 cores",48,256,["NVIDIA A100",80,2],[]],["gpu-05","gpu-05","dc-02","rack-03","Intel Xeon \xB7 48 cores",48,256,["NVIDIA A100",80,2],[]]].map(([E,_,C,N,k,j,K,[J,ae,q],U],z)=>{let L=z===5?null:new Date(e-(z===4?18e4:0)).toISOString(),B=L?h.map((P,he)=>({at:new Date(Date.parse(P.at)-(z===4?18e4:0)).toISOString(),cpuPercent:Math.max(0,Math.min(100,P.cpuPercent*[.55,1,1.2,.12,.4][z]+Math.sin(he/(11+z))*4)),memoryUsed:P.memoryUsed*[.65,1,1.6,.15,.8][z]})):[],X=y.filter(P=>P.state==="loaded"&&U.includes(P.provider)).map(P=>({...P,runtime:P.provider,memoryKind:"accelerator",deploymentId:M.find(he=>he.model===P.name)?.id}));return{id:E,name:_,hostname:_,nameField:"hostname",site:C,rack:N,chip:k,cores:j,platform:"linux",arch:"x64",sourceId:E==="this-machine"?"machine":"hardware",observedAt:L,memoryTotal:K*1073741824,memoryUsed:B.at(-1)?.memoryUsed??null,cpuPercent:B.at(-1)?.cpuPercent??null,history:B,loadedModels:X,residencyReported:!!L,accelerators:Array.from({length:q},(P,he)=>({id:`gpu-${he}`,name:J,memoryTotal:ae*1073741824,memoryUsed:L?[17.8,35.2,52.6,1.2,12][z]/q*1073741824:null,utilization:L?[32,68,84,0,21][z]+he:null}))}});for(let E of M.filter(_=>_.location==="local")){let _=T.find(C=>C.loadedModels.some(N=>N.name===E.model));_&&(E.hostId=_.id,E.name=`${_.name} / ${E.provider}`,E.location=_.id==="this-machine"?"local":"private")}let O=new Set(M.filter(E=>E.location==="private").map(E=>`${E.provider}:${E.model}`));for(let E of y)O.has(`${E.provider}:${E.name}`)&&(E.location="private");for(let E of d)O.has(`${E.provider}:${E.model}`)&&(E.location="private");for(let E of $.filter(_=>_.kind==="runtime")){let _=T.find(C=>C.loadedModels.some(N=>E.id===b(N.provider)));_&&(E.name=`${E.name.split(" / ")[0]} / ${_.name}`)}return{schemaVersion:1,mode:"sample",observedAt:c,interval:15,project:{name:"inference-sample",scope:"Enterprise sample environment"},models:y,deployments:M,capacityPools:$,hosts:T,runtimeStats:[{name:"vLLM",sourceId:"runtime-vllm",hostId:"gpu-02",running:18,waiting:7,inputTokens:482e5,outputTokens:94e5,finished:74620}],inventory:[...["Baseten","Groq","Cerebras"].map(E=>({name:E,kind:"provider",location:"cloud",state:"configured",sourceId:"environment",evidence:[{field:`${E.toUpperCase()}_API_KEY`,basis:"credential-name"}]})),...bg.map(E=>({name:E,kind:"router",location:E==="router.private"?"local":"cloud",state:"observed"})),...Ud.map(E=>({name:E,kind:"gateway",location:"cloud",state:"observed",poolIds:[b(E)]})),...["Ollama","vLLM","LM Studio"].map(E=>({name:E,kind:"runtime",location:E==="LM Studio"?"local":"private",state:"observed"}))],records:d,sources:[{id:"environment",name:"Service configuration",kind:"Process environment",state:"connected",updatedAt:c,detail:"BASETEN_API_KEY \xB7 GROQ_API_KEY \xB7 CEREBRAS_API_KEY",note:"Fictional examples of environment-variable evidence. No credentials were read for this sample. Configuration alone does not establish usage, deployments, or hardware."},{id:"hardware",name:"Hardware export",kind:"Local file",state:"partial",updatedAt:c,detail:".openmerit/hosts.json",note:"Fictional fleet across two racks and a workstation. gpu-04 has stale readings; gpu-05 has not reported a reading."},{id:"sample-capacity",name:"Capacity export",kind:"Local file",state:"partial",updatedAt:c,detail:".openmerit/capacity.json",note:"Fictional shared quotas and runtime readings. Baseten is stale; Cohere has no reading. Pool measurements cover all consumers, including work outside this project."},{id:"sample-activity",name:"Inference activity",kind:"Local file",state:"connected",updatedAt:c,detail:".openmerit/inference.jsonl",note:"Fictional metadata for 40 agent IDs and 140 task IDs. Names represent exported fields, not discovered code. Some display names are absent. Measurements and prices are illustrative.",records:d.length},{id:"ollama",name:"Ollama",kind:"Runtime export",state:"connected",updatedAt:c,detail:"gpu-01 / Ollama",note:"Fictional private-runtime inventory and resident allocations from existing exports."},{id:"runtime-studio",name:"LM Studio",kind:"Local runtime",state:"connected",updatedAt:c,detail:"127.0.0.1:1234",note:"Fictional compatible runtime inventory."},{id:"runtime-vllm",name:"vLLM",kind:"Runtime export",state:"connected",updatedAt:c,detail:"gpu-02 / vLLM",note:"Fictional runtime and host exports. Remote endpoints are not queried by this terminal."},{id:"machine",name:"This machine",kind:"Operating system",state:"connected",updatedAt:c,detail:"Linux \xB7 x64",note:"Fictional whole-machine CPU and memory samples. These are not attributed to individual requests."},{id:"openmerit",name:"OpenMerit",kind:"Project evidence",state:"connected",updatedAt:c,detail:".openmerit/events.jsonl",note:"Fictional audit source. The activity export takes precedence; request totals are not added together.",records:140},{id:"inventory",name:"Declared inventory",kind:"Project configuration",state:"connected",updatedAt:c,detail:".openmerit/terminal.json",note:"Fictional configuration keys for four routers, three gateways, and three local runtimes. llm-gateway is an example service name, not a built-in gateway."},{id:"batch-archive",name:"Batch archive",kind:"Local file",state:"unavailable",updatedAt:null,detail:".openmerit/archive/inference.jsonl",note:"Fictional unavailable source. No requests from this archive are included."}],machine:T[0]}}var co=[{value:"default",label:"Default \xB7 within your stack",note:"Search all configured services; choose the lowest modeled cost among qualified replacements."},{value:"zdr",label:"Bias ZDR models",note:"Prefer confirmed ZDR endpoints. Eligibility alone does not establish account approval or enabled settings."},{value:"open",label:"Bias open-weights models",note:"Prefer models with open weights."},{value:"closed",label:"No open-weights models",note:"Require a closed-weight assignment for every workload."},{value:"usa",label:"Bias USA models",note:"Prefer models from US developers. This does not specify hosting location or data residency."},{value:"china",label:"Bias Chinese models",note:"Prefer models from Chinese developers. This does not specify hosting location or data residency."}],xl=e=>co.find(t=>t.value===e)??co[0],Bd="https://openai.com/index/gpt-4-1/",qd="https://www-cdn.anthropic.com/bbd8ef16d70b7a1665f14f306ee88b53f686aa75/Claude%20Sonnet%204.6%20System%20Card.pdf",gu="https://storage.googleapis.com/deepmind-media/gemini/gemini_3_flash_model_evaluation.pdf",ht=(e,t,n,a,l,i)=>({axis:e,name:t,value:n,suite:a,source:l,settings:i,unit:"%",direction:"higher"}),Hd=(e,t,n)=>[ht("tools","\u03C4-bench retail",e,"openai-4.1-tau-retail-gpt4o-user",Bd,"5-run average; original GPT-4o user simulator; no custom tools or prompting."),ht("capabilities","MMLU",t,"openai-4.1-mmlu",Bd,"OpenAI GPT-4.1 release comparison; GPT-4o snapshot 2024-11-20."),ht("reasoning","AIME 2024",n,"openai-4.1-aime24",Bd,"OpenAI GPT-4.1 release comparison, AIME 2024.")],Ag=(e,t,n)=>[ht("tools","\u03C4\xB2-bench retail",e,"anthropic-sonnet46-tau2-retail",qd,"Sonnet 4.6 system card \xA72.5; max effort, 10 trials for Sonnet; published Opus configuration."),ht("capabilities","MMMU-Pro \xB7 no tools",t,"anthropic-sonnet46-mmmupro-notools",qd,"Sonnet 4.6 system card Table 2.1.A; publisher model configurations."),ht("reasoning","GPQA Diamond",n,"anthropic-sonnet46-gpqa",qd,"Sonnet 4.6 system card \xA72.8; adaptive thinking, max effort for Sonnet; published Opus configuration.")],Gd=(e,t,n)=>[ht("tools","\u03C4\xB2-bench",e,"google-3flash-tau2-fixed-airline",gu,"Gemini 3 Pro user simulator; fixed Airline domain; mean of Retail, Airline and Telecom."),ht("capabilities","MMMU-Pro",t,"google-3flash-mmmupro",gu,"Thinking; mean of Standard and Vision settings; no tools."),ht("reasoning","GPQA Diamond",n,"google-3flash-gpqa",gu,"Thinking; no tools; Google December 2025 comparison.")],jd="https://arxiv.org/html/2508.10925v1",Yd=(e,t,n)=>[ht("tools","\u03C4-bench retail",e,"openai-oss-high-retail",jd,"Table 3; high reasoning effort; developer function calling."),ht("capabilities","MMLU",t,"openai-oss-high-mmlu",jd,"Table 3; high reasoning effort, default system prompt, pass@1."),ht("reasoning","GPQA Diamond \xB7 no tools",n,"openai-oss-high-gpqa",jd,"Table 3; high reasoning effort, no tools, pass@1.")],Id="https://huggingface.co/deepseek-ai/DeepSeek-V4.1-Flash",Eg=(e,t,n)=>[ht("tools","AutomationBench",e,"deepseek41-automation",Id,"Frontier instruct-model comparison; official scaffold, maximum reasoning effort, temperature 1, top-p .95."),ht("capabilities","Agent\u2019s Last Exam",t,"deepseek41-ale",Id,"Frontier instruct-model comparison; broad agent tasks, official scaffold, maximum reasoning effort."),ht("reasoning","GPQA Diamond",n,"deepseek41-gpqa",Id,"Frontier instruct-model comparison; pass@1, maximum reasoning effort. Published model scores, not endpoint measurements.")],Rs="https://huggingface.co/Qwen/Qwen3.6-27B",Tg=(e,t,n,a)=>[ht("tools","ClawEval \xB7 average",e,"qwen36-claw-avg",Rs,"Qwen 3.6 27B release comparison; published model configurations."),ht("tools","ClawEval \xB7 pass\xB3",t,"qwen36-claw-pass3",Rs,"Same comparison, stricter repeated-task success. Both tool metrics must pass."),ht("capabilities","MMMU-Pro",n,"qwen36-mmmupro",Rs,"Vision benchmark; published Qwen 3.6 comparison configurations."),ht("reasoning","GPQA Diamond",a,"qwen36-gpqa",Rs,"Published Qwen 3.6 comparison configurations.")],fo=(e,t,n,a,l)=>["tools","capabilities","reasoning"].map((i,o)=>ht(i,n[o],a[o],`${t}-${i}`,e,l)),GA="https://huggingface.co/zai-org/GLM-5.3-Flash",wg=e=>fo(GA,"glm53flash-release",["AutomationBench v1.0.6","GDPval-AA v2","HLE \xB7 with tools"],e,"Published release chart and footnotes; maximum effort; GDPval-AA rating, not percent.").map(t=>t.axis==="capabilities"?{...t,unit:" rating"}:t),jA="https://huggingface.co/Qwen/Qwen3.8-27B",Mg=e=>fo(jA,"qwen38-release",["ClawEval-MM \xB7 average","IFBench","GPQA Diamond"],e,"Qwen 3.8 model card comparison; published thinking configurations. ClawEval-MM is distinct from ClawEval."),YA="https://huggingface.co/zai-org/GLM-4.7",$g=e=>fo(YA,"glm47-application-code",["\u03C4\xB2-bench","LiveCodeBench v6","GPQA Diamond"],e,"GLM-4.7 release table; thinking enabled, preserved thinking for multi-turn tools; adjusted user prompts and fixed Airline domain. Published comparator configurations; not endpoint parity."),_g=e=>fo(gu,"google-3flash-application-code",["\u03C4\xB2-bench","LiveCodeBench Pro","GPQA Diamond"],e,"December 2025 comparison: Gemini thinking, Sonnet 4.5 high/best available thinking. LCB Pro official leaderboard Elo; \u03C4\xB2 fixed Airline, Gemini user simulator for Gemini and publisher-reported Sonnet score. Public comparison, not a controlled endpoint evaluation.").map(t=>t.axis==="capabilities"?{...t,unit:" Elo"}:t),Dl={confirmedZdr:!0,policySource:"https://www.baseten.co/security-practices/",endpointMode:"Synchronous Model API; request/response logging off"},Ue=(e,t,n,a,l,i,o=[],s={})=>({id:e,modelId:e,name:t,provider:n,input:a,output:l,source:i,benchmarks:o,creator:n,origin:"US",openWeights:!1,outputType:"text",confirmedZdr:!1,...s}),$s=e=>`https://developers.openai.com/api/docs/models/${e}`,mu="https://platform.claude.com/docs/en/about-claude/pricing",Vd="https://ai.google.dev/gemini-api/docs/pricing",hu="https://console.groq.com/docs/models",wi="https://www.baseten.co/pricing/",Rg="https://docs.mistral.ai/inference/pricing",vu=[Ue("gpt4o","GPT-4o","OpenAI",2.5,10,$s("gpt-4o"),Hd(60.3,85.7,13.1)),Ue("gpt41","GPT-4.1","OpenAI",2,8,$s("gpt-4.1"),Hd(68,90.2,48.1)),Ue("gpt41mini","GPT-4.1 mini","OpenAI",.4,1.6,$s("gpt-4.1-mini"),Hd(55.8,87.5,49.6)),Ue("gpt54","GPT-5.4","OpenAI",2.5,15,$s("gpt-5.4")),Ue("gpt54mini","GPT-5.4 mini","OpenAI",.75,4.5,$s("gpt-5.4-mini")),Ue("opus45","Claude Opus 4.5","Anthropic",5,25,mu,[...Ag(88.9,70.6,87),...Tg(76.6,59.6,70.6,87)]),Ue("sonnet46","Claude Sonnet 4.6","Anthropic",3,15,mu,Ag(91.7,74.5,89.9)),Ue("sonnet45","Claude Sonnet 4.5","Anthropic",3,15,mu,[...$g([87.2,64,83.4]),..._g([87.2,1418,83.4])],{configuration:"Thinking enabled; published comparison configurations"}),Ue("haiku45","Claude Haiku 4.5","Anthropic",1,5,mu),Ue("gemini25pro","Gemini 2.5 Pro","Google",1.25,10,Vd,Gd(77.8,68,86.4)),Ue("gemini25flash","Gemini 2.5 Flash","Google",.3,2.5,Vd,Gd(79.5,66.7,82.8)),Ue("gemini3flash","Gemini 3 Flash Preview","Google",.5,3,Vd,[...Gd(90.2,81.2,90.4),..._g([90.2,2316,90.4])]),Ue("oss120","gpt-oss-120b","Groq",.15,.6,hu,Yd(67.8,90,80.1),{creator:"OpenAI",openWeights:!0,configuration:"High reasoning effort"}),Ue("oss20","gpt-oss-20b","Groq",.075,.3,hu,Yd(54.8,85.3,71.5),{creator:"OpenAI",openWeights:!0,configuration:"High reasoning effort"}),Ue("glm53","GLM-5.3","Baseten",1.4,4.4,wi,Eg(48.8,28.5,88.1),{creator:"Z.ai",origin:"CN",openWeights:!0,...Dl,configuration:"Maximum reasoning effort"}),Ue("glm53flash","GLM-5.3-Flash","Baseten",.15,.5,wi,wg([48.8,1773,55.3]),{creator:"Z.ai",origin:"CN",openWeights:!0,...Dl}),Ue("mistral35","Mistral Medium 3.5","Mistral",1.5,7.5,Rg,[],{origin:"FR",openWeights:!0,metadataSource:"https://docs.mistral.ai/models/mistral-medium-3-5-26-04"}),Ue("mistral4","Mistral Small 4","Mistral",.15,.6,Rg,[],{origin:"FR",openWeights:!0}),Ue("oss120baseten","gpt-oss-120b","Baseten",.1,.5,wi,Yd(67.8,90,80.1),{modelId:"oss120",creator:"OpenAI",openWeights:!0,...Dl,configuration:"High reasoning effort; same published checkpoint"}),Ue("deepseek41flash","DeepSeek V4.1 Flash","Baseten",.3,1.2,wi,Eg(54.8,31.8,90.9),{creator:"DeepSeek",origin:"CN",openWeights:!0,...Dl,configuration:"Maximum reasoning effort (100)"}),Ue("deepseek4pro0813","DeepSeek V4 Pro 0813","Baseten",1.32,3.96,wi,[],{creator:"DeepSeek",origin:"CN",openWeights:!0,...Dl,metadataSource:"https://huggingface.co/deepseek-ai/DeepSeek-V4-Pro-0813"}),Ue("nemotron3ultra","Nemotron 3 Ultra","Baseten",.6,2.4,wi,fo("https://huggingface.co/nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B-BF16","nvidia-ultra-nemo",["TauBench V3 \xB7 average","MMLU-Pro","GPQA \xB7 no tools"],[70.9,86.8,87],"NVIDIA NeMo evaluation SDK; model-card configurations. TauBench V3 is not \u03C4-bench or \u03C4\xB2-bench."),{creator:"NVIDIA",origin:"US",openWeights:!0,...Dl,metadataSource:"https://huggingface.co/nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B-BF16"}),Ue("glm52","GLM-5.2","Baseten",1.4,4.4,wi,wg([26.2,1504,54.7]),{creator:"Z.ai",origin:"CN",openWeights:!0,...Dl,metadataSource:"https://huggingface.co/zai-org/GLM-5.2"}),Ue("glm47","GLM-4.7","Baseten",.6,2.2,"https://www.baseten.co/library/glm-4-7/",[...fo("https://huggingface.co/zai-org/GLM-4.7","glm47-release",["\u03C4\xB2-bench","MMLU-Pro","GPQA Diamond"],[87.4,84.3,85.7],"GLM-4.7 release configurations; preserved thinking, adjusted user prompts and fixed Airline domain for \u03C4\xB2-bench."),...$g([87.4,84.9,85.7])],{creator:"Z.ai",origin:"CN",openWeights:!0,...Dl,configuration:"Thinking enabled",metadataSource:"https://huggingface.co/zai-org/GLM-4.7"}),Ue("qwen36","Qwen 3.6 \xB7 27B","Groq",.6,3,hu,[...Tg(72.4,60.6,75.8,87.8),...Mg([50.4,69.1,87.8])],{creator:"Alibaba",origin:"CN",openWeights:!0,availability:"Preview",metadataSource:Rs}),Ue("qwen38","Qwen 3.8 \xB7 27B","Groq",.8,4,hu,Mg([56.9,79.5,89.2]),{creator:"Alibaba",origin:"CN",openWeights:!0,availability:"Preview",metadataSource:"https://huggingface.co/Qwen/Qwen3.8-27B"}),Ue("jev","Jev 1.13","TypeSafe",.042,0,"https://docs.typesafe.ai/models",[],{outputType:"decision"})],Cs=["OpenAI","Anthropic","Google","Groq","Baseten","Mistral"],IA=e=>vu.find(t=>t.id===e),Cg={"actuarial.queries":{input:14e3,output:700},"portfolio.reporting":{input:18e3,output:900},"claims.reconciliation":{input:5e3,output:2e3},"reserves.analysis":{input:6e3,output:2400}},Mi=[["claims.intake","Claim intake","gpt4o",["parse_notice","extract_loss_date","normalize_address","link_policy","check_attachments","summarize_notice","prepare_case"]],["policy.extraction","Policy document extraction","gpt54",["read_schedule","extract_limits","extract_deductibles","identify_endorsements","normalize_terms","link_sections","check_completeness"]],["coverage.review","Coverage review support","opus45",["retrieve_wording","compare_endorsements","locate_exclusions","cite_conditions","summarize_scope","flag_ambiguity","prepare_review"]],["claims.correspondence","Claim correspondence","sonnet46",["draft_acknowledgment","request_documents","summarize_progress","draft_follow_up","check_tone","cite_case_notes","prepare_handoff"]],["documents.verification","Document verification","gemini25pro",["read_estimate","extract_line_items","match_invoices","check_totals","compare_versions","flag_missing_pages","prepare_evidence"]],["renewals.summary","Renewal preparation","gemini25flash",["summarize_history","compare_schedules","list_changes","check_dates","extract_terms","prepare_brief","draft_reminder"]],["claims.tagging","Claim tagging","oss120",["tag_document","label_channel","extract_reference","normalize_category","link_attachment","label_language","index_summary"]],["fraud.review","Fraud review support","glm53",["summarize_signals","link_evidence","compare_statements","flag_inconsistency","build_timeline","prepare_case_note","route_to_reviewer"]],["broker.translation","Broker correspondence","mistral35",["detect_language","translate_email","preserve_policy_terms","check_names","summarize_request","draft_reply","prepare_review"]],["claims.routing","Decision routing","gpt4o",["route_notice","rank_queue","classify_document","score_completeness","flag_duplicates","choose_workflow","route_exception"]],["actuarial.queries","Actuarial query generation","sonnet45",["read_schema","select_tables","generate_query","check_join_keys","validate_query","explain_result","prepare_review"]],["claims.reconciliation","Claim reconciliation scripts","sonnet45",["read_line_items","normalize_columns","generate_transform","compare_totals","build_checks","explain_variance","prepare_review"]],["portfolio.reporting","Portfolio reporting queries","sonnet45",["read_report_spec","map_dimensions","generate_query","check_aggregates","validate_periods","explain_result","prepare_report"]],["reserves.analysis","Reserve analysis scripts","sonnet45",["read_triangle","normalize_periods","generate_calculation","check_assumptions","build_sensitivity","explain_projection","prepare_review"]]].map(([e,t,n,a])=>({id:e,purpose:t,before:IA(n),configuredServices:Cs,tasks:a,benchmarkProfile:Cg[e]?"Application code \xB7 tools, code generation, reasoning":"General application \xB7 tools, capabilities, reasoning",tokenProfile:Cg[e]??null,requiredAxes:["tools","capabilities","reasoning",...e==="claims.routing"?["decisions"]:[]]}));function Og(e,t){return e&&[e.input,e.output,t.inputTokens,t.outputTokens].every(n=>Number.isFinite(n)&&n>=0)?(e.input*t.inputTokens+e.output*t.outputTokens)/1e6:null}function VA(e,t,n){let a=e.before,l=e.requiredAxes.flatMap(c=>c==="decisions"?["decisionAccuracy","calibration"]:[c]).flatMap(c=>{let v=a.benchmarks.filter(y=>y.axis===c),S=v.flatMap(y=>t.benchmarks.filter(m=>m.axis===c&&y.suite===m.suite&&y.name===m.name&&y.unit===m.unit&&y.direction===m.direction).map(m=>({a:y,b:m})));return S.length?S.map(({a:y,b:m})=>{let h=!!(y.source&&m.source&&Number.isFinite(y.value)&&Number.isFinite(m.value)),g=h&&(y.direction==="lower"?m.value<=y.value:m.value>=y.value);return{axis:c,before:y,after:m,status:h?g?"pass":"regression":"missing"}}):[{axis:c,before:v[0]??null,after:t.benchmarks.find(y=>y.axis===c)??null,status:"missing"}]}),i=Og(a,n),o=Og(t,n),s=i!==null&&o!==null&&o<i,r=a.latency,d=t.latency,u=!!(r&&d&&r.suite&&r.metric&&r.suite===d.suite&&r.metric===d.metric&&r.source&&d.source&&Number.isFinite(r.value)&&Number.isFinite(d.value)&&d.value>0&&d.value<r.value),p=(e.configuredServices??[a.provider]).includes(t.provider)&&t.outputType===a.outputType&&o!==null,f=[];return(e.configuredServices??[a.provider]).includes(t.provider)||f.push("Service is not configured in this environment"),t.outputType!==a.outputType&&f.push("Different output contract; application adaptation required"),l.some(c=>c.status==="missing")&&f.push("Comparable benchmark evidence is incomplete"),l.some(c=>c.status==="regression")&&f.push("A required benchmark regresses"),o===null&&f.push("Token price is unavailable"),!s&&!u&&f.push("No verified cost or latency improvement"),{candidate:t,checks:l,cheaper:s,faster:u,beforeCost:i,afterCost:o,compatible:p,issues:f,eligible:f.length===0}}function _s(e,t){return t==="zdr"?e.confirmedZdr===!0:t==="open"?e.openWeights===!0:t==="closed"?e.openWeights===!1:t==="usa"?e.origin==="US":t==="china"?e.origin==="CN":!0}function Ng(e,t,n="default"){n=xl(n).value;let a=(e.candidates??vu).filter(y=>y.id!==e.before.id).map(y=>VA(e,y,t)),l=y=>y.eligible&&(n!=="closed"||y.candidate.openWeights===!1),i=(y,m)=>(y.afterCost??1/0)-(m.afterCost??1/0)||y.candidate.id.localeCompare(m.candidate.id),o=a.filter(l).sort(i),s=a.filter(y=>y.eligible).sort(i)[0]?.candidate??e.before,r=n==="default"?o[0]:o.find(y=>_s(y.candidate,n));if(!r&&n!=="default"&&!_s(e.before,n)){let y=(m,h)=>new Set(m.checks.filter(g=>g.status===h).map(g=>g.axis)).size;r=a.filter(m=>m.compatible&&_s(m.candidate,n)).sort((m,h)=>y(m,"regression")-y(h,"regression")||y(m,"missing")-y(h,"missing")||+(!m.cheaper&&!m.faster)-+(!h.cheaper&&!h.faster)||i(m,h))[0],!r&&n!=="closed"&&(r=o[0])}let d=r?.candidate??e.before,u=n==="closed"&&d.openWeights!==!1,p=u?null:d,f=!!(p&&r&&!r.eligible),c=f?r.issues:[],v=!!(p&&p.provider!==e.before.provider),S=!!(p&&p.modelId!==e.before.modelId);return{id:e.id,purpose:e.purpose,benchmarkProfile:e.benchmarkProfile,tokenProfile:e.tokenProfile,before:e.before,after:p,changed:!!(p&&r),serviceChanged:v,modelChanged:S,checks:r?.checks??[],assessments:a,qualifiedCount:o.length,preferenceMatched:!!(p&&_s(p,n)),preferenceChanged:!!(p&&p.id!==s.id),defaultChoice:s.id,unresolved:u,override:f,overrideReasons:c,reason:u?"No compatible closed-weight assignment in the reviewed catalog. Service, output contract and known pricing remain required.":f?`Selected for ${xl(n).label}. No preferred replacement passed every primary check.`:r?`${S?"Selected benchmark scores match or improve":"Same model checkpoint and published benchmark scores; service changes"}; ${r.cheaper?"modeled token cost is lower":"paired latency is lower"}.`:n!=="default"&&_s(e.before,n)?"Baseline retained: already matches this preference; no qualifying preferred replacement.":"Baseline retained. No reviewed candidate passes every required check."}}var Zd="2026-10-10",Xd=e=>`https://developers.openai.com/api/docs/models/${e}`,Kd="https://platform.claude.com/docs/en/about-claude/pricing",Qd="https://ai.google.dev/gemini-api/docs/pricing",Dg="https://console.groq.com/docs/models",xg="https://www.baseten.co/pricing/",zg="https://docs.mistral.ai/inference/pricing",sn=(e,t,n,a,l,i=t)=>({name:e,provider:t,input:n,output:a,source:l,creator:i}),Lg=[sn("GPT-5.4","OpenAI",2.5,15,Xd("gpt-5.4")),sn("GPT-5.4 mini","OpenAI",.75,4.5,Xd("gpt-5.4-mini")),sn("GPT-5.4 nano","OpenAI",.2,1.25,Xd("gpt-5.4-nano")),sn("Claude Opus 4.6","Anthropic",5,25,Kd),sn("Claude Sonnet 4.6","Anthropic",3,15,Kd),sn("Claude Haiku 4.5","Anthropic",1,5,Kd),sn("Gemini 2.5 Pro","Google",1.25,10,Qd),sn("Gemini 2.5 Flash","Google",.3,2.5,Qd),sn("Gemini 2.5 Flash-Lite","Google",.1,.4,Qd),sn("gpt-oss-120b","Groq",.15,.6,Dg,"OpenAI"),sn("gpt-oss-20b","Groq",.075,.3,Dg,"OpenAI"),sn("GLM-5.3","Baseten",1.4,4.4,xg,"Z.ai"),sn("GLM-5.3-Flash","Baseten",.15,.5,xg,"Z.ai"),sn("Mistral Medium 3.5","Mistral",1.5,7.5,zg),sn("Mistral Small 4","Mistral",.15,.6,zg)];function Os(e,t,n){return!e||!Number.isFinite(t)||!Number.isFinite(n)?null:(t*e.input+n*e.output)/1e6}var Wa=(e,t)=>Lg.find(n=>n.provider===e&&n.name===t),Fn=1e3;function Fd(e=Date.now()){let t=Sg(e);t.simulation={kind:"enterprise-groups",days:30,requestsPerGroup:Fn,priceDate:Zd,prices:Lg},t.project={name:"enterprise-sample",scope:"Fictional enterprise environment"};let n=new Map([["GPT-5",Wa("OpenAI","GPT-5.4")],["GPT-5 mini",Wa("OpenAI","GPT-5.4 mini")],["GPT-5 nano",Wa("OpenAI","GPT-5.4 nano")],["Claude Sonnet 4.5",Wa("Anthropic","Claude Sonnet 4.6")],["Claude Opus 4.1",Wa("Anthropic","Claude Opus 4.6")],["Claude Haiku 3.5",Wa("Anthropic","Claude Haiku 4.5")],["DeepSeek R1",Wa("Baseten","GLM-5.3")],["Mistral Medium 3",Wa("Mistral","Mistral Medium 3.5")]]),a=(l,i)=>{let o=n.get(l[i]);o&&(l[i]=o.name,l.modelCreator=o.creator)};t.models.forEach(l=>a(l,"name")),t.deployments.forEach(l=>{a(l,"model"),l.provider==="Baseten"&&(l.servingMode="shared")}),t.records.forEach((l,i)=>{a(l,"model"),l.sampleRequests=Fn,l.occurredAt=new Date(e-(e-Date.parse(l.occurredAt))*30).toISOString();let o=i%5+1;l.agentId+=`.worker-${o}`,l.agent&&(l.agent+=`.worker-${o}`),l.taskId+=`-partition-${o}`,l.inputTokens*=Fn,l.status==="running"&&(l.status="completed",l.outputTokens=800),l.outputTokens!=null&&(l.outputTokens*=Fn),l.cacheReadTokens=0,l.cost=Os(Wa(l.provider,l.model),l.inputTokens,l.outputTokens),l.costKind="estimated",l.requestId=null});for(let l of t.sources)l.id==="sample-activity"&&(l.records=96e5,l.detail="Fictional request groups \xB7 30 days",l.note="9.6 million fictional requests represented by 9,600 groups of 1,000. Tokens and spend are group totals. Published uncached text-token prices are applied where available; other costs are unknown. No application or provider was contacted.");return t}function yu(e=Date.now(),t="before",n="default"){if(!["before","after"].includes(t))throw new Error("Unknown comparison stage");n=xl(n).value;let a=Fd(e);a.project={name:"insurance-tech-demo",scope:"Fictional insurance operations application"};let l=Mi.map(()=>({inputTokens:0,outputTokens:0}));a.records.forEach((c,v)=>{c.assignmentId=v%Mi.length;let S=Mi[c.assignmentId].tokenProfile;if(S){let y=.85+v*17%31/100;c.inputTokens=Math.round(S.input*y)*Fn,c.outputTokens=Math.round(S.output*y)*Fn}c.outputTokens||(c.outputTokens=(80+v*37%1600)*Fn),l[c.assignmentId].inputTokens+=c.inputTokens,l[c.assignmentId].outputTokens+=c.outputTokens});let i=Object.fromEntries(co.map(({value:c})=>[c,Mi.map((v,S)=>Ng(v,l[S],c))])),o=i[n],s=c=>JSON.stringify(c.map(v=>v.after?.id??null)),r=Object.keys(i).filter(c=>c!==n&&s(i[c])===s(o)),d=o.every(c=>!c.unresolved);a.simulation={...a.simulation,kind:"comparison-groups",stage:t,preference:n,feasible:d,equivalentPreferences:r,catalogSize:vu.filter(c=>Cs.includes(c.provider)).length,configuredServices:Cs,assignments:o,prices:[...new Map(o.flatMap(c=>[c.before,c.after]).filter(Boolean).map(c=>[c.id,c])).values()]};let u=new Map,p=new Map;a.records.forEach((c,v)=>{let S=c.assignmentId,y=o[S],m=Mi[S],h=t==="after"?y.after??y.before:y.before,g=Math.floor(v/Mi.length),b=String(g%20+1).padStart(2,"0");c.workload=`services/${m.id.replaceAll(".","/")}`,c.agentId=c.agent=`${m.id}.worker-${b}`,c.task=m.tasks[g%m.tasks.length],c.taskId=`${m.id}.${c.task}.batch-${Math.floor(g/m.tasks.length)%10+1}`,c.model=h.name,c.modelCreator=h.creator,c.provider=h.provider,c.location="cloud",c.status="completed",c.durationMs=null,c.cost=Os(h,c.inputTokens,c.outputTokens),c.beforeCost=Os(y.before,c.inputTokens,c.outputTokens),c.afterCost=Os(y.after,c.inputTokens,c.outputTokens),c.routeKind=["direct","router","gateway"][v%3],c.route=c.routeKind==="direct"?`${h.provider} API`:c.routeKind==="router"?"insurance.router":"insurance-gateway",c.path=[{name:c.route,kind:c.routeKind}],c.routeKind!=="direct"&&c.path.push({name:`${h.provider} API`,kind:"direct"}),c.deploymentId=`demo-deployment-${S}`,!(t==="after"&&!y.after)&&(u.set(h.id,{id:`demo-model-${h.id}`,name:h.name,provider:h.provider,modelCreator:h.creator,sourceId:"sample-activity",location:"cloud",state:"observed"}),p.set(S,{id:c.deploymentId,name:m.id,model:h.name,modelCreator:h.creator,provider:h.provider,location:"cloud",servingMode:"shared",state:"configured",sourceId:"inventory",poolIds:[`pool-${h.provider.toLowerCase()}`]}))}),a.models=[...u.values()],a.deployments=[...p.values()];let f=Cs;if(a.inventory=[...f.map(c=>({name:c,kind:"provider",location:"cloud",state:"configured",sourceId:"inventory"})),{name:"insurance.router",kind:"router",location:"cloud",state:"configured"},{name:"insurance-gateway",kind:"gateway",location:"cloud",state:"configured"}],a.capacityPools=a.capacityPools.filter(c=>f.some(v=>c.id===`pool-${v.toLowerCase()}`)),a.hosts=[],a.runtimeStats=[],delete a.machine,a.sources=a.sources.filter(c=>["sample-activity","sample-capacity","inventory"].includes(c.id)),a.sources.find(c=>c.id==="sample-capacity").note="Fictional provider quota readings, held identical in both stages. They do not establish a change in latency, throughput or available capacity.",a.sources.find(c=>c.id==="sample-activity").note+=" Insurance workflow and worker names are fictional declarations. Assignments distinguish qualified replacements, retained baselines and explicit preference overrides. Overrides do not pass all primary criteria. Application quality and latency have not been measured.",a.simulation.windows=Object.fromEntries([0,1,6,24,168,720].map(c=>{let v=a.records.filter(y=>!c||Date.parse(y.occurredAt)>=e-c*36e5),S=y=>({requests:y.length*Fn,assignedRequests:y.filter(m=>o[m.assignmentId].after).length*Fn,qualifiedRequests:y.filter(m=>o[m.assignmentId].after&&!o[m.assignmentId].override).length*Fn,overrideRequests:y.filter(m=>o[m.assignmentId].override).length*Fn,beforeCost:y.reduce((m,h)=>m+h.beforeCost,0),afterCost:d?y.reduce((m,h)=>m+h.afterCost,0):null});return[c,{...S(v),workloads:o.map((y,m)=>{let h=v.filter(g=>g.assignmentId===m);return{...S(h),afterCost:y.after?h.reduce((g,b)=>g+Os(y.after,b.inputTokens,b.outputTokens),0):null}})}]})),t==="after"&&!d){a.records=a.records.filter(v=>o[v.assignmentId].after);let c=a.sources.find(v=>v.id==="sample-activity");c.records=a.records.length*Fn,c.note+=" Incomplete After plan: only workloads with an assignment are included; preference overrides are identified in comparison metadata. Unresolved workloads remain in comparison metadata, without an After assignment or cost."}return a}function Jt(e,t){return t?.mode==="sample"&&["enterprise-groups","comparison-groups"].includes(t.simulation?.kind)&&Number.isSafeInteger(e.sampleRequests)&&e.sampleRequests>0?e.sampleRequests:1}function fa(e,t){return e.reduce((n,a)=>n+Jt(a,t),0)}var Jd=[1,6,24,168,720,0],Dn=e=>({1:"1h",6:"6h",24:"24h",168:"7d",720:"30d",0:"All time"})[e],Ns=e=>e===0?"All available history":`Last ${Dn(e)}`;function Pd(e,t){let n=Date.parse(t),a=1/0,l=-1/0;for(let i of e){let o=Date.parse(i.occurredAt);!Number.isFinite(o)||o>n||(a=Math.min(a,o),l=Math.max(l,o))}return{first:Number.isFinite(a)?new Date(a).toISOString():null,last:Number.isFinite(l)?new Date(l).toISOString():null}}function Wd(e,t,n){let a=Date.parse(n);if(t!==0)return{start:a-t*36e5,end:a};let l=Pd(e,n),i=l.last?Date.parse(l.last):a;return{start:l.first?Math.min(Date.parse(l.first),i-6e4):i-36e5,end:i}}function kg(e,t,n){let{start:a,end:l}=Wd(e,t,n);return e.filter(i=>{let o=Date.parse(i.occurredAt);return o>=a&&o<=l})}function Ug(e){let[t,n]=e>=864e5?["day",864e5]:e>=36e5?["hour",36e5]:e>=6e4?["minute",6e4]:["second",1e3];return`${new Intl.NumberFormat("en",{maximumFractionDigits:1}).format(e/n)}-${t}`}function Bg(e,t,n=!1){return new Date(e).toLocaleString([],n?{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}:t>864e5?{month:"short",day:"numeric",...t>31536e6?{year:"numeric"}:{}}:{hour:"2-digit",minute:"2-digit"})}var qg=11;function XA(e,t){var n=t.attributes,a,l,i,o,s;if(!(t.nodeType===qg||e.nodeType===qg)){for(var r=n.length-1;r>=0;r--)a=n[r],l=a.name,i=a.namespaceURI,o=a.value,i?(l=a.localName||l,s=e.getAttributeNS(i,l),s!==o&&(a.prefix==="xmlns"&&(l=a.name),e.setAttributeNS(i,l,o))):(s=e.getAttribute(l),s!==o&&e.setAttribute(l,o));for(var d=e.attributes,u=d.length-1;u>=0;u--)a=d[u],l=a.name,i=a.namespaceURI,i?(l=a.localName||l,t.hasAttributeNS(i,l)||e.removeAttributeNS(i,l)):t.hasAttribute(l)||e.removeAttribute(l)}}var bu,KA="http://www.w3.org/1999/xhtml",rn=typeof document>"u"?void 0:document,QA=!!rn&&"content"in rn.createElement("template"),ZA=!!rn&&rn.createRange&&"createContextualFragment"in rn.createRange();function FA(e){var t=rn.createElement("template");return t.innerHTML=e,t.content.childNodes[0]}function JA(e){bu||(bu=rn.createRange(),bu.selectNode(rn.body));var t=bu.createContextualFragment(e);return t.childNodes[0]}function PA(e){var t=rn.createElement("body");return t.innerHTML=e,t.childNodes[0]}function WA(e){return e=e.trim(),QA?FA(e):ZA?JA(e):PA(e)}function Su(e,t){var n=e.nodeName,a=t.nodeName,l,i;return n===a?!0:(l=n.charCodeAt(0),i=a.charCodeAt(0),l<=90&&i>=97?n===a.toUpperCase():i<=90&&l>=97?a===n.toUpperCase():!1)}function eE(e,t){return!t||t===KA?rn.createElement(e):rn.createElementNS(t,e)}function tE(e,t){for(var n=e.firstChild;n;){var a=n.nextSibling;t.appendChild(n),n=a}return t}function ef(e,t,n){e[n]!==t[n]&&(e[n]=t[n],e[n]?e.setAttribute(n,""):e.removeAttribute(n))}var Hg={OPTION:function(e,t){var n=e.parentNode;if(n){var a=n.nodeName.toUpperCase();a==="OPTGROUP"&&(n=n.parentNode,a=n&&n.nodeName.toUpperCase()),a==="SELECT"&&!n.hasAttribute("multiple")&&(e.hasAttribute("selected")&&!t.selected&&(e.setAttribute("selected","selected"),e.removeAttribute("selected")),n.selectedIndex=-1)}ef(e,t,"selected")},INPUT:function(e,t){ef(e,t,"checked"),ef(e,t,"disabled"),e.value!==t.value&&(e.value=t.value),t.hasAttribute("value")||e.removeAttribute("value")},TEXTAREA:function(e,t){var n=t.value;e.value!==n&&(e.value=n);var a=e.firstChild;if(a){var l=a.nodeValue;if(l==n||!n&&l==e.placeholder)return;a.nodeValue=n}},SELECT:function(e,t){if(!t.hasAttribute("multiple")){for(var n=-1,a=0,l=e.firstChild,i,o;l;)if(o=l.nodeName&&l.nodeName.toUpperCase(),o==="OPTGROUP")i=l,l=i.firstChild,l||(l=i.nextSibling,i=null);else{if(o==="OPTION"){if(l.hasAttribute("selected")){n=a;break}a++}l=l.nextSibling,!l&&i&&(l=i.nextSibling,i=null)}e.selectedIndex=n}}},Ds=1,Gg=11,jg=3,Yg=8;function zl(){}function nE(e){if(e)return e.getAttribute&&e.getAttribute("id")||e.id}function aE(e){return function(n,a,l){if(l||(l={}),typeof a=="string")if(n.nodeName==="#document"||n.nodeName==="HTML"){var i=a;a=rn.createElement("html"),a.innerHTML=i}else if(n.nodeName==="BODY"){var o=a;a=rn.createElement("html"),a.innerHTML=o;var s=a.querySelector("body");s&&(a=s)}else a=WA(a);else a.nodeType===Gg&&(a=a.firstElementChild);var r=l.getNodeKey||nE,d=l.onBeforeNodeAdded||zl,u=l.onNodeAdded||zl,p=l.onBeforeElUpdated||zl,f=l.onElUpdated||zl,c=l.onBeforeNodeDiscarded||zl,v=l.onNodeDiscarded||zl,S=l.onBeforeElChildrenUpdated||zl,y=l.skipFromChildren||zl,m=l.addChild||function(q,U){return q.appendChild(U)},h=l.childrenOnly===!0,g=Object.create(null),b=[];function M(q){b.push(q)}function $(q,U){if(q.nodeType===Ds)for(var z=q.firstChild;z;){var L=void 0;U&&(L=r(z))?M(L):(v(z),z.firstChild&&$(z,U)),z=z.nextSibling}}function w(q,U,z){c(q)!==!1&&(U&&U.removeChild(q),v(q),$(q,z))}function T(q){if(q.nodeType===Ds||q.nodeType===Gg)for(var U=q.firstChild;U;){var z=r(U);z&&(g[z]=U),T(U),U=U.nextSibling}}T(n);function O(q){u(q);for(var U=q.firstChild;U;){var z=U.nextSibling,L=r(U);if(L){var B=g[L];B&&Su(U,B)?(U.parentNode.replaceChild(B,U),_(B,U)):O(U)}else O(U);U=z}}function E(q,U,z){for(;U;){var L=U.nextSibling;(z=r(U))?M(z):w(U,q,!0),U=L}}function _(q,U,z){var L=r(U);if(L&&delete g[L],!z){var B=p(q,U);if(B===!1||(B instanceof HTMLElement&&(q=B,T(q)),e(q,U),f(q),S(q,U)===!1))return}q.nodeName!=="TEXTAREA"?C(q,U):Hg.TEXTAREA(q,U)}function C(q,U){var z=y(q,U),L=U.firstChild,B=q.firstChild,X,P,he,Le,Te;e:for(;L;){for(Le=L.nextSibling,X=r(L);!z&&B;){if(he=B.nextSibling,L.isSameNode&&L.isSameNode(B)){L=Le,B=he;continue e}P=r(B);var Xt=B.nodeType,nt=void 0;if(Xt===L.nodeType&&(Xt===Ds?(X?X!==P&&((Te=g[X])?he===Te?nt=!1:(q.insertBefore(Te,B),P?M(P):w(B,q,!0),B=Te,P=r(B)):nt=!1):P&&(nt=!1),nt=nt!==!1&&Su(B,L),nt&&_(B,L)):(Xt===jg||Xt==Yg)&&(nt=!0,B.nodeValue!==L.nodeValue&&(B.nodeValue=L.nodeValue))),nt){L=Le,B=he;continue e}P?M(P):w(B,q,!0),B=he}if(X&&(Te=g[X])&&Su(Te,L))z||m(q,Te),_(Te,L);else{var zt=d(L);zt!==!1&&(zt&&(L=zt),L.actualize&&(L=L.actualize(q.ownerDocument||rn)),m(q,L),O(L))}L=Le,B=he}E(q,B,P);var Ke=Hg[q.nodeName];Ke&&Ke(q,U)}var N=n,k=N.nodeType,j=a.nodeType;if(!h){if(k===Ds)j===Ds?Su(n,a)||(v(n),N=tE(n,eE(a.nodeName,a.namespaceURI))):N=a;else if(k===jg||k===Yg){if(j===k)return N.nodeValue!==a.nodeValue&&(N.nodeValue=a.nodeValue),N;N=a}}if(N===a)v(n);else{if(a.isSameNode&&a.isSameNode(N))return;if(_(N,a,h),b)for(var K=0,J=b.length;K<J;K++){var ae=g[b[K]];ae&&w(ae,ae.parentNode,!1)}}return!h&&N!==n&&n.parentNode&&(N.actualize&&(N=N.actualize(n.ownerDocument||rn)),n.parentNode.replaceChild(N,n)),N}}var lE=aE(XA),tf=lE;var iE={locale:"en",duration:400,ease:"cubic-bezier(0.19, 1, 0.22, 1)",disabled:!1,respectReducedMotion:!0};function u0(e,t,n){if(n<1){let s=t*Math.sqrt(1-n*n);return 1-Math.exp(-n*t*e)*(Math.cos(s*e)+n*t/s*Math.sin(s*e))}let a=Math.sqrt(n*n-1),l=-t*(n+a),i=-t*(n-a),o=-l/(i-l);return 1-(1-o)*Math.exp(l*e)-o*Math.exp(i*e)}function oE(e,t,n){let a=0;for(let l=0;l<10;l+=.001)if(Math.abs(u0(l,e,t)-1)>n)a=0;else if(a+=.001,a>.1)return Math.ceil((l-a+.001)*1e3);return Math.ceil(10*1e3)}function sE(e,t){if(typeof e=="object"){let n=rE(e);return{ease:n.easing,duration:n.duration}}return{ease:e,duration:t}}var Ig=new Map;function rE(e){let{stiffness:t=100,damping:n=10,mass:a=1,precision:l=.001}=e??{},i=`${t}:${n}:${a}:${l}`,o=Ig.get(i);if(o)return o;let s=Math.sqrt(t/a),r=n/(2*Math.sqrt(t*a)),d=oE(s,r,l),u=Math.min(100,Math.max(32,Math.round(d/15))),p=[];for(let c=0;c<u;c++){let v=c/(u-1)*(d/1e3),S=c===u-1?1:u0(v,s,r);p.push(Math.round(S*1e4)/1e4+"")}for(;p.length>2&&p[p.length-2]==="1";)p.splice(p.length-2,1);let f={easing:`linear(${p.join(", ")})`,duration:d};return Ig.set(i,f),f}function Eu(e,t){let n=e.length,a=t.length,l=Array.from({length:n+1},()=>Array(a+1).fill(0));for(let d=n-1;d>=0;d--)for(let u=a-1;u>=0;u--)l[d][u]=e[d]===t[u]?l[d+1][u+1]+1:Math.max(l[d+1][u],l[d][u+1]);let i=[],o=[],s=0,r=0;for(;s<n&&r<a;)e[s]===t[r]?(i.push(s),o.push(r),s++,r++):l[s+1][r]>=l[s][r+1]?s++:r++;return[i,o]}var uE="\0n",cE=0;function lf(){return`${uE}${cE++}`}function pa(e){return e>="0"&&e<="9"}function Tu(e){for(let t of e)if(pa(t))return!0;return!1}function Vg(e){let t="";for(let n of e)!pa(n)&&!gf.includes(n)&&(t+=n);return t}var gf=".,'\xA0\u202F\u2009\u2007",dE="+-\u2212(#",fE=`%.,!?:;)"'\u201D\u2019`,pE=new RegExp("\\p{Sc}","u");function Xg(e,t){return t.includes(e)||pE.test(e)}function c0(e){let t=0,n=e.length;for(;t<n&&Xg(e[t],dE);)t++;for(;n>t&&Xg(e[n-1],fE);)n--;if(t>=n||!pa(e[t])||!pa(e[n-1]))return!1;for(let a=t;a<n;a++){let l=e[a];if(!pa(l)&&!gf.includes(l))return!1}return!0}function vf(e){return pa(e)?"digit":"symbol"}var Kg=new Map;function mE(e){let t=String(e),n=Kg.get(t);if(n)return n;let a=".";try{a=new Intl.NumberFormat(e).formatToParts(1.1).find(l=>l.type==="decimal")?.value??"."}catch{}return Kg.set(t,a),a}function of(e,t,n,a="."){let l=e.split("");if(!t||t.length===0)return hE(l);let i=t.map(d=>d.string==="\xA0"?" ":d.string),o=n!=null?gE(i,l,n,a):vE(i,l,a),s=new Set;for(let[,d]of o)s.add(t[d].id);let r=[];for(let d=0;d<l.length;d++){let u=l[d],p=vf(u),f=u===" "?"\xA0":u;if(o.has(d)){let c=o.get(d);r.push({id:t[c].id,string:f,kind:p})}else{let c=lf();for(;s.has(c);)c=lf();s.add(c),r.push({id:c,string:f,kind:p})}}return r}function hE(e){return e.map(t=>({id:lf(),string:t===" "?"\xA0":t,kind:vf(t)}))}function gE(e,t,n,a){let l=new Map,i=Qg(e,a),o=Qg(t,a),s=(f,c)=>l.set(o[f],i[c]),r=0;for(;r<o.length&&o[r]<n;)r++;let d=o.length-i.length;if(d>0){let f=r-d;for(let c=0;c<f&&c<i.length;c++)s(c,c);for(let c=r;c<o.length;c++){let v=c-d;v>=0&&v<i.length&&s(c,v)}}else if(d<0){for(let f=0;f<r&&f<o.length;f++)s(f,f);for(let f=r;f<o.length;f++){let c=f-d;c>=0&&c<i.length&&s(f,c)}}else for(let f=0;f<o.length;f++)t[o[f]]===e[i[f]]&&s(f,f);let u=Zg(e,a),p=Zg(t,a);for(let f=1;f<=u.length&&f<=p.length;f++){let c=u[u.length-f],v=p[p.length-f];e[c]===t[v]&&l.set(v,c)}return l}function d0(e,t){return e!==t&&gf.includes(e)}function Qg(e,t){let n=[];for(let a=0;a<e.length;a++)d0(e[a],t)||n.push(a);return n}function Zg(e,t){let n=[];for(let a=0;a<e.length;a++)d0(e[a],t)&&n.push(a);return n}function vE(e,t,n){let a=new Map,l=0;for(;l<e.length&&l<t.length&&e[l]===t[l]&&!pa(e[l]);)a.set(l,l),l++;let i=e.length,o=t.length;for(;i>l&&o>l&&e[i-1]===t[o-1]&&!pa(e[i-1]);)a.set(o-1,i-1),i--,o--;let s=Pg(e,l,i,n),r=Pg(t,l,o,n),d=Jg(e,l,s),u=Jg(t,l,r);if(d>0&&u>0&&Math.abs(d-u)>=yE)return a;if(!f(l,s,l,r,!0))for(let c=1;s-c>=l&&r-c>=l;c++)p(s-c,r-c);if(s<i&&r<o){a.set(r,s);for(let c=1;s+c<i&&r+c<o;c++)p(s+c,r+c);f(s+1,i,r+1,o,!1)}function p(c,v){let S=e[c];pa(S)||S===t[v]&&a.set(v,c)}function f(c,v,S,y,m){let h=Fg(e,c,v),g=Fg(t,S,y);if(h.length===g.length||!m){let T=Math.min(h.length,g.length);for(let O=0;O<T;O++){let E=h[O],_=g[O];e[E]===t[_]&&a.set(_,E)}return!1}let b=h.map(T=>e[T]).reverse(),M=g.map(T=>t[T]).reverse(),[$,w]=Eu(b,M);for(let T=0;T<$.length;T++){let O=h[h.length-1-$[T]],E=g[g.length-1-w[T]];a.set(E,O)}return $.length>0}return a}function Fg(e,t,n){let a=[];for(let l=t;l<n;l++)pa(e[l])&&a.push(l);return a}var yE=3;function Jg(e,t,n){let a=0;for(let l=t;l<n;l++)pa(e[l])&&a++;return a}function Pg(e,t,n,a){for(let l=n-1;l>=t;l--)if(e[l]===a)return l;return n}function f0(){let e=new Set;return{reserve(t){e.add(t)},has(t){return e.has(t)},take(t){if(!e.has(t))return e.add(t),t;let n=1;for(;e.has(`${t}~${n}`);)n++;let a=`${t}~${n}`;return e.add(a),a}}}function bE(e){let t=[],n=[],a=()=>{n.length!==0&&(t.push({word:n.map(l=>l.string).join(""),segments:n}),n=[])};for(let l of e)l.string==="\xA0"||l.string===`
|
|
50
|
-
`?a():n.push(l);return a(),t}function Wg(e){let t=[],n=[],a=()=>{if(n.length===0)return;let l=n.map(i=>i.string).join("");c0(l)?t.push(...of(l)):t.push(...n),n=[]};for(let l of e)l.string==="\xA0"||l.string===`
|
|
51
|
-
`?(a(),t.push(l)):n.push(l);return a(),t}function sf(e,t,n=!0){let a=e.includes(`
|
|
52
|
-
`),l=e.includes(" ")||a,i=f0();if(a){let s=e.split(`
|
|
53
|
-
`),r=[],d=0;return s.forEach((u,p)=>{p>0&&(r.push({id:i.take(`newline-${d}`),string:`
|
|
54
|
-
`}),d+=1),u.length>0&&r.push(...e0(u,t,!0,d,i)),d+=u.length}),n?Wg(r):r}let o=e0(e,t,l,0,i);return n?Wg(o):o}function e0(e,t,n,a,l){if(typeof Intl.Segmenter<"u"){let i=new Intl.Segmenter(t,{granularity:n?"word":"grapheme"});return SE(i.segment(e)[Symbol.iterator](),a,l)}return AE(e,n,a,l)}function SE(e,t,n){let a=[];for(let l of Array.from(e)){let i=t+l.index;l.segment===" "?a.push({id:n.take(`space-${i}`),string:"\xA0"}):a.push({id:p0(l.segment,i,n),string:l.segment})}return a}function p0(e,t,n){return n.has(e)?n.take(`${e}-${t}`):n.take(e)}function AE(e,t,n,a){let l=t?e.split(" "):e.split(""),i=[],o=n;return l.forEach((s,r)=>{t&&r>0&&(i.push({id:a.take(`space-${o}`),string:"\xA0"}),o+=1),i.push({id:p0(s,o,a),string:s}),o+=s.length}),i}var wu="torph-root",rf="torph-item",Na="torph-id",uf="torph-kind",po="torph-slot",$i="torph-exiting",xs="torph-sr",cf="torph-debug",Au="empty",EE={linear:[0,0,1,1],ease:[.25,.1,.25,1],"ease-in":[.42,0,1,1],"ease-out":[0,0,.58,1],"ease-in-out":[.42,0,.58,1]},t0=(e,t,n)=>{let a=1-n;return 3*a*a*n*e+3*a*n*n*t+n*n*n};function n0(e,t,n,a){return l=>{if(l<=0)return 0;if(l>=1)return 1;let i=0,o=1;for(let s=0;s<24;s+=1){let r=(i+o)/2;t0(e,n,r)<l?i=r:o=r}return t0(t,a,(i+o)/2)}}function TE(e){let t=[...e];(t[0]===null||t[0]===void 0)&&(t[0]=0),t[t.length-1]===null&&(t[t.length-1]=1);for(let n=1;n<t.length;n+=1){if(t[n]!==null)continue;let a=n;for(;t[a]===null;)a+=1;let l=t[n-1],i=(t[a]-l)/(a-n+1);for(let o=n;o<a;o+=1)t[o]=l+i*(o-n+1)}return t.map((n,a,l)=>a===0?n:Math.max(n,l[a-1]))}function wE(e){let t=[],n=[];for(let l of e.split(",")){let i=l.trim().split(/\s+/).filter(Boolean),o=Number(i[0]);if(!Number.isFinite(o))return null;let s=i.slice(1);if(s.length>2)return null;if(s.length===0){t.push(o),n.push(null);continue}for(let r of s){if(!r.endsWith("%"))return null;let d=Number(r.slice(0,-1));if(!Number.isFinite(d))return null;t.push(o),n.push(d/100)}}if(t.length<2)return null;let a=TE(n);return l=>{if(l<=a[0])return t[0];let i=a.length-1;if(l>=a[i])return t[i];let o=0;for(;o<i&&a[o+1]<l;)o+=1;let s=a[o+1]-a[o];return s===0?t[o+1]:t[o]+(t[o+1]-t[o])*(l-a[o])/s}}function ME(e){let t=e.trim().toLowerCase(),n=EE[t];if(n)return n0(...n);let a=/^cubic-bezier\(([^)]*)\)$/.exec(t);if(a){let i=a[1].split(",").map(o=>Number(o.trim()));return i.length!==4||i.some(o=>!Number.isFinite(o))?null:n0(i[0],i[1],i[2],i[3])}let l=/^linear\(([^)]*)\)$/.exec(t);return l?wE(l[1]):null}var nf=1e-4;function m0(e,t){let n=Math.min(Math.max(t,0),1-nf);return(e(n+nf)-e(n))/nf}function df(e,t){return e*t}function $u(e){let t=getComputedStyle(e).transform;if(!t||t==="none")return{tx:0,ty:0};let n=t.match(/matrix\(([^)]+)\)/);if(!n)return{tx:0,ty:0};let a=n[1].split(",").map(Number);return{tx:a[4]||0,ty:a[5]||0}}function yf(e){let t=getComputedStyle(e),n=parseFloat(t.width),a=parseFloat(t.height);if(Number.isNaN(n)||Number.isNaN(a)){let l=e.getBoundingClientRect();return{width:l.width,height:l.height}}return{width:n,height:a}}function bf(e){let{tx:t,ty:n}=$u(e),a=Number(getComputedStyle(e).opacity)||1;return e.getAnimations().forEach(l=>l.cancel()),{tx:t,ty:n,opacity:a}}var $E=8,_E=.1,RE=.5,CE=.5,h0=()=>performance.now();function OE(e,t){let n=Math.max(0,Math.min($E,t)-m0(e,0));if(!(n>0))return{curve:e,k:0};let a=Math.max(3,Math.ceil(n/(Math.E*_E))-1);return{curve:l=>l>=1?1:e(l)+n*l*Math.pow(1-l,a),k:n}}function NE(e,t){let n=Math.min(120,Math.max(32,Math.round(t/8))),a=[];for(let l=0;l<n;l+=1){let i=l/(n-1),o=l===n-1?1:e(i);a.push(`${Math.round(o*1e4)/1e4}`)}return`linear(${a.join(", ")})`}function a0(e,t,n,a,l,i,o,s){let r=(f,c,v,S,y)=>{let m=e.animate([{[t]:`${f}px`},{[t]:`${c}px`}],{duration:i,easing:v,fill:"both"});return y!==void 0&&(m.currentTime=y),{anim:m,from:f,to:c,easing:v,curve:S,startedAt:h0()-(y??0)}};if(l&&l.elapsed!==null&&Math.abs(l.to-a)<CE)return r(l.from,l.to,l.easing,l.curve,l.elapsed);let d=a-n,u=o,p=s;if(s&&Math.abs(d)>RE){let f=OE(s,(l?.velocity??0)*i/d);f.k>0&&(p=f.curve,u=NE(f.curve,i))}return r(n,a,u,p)}function l0(e,t){let n=e.anim.currentTime===null,a=h0()-e.startedAt,l=n||!Number.isFinite(a)||a>=t||a<0?null:a;return{from:e.from,to:e.to,easing:e.easing,curve:e.curve,elapsed:l,velocity:l===null||!e.curve?0:(e.to-e.from)*m0(e.curve,l/t)/t}}var el=new WeakMap;function DE(e){return el.get(e)?.snapshot()}function Mu(e){e.style.width="",e.style.height="",e.style.transitionProperty=""}function g0(e){let t=el.get(e);t&&(el.delete(e),t.stop(),t.onCancel?.())}function xE(e){let t=el.get(e);t&&(el.delete(e),t.stop()),Mu(e)}function zE(e,t,n,a,l,i,o){let s=DE(e);if(g0(e),t===0||n===0){Mu(e),o?.();return}e.style.transitionProperty="none",e.style.width="",e.style.height="",e.offsetWidth;let{width:r,height:d}=yf(e),u=ME(l),p=a0(e,"width",t,r,s?.width,a,l,u),f=a0(e,"height",n,d,s?.height,a,l,u),c=()=>{p.anim.cancel(),f.anim.cancel()};p.anim.onfinish=()=>{el.delete(e),c(),Mu(e),i?.()},el.set(e,{stop:c,onCancel:o,snapshot:()=>({width:l0(p,a),height:l0(f,a)})})}function LE(e,t,n,a,l,i){g0(e),e.style.transitionProperty="none",e.style.width=`${t}px`,e.style.height=`${n}px`;let o=setTimeout(()=>{el.delete(e),Mu(e),l?.()},a),s=r=>({from:r,to:r,easing:"linear",curve:null,elapsed:null,velocity:0});el.set(e,{stop:()=>clearTimeout(o),onCancel:i,snapshot:()=>({width:s(t),height:s(n)})})}function af(e){let t=Array.from(e.children),n={},a=e.getBoundingClientRect();return t.forEach((l,i)=>{if(l.hasAttribute($i)||l.hasAttribute(xs)||l.tagName==="BR")return;let o=l.getAttribute(Na)||`child-${i}`,s=l.getBoundingClientRect(),{tx:r,ty:d}=$u(l);n[o]={x:s.left-a.left-r,y:s.top-a.top-d}}),n}function i0(e,t,n){let a=e[n],l=t[n];return!a||!l?{dx:0,dy:0}:{dx:a.x-l.x,dy:a.y-l.y}}function v0(e,t,n,a="backward-first"){let[l,i]=a==="backward-first"?["backward","forward"]:["forward","backward"],o=s=>{if(s==="backward"){for(let r=e-1;r>=0;r--)if(n.has(t[r]))return t[r]}else for(let r=e+1;r<t.length;r++)if(n.has(t[r]))return t[r];return null};return o(l)??o(i)}function kE(e,t,n,a){let l=new Set(n.filter((o,s)=>a.has(o)&&!t.has(e[s]))),i=new Map;for(let o=0;o<e.length;o++){let s=e[o];t.has(s)&&i.set(s,v0(o,n,l,"forward-first"))}return i}function UE(e,t){let{dx:n,dy:a,duration:l,ease:i,scale:o}=t;e.animate({transform:o?`translate(${n}px, ${a}px) scale(0.95)`:`translate(${n}px, ${a}px)`,offset:1},{duration:l,easing:i,fill:"both"});let s=e.animate({opacity:0,offset:1},{duration:df(l,.25),easing:"linear",fill:"both"});s.onfinish=()=>e.remove()}function BE(e,t){let{deltaX:n,deltaY:a,isNew:l,duration:i,ease:o}=t,s=bf(e),r=n+s.tx,d=a+s.ty,u=l&&s.opacity>=1?0:s.opacity;e.animate([{transform:`translate(${r}px, ${d}px) scale(${l?.95:1})`},{transform:"none"}],{duration:i,easing:o,fill:"both"}),u<1&&e.animate([{opacity:u},{opacity:1}],{duration:df(i,l?.5:.25),delay:l?df(i,.25):0,easing:"linear",fill:"both"})}function qE(e,t){let n=0,a=0;for(let l=e;l&&l!==t;l=l.offsetParent)n+=l.offsetLeft,a+=l.offsetTop;return{x:n,y:a}}function ff(e,t){let n=document.createElement(e);return n.setAttribute(rf,""),n.setAttribute(Na,t),n.setAttribute("aria-hidden","true"),n}function HE(e,t){let n=new Map;for(let a of t){if(a.tagName==="BR")continue;let{x:l,y:i}=qE(a,e),{tx:o,ty:s}=$u(a),{width:r,height:d}=yf(a),u=Number(getComputedStyle(a).opacity)||1;a.getAnimations().forEach(p=>p.cancel()),n.set(a,{left:l+o,top:i+s,width:r,height:d,opacity:u})}for(let a=t.length-1;a>=0;a--)t[a].tagName==="BR"&&(t[a].remove(),t.splice(a,1));t.forEach(a=>{let l=n.get(a);a.setAttribute($i,""),a.style.position="absolute",a.style.pointerEvents="none",a.style.left=`${l.left}px`,a.style.top=`${l.top}px`,a.style.width=`${l.width}px`,a.style.height=`${l.height}px`,a.style.opacity=String(l.opacity)})}function GE(e,t){if(t.size===0)return;let n=Array.from(e.children),a=new Set;for(let l of n){if(l.hasAttribute($i))continue;let i=l.getAttribute(Na);if(!i||a.has(i))continue;let o=t.get(i);if(o){a.add(i);for(let s of o){let r=ff("span",s.id);pf(r,s),l.before(r)}l.remove()}}}function pf(e,t){if(!t.kind){e.removeAttribute(uf),e.removeAttribute(po),e.textContent=t.string;return}e.setAttribute(uf,t.kind),e.setAttribute(po,"");let n=e.firstElementChild;n||(e.textContent="",n=document.createElement("span"),e.appendChild(n)),n.textContent=t.string}function y0(e){return e.hasAttribute(po)?e.firstElementChild??e:e}function jE(e,t,n,a){let l=new Map;t.forEach(i=>{let o=i.getAttribute(Na);n.has(o)&&!i.hasAttribute($i)&&(l.set(o,i),i.remove())}),Array.from(e.childNodes).forEach(i=>{i.nodeType===Node.TEXT_NODE&&i.remove()}),a.forEach(i=>{let o=l.get(i.id);if(o&&l.delete(i.id),i.string===`
|
|
55
|
-
`){o&&o.tagName==="BR"?e.appendChild(o):e.appendChild(ff("br",i.id));return}if(o&&o.tagName!=="BR")o.style.transformOrigin="",pf(o,i),e.appendChild(o);else{let s=ff("span",i.id);pf(s,i),e.appendChild(s)}})}var YE=.45,IE=.25;function VE(e,t){let{dx:n,dy:a,slideDistance:l,duration:i,ease:o}=t,s=y0(e);e.animate({transform:`translate(${n}px, ${a}px)`,offset:1},{duration:i,easing:o,fill:"both"}),s.animate({transform:`translate(0px, ${l}px)`,offset:1},{duration:i,easing:o,fill:"both"});let r=s.animate({opacity:0,offset:1},{duration:i*YE,easing:"linear",fill:"both"});r.onfinish=()=>e.remove()}function XE(e,t){let{deltaX:n,deltaY:a,slideDistance:l,kind:i,duration:o,ease:s}=t;b0(e,{deltaX:n,deltaY:a,duration:o,ease:s});let r=y0(e),d=bf(r),u=i==="digit"?-l:l;r.animate({transform:`translate(0px, ${d.ty+u}px)`,offset:0},{duration:o,easing:s,fill:"both"});let p=d.opacity>=1?0:d.opacity;p<1&&r.animate([{opacity:p},{opacity:1}],{duration:o*IE,easing:"linear",fill:"both"})}function b0(e,t){let{deltaX:n,deltaY:a,duration:l,ease:i}=t,{tx:o,ty:s}=$u(e);e.getAnimations().forEach(u=>u.cancel());let r=n+o,d=a+s;r===0&&d===0||e.animate({transform:`translate(${r}px, ${d}px)`,offset:0},{duration:l,easing:i,fill:"both"})}var KE=6,S0=.8,QE=.45,ZE=.35;function A0(e){let t=e.map(r=>r.getBoundingClientRect()),n=Math.min(...t.map(r=>r.left)),a=Math.max(...t.map(r=>r.right)),l=Math.min(...t.map(r=>r.top)),i=Math.max(...t.map(r=>r.bottom)),o=(n+a)/2,s=(l+i)/2;return t.map(r=>`${o-r.left}px ${s-r.top}px`)}function FE(e,t){let{duration:n,ease:a}=t,l=A0(e);e.forEach((i,o)=>{i.getAnimations().forEach(r=>r.cancel()),i.style.transformOrigin=l[o],i.animate({transform:`scale(${S0})`,offset:1},{duration:n,easing:a,fill:"both"});let s=i.animate({opacity:0,offset:1},{duration:n*QE,easing:"linear",fill:"both"});s.onfinish=()=>i.remove()})}function JE(e,t){let{duration:n,ease:a}=t,l=A0(e);e.forEach((i,o)=>{let s=bf(i);i.style.transformOrigin=l[o],i.animate({transform:`scale(${S0})`,offset:0},{duration:n,easing:a,fill:"both"});let r=s.opacity>=1?0:s.opacity;i.animate([{opacity:r},{opacity:1}],{duration:n*ZE,easing:"linear",fill:"both"})})}function o0(e,t){let n=[],a=[],l=()=>{a.length>=KE&&n.push(a),a=[]};for(let i of e)t.has(i)?a.push(i):l();return l(),n}var PE="\0#";function s0(e,t){if(e.segments.length!==1||e.word.length<=1)return e.segments;let n=e.segments[0],a=e.word.split("").map((l,i)=>({id:`${n.id}:${i}`,string:l}));return t.set(n.id,a),a}function WE(e){return e.map(t=>({...t,kind:t.kind??vf(t.string)}))}function eT(e,t){if(e.length===0||t.length===0)return 0;let[n]=Eu(e.split(""),t.split(""));return n.length/Math.max(e.length,t.length)}function r0(e,t){let n=[],a=0;for(let l=0;l<e;l++)n.push(a),t.has(l)&&a++;return n}var tT=.4;function nT(e,t){return(Tu(e)||Tu(t))&&Vg(e)===Vg(t)?1:eT(e,t)}var aT=2500,lT=1e6;function iT(e,t,n,a={}){let l=t.includes(" "),i=t.includes(`
|
|
56
|
-
`),o=bE(e),s=a.numbers!==!1,r=z=>s&&c0(z),d=z=>r(z)?PE:z,u=s&&(Tu(t)||o.some(z=>Tu(z.word)));if(o.length<=1&&!l&&!i&&!u)return{segments:sf(t,n,s),splits:new Map};let p=[],f=[],c=t.split(/( |\n)/),v=[];for(let z of c)z===" "||z===`
|
|
57
|
-
`?v.push(z):z.length>0&&(f.push(v),p.push(z),v=[]);let S=v,y=o.map(z=>z.word);if(y.length*p.length>lT)return{segments:sf(t,n,s),splits:new Map};let[m,h]=Eu(y.map(d),p.map(d)),g=new Set(m),b=new Set(h),M=new Map;for(let z=0;z<h.length;z++)M.set(h[z],m[z]);let $=y.map((z,L)=>L).filter(z=>!g.has(z)),w=p.map((z,L)=>L).filter(z=>!b.has(z)),T=new Set;for(let z of w)for(let L of $)if(!T.has(L)&&d(p[z])===d(y[L])){M.set(z,L),T.add(L);break}T.size>0&&($=$.filter(z=>!T.has(z)),w=w.filter(z=>!M.has(z)));let O=new Map,E=new Set,_=r0(y.length,g),C=r0(p.length,b);if($.length*w.length<=aT)for(let z of w){let L=-1,B=tT;for(let X of $){if(E.has(X)||_[X]!==C[z])continue;let P=nT(y[X],p[z]);P>B&&(B=P,L=X)}L>=0&&(O.set(z,L),E.add(L))}let N=p.map((z,L)=>{let B=M.get(L),X=B??O.get(L);return X===void 0?{mode:"fresh"}:r(z)?{mode:"number",oi:X}:B!==void 0?{mode:"reuse",oi:X}:{mode:"morph",oi:X}}),k=N.filter(z=>z.mode==="number").length===1?a.cursorIndex:void 0,j=mE(n),K=f0();for(let z of N){if(z.mode==="fresh")continue;let L=o[z.oi];if(z.mode!=="reuse"&&L.segments.length===1){let B=L.segments[0];for(let X=0;X<L.word.length;X++)K.reserve(`${B.id}:${X}`)}else for(let B of L.segments)K.reserve(B.id)}let J=[],ae=new Map,q=0;function U(z){for(let L of z)L===`
|
|
58
|
-
`?J.push({id:K.take(`newline-${q}`),string:`
|
|
59
|
-
`}):J.push({id:K.take(`space-${q}`),string:"\xA0"}),q++}for(let z=0;z<p.length;z++){U(f[z]??(z>0?[" "]:[]));let L=N[z],B=p[z];if(L.mode==="reuse")for(let X of o[L.oi].segments)J.push(X);else if(L.mode==="number"){let X=o[L.oi];J.push(...of(B,WE(s0(X,ae)),k===void 0?void 0:k-q,j))}else if(L.mode==="morph"){let X=o[L.oi],P=X.word,he=s0(X,ae),Le=P.split(""),Te=B.split(""),[Xt,nt]=Eu(Le,Te),zt=new Map;for(let Ke=0;Ke<nt.length;Ke++){let Qa=he[Xt[Ke]];Qa&&zt.set(nt[Ke],Qa)}for(let Ke=0;Ke<Te.length;Ke++)if(zt.has(Ke)){let Qa=zt.get(Ke);J.push({id:Qa.id,string:Te[Ke]})}else J.push({id:K.take(`${B}~${Ke}`),string:Te[Ke]})}else r(B)?J.push(...of(B)):J.push({id:K.take(B),string:B});q+=B.length}return U(S),{segments:J,splits:ae}}var oT=`
|
|
60
|
-
[${wu}] {
|
|
61
|
-
display: inline-block;
|
|
62
|
-
position: relative;
|
|
63
|
-
vertical-align: top;
|
|
64
|
-
will-change: width, height;
|
|
65
|
-
white-space: nowrap;
|
|
66
|
-
text-align: inherit;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
[${rf}]:not(br) {
|
|
70
|
-
display: inline-block;
|
|
71
|
-
position: relative;
|
|
72
|
-
will-change: opacity, transform;
|
|
73
|
-
transform: none;
|
|
74
|
-
opacity: 1;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
/*
|
|
78
|
-
* The value once as plain text \u2014 every other child is an aria-hidden fragment.
|
|
79
|
-
* Out of flow, because the engine measures every child of the root. Clipped
|
|
80
|
-
* rather than display: none, which would take it out of the a11y tree as well.
|
|
81
|
-
* user-select: none, or a copied selection pastes the value twice.
|
|
82
|
-
*/
|
|
83
|
-
[${xs}] {
|
|
84
|
-
position: absolute;
|
|
85
|
-
width: 1px;
|
|
86
|
-
height: 1px;
|
|
87
|
-
margin: -1px;
|
|
88
|
-
padding: 0;
|
|
89
|
-
border: 0;
|
|
90
|
-
overflow: hidden;
|
|
91
|
-
clip-path: inset(50%);
|
|
92
|
-
white-space: pre;
|
|
93
|
-
-webkit-user-select: none;
|
|
94
|
-
user-select: none;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
/*
|
|
98
|
-
* A digit slides a whole line box to arrive, so it needs its own box to hide
|
|
99
|
-
* behind. Not the root: that spans every line, so clipping there leaves a digit
|
|
100
|
-
* on a middle line sliding over its neighbour in view. The transform sits on the
|
|
101
|
-
* child, so the slide never touches the slot's rect and the FLIP pass stays
|
|
102
|
-
* oblivious. clip-path, not overflow \u2014 an inline-block whose overflow is
|
|
103
|
-
* anything but visible has its baseline synthesized to the bottom margin edge
|
|
104
|
-
* (CSS 2.1 \xA710.8.1), and engines disagree on whether overflow: clip counts.
|
|
105
|
-
* The inline axis stays open so glyph overhang is not shaved.
|
|
106
|
-
*/
|
|
107
|
-
[${po}] {
|
|
108
|
-
clip-path: inset(0 -100vw);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
[${po}] > span {
|
|
112
|
-
display: inline-block;
|
|
113
|
-
will-change: opacity, transform;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
/*
|
|
117
|
-
* Softens the clip above into a gradient, positionally rather than on a timer, so
|
|
118
|
-
* it stays in step with the slide at any duration. The band (--torph-fade, 0 for a
|
|
119
|
-
* hard edge) must eat into the box: the clip trims at the border box, so a ramp
|
|
120
|
-
* reaching past it sits in territory already removed and is never seen. no-clip
|
|
121
|
-
* plus repeat-x is what carries the profile across glyph overhang.
|
|
122
|
-
*/
|
|
123
|
-
@supports (mask-clip: no-clip) or (-webkit-mask-clip: no-clip) {
|
|
124
|
-
[${po}] {
|
|
125
|
-
--torph-mask: linear-gradient(
|
|
126
|
-
to bottom,
|
|
127
|
-
transparent,
|
|
128
|
-
#000 var(--torph-fade, 0.15em),
|
|
129
|
-
#000 calc(100% - var(--torph-fade, 0.15em)),
|
|
130
|
-
transparent
|
|
131
|
-
);
|
|
132
|
-
-webkit-mask-image: var(--torph-mask);
|
|
133
|
-
mask-image: var(--torph-mask);
|
|
134
|
-
-webkit-mask-repeat: repeat-x;
|
|
135
|
-
mask-repeat: repeat-x;
|
|
136
|
-
-webkit-mask-clip: no-clip;
|
|
137
|
-
mask-clip: no-clip;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
[${wu}][${cf}] {
|
|
142
|
-
outline: 2px solid magenta;
|
|
143
|
-
[${rf}] {
|
|
144
|
-
outline: 2px solid cyan;
|
|
145
|
-
outline-offset: -4px;
|
|
146
|
-
}
|
|
147
|
-
}`,Ll=null,mf=0;function sT(){mf++,!Ll&&(Ll=document.createElement("style"),Ll.dataset.torph="true",Ll.textContent=oT,document.head.appendChild(Ll))}function rT(){mf--,!(mf>0||!Ll)&&(Ll.remove(),Ll=null)}function uT(){if(typeof window>"u")return{prefersReducedMotion:!1,destroy:()=>{}};let e=window.matchMedia("(prefers-reduced-motion: reduce)"),t={prefersReducedMotion:e.matches,destroy:a};function n(l){t.prefersReducedMotion=l.matches}function a(){e.removeEventListener("change",n)}return e.addEventListener("change",n),t}var zs=class hf{instance=null;lastText="";lastCursorIndex;configKey="";attach(t,n){this.instance?.destroy(),this.instance=new dT({element:t,...n}),this.configKey=hf.serializeConfig(n),this.lastText!==""&&this.instance.update(this.lastText,this.lastCursorIndex)}update(t,n){this.lastText=t,this.lastCursorIndex=n,this.instance?.update(t,n)}needsRecreate(t){return hf.serializeConfig(t)!==this.configKey}destroy(){this.instance?.destroy(),this.instance=null}static serializeConfig(t){return JSON.stringify({ease:t.ease,duration:t.duration,locale:t.locale,scale:t.scale,numbers:t.numbers,decimals:t.decimals,debug:t.debug,disabled:t.disabled,respectReducedMotion:t.respectReducedMotion})}},E0="span",cT={...iE,debug:!1,scale:!0,numbers:!0},dT=class{element;options={};data;currentMeasures={};prevMeasures={};previousSegments=[];isInitialRender=!0;reducedMotion=null;srNode=null;hasSetup=!1;constructor(e){let t=Object.fromEntries(Object.entries(e).filter(([,o])=>o!==void 0)),{ease:n,...a}={...cT,...t},{ease:l,duration:i}=sE(n,a.duration);this.options={...a,ease:l,duration:i},this.element=e.element,this.options.respectReducedMotion&&(this.reducedMotion=uT()),this.data="",this.isDisabled()||this.setup()}setup(){this.hasSetup||(this.hasSetup=!0,this.element.setAttribute(wu,""),this.options.debug&&this.element.setAttribute(cf,""),sT())}destroy(){this.reducedMotion?.destroy(),xE(this.element),this.element.getAnimations().forEach(e=>e.cancel()),this.srNode?.remove(),this.srNode=null,this.element.removeAttribute(wu),this.element.removeAttribute(cf),this.hasSetup&&(this.hasSetup=!1,rT())}isDisabled(){return!!(this.options.disabled||this.reducedMotion?.prefersReducedMotion)}update(e,t){let n=typeof e=="number"?e.toLocaleString(this.options.locale,{minimumFractionDigits:this.options.decimals,maximumFractionDigits:this.options.decimals}):e;if(n!==this.data){if(this.data=n,this.isDisabled()){typeof n=="string"&&(this.srNode=null,this.element.textContent=n,this.previousSegments=[],this.isInitialRender=!0);return}if(this.setup(),this.data instanceof HTMLElement)throw new Error("HTMLElement not yet supported");this.options.onAnimationStart&&!this.isInitialRender&&this.options.onAnimationStart(),this.createTextGroup(this.data,this.element,t)}}createTextGroup(e,t,n){let{width:a,height:l}=yf(t),i=this.options.numbers!==!1;this.syncAccessibleText(e);let o,s;if(this.previousSegments.length>0){let b=iT(this.previousSegments,e,this.options.locale,{numbers:i,cursorIndex:n});o=b.segments,s=b.splits}else o=sf(e,this.options.locale,i),s=new Map;let r=o.length===0;r&&(o=[{id:Au,string:"\u200B"}]),GE(t,s),this.prevMeasures=af(this.element);let d=Array.from(t.children).filter(b=>!b.hasAttribute(xs)),u=new Set(o.map(b=>b.id)),p=d.filter(b=>!u.has(b.getAttribute(Na))&&!b.hasAttribute($i)),f=new Set(p),c=d.map(b=>b.getAttribute(Na)),v=kE(d,f,c,u);HE(t,p),jE(t,d,u,o),this.currentMeasures=af(this.element);let S=o.reduce((b,M)=>M.string===`
|
|
148
|
-
`?b+1:b,1),y=(t.offsetHeight||20*S)/S;t.style.width=`${a}px`,t.offsetWidth;let m=af(this.element);t.style.width="",this.updateStyles(o,m,y);let h=this.isInitialRender?[]:o0(d,new Set(p)),g=new Set(h.flat());for(let b of h)FE(b,{duration:this.options.duration,ease:this.options.ease});if(p.forEach(b=>{if(this.isInitialRender||b.getAttribute(Na)===Au){b.remove();return}if(g.has(b))return;let M=v.get(b),{dx:$,dy:w}=M?i0(this.currentMeasures,this.prevMeasures,M):{dx:0,dy:0};b.hasAttribute(uf)?VE(b,{dx:$,dy:w,slideDistance:y,duration:this.options.duration,ease:this.options.ease}):UE(b,{dx:$,dy:w,duration:this.options.duration,ease:this.options.ease,scale:this.options.scale})}),this.previousSegments=o,this.isInitialRender){this.isInitialRender=!1,t.style.width="",t.style.height="";return}r?LE(t,a,l,this.options.duration,this.options.onAnimationComplete,this.options.onAnimationCancel):zE(t,a,l,this.options.duration,this.options.ease,this.options.onAnimationComplete,this.options.onAnimationCancel)}updateStyles(e,t,n){if(this.isInitialRender)return;let a=Array.from(this.element.children).filter(u=>!u.hasAttribute(xs)),l=e.map(u=>u.id),i=new Map(e.map(u=>[u.id,u.kind])),o=a.filter(u=>!u.hasAttribute($i)&&u.tagName!=="BR"&&u.getAttribute(Na)!==Au),s=new Set(o.filter(u=>!this.prevMeasures[u.getAttribute(Na)])),r=new Set;for(let u of o0(o,s))u.forEach(p=>r.add(p)),JE(u,{duration:this.options.duration,ease:this.options.ease});let d=new Set(l.filter(u=>this.prevMeasures[u]));a.forEach((u,p)=>{if(u.hasAttribute($i)||u.tagName==="BR"||r.has(u))return;let f=u.getAttribute(Na)||`child-${p}`;if(f===Au)return;let c=!this.prevMeasures[f],v=c?v0(e.findIndex(h=>h.id===f),l,d):f,{dx:S,dy:y}=v?i0(this.prevMeasures,t,v):{dx:0,dy:0},m=i.get(f);m&&c?XE(u,{deltaX:S,deltaY:y,slideDistance:n,kind:m,duration:this.options.duration,ease:this.options.ease}):m?b0(u,{deltaX:S,deltaY:y,duration:this.options.duration,ease:this.options.ease}):BE(u,{deltaX:S,deltaY:y,isNew:c,duration:this.options.duration,ease:this.options.ease})})}syncAccessibleText(e){if(!this.srNode||this.srNode.parentNode!==this.element){let t=document.createElement("span");t.setAttribute(xs,""),this.element.prepend(t),this.srNode=t}this.srNode.textContent=e}};var ma=Pa(tl(),1);function CT(e){return typeof e=="number"?e:U0(e)}function U0(e){if(typeof e=="string")return e;if(typeof e=="number")return String(e);if(!e||typeof e=="boolean")return"";if(Array.isArray(e))return e.map(U0).join("");throw ma.default.isValidElement(e)?new Error("TextMorph only accepts text content. Found a React element \u2014 use strings, numbers, or expressions instead."):new Error(`TextMorph received an unsupported child of type "${typeof e}".`)}function OT(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}var B0=({children:e,cursorIndex:t,className:n,style:a,as:l=E0,...i})=>{let{ref:o,update:s}=NT(i),r=CT(e),d=ma.default.useRef(t);d.current=t;let u=ma.default.useRef({__html:OT(String(r)).replace(/\n/g,"<br>")});return ma.default.useEffect(()=>{s(r,d.current)},[r,s]),ma.default.createElement(l,{ref:o,className:n,style:a,dangerouslySetInnerHTML:u.current})};function NT(e){let t=ma.default.useRef(null),n=ma.default.useRef(new zs),a=zs.serializeConfig(e),l=ma.default.useRef(e);l.current=e,ma.default.useEffect(()=>{let o=n.current;return t.current&&o.attach(t.current,{...e,onAnimationStart:()=>l.current.onAnimationStart?.(),onAnimationComplete:()=>l.current.onAnimationComplete?.()}),()=>{o.destroy()}},[a]);let i=ma.default.useCallback((o,s)=>{n.current.update(o,s)},[]);return{ref:t,update:i}}var Me=Pa(tl(),1),L2=Pa(VS(),1);var tt=Pa(tl(),1),H=Pa(tl(),1),Ve=Pa(Th(),1),jh=Pa(tl(),1),a$=Pa(Th(),1);function Ch(e){let t=e.match(/^#([0-9a-f]{3,8})$/i);if(t){let a=t[1];return a.length===3&&(a=a[0]+a[0]+a[1]+a[1]+a[2]+a[2]),[parseInt(a.slice(0,2),16),parseInt(a.slice(2,4),16),parseInt(a.slice(4,6),16)]}let n=e.match(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/);return n?[+n[1],+n[2],+n[3]]:[128,128,128]}function md(e,t,n,a){return`rgba(${e}, ${t}, ${n}, ${a})`}function Oh(e,t){let[n,a,l]=Ch(e),i=t==="dark";return{line:e,lineWidth:2,fillTop:md(n,a,l,i?.12:.08),fillBottom:md(n,a,l,0),gridLine:i?"rgba(255, 255, 255, 0.06)":"rgba(0, 0, 0, 0.06)",gridLabel:i?"rgba(255, 255, 255, 0.4)":"rgba(0, 0, 0, 0.35)",dotUp:"#22c55e",dotDown:"#ef4444",dotFlat:e,glowUp:"rgba(34, 197, 94, 0.18)",glowDown:"rgba(239, 68, 68, 0.18)",glowFlat:md(n,a,l,.12),badgeOuterBg:i?"rgba(40, 40, 40, 0.95)":"rgba(255, 255, 255, 0.95)",badgeOuterShadow:i?"rgba(0, 0, 0, 0.4)":"rgba(0, 0, 0, 0.15)",badgeBg:e,badgeText:"#ffffff",dashLine:md(n,a,l,.4),refLine:i?"rgba(255, 255, 255, 0.15)":"rgba(0, 0, 0, 0.12)",refLabel:i?"rgba(255, 255, 255, 0.45)":"rgba(0, 0, 0, 0.4)",timeLabel:i?"rgba(255, 255, 255, 0.35)":"rgba(0, 0, 0, 0.3)",crosshairLine:i?"rgba(255, 255, 255, 0.2)":"rgba(0, 0, 0, 0.12)",tooltipBg:i?"rgba(30, 30, 30, 0.95)":"rgba(255, 255, 255, 0.95)",tooltipText:i?"#e5e5e5":"#1a1a1a",tooltipBorder:i?"rgba(255, 255, 255, 0.1)":"rgba(0, 0, 0, 0.08)",bgRgb:i?[10,10,10]:[255,255,255],labelFont:'11px "SF Mono", Menlo, Monaco, "Cascadia Code", monospace',valueFont:'600 11px "SF Mono", Menlo, monospace',badgeFont:'500 11px "SF Mono", Menlo, monospace'}}var ms=["#3b82f6","#ef4444","#22c55e","#f59e0b","#8b5cf6","#ec4899","#06b6d4","#f97316"];function G3(e,t){let n=new Map;for(let a=0;a<e.length;a++){let l=e[a],i=l.color||ms[a%ms.length];n.set(l.id,Oh(i,t))}return n}function ze(e,t,n,a=16.67){let l=1-Math.pow(1-n,a/16.67);return e+(t-e)*l}function vd(e,t,n,a){let l=1/0,i=-1/0;for(let d of e)d.value<l&&(l=d.value),d.value>i&&(i=d.value);t<l&&(l=t),t>i&&(i=t),n!==void 0&&(n<l&&(l=n),n>i&&(i=n));let o=i-l,s=a?.01:.12,r=o*(a?.02:.1)||(a?.04:.4);if(o<r){let d=(l+i)/2;l=d-r/2,i=d+r/2}else{let d=o*s;l-=d,i+=d}return{min:l,max:i}}function ZS(e,t=20){if(e.length<5)return"flat";let n=Math.max(0,e.length-t),a=1/0,l=-1/0;for(let p=n;p<e.length;p++){let f=e[p].value;f<a&&(a=f),f>l&&(l=f)}let i=l-a;if(i===0)return"flat";let o=Math.max(n,e.length-5),s=e[o].value,d=e[e.length-1].value-s,u=i*.12;return d>u?"up":d<-u?"down":"flat"}function y2(e,t){if(e.length===0)return null;if(t<=e[0].time)return e[0].value;if(t>=e[e.length-1].time)return e[e.length-1].value;let n=0,a=e.length-1;for(;a-n>1;){let r=n+a>>1;e[r].time<=t?n=r:a=r}let l=e[n],i=e[a],o=i.time-l.time;if(o===0)return l.value;let s=(t-l.time)/o;return l.value+(i.value-l.value)*s}function j3(){return typeof window>"u"?1:Math.min(window.devicePixelRatio||1,3)}function Y3(e,t,n,a){e.setTransform(t,0,0,t,0,0),e.clearRect(0,0,n,a)}function I3(e,t,n,a){if(a>0){let o=a*t;if(o>=n*.5&&o<=n*4)return a}let l=[[2,2.5,2],[2,2,2.5],[2.5,2,2]],i=1/0;for(let o of l){let s=Math.pow(10,Math.ceil(Math.log10(e))),r=0;for(;s/o[r%3]*t>=n;)s/=o[r%3],r++;s<i&&(i=s)}return i===1/0?e/5:i}function V3(e,t){let n=e/t;return Math.abs(n-Math.round(n))<.01}var FS=.18,X3=.12;function xh(e,t,n,a,l,i){let{w:o,h:s,pad:r,valRange:d,minVal:u,maxVal:p,toY:f}=t,c=s-r.top-r.bottom;if(c<=0||d<=0)return;let v=c/d,S=I3(d,v,36,l.interval);l.interval=S;let y=S/2,m=y*v,h=m<40?0:m>=60?1:(m-40)/20,g=32,b=T=>{let O=Math.min(T-r.top,s-r.bottom-T);return O>=g?1:O<=0?0:O/g},M=new Map,$=Math.ceil(u/y)*y;for(let T=$;T<=p;T+=y){let O=f(T);if(O<r.top-2||O>s-r.bottom+2)continue;let _=(V3(T,S)?1:h)*b(O),C=Math.round(T*1e3);M.set(C,_)}for(let[T,O]of l.labels){let E=M.get(T)??0,_=E>=O?FS:X3,C=ze(O,E,_,i);Math.abs(C-E)<.02&&(C=E),C<.01&&E===0?l.labels.delete(T):l.labels.set(T,C)}for(let[T,O]of M)l.labels.has(T)||l.labels.set(T,O*FS);let w=e.globalAlpha;e.setLineDash([1,3]),e.lineWidth=1,e.font=n.labelFont,e.textAlign="left";for(let[T,O]of l.labels){if(O<.02)continue;let E=T/1e3,_=f(E);_<r.top-10||_>s-r.bottom+10||(e.save(),e.globalAlpha=w*O,e.strokeStyle=n.gridLine,e.beginPath(),e.moveTo(r.left,_),e.lineTo(o-r.right,_),e.stroke(),e.fillStyle=n.gridLabel,e.fillText(a(E),o-r.right+8,_+4),e.restore())}e.setLineDash([])}function yd(e,t){if(t.length<2)return;if(t.length===2){e.lineTo(t[1][0],t[1][1]);return}let n=t.length,a=new Array(n-1),l=new Array(n-1);for(let o=0;o<n-1;o++)l[o]=t[o+1][0]-t[o][0],a[o]=l[o]===0?0:(t[o+1][1]-t[o][1])/l[o];let i=new Array(n);i[0]=a[0],i[n-1]=a[n-2];for(let o=1;o<n-1;o++)a[o-1]*a[o]<=0?i[o]=0:i[o]=(a[o-1]+a[o])/2;for(let o=0;o<n-1;o++)if(a[o]===0)i[o]=0,i[o+1]=0;else{let s=i[o]/a[o],r=i[o+1]/a[o],d=s*s+r*r;if(d>9){let u=3/Math.sqrt(d);i[o]=u*s*a[o],i[o+1]=u*r*a[o]}}for(let o=0;o<n-1;o++){let s=l[o];e.bezierCurveTo(t[o][0]+s/3,t[o][1]+i[o]*s/3,t[o+1][0]-s/3,t[o+1][1]-i[o+1]*s/3,t[o+1][0],t[o+1][1])}}var zh=.07,Lh=.001;function kh(e,t,n,a){return t+n*(Math.sin(e*9.4+a)*.55+Math.sin(e*15.7+a*1.3)*.3+Math.sin(e*4.2+a*.7)*.15)}function Uh(e){return .22+.08*Math.sin(e/1200*Math.PI)}function JS(e){let t=e.match(/^#([0-9a-f]{3,8})$/i);if(t){let l=t[1];return l.length===3&&(l=l[0]+l[0]+l[1]+l[1]+l[2]+l[2]),[parseInt(l.slice(0,2),16),parseInt(l.slice(2,4),16),parseInt(l.slice(4,6),16),1]}let n=e.match(/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)/);if(n)return[+n[1],+n[2],+n[3],+n[4]];let a=e.match(/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/);return a?[+a[1],+a[2],+a[3],1]:[128,128,128,1]}function K3(e,t,n){if(n<=0)return e;if(n>=1)return t;let[a,l,i,o]=JS(e),[s,r,d,u]=JS(t),p=Math.round(a+(s-a)*n),f=Math.round(l+(r-l)*n),c=Math.round(i+(d-i)*n),v=o+(u-o)*n;return v>=.995?`rgb(${p},${f},${c})`:`rgba(${p},${f},${c},${v.toFixed(3)})`}function wh(e,t,n,a,l,i=1,o=1,s){let{h:r,pad:d}=t,u=e.globalAlpha;if(l&&o>.01){e.globalAlpha=u*o;let p=e.createLinearGradient(0,d.top,0,r-d.bottom);p.addColorStop(0,n.fillTop),p.addColorStop(1,n.fillBottom),e.beginPath(),e.moveTo(a[0][0],r-d.bottom),e.lineTo(a[0][0],a[0][1]),yd(e,a),e.lineTo(a[a.length-1][0],r-d.bottom),e.closePath(),e.fillStyle=p,e.fill()}e.globalAlpha=u*i,e.beginPath(),e.moveTo(a[0][0],a[0][1]),yd(e,a),e.strokeStyle=s??n.line,e.lineWidth=n.lineWidth,e.lineJoin="round",e.lineCap="round",e.stroke(),e.globalAlpha=u}function Bh(e,t,n,a,l,i,o,s,r=0,d=1,u=0,p=1,f=!1,c=1){let{h:v,pad:S,toX:y,toY:m,chartW:h,chartH:g}=t,b=e.globalAlpha,M=S.top,$=v-S.bottom,w=L=>Math.max(M,Math.min($,L)),T=S.top+g/2,O=g*zh,E=u*Lh,_=d<1?(L,B)=>{let X=Math.max(0,Math.min(1,(B-S.left)/h)),P=Math.abs(X-.5)*2,he=Math.max(0,Math.min(1,(d-P*.4)/.6)),Le=kh(X,T,O,E);return Le+(L-Le)*he}:(L,B)=>L,C=a.map((L,B)=>{let X=y(L.time),P=B===a.length-1?_(w(m(l)),X):_(w(m(L.value)),X);return[X,P]}),N=y(i),k=S.left+h,j=d<1?N+(k-N)*(1-d):N;if(C.push([j,_(w(m(l)),j)]),C.length<2)return;let K=1,J=c;if(d<1){let L=Uh(u);K=L+(1-L)*d,J=d*c}let ae=Math.min(1,d*3)*p,q=d<1||p<1?K3(n.gridLabel,n.line,ae):void 0,U=s!==null;if(e.save(),e.beginPath(),e.rect(S.left-1,S.top,h+2,g),e.clip(),U?(e.save(),e.beginPath(),e.rect(0,0,s,v),e.clip(),wh(e,t,n,C,o,K,J,q),e.restore(),e.save(),e.beginPath(),e.rect(s,0,t.w-s,v),e.clip(),e.globalAlpha=b*(1-r*.6),wh(e,t,n,C,o,K,J,q),e.restore()):wh(e,t,n,C,o,K,J,q),e.restore(),!f){let L=Math.max(S.top,Math.min(v-S.bottom,m(l))),B=d<1?T+(L-T)*d:L;e.setLineDash([4,4]),e.strokeStyle=n.dashLine,e.lineWidth=1;let X=U?1-r*.2:1;e.globalAlpha=b*(d<1?X*d:X),e.beginPath(),e.moveTo(S.left,B),e.lineTo(t.w-S.right,B),e.stroke(),e.setLineDash([])}e.globalAlpha=b;let z=C[C.length-1];return z[1]=Math.max(10,Math.min(v-10,z[1])),C}var b2=1500,S2=900;function Q3(e,t,n){let a=Math.round(e[0]+(t[0]-e[0])*n),l=Math.round(e[1]+(t[1]-e[1])*n),i=Math.round(e[2]+(t[2]-e[2])*n);return`rgb(${a},${l},${i})`}function A2(e,t,n,a,l=!0,i=0,o=performance.now()){let s=e.globalAlpha,r=i*.7;if(l&&r<.3){let u=o%b2/S2;if(u<1){let p=9+u*12,f=.35*(1-u)*(1-r*3);e.beginPath(),e.arc(t,n,p,0,Math.PI*2),e.strokeStyle=a.line,e.lineWidth=1.5,e.globalAlpha=s*f,e.stroke()}}let d=Ch(a.badgeOuterBg);if(e.save(),e.globalAlpha=s,e.shadowColor=a.badgeOuterShadow,e.shadowBlur=6*(1-r),e.shadowOffsetY=1,e.beginPath(),e.arc(t,n,6.5,0,Math.PI*2),e.fillStyle=a.badgeOuterBg,e.fill(),e.restore(),e.globalAlpha=s,e.beginPath(),e.arc(t,n,3.5,0,Math.PI*2),r>.01){let u=Ch(a.line);e.fillStyle=Q3(u,d,r)}else e.fillStyle=a.line;e.fill()}function Z3(e,t,n,a,l=!0,i=performance.now(),o=3){let s=e.globalAlpha;if(l){let r=i%b2/S2;if(r<1){let d=9+r*10,u=.3*(1-r);e.beginPath(),e.arc(t,n,d,0,Math.PI*2),e.strokeStyle=a,e.lineWidth=1.5,e.globalAlpha=s*u,e.stroke()}}e.globalAlpha=s,e.beginPath(),e.arc(t,n,o,0,Math.PI*2),e.fillStyle=a,e.fill()}function F3(e,t,n,a,l=3){e.beginPath(),e.arc(t,n,l,0,Math.PI*2),e.fillStyle=a,e.fill()}function J3(e,t,n,a,l,i,o,s=performance.now()){let r=e.globalAlpha,d=a==="up"?1:0,u=a==="down"?1:0,p=i.down<.02,f=i.up<.02;i.up=ze(i.up,p?d:0,d>i.up?.08:.04,o),i.down=ze(i.down,f?u:0,u>i.down?.08:.04,o),i.up<.01&&(i.up=0),i.down<.01&&(i.down=0),i.up>.99&&(i.up=1),i.down>.99&&(i.down=1);let c=s%1400/1400,v=(S,y)=>{if(y<.01)return;let m=t+19,h=n;e.save(),e.strokeStyle=l.gridLabel,e.lineWidth=2.5,e.lineCap="round",e.lineJoin="round";for(let g=0;g<2;g++){let b=g*.2,M=.35,$=c-b,T=.3+.7*($>=0&&$<M?Math.sin($/M*Math.PI):0);e.globalAlpha=r*y*T;let O=S===-1?-3:3,E=h+S*(g*8-4)+O;e.beginPath(),e.moveTo(m-5,E-S*3.5),e.lineTo(m,E),e.lineTo(m+5,E-S*3.5),e.stroke()}e.restore()};v(-1,i.up),v(1,i.down),e.globalAlpha=r}function P3(e,t,n,a,l,i,o,s,r,d,u,p){if(r<.01)return;let{h:f,pad:c,toY:v}=t,S=v(l);e.save(),e.globalAlpha=r*.5,e.strokeStyle=n.crosshairLine,e.lineWidth=1,e.beginPath(),e.moveTo(a,c.top),e.lineTo(a,f-c.bottom),e.stroke(),e.restore();let y=4*Math.min(r*3,1);if(y>.5&&(e.globalAlpha=1,e.beginPath(),e.arc(a,S,y,0,Math.PI*2),e.fillStyle=n.line,e.fill()),r<.1||t.w<300)return;let m=o(l),h=s(i),g=" \xB7 ";e.save(),e.globalAlpha=r,e.font='400 13px "SF Mono", Menlo, monospace';let b=e.measureText(m).width,M=e.measureText(g).width,$=e.measureText(h).width,w=b+M+$,T=a-w/2,O=c.left+4,_=(u!=null?u+7:t.w-c.right)-w;T<O&&(T=O),T>_&&(T=_);let C=c.top+(d??14)+10;e.textAlign="left",p&&(e.strokeStyle=n.tooltipBg,e.lineWidth=3,e.lineJoin="round",e.strokeText(m,T,C),e.strokeText(g+h,T+b,C)),e.fillStyle=n.tooltipText,e.fillText(m,T,C),e.fillStyle=n.gridLabel,e.fillText(g+h,T+b,C),e.restore()}function W3(e,t,n,a,l,i,o,s,r,d,u,p){if(r<.01||i.length===0)return;let{h:f,pad:c,toY:v}=t;e.save(),e.globalAlpha=r*.5,e.strokeStyle=n.crosshairLine,e.lineWidth=1,e.beginPath(),e.moveTo(a,c.top),e.lineTo(a,f-c.bottom),e.stroke(),e.restore();let S=4*Math.min(r*3,1);if(S>.5){e.globalAlpha=1;for(let C of i){let N=v(C.value);e.beginPath(),e.arc(a,N,S,0,Math.PI*2),e.fillStyle=C.color,e.fill()}}if(r<.1||t.w<300)return;e.save(),e.globalAlpha=r,e.font='400 13px "SF Mono", Menlo, monospace',e.textAlign="left";let y=s(l),m=" \xB7 ",h=" ",g=[{text:y,color:n.gridLabel}];for(let C of i){g.push({text:m,color:n.gridLabel}),g.push({text:h,color:C.color,isDot:!0});let N=C.label?`${C.label} `:"";N&&g.push({text:N,color:n.gridLabel}),g.push({text:o(C.value),color:n.tooltipText})}let b=0,M=[];for(let C of g){let N=C.isDot?12:e.measureText(C.text).width;M.push(N),b+=N}let $=a-b/2,w=c.left+4,O=(p!=null?p+7:t.w-c.right)-b;$<w&&($=w),$>O&&($=O);let E=c.top+(d??14)+10;if(u!==!1){e.strokeStyle=n.tooltipBg,e.lineWidth=3,e.lineJoin="round";let C=$;for(let N=0;N<g.length;N++){let k=g[N];k.isDot||e.strokeText(k.text,C,E),C+=M[N]}}let _=$;for(let C=0;C<g.length;C++){let N=g[C];N.isDot?(e.beginPath(),e.arc(_+4,E-4,3.5,0,Math.PI*2),e.fillStyle=N.color,e.fill()):(e.fillStyle=N.color,e.fillText(N.text,_,E)),_+=M[C]}e.restore()}function E2(e,t,n,a){let{w:l,h:i,pad:o,toY:s,chartW:r}=t,d=s(a.value);if(d<o.top-10||d>i-o.bottom+10)return;let u=a.label??"";if(u){e.font="500 11px system-ui, sans-serif";let p=e.measureText(u).width,f=o.left+r/2,c=8;e.strokeStyle=n.refLine,e.lineWidth=1,e.beginPath(),e.moveTo(o.left,d),e.lineTo(f-p/2-c,d),e.stroke(),e.beginPath(),e.moveTo(f+p/2+c,d),e.lineTo(l-o.right,d),e.stroke(),e.fillStyle=n.refLabel,e.textAlign="center",e.fillText(u,f,d+4)}else e.strokeStyle=n.refLine,e.lineWidth=1,e.setLineDash([4,4]),e.beginPath(),e.moveTo(o.left,d),e.lineTo(l-o.right,d),e.stroke(),e.setLineDash([])}function e5(e){return e<=15?2:e<=30?5:e<=60?10:e<=120?15:e<=300?30:e<=600?60:e<=1800?300:e<=3600?600:e<=14400?1800:e<=43200?3600:e<=86400?7200:e<=604800?86400:604800}var t5=.08;function qh(e,t,n,a,l,i,o,s){let{h:r,pad:d,leftEdge:u,rightEdge:p,toX:f}=t,c=d.left,v=t.w-d.right,S=v-c,y=50,m=C=>{let N=C-c,k=v-C,j=Math.min(N,k);return j>=y?1:j<=0?0:j/y};e.font=n.labelFont;let h=S/l,g=e5(l);for(;g*h<60&&g<l;)g*=2;let b=g>=86400,M;if(b){let C=new Date((u-g)*1e3);C.setHours(0,0,0,0),M=C.getTime()/1e3}else M=Math.ceil((u-g)/g)*g;let $=new Set;for(let C=M;C<=p+g&&$.size<30;C+=g)$.add(Math.round(C*100));for(let C of $){let N=i(C/100),k=o.labels.get(C);k?k.text=N:o.labels.set(C,{alpha:0,text:N})}for(let[C,N]of o.labels){let k=f(C/100),K=$.has(C)?m(k):0,J=ze(N.alpha,K,t5,s);Math.abs(J-K)<.02&&(J=K),J<.01&&K===0?o.labels.delete(C):N.alpha=J}let w=e.globalAlpha,T=r-d.bottom,O=5;e.strokeStyle=n.gridLine,e.lineWidth=1,e.beginPath(),e.moveTo(c,T),e.lineTo(v,T),e.stroke(),e.textAlign="center";let E=[];for(let[C,N]of o.labels){if(N.alpha<.02)continue;let k=f(C/100);if(k<c-20||k>v)continue;let j=e.measureText(N.text).width;E.push({x:k,alpha:N.alpha,text:N.text,w:j})}E.sort((C,N)=>C.x-N.x);let _=[];for(let C of E){let N=C.x-C.w/2;if(_.length>0){let k=_[_.length-1],j=k.x+k.w/2;if(N<j+8){C.alpha>k.alpha&&(_[_.length-1]=C);continue}}_.push(C)}for(let C of _)e.save(),e.globalAlpha=w*C.alpha,e.strokeStyle=n.gridLine,e.lineWidth=1,e.beginPath(),e.moveTo(C.x,T),e.lineTo(C.x,T+O),e.stroke(),e.fillStyle=n.timeLabel,e.fillText(C.text,C.x,T+O+14),e.restore()}var n5=[34,197,94],a5=[239,68,68];function l5(){return{labels:[],spawnTimer:0,smoothSpeed:Nh,prevBidTotal:0,prevAskTotal:0,churnRate:0}}var i5=50,PS=6,WS=40,o5=22,Nh=60,s5=160;function r5(e,t,n){let a=Math.round(e[0]+(t[0]-e[0])*n),l=Math.round(e[1]+(t[1]-e[1])*n),i=Math.round(e[2]+(t[2]-e[2])*n);return`rgb(${a},${l},${i})`}function u5(e,t,n,a,l,i,o){let{pad:s,h:r,chartH:d}=t,u=l/1e3;if(a.bids.length===0&&a.asks.length===0)return;let p=0,f=0,c=0;for(let[,k]of a.bids)f+=k,k>p&&(p=k);for(let[,k]of a.asks)c+=k,k>p&&(p=k);if(p===0)return;let v=f+c,S=i.prevBidTotal+i.prevAskTotal,y=0;if(S>0){let k=Math.abs(f-i.prevBidTotal)+Math.abs(c-i.prevAskTotal);y=Math.min(k/S,1)}i.prevBidTotal=f,i.prevAskTotal=c;let m=y>i.churnRate?.3:.05;i.churnRate+=(y-i.churnRate)*m;let h=Math.max(Math.min(o*5,1),i.churnRate),g=Nh+h*(s5-Nh),b=1-Math.pow(.95,l/16.67);i.smoothSpeed+=(g-i.smoothSpeed)*b;let M=i.smoothSpeed,$=s.left+8,w=r-s.bottom-6,T=s.top,O=n.bgRgb;for(i.spawnTimer+=l;i.spawnTimer>=WS&&i.labels.length<i5;){i.spawnTimer-=WS;let k=!1;for(let U=0;U<i.labels.length;U++)if(Math.abs(i.labels[U].y-w)<o5){k=!0;break}if(k)break;let j=[];for(let[,U]of a.bids)j.push({size:U,green:!0});for(let[,U]of a.asks)j.push({size:U,green:!1});let K=0;for(let U of j)K+=U.size;let J=Math.random()*K,ae=j[0];for(let U of j)if(J-=U.size,J<=0){ae=U;break}let q=ae.size/p;i.labels.push({y:w,text:`+ ${c5(ae.size)}`,green:ae.green,life:PS,maxLife:PS,intensity:.5+q*.5})}let E=w-T,_=0;for(let k=0;k<i.labels.length;k++){let j=i.labels[k];if(j.life-=u,j.life<=0)continue;let K=E>0?(j.y-T)/E:1;j.y-=M*(.7+.3*K)*u,!(j.y<T-14)&&(i.labels[_++]=j)}i.labels.length=_;let C=e.globalAlpha;e.save(),e.font='600 13px "SF Mono", Menlo, monospace',e.textAlign="left",e.textBaseline="middle",e.globalAlpha=C;let N=`rgb(${O[0]},${O[1]},${O[2]})`;for(let k=0;k<i.labels.length;k++){let j=i.labels[k],K=j.life/j.maxLife,J=Math.min((1-K)*10,1),ae=(j.y-T)/d,q=ae<.45?ae/.45:1,U=j.intensity*J*q,z=j.green?n5:a5,L=r5(z,O,1-U);e.strokeStyle=N,e.lineWidth=4,e.lineJoin="round",e.strokeText(j.text,$,j.y),e.fillStyle=L,e.fillText(j.text,$,j.y)}e.restore()}function c5(e){return e>=10?`$${Math.round(e)}`:e>=1?`$${e.toFixed(1)}`:`$${e.toFixed(2)}`}function d5(){return{particles:[],cooldown:0,burstCount:0}}var f5=80,p5=1,m5=400,h5=.08,g5=3;function v5(e,t,n,a,l,i,o,s){if(e.cooldown=Math.max(0,e.cooldown-o),t==="flat"||e.cooldown>0)return 0;if(l<h5)return e.burstCount=0,0;if(t==="down"&&s?.downMomentum!==!0||e.burstCount>=g5)return 0;e.cooldown=m5;let r=s?.scale??1,d=t==="up",u=Math.min(l*5,1),p=u>.6?1:[1,.6,.35][e.burstCount]??.35;e.burstCount++;let f=Math.round((12+u*20)*r*p),c=1+u*.8;for(let v=0;v<f&&e.particles.length<f5;v++){let S=d?-Math.PI/2:Math.PI/2,y=Math.PI*1.2,m=S+(Math.random()-.5)*y,h=(60+Math.random()*100)*c;e.particles.push({x:n+(Math.random()-.5)*24,y:a+(Math.random()-.5)*8,vx:Math.cos(m)*h,vy:Math.sin(m)*h,life:1,size:(1+Math.random()*1.2)*r*p,color:i})}return p}function y5(e,t,n){if(t.particles.length===0)return;let a=n/1e3;e.save();let l=0;for(let i=0;i<t.particles.length;i++){let o=t.particles[i];o.life-=a/p5,!(o.life<=0)&&(o.x+=o.vx*a,o.y+=o.vy*a,o.vx*=.95,o.vy*=.95,e.globalAlpha=o.life*.55,e.fillStyle=o.color,e.beginPath(),e.arc(o.x,o.y,o.size*(.5+o.life*.5),0,Math.PI*2),e.fill(),t.particles[l++]=o)}t.particles.length=l,e.restore()}var Hh="#22c55e",Gh="#ef4444",Mh=[34,197,94],fs=[239,68,68];function T2(e){let t=Math.round(fs[0]+(Mh[0]-fs[0])*e),n=Math.round(fs[1]+(Mh[1]-fs[1])*e),a=Math.round(fs[2]+(Mh[2]-fs[2])*e);return`rgb(${t},${n},${a})`}function e2(e){let t=e.match(/^#([0-9a-f]{6})$/i);if(t){let a=t[1];return[parseInt(a.slice(0,2),16),parseInt(a.slice(2,4),16),parseInt(a.slice(4,6),16)]}let n=e.match(/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/);return n?[+n[1],+n[2],+n[3]]:[128,128,128]}function b5(e,t,n){if(n<=0)return e;if(n>=1)return t;let[a,l,i]=e2(e),[o,s,r]=e2(t),d=Math.round(a+(o-a)*n),u=Math.round(l+(s-l)*n),p=Math.round(i+(r-i)*n);return`rgb(${d},${u},${p})`}function S5(e,t){let n=e.chartW/(e.rightEdge-e.leftEdge),a=t*n,l=Math.max(1,a*.7),i=Math.max(.8,Math.min(2,l*.15)),o=l>6?1.5:0;return{bodyW:l,wickW:i,radius:o}}function t2(e,t,n,a,l,i){if(i<=0||l<i*2){e.rect(t,n,a,l);return}e.moveTo(t+i,n),e.lineTo(t+a-i,n),e.arcTo(t+a,n,t+a,n+i,i),e.lineTo(t+a,n+l-i),e.arcTo(t+a,n+l,t+a-i,n+l,i),e.lineTo(t+i,n+l),e.arcTo(t,n+l,t,n+l-i,i),e.lineTo(t,n+i),e.arcTo(t,n,t+i,n,i),e.closePath()}function $h(e,t,n,a,l,i,o,s,r=1,d=-1,u,p=0){if(n.length===0)return;let{toX:f,toY:c}=t,{bodyW:v,wickW:S,radius:y}=S5(t,a),m=v/2,h=t.pad.left,g=t.pad.left+t.chartW,b=.12+Math.sin(i*.004)*.08;for(let M of n){let $=f(M.time+a/2);if($+m<h||$-m>g)continue;let w=M.close>=M.open,T=M.time===l,O=T&&d>=0?T2(d):w?Hh:Gh;u&&p>.01&&(O=b5(O,u,p));let E=T?r:1;if(s>.01&&o>0){let J=$-o;if(J>0){let ae=v*1.5,q=Math.min(J/ae,1);E*=1-s*.5*q}}let _=e.globalAlpha;e.globalAlpha=_*E;let C=c(Math.max(M.open,M.close)),N=c(Math.min(M.open,M.close)),k=Math.max(1,N-C),j=c(M.high),K=c(M.low);e.lineCap="round",e.strokeStyle=O,C-j>.5&&(e.beginPath(),e.moveTo($,C),e.lineTo($,j),e.lineWidth=S,e.stroke()),K-N>.5&&(e.beginPath(),e.moveTo($,N),e.lineTo($,K),e.lineWidth=S,e.stroke()),e.fillStyle=O,e.beginPath(),t2(e,$-m,C,v,k,y),e.fill(),T&&(e.save(),e.globalAlpha=_*E*b,e.shadowColor=O,e.shadowBlur=8,e.fillStyle=O,e.beginPath(),t2(e,$-m,C,v,k,y),e.fill(),e.restore()),e.globalAlpha=_}}function A5(e,t,n,a,l,i=-1){let o=t.toY(a.close);if(o<t.pad.top||o>t.h-t.pad.bottom)return;let s=a.close>=a.open,r=i>=0?T2(i):s?Hh:Gh,d=e.globalAlpha;e.save(),e.setLineDash([4,4]),e.strokeStyle=r,e.lineWidth=1,e.globalAlpha=d*(1-l*.3)*.4,e.beginPath(),e.moveTo(t.pad.left,o),e.lineTo(t.w-t.pad.right,o),e.stroke(),e.setLineDash([]),e.restore()}function E5(e,t,n,a,l,i,o,s,r){if(r<.01)return;let{h:d,pad:u}=t;if(e.save(),e.globalAlpha=r*.5,e.strokeStyle=n.crosshairLine,e.lineWidth=1,e.beginPath(),e.moveTo(a,u.top),e.lineTo(a,d-u.bottom),e.stroke(),e.restore(),r<.1||t.w<200)return;let f=l.close>=l.open?Hh:Gh,c=o(l.close),v=s(i);e.save(),e.globalAlpha=r,e.font='400 13px "SF Mono", Menlo, monospace',e.textAlign="left";let S;if(t.w>=400){let w=o(l.open),T=o(l.high),O=o(l.low);S=[{text:"O ",color:n.gridLabel},{text:w,color:f},{text:" H ",color:n.gridLabel},{text:T,color:f},{text:" L ",color:n.gridLabel},{text:O,color:f},{text:" C ",color:n.gridLabel},{text:c,color:f},{text:" \xB7 ",color:n.gridLabel},{text:v,color:n.gridLabel}]}else S=[{text:"C ",color:n.gridLabel},{text:c,color:f},{text:" \xB7 ",color:n.gridLabel},{text:v,color:n.gridLabel}];let y=0,m=[];for(let w of S){let T=e.measureText(w.text).width;m.push(T),y+=T}let h=a-y/2,g=u.left+4,b=t.w-u.right-y;h<g&&(h=g),h>b&&(h=b);let M=u.top+24;e.strokeStyle=n.tooltipBg,e.lineWidth=3,e.lineJoin="round";let $=h;for(let w=0;w<S.length;w++)e.strokeText(S[w].text,$,M),$+=m[w];$=h;for(let w=0;w<S.length;w++)e.fillStyle=S[w].color,e.fillText(S[w].text,$,M),$+=m[w];e.restore()}function T5(e,t,n,a,l,i,o,s,r){if(r<.01)return;let{h:d,pad:u}=t,p=t.toY(l);if(e.save(),e.globalAlpha=r*.5,e.strokeStyle=n.crosshairLine,e.lineWidth=1,e.beginPath(),e.moveTo(a,u.top),e.lineTo(a,d-u.bottom),e.stroke(),e.globalAlpha=r*.3,e.beginPath(),e.moveTo(u.left,p),e.lineTo(t.w-u.right,p),e.stroke(),e.restore(),r<.1||t.w<200)return;let f=o(l),c=s(i);e.save(),e.globalAlpha=r,e.font='400 13px "SF Mono", Menlo, monospace',e.textAlign="left";let v=[{text:f,color:n.line},{text:" \xB7 ",color:n.gridLabel},{text:c,color:n.gridLabel}],S=0,y=[];for(let $ of v){let w=e.measureText($.text).width;y.push(w),S+=w}let m=a-S/2,h=u.left+4,g=t.w-u.right-S;m<h&&(m=h),m>g&&(m=g);let b=u.top+24;e.strokeStyle=n.tooltipBg,e.lineWidth=3,e.lineJoin="round";let M=m;for(let $=0;$<v.length;$++)e.strokeText(v[$].text,M,b),M+=y[$];M=m;for(let $=0;$<v.length;$++)e.fillStyle=v[$].color,e.fillText(v[$].text,M,b),M+=y[$];e.restore()}function Ur(e,t,n,a,l,i=1,o=0,s=!1,r){let d=t-a.left-a.right,u=n-a.top-a.bottom,p=a.top+u/2,f=a.left+d/2,c=r??"No data to display",v=u*zh;e.save(),e.font="400 12px system-ui, -apple-system, sans-serif";let y=e.measureText(c).width/2+20,m=30;if(!s){let $=o*Lh,w=Uh(o),T=32,O=[];for(let E=0;E<=T;E++){let _=E/T,C=a.left+_*d,N=kh(_,p,v,$);O.push([C,N])}e.beginPath(),e.moveTo(O[0][0],O[0][1]),yd(e,O),e.strokeStyle=l.gridLabel,e.lineWidth=l.lineWidth,e.globalAlpha=w*i,e.lineCap="round",e.lineJoin="round",e.stroke()}e.save(),e.globalCompositeOperation="destination-out";let h=f-y-m,g=f+y+m,b=e.createLinearGradient(h,0,g,0);b.addColorStop(0,"rgba(0,0,0,0)"),b.addColorStop(m/(g-h),"rgba(0,0,0,1)"),b.addColorStop(1-m/(g-h),"rgba(0,0,0,1)"),b.addColorStop(1,"rgba(0,0,0,0)"),e.fillStyle=b,e.globalAlpha=i;let M=v*2+l.lineWidth+6;e.fillRect(h,p-M/2,g-h,M),e.restore(),e.textAlign="center",e.textBaseline="middle",e.globalAlpha=.35*i,e.fillStyle=l.gridLabel,e.fillText(c,f,p),e.restore()}var w5=.002,n2=.2,bl=40,yl=5;function M5(){return{amplitude:0}}function $5(e,t,n,a){let l=a.shakeState,i=0,o=0;if(l&&l.amplitude>n2&&(i=(Math.random()-.5)*2*l.amplitude,o=(Math.random()-.5)*2*l.amplitude,e.save(),e.translate(i,o)),l){let v=Math.pow(w5,a.dt/1e3);l.amplitude*=v,l.amplitude<n2&&(l.amplitude=0)}let s=a.chartReveal,r=a.pauseProgress,d=(v,S)=>{let y=Math.max(0,Math.min(1,(s-v)/(S-v)));return y*y*(3-2*y)};if(a.referenceLine&&s>.01&&(e.save(),s<1&&(e.globalAlpha=s),E2(e,t,n,a.referenceLine),e.restore()),a.showGrid){let v=s<1?d(.15,.7):1;v>.01&&(e.save(),v<1&&(e.globalAlpha=v),xh(e,t,n,a.formatValue,a.gridState,a.dt),e.restore())}a.orderbookData&&a.orderbookState&&s>.01&&(e.save(),s<1&&(e.globalAlpha=s),u5(e,t,n,a.orderbookData,a.dt,a.orderbookState,a.swingMagnitude),e.restore());let u=a.scrubAmount>.05?a.hoverX:null,p=Bh(e,t,n,a.visible,a.smoothValue,a.now,a.showFill,u,a.scrubAmount,s,a.now_ms);{let v=s<1?d(.15,.7):1;v>.01&&(e.save(),v<1&&(e.globalAlpha=v),qh(e,t,n,a.windowSecs,a.targetWindowSecs,a.formatTime,a.timeAxisState,a.dt),e.restore())}if(p&&p.length>0){let v=p[p.length-1],S=a.scrubAmount;if(a.hoverX!==null&&S>0){let h=v[0]-a.hoverX,g=Math.min(80,t.chartW*.3);S=h<yl?0:h>=g?a.scrubAmount:(h-yl)/(g-yl)*a.scrubAmount}let y=s<.3?0:(s-.3)/.7,m=a.showPulse&&s>.6&&r<.5;if(y>.01&&(e.save(),y<1&&(e.globalAlpha=y),A2(e,v[0],v[1],n,m,S,a.now_ms),e.restore()),a.showMomentum){let g=(s<1?d(.6,1):1)*(1-r);g>.01&&(e.save(),g<1&&(e.globalAlpha=g),J3(e,v[0],v[1],a.momentum,n,a.arrowState,a.dt,a.now_ms),e.restore())}if(a.particleState&&s>.9){let h=v5(a.particleState,a.momentum,v[0],v[1],a.swingMagnitude,n.line,a.dt,a.particleOptions);h>0&&l&&(l.amplitude=(3+a.swingMagnitude*4)*h),y5(e,a.particleState,a.dt)}}let f=bl;e.save(),e.globalCompositeOperation="destination-out";let c=e.createLinearGradient(t.pad.left,0,t.pad.left+f,0);if(c.addColorStop(0,"rgba(0, 0, 0, 1)"),c.addColorStop(1,"rgba(0, 0, 0, 0)"),e.fillStyle=c,e.fillRect(0,0,t.pad.left+f,t.h),e.restore(),a.hoverX!==null&&a.hoverValue!==null&&a.hoverTime!==null&&p&&p.length>0){let v=p[p.length-1],S=v[0]-a.hoverX,y=Math.min(80,t.chartW*.3),m=S<yl?0:S>=y?a.scrubAmount:(S-yl)/(y-yl)*a.scrubAmount;m>.01&&P3(e,t,n,a.hoverX,a.hoverValue,a.hoverTime,a.formatValue,a.formatTime,m,a.tooltipY,v[0],a.tooltipOutline)}l&&(i!==0||o!==0)&&e.restore()}function _5(e,t,n){let a=n.primaryPalette,l=n.chartReveal,i=(d,u)=>{let p=Math.max(0,Math.min(1,(l-d)/(u-d)));return p*p*(3-2*p)};if(n.referenceLine&&l>.01&&(e.save(),l<1&&(e.globalAlpha=l),E2(e,t,a,n.referenceLine),e.restore()),n.showGrid){let d=l<1?i(.15,.7):1;d>.01&&(e.save(),d<1&&(e.globalAlpha=d),xh(e,t,a,n.formatValue,n.gridState,n.dt),e.restore())}let o=n.scrubAmount>.05?n.hoverX:null,s=[];for(let d=0;d<n.series.length;d++){let u=n.series[d],p=u.alpha??1,c=(d>0&&l<1?Math.min(1,l*2):1)*p;if(c<.01)continue;e.save(),c<1&&(e.globalAlpha=c);let v=Bh(e,t,u.palette,u.visible,u.smoothValue,n.now,!1,o,n.scrubAmount,l,n.now_ms);e.restore(),v&&v.length>0&&s.push({pts:v,palette:u.palette,label:u.label,alpha:p})}{let d=l<1?i(.15,.7):1;d>.01&&(e.save(),d<1&&(e.globalAlpha=d),qh(e,t,a,n.windowSecs,n.targetWindowSecs,n.formatTime,n.timeAxisState,n.dt),e.restore())}if(l>.3&&s.length>0){let d=(l-.3)/.7,u=n.showPulse&&l>.6&&n.pauseProgress<.5;for(let p of s){if(p.alpha<.01)continue;let f=p.pts[p.pts.length-1];e.save(),e.globalAlpha=d*p.alpha,u&&p.alpha>.5?Z3(e,f[0],f[1],p.palette.line,!0,n.now_ms,3):F3(e,f[0],f[1],p.palette.line,3),p.label&&(e.font='600 10px -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif',e.textAlign="left",e.fillStyle=p.palette.line,e.fillText(p.label,f[0]+6,f[1]+3.5)),e.restore()}}e.save(),e.globalCompositeOperation="destination-out";let r=e.createLinearGradient(t.pad.left,0,t.pad.left+bl,0);if(r.addColorStop(0,"rgba(0, 0, 0, 1)"),r.addColorStop(1,"rgba(0, 0, 0, 0)"),e.fillStyle=r,e.fillRect(0,0,t.pad.left+bl,t.h),e.restore(),n.hoverX!==null&&n.hoverTime!==null&&n.hoverEntries.length>0&&s.length>0&&n.scrubAmount>.01){let d=0;for(let c of s){if(c.alpha<.01)continue;let v=c.pts[c.pts.length-1][0];v>d&&(d=v)}let u=d-n.hoverX,p=Math.min(80,t.chartW*.3),f=u<yl?0:u>=p?n.scrubAmount:(u-yl)/(p-yl)*n.scrubAmount;f>.01&&W3(e,t,a,n.hoverX,n.hoverTime,n.hoverEntries,n.formatValue,n.formatTime,f,n.tooltipY,n.tooltipOutline,d)}}function R5(e,t,n,a){let{w:l,h:i,pad:o,chartW:s,chartH:r}=t,d=a.chartReveal,u=a.lineModeProg>=.99,p=u?1-d:(1-d)*(1-d)*(1-d),f=Math.max(a.lineModeProg,p),c=f>.001?a.lineModeProg/f:1,v=($,w)=>{let T=Math.max(0,Math.min(1,(d-$)/(w-$)));return T*T*(3-2*T)},S=v(.25,.6);a.showGrid&&S>.01&&(e.save(),S<1&&(e.globalAlpha=S),xh(e,t,n,a.formatValue,a.gridState,a.dt),e.restore());let y;if(f>.01&&a.lineVisible.length>=2){let $=a.scrubAmount>.05?a.hoverX:null;e.save(),e.globalAlpha=f,y=Bh(e,t,n,a.lineVisible,a.lineSmoothValue,a.now,a.lineModeProg>.01,$,a.scrubAmount,a.chartReveal,a.now_ms,c,!u,a.lineModeProg),e.restore()}let m=v(.4,.8),h=a.closePriceCandle??a.liveCandle;if(h&&m>.01&&(f<.99&&(e.save(),e.globalAlpha=m*(1-f),A5(e,t,n,h,a.scrubAmount,a.liveBullBlend),e.restore()),f>.01&&!u)){let $=t.toY(h.close);$>=o.top&&$<=i-o.bottom&&(e.save(),e.setLineDash([4,4]),e.strokeStyle=n.dashLine,e.lineWidth=1,e.globalAlpha=m*f*(1-a.scrubAmount*.2),e.beginPath(),e.moveTo(o.left,$),e.lineTo(l-o.right,$),e.stroke(),e.setLineDash([]),e.restore())}let g=a.chartReveal*(1-f);if(g>.01){let $=d*d*(3-2*d),w=_=>$>=.99?_:{time:_.time,open:_.close+(_.open-_.close)*$,high:_.close+(_.high-_.close)*$,low:_.close+(_.low-_.close)*$,close:_.close},T=$<.99?a.candles.map(w):a.candles,O=$<.99&&a.oldCandles.length>0?a.oldCandles.map(w):a.oldCandles;e.save(),e.beginPath(),e.rect(o.left-1,o.top,s+2,r),e.clip();let E=f>.01?n.line:void 0;a.morphT>=0&&O.length>0?(e.globalAlpha=(1-a.morphT)*g,$h(e,t,O,a.oldWidth,-1,a.now_ms,a.hoverX??0,a.scrubAmount,1,-1,E,f),e.globalAlpha=a.morphT*g,$h(e,t,T,a.displayCandleWidth,a.liveCandle?.time??-1,a.now_ms,a.hoverX??0,a.scrubAmount,a.liveBirthAlpha,a.liveBullBlend,E,f),e.globalAlpha=1):(g<1&&(e.globalAlpha=g),$h(e,t,T,a.displayCandleWidth,a.liveCandle?.time??-1,a.now_ms,a.hoverX??0,a.scrubAmount,a.liveBirthAlpha,a.liveBullBlend,E,f)),e.restore()}if(f>.5&&y&&y.length>0&&d>.3){let $=y[y.length-1],w=(f-.5)*2*((d-.3)/.7),T=f>.8&&d>.6;w>.01&&(e.save(),e.globalAlpha=w,A2(e,$[0],$[1],n,T,a.scrubAmount,a.now_ms),e.restore())}let b=v(.25,.6);b>.01&&(e.save(),b<1&&(e.globalAlpha=b),qh(e,t,n,a.targetWindowSecs,a.targetWindowSecs,a.formatTime,a.timeAxisState,a.dt),e.restore()),e.save(),e.globalCompositeOperation="destination-out";let M=e.createLinearGradient(o.left,0,o.left+bl,0);if(M.addColorStop(0,"rgba(0, 0, 0, 1)"),M.addColorStop(1,"rgba(0, 0, 0, 0)"),e.fillStyle=M,e.fillRect(0,0,o.left+bl,i),e.restore(),a.showEmptyOverlay){let $=1-a.chartReveal;if($>.01){let w=(1-a.loadingAlpha)*$;w>.01&&Ur(e,l,i,o,n,w,a.now_ms,!0,a.emptyText)}}a.chartReveal>.7&&a.hoveredCandle&&a.hoverX!==null&&a.scrubAmount>.01&&(a.lineModeProg>.5?T5(e,t,n,a.hoverX,a.hoveredCandle.close,a.hoverTime??0,a.formatValue,a.formatTime,a.scrubAmount):E5(e,t,n,a.hoverX,a.hoveredCandle,a.hoverTime??0,a.formatValue,a.formatTime,a.scrubAmount))}function a2(e,t,n,a,l,i,o=1,s){let r=t-a.left-a.right,d=n-a.top-a.bottom,u=a.top+d/2,p=a.left,f=d*zh,c=i*Lh,v=Uh(i),S=32,y=[];for(let m=0;m<=S;m++){let h=m/S,g=p+h*r,b=kh(h,u,f,c);y.push([g,b])}e.save(),e.beginPath(),e.moveTo(y[0][0],y[0][1]),yd(e,y),e.strokeStyle=s??l.line,e.lineWidth=l.lineWidth,e.globalAlpha=v*o,e.lineCap="round",e.lineJoin="round",e.stroke(),e.restore()}function C5(e,t,n,a){let l=t/2,i=n+e-l,o=n+l;return[`M${o},0`,`L${i},0`,`A${l},${l},0,0,1,${i},${t}`,`L${o},${t}`,`C${n+2},${t},3,${l+a},0,${l}`,`C3,${l-a},${n+2},0,${o},0`,"Z"].join(" ")}function O5(e,t){let n=t/2;return[`M${n},0`,`L${e-n},0`,`A${n},${n},0,0,1,${e-n},${t}`,`L${n},${t}`,`A${n},${n},0,0,1,${n},0`,"Z"].join(" ")}var hd=10,_h=3,l2=5,N5=2.5,i2=16,o2="http://www.w3.org/2000/svg",D5=50,w2=.12,x5=.15,z5=.35,L5=.5,k5=.12,M2=750,s2=.05,r2=.015,u2=.001,$2=.2,Rh=[34,197,94],ps=[239,68,68],U5=.14,B5=.09,q5=.12,H5=.08,G5=.22,j5=.14,Y5=.1,gd=.25,I5=300,V5=500,X5=.25,K5=350,c2=.08,d2=.2,f2=.001,Q5=.15,Z5=.2,F5=.015;function p2(e,t,n,a,l,i){let o=Math.abs(e-t),s=a-n||1,r=Math.min(o/s,1);return i?1:l+(1-r)*$2}function m2(e,t,n,a,l,i,o,s,r,d,u){if(t.to!==e.windowSecs){t.from=n,t.to=e.windowSecs,t.startMs=o,t.rangeFromMin=a,t.rangeFromMax=l;let c=s+e.windowSecs*u,v=c-e.windowSecs,S=[];for(let y of r)y.time>=v-2&&y.time<=c&&S.push(y);if(S.length>0){let y=vd(S,d,e.referenceLine?.value,e.exaggerate);t.rangeToMin=y.min,t.rangeToMax=y.max}}let p=0,f;if(i||t.startMs===0)f=e.windowSecs;else{let c=o-t.startMs,S=Math.min(c/M2,1),y=(1-Math.cos(S*Math.PI))/2;p=y;let m=Math.log(t.from),h=Math.log(t.to);f=Math.exp(m+(h-m)*y),S>=1&&(f=e.windowSecs,t.startMs=0,p=0)}return{windowSecs:f,windowTransProgress:p}}function h2(e,t,n,a,l,i,o,s,r,d,u,p){if(!t)return{minVal:e.min,maxVal:e.max,valRange:e.max-e.min||.001,targetMin:e.min,targetMax:e.max,displayMin:e.min,displayMax:e.max,rangeInited:!0};if(o)l=r.rangeFromMin+(r.rangeToMin-r.rangeFromMin)*s,i=r.rangeFromMax+(r.rangeToMax-r.rangeFromMax)*s,n=e.min,a=e.max;else{let f=i-l;n=e.min,a=e.max,l=ze(l,n,d,p),i=ze(i,a,d,p);let c=.5*f/u||.001;Math.abs(l-n)<c&&(l=n),Math.abs(i-a)<c&&(i=a)}return{minVal:l,maxVal:i,valRange:i-l||.001,targetMin:n,targetMax:a,displayMin:l,displayMax:i,rangeInited:!0}}function J5(e,t,n,a,l,i,o,s,r,d,u,p,f,c){let v=null,S=null,y=null,m=!1;if(e!==null&&e>=t.left&&e<=n-t.right){let $=a.toX(l),w=Math.min(e,$),T=u+(w-t.left)/f*(p-u),O=y2(i,T);O!==null&&(v=O,S=T,y=w,m=!0,s={x:w,value:O,time:T},r.onHover?.({time:T,value:O,x:w,y:a.toY(O)}))}let h=m?1:0;d?o=h:(o+=(h-o)*w2,o<.01&&(o=0),o>.99&&(o=1));let g=y,b=v,M=S;return!m&&o>0&&s&&(g=s.x,b=s.value,M=s.time),{hoverX:g,hoverValue:b,hoverTime:M,scrubAmount:o,isActiveHover:m,lastHover:s}}function g2(e,t,n,a,l,i,o,s,r,d,u,p=1){if(!t.showBadge||p<.25)return e.container.style.display="none",i;e.container.style.display="";let f=p<.5?(p-.25)/.25:1;e.container.style.opacity=f<1?String(f):"";let{w:c,h:v,pad:S}=a,y=t.formatValue(n);e.text.textContent=y,e.text.style.font=t.palette.labelFont,e.text.style.lineHeight=`${i2}px`;let m=t.badgeTail?l2:0;e.text.style.padding=`${_h}px ${hd}px ${_h}px ${m+hd}px`,d.font=t.palette.labelFont;let h=y.replace(/[0-9]/g,"8"),g=d.measureText(h).width;e.targetW=g,e.displayW===0&&(e.displayW=g),e.displayW=ze(e.displayW,e.targetW,x5,u),Math.abs(e.displayW-e.targetW)<.3&&(e.displayW=e.targetW);let M=e.displayW+hd*2,$=i2+_h*2,w=m+M;e.svg.setAttribute("width",String(Math.ceil(w))),e.svg.setAttribute("height",String($)),e.svg.setAttribute("viewBox",`0 0 ${w} ${$}`),e.path.setAttribute("d",t.badgeTail?C5(M,$,l2,N5):O5(M,$));let T=S.top+a.chartH/2,O=Math.max(S.top,Math.min(v-S.bottom,a.toY(n))),E=p<1?T+(O-T)*p:O;i===null||r?i=E:i=ze(i,E,s?L5:z5,u);let _=c-S.right+8-hd-m,C=i-$/2;if(e.container.style.transform=`translate3d(${_}px, ${C}px, 0)`,t.badgeVariant==="minimal")e.path.setAttribute("fill",t.palette.badgeOuterBg),e.text.style.color=t.palette.tooltipText,e.container.style.filter=`drop-shadow(0 1px 4px ${t.palette.badgeOuterShadow})`;else{e.container.style.filter="",e.text.style.color="#fff";let N=o,k;if(!t.showMomentum)k=t.palette.line;else{let j=l==="up"?1:l==="down"?0:N.green;N.green=r?j:ze(N.green,j,k5,u),N.green>.99&&(N.green=1),N.green<.01&&(N.green=0);let K=N.green,J=Math.round(ps[0]+(Rh[0]-ps[0])*K),ae=Math.round(ps[1]+(Rh[1]-ps[1])*K),q=Math.round(ps[2]+(Rh[2]-ps[2])*K);k=`rgb(${J},${ae},${q})`}e.path.setAttribute("fill",k)}return i}function Dh(e){let t=1/0,n=-1/0;for(let o of e)o.low<t&&(t=o.low),o.high>n&&(n=o.high);if(!isFinite(t)||!isFinite(n))return{min:99,max:101};let a=n-t,l=a*.12,i=a*.1||.4;if(a<i){let o=(t+n)/2;return{min:o-i/2,max:o+i/2}}return{min:t-l,max:n+l}}function v2(e,t,n,a){let l=a.leftEdge+(t-a.pad.left)/a.chartW*(a.rightEdge-a.leftEdge),i=0,o=e.length-1;for(;i<=o;){let s=i+o>>1,r=e[s];if(l<r.time)o=s-1;else if(l>=r.time+n)i=s+1;else return r}return null}function P5(e,t,n,a,l,i,o,s,r){if(!t)return{minVal:e.min,maxVal:e.max,valRange:e.max-e.min||.001,displayMin:e.min,displayMax:e.max,rangeInited:!0};if(l)n=o.rangeFromMin+(o.rangeToMin-o.rangeFromMin)*i,a=o.rangeFromMax+(o.rangeToMax-o.rangeFromMax)*i;else{let d=a-n||1,u=Math.abs(n-e.min),p=Math.abs(a-e.max),f=Math.min((u+p)/d,1),c=Q5+(1-f)*Z5;n=ze(n,e.min,c,r),a=ze(a,e.max,c,r);let v=.5*d/s||.001;Math.abs(n-e.min)<v&&(n=e.min),Math.abs(a-e.max)<v&&(a=e.max)}return{minVal:n,maxVal:a,valRange:a-n||.001,displayMin:n,displayMax:a,rangeInited:!0}}function W5(e,t,n,a,l,i,o,s,r,d,u){if(t.to!==e){t.from=n,t.to=e,t.startMs=i,t.rangeFromMin=a,t.rangeFromMax=l;let c=o+e*u,v=c-e,S=[];for(let y of s)y.time+d>=v&&y.time<=c&&S.push(y);if(r&&r.time+d>=v&&r.time<=c&&S.push(r),S.length>0){let y=Dh(S);t.rangeToMin=y.min,t.rangeToMax=y.max}}let p=0,f;if(t.startMs===0)f=e;else{let c=i-t.startMs,v=Math.min(c/M2,1),S=(1-Math.cos(v*Math.PI))/2;p=S;let y=Math.log(t.from),m=Math.log(t.to);f=Math.exp(y+(m-y)*S),v>=1&&(f=e,t.startMs=0,p=0)}return{windowSecs:f,windowTransProgress:p}}function e$(e,t,n){let a=(0,H.useRef)(n);a.current=n;let l=(0,H.useRef)(n.value),i=(0,H.useRef)(new Map),o=(0,H.useRef)(new Map),s=(0,H.useRef)(0),r=(0,H.useRef)(0),d=(0,H.useRef)(0),u=(0,H.useRef)(0),p=(0,H.useRef)(!1),f=(0,H.useRef)(n.windowSecs),c=(0,H.useRef)({from:n.windowSecs,to:n.windowSecs,startMs:0,rangeFromMin:0,rangeFromMax:0,rangeToMin:0,rangeToMax:0}),v=(0,H.useRef)({up:0,down:0}),S=(0,H.useRef)({interval:0,labels:new Map}),y=(0,H.useRef)({labels:new Map}),m=(0,H.useRef)(l5()),h=(0,H.useRef)(d5()),g=(0,H.useRef)(M5()),b=(0,H.useRef)({green:1}),M=(0,H.useRef)(null),$=(0,H.useRef)(!1),w=(0,H.useRef)({w:0,h:0}),T=(0,H.useRef)(null),O=(0,H.useRef)(0),E=(0,H.useRef)(0),_=(0,H.useRef)(null),C=(0,H.useRef)(null),N=(0,H.useRef)(0),k=(0,H.useRef)(null),j=(0,H.useRef)([]),K=(0,H.useRef)(0),J=(0,H.useRef)(0),ae=(0,H.useRef)(0),q=(0,H.useRef)([]),U=(0,H.useRef)([]),z=(0,H.useRef)(0),L=(0,H.useRef)(null),B=(0,H.useRef)(null),X=(0,H.useRef)(n.loading?1:0),P=(0,H.useRef)(null),he=(0,H.useRef)(1),Le=(0,H.useRef)(.5),Te=(0,H.useRef)(0),Xt=(0,H.useRef)(!1),nt=(0,H.useRef)(0),zt=(0,H.useRef)(!1),Ke=(0,H.useRef)(0),Qa=(0,H.useRef)({startMs:0,from:0,to:0}),Ss=(0,H.useRef)(0),As=(0,H.useRef)({startMs:0,from:0,to:0}),Ma=(0,H.useRef)(0),oo=(0,H.useRef)(!1),ru=(0,H.useRef)({fromWidth:n.candleWidth??1,toWidth:n.candleWidth??1,startMs:0,rangeFromMin:0,rangeFromMax:0,rangeToMin:0,rangeToMax:0,oldCandles:[],oldWidth:n.candleWidth??1}),Za=(0,H.useRef)({candles:[],width:n.candleWidth??1}),Fa=(0,H.useRef)(null),Es=(0,H.useRef)(null),so=(0,H.useRef)(null),Ts=(0,H.useRef)(null),yi=(0,H.useRef)([]),uu=(0,H.useRef)(null),On=(0,H.useRef)([]),$a=(0,H.useRef)(void 0);(0,H.useEffect)(()=>{let W=t.current;if(!W)return;let ue=document.createElement("div");ue.style.cssText="position:absolute;top:0;left:0;pointer-events:none;will-change:transform;display:none;z-index:1;";let be=document.createElementNS(o2,"svg");be.style.cssText="position:absolute;top:0;left:0;";let D=document.createElementNS(o2,"path");be.appendChild(D);let an=document.createElement("span");return an.style.cssText="position:relative;display:block;color:#fff;white-space:nowrap;",ue.appendChild(be),ue.appendChild(an),W.appendChild(ue),_.current={container:ue,svg:be,path:D,text:an,displayW:0,targetW:0},()=>{W.removeChild(ue),_.current=null}},[t]),(0,H.useEffect)(()=>{let W=t.current;if(!W)return;let ue=new ResizeObserver(D=>{let an=D[0];if(!an)return;let{width:Se,height:at}=an.contentRect;w.current={w:Se,h:at}});ue.observe(W);let be=W.getBoundingClientRect();return w.current={w:be.width,h:be.height},()=>ue.disconnect()},[t]),(0,H.useEffect)(()=>{let W=t.current;if(!W)return;let ue=at=>{if(!a.current.scrub)return;let _a=W.getBoundingClientRect();C.current=at.clientX-_a.left},be=()=>{C.current=null,a.current.onHover?.(null)},D=at=>{if(!a.current.scrub||at.touches.length!==1)return;let _a=W.getBoundingClientRect();C.current=at.touches[0].clientX-_a.left},an=at=>{if(!a.current.scrub||at.touches.length!==1)return;at.preventDefault();let _a=W.getBoundingClientRect();C.current=at.touches[0].clientX-_a.left},Se=()=>{C.current=null,a.current.onHover?.(null)};return W.addEventListener("mousemove",ue),W.addEventListener("mouseleave",be),W.addEventListener("touchstart",D,{passive:!0}),W.addEventListener("touchmove",an,{passive:!1}),W.addEventListener("touchend",Se),W.addEventListener("touchcancel",Se),()=>{W.removeEventListener("mousemove",ue),W.removeEventListener("mouseleave",be),W.removeEventListener("touchstart",D),W.removeEventListener("touchmove",an),W.removeEventListener("touchend",Se),W.removeEventListener("touchcancel",Se)}},[t]),(0,H.useEffect)(()=>{let W=window.matchMedia("(prefers-reduced-motion: reduce)");$.current=W.matches;let ue=be=>{$.current=be.matches};return W.addEventListener("change",ue),()=>W.removeEventListener("change",ue)},[]),(0,H.useEffect)(()=>{let W=()=>{!document.hidden&&!O.current&&(O.current=requestAnimationFrame(Xn))};return document.addEventListener("visibilitychange",W),()=>document.removeEventListener("visibilitychange",W)},[]);let Xn=(0,H.useCallback)(()=>{if(document.hidden){O.current=0;return}let W=e.current,{w:ue,h:be}=w.current;if(!W||ue===0||be===0){O.current=requestAnimationFrame(Xn);return}let D=a.current,an=j3(),Se=performance.now(),at=E.current?Math.min(Se-E.current,D5):16.67;E.current=Se;let _a=Math.round(ue*an),bi=Math.round(be*an);(W.width!==_a||W.height!==bi)&&(W.width=_a,W.height=bi,W.style.width=`${ue}px`,W.style.height=`${be}px`);let ge=T.current;if((!ge||ge.canvas!==W)&&(ge=W.getContext("2d"),T.current=ge),!ge){O.current=requestAnimationFrame(Xn);return}Y3(ge,an,ue,be);let hn=$.current,Lt=D.mode==="candle";if(Lt)D.paused&&Fa.current===null&&(D.candles?.length??0)>0&&(Fa.current=D.candles.slice(),Es.current=D.liveCandle??null,so.current=D.lineData?.slice()??null,Ts.current=D.lineValue??null),D.paused||(Fa.current=null,Es.current=null,so.current=null,Ts.current=null);else if(D.isMultiSeries&&D.multiSeries){if(D.paused&&B.current===null){let ee=new Map;for(let Pe of D.multiSeries)Pe.data.length>=2&&ee.set(Pe.id,{data:Pe.data.slice(),value:Pe.value});ee.size>0&&(B.current=ee)}D.paused||(B.current=null)}else D.paused&&L.current===null&&D.data.length>=2&&(L.current=D.data.slice()),D.paused||(L.current=null);let ws=Lt?[]:L.current??D.data,fe=Lt?Fa.current??D.candles??[]:[],cu=D.isMultiSeries&&D.multiSeries?D.multiSeries.some(ee=>ee.data.length>=2):!1,dt=Lt?fe.length>=2:cu||ws.length>=2,ne=D.padding,I=be-ne.top-ne.bottom,Tt=D.paused?1:0;J.current=hn?Tt:ze(J.current,Tt,q5,at),J.current<.005&&(J.current=0),J.current>.995&&(J.current=1);let Re=J.current,ke=at*(1-Re),mg=at/1e3;if(ae.current+=mg*Re,!D.paused&&ae.current>.001){let ee=ae.current>10?G5:H5;ae.current=ze(ae.current,0,ee,at),ae.current<.01&&(ae.current=0)}let hg=D.loading?1:0;X.current=hn?hg:ze(X.current,hg,j5,at),X.current<.01&&(X.current=0),X.current>.99&&(X.current=1);let Kn=X.current,Si=!D.loading&&dt?1:0;K.current=hn?Si:ze(K.current,Si,Si===1?B5:U5,at),Math.abs(K.current-Si)<.005&&(K.current=Si);let gn=K.current;gn<.01&&(p.current=!1);let Qn,$l=!1;if(Lt?Qn=!dt&&gn>.005&&yi.current.length>0:($l=!dt&&gn>.005&&U.current.length>0,cu&&D.multiSeries&&(U.current=D.multiSeries.map(ee=>({id:ee.id,data:ee.data.slice(),value:ee.value,palette:ee.palette,label:ee.label}))),dt&&!D.isMultiSeries&&(U.current=[]),Qn=!$l&&!dt&&gn>.005&&q.current.length>=2,dt&&!D.isMultiSeries&&(q.current=ws)),Lt){let ee=Qa.current,Pe=D.lineMode?1:0;if(ee.to!==Pe&&(ee.from=Ke.current,ee.to=Pe,ee.startMs=Se),ee.startMs>0){let oe=Se-ee.startMs,We=Math.min(oe/V5,1);Ke.current=ee.from+(ee.to-ee.from)*((1-Math.cos(We*Math.PI))/2),We>=1&&(Ke.current=ee.to,ee.startMs=0)}else Ke.current=ee.to}if(!dt&&!Qn&&!$l){let ee=Lt||D.isMultiSeries||U.current.length>0?D.palette.gridLabel:void 0;Kn>.01&&a2(ge,ue,be,ne,D.palette,Se,Kn,ee),1-Kn>.01&&Ur(ge,ue,be,ne,D.palette,1-Kn,Se,!1,D.emptyText),ge.save(),ge.globalCompositeOperation="destination-out";let Pe=ge.createLinearGradient(ne.left,0,ne.left+bl,0);Pe.addColorStop(0,"rgba(0, 0, 0, 1)"),Pe.addColorStop(1,"rgba(0, 0, 0, 0)"),ge.fillStyle=Pe,ge.fillRect(0,0,ne.left+bl,be),ge.restore(),_.current&&(_.current.container.style.display="none"),O.current=requestAnimationFrame(Xn);return}if(Lt){let ee=F5;dt&&(z.current=Date.now()/1e3-ae.current);let Pe=dt||gn<.005?Date.now()/1e3-ae.current:z.current,oe=Fa.current?Es.current??void 0:D.liveCandle,We=so.current??D.lineData,Kt=Ts.current??D.lineValue;dt&&We&&We.length>0&&(On.current=We,$a.current=Kt),Qn&&On.current.length>0&&(We=On.current,Kt=$a.current);let vn=D.candleWidth??1,se=ru.current,wt=-1,Mt;if(se.startMs>0){let Y=Se-se.startMs,Q=Math.min(Y/I5,1);wt=(1-Math.cos(Q*Math.PI))/2,Mt=Math.exp(Math.log(se.fromWidth)+(Math.log(se.toWidth)-Math.log(se.fromWidth))*wt),Q>=1&&(Mt=se.toWidth,se.startMs=0,wt=-1)}else Mt=se.toWidth;if(vn!==se.toWidth){se.oldCandles=Za.current.candles,se.oldWidth=Za.current.width,se.fromWidth=Mt,se.toWidth=vn,se.startMs=Se,wt=0,se.rangeFromMin=s.current,se.rangeFromMax=r.current;let Y=f.current,Q=Pe+Y*ee,Ut=Q-Y,ve=[];for(let Ft of fe)Ft.time+vn>=Ut&&Ft.time<=Q&&ve.push(Ft);if(oe&&ve.push(oe),ve.length>0){let Ft=Dh(ve);se.rangeToMin=Ft.min,se.rangeToMax=Ft.max}else se.rangeToMin=s.current,se.rangeToMax=r.current}Za.current={candles:D.candles??[],width:vn};let $t=Ke.current,_t=As.current,_l=We&&We.length>0,Nn=D.lineMode&&$t>=.3&&_l?1:0;_t.to!==Nn&&(_t.from=Ss.current,_t.to=Nn,_t.startMs=Se);let ln;if(_t.startMs>0){let Y=Se-_t.startMs,Q=Math.min(Y/K5,1);ln=_t.from+(_t.to-_t.from)*(1-(1-Q)*(1-Q)),Q>=1&&(ln=_t.to,_t.startMs=0)}else ln=_t.to;Ss.current=ln;let Ai=c.current,lt=W5(D.windowSecs,Ai,f.current,s.current,r.current,Se,Pe,fe,oe,vn,ee);f.current=lt.windowSecs;let da=lt.windowSecs,ro=lt.windowTransProgress,yn=Ai.startMs>0,Qt=Pe+da*ee,kt=Qt-da,bn;if(oe){let Y=P.current;if(!Y||Y.time!==oe.time)P.current={time:oe.time,open:oe.open,high:oe.open,low:oe.open,close:oe.open},he.current=0;else{let ve=P.current;ve.open=ze(ve.open,oe.open,gd,ke),ve.high=ze(ve.high,oe.high,gd,ke),ve.low=ze(ve.low,oe.low,gd,ke),ve.close=ze(ve.close,oe.close,gd,ke)}he.current=ze(he.current,1,.2,ke),he.current>.99&&(he.current=1);let Q=P.current,Ut=Q.close>=Q.open?1:0;Le.current=ze(Le.current,Ut,.12,ke),Le.current>.99&&(Le.current=1),Le.current<.01&&(Le.current=0),bn=Q}else P.current=null,he.current=1,Le.current=.5;if(oe)if(!zt.current)nt.current=oe.close,zt.current=!0;else{nt.current=ze(nt.current,oe.close,X5,ke);let Y=Math.abs(nt.current-oe.close),Q=r.current-s.current||1;Y<Q*5e-4&&(nt.current=oe.close)}else Qn||(zt.current=!1);if(oe)if(!Xt.current)Te.current=oe.close,Xt.current=!0;else{let Y=Math.abs(oe.close-Te.current),Q=r.current-s.current||1,Ut=Math.min(Y/Q,1),ve=c2+(1-Ut)*d2;Te.current=ze(Te.current,oe.close,ve,ke),Y<Q*f2&&(Te.current=oe.close)}else Qn||(Xt.current=!1);if(Kt!==void 0&&_l)if(!oo.current)Ma.current=Kt,oo.current=!0;else{let Y=Math.abs(Kt-Ma.current),Q=r.current-s.current||1,Ut=Math.min(Y/Q,1),ve=c2+(1-Ut)*d2;Ma.current=ze(Ma.current,Kt,ve,ke),Y<Q*f2&&(Ma.current=Kt)}else Qn||(oo.current=!1);let Ra=[];for(let Y of fe)Y.time+vn>=kt&&Y.time<=Qt&&Ra.push(Y);bn&&bn.time+Mt>=kt&&bn.time<=Qt&&Ra.push(bn);let Sn=[];if(wt>=0&&se.oldCandles.length>0)for(let Y of se.oldCandles)Y.time+se.oldWidth>=kt&&Y.time<=Qt&&Sn.push(Y);dt&&(yi.current=Ra,uu.current=bn??null);let Zn=Qn?yi.current:Ra,uo=Qn?uu.current??void 0:bn,Rl=ue-ne.left-ne.right,Ei=Zn.length>0?Dh(Zn):{min:s.current,max:r.current},ft=P5(Ei,p.current,s.current,r.current,yn,ro,Ai,I,ke);wt>=0&&(ft.displayMin=se.rangeFromMin+(se.rangeToMin-se.rangeFromMin)*wt,ft.displayMax=se.rangeFromMax+(se.rangeToMax-se.rangeFromMax)*wt,ft.minVal=ft.displayMin,ft.maxVal=ft.displayMax,ft.valRange=ft.displayMax-ft.displayMin||.001),p.current=ft.rangeInited,s.current=ft.displayMin,r.current=ft.displayMax;let{minVal:Cl,maxVal:Ti,valRange:Ja}=ft,it={w:ue,h:be,pad:ne,chartW:Rl,chartH:I,leftEdge:kt,rightEdge:Qt,minVal:Cl,maxVal:Ti,valRange:Ja,toX:Y=>ne.left+(Y-kt)/(Qt-kt)*Rl,toY:Y=>ne.top+(1-(Y-Cl)/Ja)*I},Zt=C.current,Qe=null,V=!1;Zt!==null&&Zt>=ne.left&&Zt<=ue-ne.right&&(Qe=v2(Zn,Zt,Mt,it),Qe&&(V=!0));let me=V?1:0;N.current=ze(N.current,me,.12,at),N.current<.01&&(N.current=0),N.current>.99&&(N.current=1);let ot=N.current,bt=Zt,on=0,Ol=Qe;!V&&ot>0&&k.current?(bt=k.current.x,on=k.current.time,Ol=v2(Zn,k.current.x,Mt,it)):V&&Zt!==null&&(on=it.leftEdge+(Zt-ne.left)/Rl*(it.rightEdge-it.leftEdge),k.current={x:Zt,value:Qe?.close??0,time:on});let Ze=Zn,Nl=Sn,st=uo;if($t>.01&&st&&Xt.current){let Y=st.close+(Te.current-st.close)*$t;st={...st,close:Y};let Q=Ze.length-1;Q>=0&&Ze[Q].time===st.time&&(Ze=Ze.slice(),Ze[Q]={...Ze[Q],close:Y})}if($t>.01&&$t<.99){let Y=Q=>{let Ut=1-$t;return{time:Q.time,open:Q.close+(Q.open-Q.close)*Ut,high:Q.close+(Q.high-Q.close)*Ut,low:Q.close+(Q.low-Q.close)*Ut,close:Q.close}};Ze=Ze.map(Y),Nl.length>0&&(Nl=Nl.map(Y)),st&&(st=Y(st))}let Ca,du;if(We&&We.length>0&&(ln>.01||$t>.05)){let Y=[];for(let ve of Ze)Y.push({t:ve.time+Mt/2,v:ve.close});st&&Y.push({t:Pe,v:st.close}),Ca=[];let Q=0;for(let ve of We){if(ve.time<kt||ve.time>Qt)continue;for(;Q<Y.length-2&&Y[Q+1].t<ve.time;)Q++;let Ft;if(Y.length===0)Ft=ve.value;else if(Y.length===1||ve.time<=Y[0].t)Ft=Y[0].v;else if(Q>=Y.length-1)Ft=Y[Y.length-1].v;else{let fu=Y[Q],gg=Y[Q+1],vg=gg.t-fu.t,NA=vg>0?Math.max(0,Math.min(1,(ve.time-fu.t)/vg)):0;Ft=fu.v+(gg.v-fu.v)*NA}let Ms=Ft+(ve.value-Ft)*ln;Ca.push({time:ve.time,value:Ms})}let Ut=oo.current?Ma.current:Kt??We[We.length-1].value;du=Te.current+(Ut-Te.current)*ln}else Ca=Ze.map(Y=>({time:Y.time+Mt/2,value:Y.close})),du=Xt.current?Te.current:st?.close??Ze[Ze.length-1]?.close??0;if(gn<1&&Ca.length>=2){let Y=Ca[0].time,Q=Qt-kt;if(Y-kt>Q*.05){let Ut=Ca[0].value,ve=Q/32,Ft=[];for(let Ms=kt;Ms<Y-ve*.5;Ms+=ve)Ft.push({time:Ms,value:Ut});Ca=[...Ft,...Ca]}}if(R5(ge,it,D.palette,{candles:Ze,displayCandleWidth:Mt,oldCandles:Nl,oldWidth:se.oldWidth,morphT:wt,liveCandle:st,closePriceCandle:zt.current&&oe?{...oe,close:nt.current}:oe,liveTime:uo?.time??-1,liveBirthAlpha:he.current,liveBullBlend:Le.current,lineModeProg:$t,chartReveal:gn,now_ms:Se,now:Pe,pauseProgress:Re,showGrid:D.showGrid,scrubAmount:ot,hoverX:bt,hoverValue:Ol?.close??null,hoverTime:on,hoveredCandle:Ol,formatValue:D.formatValue,formatTime:D.formatTime,gridState:S.current,timeAxisState:y.current,dt:ke,targetWindowSecs:D.windowSecs,tooltipY:D.tooltipY,tooltipOutline:D.tooltipOutline,lineVisible:Ca,lineSmoothValue:du,emptyText:D.emptyText,loadingAlpha:Kn,showEmptyOverlay:!(D.loading??!1)&&Kn<.01}),_.current)if($t>.5&&D.showBadge){let Y=ZS(Ca);M.current=g2(_.current,D,du,it,Y,M.current,b.current,yn,hn,ge,ke,gn);let Q=($t-.5)*2;if(_.current.container.style.display!=="none"){let Ut=_.current.container.style.opacity?parseFloat(_.current.container.style.opacity):1;_.current.container.style.opacity=String(Ut*Q*(1-Re))}}else _.current.container.style.display="none"}else if(D.isMultiSeries&&D.multiSeries&&D.multiSeries.length>0||$l){let ee=$l?U.current:D.multiSeries,Pe=0;if(ee.some(V=>V.label)){ge.font='600 10px -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif';let V=0;for(let me of ee)if(me.label){let ot=ge.measureText(me.label).width;ot>V&&(V=ot)}Pe=Math.max(0,V-2)*gn}let oe=ue-ne.left-ne.right-Pe,We=D.showBadge?s2:r2;if(!$l){let V=new Set(ee.map(me=>me.id));for(let me of i.current.keys())V.has(me)||i.current.delete(me)}let Kt=ee[0],vn=c.current;dt&&(z.current=Date.now()/1e3-ae.current);let se=$l?z.current:Date.now()/1e3-ae.current,wt=new Map;for(let V of ee){let me=i.current.get(V.id);if(me===void 0&&(me=V.value),!$l){let ot=p2(V.value,me,s.current,r.current,D.lerpSpeed,hn);me=ze(me,V.value,ot,ke);let bt=r.current-s.current||1;Math.abs(me-V.value)<bt*u2&&(me=V.value),i.current.set(V.id,me)}wt.set(V.id,me)}let Mt=D.hiddenSeriesIds,$t=o.current;for(let V of ee){let me=$t.get(V.id)??1,ot=Mt?.has(V.id)?0:1;me=hn?ot:ze(me,ot,Y5,ke),me<.01&&(me=0),me>.99&&(me=1),$t.set(V.id,me)}let _t=B.current?.get(Kt.id)?.data??Kt.data,_l=m2(D,vn,f.current,s.current,r.current,hn,Se,se,_t,wt.get(Kt.id)??Kt.value,We);if(vn.startMs>0&&ee.length>1){let V=se+D.windowSecs*We,me=V-D.windowSecs,ot=1/0,bt=-1/0;for(let on of ee){let Ol=B.current?.get(on.id)?.data??on.data,Ze=wt.get(on.id)??on.value,Nl=[];for(let st of Ol)st.time>=me-2&&st.time<=V&&Nl.push(st);if(Nl.length>0){let st=vd(Nl,Ze,D.referenceLine?.value,D.exaggerate);st.min<ot&&(ot=st.min),st.max>bt&&(bt=st.max)}}isFinite(ot)&&isFinite(bt)&&(vn.rangeToMin=ot,vn.rangeToMax=bt)}f.current=_l.windowSecs;let Nn=_l.windowSecs,ln=_l.windowTransProgress,Ai=vn.startMs>0,lt=se+Nn*We,da=lt-Nn,ro=lt-(lt-se)*Re,yn=[],Qt=1/0,kt=-1/0;for(let V of ee){let ot=B.current?.get(V.id)?.data??V.data,bt=[];for(let Ze of ot)Ze.time>=da-2&&Ze.time<=ro&&bt.push(Ze);let on=wt.get(V.id)??V.value,Ol=$t.get(V.id)??1;if(bt.length>=2){if(Ol>.01){let Ze=vd(bt,on,D.referenceLine?.value,D.exaggerate);Ze.min<Qt&&(Qt=Ze.min),Ze.max>kt&&(kt=Ze.max)}yn.push({visible:bt,smoothValue:on,palette:V.palette,label:V.label,alpha:Ol})}}if(yn.length===0){Kn>.01&&a2(ge,ue,be,ne,D.palette,Se,Kn,D.palette.gridLabel),1-Kn>.01&&Ur(ge,ue,be,ne,D.palette,1-Kn,Se,!1,D.emptyText),ge.save(),ge.globalCompositeOperation="destination-out";let V=ge.createLinearGradient(ne.left,0,ne.left+bl,0);V.addColorStop(0,"rgba(0, 0, 0, 1)"),V.addColorStop(1,"rgba(0, 0, 0, 0)"),ge.fillStyle=V,ge.fillRect(0,0,ne.left+bl,be),ge.restore(),_.current&&(_.current.container.style.display="none"),O.current=requestAnimationFrame(Xn);return}let bn={min:isFinite(Qt)?Qt:0,max:isFinite(kt)?kt:1},Ra=D.lerpSpeed+$2*.5,Sn=h2(bn,p.current,d.current,u.current,s.current,r.current,Ai,ln,vn,Ra,I,ke);p.current=Sn.rangeInited,d.current=Sn.targetMin,u.current=Sn.targetMax,s.current=Sn.displayMin,r.current=Sn.displayMax;let{minVal:Zn,maxVal:uo,valRange:Rl}=Sn,Ei={w:ue,h:be,pad:ne,chartW:oe,chartH:I,leftEdge:da,rightEdge:lt,minVal:Zn,maxVal:uo,valRange:Rl,toX:V=>ne.left+(V-da)/(lt-da)*oe,toY:V=>ne.top+(1-(V-Zn)/Rl)*I},ft=C.current,Cl=null,Ti=null,Ja=!1,it=[];if(ft!==null&&ft>=ne.left&&ft<=ue-ne.right){let V=Ei.toX(se),me=Math.min(ft,V),ot=da+(me-ne.left)/oe*(lt-da);Cl=me,Ti=ot,Ja=!0;for(let bt of yn){if((bt.alpha??1)<.5)continue;let on=y2(bt.visible,ot);on!==null&&it.push({color:bt.palette.line,label:bt.label??"",value:on})}k.current={x:me,value:it[0]?.value??0,time:ot},j.current=it,D.onHover?.({time:ot,value:it[0]?.value??0,x:me,y:Ei.toY(it[0]?.value??0)})}let Zt=Ja?1:0;hn?N.current=Zt:(N.current+=(Zt-N.current)*w2,N.current<.01&&(N.current=0),N.current>.99&&(N.current=1)),!Ja&&N.current>0&&k.current&&(Cl=k.current.x,Ti=k.current.time,it=j.current),_5(ge,Ei,{series:yn,now:se,showGrid:D.showGrid,showPulse:D.showPulse,referenceLine:D.referenceLine,hoverX:Cl,hoverTime:Ti,hoverEntries:it,scrubAmount:N.current,windowSecs:Nn,formatValue:D.formatValue,formatTime:D.formatTime,gridState:S.current,timeAxisState:y.current,dt:at,targetWindowSecs:D.windowSecs,tooltipY:D.tooltipY,tooltipOutline:D.tooltipOutline,chartReveal:gn,pauseProgress:Re,now_ms:Se,primaryPalette:D.palette});let Qe=1-gn;if(Qe>.01&&Si===0&&!D.loading){let V=(1-Kn)*Qe;V>.01&&Ur(ge,ue,be,ne,D.palette,V,Se,!0,D.emptyText)}_.current&&(_.current.container.style.display="none")}else{let ee=Qn?q.current:ws,Pe=p2(D.value,l.current,s.current,r.current,D.lerpSpeed,hn);if(!Qn&&(l.current=ze(l.current,D.value,Pe,ke),Re<.5)){let Qe=r.current-s.current||1;Math.abs(l.current-D.value)<Qe*u2&&(l.current=D.value)}let oe=l.current,We=ue-ne.left-ne.right,Kt=D.showBadge?s2:r2,se=D.showMomentum&&D.showBadge?Math.max(Kt,37/Math.max(We,1)):Kt,wt=c.current;dt&&(z.current=Date.now()/1e3-ae.current);let Mt=Qn?z.current:Date.now()/1e3-ae.current,$t=m2(D,wt,f.current,s.current,r.current,hn,Se,Mt,ee,oe,se);f.current=$t.windowSecs;let _t=$t.windowSecs,_l=$t.windowTransProgress,Nn=Mt+_t*se,ln=Nn-_t,Ai=Nn-(Nn-Mt)*Re,lt=[];for(let Qe of ee)Qe.time>=ln-2&&Qe.time<=Ai&<.push(Qe);if(lt.length<2){_.current&&(_.current.container.style.display="none"),O.current=requestAnimationFrame(Xn);return}let da=vd(lt,oe,D.referenceLine?.value,D.exaggerate),ro=wt.startMs>0,yn=h2(da,p.current,d.current,u.current,s.current,r.current,ro,_l,wt,Pe,I,ke);p.current=yn.rangeInited,d.current=yn.targetMin,u.current=yn.targetMax,s.current=yn.displayMin,r.current=yn.displayMax;let{minVal:Qt,maxVal:kt,valRange:bn}=yn,Ra={w:ue,h:be,pad:ne,chartW:We,chartH:I,leftEdge:ln,rightEdge:Nn,minVal:Qt,maxVal:kt,valRange:bn,toX:Qe=>ne.left+(Qe-ln)/(Nn-ln)*We,toY:Qe=>ne.top+(1-(Qe-Qt)/bn)*I},Sn=D.momentumOverride??ZS(lt),Zn=J5(C.current,ne,ue,Ra,Mt,lt,N.current,k.current,D,hn,ln,Nn,We,at);N.current=Zn.scrubAmount,k.current=Zn.lastHover;let{hoverX:uo,hoverValue:Rl,hoverTime:Ei}=Zn,ft=Math.min(5,lt.length-1),Cl=ft>0?Math.abs(lt[lt.length-1].value-lt[lt.length-1-ft].value):0,Ti=bn>0?Math.min(Cl/bn,1):0;$5(ge,Ra,D.palette,{visible:lt,smoothValue:oe,now:Mt,momentum:Sn,arrowState:v.current,showGrid:D.showGrid,showMomentum:D.showMomentum,showPulse:D.showPulse,showFill:D.showFill,referenceLine:D.referenceLine,hoverX:uo,hoverValue:Rl,hoverTime:Ei,scrubAmount:N.current,windowSecs:_t,formatValue:D.formatValue,formatTime:D.formatTime,gridState:S.current,timeAxisState:y.current,dt:at,targetWindowSecs:D.windowSecs,tooltipY:D.tooltipY,tooltipOutline:D.tooltipOutline,orderbookData:D.orderbookData,orderbookState:D.orderbookData?m.current:void 0,particleState:D.degenOptions?h.current:void 0,particleOptions:D.degenOptions,swingMagnitude:Ti,shakeState:D.degenOptions?g.current:void 0,chartReveal:gn,pauseProgress:Re,now_ms:Se});let Ja=1-gn;if(Ja>.01&&Si===0&&!D.loading){let Qe=(1-Kn)*Ja;Qe>.01&&Ur(ge,ue,be,ne,D.palette,Qe,Se,!0,D.emptyText)}let it=_.current;if(it&&(M.current=g2(it,D,oe,Ra,Sn,M.current,b.current,ro,hn,ge,ke,gn),Re>.01&&it.container.style.display!=="none")){let Qe=it.container.style.opacity?parseFloat(it.container.style.opacity):1;it.container.style.opacity=String(Qe*(1-Re))}let Zt=D.valueDisplayRef?.current;if(Zt){let Qe=D.valueMomentumColor?Math.abs(oe):oe;if(Zt.textContent=D.formatValue(Qe),D.valueMomentumColor){let V=Sn==="up"?"#22c55e":Sn==="down"?"#ef4444":"";V?Zt.style.color=V:Zt.style.removeProperty("color")}}}O.current=requestAnimationFrame(Xn)},[e]);(0,H.useEffect)(()=>(O.current=requestAnimationFrame(Xn),()=>cancelAnimationFrame(O.current)),[Xn])}var t$=e=>e.toFixed(2),n$=e=>{let t=new Date(e*1e3),n=t.getHours().toString().padStart(2,"0"),a=t.getMinutes().toString().padStart(2,"0"),l=t.getSeconds().toString().padStart(2,"0");return`${n}:${a}:${l}`};function _2({data:e,value:t,series:n,theme:a="dark",color:l="#3b82f6",window:i=30,grid:o=!0,badge:s=!0,momentum:r=!0,fill:d=!0,scrub:u=!0,loading:p=!1,paused:f=!1,emptyText:c,exaggerate:v=!1,degen:S,badgeTail:y=!0,badgeVariant:m="default",showValue:h=!1,valueMomentumColor:g=!1,windows:b,onWindowChange:M,windowStyle:$,tooltipY:w=14,tooltipOutline:T=!0,orderbook:O,referenceLine:E,formatValue:_=t$,formatTime:C=n$,lerpSpeed:N=.08,padding:k,onHover:j,cursor:K="crosshair",pulse:J=!0,mode:ae="line",candles:q,candleWidth:U,liveCandle:z,lineMode:L,lineData:B,lineValue:X,onModeChange:P,onSeriesToggle:he,seriesToggleCompact:Le=!1,lineWidth:Te,className:Xt,style:nt}){let zt=(0,tt.useRef)(null),Ke=(0,tt.useRef)(null),Qa=(0,tt.useRef)(null),Ss=(0,tt.useRef)(null),As=(0,tt.useRef)(new Map),[Ma,oo]=(0,tt.useState)(null),ru=(0,tt.useRef)(null),Za=(0,tt.useRef)(new Map),[Fa,Es]=(0,tt.useState)(null),[so,Ts]=(0,tt.useState)(new Set),yi=(0,tt.useRef)(n);n&&n.length>0&&(yi.current=n);let uu=(0,tt.useMemo)(()=>{let I=Oh(l,a);return Te!=null&&(I.lineWidth=Te),I},[l,a,Te]),On=a==="dark",$a=n!=null&&n.length>0,Xn=(yi.current?.length??0)>1,W=(0,tt.useMemo)(()=>!n||n.length===0?null:G3(n,a),[n,a]),ue=(0,tt.useMemo)(()=>{if(!(!n||!W))return n.map((I,Tt)=>({id:I.id,data:I.data,value:I.value,palette:W.get(I.id)??Oh(I.color||ms[Tt%ms.length],a),label:I.label}))},[n,W,a]),be=r!==!1,D=typeof r=="string"?r:void 0,an=s?80:o?54:12,Se={top:k?.top??12,right:k?.right??an,bottom:k?.bottom??28,left:k?.left??12},_a=(S!=null?S!==!1:!1)?typeof S=="object"?S:{}:void 0,[bi,ge]=(0,tt.useState)(b&&b.length>0?b[0].secs:i),hn=b?bi:i;(0,tt.useLayoutEffect)(()=>{if(!b||b.length===0)return;let I=As.current.get(bi),Tt=Ss.current;if(I&&Tt){let Re=Tt.getBoundingClientRect(),ke=I.getBoundingClientRect();oo({left:ke.left-Re.left,width:ke.width})}},[bi,b]);let Lt=L?"line":"candle";(0,tt.useLayoutEffect)(()=>{if(!P)return;let I=Za.current.get(Lt),Tt=ru.current;if(I&&Tt){let Re=Tt.getBoundingClientRect(),ke=I.getBoundingClientRect();Es({left:ke.left-Re.left,width:ke.width})}},[Lt,P]);let ws=(0,tt.useCallback)(I=>{Ts(Tt=>{let Re=new Set(Tt);if(Re.has(I))Re.delete(I),he?.(I,!0);else{if((n?.length??0)-Re.size<=1)return Tt;Re.add(I),he?.(I,!1)}return Re})},[n?.length,he]),fe=$??"default";e$(zt,Ke,{data:e,value:t,palette:uu,windowSecs:hn,lerpSpeed:N,showGrid:o,showBadge:$a?!1:s,showMomentum:$a?!1:be,momentumOverride:D,showFill:$a?!1:d,referenceLine:E,formatValue:_,formatTime:C,padding:Se,onHover:j,showPulse:J,scrub:u,exaggerate:v,degenOptions:$a?void 0:_a,badgeTail:y,badgeVariant:m,tooltipY:w,tooltipOutline:T,valueMomentumColor:g,valueDisplayRef:h?Qa:void 0,orderbookData:O,loading:p,paused:f,emptyText:c,mode:ae,candles:q,candleWidth:U,liveCandle:z,lineMode:L,lineData:B,lineValue:X,multiSeries:ue,isMultiSeries:$a,hiddenSeriesIds:so});let cu=u?K:"default",dt=On?"rgba(255,255,255,0.7)":"rgba(0,0,0,0.55)",ne=On?"rgba(255,255,255,0.25)":"rgba(0,0,0,0.22)";return(0,Ve.jsxs)(Ve.Fragment,{children:[h&&(0,Ve.jsx)("span",{ref:Qa,style:{display:"block",fontSize:20,fontWeight:500,fontFamily:'"SF Mono", Menlo, monospace',color:On?"rgba(255,255,255,0.85)":"#111",transition:"color 0.3s",letterSpacing:"-0.01em",marginBottom:8,paddingTop:4,paddingLeft:Se.left}}),(b&&b.length>0||P||Xn)&&(0,Ve.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:6,marginLeft:Se.left},children:[b&&b.length>0&&(0,Ve.jsxs)("div",{ref:Ss,style:{position:"relative",display:"inline-flex",gap:fe==="text"?4:2,background:fe==="text"?"transparent":On?"rgba(255,255,255,0.03)":"rgba(0,0,0,0.02)",borderRadius:fe==="rounded"?999:6,padding:fe==="text"?0:fe==="rounded"?3:2},children:[fe!=="text"&&Ma&&(0,Ve.jsx)("div",{style:{position:"absolute",top:fe==="rounded"?3:2,left:Ma.left,width:Ma.width,height:fe==="rounded"?"calc(100% - 6px)":"calc(100% - 4px)",background:On?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.035)",borderRadius:fe==="rounded"?999:4,transition:"left 0.25s cubic-bezier(0.4, 0, 0.2, 1), width 0.25s cubic-bezier(0.4, 0, 0.2, 1)",pointerEvents:"none"}}),b.map(I=>{let Tt=I.secs===bi;return(0,Ve.jsx)("button",{ref:Re=>{Re?As.current.set(I.secs,Re):As.current.delete(I.secs)},onClick:()=>{ge(I.secs),M?.(I.secs)},style:{position:"relative",zIndex:1,fontSize:11,padding:fe==="text"?"2px 6px":"3px 10px",borderRadius:fe==="rounded"?999:4,border:"none",cursor:"pointer",fontFamily:"system-ui, -apple-system, sans-serif",fontWeight:Tt?600:400,background:"transparent",color:Tt?dt:ne,transition:"color 0.2s, background 0.15s",lineHeight:"16px"},children:I.label},I.secs)})]}),P&&(0,Ve.jsxs)("div",{ref:ru,style:{position:"relative",display:"inline-flex",gap:fe==="text"?4:2,background:fe==="text"?"transparent":On?"rgba(255,255,255,0.03)":"rgba(0,0,0,0.02)",borderRadius:fe==="rounded"?999:6,padding:fe==="text"?0:fe==="rounded"?3:2},children:[fe!=="text"&&Fa&&(0,Ve.jsx)("div",{style:{position:"absolute",top:fe==="rounded"?3:2,left:Fa.left,width:Fa.width,height:fe==="rounded"?"calc(100% - 6px)":"calc(100% - 4px)",background:On?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.035)",borderRadius:fe==="rounded"?999:4,transition:"left 0.25s cubic-bezier(0.4, 0, 0.2, 1), width 0.25s cubic-bezier(0.4, 0, 0.2, 1)",pointerEvents:"none"}}),(0,Ve.jsx)("button",{ref:I=>{I?Za.current.set("line",I):Za.current.delete("line")},onClick:()=>P("line"),style:{position:"relative",zIndex:1,padding:"5px 7px",borderRadius:fe==="rounded"?999:4,border:"none",cursor:"pointer",background:"transparent",display:"flex",alignItems:"center"},children:(0,Ve.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:(0,Ve.jsx)("path",{d:"M1 8.5C2.5 8.5 3 4 5.5 4S7.5 7 8.5 7C9.5 7 10 3.5 11 3.5",stroke:Lt==="line"?dt:ne,strokeWidth:Lt==="line"?1.5:1.2,strokeLinecap:"round",fill:"none"})})}),(0,Ve.jsx)("button",{ref:I=>{I?Za.current.set("candle",I):Za.current.delete("candle")},onClick:()=>P("candle"),style:{position:"relative",zIndex:1,padding:"5px 7px",borderRadius:fe==="rounded"?999:4,border:"none",cursor:"pointer",background:"transparent",display:"flex",alignItems:"center"},children:(0,Ve.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:[(0,Ve.jsx)("line",{x1:"3.5",y1:"1",x2:"3.5",y2:"11",stroke:Lt==="candle"?dt:ne,strokeWidth:"1"}),(0,Ve.jsx)("rect",{x:"2",y:"3",width:"3",height:"5",rx:"0.5",fill:Lt==="candle"?dt:ne}),(0,Ve.jsx)("line",{x1:"8.5",y1:"2",x2:"8.5",y2:"10",stroke:Lt==="candle"?dt:ne,strokeWidth:"1"}),(0,Ve.jsx)("rect",{x:"7",y:"4",width:"3",height:"4",rx:"0.5",fill:Lt==="candle"?dt:ne})]})})]}),Xn&&(0,Ve.jsx)("div",{style:{display:"inline-flex",gap:fe==="text"?4:2,background:fe==="text"?"transparent":On?"rgba(255,255,255,0.03)":"rgba(0,0,0,0.02)",borderRadius:fe==="rounded"?999:6,padding:fe==="text"?0:fe==="rounded"?3:2,opacity:$a?1:0,transition:"opacity 0.4s",pointerEvents:$a?"auto":"none"},children:(yi.current??[]).map((I,Tt)=>{let Re=so.has(I.id),ke=I.color||ms[Tt%ms.length];return(0,Ve.jsxs)("button",{onClick:()=>ws(I.id),style:{position:"relative",zIndex:1,fontSize:11,padding:Le?fe==="text"?"2px 4px":"5px 7px":fe==="text"?"2px 6px":"3px 8px",borderRadius:fe==="rounded"?999:4,border:"none",cursor:"pointer",fontFamily:"system-ui, -apple-system, sans-serif",fontWeight:500,background:Re||fe==="text"?"transparent":On?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.035)",color:Re?ne:dt,opacity:Re?.4:1,transition:"opacity 0.2s, background 0.15s, color 0.2s",lineHeight:"16px",display:"flex",alignItems:"center",gap:Le?0:4},children:[(0,Ve.jsx)("span",{style:{width:Le?8:6,height:Le?8:6,borderRadius:"50%",background:ke,flexShrink:0,opacity:Re?.4:1,transition:"opacity 0.2s"}}),!Le&&(I.label??I.id)]},I.id)})})]}),(0,Ve.jsx)("div",{ref:Ke,className:Xt,style:{width:"100%",height:"100%",position:"relative",...nt},children:(0,Ve.jsx)("canvas",{ref:zt,style:{display:"block",cursor:cu}})})]})}function bd(e,t=15,n=Date.now()){let a=Date.parse(e.observedAt);return!Number.isFinite(a)||a>n?"unknown":n-a>t*3e3?"stale":"sampled"}function R2(e,t,n){let a=[];for(let l of e){let i=Date.parse(l.at)/1e3,o=l[t];if(!Number.isFinite(i)||!Number.isFinite(o)){a=[];continue}let s=a.at(-1);s&&(i<=s.time||i-s.time>n*1.75)&&(a=[]),a.push({time:i,value:o})}return a}function C2(e,t){return e.reduce((n,a)=>!n||Math.abs(a.time-t)<Math.abs(n.time-t)?a:n,null)}var O2=Pa(tl(),1),Yh=matchMedia("(prefers-color-scheme: dark)"),l$=e=>(Yh.addEventListener("change",e),()=>Yh.removeEventListener("change",e)),i$=()=>Yh.matches?"dark":"light";function N2(){return(0,O2.useSyncExternalStore)(l$,i$)}function D2(e){return getComputedStyle(document.documentElement).getPropertyValue(`--${e}`).trim()}var Sd={text:260,ease:"cubic-bezier(.23,1,.32,1)"},Hr=new Map,Br=new Map,qr=matchMedia("(prefers-reduced-motion: reduce)"),k2=()=>qr.matches||document.body.classList.contains("keyboard");function x2(e,t){let n=Hr.get(e);n||(n=new zs,Hr.set(e,n));let a={duration:Sd.text,ease:Sd.ease,scale:!1,disabled:k2(),respectReducedMotion:!0};n.needsRecreate(a)&&n.attach(e,a),n.update(t)}function Aa(e,t,n=""){let a=l=>String(l).replace(/[&<>"']/g,i=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[i]);return`<span data-morph="${a(e)}" class="morph-text ${a(n)}">${a(t)}</span>`}function U2(e,t,n){let a=document.getElementById("app");tf(a,`<div id="app">${e}</div>`,{childrenOnly:!0,getNodeKey:l=>l.id||l.dataset?.uiKey||l.dataset?.morph,onBeforeElUpdated(l,i){return l.dataset.morph&&l.dataset.morph===i.dataset.morph?(x2(l,i.textContent),!1):l.hasAttribute("data-flow-map")&&i.hasAttribute("data-flow-map")||l.dataset.chart&&l.dataset.chart===i.dataset.chart&&l.dataset.hostId===i.dataset.hostId?!1:!l.isEqualNode(i)}});for(let[l,i]of Hr)l.isConnected||(i.destroy(),Hr.delete(l));for(let[l,i]of Br)l.isConnected||(i.unmount(),Br.delete(l));a.querySelectorAll("[data-morph]").forEach(l=>{Hr.has(l)||x2(l,l.textContent)}),a.querySelectorAll("[data-chart]").forEach(l=>{Br.has(l)||Br.set(l,(0,L2.createRoot)(l));let i=t.hosts?.find(o=>o.id===l.dataset.hostId)??t.machine;Br.get(l).render((0,Me.createElement)(s$,{key:`${t.mode}:${i.id??"this-machine"}`,snapshot:t,machine:i,error:n,mini:l.dataset.chart==="cpu-mini"}))})}var z2=e=>new Date(e*1e3).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"}),Ih=(e,t)=>t==="cpuPercent"?`${e.toFixed(1)}%`:`${(e/1024**3).toFixed(1)} GiB`;function o$({points:e,color:t}){if(e.length<2)return(0,Me.createElement)("div",{className:"chart-empty"},e.length?"Waiting for another sample":"No measurements supplied");let n=e[0].time,a=e.at(-1).time,l=Math.max(1,...e.map(o=>o.value)),i=e.map((o,s)=>`${s?"L":"M"}${((o.time-n)/(a-n)*580+10).toFixed(2)},${(135-o.value/l*110).toFixed(2)}`).join(" ");return(0,Me.createElement)("svg",{viewBox:"0 0 600 160",preserveAspectRatio:"none","aria-hidden":!0},(0,Me.createElement)("path",{d:i,stroke:t,strokeWidth:1.5,fill:"none",vectorEffect:"non-scaling-stroke"}))}function s$({snapshot:e,machine:t,error:n,mini:a}){let l=N2(),[i,o]=(0,Me.useState)("cpuPercent"),[s,r]=(0,Me.useState)(null),[d,u]=(0,Me.useState)(qr.matches),[p,f]=(0,Me.useState)(!1),c=(0,Me.useRef)(null);(0,Me.useEffect)(()=>{let T=()=>u(qr.matches);qr.addEventListener("change",T);let O=new IntersectionObserver(([E])=>f(E.isIntersecting));return O.observe(c.current),()=>{qr.removeEventListener("change",T),O.disconnect()}},[]);let v=R2(t.history??[],i,e.interval),S=v.at(-1),y=D2(i==="cpuPercent"?"chart":"blue"),m=i==="cpuPercent"?v:v.map(T=>({...T,value:T.value/1024**3})),h=!!n||bd({...t,observedAt:t.observedAt??(t.id?null:e.observedAt)},e.interval)!=="sampled",g=m.length>=2&&!d&&p,b=a?300:Math.max(300,(S?.time??0)-(v[0]?.time??0)+e.interval*2),M=s==null?S:C2(v,s),$=T=>i==="cpuPercent"?`${T.toFixed(0)}%`:`${T.toFixed(1)} GiB`,w=T=>{if(!["ArrowLeft","ArrowRight","Home","End","Escape"].includes(T.key)||!v.length)return;T.preventDefault();let O=v.indexOf(M),E=T.key==="Home"?0:["End","Escape"].includes(T.key)?v.length-1:Math.min(v.length-1,Math.max(0,O+(T.key==="ArrowLeft"?-1:1)));r(v[E].time)};return(0,Me.createElement)("div",{ref:c,className:a?"sampled-chart mini-chart":"sampled-chart"},!a&&(0,Me.createElement)("div",{className:"sample-chart-header"},(0,Me.createElement)("div",{className:"chart-metric-tabs",role:"group","aria-label":"Machine reading"},...[["cpuPercent","CPU"],["memoryUsed","System RAM"]].map(([T,O])=>(0,Me.createElement)("button",{key:T,type:"button","aria-pressed":i===T,onClick:()=>{o(T),r(null)}},O))),(0,Me.createElement)("span",{className:"sample-reading"},(0,Me.createElement)(B0,{duration:Sd.text,ease:Sd.ease,scale:!1,disabled:k2()},S?Ih(S.value,i):"\u2014"))),(0,Me.createElement)("div",{className:"liveline-canvas","aria-hidden":!0},g?(0,Me.createElement)(_2,{data:m,value:m.at(-1).value,window:b,theme:l,color:y,grid:!a,badge:!1,momentum:!1,pulse:!1,fill:!1,scrub:!a,paused:h,lineWidth:1.5,padding:a?{top:5,right:4,bottom:5,left:4}:{top:16,right:68,bottom:28,left:10},formatValue:$,formatTime:z2,onHover:T=>r(T?.time??null)}):(0,Me.createElement)(o$,{points:m,color:y})),!a&&(0,Me.createElement)("div",{className:"sample-readout",tabIndex:0,role:"group","aria-label":"Exact samples. Use left and right arrows to inspect readings.",onKeyDown:w},(0,Me.createElement)("span",{className:"sample-crosshair","aria-hidden":!0},"+"),(0,Me.createElement)("span",null,s==null?"Latest sample":"Nearest sample"),(0,Me.createElement)("strong",null,M?`${z2(M.time)} \xB7 ${Ih(M.value,i)}`:"Awaiting a reading"),(0,Me.createElement)("span",{className:"sample-cadence"},h?"Reading not current":`Every ${e.interval}s`)),!a&&(0,Me.createElement)("p",{className:"chart-method"},d?"Sampled readings. Use the arrow keys on the readout to inspect each measurement.":"Curve interpolated between samples; the latest value is held until the next poll."),a&&(0,Me.createElement)("span",{className:"sr-only"},S?`Latest CPU sample: ${Ih(S.value,i)}. Collected every ${e.interval} seconds.`:"Awaiting CPU samples"))}function B2(e){let t=document.getElementById("inspector");tf(t,`<dialog>${e}</dialog>`,{childrenOnly:!0,getNodeKey:n=>n.id||(n.dataset?.inspect?`${n.dataset.inspect}:${n.dataset.key}`:n.dataset?.inspectorTab?`tab:${n.dataset.inspectorTab}`:void 0),onBeforeElUpdated:(n,a)=>!n.isEqualNode(a)})}var $e={direct:{label:"Direct API",short:"Direct API",color:"var(--route-direct)"},local:{label:"Local runtime",short:"Local",color:"var(--route-local)"},router:{label:"Router",short:"Router",color:"var(--route-router)"},gateway:{label:"Gateway",short:"Gateway",color:"var(--route-gateway)"},unknown:{label:"Unclassified",short:"Unclassified",color:"var(--route-unknown)"}},Vh=e=>String(e??"").trim().toLowerCase();function r$(e){return e.kind==="gateway"||e.kind==="router"?e.kind:e.kind==="provider"?"direct":e.kind==="runtime"&&["local","private"].includes(e.location)?"local":"unknown"}function Ea(e,t={}){if(Object.hasOwn($e,e.routeKind))return e.routeKind;let n=Vh(e.route);if(!n||n==="unattributed route")return"unknown";let a=new Set((t.inventory??[]).filter(l=>Vh(l.name)===n).map(r$).filter(l=>l!=="unknown"));return a.size?a.size===1?[...a][0]:"unknown":(t.sources??[]).some(l=>(l.kind==="Local runtime"||l.kind==="Model runtime"&&["local","private"].includes(l.location))&&Vh(l.name)===n)?"local":n==="direct"||n==="direct api"?"direct":"unknown"}function Ad(e,t){let n=Object.fromEntries(Object.keys($e).map(a=>[a,0]));for(let a of e)n[Ea(a,t)]+=Jt(a,t);return n}function Sl(e){return!!e.records?.length||(e.sources??[]).some(t=>(["activity","sample-activity"].includes(t.id)||t.id?.startsWith("project-log:"))&&t.state==="connected")}function q2(e,t=e.records??[]){let n=Sl(e),a=fa(t.filter(i=>!["completed","running","failed"].includes(i.status)),e),l=fa(t.filter(i=>i.status==="failed"),e);return{known:n,count:n?fa(t,e):null,failures:!n||a?null:l,reportedFailures:l,unknownStatuses:a}}var H2={direct:'<circle cx="3.5" cy="10" r="1.75"/><path d="M5.25 10h9.5"/><circle cx="16.5" cy="10" r="1.75"/>',local:'<path d="M7 5h6a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2ZM8 2v3m4-3v3M8 15v3m4-3v3M2 8h3m-3 4h3m10-4h3m-3 4h3M8 8h4v4H8Z"/>',router:'<circle cx="3" cy="10" r="1.5"/><path d="M4.5 10H8a2 2 0 0 0 2-2V6a2 2 0 0 1 2-2h3.5M8 10a2 2 0 0 1 2 2v2a2 2 0 0 0 2 2h3.5"/><circle cx="17" cy="4" r="1.5"/><circle cx="17" cy="16" r="1.5"/>',gateway:'<path d="M7 6V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2M7 14v2a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1v-2M2 10h16m-3-3 3 3-3 3"/>',unknown:'<path d="M7 3.7a7 7 0 0 1 6 0M16.3 7a7 7 0 0 1 0 6M13 16.3a7 7 0 0 1-6 0M3.7 13a7 7 0 0 1 0-6"/><circle cx="10" cy="10" r="1" fill="currentColor" stroke="none"/>'};function Al(e){return`<svg class="route-icon" viewBox="0 0 20 20" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">${H2[e]??H2.unknown}</svg>`}var pi=e=>String(e??"").replace(/[&<>"']/g,t=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[t]),u$='<svg class="select-chevron" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m4.5 6.25 3.5 3.5 3.5-3.5"/></svg>',c$='<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m3.5 8 3 3 6-6"/></svg>';function Gr({id:e,label:t,value:n,options:a,disabled:l=!1}){let i=a.find(o=>o.value===n);return`<button type="button" id="${pi(e)}" class="select-trigger" role="combobox" aria-label="${pi(t)}" aria-haspopup="listbox" aria-expanded="false" aria-controls="${pi(e)}-options" value="${pi(n)}" data-select-options="${pi(JSON.stringify(a))}" ${l?"disabled":""}><span class="select-value">${pi(i?.label??"Choose an option")}</span>${u$}</button>`}var Z=null,Kh=()=>Z!==null;function El(e=!1){if(!Z)return;let{trigger:t,menu:n}=Z;Z=null,t.setAttribute("aria-expanded","false"),t.removeAttribute("aria-activedescendant"),n.remove(),e&&t.isConnected&&t.focus({preventScroll:!0})}function Pi(e,t=!0){if(!Z||e<0||Z.options[e]?.disabled)return;Z.index=e;let n=[...Z.menu.children];n.forEach((a,l)=>a.classList.toggle("is-active",l===e)),Z.trigger.setAttribute("aria-activedescendant",n[e].id),t&&n[e].scrollIntoView({block:"nearest",behavior:"instant"})}function G2(){if(!Z)return;let{trigger:e,menu:t}=Z,n=e.getBoundingClientRect(),a=12,l=6,i=innerHeight-n.bottom-a-l,o=n.top-a-l,s=i<Math.min(300,t.scrollHeight)&&o>i;t.style.width=`${Math.min(Math.max(n.width,250),innerWidth-a*2)}px`,t.style.maxHeight=`${Math.max(60,Math.min(340,s?o:i))}px`,t.style.left=`${Math.max(a,Math.min(n.left,innerWidth-t.offsetWidth-a))}px`,t.style.top=`${s?Math.max(a,n.top-t.offsetHeight-l):n.bottom+l}px`}function j2(e){if(e.disabled)return;El();let t=JSON.parse(e.dataset.selectOptions);if(!t.some(l=>!l.disabled))return;let n=document.createElement("div");n.id=e.getAttribute("aria-controls"),n.className="select-menu",n.setAttribute("role","listbox"),n.setAttribute("aria-label",e.getAttribute("aria-label")),n.innerHTML=t.map((l,i)=>`<div class="select-option" id="${pi(n.id)}-${i}" role="option" aria-selected="${l.value===e.value}" ${l.disabled?'aria-disabled="true"':""} data-option-index="${i}"><span>${pi(l.label)}</span>${l.value===e.value?c$:'<span class="select-check-space" aria-hidden="true"></span>'}</div>`).join(""),(e.closest("dialog")??document.body).append(n);let a=t.findIndex(l=>l.value===e.value&&!l.disabled);Z={trigger:e,menu:n,options:t,index:a<0?t.findIndex(l=>!l.disabled):a,query:"",typedAt:0},e.setAttribute("aria-expanded","true"),e.focus({preventScroll:!0}),G2(),Pi(Z.index)}function Xh(){if(!Z)return;let{trigger:e,options:t,index:n}=Z,a=t[n]?.value;if(a===void 0||t[n].disabled)return;let l=e.value!==a;e.value=a,e.querySelector(".select-value").textContent=t[n].label,El(!0),l&&e.dispatchEvent(new Event("change",{bubbles:!0}))}function d$(e){if(!Z)return;let t=Z.index;for(;t+e>=0&&t+e<Z.options.length;)if(t+=e,!Z.options[t].disabled){Pi(t);return}}document.addEventListener("pointerdown",e=>{if(Z){if(Z.menu.contains(e.target)){e.pointerType==="mouse"&&e.preventDefault();return}Z.trigger.contains(e.target)||El()}});document.addEventListener("click",e=>{let t=e.target.closest("[data-option-index]");if(Z&&t&&Z.menu.contains(t)){let a=Number(t.dataset.optionIndex);Z.options[a].disabled||(Pi(a,!1),Xh());return}let n=e.target.closest("[data-select-options]");n&&(Z?.trigger===n?El(!0):j2(n))});document.addEventListener("pointermove",e=>{if(!Z||e.pointerType!=="mouse")return;let t=e.target.closest("[data-option-index]");t&&Z.menu.contains(t)&&Pi(Number(t.dataset.optionIndex),!1)});document.addEventListener("keydown",e=>{let t=e.target.closest("[data-select-options]");if(!t||e.metaKey||e.ctrlKey||e.altKey&&!["ArrowDown","ArrowUp"].includes(e.key))return;let n=Z?.trigger===t;if(e.key==="Tab"){n&&Xh();return}if(e.key==="Escape"){n&&(e.preventDefault(),e.stopPropagation(),El(!0));return}let a=e.key.length===1&&e.key!==" ";if(!(!a&&!["ArrowDown","ArrowUp","Home","End","Enter"," "].includes(e.key))&&(document.body.classList.add("keyboard"),e.preventDefault(),e.stopPropagation(),n||j2(t),!!Z)){if(e.key==="Enter"||e.key===" "){n&&Xh();return}if(["ArrowDown","ArrowUp","Home","End"].includes(e.key)&&(Z.query="",Z.typedAt=0),e.key==="ArrowDown"||e.key==="ArrowUp"){n&&d$(e.key==="ArrowDown"?1:-1);return}if(e.key==="Home"){Pi(Z.options.findIndex(l=>!l.disabled));return}if(e.key==="End"){Pi(Z.options.findLastIndex(l=>!l.disabled));return}if(a){let l=performance.now();Z.query=l-Z.typedAt>700?e.key:Z.query+e.key,Z.typedAt=l;let i=Z.query.toLocaleLowerCase(),o=[...i].every(d=>d===i[0]),s=o?i[0]:i,r=o?Z.index+1:Z.index;for(let d=0;d<Z.options.length;d++){let u=(r+d)%Z.options.length,p=Z.options[u];if(!p.disabled&&p.label.toLocaleLowerCase().startsWith(s)){Pi(u);break}}}}},!0);document.addEventListener("focusin",e=>{Z&&e.target!==Z.trigger&&!Z.menu.contains(e.target)&&El()});document.addEventListener("scroll",e=>{Z&&!Z.menu.contains(e.target)&&El()},!0);window.addEventListener("resize",G2);var Y2=[["openai","OpenAI","openai.png",["openai","openai api"]],["anthropic","Anthropic","anthropic.png",["anthropic","anthropic api"]],["google","Google","google.png",["google","google ai","google api"]],["mistral","Mistral","mistral.png",["mistral","mistral ai","mistral api"]],["deepseek","DeepSeek","deepseek.ico",["deepseek","deepseek api"]],["cohere","Cohere","cohere.png",["cohere","cohere api"]],["qwen","Qwen","qwen.png",["qwen"]],["meta","Meta","meta.ico",["meta","meta ai"]],["nomic","Nomic","nomic.png",["nomic","nomic ai"]],["baai","BAAI","baai.png",["baai"]],["ollama","Ollama","ollama.png",["ollama"]],["vllm","vLLM","vllm.png",["vllm"]],["lm-studio","LM Studio","lm-studio.png",["lm studio"]],["baseten","Baseten","baseten.png",["baseten","baseten api"]],["groq","Groq","groq.ico",["groq","groq api","groqcloud"]],["cerebras","Cerebras","cerebras.png",["cerebras","cerebras api"]],["openrouter","OpenRouter","openrouter.png",["openrouter"]],["huggingface","Hugging Face","huggingface.svg",["hugging face","huggingface"]],["huggingface-endpoints","Hugging Face Endpoints","huggingface.svg",["hugging face endpoints","hugging face inference endpoints"]],["huggingface-router","Hugging Face Router","huggingface.svg",["hugging face router","hugging face inference providers"]],["openmerit","OpenMerit",null,["openmerit"]]],Ed=new Map(Y2.map(([e,t,n])=>[e,Object.freeze({key:e,label:t,src:n?`/brands/${n}`:"/favicon.svg"})])),f$=new Map(Y2.flatMap(([e,,,t])=>t.map(n=>[n,e]))),I2=e=>String(e??"").trim().toLowerCase();function Dt(e){return Ed.get(f$.get(I2(e)))??null}var p$=[["openai",["openai"],/^(?:gpt-(?:oss-)?\d|o[134](?:-|$)|text-embedding-(?:3|ada)(?:-|$))/],["anthropic",["anthropic"],/^claude-(?:\d|sonnet(?:-|$)|opus(?:-|$)|haiku(?:-|$))/],["google",["google"],/^(?:gemini-\d|gemma-?\d)/],["deepseek",["deepseek","deepseek-ai"],/^deepseek-(?:r\d|v\d|coder(?:-|$)|llm(?:-|$))/],["mistral",["mistralai","mistral"],/^(?:mistral|mixtral|ministral|codestral|devstral|magistral)(?:-|\d)/],["cohere",["cohere","cohereforai"],/^(?:command-(?:a|r)(?:-|$)|embed-(?:v\d|english(?:-|$)|multilingual(?:-|$)))/],["qwen",["qwen"],/^qwen(?:-?\d|-(?:coder|vl)(?:-|$))/],["meta",["meta","meta-llama"],/^llama-?\d/],["nomic",["nomic-ai"],/^nomic-embed-(?:text|vision)(?:-|:|$)/],["baai",["baai"],/^bge-(?:reranker|m3|large|base|small)(?:-|:|$)/]];function In(e){if(e?.creatorConflict)return null;if(e?.modelCreator)return Dt(e.modelCreator);let t=I2(typeof e=="string"?e:e?.model??e?.name).replace(/\s*·\s*|\s+/g,"-"),n=t.split("/");if(n.length>2)return null;let[a,l]=n.length===2?n:[null,t],i=p$.find(([,o,s])=>(!a||o.includes(a))&&s.test(l));return i?Ed.get(i[0]):null}var m$=e=>String(e).replace(/[&<>"']/g,t=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[t]);function jr(e,t=18){return!e||Ed.get(e.key)!==e?"":`<img class="brand-icon" data-brand="${e.key}" src="${e.src}" width="${t}" height="${t}" style="--brand-size:${t}px" alt="" aria-hidden="true" title="${m$(e.label)}" decoding="async">`}function V2(e,t,n,a=18){return!e||Ed.get(e.key)!==e?"":`<image class="map-brand-icon" data-brand="${e.key}" href="${e.src}" x="${t}" y="${n}" width="${a}" height="${a}" preserveAspectRatio="xMidYMid meet" aria-hidden="true"/>`}var ie=(e,t,n,a={})=>Object.freeze({key:e,name:t,type:n,aliases:[],credentials:[],endpoints:[],hosts:[],...a}),Qh="[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?",h$=e=>new RegExp(`^(?:${Qh}\\.)+${e.replaceAll(".","\\.")}$`),K2=e=>new RegExp(`^${Qh}\\.${e.replaceAll(".","\\.")}$`),Q2="[a-z]{2}(?:-[a-z]+)+-\\d+",g$=h$("endpoints.huggingface.cloud"),v$=K2("openai.azure.com"),y$=K2("services.ai.azure.com"),b$=new RegExp(`^bedrock-runtime(?:-fips)?\\.${Q2}\\.amazonaws\\.com(?:\\.cn)?$`),S$=new RegExp(`^runtime(?:-fips)?\\.sagemaker\\.${Q2}\\.amazonaws\\.com(?:\\.cn)?$`),A$=/^(?:[a-z]+(?:-[a-z]+)*\d+-)?aiplatform\.googleapis\.com$/,X2=new RegExp(`^${Qh}\\.(?:cn-beijing|cn-hongkong|ap-southeast-1|ap-northeast-1)\\.maas\\.aliyuncs\\.com$`),Z2=Object.freeze([ie("openai","OpenAI","model-api",{aliases:["openai api"],credentials:["OPENAI_API_KEY"],endpoints:["OPENAI_BASE_URL","OPENAI_API_BASE"],hosts:["api.openai.com"]}),ie("anthropic","Anthropic","model-api",{aliases:["anthropic api"],credentials:["ANTHROPIC_API_KEY"],endpoints:["ANTHROPIC_BASE_URL"],hosts:["api.anthropic.com"]}),ie("openrouter","OpenRouter","gateway",{credentials:["OPENROUTER_API_KEY"],endpoints:["OPENROUTER_BASE_URL"],hosts:["openrouter.ai"]}),ie("google","Google","model-api",{aliases:["google ai","google api","gemini api"],credentials:["GOOGLE_GENERATIVE_AI_API_KEY","GEMINI_API_KEY"],endpoints:["GOOGLE_GEMINI_BASE_URL","GEMINI_BASE_URL"],hosts:["generativelanguage.googleapis.com"]}),ie("groq","Groq","inference-cloud",{aliases:["groq api","groqcloud"],credentials:["GROQ_API_KEY"],endpoints:["GROQ_BASE_URL"],hosts:["api.groq.com"]}),ie("cerebras","Cerebras","inference-cloud",{aliases:["cerebras api"],credentials:["CEREBRAS_API_KEY"],endpoints:["CEREBRAS_BASE_URL"],hosts:["api.cerebras.ai"]}),ie("baseten","Baseten","inference-cloud",{aliases:["baseten api"],credentials:["BASETEN_API_KEY"],endpoints:["BASETEN_BASE_URL"],hosts:["inference.baseten.co"],match:e=>/^model-[a-z0-9-]+\.api\.baseten\.co$/.test(e.hostname),redact:e=>e.replace(/^model-[a-z0-9-]+(?=\.api\.baseten\.co$)/,"model-\u2026")}),ie("huggingface-endpoints","Hugging Face Endpoints","inference-cloud",{aliases:["hugging face inference endpoints"],endpoints:["HF_INFERENCE_ENDPOINT","HF_ENDPOINT_URL","HUGGINGFACE_ENDPOINT_URL"],match:e=>g$.test(e.hostname),redact:()=>"\u2026.endpoints.huggingface.cloud"}),ie("huggingface-router","Hugging Face Router","router",{aliases:["hugging face inference providers"],hosts:["router.huggingface.co"]}),ie("mistral","Mistral","model-api",{aliases:["mistral ai","mistral api"],credentials:["MISTRAL_API_KEY"],endpoints:["MISTRAL_BASE_URL","MISTRAL_SERVER_URL"],hosts:["api.mistral.ai"]}),ie("deepseek","DeepSeek","model-api",{aliases:["deepseek api"],credentials:["DEEPSEEK_API_KEY"],endpoints:["DEEPSEEK_BASE_URL"],hosts:["api.deepseek.com"]}),ie("cohere","Cohere","model-api",{aliases:["cohere api"],credentials:["COHERE_API_KEY","CO_API_KEY"],endpoints:["COHERE_BASE_URL"],hosts:["api.cohere.ai","api.cohere.com"]}),ie("xai","xAI","model-api",{aliases:["xai api"],credentials:["XAI_API_KEY"],endpoints:["XAI_BASE_URL"],hosts:["api.x.ai"]}),ie("voyage","Voyage AI","model-api",{aliases:["voyage","voyageai"],credentials:["VOYAGE_API_KEY"],endpoints:["VOYAGE_BASE_URL"],hosts:["api.voyageai.com"]}),ie("jina","Jina AI","model-api",{aliases:["jina"],endpoints:["JINA_BASE_URL"],hosts:["api.jina.ai"]}),ie("together","Together AI","inference-cloud",{aliases:["together"],credentials:["TOGETHER_API_KEY"],endpoints:["TOGETHER_BASE_URL"],hosts:["api.together.ai","api.together.xyz"]}),ie("fireworks","Fireworks AI","inference-cloud",{aliases:["fireworks"],credentials:["FIREWORKS_API_KEY"],endpoints:["FIREWORKS_BASE_URL"],hosts:["api.fireworks.ai"]}),ie("deepinfra","DeepInfra","inference-cloud",{credentials:["DEEPINFRA_API_KEY","DEEPINFRA_API_TOKEN"],endpoints:["DEEPINFRA_BASE_URL"],hosts:["api.deepinfra.com"]}),ie("replicate","Replicate","inference-cloud",{credentials:["REPLICATE_API_TOKEN"],endpoints:["REPLICATE_BASE_URL"],hosts:["api.replicate.com"]}),ie("nvidia-api","NVIDIA API Catalog","inference-cloud",{endpoints:["NVIDIA_BASE_URL","NVIDIA_NIM_BASE_URL"],hosts:["integrate.api.nvidia.com"]}),ie("sambanova","SambaNova","inference-cloud",{credentials:["SAMBANOVA_API_KEY"],endpoints:["SAMBANOVA_BASE_URL"],hosts:["api.sambanova.ai"]}),ie("novita","Novita AI","inference-cloud",{aliases:["novita"],credentials:["NOVITA_API_KEY"],endpoints:["NOVITA_BASE_URL"],hosts:["api.novita.ai"]}),ie("nebius","Nebius Token Factory","inference-cloud",{aliases:["nebius ai studio"],endpoints:["NEBIUS_BASE_URL"],hosts:["api.studio.nebius.ai","api.studio.nebius.com"]}),ie("siliconflow","SiliconFlow","inference-cloud",{credentials:["SILICONFLOW_API_KEY"],endpoints:["SILICONFLOW_BASE_URL"],hosts:["api.siliconflow.com","api.siliconflow.cn"]}),ie("azure-openai","Azure OpenAI","inference-cloud",{endpoints:["AZURE_OPENAI_ENDPOINT","AZURE_OPENAI_BASE_URL","AZURE_OPENAI_API_BASE"],match:e=>v$.test(e.hostname),redact:()=>"\u2026.openai.azure.com"}),ie("azure-foundry","Azure AI Foundry","inference-cloud",{aliases:["microsoft foundry"],endpoints:["AZURE_AI_ENDPOINT","AZURE_AI_INFERENCE_ENDPOINT","AZURE_INFERENCE_ENDPOINT"],match:e=>y$.test(e.hostname)&&/^\/(?:$|(?:openai|models)(?:\/|$))/.test(e.pathname),redact:()=>"\u2026.services.ai.azure.com"}),ie("bedrock","Amazon Bedrock","inference-cloud",{aliases:["aws bedrock","bedrock"],credentials:["AWS_BEARER_TOKEN_BEDROCK"],endpoints:["AWS_ENDPOINT_URL_BEDROCK_RUNTIME","BEDROCK_ENDPOINT_URL","BEDROCK_BASE_URL"],match:e=>b$.test(e.hostname)}),ie("sagemaker","Amazon SageMaker","inference-cloud",{aliases:["aws sagemaker","sagemaker"],endpoints:["AWS_ENDPOINT_URL_SAGEMAKER_RUNTIME","SAGEMAKER_ENDPOINT_URL","SAGEMAKER_BASE_URL"],match:e=>S$.test(e.hostname)}),ie("vertex","Google Vertex AI","inference-cloud",{aliases:["vertex ai","vertex"],endpoints:["VERTEX_AI_ENDPOINT","VERTEX_AI_BASE_URL"],match:e=>A$.test(e.hostname)}),ie("cloudflare-workers-ai","Cloudflare Workers AI","inference-cloud",{aliases:["workers ai"],endpoints:["CLOUDFLARE_WORKERS_AI_BASE_URL"],match:e=>e.hostname==="api.cloudflare.com"&&/^\/client\/v4\/accounts\/[a-zA-Z0-9_-]+\/ai(?:\/|$)/.test(e.pathname)}),ie("cloudflare-ai-gateway","Cloudflare AI Gateway","gateway",{endpoints:["CLOUDFLARE_AI_GATEWAY_URL"],hosts:["gateway.ai.cloudflare.com"]}),ie("portkey","Portkey","gateway",{credentials:["PORTKEY_API_KEY"],endpoints:["PORTKEY_BASE_URL","PORTKEY_GATEWAY_URL"],hosts:["api.portkey.ai"]}),ie("vercel-ai-gateway","Vercel AI Gateway","gateway",{endpoints:["AI_GATEWAY_BASE_URL","VERCEL_AI_GATEWAY_BASE_URL"],hosts:["ai-gateway.vercel.sh"]}),ie("dashscope","Alibaba Cloud Model Studio","inference-cloud",{aliases:["dashscope","alibaba model studio"],credentials:["DASHSCOPE_API_KEY"],endpoints:["DASHSCOPE_BASE_URL","DASHSCOPE_API_BASE"],hosts:["dashscope.aliyuncs.com","dashscope-intl.aliyuncs.com","dashscope-us.aliyuncs.com","cn-hongkong.dashscope.aliyuncs.com"],match:e=>X2.test(e.hostname),redact:e=>X2.test(e)?"\u2026.maas.aliyuncs.com":e}),ie("minimax","MiniMax","model-api",{credentials:["MINIMAX_API_KEY"],endpoints:["MINIMAX_BASE_URL"],hosts:["api.minimax.io"]}),ie("moonshot","Moonshot AI","model-api",{aliases:["moonshot","kimi api"],credentials:["MOONSHOT_API_KEY"],endpoints:["MOONSHOT_BASE_URL"],hosts:["api.moonshot.ai"]}),ie("zai","Z.AI","model-api",{aliases:["zai"],credentials:["ZAI_API_KEY"],endpoints:["ZAI_BASE_URL"],hosts:["api.z.ai"]}),ie("perplexity-sonar","Perplexity Sonar","model-api",{endpoints:["PERPLEXITY_BASE_URL"],match:e=>e.hostname==="api.perplexity.ai"&&/^(?:\/?|\/chat\/completions\/?|\/v1\/?)$/.test(e.pathname)}),ie("perplexity-router","Perplexity Router","router",{match:e=>e.hostname==="api.perplexity.ai"&&/^\/router(?:\/|$)/.test(e.pathname)}),ie("ollama","Ollama","runtime"),ie("vllm","vLLM","runtime"),ie("lm-studio","LM Studio","runtime")]),E$=new Map(Z2.flatMap(e=>[e.name,...e.aliases].map(t=>[t.toLowerCase(),e]))),Zh=e=>E$.get(String(e??"").trim().toLowerCase())??null,F2=Object.freeze(Z2.filter(e=>e.credentials.length||e.endpoints.length)),t_=Object.freeze(F2.flatMap(e=>e.credentials)),n_=Object.freeze(F2.flatMap(e=>e.endpoints));var Fh=new WeakMap;function J2(e){if(Fh.has(e))return Fh.get(e);let t=new Map,n=new Map;for(let l of e.deployments??[])t.set(l.id,t.has(l.id)?null:l);for(let l of e.inventory??[]){let i=l.kind==="runtime"?"local":l.kind==="provider"?"direct":l.kind,o=JSON.stringify([l.name,i]);n.set(o,n.has(o)?null:l)}let a={deployments:t,connections:n,pools:new Map((e.capacityPools??[]).map(l=>[l.id,l])),records:new WeakMap};return Fh.set(e,a),a}function Ta(e,t){return e.path?.length?e.path:[{name:e.route||"Unattributed route",kind:Ea(e,t)}]}function wa(e,t){if(!e.deploymentId)return null;let n=J2(t).deployments.get(e.deploymentId);return n?.model===e.model&&n.provider===e.provider?n:null}function Jh(e,t){let n=J2(t);if(n.records.has(e))return n.records.get(e);let a=new Set(wa(e,t)?.poolIds??[]);for(let i of Ta(e,t)){let o=n.connections.get(JSON.stringify([i.name,i.kind]));for(let s of o?.poolIds??[])a.add(s)}let l=[...a].map(i=>n.pools.get(i)).filter(Boolean);return n.records.set(e,l),l}function P2(e,t=15,n=Date.now()){let a=n-Date.parse(e.observedAt);return!Number.isFinite(a)||a<0?"unknown":a>t*3e3?"stale":Object.values(e.metrics??{}).some(l=>typeof l=="number")?"sampled":"unknown"}function Ph(e){let t=e.metrics??{},n=[],a=(l,i,o,s,r="count")=>{t[o]==null&&t[s]==null||n.push({key:l,label:i,value:t[o]??null,limit:t[s]??null,unit:r,ratio:t[o]!=null&&t[s]>0?t[o]/t[s]:null})};return a("requests","Requests in quota window","requestsUsed","requestsLimit"),a("tokens","Tokens in quota window","tokensUsed","tokensLimit"),a("running","Running / concurrency limit","running","concurrencyLimit"),a("memory","Runtime memory","memoryUsedBytes","memoryTotalBytes","bytes"),t.cachePercent!=null&&n.push({key:"cache",label:"Inference cache used",value:t.cachePercent,limit:100,unit:"percent",ratio:t.cachePercent/100}),t.waiting!=null&&n.push({key:"waiting",label:"Waiting requests",value:t.waiting,limit:null,unit:"count",ratio:null}),n}function W2(e,t,n){let a=n.filter(s=>Jh(s,t).some(r=>r.id===e.id)),l=new Map(a.filter(s=>s.agentId).map(s=>[s.agentId,s.agent||s.agentId])),i=new Set(a.map(s=>wa(s,t)?.id)),o=(t.deployments??[]).filter(s=>s.poolIds?.includes(e.id)||i.has(s.id));return{items:a,agents:l,deployments:o}}var eA=e=>Zh(e)?.key??Dt(e)?.key,Ir={"model-api":{label:"Model API",plural:"Model APIs",path:"direct"},"inference-cloud":{label:"Inference cloud",plural:"Inference clouds",path:"direct"},router:{label:"Router",plural:"Routers",path:"router"},gateway:{label:"Gateway",plural:"Gateways",path:"gateway"},runtime:{label:"Runtime",plural:"Runtimes",path:"local"},unknown:{label:"Unclassified",plural:"Unclassified",path:"unknown"}},tA=e=>e.endpointInventory||e.kind==="Local runtime",Yr=e=>String(e??"").trim().toLowerCase(),nA=e=>Yr(e)&&!["unattributed","unattributed route","direct","direct api"].includes(Yr(e));function T$(e){return["router","gateway","runtime"].includes(e.kind)?e.kind:e.kind==="provider"&&["model-api","inference-cloud"].includes(e.serviceType)?e.serviceType:Zh(e.name)?.type??"unknown"}function aA(e,t=e.records??[]){let n=new Map,a=new Set,l=new Set(t),i=(u,p=!1)=>{if(!nA(u))return null;let f=Yr(u);if(n.has(f))return n.get(f);let c=eA(u);if(!p&&!a.has(f)&&c){let S=[...n.values()].filter(y=>eA(y.name)===c);if(S.length===1)return S[0].aliases.add(u),S[0]}let v={id:f,name:u,aliases:new Set([u]),explicitTypes:new Set,registryTypes:new Set,locations:new Set,endpoints:new Set,evidence:new Map,models:new Map,deployments:new Map,poolIds:new Set,records:new Set,paths:new Map,lastAt:null,configured:!1,declared:!1,reported:!1};return n.set(f,v),v},o=(u,p,f,c,v={})=>{if(!u)return;let S={sourceId:p||"inventory",field:f,detail:c,...v};u.evidence.set(JSON.stringify(S),S)},s=(u,p)=>{if(!u)return;let f=T$(p);(["router","gateway","runtime"].includes(p.kind)||["model-api","inference-cloud"].includes(p.serviceType)?u.explicitTypes:u.registryTypes).add(f),p.location&&p.location!=="unknown"&&u.locations.add(p.location)},r=(u,p)=>{if(!u)return;let f=p.model??p.name,c=JSON.stringify([p.provider,f]);f&&!u.models.has(c)&&u.models.set(c,{...p,name:f})},d=(e.inventory??[]).filter(u=>u.kind!=="model");for(let u of d)nA(u.name)&&a.add(Yr(u.name));for(let u of e.sources??[])tA(u)&&u.state!=="disabled"&&a.add(Yr(u.name));for(let u of d){let p=i(u.name,!0);if(p){s(p,u),u.state==="declared"?p.declared=!0:p.configured=!0;for(let f of u.poolIds??[])p.poolIds.add(f);for(let f of u.evidence??[])o(p,f.sourceId||"environment",f.field,f.basis==="repository-declaration"?"Code or configuration declaration":f.basis==="endpoint-host"?"Recognized endpoint host":"Credential variable present",f.file?{file:f.file,line:f.line,referenceId:f.referenceId}:{}),f.endpointHost&&p.endpoints.add(f.endpointHost);u.sourceId!=="repository"&&u.sourceId!=="environment"&&!u.sourceId?.startsWith("project:")&&o(p,u.sourceId||"inventory","inventory.name","Declared service")}}for(let u of e.sources??[]){if(!tA(u)||u.state==="disabled")continue;let p=i(u.name,!0);if(!p)continue;s(p,{name:u.name,kind:u.kind==="Model endpoint"?"unknown":"runtime",location:u.location??(u.kind==="Local runtime"?"local":"unknown")}),p.configured=!0;try{let c=new URL(u.detail);c.protocol==="http:"&&["localhost","127.0.0.1","[::1]"].includes(c.hostname)&&!c.username&&!c.password&&!c.search&&!c.hash&&c.pathname==="/"&&p.endpoints.add(c.host)}catch{}o(p,u.id,"runtime","Project endpoint inventory; placement is separate"),u.discoverySource&&o(p,u.discoverySource,u.discoveryField||"endpoint","Project endpoint declaration");let f=(e.capacityPools??[]).find(c=>c.id===`runtime:${u.id}`);f&&p.poolIds.add(f.id)}for(let u of e.models??[]){let p=i(u.provider);p&&(s(p,{name:u.provider,kind:"provider",location:u.location}),r(p,u),o(p,u.sourceId,"provider",u.state==="declared"?"Declared model reference":"Model inventory"),u.state==="configured"&&(p.configured=!0))}for(let u of e.deployments??[]){let p=i(u.provider);if(p){s(p,{name:u.provider,kind:"provider",location:u.location}),p.deployments.set(u.id,u),r(p,u);for(let f of u.poolIds??[])p.poolIds.add(f);o(p,u.sourceId,"deployments.provider","Deployment inventory"),u.state==="configured"&&(p.configured=!0)}}for(let u of e.records??[]){let p=new Set,f=Ta(u,e),c=i(u.provider);c&&(s(c,{name:u.provider,kind:"provider",location:u.location}),o(c,u.sourceId,"provider","Recorded serving service"),p.add(c));for(let v of f){let S=i(v.name);S&&(s(S,{name:v.name,kind:v.kind==="local"?"runtime":v.kind}),o(S,u.sourceId,u.path?.length?"path[].name":"route","Recorded connection"),p.add(S))}for(let v of p){if(v.reported=!0,(!v.lastAt||Date.parse(u.occurredAt)>Date.parse(v.lastAt))&&(v.lastAt=u.occurredAt),!l.has(u))continue;v.records.add(u),r(v,u);let S=JSON.stringify(f),y=v.paths.get(S)??{path:f,count:0};y.count+=Jt(u,e),v.paths.set(S,y);let m=wa(u,e);if(m&&v.deployments.set(m.id,m),v===c&&m)for(let h of Jh(u,e).filter(g=>m.poolIds?.includes(g.id)))v.poolIds.add(h.id)}}return[...n.values()].map(u=>{let p=u.explicitTypes.size?u.explicitTypes:u.registryTypes;p.size>1&&p.delete("unknown");let f=[u.explicitTypes.size?"Declared or reported role":p.has("unknown")?"Role not supplied":"Known service registry"],{explicitTypes:c,registryTypes:v,poolIds:S,...y}=u;return{...y,aliases:[...u.aliases],types:[...p],typeEvidence:f,locations:[...u.locations],endpoints:[...u.endpoints],evidence:[...u.evidence.values()],models:[...u.models.values()],deployments:[...u.deployments.values()],pools:(e.capacityPools??[]).filter(m=>u.poolIds.has(m.id)),records:[...u.records],paths:[...u.paths.values()]}}).sort((u,p)=>fa(p.records,e)-fa(u.records,e)||u.name.localeCompare(p.name))}var w$=e=>JSON.stringify([e.provider,e.model]),M$=e=>e.agentId?`agent:${e.agentId}`:`workload:${e.workload}`,$$=e=>[...e].sort((t,n)=>t.name.localeCompare(n.name)||t.key.localeCompare(n.key));function lA(e,t,{expandAll:n=!1,expansion:a=new Map}={}){let l=new Map,i=new Map,o=new Map,s=[],r=(m,h,g,b,M)=>{m.has(h)||m.set(h,{key:h,...g,count:0,connections:new Set,deployments:new Map});let $=m.get(h);return $.count+=M,$.connections.add(b),$};for(let m of e){let h=Ta(m,t),g=h[0],b=JSON.stringify([g]);i.has(b)||i.set(b,{key:b,id:`path:${b}`,type:"path",name:g.name,kind:g.kind,count:0,variants:new Set});let M=i.get(b);M.count+=Jt(m,t),M.variants.add(JSON.stringify(h));let $=M$(m),w=w$(m);r(l,$,{id:`work:${$}`,type:m.agentId?"agent":"workload",name:m.agent||m.agentId||m.workload,inspectKey:m.agentId||m.workload},b,Jt(m,t));let T=r(o,w,{id:`model:${w}`,type:"model",name:m.model,provider:m.provider,example:m},b,Jt(m,t)),O=wa(m,t);O&&T.deployments.set(O.id,O),s.push({work:$,path:b,model:w,count:Jt(m,t)})}let d=Object.keys($e),u=[...i.values()].sort((m,h)=>d.indexOf(m.kind)-d.indexOf(h.kind)||m.name.localeCompare(h.name)||m.key.localeCompare(h.key)),p=new Map(u.map((m,h)=>[m.key,h])),f=[],c=(m,h)=>{let g=new Map;for(let w of $$(m.values())){let T=[...w.connections].sort((_,C)=>p.get(_)-p.get(C)),O=JSON.stringify(T);g.has(O)||g.set(O,{id:`${h}-group:${O}`,side:h,keys:T,members:[],count:0});let E=g.get(O);E.members.push(w),E.count+=w.count}let b=[...g.values()].sort((w,T)=>p.get(w.keys[0])-p.get(T.keys[0])||w.id.localeCompare(T.id)),M=[],$=new Map;for(let w of b){w.names=w.keys.map(T=>i.get(T).name),w.label=h==="model"?"models":w.members.every(T=>T.type==="agent")?"agents":"workloads",w.expanded=a.get(w.id)??n,w.members.length>1&&(f.push(w),M.push({...w,type:"group",name:`${w.members.length} ${w.label}`}));for(let T of w.members){let O=w.members.length>1;(!O||w.expanded)&&M.push({...T,groupId:O?w.id:null}),$.set(T.key,{id:!O||w.expanded?T.id:w.id,groupId:O?w.id:null})}}return{nodes:M,owners:$}},v=c(l,"work"),S=c(o,"model"),y=new Map;for(let m of s){let h=v.owners.get(m.work),g=S.owners.get(m.model),b=i.get(m.path),M=[h.id,g.id,b.id,h.groupId,g.groupId].filter(Boolean);for(let[$,w,T]of[[h.id,b.id,"work"],[b.id,g.id,"model"]]){let O=JSON.stringify([$,w]);y.has(O)||y.set(O,{from:$,to:w,segment:T,kind:b.kind,count:0,related:new Set});let E=y.get(O);E.count+=m.count,M.forEach(_=>E.related.add(_))}}return{columns:[v.nodes,u,S.nodes],groups:f,edges:[...y.values()],workloadCount:l.size,connectionCount:i.size,modelCount:o.size,requestCount:fa(e,t)}}var iA,Wh,eg=0;async function oA(e){let t=++eg,n=document.querySelector("[data-flow-map]");if(!n){Wh?.renderFlowMap(null);return}if(!document.getElementById("flow-map-styles")){let a=document.createElement("link");a.id="flow-map-styles",a.rel="stylesheet",a.href="/flow.css",document.head.append(a)}try{Wh=await(iA??=import("/flow.js")),t===eg&&n.isConnected&&Wh.renderFlowMap(n,e)}catch{iA=null,t===eg&&n.isConnected&&(n.textContent="The map preview could not load. Use Original map to continue.")}}function sA({enabled:e,mode:t,navigator:n=globalThis.navigator,storage:a,fetcher:l=globalThis.fetch}){let i=0,o=0,s=0;return(r,d={})=>{try{if(!e()||n.doNotTrack==="1"||n.globalPrivacyControl===!0||(a??globalThis.localStorage).getItem("scout-analytics-opt-out")==="1"||(Date.now()-i>=6e4&&(i=Date.now(),o=0),o>=60||s>=2))return;o++,s++;let u;Promise.race([Promise.resolve().then(()=>l("/api/analytics",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({event:r,properties:r==="terminal_error"?d:{...d,mode:t()}}),signal:AbortSignal.timeout(1e3),credentials:"same-origin",redirect:"error"})),new Promise(p=>{u=setTimeout(p,1e3)})]).catch(()=>{}).finally(()=>{clearTimeout(u),s--})}catch{}}}var _$=e=>["Error","TypeError","RangeError","SyntaxError","ReferenceError","URIError","EvalError","AggregateError","AbortError"].includes(e?.name)?e.name:"Error";function Vr(e){try{let t=e?.stack,n=(typeof t=="string"?t.slice(0,8e3):"").split(`
|
|
149
|
-
`).slice(1,40).flatMap(a=>{let l=a.match(/(?:\(|\s|@)(https?:\/\/[^\s)]+):(\d+):(\d+)\)?$/);if(!l||l[1]!==new URL("/app.js",globalThis.location.href).href)return[];let i=Number(l[2]),o=Number(l[3]);return i>0&&i<=1e6&&o>0&&o<=1e6?[{filename:"app.js",lineno:i,colno:o}]:[]}).slice(0,8);return{error_type:_$(e),frames:n}}catch{return{error_type:"Error",frames:[]}}}var ua=sA({enabled:()=>A.info.telemetry===!0,mode:()=>A.mode}),Wi=(e,t="other")=>ua("terminal_interaction",{action:e,kind:["model","agent","task","service","source","host","deployment","pool","record","path"].includes(t)?t:"other"});window.addEventListener("error",e=>ua("terminal_error",{code:"uncaught_error",...Vr(e.error)}));window.addEventListener("unhandledrejection",e=>ua("terminal_error",{code:"uncaught_error",...Vr(e.reason)}));var _e=e=>document.querySelector(e),R=e=>String(e??"").replace(/[&<>"']/g,t=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[t]),Xe=e=>e==null?"\u2014":new Intl.NumberFormat("en",{notation:"compact",maximumFractionDigits:1}).format(e),G=e=>new Intl.NumberFormat("en").format(e),sa=(e,t)=>`${G(e)} ${t}${e===1?"":"s"}`,tn=e=>e==null?"\u2014":new Intl.NumberFormat("en",{style:"currency",currency:"USD",minimumFractionDigits:2,maximumFractionDigits:e>0&&e<.01?4:2}).format(e),Tl=e=>e==null?"\u2014":`${(e/1024**3).toFixed(1)} GiB`,eo=e=>e==null?"\u2014":e<1e3?`${Math.round(e)} ms`:`${(e/1e3).toFixed(2)} s`,R$=e=>{if(!e.length)return null;let t=[...e].sort((a,l)=>a-l),n=Math.floor(t.length/2);return t.length%2?t[n]:(t[n-1]+t[n])/2},Td=e=>{let t=e.filter(n=>typeof n=="number");return t.length?t.reduce((n,a)=>n+a,0):null},C$=e=>new Date(e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),bs=e=>{let t=Math.max(0,Math.floor((Date.now()-Date.parse(e))/1e3));return t<60?"just now":t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:t<2592e3?`${Math.floor(t/86400)}d ago`:new Date(e).toLocaleDateString([],{month:"short",day:"numeric",year:"numeric"})},rA={overview:'<rect x="3" y="3" width="6" height="6" rx="1"/><rect x="13" y="3" width="6" height="6" rx="1"/><rect x="3" y="13" width="6" height="6" rx="1"/><rect x="13" y="13" width="6" height="6" rx="1"/>',models:'<path d="m11 2 9 5-9 5-9-5 9-5Zm-9 9 9 5 9-5M2 15l9 5 9-5"/>',connections:'<rect x="2" y="8" width="5" height="6" rx="1.5"/><rect x="15" y="2" width="5" height="6" rx="1.5"/><rect x="15" y="14" width="5" height="6" rx="1.5"/><path d="M7 11h3c2 0 2-6 5-6m-5 6c2 0 2 6 5 6"/>',activity:'<path d="M2 12h4l3-7 4 13 3-6h4"/>',compute:'<rect x="5" y="5" width="12" height="12" rx="2"/><path d="M8 2v3m6-3v3M8 17v3m6-3v3M2 8h3m-3 6h3m12-6h3m-3 6h3"/><rect x="8" y="8" width="6" height="6" rx="1"/>',sources:'<circle cx="11" cy="11" r="3"/><path d="M11 2v3m0 12v3M2 11h3m12 0h3M4.6 4.6l2.1 2.1m8.6 8.6 2.1 2.1M4.6 17.4l2.1-2.1m8.6-8.6 2.1-2.1"/>',search:'<circle cx="9.5" cy="9.5" r="6"/><path d="m14 14 5 5"/>',arrow:'<path d="M4 11h14m-5-5 5 5-5 5"/>',refresh:'<path d="M18 7a8 8 0 1 0 1 8M18 2v5h-5"/>'},ig=e=>`<svg viewBox="0 0 22 22" fill="none" stroke="currentColor" stroke-width="1.35" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${rA[e]??rA.overview}</svg>`,O$='<svg viewBox="0 0 28 30" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" aria-hidden="true"><path d="M3 27V13a11 11 0 0 1 22 0v14M8 27V13a6 6 0 0 1 12 0v14M14 16v11"/></svg>',iu=["overview","models","services","activity","compute","sources"],mA={overview:"Overview",models:"Models",services:"Services",activity:"Activity",compute:"Local compute",sources:"Sources"},nn=document.documentElement.hasAttribute("data-comparison-demo"),Cn=new URLSearchParams(location.search).get("stage")==="after"?"after":"before",mn=nn?xl(new URLSearchParams(location.search).get("preference")).value:"default",Kr=null,hA=!1;document.addEventListener("toggle",e=>{e.target.matches?.(".comparison-decisions")&&(hA=e.target.open)},!0);var to=document.documentElement.hasAttribute("data-sample-preview"),A={data:null,page:location.hash==="#connections"?"services":iu.includes(location.hash.slice(1))?location.hash.slice(1):"overview",hours:0,filter:"all",search:"",mode:to||new URLSearchParams(location.search).has("sample")?"sample":"live",info:to?{defaultMode:"sample",hostedSample:!0}:{},error:"",fetching:!1,timer:null},mt=e=>fa(e,A.data),Vt=()=>!!(A.data?.mode==="sample"&&A.data.simulation),Rd=null,xt="",og=new URLSearchParams(location.search).get("map")==="flow",xd=!1,Jr=new Map,vs=location.hash==="#connections"?"map":"inventory",hs="all",Pr="",$d="all",tg="",Vn=0,wd=null;function sg(){return(wd?.data!==A.data||wd.hours!==A.hours)&&(wd={data:A.data,hours:A.hours,items:aA(A.data,De())}),wd.items}var Rn="all",Cd="",Ml="",Xr=null,Od=null,Wr=!1,ng=!1,Qr="deployments";function vi(){if(Xr?.data===A.data&&Xr.hours===A.hours)return Xr;let e=De(),t=A.data.capacityPools??[],n=A.data.deployments??[],a=new Map(t.map(l=>[l.id,W2(l,A.data,e)]));return Xr={data:A.data,hours:A.hours,items:e,pools:t,deployments:n,usage:a},Xr}var Md=null;function ou(){return(Md?.data!==A.data||Md.hours!==A.hours)&&(Md={data:A.data,hours:A.hours,...Wd(A.data.records,A.hours,A.data.observedAt),items:kg(A.data.records,A.hours,A.data.observedAt)}),Md}function De(){return ou().items}function Nd(e,t=!1){let{start:n,end:a}=ou();return Bg(e,a-n,t)}function uA(){let{start:e,end:t}=ou();return Ug((t-e)/60)}function N$(){let e=A.data.history??Pd(A.data.records,A.data.observedAt);return`<div class="history-coverage"><span>Available history <span class="history-dates">${e.first?`${new Date(e.first).toLocaleDateString([],{year:"numeric",month:"short",day:"numeric"})} \u2013 ${new Date(e.last).toLocaleDateString([],{year:"numeric",month:"short",day:"numeric"})}`:"No recorded requests"}</span></span><button class="text-button ${e.coverage==="partial"?"history-partial":""}" data-page="sources">${e.coverage==="partial"?"Partial history \xB7 review sources":"Recorded sources only \u2197"}</button></div>`}function mi(e){let t=new Map;for(let n of De()){let a=n[`${e}Id`];if(!a)continue;let l=t.get(a)??{id:a,name:n[e]||a,count:0,models:new Set,related:new Set};l.count+=Jt(n,A.data),l.models.add(`${n.provider}:${n.model}`);let i=e==="agent"?n.taskId:n.agent||n.agentId||n.workload;i&&l.related.add(i),t.set(a,l)}return[...t.values()].sort((n,a)=>a.count-n.count||n.name.localeCompare(a.name))}function D$(){let e=mi("agent"),t=mi("task");if(!e.length&&!t.length)return A.data.repository?.references.length?`<button class="text-button" data-page="sources">${G(A.data.repository.references.length)} code & configuration references \u2197</button>`:"Models, connections, and compute. Together, in one place.";let n=new Set(De().map(a=>a.route).filter(a=>a&&a!=="Unattributed route")).size;return`<span class="scope-summary" aria-label="Activity in the selected window">${e.length?`<button class="text-button scope-link" data-inspect="agent-list" data-key="all">${G(e.length)} ${e.length===1?"agent":"agents"}</button>`:""}${t.length?`<button class="text-button scope-link" data-inspect="task-list" data-key="all">${G(t.length)} ${t.length===1?"task":"tasks"}</button>`:""}<span>${G(n)} connections</span></span>`}function gs(e=De()){let t=e.filter(n=>n.currency==="USD");return{count:mt(e),input:Td(e.map(n=>n.inputTokens)),output:Td(e.map(n=>n.outputTokens)),tokens:Td(e.flatMap(n=>[n.inputTokens,n.outputTokens])),cost:Td(t.map(n=>n.cost)),costCount:mt(t.filter(n=>n.cost!=null)),estimated:t.some(n=>n.cost!=null&&n.costKind==="estimated"),unknownCostKind:t.some(n=>n.cost!=null&&!["reported","estimated"].includes(n.costKind)),latency:R$(e.filter(n=>n.status!=="running").map(n=>n.durationMs).filter(n=>n!=null)),failures:mt(e.filter(n=>n.status==="failed"))}}function zd(e=De(),t=48){let{start:n,end:a}=ou(),l=(a-n)/t,i=Array.from({length:t},(o,s)=>({at:n+s*l,cloud:0,local:0,unknown:0,paths:Object.fromEntries(Object.keys($e).map(r=>[r,0]))}));for(let o of e){let s=Math.min(t-1,Math.max(0,Math.floor((Date.parse(o.occurredAt)-n)/l)));i[s][o.location==="private"?"local":o.location]+=Jt(o,A.data),i[s].paths[Ea(o,A.data)]+=Jt(o,A.data)}return i}function gA(e,{color:t="var(--chart)",width:n=90,height:a=28,fill:l=!1,className:i=""}={}){let o=e.filter(u=>u!=null);if(!o.length)return`<svg class="${i}" viewBox="0 0 ${n} ${a}" aria-hidden="true"><path d="M0 ${a-4}h${n}" stroke="var(--line-strong)" stroke-dasharray="2 4"/></svg>`;let s=Math.max(1,...o),r="",d=!1;return e.forEach((u,p)=>{if(u==null){d=!1;return}let f=p*n/Math.max(1,e.length-1),c=a-3-u/s*(a-6);r+=`${d?"L":"M"}${f.toFixed(2)},${c.toFixed(2)} `,d=!0}),`<svg class="${i}" viewBox="0 0 ${n} ${a}" aria-hidden="true">${l&&!e.includes(null)?`<path d="${r}L${n},${a} L0,${a}Z" fill="${t}" opacity=".07"/>`:""}<path d="${r}" fill="none" stroke="${t}" stroke-width="1.25" vector-effect="non-scaling-stroke" stroke-linejoin="round" stroke-linecap="round"/></svg>`}function Zr(e){return{detected:"Detected",needs_access:"Needs access",connected:"Connected",partial:"Partial",not_found:"Not connected",unavailable:"Unavailable",disabled:"Disabled",configured:"Configured",declared:"Declared",available:"Available",observed:"Observed",loaded:"Loaded",installed:"Installed",unknown:"Unknown",completed:"Completed",running:"Reported running",failed:"Failed"}[e]??e}function rg(e){return`<span class="state ${R(e)}"><i class="status-dot ${["connected","loaded"].includes(e)?"":["partial","unavailable","failed","needs_access"].includes(e)?"warning":"dim"}"></i>${R(Zr(e))}</span>`}function ao(e,t,n=16){return`<span class="identity-label">${jr(t,n)}<span>${R(e)}</span></span>`}function ca(e,t=14){return ao(e,Dt(e),t)}function lo(e,t=16){return ao(e.model??e.name,In(e),t)}function vA(e){let t=Dt(e.provider);return t?.key===In(e)?.key?R(e.provider):ao(e.provider,t,13)}function ug(e){let t=(A.data.deployments??[]).filter(l=>l.poolIds.includes(e.id)).map(l=>l.provider);t.push(...A.data.inventory.filter(l=>l.poolIds?.includes(e.id)).map(l=>l.name));let a=[...new Set(t.map(l=>l.trim().toLowerCase()))].map(Dt);return a.length&&a.every(l=>l&&l.key===a[0]?.key)?a[0]:Dt(e.name)}function su(e,t=!1){let n=$e[e];return`<span class="route-badge" data-route-kind="${e}" style="--route-color:${n.color}">${Al(e)}${t?n.label:n.short}</span>`}function eu(e){let t=new Set(e.map(n=>Ea(n,A.data)));return Object.keys($e).filter(n=>t.has(n))}function x$(e){let t=eu(e);return t.length?t.map(n=>su(n)).join(""):'<span class="route-unobserved">No path observed</span>'}function z$(){let e=Ad(De(),A.data);return`<div class="route-legend" aria-label="Request path types">${Object.keys($e).filter(t=>t!=="unknown"||e.unknown).map(t=>su(t,!0)).join("")}</div>`}function yA(){let e=De(),t=Ad(e,A.data),n=Sl(A.data);return`<section class="path-summary" aria-label="Requests by path"><div class="path-summary-title"><h2>Request paths</h2><p>${Ns(A.hours)} \xB7 recorded only</p></div><div class="path-summary-items">${Object.entries($e).filter(([a])=>a!=="unknown"||t.unknown).map(([a,l])=>`<div class="path-summary-item" style="--route-color:${l.color}"><div>${su(a,!0)}${Aa(`path-total-${a}`,n?G(t[a]):"\u2014","path-total")}</div><span class="path-share-track" aria-hidden="true"><i style="width:${e.length?t[a]/mt(e)*100:0}%"></i></span></div>`).join("")}</div></section>`}function L$(){let e=A.data,t=!!A.error||!nn&&Date.now()-Date.parse(e.observedAt)>e.interval*3e3,n=e.sources.filter(o=>["connected","partial"].includes(o.state)).length,a=e.loading?e.loadError?"Collection delayed":"Reading sources":t?"Collection interrupted":`${n} of ${e.sources.length} sources`,l=!e.loading&&(t||n<e.sources.length),i=iu.map(o=>`<button id="tab-${o}" role="tab" aria-selected="${A.page===o}" aria-controls="terminal-panel" tabindex="${A.page===o?"0":"-1"}" data-ui-key="nav-${o}" data-page="${o}">${mA[o]}</button>`).join("");return`<div class="shell"><header class="terminal-header"><div class="terminal-header-inner">
|
|
150
|
-
<div class="terminal-masthead"><div class="terminal-identity"><button class="brand" data-action="about" aria-label="About OpenMerit">${O$}<span class="wordmark">openmerit</span></button><span class="terminal-product">Inference Terminal</span></div>
|
|
151
|
-
<div class="header-actions"><button class="environment-switch" data-action="workspace" aria-label="Choose environment" title="${R(e.project.name)} \xB7 ${e.mode==="sample"?"Sample environment":"Current project"}"><span class="environment-name">${R(e.project.name)}</span>${e.mode==="sample"?'<span class="environment-mode">Sample</span>':""}<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.2" aria-hidden="true"><path d="m5 7 3 3 3-3"/></svg></button><button class="header-search" data-action="search" aria-label="Find in your environment" title="Find anything \xB7 Command K">${ig("search")}<span>Search</span><kbd>\u2318 K</kbd></button></div>
|
|
152
|
-
</div><div class="terminal-navigation"><nav class="terminal-tabs" role="tablist" aria-label="Terminal views">${i}</nav><button class="source-status ${l?"attention":""}" data-page="sources" aria-label="${a}. View source coverage" title="${a} \xB7 ${e.mode==="sample"?"Fictional sample":`Every ${e.interval}s`}"><i class="status-dot ${l?"warning":""}"></i>${Aa("coverage-count",a)}${e.mode==="live"&&!t?`<span class="source-interval">${e.interval}s</span>`:""}</button></div>
|
|
153
|
-
</div></header><main id="main" class="main" tabindex="-1"><div id="terminal-panel" role="tabpanel" aria-labelledby="tab-${A.page}">${i4()}</div></main></div>`}function io(e,t,n=!0){return`<div class="page-heading"><div><h1>${e}</h1><p>${t}</p></div>${n?`<div class="heading-controls"><span class="collection-time"><i class="status-dot"></i>${Aa("freshness",nn?"Fixed 30-day scenario":A.error?"Disconnected":`Updated ${bs(A.data.observedAt)}`)}</span><div class="segmented" role="group" aria-label="Activity window">${Jd.map(a=>`<button data-hours="${a}" aria-pressed="${A.hours===a}">${Dn(a)}</button>`).join("")}</div></div>`:""}</div>${n?N$():""}`}function k$(){let e=gs(),t=nn&&Cn==="after"&&!A.data.simulation.feasible,n=new Set(De().map(s=>`${s.provider}:${s.model}`)).size,a=A.data.models.filter(s=>["local","private"].includes(s.location)).length,l=Sl(A.data),i=zd().map(s=>l?s.cloud+s.local+s.unknown:null);return`<section class="summary-grid" aria-label="Environment summary">${[["Models in view",A.data.models.length.toString().padStart(2,"0"),`${a} self-hosted \xB7 ${A.data.models.length-a} cloud / other`,null],[t?"Assigned-workload requests":Vt()?"Scenario requests":"Requests observed",l?G(e.count):"\u2014",l?`${n} models used \xB7 ${Dn(A.hours)}`:"Connect an activity source",i],[t?"Assigned-workload tokens":Vt()?"Scenario tokens":"Recorded tokens",Xe(e.tokens),e.tokens==null?"No token measurements yet":`${Xe(e.input)} input \xB7 ${Xe(e.output)} output`,null],[t?"Assigned-workload cost":Vt()?"Modeled token cost":"Recorded spend",tn(e.cost),t?"Partial cost \xB7 excludes unassigned workloads":e.cost==null?"Cost coverage not available":`${e.unknownCostKind?"USD \xB7 cost basis incomplete":e.estimated?"Includes estimates":"Reported USD"} \xB7 ${Xe(e.costCount)} / ${Xe(e.count)} requests priced`,null]].map(([s,r,d,u])=>`<div class="summary"><div class="summary-label">${s}</div><div class="summary-value">${Aa(`summary-${s.toLowerCase().replaceAll(" ","-")}`,r)}</div>${u?gA(u,{className:"summary-spark"}):""}<div class="summary-bottom">${d}</div></div>`).join("")}</section>`}function bA(e=!1){if(og)return xt&&!mi("agent").some(c=>c.id===xt)&&(xt=""),`<section class="panel environment-panel flow-environment-panel"><div class="panel-head"><div><h2>Environment map</h2><p>Preview \xB7 React Flow + ELK</p></div><button class="text-button" data-map-version="original">Original map \u2197</button></div><div class="environment-toolbar"><label for="map-agent">Focus${Gr({id:"map-agent",label:"Focus environment on an agent",value:xt,options:[{value:"",label:"All agents & workloads"},...mi("agent").map(c=>({value:c.id,label:c.name}))]})}</label><button class="text-button" data-inspect="deployment-list" data-key="all">Deployments \u2197</button></div><div data-flow-map="preview" data-ui-key="flow-map"><p class="empty-small">Opening map preview\u2026</p></div></section>`;let t=De(),n=mi("agent");xt&&!n.some(c=>c.id===xt)&&(xt="");let a=xt?t.filter(c=>c.agentId===xt):t,l=lA(a,A.data,{expandAll:xd,expansion:Jr}),i=l.groups.length>0&&l.groups.every(c=>c.expanded),o=Math.max(300,Math.max(...l.columns.map(c=>c.length))*58+42),s=new Map,r=[{x:14,width:196},{x:310,width:222},{x:642,width:244}];l.columns.forEach((c,v)=>c.forEach((S,y)=>s.set(S.id,{...r[v],inset:S.groupId?8:0,y:56+(c.length===1?(o-94)/2:y*(o-94)/(c.length-1))})));let d=(c,v)=>R(String(c).length>v?`${String(c).slice(0,v-1)}\u2026`:c),u=c=>{let v=s.get(c.id),S=c.type==="group",y=c.type==="path",m=v.x+(c.groupId?8:0),h=v.width-(c.groupId?8:0),g=c.name,b,M,$=null,w=S&&!c.expanded;if(S)b=`${c.members.length} ${c.label} \xB7 ${G(c.count)} requests`,M=`data-map-group="${R(c.id)}" aria-expanded="${c.expanded}" aria-label="${c.expanded?"Collapse":"Expand"} ${R(c.name)} through ${R(c.names.join(", "))}"`,w&&(g=c.members[0].name,c.side==="model"&&($=In(c.members[0].example)));else if(y)b=`${$e[c.kind].short} \xB7 ${G(c.count)} requests`,M=`data-inspect="entry" data-key="${R(c.key)}" aria-label="Inspect connections through ${R(g)}"`,$=Dt(g);else if(c.type==="model"){let C=[...c.deployments.values()];b=C.length===1?`${c.provider} \xB7 ${C[0].name}`:`${c.provider}${C.length>1?` \xB7 ${C.length} deployments`:""}`,M=`data-inspect="map-model" data-key="${R(c.key)}" aria-label="Inspect ${R(g)} served by ${R(c.provider)}"`,$=In(c.example)}else b=`${G(c.count)} requests \xB7 ${Dn(A.hours)}`,M=`data-inspect="${c.type}" data-key="${R(c.inspectKey)}" aria-label="Inspect ${R(g)}"`;let T=y||$?38:12,O=S?47:y&&$?37:12,E=Math.floor((h-T-O)/5.7),_=w?`<rect class="map-stack-back" x="8" y="8" width="${h-16}" height="46" rx="7"/><rect class="map-stack-back" x="4" y="4" width="${h-8}" height="46" rx="7"/>`:"";return`<g class="map-node${y?" route-node":""}${S?" map-group":""}${c.groupId?" map-member":""}" data-ui-key="${R(c.id)}" data-map-node-id="${R(c.id)}" data-map-node-type="${c.type}" role="button" tabindex="0" ${M} ${y?`style="--route-color:${$e[c.kind].color}"`:""} transform="translate(${m} ${v.y-23})"><title>${R(w?`${g} and ${c.members.length-1} more`:g)} \u2014 ${R(b)}</title>${_}<rect width="${h}" height="46" rx="7"/>${y?`<g class="route-node-icon" transform="translate(10 13)">${Al(c.kind)}</g>`:""}${V2($,y?h-28:12,14)}<text x="${T}" y="19">${d(g,E)}</text><text class="sub" x="${T}" y="34">${d(b,Math.floor((h-T-12)/4.8))}</text>${w?`<text class="map-stack-count" x="${h-12}" y="19" text-anchor="end">+${c.members.length-1}</text>`:S?`<path class="map-disclosure" d="${c.expanded?`M${h-24} 21l4 4 4-4`:`M${h-22} 19l4 4-4 4`}"/>`:""}</g>`},p=l.edges.map(c=>{let v=s.get(c.from),S=s.get(c.to),y=v.x+v.width,m=S.x+S.inset,h=(y+m)/2;return`<path class="map-edge route-thread" style="--route-color:${$e[c.kind].color}" data-nodes="${R(JSON.stringify([...c.related]))}" data-map-segment="${c.segment}" data-request-count="${c.count}" d="M${y} ${v.y}C${h} ${v.y} ${h} ${S.y} ${m} ${S.y}"><title>${G(c.count)} requests</title></path>`}).join(""),f=a.length?`<div class="map-scroll complete-map-scroll" data-ui-key="environment-map-scroll" tabindex="0" role="region" aria-label="Complete environment map. Scroll to explore expanded groups."><svg class="environment-map deployment-map complete-map" style="--map-height:${o}px" viewBox="0 0 900 ${o}" aria-label="All ${sa(l.workloadCount,"workload")}, ${sa(l.connectionCount,"entry connection")}, and ${sa(l.modelCount,"model")} in this scope"><g class="map-column-labels" aria-hidden="true"><text x="14" y="17">AGENTS / WORKLOADS</text><text x="310" y="17">ENTRY CONNECTION</text><text x="642" y="17">MODELS</text></g>${p}${l.columns.map(c=>c.map(u).join("")).join("")}</svg></div>`:'<div class="map-empty"><h3>Your environment will take shape here.</h3><p>Connect existing activity metadata to see workloads, connections, and models.</p><button class="text-button" data-page="sources">Connect a source \u2192</button></div>';return`<section class="panel environment-panel"><div class="panel-head"><div><h2>Environment map</h2><p>${sa(l.workloadCount,"workload")} \xB7 ${sa(l.connectionCount,"connection")} \xB7 ${sa(l.modelCount,"model")}</p></div>${e?"":'<button class="panel-action" data-service-view="map" aria-label="Explore environment">\u2197</button>'}</div><div class="environment-toolbar"><label for="map-agent">Focus${Gr({id:"map-agent",label:"Focus environment on an agent",value:xt,options:[{value:"",label:"All agents & workloads"},...n.map(c=>({value:c.id,label:c.name}))]})}</label><div class="map-controls">${l.groups.length?`<button class="text-button" data-map-expand="${i?"collapse":"expand"}">${i?"Collapse all":"Expand all"}</button>`:""}<button class="text-button" data-inspect="deployment-list" data-key="all">Deployments \u2197</button></div></div>${f}<div class="map-foot">${z$()}<span>${Sl(A.data)?`All ${sa(l.requestCount,"request")} represented \xB7 ${Dn(A.hours)}`:"Request coverage unavailable"}</span></div>${a.length?`<div class="map-coverage">${l.groups.length?"Select a stack to reveal its agents or models.":"Select a workload, connection, or model to inspect its recorded details."}</div>`:""}</section>`}function U$(e){let t=e.dataset.mapGroup,n=e.getBoundingClientRect().top;Jr.set(t,!(Jr.get(t)??xd)),ct();let a=[...document.querySelectorAll("[data-map-group]")].find(l=>l.dataset.mapGroup===t);if(a){let l=a.closest(".map-scroll");l.scrollTop+=a.getBoundingClientRect().top-n,a.focus({preventScroll:!0})}}function hi(e){return P2(e,A.data.interval,nn?Date.parse(A.data.observedAt):Date.now())}function Dd(e){let t=e.unit==="bytes"?Tl:e.unit==="percent"?n=>n==null?"\u2014":`${Math.round(n)}%`:Xe;return`${t(e.value)}${e.limit!=null&&e.unit!=="percent"?` / ${t(e.limit)}`:""}`}function ys(e){let t=Ph(e);return t.filter(a=>a.ratio!=null).sort((a,l)=>l.ratio-a.ratio)[0]??t[0]}function tu(e){let t=hi(e),n=ys(e),a=vi().usage.get(e.id);return`<button class="capacity-row" data-inspect="pool" data-key="${R(e.id)}"><span class="capacity-row-title"><strong>${ao(e.name,ug(e))}</strong><span class="capacity-status ${t}">${t==="sampled"?"Sampled":t==="stale"?"Stale reading":"No reading"}</span></span><span class="capacity-row-reading"><span>${n?R(n.label):"Capacity unknown"}</span><strong>${n?Dd(n):"\u2014"}</strong></span><span class="capacity-track ${t}" aria-hidden="true">${n?.ratio!=null?`<i style="transform:scaleX(${Math.min(1,n.ratio)})"></i>`:""}</span><span class="capacity-row-foot">${a.agents.size} observed agents \xB7 ${e.observedAt?`sample ${bs(e.observedAt)}`:"awaiting a source"}</span></button>`}function SA(e=!1){let t=[...vi().pools].sort((a,l)=>(hi(l)==="sampled"?ys(l)?.ratio??-1:-2)-(hi(a)==="sampled"?ys(a)?.ratio??-1:-2));return`<section class="panel capacity-panel"><div class="panel-head"><div><h2>Shared capacity</h2><p>${t.filter(a=>hi(a)==="sampled").length} of ${t.length} pools have recent readings</p></div><button class="panel-action" data-inspect="pool-list" data-key="all" aria-label="Inspect all shared capacity pools">\u2197</button></div>${t.length?`<div class="capacity-rows">${t.slice(0,e?t.length:3).map(tu).join("")}</div>`:'<p class="empty-small">Declare shared pools to connect agents with their limits. Missing readings stay unknown.</p>'}<div class="capacity-foot">Pool totals include all consumers. Sampled independently of inference.</div></section>`}function nu(e=De(),t=!1){let n=vi().deployments.filter(a=>t||e.some(l=>wa(l,A.data)?.id===a.id));return n.length?`<div class="deployment-list">${n.map(a=>{let l=mt(e.filter(i=>wa(i,A.data)?.id===a.id));return`<button class="deployment-row" data-inspect="deployment" data-key="${R(a.id)}"><span><strong>${lo(a)}</strong><small>${R(a.name)} \xB7 ${R(a.location)}</small></span><span>${G(l)}<small>requests \u2197</small></span></button>`}).join("")}</div>`:'<p class="detail-note">No identified deployments in this selection. Supply a deployment ID that matches the declared model and provider.</p>'}function B$(e){let t=vi().pools.filter(i=>vi().usage.get(i.id).items.some(o=>e.includes(o))),n=mt(e.filter(i=>wa(i,A.data))),a=[...new Map(e.map(i=>{let o=Ta(i,A.data);return[JSON.stringify(o),o]})).entries()];t.sort((i,o)=>(hi(o)==="sampled"?ys(o)?.ratio??-1:-2)-(hi(i)==="sampled"?ys(i)?.ratio??-1:-2));let l=`<div class="inspector-tabs" role="group" aria-label="Explore agent environment">${[["deployments","Deployments"],["paths","Paths"],["capacity","Capacity"]].map(([i,o])=>`<button data-inspector-tab="${i}" aria-pressed="${Qr===i}">${o}</button>`).join("")}</div>`;return Qr==="paths"?`${l}<div class="detail-section-title"><h3>Execution paths</h3><span>${a.length} reported</span></div><div class="path-list">${a.map(([i,o])=>`<button class="path-row" data-inspect="path" data-key="${R(i)}">${o.map(s=>`<span class="path-hop" style="--route-color:${$e[s.kind].color}">${Al(s.kind)}${ca(s.name,14)}</span>`).join('<span class="path-arrow" aria-hidden="true">\u2192</span>')}</button>`).join("")}</div>`:Qr==="capacity"?`${l}<div class="detail-section-title"><h3>Shared limits & pressure</h3><span>${t.length} pools</span></div>${t.length?t.map(tu).join(""):'<p class="detail-note">No shared pools are linked by the available metadata.</p>'}<p class="detail-note">Pool readings include all consumers. Shared use does not establish which agent caused pressure.</p>`:`${l}<div class="detail-section-title"><h3>Model deployments</h3><span>${G(n)} / ${G(mt(e))} requests identified</span></div>${nu(e)}`}function AA(e=!1){let t=A.data.models.filter(n=>(A.filter==="all"||n.location===A.filter||A.filter==="local"&&n.location==="private")&&`${n.name} ${n.provider} ${n.modelCreator??""}`.toLowerCase().includes(A.search.toLowerCase()));return e&&(t=A.data.models.slice(0,12)),t.length?`<div class="table-wrap"><table class="data-table model-table"><thead><tr><th scope="col">Model / service</th><th class="state-column" scope="col">State</th><th scope="col">Requests</th><th class="trend-column" scope="col">Activity</th><th class="latency-column" scope="col">Median latency</th><th scope="col">Spend</th></tr></thead><tbody>${t.map(n=>{let a=De().filter(o=>o.model===n.name&&o.provider===n.provider),l=gs(a),i=Sl(A.data);return`<tr><td><button class="model-name" data-inspect="model" data-key="${R(n.id)}">${jr(In(n))}<span><strong>${R(n.name)}</strong><small>${n.state==="declared"?`Declared \xB7 ${n.provider==="Unattributed"?"service not established":R(n.provider)}`:`Served by ${vA(n)} \xB7 ${R(n.location)}`}</small></span></button><div class="model-routes">${x$(a)}</div></td><td class="state-column">${rg(n.state)}</td><td>${Aa(`model-requests-${n.id}`,a.length?G(mt(a)):i?"0":"\u2014")}</td><td class="trend-column">${gA(zd(a,18).map(o=>o.cloud+o.local+o.unknown),{className:"table-spark",color:eu(a).length===1?$e[eu(a)[0]].color:"var(--chart)"})}</td><td class="latency-column">${Aa(`model-latency-${n.id}`,eo(l.latency))}</td><td>${Aa(`model-cost-${n.id}`,tn(l.cost))}${l.estimated?'<span title="Includes estimated cost">*</span>':""}</td></tr>`}).join("")}</tbody></table></div><p class="table-foot">${e?`Showing ${t.length} of ${A.data.models.length} models. Configured, loaded, or observed.`:"Usage is limited to connected sources and the selected window. A dash means the measurement is unavailable."}</p>`:`<div class="empty-small">${A.search||A.filter!=="all"?"No models match this view. Try another filter.":"No models identified for this project. Connect its request logs or declare a model or runtime endpoint to bring them into view."}</div>`}function q$(){let e=[...De()].sort((t,n)=>Date.parse(n.occurredAt)-Date.parse(t.occurredAt)).slice(0,10);return`<section><div class="section-title"><h2>Recent activity</h2><span class="quiet" style="font-size:10px">${A.data.mode==="sample"?"Sample":"Observed"}</span></div>${e.length?`<ul class="activity-list">${e.map(t=>`<li class="activity-item"><span class="activity-mark route-mark" style="--route-color:${$e[Ea(t,A.data)].color}" aria-hidden="true"></span><div class="activity-item-content"><strong>${R(t.workload)}</strong><p>${lo(t,13)}${t.status==="failed"?" \xB7 failed":t.status==="running"?" \xB7 running":""}</p><div class="recent-route">${su(Ea(t,A.data))}<span>${ca(t.route,12)}</span></div></div><time datetime="${t.occurredAt}">${bs(t.occurredAt)}</time></li>`).join("")}</ul><button class="text-button activity-link" data-page="activity">View activity <span>\u2192</span></button>`:`<p class="empty-small">${Sl(A.data)?"No requests recorded in this window.":"Request activity is unknown. Connect a request source to see it here."}</p>`}</section>`}function H$(){let e=A.data.sources.filter(t=>["connected","partial"].includes(t.state));return`<footer class="footer"><div class="source-strip"><button class="text-button" data-page="sources"><i class="status-dot"></i>${e.length} ${e.length===1?"source":"sources"} connected</button><span>${A.data.mode==="sample"?"Fictional environment \xB7 no real inference":"Local view \xB7 passive collection"}</span></div><span class="footer-end">OPENMERIT / INFERENCE TERMINAL</span></footer>`}function G$(){let e=De();if(!Sl(A.data))return'<div class="map-empty"><h3>Request activity is unknown.</h3><p>No readable request source is connected. Configuration and task summaries do not establish request volume.</p><button class="text-button" data-page="sources">View sources \u2192</button></div>';if(!e.length)return'<div class="map-empty"><h3>No activity in this window.</h3><p>Choose a longer window or connect an activity source.</p></div>';let t=zd(e,60),n=Ad(e,A.data),a=t.map(r=>Rn==="all"?Object.values(r.paths).reduce((d,u)=>d+u,0):r.paths[Rn]),l=Math.max(1,...a),i=Rn==="all"?"var(--chart)":$e[Rn].color,o=t.map((r,d)=>{let u=0,p=Object.entries($e).filter(([c])=>Rn==="all"||Rn===c).map(([c,v])=>{let S=r.paths[c];return u+=S,S?`<rect class="volume-bar" data-path="${c}" x="${d*16+3}" y="${124-u/l*116}" width="10" height="${S/l*116}" fill="${v.color}"/>`:""}).join(""),f=Object.entries($e).filter(([c])=>r.paths[c]&&(Rn==="all"||Rn===c)).map(([c,v])=>`${r.paths[c]} ${v.label}`).join(", ");return`<g>${p}<rect class="chart-hit" x="${d*16}" y="0" width="16" height="128" data-bin="${d}" tabindex="${d===0?"0":"-1"}" role="img" aria-label="${Nd(r.at,!0)}: ${a[d]} requests${f?`. ${f}`:""}. Use left and right arrows to inspect."/></g>`}).join(""),s=[["all",{label:"All paths",color:"var(--chart)"}],...Object.entries($e)];return`<div class="volume-chart activity-chart" style="--chart-color:${i}"><div class="volume-scale" aria-hidden="true"><span>${G(l)}</span><span>${G(Math.round(l/2))}</span><span>0</span></div><div class="volume-plot"><svg viewBox="0 0 960 128" preserveAspectRatio="none" aria-label="${R(Rn==="all"?"All paths":$e[Rn].label)} requests per ${uA()} interval">${[8,66,124].map(r=>`<line class="chart-grid" x1="0" x2="960" y1="${r}" y2="${r}" vector-effect="non-scaling-stroke"/>`).join("")}${o}</svg><div class="volume-times" aria-hidden="true">${[0,15,30,45,59].map(r=>`<span>${Nd(r===59?ou().end:t[r].at)}</span>`).join("")}</div></div><div class="chart-tooltip" hidden></div></div><div class="volume-paths" role="group" aria-label="Chart path">${s.map(([r,d])=>`<button data-activity-path="${r}" aria-pressed="${Rn===r}" style="--route-color:${d.color}"><span>${r==="all"?'<span class="all-paths-mark" aria-hidden="true">\u224B</span>':Al(r)}${d.label}</span><strong>${G(r==="all"?mt(e):n[r])}</strong></button>`).join("")}</div><p class="chart-caption">${uA()} intervals \xB7 select a path to isolate its volume</p>`}function j$(){return`${io("Your inference environment.",D$())}${k$()}${yA()}<div class="overview-top">${bA()}${SA()}</div><div class="lower-grid"><section><div class="section-title"><h2>Model inventory <span class="badge-count">${A.data.models.length}</span></h2><button class="text-button" data-page="models">All models <span>\u2192</span></button></div>${AA(!0)}</section>${q$()}</div>`}function Y$(){return`${io("Model inventory","Declarations, runtime inventory, and recorded model use.")}${yA()}<div class="filter-bar"><div class="filter-tabs" role="group" aria-label="Filter models by location">${["all","local","cloud"].map(e=>`<button data-filter="${e}" aria-pressed="${A.filter===e}">${{all:"All models",local:"Self-hosted",cloud:"Cloud"}[e]}</button>`).join("")}</div><input class="filter-input" id="model-search" type="search" aria-label="Search models" placeholder="Find a model\u2026" value="${R(A.search)}"></div><div id="model-results">${AA()}</div>`}function I$(e){return e.types.map(t=>{let n=Ir[t];return`<span class="route-badge" style="--route-color:${$e[n.path].color}">${Al(n.path)}${n.label}</span>`}).join("")}function EA(e){let t=[];return e.reported&&t.push("Activity"),e.evidence.some(n=>n.sourceId==="repository")&&t.push("Code & config"),e.evidence.some(n=>n.sourceId==="environment")&&t.push("Environment"),e.evidence.some(n=>n.sourceId==="inventory"||n.sourceId?.startsWith("project:"))&&t.push("Configuration"),!t.length&&e.evidence.length&&t.push("Inventory source"),t.join(" \xB7 ")||"Not reported"}function V$(){let e=sg(),t=e.filter(s=>s.records.length),n=`<div class="service-view-bar"><div class="segmented" role="group" aria-label="Services view">${[["inventory","Inventory"],["map","Environment map"]].map(([s,r])=>`<button data-ui-key="services-view-${s}" data-service-view="${s}" aria-pressed="${vs===s}">${r}</button>`).join("")}</div><span class="quiet">${G(e.length)} services \xB7 ${G(t.length)} with activity</span></div>`,a=io("Services","Services declared by this project or identified in its recorded data.");if(vs==="map")return`${a}${n}${bA(!0)}<div class="environment-detail-grid"><section><div class="section-title"><h2>Model deployments</h2><span class="quiet">Declared deployments and endpoint catalogs</span></div>${nu(xt?De().filter(s=>s.agentId===xt):De(),!xt)}</section>${SA(!0)}</div>`;let l=e.filter(s=>(hs==="all"||s.types.includes(hs))&&[s.name,...s.aliases,...s.endpoints,...s.models.map(r=>r.name)].join(" ").toLowerCase().includes(Pr.toLowerCase())),i=`<div class="service-filter-bar"><div class="filter-tabs" role="group" aria-label="Filter services by type">${[["all","All services"],...Object.entries(Ir).map(([s,r])=>[s,r.plural])].map(([s,r])=>`<button data-ui-key="service-filter-${s}" data-service-filter="${s}" aria-pressed="${hs===s}">${r}<span>${s==="all"?e.length:e.filter(d=>d.types.includes(s)).length}</span></button>`).join("")}</div><input class="filter-input" id="service-search" type="search" aria-label="Search services" placeholder="Find a service or model\u2026" value="${R(Pr)}"></div>`,o=l.length?`<div class="table-wrap"><table class="data-table service-table"><thead><tr><th scope="col">Service</th><th scope="col">Type</th><th scope="col">Models</th><th scope="col">Requests</th><th scope="col">Last activity</th><th scope="col">Capacity</th><th scope="col">Evidence</th></tr></thead><tbody>${l.map(s=>{let r=s.pools,d=r.filter(c=>hi(c)==="sampled"),u=d.map(ys).find(Boolean),p=s.endpoints.join(" \xB7 "),f=s.locations.map(c=>({local:"Local",private:"Private",cloud:"Cloud"})[c]||c).join(" / ");return`<tr data-ui-key="service-row-${R(s.id)}"><td><button class="model-name" data-inspect="service" data-key="${R(s.id)}">${jr(Dt(s.name),19)}<span><strong>${R(s.name)}</strong><small>${R([f,p].filter(Boolean).join(" \xB7 ")||"Location not reported")}</small></span></button></td><td><div class="service-types">${I$(s)}</div></td><td>${G(s.models.length)}</td><td>${s.records.length?Aa(`service-requests-${s.id}`,G(mt(s.records))):"\u2014"}</td><td>${s.lastAt?`<time datetime="${R(s.lastAt)}" title="${R(new Date(s.lastAt).toLocaleString())}">${bs(s.lastAt)}</time>`:"Not recorded"}</td><td class="service-capacity">${u?`<span>${Dd(u)}</span><small>${R(u.label)}</small>`:`<span>${r.length?"No recent reading":"Not reported"}</span>`}</td><td class="service-evidence"><span>${R(EA(s))}</span><small>${s.records.length?"Recorded in this window":s.reported?"Outside this window":s.configured?"Configured only":s.declared?"Declared only":"Inventory only"}</small></td></tr>`}).join("")}</tbody></table></div>`:`<div class="empty-small"><strong>${e.length?"No services match this view.":"No services identified yet."}</strong><p>${e.length?"Try another type or search term.":"Services appear from configuration, runtime inventory, and recorded activity."}</p>${e.length?'<button class="text-button" data-service-reset>Clear filters \u2192</button>':'<button class="text-button" data-page="sources">View sources \u2192</button>'}</div>`;return`${a}${n}${i}${o}<p class="table-foot">Requests cover the selected window. A request can touch several services; row counts are not additive. Models include inventory and recorded paths. Configuration does not establish connectivity.</p>`}function X$(e){let t=sg().find(d=>d.id===e);if(!t){He("Service no longer in view","No matching identity in the latest snapshot.",'<p class="detail-note">Its configuration or recorded metadata may have changed.</p>',"Service");return}let n=gs(t.records),a=t.models.map(d=>A.data.models.find(u=>u.provider===d.provider&&u.name===d.name)??d),l=[["Evidence",EA(t)],["Activity",t.records.length?`${Ns(A.hours)}`:t.reported?"Recorded outside this window":"No requests recorded"],["Last recorded activity",t.lastAt?new Date(t.lastAt).toLocaleString():"Not reported"],["Location",t.locations.join(" \xB7 ")||"Not reported"],["Endpoint identity",t.endpoints.join(" \xB7 ")||"Not reported"],["Reported names",t.aliases.join(" \xB7 ")],["Type basis",t.typeEvidence.join(" \xB7 ")]],i=a.length?`<div class="service-model-list">${a.map(d=>`<button class="service-model-row" data-inspect="model" data-key="${R(d.id)}" ${A.data.models.some(u=>u.id===d.id)?"":"disabled"}><span>${lo(d,16)}<small>${d.state==="declared"?"Declared service":"Served by"} ${vA(d)}</small></span><span aria-hidden="true">\u2197</span></button>`).join("")}</div>`:'<p class="detail-note">No model inventory or recorded model use is available for this service.</p>',o=t.deployments.length?`<div class="deployment-list">${t.deployments.map(d=>`<button class="deployment-row" data-inspect="deployment" data-key="${R(d.id)}"><span><strong>${lo(d)}</strong><small>${R(d.name)} \xB7 ${R(d.location)}</small></span><span aria-hidden="true">\u2197</span></button>`).join("")}</div>`:'<p class="detail-note">No matching deployments are identified.</p>',s=t.paths.length?`<div class="path-list">${t.paths.sort((d,u)=>u.count-d.count).slice(0,12).map(({path:d,count:u})=>`<button class="path-row" data-inspect="path" data-key="${R(JSON.stringify(d))}">${d.map(p=>`<span class="path-hop" style="--route-color:${$e[p.kind].color}">${Al(p.kind)}${ca(p.name,14)}</span>`).join('<span class="path-arrow" aria-hidden="true">\u2192</span>')}<span class="path-count">${G(u)} requests</span></button>`).join("")}</div>${t.paths.length>12?`<p class="detail-note">Showing the 12 most used of ${t.paths.length} reported paths.</p>`:""}`:'<p class="detail-note">No execution paths are reported in this window.</p>',r=`<details class="identity-evidence" open><summary>Where this identity comes from</summary><div class="service-evidence-list">${t.evidence.map(d=>`<div><strong>${R(d.field)}</strong><span>${R(d.detail)}</span>${d.referenceId?`<button class="text-button" data-inspect="reference" data-key="${R(d.referenceId)}">${R(d.file)}:${d.line} \u2197</button>`:""}${A.data.sources.some(u=>u.id===d.sourceId)?`<button class="text-button" data-inspect="source" data-key="${R(d.sourceId)}">${R(A.data.sources.find(u=>u.id===d.sourceId)?.name||d.sourceId)} \u2197</button>`:`<small>${R(gi(d.sourceId))}</small>`}</div>`).join("")}</div></details>`;He(t.name,t.types.map(d=>Ir[d].label).join(" \xB7 "),`<div class="agent-metrics">${[["Requests",t.records.length?G(mt(t.records)):"\u2014"],["Models",G(t.models.length)],["Median latency",eo(n.latency)],["Request spend",tn(n.cost)]].map(([d,u])=>`<div><span>${d}</span><strong>${u}</strong></div>`).join("")}</div>${ra(l)}<p class="detail-note">Usage describes recorded requests touching this service. Spend and latency are whole-request measurements, not this service\u2019s bill or added latency. ${t.records.length?`USD cost is supplied for ${G(n.costCount)} of ${G(mt(t.records))} requests${n.estimated?" and includes estimates":""}${n.unknownCostKind?"; some cost bases were not reported":""}.`:"No usage measurements are available in this window."}</p><div class="detail-section-title"><h3>Models</h3><span>${a.length}</span></div>${i}<div class="detail-section-title"><h3>Linked deployments</h3><span>${t.deployments.length}</span></div>${o}<div class="detail-section-title"><h3>Reported paths</h3><span>${t.paths.length}</span></div>${s}<div class="detail-section-title"><h3>Shared limits & capacity</h3><span>${t.pools.length} ${t.pools.length===1?"pool":"pools"}</span></div>${t.pools.length?t.pools.map(tu).join(""):'<p class="detail-note">No capacity pools are explicitly linked to this service.</p>'}${r}<p class="detail-note">${A.data.mode==="sample"?"All identities and configuration evidence here are fictional. ":""}Configuration, inventory, and recorded usage do not establish current reachability or available capacity. Endpoint identities exclude credentials, resource paths, and queries. Code declarations may retain a structural API path.</p>`,"Service",{title:Dt(t.name)})}function K$(){let e=q2(A.data,De()),t=e.failures==null?e.unknownStatuses?`${e.reportedFailures} reported failed \xB7 ${e.unknownStatuses} ${e.unknownStatuses===1?"status":"statuses"} unknown`:"Failures unknown":`${e.failures} failed`,n=[...De()].sort((a,l)=>Date.parse(l.occurredAt)-Date.parse(a.occurredAt));return`${io("Inference activity",Vt()?"Fictional request groups. Tokens and costs are totals for each group.":"Usage across your applications, agents, and evaluations.")}<section class="panel activity-panel"><div class="panel-head"><div><h2>Request volume</h2><p>${e.known?`${G(mt(n))} recorded requests in this window`:"Request count unavailable"}</p></div><span class="panel-meta">${t}</span></div>${G$()}</section><div class="section-title"><h2>Recorded activity</h2><span class="quiet" style="font-size:10px">${Vt()?"Latest 100 groups \xB7 1,000 requests each":e.known?n.length>100?"Most recent 100 requests":`${n.length} requests`:"No request coverage"}</span></div>${n.length?`<div class="table-wrap"><table class="data-table activity-table"><thead><tr><th>Workload / task</th><th>Request path</th><th>Scope</th><th>Time</th><th>${Vt()?"Sample latency":"Duration"}</th><th>${Vt()?"Group tokens in / out":"Tokens in / out"}</th><th>${Vt()?"Group cost":"Spend"}</th><th>Status</th></tr></thead><tbody>${n.slice(0,100).map(a=>`<tr><td><button class="model-name" data-inspect="record" data-key="${R(a.id)}"><span><strong>${R(a.task||a.taskId||a.workload)}</strong><small>${a.task||a.taskId?`${R(a.agent||a.agentId||a.workload)} \xB7 `:""}${lo(a,14)}</small></span></button></td><td class="activity-route">${su(Ea(a,A.data))}<small>${ca(a.route,12)}</small></td><td>${R(a.scope)}</td><td>${Nd(a.occurredAt,!0)}</td><td>${eo(a.durationMs)}</td><td>${Xe(a.inputTokens)} / ${Xe(a.outputTokens)}</td><td>${a.currency==="USD"?tn(a.cost):"\u2014"}${a.cost!=null&&a.currency==="USD"?a.costKind==="estimated"?"*":a.costKind!=="reported"?'<span title="Cost basis not reported">?</span>':"":""}</td><td>${rg(a.status)}</td></tr>`).join("")}</tbody></table></div>`:'<p class="empty-small">Activity appears when a connected source records it.</p>'}<p class="table-foot">Metadata only. No prompts or responses. An asterisk marks estimated cost; a question mark means its basis was not reported. Amounts without an explicit USD currency are excluded from dollar totals.</p>`}function cg(){return A.data.hosts??[{...A.data.machine,id:"this-machine",observedAt:A.data.observedAt,accelerators:[],loadedModels:A.data.models.filter(e=>e.state==="loaded")}]}function ag(e){return A.error?"stale":bd(e,A.data.interval)}function cA(e){let t=ag(e);return`<span class="hardware-status ${t}"><i class="status-dot ${t==="stale"?"warning":"dim"}"></i>${{sampled:"Recent",stale:"Stale reading",unknown:"Awaiting data"}[t]}</span>`}function Q$(){let e=cg(),t=[...new Set(e.map(u=>u.site).filter(Boolean))],n=[...t,...t.length&&e.some(u=>!u.site)?["Site not supplied"]:[]];Ml&&!n.includes(Ml)&&(Ml="");let a=e.filter(u=>!Ml||(u.site||"Site not supplied")===Ml),l=a.find(u=>u.id===Cd)??a[0];if(!l)return`${io("Local compute","No local compute is linked to this project.",!1)}<p class="detail-note">Host links must be supplied by this project. A localhost endpoint may be a proxy or tunnel; it does not identify the machine serving its models. Hardware exports and explicit runtime host IDs establish those links.</p><button class="text-button" data-page="sources">View sources \u2192</button>`;Cd=l.id;let i=e.filter(u=>ag(u)==="sampled"),o=new Map;for(let u of a){let p=[u.site||(t.length?"Site not supplied":""),u.rack].filter(Boolean).join(" / ");o.has(p)||o.set(p,[]),o.get(p).push(u)}let s=l.loadedModels??[],r=ag(l),d=[...o].map(([u,p])=>`<tbody aria-label="${R(u)}">${u?`<tr class="host-group"><th colspan="7" scope="rowgroup">${R(u)}<span>${p.length} ${p.length===1?"host":"hosts"}</span></th></tr>`:""}${p.map(f=>`<tr class="host-row ${f.id===l.id?"selected":""}"><td><button class="host-name" data-host="${R(f.id)}" aria-pressed="${f.id===l.id}">${R(f.name)}${f.id==="this-machine"?"<small>This machine</small>":""}</button></td><td>${R(f.chip||"Not reported")}</td><td>${f.cpuPercent==null?"\u2014":`${f.cpuPercent.toFixed(1)}%`}</td><td>${Tl(f.memoryUsed)}<span class="quiet"> / ${Tl(f.memoryTotal)}</span></td><td>${f.accelerators?.length?[...new Set(f.accelerators.map(c=>c.name))].map(c=>`${f.accelerators.filter(v=>v.name===c).length} \xD7 ${R(c)}`).join(" \xB7 "):"Not reported"}</td><td>${f.observedAt&&f.residencyReported!==!1?f.loadedModels?.length??0:"\u2014"}</td><td>${cA(f)}</td></tr>`).join("")}</tbody>`).join("");return`${io("Local compute","This machine and self-hosted servers from your exports.",!1)}<div class="fleet-summary"><div><strong>${e.length}</strong><span>${e.length===1?"host":"hosts"} in view</span></div><div><strong>${e.reduce((u,p)=>u+(p.accelerators?.length??0),0)}</strong><span>accelerators listed</span></div><div><strong>${i.length} <span>/ ${e.length}</span></strong><span>hosts with recent readings</span></div><p>Passively sampled \xB7 every ${A.data.interval}s<br>${t.length} reported sites \xB7 ${new Set(e.filter(u=>u.rack).map(u=>`${u.site}/${u.rack}`)).size} racks</p></div><div class="section-title host-inventory-heading"><div><h2>Host inventory</h2><p>Select a host to inspect its resources.</p></div>${n.length?Gr({id:"host-location",label:"Filter hosts by reported site",value:Ml,options:[{value:"",label:"All reported sites"},...n.map(u=>({value:u,label:u}))]}):""}</div><div class="table-wrap"><table class="data-table host-table"><thead><tr><th scope="col">Host</th><th scope="col">Processor</th><th scope="col">CPU</th><th scope="col">System RAM</th><th scope="col">Accelerators</th><th scope="col">Loaded</th><th scope="col">Reading</th></tr></thead>${d}</table></div><section class="host-detail" aria-label="Selected host"><div class="section-title"><div><h2>${R(l.name)}</h2><p>${R([l.site,l.rack].filter(Boolean).join(" / "))}${l.site||l.rack?" \xB7 ":""}${l.observedAt?`Last sample ${bs(l.observedAt)}`:"No measurement received"}</p></div>${cA(l)}</div><div class="host-detail-grid"><section class="panel host-history"><div class="panel-head"><h2>Resource history</h2><span class="panel-meta">${r==="stale"?"Last reported readings":"Whole host"}</span></div><div class="history-chart"><div data-chart="machine-history" data-host-id="${R(l.id)}" data-ui-key="history-${R(l.id)}"></div><p>CPU and system RAM. Host usage is not attributed to inference.</p></div></section><section class="panel host-hardware"><div class="panel-head"><h2>Hardware</h2></div><dl class="host-facts"><div><dt>Name source</dt><dd>${l.id==="this-machine"?A.data.mode==="sample"?"Sample \xB7 hostname":"Operating system \xB7 hostname":`${R(gi(l.sourceId))} \xB7 ${R(l.nameField||"name / id")}`}</dd></div><div><dt>Site / rack</dt><dd>${R([l.site,l.rack].filter(Boolean).join(" / ")||"Not supplied")}</dd></div><div><dt>Processor</dt><dd>${R(l.chip||"Not reported")}</dd></div><div><dt>Cores / architecture</dt><dd>${l.cores??"\u2014"} / ${R(l.arch||"\u2014")}</dd></div><div><dt>System RAM</dt><dd>${Tl(l.memoryUsed)} / ${Tl(l.memoryTotal)}</dd></div><div><dt>Platform</dt><dd>${R({darwin:"macOS",win32:"Windows",linux:"Linux"}[l.platform]??(l.platform||"Not reported"))}</dd></div></dl><div class="accelerator-list">${(l.accelerators??[]).map(u=>`<div class="accelerator"><div><strong>${R(u.name)}</strong><span>${R([u.id,u.kind&&u.kind!=="unknown"?u.kind.toUpperCase():null].filter(Boolean).join(" \xB7 "))}</span></div>${u.vendor?`<p><span>Vendor</span><strong>${R(u.vendor)}</strong></p>`:""}<p><span>Device memory</span><strong>${Tl(u.memoryUsed)} / ${Tl(u.memoryTotal)}</strong></p><p><span>Utilization</span><strong>${u.utilization==null?"\u2014":`${u.utilization.toFixed(1)}%`}</strong></p></div>`).join("")||'<p class="empty-small">Accelerator readings not supplied.</p>'}</div></section></div><div class="section-title"><h2>${r==="stale"?"Last reported models":"Loaded models"} <span class="badge-count">${l.residencyReported===!1?"\u2014":s.length}</span></h2><span class="quiet">${R(l.name)}</span></div><div class="loaded-models">${s.map(u=>{let p=A.data.models.find(f=>f.name===u.name&&f.provider===u.provider);return`<article class="loaded-model"><div>${p?`<button class="model-name" data-inspect="model" data-key="${R(p.id)}">${jr(In(u))}<strong>${R(u.name)}</strong></button>`:`<strong>${lo(u)}</strong>`}<p>${ca(u.runtime||u.provider||"Runtime unspecified")}</p></div><div><strong>${Tl(u.memoryBytes)}</strong><p>${{accelerator:"Accelerator allocation",system:"System RAM allocation",unified:"Unified memory allocation"}[u.memoryKind]??"Allocation type unspecified"}</p></div></article>`}).join("")||`<p class="empty-small">${r==="unknown"||l.residencyReported===!1?"Model residency has not been reported.":"No loaded models in this host\u2019s latest report."}</p>`}</div><p class="table-foot">Loaded means resident; it does not imply an active request. Allocations are source-reported. Device and system memory can overlap on unified-memory hardware.</p>${Z$(l.id)}</section><p class="table-foot">Additional hosts come from your hardware export. Collection stays passive; the terminal does not discover machines or manage workloads.</p>`}function Z$(e){let t=(A.data.runtimeStats??[]).filter(n=>n.hostId===e);return t.length?`<div class="section-title"><h2>Runtime counters</h2></div><div class="inventory-grid">${t.map(n=>`<article class="inventory-card"><h3>${ca(n.name,18)}</h3>${ra([["Running / waiting",`${Xe(n.running)} / ${Xe(n.waiting)}`],["Input / output tokens",`${Xe(n.inputTokens)} / ${Xe(n.outputTokens)}`],["Finished requests",Xe(n.finished)]])}<p>Lifetime counters since the runtime reset. Separate from the activity window.</p></article>`).join("")}</div>`:""}var dg={application:"Declaration",candidate:"Candidate",benchmark:"Benchmark",example:"Example",test:"Test",fallback:"Fallback",alias:"Model alias",unlinked:"Unlinked reference"},F$={"non-inference-endpoint":"Hub URL does not identify an inference service","syntax-error":"Could not parse this file","unresolved-expression":"Computed or ambiguous value","unresolved-environment":"Environment value not found in project files","ambiguous-environment":"Multiple environment declarations disagree","unresolved-alias":"YAML alias was not expanded","placeholder-endpoint":"Placeholder endpoint excluded","unsupported-endpoint":"Endpoint could not be safely indexed","unsupported-value":"Value is not a supported identifier","model-pattern":"Model pattern, not a concrete model","changed-during-read":"File changed while being read; retried next pass","scan-limit":"Scan reached its configured bounds","oversized-file":"File exceeds the read limit","unreadable-file":"File could not be read","unreadable-directory":"Directory could not be read","binary-file":"Binary content skipped","syntax-budget":"Syntax complexity limit reached"};function TA(e=[],t="Declaration evidence"){let n=(A.data.repository?.references??[]).filter(a=>e.includes(a.id));return n.length?`<div class="detail-section-title"><h3>${R(t)}</h3></div><div class="service-model-list">${n.map(a=>`<button class="service-model-row" data-inspect="reference" data-key="${R(a.id)}"><span>${R(a.file)}:${a.line}<small>${R(a.field)} \xB7 ${R(dg[a.context]||a.context)}</small></span><span aria-hidden="true">\u2197</span></button>`).join("")}</div><p class="detail-note">A declaration is not a request or proof that this model is available.</p>`:""}function J$(){let e=A.data.repository,t=e?.progress;if(!t||t.phase==="complete")return"";let n=t.phase==="failed",a=n?"Repository indexing interrupted":t.phase==="discovering"?"Finding project files":t.phase==="resolving"?"Linking declarations":t.phase==="queued"?"Preparing repository index":"Indexing code & configuration",l=n?"Showing the last available declarations. Retrying in 60s.":t.total!=null?`${G(t.processed)} of ${G(t.total)} files checked${t.reused?` \xB7 ${G(t.reused)} unchanged`:""}`:`${G(t.discovered)} supported files found`;return`<section class="index-progress${n?" interrupted":""}" aria-label="Repository indexing"><div class="index-progress-copy"><strong role="status">${a}</strong><span>${l}</span></div>${n?"":`<progress aria-label="Files checked" ${t.total!=null&&t.total>0?`max="${t.total}" value="${t.processed}"`:""}></progress>`}<button class="text-button" data-page="sources">Coverage \u2192</button><small>${e.checkedAt?"Available declarations remain usable while the index updates.":"Results appear as files are read. Request collection runs separately."}</small></section>`}function wA(e=!0){let t=A.data.repository;if(!t)return"";let n=t.summary;return`${ra([["Files indexed",G(n.filesIndexed??n.filesRead)],["Files read this pass",G(n.filesRead)],...t.progress?[["Index state",{complete:"Up to date",queued:"Preparing",discovering:"Finding files",indexing:"Reading files",resolving:"Linking declarations",failed:"Interrupted"}[t.progress.phase]||t.progress.phase],["Files checked",`${G(t.progress.processed)} / ${t.progress.total==null?"discovering":G(t.progress.total)}`],["Parsed this pass",G(t.progress.parsed)],["Reused this pass",G(t.progress.reused)],["Elapsed",`${(t.progress.elapsedMs/1e3).toFixed(1)}s`]]:[],["Metadata references",G(n.declarations)],["Read this pass",`${(n.bytesRead/1024).toLocaleString(void 0,{maximumFractionDigits:1})} KiB`],...Object.entries(n.skipped).map(([a,l])=>[`Skipped \xB7 ${a}`,G(l)])])}${e?`<button class="text-button" data-inspect="index-issues" data-key="all">${G(n.unresolved)} coverage notes \u2197</button>`:""}<p class="detail-note">For a report containing only coverage counts, run <code>openmerit dash --diagnostics</code>. It contains no source paths, endpoint names, model names, or credentials.</p>`}function P$(){let e=A.data.repository;e&&He("Index coverage","What the static reader could not establish.",`${wA(!1)}<div class="service-evidence-list">${e.issues.map(t=>`<div><strong>${R(F$[t.code]||t.code)}</strong><span>${R(t.file||"Repository")}${t.file?`:${t.line}`:""}</span>${t.field?`<small>${R(t.field)}</small>`:""}</div>`).join("")}</div>${e.summary.unresolved>e.issues.length?`<p class="detail-note">Showing ${e.issues.length} of ${e.summary.unresolved} notes.</p>`:""}<p class="detail-note">Static reading cannot resolve imported values, arbitrary expressions, dynamic routes, or runtime environment overrides. Missing declarations do not mean the application uses no inference.</p>`)}function W$(e){let t=A.data.repository,n=t?.references.find(l=>l.id===e);if(!n)return;let a=t.references.filter(l=>n.endpointIds?.includes(l.id)||l.endpointIds?.includes(n.id)||n.kind==="task"&&l.kind==="model"&&l.file===n.file&&l.task===n.value);He(n.value,`${n.kind==="task"?"Call site / task declaration":n.kind==="model"?"Model declaration":"Endpoint declaration"} \xB7 ${dg[n.context]||n.context}`,`${ra([["Source",`${n.file}:${n.line}`],["Field",n.field],["Basis",n.basis],...n.via?[["Referenced declaration",`${n.via.file}:${n.via.line}`]]:[],...n.task?[["Enclosing function",n.task]]:[],...n.endpoint?[["Service identity",n.endpoint.service],["Role",Ir[n.endpoint.serviceType]?.label||"Unclassified"],["Path detail",n.endpoint.pathRedacted?"Resource path omitted":"Structural API path only"]]:[],...n.localLibrary?[["Declaration","Local model library; residency unknown"]]:[]])}${a.length?` ${TA(a.map(l=>l.id),"Linked declarations")}`:""}<p class="detail-note">Found by reading syntax, without executing this project. This is not evidence of a completed task, a running agent, a reachable endpoint, or a loaded model. Runtime overrides and unreported routing remain unknown.</p>`)}function e4(){let e=A.data.repository;if(!e)return"";let t=e.references,n=t.filter(i=>($d==="all"||i.kind===$d)&&[i.value,i.file,i.field,i.context].join(" ").toLowerCase().includes(tg.toLowerCase())),a=Math.max(1,Math.ceil(n.length/25));Vn=Math.max(0,Math.min(Vn,a-1));let l=n.slice(Vn*25,Vn*25+25);return`<section class="repository-index"><div class="section-title"><div><h2>Code & configuration</h2><p class="quiet">${G(e.summary.filesIndexed??e.summary.filesRead)} files indexed \xB7 ${G(t.length)} references \xB7 no code executed</p></div><button class="text-button" data-inspect="index-issues" data-key="all">${G(e.summary.unresolved)} coverage notes \u2197</button></div><div class="service-filter-bar"><div class="filter-tabs" role="group" aria-label="Filter code references">${[["all","All references"],["endpoint","Endpoints"],["model","Models"],["task","Call sites & tasks"]].map(([i,o])=>`<button data-ui-key="reference-kind-${i}" data-reference-kind="${i}" aria-pressed="${$d===i}">${o}<span>${i==="all"?t.length:t.filter(s=>s.kind===i).length}</span></button>`).join("")}</div><input class="filter-input" type="search" id="reference-search" aria-label="Search code references" placeholder="Find a declaration or file\u2026" value="${R(tg)}"></div>${l.length?`<div class="table-wrap"><table class="data-table reference-table"><thead><tr><th>Declaration</th><th>Context</th><th>Evidence</th></tr></thead><tbody>${l.map(i=>`<tr data-ui-key="reference-${R(i.id)}"><td><button class="model-name" data-inspect="reference" data-key="${R(i.id)}"><span><strong>${R(i.value)}</strong><small>${i.kind==="task"?"Call site / task":i.kind==="model"?"Model":"Endpoint"}</small></span></button></td><td>${R(dg[i.context]||i.context)}</td><td><button class="text-button reference-file" data-inspect="reference" data-key="${R(i.id)}">${R(i.file)}:${i.line} \u2197</button></td></tr>`).join("")}</tbody></table></div>`:`<p class="empty-small">${t.length?"No declarations match this view.":e.progress&&e.progress.phase!=="complete"?"The repository index is still incomplete. Declarations will appear here as they are read.":"No supported inference declarations found. Review coverage for skipped or unresolved files."}</p>`}<div class="reference-pagination"><span class="quiet">${n.length?`${Vn*25+1}\u2013${Vn*25+l.length} of ${n.length}`:"0 references"}</span>${a>1?`<button class="text-button" data-reference-page="${Vn-1}" ${Vn===0?"disabled":""}>\u2190 Previous</button><button class="text-button" data-reference-page="${Vn+1}" ${Vn===a-1?"disabled":""}>Next \u2192</button>`:""}</div><p class="table-foot">Declarations are separate from recorded usage. Examples, benchmarks, candidates, fallbacks, aliases and unlinked references are retained here; they do not add to application model or service inventory.</p></section>`}function t4(){let e=A.data.discovery,t=A.data.sources.filter(a=>a.state==="needs_access").length,n=e?`<div class="discovery-summary"><div><strong>${e.enabled?"Automatic discovery":"Automatic discovery off"}</strong><span>${e.enabled?"Code & configuration \xB7 saved request logs \xB7 linked runtimes":"Automatic discovery is disabled for this run."}</span></div><span>${t?`${t} source${t===1?" needs":"s need"} access`:e.enabled?`Checks every ${e.intervalSeconds}s`:"Read-only collection"}</span></div>`:"";return`${io("Sources & coverage","What your environment exposes, and what the terminal can read.",!1)}${n}${e4()}<div class="source-list">${A.data.sources.map(a=>`<button class="source-row" data-inspect="source" data-key="${R(a.id)}"><span><h3>${ca(a.name,18)}</h3><p>${R(a.detail)}</p>${a.coverage?`<span class="source-coverage">${a.coverage.map(R).join(" \xB7 ")}</span>`:""}${a.limits?.length?`<span class="source-coverage">${a.limits.map(l=>`${G(l.omitted)} ${R(l.collection)} omitted \xB7 limit ${G(l.limit)}`).join("; ")}</span>`:""}</span><span class="source-kind">${R(a.kind)}</span>${rg(a.state)}<span class="quiet">\u2197</span></button>`).join("")}</div><section class="panel instruction-panel"><h2>${A.data.mode==="sample"?"Discovery starts on your machine.":"Your existing data, connected."}</h2><p>Running <code>openmerit dash</code> indexes supported code/configuration and saved request logs. Static declarations remain separate from usage. Usage belongs to this application; coding-harness usage is excluded. Sources show which records contribute to totals and which could not be reconciled.</p><button class="button" data-action="connect">Source details ${ig("arrow")}</button><button class="text-button" data-action="api" style="margin-left:18px">Read from an agent \u2197</button></section>`}function n4(){let e=A.data.simulation,t=e.assignments,n=e.windows[A.hours]??e.windows[0],a=n.beforeCost,l=n.afterCost,i=l===null?null:a-l,o=t.filter(y=>y.changed).length,s=t.filter(y=>y.unresolved).length,r=t.filter(y=>y.override),d=t.filter(y=>y.preferenceMatched).length,u=t.filter(y=>y.preferenceChanged).length,p=xl(mn),f=s?`Plan incomplete \xB7 ${t.length-s} of ${t.length} workloads have an assignment`:`${sa(t.filter(y=>y.modelChanged).length,"model change")} \xB7 ${sa(t.filter(y=>y.serviceChanged).length,"service change")} \xB7 ${t.length-o} retained`,c=mn==="default"?`${e.catalogSize} model/service offers \xB7 ${e.configuredServices.length} configured services`:`${d} of ${t.length} workloads match \xB7 ${u?`${u} choices differ from Default`:"Same choices as Default"}`,v=t.map((y,m)=>({pair:y,index:m})).sort((y,m)=>Number(m.pair.override)-Number(y.pair.override)||Number(m.pair.preferenceChanged)-Number(y.pair.preferenceChanged)||m.pair.qualifiedCount-y.pair.qualifiedCount),S=(e.equivalentPreferences??[]).map(y=>({default:"Default",zdr:"ZDR",open:"open weights",closed:"no open weights",usa:"USA",china:"Chinese"})[y]);return`<section class="comparison" aria-label="Before and after model comparison"><div class="comparison-top"><div><h2>Before & after OpenMerit</h2><p>Insurance operations \xB7 fixed baseline workloads and token volume.</p></div><div class="comparison-controls"><div class="comparison-switch" role="group" aria-label="Comparison stage"><button data-ui-key="demo-before" data-demo-stage="before" aria-pressed="${Cn==="before"}">Before OpenMerit</button><button data-ui-key="demo-after" data-demo-stage="after" aria-pressed="${Cn==="after"}">After OpenMerit</button></div><label class="comparison-preference" for="demo-preference"><span>After preference</span>${Gr({id:"demo-preference",label:"After OpenMerit preference",value:mn,options:co})}</label></div></div><div class="comparison-bottom"><div class="comparison-cost ${Cn==="before"?"selected":""}"><span>Before \xB7 token cost</span><strong>${Aa("comparison-before",tn(a))}</strong></div><span class="comparison-arrow" aria-hidden="true">\u2192</span><div class="comparison-cost ${Cn==="after"?"selected":""}"><span>After \xB7 token cost</span><strong>${Aa("comparison-after",tn(l))}</strong></div><div class="comparison-saving"><strong>${i===null?"Plan incomplete":i>0?`${(i/a*100).toFixed(1)}% lower`:i<0?`${(-i/a*100).toFixed(1)}% higher`:"Same token cost"}</strong><span>${i===null?"Full-plan cost and savings unavailable":`${tn(Math.abs(i))} modeled difference \xB7 ${Dn(A.hours)}`}</span><button class="text-button" data-action="prices">Swaps & evidence \u2197</button></div></div><div class="comparison-eligibility" role="status"><span class="${s?"preference-unresolved":""}">${f}</span><span>${s?`${s} need a compatible assignment \xB7 ${e.catalogSize} offers reviewed`:c}</span></div><p class="comparison-note">${R(p.note)}${mn!=="default"?" Preferences can override benchmark and cost/speed criteria; exceptions appear in the evidence.":""} Public benchmark screening; application quality and latency are untested.</p>${r.length?`<p class="comparison-override" role="status"><strong>${sa(r.length,"preference override")}</strong><span>Included in After costs \xB7 primary criteria not met.</span><button class="text-button" data-action="prices">Review exceptions \u2197</button></p>`:""}${S.length?`<p class="comparison-note">Same model mix and cost as ${R(S.join(" / "))}: the selected choices satisfy these preferences together.</p>`:""}${s?`<div class="comparison-unresolved"><div><strong>${s} workloads need a compatible assignment</strong><button class="text-button" data-action="prices">Review evidence \u2197</button></div><ul>${t.filter(y=>y.unresolved).map(y=>`<li><span>${R(y.purpose)}</span><small>Before: ${R(y.before.name)} \xB7 ${R(y.before.provider)}</small></li>`).join("")}</ul><p>${Cn==="after"?`Views below include assigned workloads \xB7 ${Xe(n.assignedRequests)} of ${Xe(n.requests)} baseline requests in this window.`:"Before shows the complete baseline. After includes only workloads with an assignment."}</p></div>`:""}<details class="comparison-decisions" ${hA?"open":""}><summary>Workload decisions <span>${t.length}</span></summary><div class="table-wrap"><table class="data-table"><thead><tr><th>Workload</th><th>Before</th><th>${e.feasible?"After":"Assigned option"}</th><th>Token cost \xB7 ${Dn(A.hours)}</th><th>Preference</th></tr></thead><tbody>${v.map(({pair:y,index:m})=>`<tr><td>${R(y.purpose)}<small>${sa(y.qualifiedCount,"qualifying alternative")}</small></td><td>${R(y.before.name)}<small>${R(y.before.provider)}</small></td><td>${y.after?R(y.after.name):"No compatible assignment"}<small>${y.after?R(y.after.provider)+(y.serviceChanged?y.modelChanged?" \xB7 model + service change":" \xB7 service change":y.changed?" \xB7 model change":" \xB7 retained"):"No After assignment"}</small></td><td>${tn(n.workloads[m].beforeCost)} \u2192 ${tn(n.workloads[m].afterCost)}</td><td>${y.override?'<span class="preference-override">Preference override</span><small>Primary criteria not met</small>':y.unresolved?"Required \xB7 unmet":mn==="default"?y.changed?"Lowest qualified cost":"Baseline retained":y.preferenceMatched?y.preferenceChanged?"Matches \xB7 differs from Default":"Matches":"No compatible match"}</td></tr>`).join("")}</tbody></table></div></details></section>`}var a4=e=>({tools:"Tool use",capabilities:"Capabilities",reasoning:"Reasoning",decisionAccuracy:"Decision accuracy",calibration:"Decision calibration"})[e]||e;function dA(e){return`<div class="benchmark-checks">${e.map(t=>`<div class="benchmark-check" data-check="${R(t.status)}"><div><span>${a4(t.axis)}</span><strong>${R(t.before?.name??t.after?.name??"Matched evaluation needed")}</strong></div><span class="benchmark-values">${t.status==="missing"?"No comparable evidence":`${t.before.value}${t.before.unit} \u2192 ${t.after.value}${t.after.unit}${t.status==="regression"?" \xB7 regression":" \xB7 passes"}`}</span></div>`).join("")}</div>`}function l4(){let e=A.data.simulation,t=l=>`$${l.input.toFixed(3).replace(/0+$/,"").replace(/\.$/,"")} / $${l.output.toFixed(3).replace(/0+$/,"").replace(/\.$/,"")}`,n=e.assignments,a=n?n.map((l,i)=>({pair:l,index:i})).sort((l,i)=>Number(i.pair.override)-Number(l.pair.override)).map(({pair:l,index:i})=>{let o=(e.windows[A.hours]??e.windows[0]).workloads[i],s=l.changed?l.checks:[],r=u=>u?`<strong>${R(u.name)}</strong><span>${R(u.provider)} \xB7 ${t(u)} per 1M</span>${u.configuration?`<span>${R(u.configuration)}</span>`:""}<a href="${R(u.source)}" target="_blank" rel="noopener noreferrer">Published rates \u2197</a>`:"<strong>No qualifying assignment</strong><span>Closed-weight requirement unmet</span>",d=[...l.assessments].sort((u,p)=>+(p.candidate.id===l.after?.id)-+(u.candidate.id===l.after?.id)||Number(p.eligible)-Number(u.eligible)||u.candidate.name.localeCompare(p.candidate.name));return`<section class="price-assignment"><div class="price-workload"><h3>${R(l.purpose)}</h3><span class="${l.override?"preference-override":l.unresolved?"preference-unresolved":""}">${l.override?"Preference override":l.unresolved?"Unresolved":l.changed?l.modelChanged?"Model change":"Service change":"Retained"}</span></div><div class="price-provider"><span>${Xe(o.requests)} requests</span><span>${sa(l.qualifiedCount,"qualifying alternative")}</span></div><div class="price-models"><div>${r(l.before)}</div><span aria-hidden="true">\u2192</span><div>${r(l.after)}</div></div><p class="price-decision">${R(l.reason)}</p>${l.override?`<div class="override-evidence"><strong>Criteria overridden</strong><ul>${l.overrideReasons.map(u=>`<li>${R(u)}</li>`).join("")}</ul></div>`:""}<p class="benchmark-method">${R(l.benchmarkProfile)}${l.tokenProfile?` \xB7 fictional profile: ~${G(l.tokenProfile.input)} input / ${G(l.tokenProfile.output)} output tokens per request, including billed reasoning.`:""}</p>${l.changed?dA(s):""}<div class="price-result">${tn(o.beforeCost)} \u2192 ${tn(o.afterCost)} <span>\xB7 ${Dn(A.hours)}${e.feasible?"":" \xB7 individual option only; no complete plan"}</span></div><details class="pricing-assumptions"><summary>Review ${d.length} candidates & sources</summary>${d.map(u=>`<details class="candidate-review"><summary><span>${R(u.candidate.name)} \xB7 ${R(u.candidate.provider)}</span><span>${l.override&&u.candidate.id===l.after?.id?"Selected \xB7 override":u.eligible?mn==="closed"&&u.candidate.openWeights!==!1?"Excluded":"Qualified":"Not qualified"}</span></summary><p>${R(u.issues.join(" \xB7 ")||(mn==="closed"&&u.candidate.openWeights!==!1?"Excluded by the no open-weights requirement.":"Passes the selected benchmark and efficiency checks."))}</p>${dA(u.checks)}${[...new Set(u.checks.flatMap(p=>[p.before?.source,p.after?.source]).filter(Boolean))].map(p=>`<a href="${R(p)}" target="_blank" rel="noopener noreferrer">Published benchmark comparison \u2197</a>`).join("")}${u.checks.filter(p=>p.before).map(p=>`<p class="benchmark-method">${R(p.before.name)}: ${R(p.before.settings)}${p.after?.settings!==p.before.settings?` After: ${R(p.after?.settings??"Not supplied")}`:""}</p>`).join("")}</details>`).join("")}</details></section>`}).join(""):A.data.models.map(l=>{let i=e.prices.find(o=>o.provider===l.provider&&o.name===l.name);return`<div class="price-assignment"><div class="price-provider">${ca(l.provider)}</div><strong>${R(l.name)}</strong>${i?`<p>${t(i)} per 1M input / output tokens</p><a href="${R(i.source)}" target="_blank" rel="noopener noreferrer">Published rates \u2197</a>`:'<p class="quiet">No verified token rate in this price sheet. Cost is unknown and excluded from the total.</p>'}</div>`}).join("");He(n?"Model choices & evidence.":"Published prices. Fictional usage.",`USD per million input / output tokens \xB7 checked ${Zd}`,`<div class="pricing-method"><p>Cost = input tokens \xD7 input rate + output tokens \xD7 output rate, divided by one million.</p>${n?"<p>Qualified swaps clear the selected benchmark and efficiency checks. Preference overrides are explicitly labeled, with the unmet criteria preserved below. Application quality remains untested.</p>":""}<details class="pricing-assumptions"><summary>Method & limitations</summary><p>Standard text rates, uncached, with per-request inputs below 33K tokens. No batch discounts, regional premiums, tool charges, taxes, gateway fees or infrastructure costs. Missing prices stay unknown.</p><p>Each fictional group represents 1,000 requests. Tokens stay fixed across models, including reasoning output where billed; actual tokenization, reasoning budgets and output length may differ. No application-quality or latency evaluation has run.</p>${n?'<p>Benchmark scores are publisher-reported point estimates in the linked configurations. They are not statistical proof of parity or superiority across every benchmark. For example, GPT-4.1 regresses on ComplexFuncBench even though it clears the selected \u03C4-bench retail, MMLU and AIME 2024 screen.</p><p>The reviewed catalog is a dated subset of the services\u2019 model offerings, not an exhaustive provider catalog. Retained means insufficient evidence in this catalog, not that no better model exists. Every workload searches the full reviewed catalog across the six configured services, preserving its output contract. Model identity is separate from serving service. A service-only move uses the same checkpoint and published model scores, not a measured comparison between endpoints. Default enforces every benchmark and efficiency criterion. Other preferences first select a qualified matching replacement, or retain an already matching baseline. If neither exists, a compatible matching model can override those criteria. The evidence preserves every missing comparison, known regression and unverified efficiency improvement. Configured services, output compatibility and known token pricing remain required. Closed weights cannot be waived. Only the absence of a compatible closed offer leaves a workload unassigned and full-plan totals unavailable. Overrides are included in modeled costs, not counted as qualified replacements. Fallback candidates are ranked by fewest axes with known regressions, then fewest missing axes, verified efficiency improvement, modeled cost and offer ID. Missing evidence is uncertainty, not a pass. Preferences can produce identical choices; matching model mixes are identified explicitly. Application-code workers generate SQL and Python inside the insurance product. Their capability screen uses LiveCodeBench v6 or LiveCodeBench Pro within separate publisher comparisons; percentage and Elo scores are never compared. Their fixed fictional input/output profiles are declared per workload and do not change with a preference.</p><p>Jev returns typed decisions and probabilities, not generated text. Decision tasks additionally need matched accuracy and calibration evidence and an appropriate output contract. No Jev swap is currently qualified. <a href="https://typesafe.ai/blog/introducing-system-one-models-and-jev" target="_blank" rel="noopener noreferrer">TypeSafe\u2019s model explanation \u2197</a></p><p>ZDR is an endpoint/account property. Only the fictional synchronous Baseten endpoint uses a documented default ZDR policy here; conditional provider eligibility is not treated as enabled. Router, gateway and application logging still need separate review. <a href="https://www.baseten.co/security-practices/" target="_blank" rel="noopener noreferrer">Endpoint retention policy \u2197</a></p><p>USA and Chinese identify model developer origin, not hosting or residency. Open weights does not imply a particular license or privacy policy.</p>':""}</details></div>${a}`,"Pricing")}function i4(){if(A.data.loading)return`${A.error?`<div class="notice">${R(A.error)}</div>`:""}<section class="terminal-loading" role="status"><h1>${A.data.loadError?"Waiting for project sources":"Opening your inference terminal."}</h1><p>${A.data.loadError?"The first collection did not finish. Retrying automatically; your application is unaffected.":"Reading saved activity and configuration. Your application can keep running."}</p><progress aria-label="Reading project sources"></progress><span>Data appears as it becomes available.</span></section>`;let e=!nn&&Date.now()-Date.parse(A.data.observedAt)>A.data.interval*3e3,t=A.data.mode==="sample",n=A.data.discovery?.reconciliation,a=A.data.sources.filter(s=>s.limits?.length),l=a.length?`<div class="notice" role="status">Inventory is incomplete. ${a.length} ${a.length===1?"source reached a collection limit":"sources reached collection limits"}. <button class="text-button" data-page="sources">Review omitted entries \u2192</button></div>`:"",i=!t&&(n?.excluded||n?.conflicts)?`<div class="notice" role="status">${n.excluded?`${G(n.excluded)} records are excluded from totals because source overlap is unresolved. `:""}${n.conflicts?`${G(n.conflicts)} requests have conflicting source records. `:""}<button class="text-button" data-page="sources">Review sources \u2192</button></div>`:"",o={overview:j$,models:Y$,services:V$,activity:K$,compute:Q$,sources:t4}[A.page]();return`${A.error?`<div class="notice" role="status">${R(A.error)}</div>`:e?'<div class="notice" role="status">Collection is delayed. Showing the last available snapshot.</div>':""}${t?`<div class="sample-disclosure"><span>${nn?"Demo. Fictional usage, published model prices.":Vt()?"Enterprise sample. 9.6M fictional requests across 30 days. Published prices where available.":"Sample environment. Names, requests, and hardware are fictional."}</span>${to?nn?'<a href="/">Enterprise sample \u2197</a>':'<a href="/demo">Before & after \u2192</a>':""}${A.info.defaultMode!=="sample"?'<button data-action="live">View your environment \u2192</button>':""}</div>`:""}${nn?n4():Vt()?'<div class="sample-method"><button class="text-button" data-action="prices">Pricing & assumptions \u2197</button></div>':""}${i}${l}${J$()}${o}${H$()}`}function ct({focusMain:e=!1,focusTab:t=!1}={}){try{return o4({focusMain:e,focusTab:t})}catch(n){throw ua("terminal_error",{code:"render_error",...Vr(n)}),n}}function o4({focusMain:e=!1,focusTab:t=!1}={}){El();let n=!_e("#terminal-panel"),a=document.activeElement,l=a?.getAttribute("role")==="tab"?a.dataset.page:null,i=a?.dataset?.hours,o=a?.dataset?.filter,s=window.scrollY;if(U2(L$(),A.data,A.error),oA({snapshot:A.data,records:xt?De().filter(r=>r.agentId===xt):De(),hours:A.hours,onInspect:r=>{let d=r.type==="path"?"entry":r.type==="model"?"map-model":r.type;wl(d,r.inspectKey??r.key)}}),n&&Fr(_e(`#tab-${A.page}`)),t){let r=_e(`#tab-${A.page}`);r?.focus({preventScroll:!0}),Fr(r),window.scrollTo(0,0)}else e?(_e("#main").focus({preventScroll:!0}),Fr(_e(`#tab-${A.page}`)),window.scrollTo(0,0)):(l&&(document.querySelectorAll('.terminal-tabs [role="tab"]').forEach(r=>{r.tabIndex=r.dataset.page===l?0:-1}),_e(`#tab-${l}`)?.focus({preventScroll:!0})),i&&_e(`[data-hours="${i}"]`)?.focus({preventScroll:!0}),o&&_e(`[data-filter="${o}"]`)?.focus({preventScroll:!0}),window.scrollTo(0,s))}function fg(e){let t=new URLSearchParams;return e==="sample"&&t.set("sample","1"),og&&t.set("map","flow"),nn&&(t.set("stage",Cn),mn!=="default"&&t.set("preference",mn)),t.size?`?${t}`:""}function no(e,{focusTab:t=!1}={}){e==="connections"&&(e="services",vs="map"),iu.includes(e)&&(A.page=e,ua("terminal_page_viewed",{page:e}),e==="services"&&vs==="map"&&ua("terminal_page_viewed",{page:"connections"}),A.filter="all",A.search="",history.replaceState(null,"",`${location.pathname}${fg(A.mode)}#${e}`),ct({focusMain:!t,focusTab:t}))}function Fr(e){if(!e)return;let t=e.closest(".terminal-tabs"),n=e.offsetLeft,a=n+e.offsetWidth,l=parseFloat(getComputedStyle(t).paddingRight)||0;n<t.scrollLeft?t.scrollLeft=n:a>t.scrollLeft+t.clientWidth-l&&(t.scrollLeft=a-t.clientWidth+l)}window.addEventListener("resize",()=>Fr(document.activeElement?.matches('.terminal-tabs [role="tab"]')?document.activeElement:_e(`#tab-${A.page}`)));function s4(){let e=[...A.data.taskSummaries??[]].sort((t,n)=>Date.parse(n.occurredAt)-Date.parse(t.occurredAt));return e.length?`<details class="identity-evidence"><summary>${G(e.length)} retained task ${e.length===1?"summary":"summaries"}</summary><p class="detail-note">Task-level evidence only. These values are excluded from request totals, charts, tokens, and spend.</p>${e.slice(0,100).map(t=>`<div class="detail-section-title"><h3>${R(t.workload)}</h3><span>${R(new Date(t.occurredAt).toLocaleString())}</span></div>${ra([["Model reported by task",t.model],["Input / output tokens",`${Xe(t.inputTokens)} / ${Xe(t.outputTokens)}`],["Cost basis",["reported","estimated"].includes(t.costKind)?t.costKind:"Not supplied"],["Task cost",t.currency==="USD"?tn(t.cost):t.cost==null?"Not supplied":`${Xe(t.cost)} \xB7 currency unknown or unsupported`]])}`).join("")}${e.length>100?'<p class="detail-note">Showing the latest 100 summaries. The JSON snapshot contains all retained summaries.</p>':""}</details>`:""}function gi(e){return A.data.sources.find(t=>t.id===e)?.detail||e}function r4(e,t){let n=[...new Set(e.map(l=>l[t]).filter(Boolean))],a=[...new Set(e.map(l=>l[t]?t:`${t}Id`))];return`<details class="identity-evidence"><summary>Where this name comes from</summary>${ra([[`${t==="agent"?"Agent":"Task"} ID`,e[0]?.[`${t}Id`]||"Not supplied"],["Display name",n.join(" \xB7 ")||"Not supplied; displaying the ID"],["Metadata fields",a.join(", ")],["Source",[...new Set(e.map(l=>gi(l.sourceId)))].join(" \xB7 ")]])}<p>${A.data.mode==="sample"?"Fictional example fields from the sample export. These are not files or agents discovered in your project.":"Copied from recorded metadata. The terminal does not infer a role or task description from code or prompts."}</p></details>`}function u4(){return`<p class="detail-note">${A.data.mode==="sample"?"Sample names are fictional export fields, not discovered agents. ":""}Names come from recorded metadata; missing names use the supplied ID. Only explicit agent IDs establish these links.</p>`}function lg(e){return[["Model creator",e.creatorConflict?"Conflicting reports":e.modelCreator||"Not reported"],...e.modelCreator||e.creatorConflict?[["Creator source",(e.creatorSources??[e.sourceId]).filter(Boolean).map(gi).join(" \xB7 ")||"Not supplied"]]:[]]}function ra(e){return`<dl class="detail-list">${e.map(([t,n,a])=>`<div><dt>${R(t)}</dt><dd>${a==="models"?`<span class="identity-list">${n.map(l=>lo(l,15)).join("")}</span>`:a==="services"?`<span class="identity-list">${n.map(l=>ca(l,15)).join("")}</span>`:["Provider","Provider / runtime","Served by","Model creator","Connection"].includes(t)?ca(n,15):R(n)}</dd></div>`).join("")}</dl>`}function He(e,t,n,a="",l={}){Wr||(Od=null);let i=_e("#inspector");i.classList.toggle("environment-inspector",["Agent environment","Deployment","Shared capacity","Reported path","Service"].includes(a));let o=`<div class="inspector-head"><button class="close-button" data-action="close" aria-label="Close details">\xD7</button><h2 id="inspector-title">${ao(e,l.title,24)}</h2><p>${ao(t,l.subtitle,15)}</p></div><div class="inspector-body">${n}</div>`;if(ng){B2(o);return}i.open||(Rd=document.activeElement),i.innerHTML=o,i.showModal(),i.scrollTop=0}function au(){if(!(!Od||!_e("#inspector").open)){Wr=!0,ng=!0;try{pg(...Od)}finally{Wr=!1,ng=!1}}}function wl(e,t,n){Wi("inspect",e==="map-model"?"model":e==="entry"?"path":e),Od=[e,t,n],Qr="deployments",Wr=!0;try{pg(e,t,n)}finally{Wr=!1}}function pg(e,t,n){if(e==="map-model"){let a=A.data.models.find(l=>JSON.stringify([l.provider,l.name])===t);a?pg("model",a.id):He("Model no longer in view","Activity changed since the map was drawn.",'<p class="detail-note">Choose a model from the current inventory.</p>');return}if(e==="service"){X$(t);return}if(e==="reference"){W$(t);return}if(e==="index-issues"){P$();return}if(!c4(e,t))if(e==="agent-list"||e==="task-list"){let a=e==="agent-list"?"agent":"task",l=mi(a);He(a==="agent"?"Agents in view":"Tasks in view",`${G(l.length)} recorded \xB7 ${Dn(A.hours)}`,`<div class="entity-head"><span>${a==="agent"?"Agent":"Task"}</span><span>Models</span><span>Requests</span></div><div class="entity-list">${l.map(i=>`<button class="entity-row" data-inspect="${a}" data-key="${R(i.id)}"><span><strong>${R(i.name)}</strong><small>${a==="agent"?`${i.related.size} ${i.related.size===1?"task":"tasks"} observed`:R([...i.related].join(", "))}</small></span><span>${i.models.size}</span><span>${G(i.count)}</span></button>`).join("")}</div><p class="detail-note">Only source-reported IDs in the selected window are counted. Names use exported labels or fall back to the ID; the terminal does not discover agent roles from code. Request activity does not establish task completion.</p>`,"Observed activity")}else if(e==="agent"||e==="task"){let a=De().filter(o=>o[`${e}Id`]===t);if(!a.length){He("No activity in this window",`${e} \xB7 ${t}`,'<p class="detail-note">This identity no longer has retained activity in the selected window.</p>',"Agent environment");return}let l=gs(a),i=a[0][e]||t;He(i,`Recorded ${e} \xB7 ${Dn(A.hours)}`,`<button class="text-button" data-inspect="${e}-list" data-key="all">\u2190 All ${e==="agent"?"agents":"tasks"}</button>${e==="agent"?`<button class="text-button agent-map-link" data-focus-agent="${R(t)}">Focus on map \u2197</button>`:""}<div class="agent-metrics">${[["Requests",G(mt(a))],["Models",G(new Set(a.map(o=>`${o.provider}:${o.model}`)).size)],["Median latency",eo(l.latency)],[Vt()?"Modeled token cost":"Recorded spend",tn(l.cost)]].map(([o,s])=>`<div><span>${o}</span><strong>${s}</strong></div>`).join("")}</div>${r4(a,e)}${B$(a)}<p class="detail-caption">${e==="agent"?"Tasks observed":"Agents observed"}</p><p class="muted">${R([...new Set(a.map(o=>e==="agent"?o.task||o.taskId:o.agent||o.agentId).filter(Boolean))].join(" \xB7 ")||"Not supplied")}</p><p class="detail-note">Reported inference metadata only. Task lifecycle and agent orchestration remain outside the terminal.</p>`,e==="agent"?"Agent environment":"Observed activity")}else if(e==="model"){let a=A.data.models.find(s=>s.id===t);if(!a)return;let l=De().filter(s=>s.model===a.name&&s.provider===a.provider),i=gs(l),o=Sl(A.data);He(a.name,a.state==="declared"?"Declared in code or configuration":`Served by ${a.provider} \xB7 ${a.location}`,`${TA(a.declarationIds)}${ra([[a.state==="declared"?"Declared service":"Served by",a.provider],...lg(a),["State",Zr(a.state)],["Observed paths",eu(l).map(s=>$e[s].label).join(", ")||(o?"Not observed":"Unavailable")],["Observed requests",o?G(mt(l)):"Unavailable"],["Window",Ns(A.hours)],["Input / output tokens",`${Xe(i.input)} / ${Xe(i.output)}`],["Median latency",eo(i.latency)],[Vt()?"Modeled token cost":"Recorded spend",tn(i.cost)],["Cost coverage",o?`${i.costCount} of ${mt(l)} requests`:"Unavailable"],...a.memoryBytes!=null?[["Reported VRAM allocation",Tl(a.memoryBytes)]]:[],...a.parameters?[["Parameters",a.parameters]]:[],...a.quantization?[["Quantization",a.quantization]]:[]])}<div class="detail-section-title"><h3>Deployments</h3></div>${nu(l)}<p class="detail-caption">Used by</p><p class="muted">${R([...new Set(l.map(s=>s.workload))].join(", ")||(o?"No use observed in this window.":"Request activity is unavailable."))}</p><p class="detail-note">${a.state==="loaded"?"Loaded means resident in memory, not necessarily generating. ":""}Usage reflects connected sources only. Missing cost and timing measurements are not treated as zero.</p>`,"Model inventory",{title:In(a),subtitle:Dt(a.provider)?.key!==In(a)?.key?Dt(a.provider):null})}else if(e==="source"){let a=A.data.sources.find(l=>l.id===t);if(!a)return;He(a.name,a.kind,`${ra([["Connection",Zr(a.state)],["Location",a.detail],...a.coverage?[["Provides",a.coverage.join(" \xB7 ")]]:[],...a.access?[["Access",a.access]]:[],["Last checked",a.updatedAt?C$(a.updatedAt):"No successful check"],...a.records!=null?[["Records retained",G(a.records)]]:[],...a.summaries!=null?[["Task summaries retained",G(a.summaries)]]:[],...a.activity?[["Included in totals",G(a.activity.included)],["Matching records reconciled",G(a.activity.duplicates)],["Unresolved overlap",G(a.activity.excluded)]]:[]])}<p class="detail-note">${R(a.note)}</p>${a.id==="openmerit"?s4():a.id==="repository"?wA():""}<div class="modal-actions"><button class="button" data-action="connect">Source setup \u2192</button></div>`,"Source coverage",{title:Dt(a.name)})}else if(e==="record"){let a=De().find(l=>l.id===t);if(!a)return;He(a.workload,a.model,`${ra([["Scope",a.scope],...a.agentId?[["Agent ID",a.agentId],["Agent name",a.agent||"Not supplied"]]:[],...a.taskId?[["Task ID",a.taskId],["Task name",a.task||"Not supplied"]]:[],["Served by",a.provider],...lg(a),["Connection",a.route],["Path type",$e[Ea(a,A.data)].label],...Vt()?[["Requests in group",G(Jt(a,A.data))],["Representation","Fictional group; token and cost values are group totals"]]:[],["Status",Zr(a.status)],["Recorded at",new Date(a.occurredAt).toLocaleString()],[Vt()?"Per-request latency (fictional)":"Duration",eo(a.durationMs)],["Input / output tokens",`${Xe(a.inputTokens)} / ${Xe(a.outputTokens)}`],["Cache read tokens",Xe(a.cacheReadTokens)],["Cost",a.cost==null?"Not supplied":a.currency==="USD"?tn(a.cost):`${Xe(a.cost)} \xB7 currency unknown or unsupported`],["Cost basis",a.cost==null||a.costKind==="unknown"?"Not supplied":a.costKind],["Sources",(a.sourceIds??[a.sourceId]).map(gi).join(" \xB7 ")],...a.requestId?[["Request ID",a.requestId]]:[],...a.evidenceFormat?[["Record format",a.evidenceFormat]]:[],...a.conflictingFields?.length?[["Conflicting fields",a.conflictingFields.join(", ")]]:[]])}<p class="detail-note">This is a metadata summary. Source files may contain prompts and responses. Only the displayed metadata is retained; conversation content is discarded.</p>`,"Recorded activity",{subtitle:In(a)})}else{let a=De().filter(i=>i[e==="route"?"route":"workload"]===t&&(e!=="route"||!n||Ea(i,A.data)===n)),l=gs(a);He(t,e==="route"?"Observed connection":"Observed workload",`${ra([["Requests",G(mt(a))],["Path types",eu(a).map(i=>$e[i].label).join(", ")||"Not observed"],["Models",[...new Map(a.map(i=>[`${i.provider}:${i.model}`,i])).values()],"models"],["Providers",[...new Set(a.map(i=>i.provider))],"services"],["Scope",[...new Set(a.map(i=>i.scope))].join(", ")],["Median latency",eo(l.latency)],[Vt()?"Modeled token cost":"Recorded spend",tn(l.cost)]])}<p class="detail-note">Connections are taken from source metadata. They describe reported paths, not a network inspection or an enforced routing policy.</p>`,"Environment map",{title:e==="route"?Dt(t):null})}}function c4(e,t){let n=vi();if(e==="deployment-list")He("Model deployments",`${n.deployments.length} declared or catalog entries`,`${nu(De(),!0)}<p class="detail-note">Catalog entries identify a model at an endpoint; physical placement requires explicit host metadata. Requests join only by an explicit deployment ID with a matching model and provider.</p>`,"Deployment");else if(e==="deployment"){let a=n.deployments.find(r=>r.id===t);if(!a)return He("Deployment unavailable",t,'<p class="detail-note">This deployment is absent from the latest inventory.</p>',"Deployment"),!0;let l=De().filter(r=>wa(r,A.data)?.id===t),i=new Map(l.filter(r=>r.agentId).map(r=>[r.agentId,r.agent||r.agentId])),o=n.pools.filter(r=>a.poolIds.includes(r.id)),s=cg().find(r=>r.id===a.hostId);He(a.model,`${a.name} \xB7 ${a.location}`,`<button class="text-button" data-inspect="deployment-list" data-key="all">\u2190 All deployments</button>${ra([["Deployment ID",a.id],["Served by",a.provider],...lg(a),["Serving mode",{shared:"Shared API",dedicated:"Dedicated deployment","self-hosted":"Self-hosted runtime"}[a.servingMode]||"Not reported"],["Inventory state",Zr(a.state)],["Requests in window",G(mt(l))],["Observed agents",G(i.size)],["Identity source",gi(a.sourceId)],["Host",s?.name||a.hostId||"Not reported"],["Hardware",s?.accelerators?.length?s.accelerators.map(r=>r.name).join(" \xB7 "):"Not reported"]])}${s?`<button class="text-button activity-link" data-host="${R(s.id)}">Inspect ${R(s.name)} \u2192</button>`:""}<div class="detail-section-title"><h3>Shared capacity</h3><span>${o.length} linked pools</span></div>${o.length?o.map(tu).join(""):'<p class="detail-note">No resource pool is declared for this deployment.</p>'}<div class="detail-section-title"><h3>Agents recorded on this deployment</h3></div>${fA(i)}${u4()}<p class="detail-note">A declared or loaded deployment does not guarantee readiness. Pool readings cover all consumers and are separate from request counts.</p>`,"Deployment",{title:In(a)})}else if(e==="pool-list")He("Shared capacity",`${n.pools.length} declared or runtime-discovered pools`,`${n.pools.map(tu).join("")}<p class="detail-note">Readings retain their source timestamps. No reading means capacity is unknown.</p>`,"Shared capacity");else if(e==="pool"){let a=n.pools.find(s=>s.id===t);if(!a)return He("Capacity unavailable",t,'<p class="detail-note">This pool is absent from the latest snapshot.</p>',"Shared capacity"),!0;let l=n.usage.get(t),i=hi(a),o=Ph(a);He(a.name,`${a.kind==="quota"?"Shared quota":a.kind==="runtime"?"Inference runtime":"Shared connection"} \xB7 ${i==="sampled"?"Sampled":i==="stale"?"Reading is stale":"No capacity reading"}`,`<button class="text-button" data-inspect="pool-list" data-key="all">\u2190 All shared pools</button><div class="pool-sample-note ${i}">${a.observedAt?`Sampled ${R(new Date(a.observedAt).toLocaleString())} \xB7 ${bs(a.observedAt)}`:"The source has not supplied a usable reading."}${i==="stale"?"<br>Older than three collection intervals. Current pressure is unknown.":""}</div><div class="pool-readings">${o.map(s=>`<div class="pool-reading"><div><span>${R(s.label)}</span><strong>${Dd(s)}</strong></div>${s.ratio!=null?`<div class="capacity-track ${i}" role="meter" aria-label="${R(s.label)}" aria-valuemin="0" aria-valuemax="100" aria-valuenow="${Math.min(100,Math.round(s.ratio*100))}" aria-valuetext="${R(Dd(s))}"><i style="transform:scaleX(${Math.min(1,s.ratio)})"></i></div>`:""}</div>`).join("")}</div>${ra([["Name source",a.id.startsWith("runtime:")?gi(a.sourceId):".openmerit/terminal.json \xB7 capacityPools"],["Readings source",gi(a.sourceId)],["Quota window",a.windowSeconds!=null?`${a.windowSeconds} seconds`:"Not supplied"],["Reported reset",a.resetAt?new Date(a.resetAt).toLocaleString():"Not supplied"],["Observed requests using pool",G(mt(l.items))],["Linked deployments",G(l.deployments.length)]])}<div class="detail-section-title"><h3>Agents sharing this pool</h3><span>${l.agents.size} observed \xB7 ${Dn(A.hours)}</span></div>${fA(l.agents)}<p class="detail-note">These are whole-pool readings, including consumers outside this project. Agents are linked by reported deployment IDs and declared connection dependencies. The terminal does not attribute pool usage to individual agents or predict remaining capacity.</p>`,"Shared capacity",{title:ug(a)})}else if(e==="entry"){let a=De().filter(o=>JSON.stringify([Ta(o,A.data)[0]])===t),l=a.length?Ta(a[0],A.data)[0]:null,i=new Map;for(let o of a){let s=Ta(o,A.data),r=JSON.stringify(s),d=i.get(r)??{path:s,count:0};d.count+=Jt(o,A.data),i.set(r,d)}He(l?.name??"Connection no longer observed",`${G(mt(a))} requests across all observed agents \xB7 ${Dn(A.hours)}`,`<div class="detail-section-title"><h3>Reported paths</h3><span>${i.size} sequences</span></div><div class="path-list">${[...i].sort((o,s)=>s[1].count-o[1].count).map(([o,{path:s,count:r}])=>`<button class="path-row" data-inspect="path" data-key="${R(o)}">${s.map(d=>`<span class="path-hop" style="--route-color:${$e[d.kind].color}">${Al(d.kind)}${ca(d.name,14)}</span>`).join('<span class="path-arrow" aria-hidden="true">\u2192</span>')}<span class="path-count">${G(r)} requests</span></button>`).join("")}</div><p class="detail-note">Each sequence contains only reported hops. Missing connection metadata does not establish an execution path.</p>`,"Reported path",{title:Dt(l?.name)})}else if(e==="path"){let a;try{a=JSON.parse(t)}catch{return!0}let l=De().filter(i=>JSON.stringify(Ta(i,A.data))===t);He("Reported execution path",`${G(mt(l))} requests \xB7 ${Ns(A.hours)}`,`<ol class="path-steps">${a.map(i=>`<li style="--route-color:${$e[i.kind].color}">${Al(i.kind)}<span><strong>${ca(i.name,16)}</strong><small>${$e[i.kind].label}</small></span></li>`).join("")}</ol><div class="detail-section-title"><h3>Reached deployments</h3></div>${nu(l)}<p class="detail-note">Only source-reported hops are shown. A one-hop record does not establish that no other intermediaries exist. Usage covers all agents reporting this path.</p>`,"Reported path")}else if(e==="unidentified")He("Deployment unidentified","The model is known; its execution instance is not.",'<p class="detail-note">These requests do not provide a matching deployment identity. A model name or connection alone does not identify an execution instance.</p>',"Deployment");else return!1;return!0}function fA(e){return e.size?`<div class="agent-links">${[...e].map(([t,n])=>`<button data-inspect="agent" data-key="${R(t)}">${R(n)}<span>\u2197</span></button>`).join("")}</div>`:'<p class="detail-note">No agent IDs were reported for this selection.</p>'}function Ka(){let e=_e("dialog[open]");e&&e.close()}function d4(){Ka(),He("Connect your environment.","Read existing evidence. Keep inference independent.",`<p class="detail-note" style="margin-top:0">Supported JSONL request logs in <code>logs/</code>, <code>runs/</code>, and <code>results/</code>, project declarations, and project-linked local runtime APIs are discovered automatically. Coding-harness histories are not read. Only connect request logs belonging to this application. If an application does not save a supported log, it can export one metadata record per line to <code>.openmerit/inference.jsonl</code>. Do not include prompts, responses, or secrets.</p><pre class="detail-code">${R(JSON.stringify({id:"request-123",occurredAt:new Date().toISOString(),workload:"your-service-id",scope:"application",model:"your-model",provider:"your-provider",route:"your-gateway",routeKind:"gateway",location:"cloud",status:"completed",inputTokens:120,outputTokens:40,durationMs:850,cost:.002,costKind:"reported",currency:"USD"},null,2))}</pre><p class="detail-note">Use a stable ID to update an ongoing request. Keep retries under separate IDs. Missing fields stay unknown. Shared recorded IDs reconcile copied requests. Unresolved overlaps stay separate from totals. Task summaries remain separate from all request metrics.</p><p class="detail-caption">Other local servers</p><p class="detail-note" style="margin-top:0">For Ollama, declare its URL in the <code>ollama</code> field. For LM Studio or vLLM, add a local runtime to <code>.openmerit/terminal.json</code>. Only model inventory and supported counters are read.</p><pre class="detail-code">${R(JSON.stringify({ollama:"http://127.0.0.1:11434",runtimes:[{name:"LM Studio",type:"openai-compatible",url:"http://127.0.0.1:1234"},{name:"vLLM",type:"vllm",url:"http://127.0.0.1:8000"}]},null,2))}</pre><p class="detail-caption">Optional inventory</p><p class="detail-note" style="margin-top:0">Create <code>.openmerit/terminal.json</code> and restart the terminal:</p><pre class="detail-code">${R(JSON.stringify({inventory:[{name:"Your gateway",kind:"gateway",location:"cloud"},{name:"Your model",kind:"model",provider:"Your provider",location:"cloud"}]},null,2))}</pre>`,"Source setup")}function f4(){He(A.info.hostedSample?"Sample environment":"Choose your view.",A.info.hostedSample?"A fictional workspace. No connection to your machine.":"Keep your environment and the example separate.",`<div class="workspace-options">${A.info.defaultMode!=="sample"?`<button class="workspace-option ${A.mode==="live"?"selected":""}" data-action="live"><strong>Your environment</strong><span>Real inventory and evidence from this project.</span></button>`:""}<button class="workspace-option ${A.mode==="sample"?"selected":""}" data-action="sample"><strong>Sample environment</strong><span>${Vt()?`200 agents, 699 tasks, and ${A.data.models.length} models \xB7 9.6M fictional requests over 30 days.`:"40 agents, 140 tasks, and 21 models in a fictional enterprise workspace."}</span></button></div><p class="detail-note">The sample makes no inference calls and never contributes to your project's totals.</p>`,"Environment")}async function p4(e){A.info.hostedSample&&e!=="sample"||(Ka(),A.mode=e,A.error="",A.search="",A.filter="all",xt="",xd=!1,Jr.clear(),Pr="",hs="all",vs="inventory",await lu(!0),history.replaceState(null,"",`${location.pathname}${fg(e)}#${A.page}`),_e("#announcement").textContent=e==="sample"?"Showing the fictional sample environment.":"Showing your project environment.")}var _d=[];function MA(e=""){_d=[...iu.map(t=>({title:mA[t],type:"Go to",action:()=>no(t)})),...sg().map(t=>({title:t.name,type:"Service",identity:Dt(t.name),action:()=>wl("service",t.id)})),...A.data.models.map(t=>({title:t.name,type:t.provider,identity:In(t),action:()=>wl("model",t.id)})),...cg().map(t=>({title:t.name,type:"Host",action:()=>{Cd=t.id,Ml="",no("compute")}})),...vi().deployments.map(t=>({title:`${t.model} / ${t.name}`,type:"Deployment",identity:In(t),action:()=>wl("deployment",t.id)})),...vi().pools.map(t=>({title:t.name,type:"Shared capacity",identity:ug(t),action:()=>wl("pool",t.id)})),...A.data.sources.map(t=>({title:t.name,type:"Source",identity:Dt(t.name),action:()=>wl("source",t.id)})),...mi("agent").map(t=>({title:t.name,type:"Agent",action:()=>wl("agent",t.id)})),...mi("task").map(t=>({title:t.name,type:"Task",action:()=>wl("task",t.id)}))].filter(t=>`${t.title} ${t.type}`.toLowerCase().includes(e.toLowerCase())).slice(0,12),_e("#command-results").innerHTML=_d.length?_d.map((t,n)=>`<button class="command-result ${n===0?"selected":""}" data-command="${n}">${ao(t.title,t.identity,18)}<small>${R(t.type)}</small></button>`).join(""):'<p class="empty-small" style="padding:16px">No matches in this environment.</p>'}function $A(){Ka(),Rd=document.activeElement,_e("#command").innerHTML=`<div class="command-input-row">${ig("search")}<input id="command-input" type="search" placeholder="Find a service, model, agent, or source\u2026" aria-label="Search your environment" autocomplete="off"><kbd>esc</kbd></div><div id="command-results"></div><div class="command-footer">\u2191 \u2193 to move \xB7 enter to open</div>`,MA(),_e("#command").showModal(),_e("#command-input").focus()}document.addEventListener("click",e=>{let t=e.target.closest("[data-map-version],[data-map-group],[data-map-expand],[data-page],[data-hours],[data-filter],[data-inspect],[data-action],[data-command],[data-focus-agent],[data-inspector-tab],[data-host],[data-activity-path],[data-service-view],[data-service-filter],[data-service-reset],[data-reference-kind],[data-reference-page]");if(t)if((t.hasAttribute("data-map-group")||t.dataset.mapExpand)&&Wi("map_expand"),(["hours","filter","serviceFilter","referenceKind","activityPath"].some(n=>t.dataset[n]!=null)||t.hasAttribute("data-service-reset"))&&Wi("filter"),t.dataset.host&&Wi("inspect","host"),t.dataset.serviceView==="map"&&ua("terminal_page_viewed",{page:"connections"}),(t.dataset.action==="live"||t.dataset.action==="sample")&&ua("terminal_interaction",{action:"mode",kind:"other",mode:A.mode}),(t.dataset.action==="search"||t.dataset.command!=null)&&Wi("command"),t.dataset.mapVersion)og=!1,history.replaceState(null,"",`${location.pathname}${fg(A.mode)}#${A.page}`),ct(),_e("#map-agent")?.focus({preventScroll:!0});else if(t.hasAttribute("data-map-group"))U$(t);else if(t.dataset.mapExpand)xd=t.dataset.mapExpand==="expand",Jr.clear(),ct(),_e("[data-map-expand]")?.focus({preventScroll:!0});else if(t.hasAttribute("data-service-reset"))hs="all",Pr="",ct(),_e("#service-search")?.focus({preventScroll:!0});else if(t.dataset.serviceView)vs=t.dataset.serviceView,A.page!=="services"?no("services"):ct();else if(t.dataset.referenceKind)$d=t.dataset.referenceKind,Vn=0,ct();else if(t.hasAttribute("data-reference-page"))Vn=Number(t.dataset.referencePage),ct();else if(t.dataset.serviceFilter)hs=t.dataset.serviceFilter,ct();else if(t.dataset.host)Cd=t.dataset.host,A.page!=="compute"?(Ml="",Ka(),no("compute")):ct();else if(t.dataset.activityPath)Rn=t.dataset.activityPath,ct();else if(t.dataset.inspectorTab)Qr=t.dataset.inspectorTab,au();else if(t.dataset.focusAgent)xt=t.dataset.focusAgent,Ka(),no("connections");else if(t.dataset.page)no(t.dataset.page,{focusTab:t.getAttribute("role")==="tab"});else if(t.dataset.hours)Jd.includes(Number(t.dataset.hours))&&(A.hours=Number(t.dataset.hours),ct());else if(t.dataset.filter)A.filter=t.dataset.filter,ct();else if(t.dataset.inspect)wl(t.dataset.inspect,t.dataset.key,t.dataset.routeKind);else if(t.dataset.command!=null){let n=_d[Number(t.dataset.command)];Ka(),n?.action()}else{let n=t.dataset.action;n==="close"&&Ka(),n==="workspace"&&f4(),n==="search"&&$A(),n==="connect"&&d4(),(n==="live"||n==="sample")&&p4(n),n==="api"&&A.info.hostedSample&&(Ka(),He("Sample data for your agent.","The same fictional environment, as JSON.",`<pre class="detail-code">GET ${R(location.origin)}${nn?`/api/demo?stage=${Cn}&preference=${mn}`:"/api/sample"}</pre><p class="detail-note">All names, requests, and hardware are fictional. This preview does not connect to your machine or run inference.</p>`,"Agent access")),n==="api"&&!A.info.hostedSample&&(Ka(),He("A view for your agent.","The same evidence, in a readable local snapshot.",`<pre class="detail-code">openmerit dash --json</pre><p class="detail-note">Or, while this terminal is running:</p><pre class="detail-code">GET ${R(location.origin)}/api/snapshot</pre><p class="detail-note">Schema version 1. Includes models, inventory, sources, request metadata, and machine measurements. Read-only. No inference or model changes.</p>`,"Agent access")),n==="about"&&He("Inference Terminal","Your inference environment, in one place.",`<p class="detail-note" style="margin-top:0">${A.info.hostedSample?"This hosted environment is fictional. It does not connect to your machine or providers.":"A local, passive view of your application\u2019s models, services, recorded activity, and linked compute. Your workloads never wait for it."}</p><p class="detail-note">${A.info.hostedSample?"Sample requests and hardware illustrate the interface. Comparison costs use fixed fictional usage and a dated price catalog; public benchmark screens and preference overrides do not establish application quality or latency.":"The terminal indexes supported code and configuration, reads existing application request logs and exports, and checks explicitly authorized local runtime endpoints. Declarations identify inventory; they do not establish past usage. Whole-machine readings are shared context."}</p><p class="detail-note">No prompt or response storage. No inference calls or route changes. The terminal is separate from Pi\u2019s evaluation and model-change workflow.</p>`,"OpenMerit")}});document.addEventListener("change",e=>{e.target.id==="host-location"&&(Ml=e.target.value,ct(),_e("#host-location")?.focus({preventScroll:!0})),e.target.id==="map-agent"&&(xt=e.target.value,ct(),_e("#map-agent")?.focus({preventScroll:!0}))});document.addEventListener("input",e=>{e.target.id==="reference-search"&&(tg=e.target.value,Vn=0,ct(),_e("#reference-search").focus({preventScroll:!0})),e.target.id==="service-search"&&(Pr=e.target.value,ct(),_e("#service-search").focus({preventScroll:!0})),e.target.id==="model-search"&&(A.search=e.target.value,ct(),_e("#model-search").focus({preventScroll:!0})),e.target.id==="command-input"&&MA(e.target.value)});document.addEventListener("pointerdown",()=>document.body.classList.remove("keyboard"));document.addEventListener("change",e=>{["host-location","map-agent"].includes(e.target.id)&&Wi("filter")});var pA=0;document.addEventListener("input",e=>{["reference-search","service-search","model-search","command-input"].includes(e.target.id)&&Date.now()-pA>1e3&&(pA=Date.now(),Wi("search"))});document.addEventListener("keydown",e=>{if(document.body.classList.add("keyboard"),e.target.matches('.terminal-tabs [role="tab"]')&&["ArrowLeft","ArrowRight","Home","End"].includes(e.key)){e.preventDefault();let t=[...document.querySelectorAll('.terminal-tabs [role="tab"]')],n=t.indexOf(e.target),a=e.key==="Home"?0:e.key==="End"?t.length-1:(n+(e.key==="ArrowLeft"?-1:1)+t.length)%t.length;t.forEach((l,i)=>{l.tabIndex=i===a?0:-1}),t[a].focus({preventScroll:!0}),Fr(t[a]);return}if(e.key==="Escape"&&document.querySelector("dialog[open]")){e.preventDefault(),Ka();return}if((e.metaKey||e.ctrlKey)&&e.key.toLowerCase()==="k"){e.preventDefault(),$A();return}if(e.target.matches("[data-bin]")&&["ArrowLeft","ArrowRight","Home","End"].includes(e.key)){e.preventDefault();let t=[...document.querySelectorAll("[data-bin]")],n=Number(e.target.dataset.bin),a=e.key==="Home"?0:e.key==="End"?t.length-1:Math.max(0,Math.min(t.length-1,n+(e.key==="ArrowLeft"?-1:1)));t.forEach((l,i)=>l.setAttribute("tabindex",i===a?"0":"-1")),t[a]?.focus({preventScroll:!0})}if(e.target.matches(".map-node")&&["Enter"," "].includes(e.key)&&(e.preventDefault(),e.target.dispatchEvent(new MouseEvent("click",{bubbles:!0}))),_e("#command").open&&["ArrowDown","ArrowUp","Enter"].includes(e.key)){e.preventDefault();let t=[...document.querySelectorAll(".command-result")],n=t.findIndex(a=>a.classList.contains("selected"));if(e.key==="Enter"){t[n]?.click();return}n=Math.min(t.length-1,Math.max(0,n+(e.key==="ArrowDown"?1:-1))),t.forEach((a,l)=>a.classList.toggle("selected",l===n)),t[n]?.scrollIntoView({block:"nearest"})}});for(let e of document.querySelectorAll("dialog"))e.addEventListener("click",t=>{if(t.target!==e)return;let n=e.getBoundingClientRect();(t.clientX<n.left||t.clientX>n.right||t.clientY<n.top||t.clientY>n.bottom)&&e.close()}),e.addEventListener("close",()=>{Rd?.isConnected&&Rd.focus({preventScroll:!0})});function _A(e){let t=e.dataset.mapNodeId;document.querySelectorAll(".map-edge").forEach(n=>{let a=JSON.parse(n.dataset.nodes??"[]").includes(t);n.classList.toggle("focused",a),n.classList.toggle("faded",!a)})}document.addEventListener("pointerover",e=>{let t=e.target.closest(".map-node");t&&_A(t);let n=e.target.closest("[data-bin]");n&&CA(n)});document.addEventListener("focusin",e=>{e.target.matches(".map-node")&&_A(e.target),e.target.matches("[data-bin]")&&CA(e.target)});function RA(){document.querySelectorAll(".map-edge").forEach(t=>t.classList.remove("focused","faded"));let e=_e(".chart-tooltip");e&&(e.hidden=!0)}document.addEventListener("pointerout",e=>{e.target.closest(".map-node,[data-bin]")&&RA()});document.addEventListener("focusout",e=>{e.target.matches(".map-node,[data-bin]")&&RA()});function CA(e){let t=zd(De(),60)[Number(e.dataset.bin)],n=_e(".chart-tooltip"),a=e.closest(".activity-chart");if(!t||!n||!a)return;n.textContent=`${Nd(t.at,!0)} \xB7 ${Object.entries($e).filter(([o])=>t.paths[o]&&(Rn==="all"||Rn===o)).map(([o,s])=>`${t.paths[o]} ${s.short.toLowerCase()}`).join(" \xB7 ")||"0 requests"}`,n.hidden=!1;let l=e.getBoundingClientRect(),i=a.getBoundingClientRect();n.style.left=`${Math.min(i.width-n.offsetWidth-10,Math.max(10,l.left-i.left-n.offsetWidth/2))}px`,n.style.top="8px"}window.addEventListener("hashchange",()=>{let e=location.hash.slice(1);(iu.includes(e)||e==="connections")&&no(e)});async function lu(e=!1){if(A.fetching){e&&(A.pendingRefresh=!0);return}A.fetching=!0;let t=A.mode;try{let n=A.data?.mode==="live"?A.data.repository:null,a=n?.revision!=null?`/api/snapshot?repositoryRevision=${n.revision}`:"/api/snapshot",l=await fetch(to?"/api/sample-seed":t==="sample"?"/api/sample":a,{signal:AbortSignal.timeout(A.info.hostedSample?3e4:5e3)});if(!l.ok)throw new Error("Snapshot unavailable");let i=await l.json();if(to&&i.version!==1)throw new Error("Unknown sample recipe");to&&Kr==null&&(Kr=i.now);let o=to?nn?yu(Kr,Cn,mn):Fd(i.now):i;if(t!==A.mode)return;o.repository&&!o.repository.references&&n?.revision===o.repository.revision&&(o.repository.references=n.references),A.data=o,A.error="",ua("terminal_snapshot",{model_count:o.models?.length??0,record_count:o.records?.length??0,source_count:o.sources?.length??0,host_count:o.hosts?.length??0,deployment_count:o.deployments?.length??0,agent_count:new Set((o.records??[]).map(s=>s.agentId).filter(Boolean)).size}),au(),(e||!document.querySelector("dialog[open]")&&!Kh()&&!document.activeElement?.matches("input"))&&ct()}catch(n){ua("terminal_error",{code:"snapshot_error",...Vr(n)}),A.error=A.info.hostedSample?"The sample preview could not refresh. Reload the page to reconnect.":"The terminal is disconnected. Your inference is unaffected. Reopen the local command to reconnect.",au(),A.data&&!document.querySelector("dialog[open]")&&!Kh()?ct():A.data||(_e("#app").innerHTML=`<div class="boot"><span class="wordmark">openmerit</span><p>${R(A.error)}</p><p><a href="/">Try again \u2192</a></p></div>`)}finally{A.fetching=!1,A.pendingRefresh?(A.pendingRefresh=!1,lu(!0)):OA()}}function OA(){if(clearTimeout(A.timer),nn)return;let e=A.data?.repository?.progress,t=A.mode==="live"&&(A.data?.loading||e&&!["complete","failed"].includes(e.phase));A.timer=setTimeout(()=>{document.hidden?OA():lu()},t?1e3:Math.max(10,A.info.interval??15)*1e3)}async function m4(){try{let e=await fetch("/api/info");A.info=await e.json(),A.info.defaultMode==="sample"&&(A.mode="sample")}catch{}ua("terminal_visited"),ua("terminal_page_viewed",{page:A.page}),await lu(!0),document.addEventListener("visibilitychange",()=>{!document.hidden&&!nn&&lu()})}m4();document.addEventListener("click",e=>{let t=e.target.closest("[data-demo-stage]")?.dataset.demoStage;if(nn&&A.data&&["before","after"].includes(t)&&t!==Cn){Cn=t;let n=new URL(location.href);n.searchParams.set("stage",t),history.replaceState(null,"",n),A.data=yu(Kr,t,mn),au(),ct(),document.querySelector(`[data-demo-stage="${t}"]`)?.focus({preventScroll:!0})}e.target.closest('[data-action="prices"]')&&Vt()&&l4()});document.addEventListener("change",e=>{if(!nn||!A.data||e.target.id!=="demo-preference")return;mn=xl(e.target.value).value,Cn="after";let t=new URL(location.href);t.searchParams.set("stage",Cn),t.searchParams.set("preference",mn),history.replaceState(null,"",t),A.data=yu(Kr,Cn,mn),au(),ct(),_e("#demo-preference")?.focus({preventScroll:!0})});
|
|
154
|
-
/*! Third-party notices
|
|
155
|
-
|
|
156
|
-
torph
|
|
157
|
-
MIT License
|
|
158
|
-
|
|
159
|
-
Copyright (c) 2025 Lochie Axon
|
|
160
|
-
|
|
161
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
162
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
163
|
-
in the Software without restriction, including without limitation the rights
|
|
164
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
165
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
166
|
-
furnished to do so, subject to the following conditions:
|
|
167
|
-
|
|
168
|
-
The above copyright notice and this permission notice shall be included in all
|
|
169
|
-
copies or substantial portions of the Software.
|
|
170
|
-
|
|
171
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
172
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
173
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
174
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
175
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
176
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
177
|
-
SOFTWARE.
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
liveline
|
|
181
|
-
MIT License
|
|
182
|
-
|
|
183
|
-
Copyright (c) 2025-2026 Benji Taylor
|
|
184
|
-
|
|
185
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
186
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
187
|
-
in the Software without restriction, including without limitation the rights
|
|
188
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
189
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
190
|
-
furnished to do so, subject to the following conditions:
|
|
191
|
-
|
|
192
|
-
The above copyright notice and this permission notice shall be included in all
|
|
193
|
-
copies or substantial portions of the Software.
|
|
194
|
-
|
|
195
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
196
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
197
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
198
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
199
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
200
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
201
|
-
SOFTWARE.
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
morphdom
|
|
205
|
-
The MIT License (MIT)
|
|
206
|
-
|
|
207
|
-
Copyright (c) Patrick Steele-Idem <pnidem@gmail.com> (psteeleidem.com)
|
|
208
|
-
|
|
209
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
210
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
211
|
-
in the Software without restriction, including without limitation the rights
|
|
212
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
213
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
214
|
-
furnished to do so, subject to the following conditions:
|
|
215
|
-
|
|
216
|
-
The above copyright notice and this permission notice shall be included in
|
|
217
|
-
all copies or substantial portions of the Software.
|
|
218
|
-
|
|
219
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
220
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
221
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
222
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
223
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
224
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
225
|
-
THE SOFTWARE.
|
|
226
|
-
|
|
227
|
-
react
|
|
228
|
-
MIT License
|
|
229
|
-
|
|
230
|
-
Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
231
|
-
|
|
232
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
233
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
234
|
-
in the Software without restriction, including without limitation the rights
|
|
235
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
236
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
237
|
-
furnished to do so, subject to the following conditions:
|
|
238
|
-
|
|
239
|
-
The above copyright notice and this permission notice shall be included in all
|
|
240
|
-
copies or substantial portions of the Software.
|
|
241
|
-
|
|
242
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
243
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
244
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
245
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
246
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
247
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
248
|
-
SOFTWARE.
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
react-dom
|
|
252
|
-
MIT License
|
|
253
|
-
|
|
254
|
-
Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
255
|
-
|
|
256
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
257
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
258
|
-
in the Software without restriction, including without limitation the rights
|
|
259
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
260
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
261
|
-
furnished to do so, subject to the following conditions:
|
|
262
|
-
|
|
263
|
-
The above copyright notice and this permission notice shall be included in all
|
|
264
|
-
copies or substantial portions of the Software.
|
|
265
|
-
|
|
266
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
267
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
268
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
269
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
270
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
271
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
272
|
-
SOFTWARE.
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
scheduler
|
|
276
|
-
MIT License
|
|
277
|
-
|
|
278
|
-
Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
279
|
-
|
|
280
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
281
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
282
|
-
in the Software without restriction, including without limitation the rights
|
|
283
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
284
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
285
|
-
furnished to do so, subject to the following conditions:
|
|
286
|
-
|
|
287
|
-
The above copyright notice and this permission notice shall be included in all
|
|
288
|
-
copies or substantial portions of the Software.
|
|
289
|
-
|
|
290
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
291
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
292
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
293
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
294
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
295
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
296
|
-
SOFTWARE.
|
|
297
|
-
|
|
298
|
-
*/
|