@sapiom/harness 0.0.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +44 -43
- package/dist/cli/auth.d.ts +26 -0
- package/dist/cli/auth.d.ts.map +1 -0
- package/dist/cli/auth.js +39 -0
- package/dist/cli/auth.js.map +1 -0
- package/dist/cli/bin.d.ts +3 -0
- package/dist/cli/bin.d.ts.map +1 -0
- package/dist/cli/bin.js +163 -0
- package/dist/cli/bin.js.map +1 -0
- package/dist/cli/consent.d.ts +15 -0
- package/dist/cli/consent.d.ts.map +1 -0
- package/dist/cli/consent.js +81 -0
- package/dist/cli/consent.js.map +1 -0
- package/dist/cli/doctor.d.ts +27 -0
- package/dist/cli/doctor.d.ts.map +1 -0
- package/dist/cli/doctor.js +74 -0
- package/dist/cli/doctor.js.map +1 -0
- package/dist/cli/machine-id.d.ts +19 -0
- package/dist/cli/machine-id.d.ts.map +1 -0
- package/dist/cli/machine-id.js +75 -0
- package/dist/cli/machine-id.js.map +1 -0
- package/dist/cli/paths.d.ts +3 -0
- package/dist/cli/paths.d.ts.map +1 -0
- package/dist/cli/paths.js +11 -0
- package/dist/cli/paths.js.map +1 -0
- package/dist/cli/settings.d.ts +26 -0
- package/dist/cli/settings.d.ts.map +1 -0
- package/dist/cli/settings.js +123 -0
- package/dist/cli/settings.js.map +1 -0
- package/dist/core/adapters/claude-code.d.ts +41 -0
- package/dist/core/adapters/claude-code.d.ts.map +1 -0
- package/dist/core/adapters/claude-code.js +238 -0
- package/dist/core/adapters/claude-code.js.map +1 -0
- package/dist/core/adapters/codex.d.ts +59 -0
- package/dist/core/adapters/codex.d.ts.map +1 -0
- package/dist/core/adapters/codex.js +319 -0
- package/dist/core/adapters/codex.js.map +1 -0
- package/dist/core/canvas-body.d.ts +45 -0
- package/dist/core/canvas-body.d.ts.map +1 -0
- package/dist/core/canvas-body.js +94 -0
- package/dist/core/canvas-body.js.map +1 -0
- package/dist/core/canvas-cache.d.ts +23 -0
- package/dist/core/canvas-cache.d.ts.map +1 -0
- package/dist/core/canvas-cache.js +64 -0
- package/dist/core/canvas-cache.js.map +1 -0
- package/dist/core/canvas-enrich.d.ts +106 -0
- package/dist/core/canvas-enrich.d.ts.map +1 -0
- package/dist/core/canvas-enrich.js +178 -0
- package/dist/core/canvas-enrich.js.map +1 -0
- package/dist/core/canvas-enrichment.d.ts +144 -0
- package/dist/core/canvas-enrichment.d.ts.map +1 -0
- package/dist/core/canvas-enrichment.js +192 -0
- package/dist/core/canvas-enrichment.js.map +1 -0
- package/dist/core/canvas-graph.d.ts +71 -0
- package/dist/core/canvas-graph.d.ts.map +1 -0
- package/dist/core/canvas-graph.js +111 -0
- package/dist/core/canvas-graph.js.map +1 -0
- package/dist/core/canvas-index-classify.d.ts +41 -0
- package/dist/core/canvas-index-classify.d.ts.map +1 -0
- package/dist/core/canvas-index-classify.js +63 -0
- package/dist/core/canvas-index-classify.js.map +1 -0
- package/dist/core/canvas-interconnections.d.ts +24 -0
- package/dist/core/canvas-interconnections.d.ts.map +1 -0
- package/dist/core/canvas-interconnections.js +96 -0
- package/dist/core/canvas-interconnections.js.map +1 -0
- package/dist/core/canvas-manifest-check.d.ts +15 -0
- package/dist/core/canvas-manifest-check.d.ts.map +1 -0
- package/dist/core/canvas-manifest-check.js +90 -0
- package/dist/core/canvas-manifest-check.js.map +1 -0
- package/dist/core/canvas-render.d.ts +73 -0
- package/dist/core/canvas-render.d.ts.map +1 -0
- package/dist/core/canvas-render.js +145 -0
- package/dist/core/canvas-render.js.map +1 -0
- package/dist/core/canvas-svg.d.ts +50 -0
- package/dist/core/canvas-svg.d.ts.map +1 -0
- package/dist/core/canvas-svg.js +240 -0
- package/dist/core/canvas-svg.js.map +1 -0
- package/dist/core/canvas-template.d.ts +43 -0
- package/dist/core/canvas-template.d.ts.map +1 -0
- package/dist/core/canvas-template.js +365 -0
- package/dist/core/canvas-template.js.map +1 -0
- package/dist/core/canvas-watcher.d.ts +25 -0
- package/dist/core/canvas-watcher.d.ts.map +1 -0
- package/dist/core/canvas-watcher.js +144 -0
- package/dist/core/canvas-watcher.js.map +1 -0
- package/dist/core/collector/batcher.d.ts +57 -0
- package/dist/core/collector/batcher.d.ts.map +1 -0
- package/dist/core/collector/batcher.js +143 -0
- package/dist/core/collector/batcher.js.map +1 -0
- package/dist/core/collector/codex-tailer.d.ts +85 -0
- package/dist/core/collector/codex-tailer.d.ts.map +1 -0
- package/dist/core/collector/codex-tailer.js +270 -0
- package/dist/core/collector/codex-tailer.js.map +1 -0
- package/dist/core/collector/normalizer.d.ts +33 -0
- package/dist/core/collector/normalizer.d.ts.map +1 -0
- package/dist/core/collector/normalizer.js +94 -0
- package/dist/core/collector/normalizer.js.map +1 -0
- package/dist/core/collector/seq.d.ts +14 -0
- package/dist/core/collector/seq.d.ts.map +1 -0
- package/dist/core/collector/seq.js +20 -0
- package/dist/core/collector/seq.js.map +1 -0
- package/dist/core/collector/store.d.ts +16 -0
- package/dist/core/collector/store.d.ts.map +1 -0
- package/dist/core/collector/store.js +30 -0
- package/dist/core/collector/store.js.map +1 -0
- package/dist/core/collector/transcript.d.ts +38 -0
- package/dist/core/collector/transcript.d.ts.map +1 -0
- package/dist/core/collector/transcript.js +110 -0
- package/dist/core/collector/transcript.js.map +1 -0
- package/dist/core/event-bus.d.ts +9 -0
- package/dist/core/event-bus.d.ts.map +1 -0
- package/dist/core/event-bus.js +25 -0
- package/dist/core/event-bus.js.map +1 -0
- package/dist/core/example-seed.d.ts +34 -0
- package/dist/core/example-seed.d.ts.map +1 -0
- package/dist/core/example-seed.js +277 -0
- package/dist/core/example-seed.js.map +1 -0
- package/dist/core/inject/claude-settings.d.ts +34 -0
- package/dist/core/inject/claude-settings.d.ts.map +1 -0
- package/dist/core/inject/claude-settings.js +152 -0
- package/dist/core/inject/claude-settings.js.map +1 -0
- package/dist/core/inject/mcp-config.d.ts +26 -0
- package/dist/core/inject/mcp-config.d.ts.map +1 -0
- package/dist/core/inject/mcp-config.js +39 -0
- package/dist/core/inject/mcp-config.js.map +1 -0
- package/dist/core/inject/retention.d.ts +66 -0
- package/dist/core/inject/retention.d.ts.map +1 -0
- package/dist/core/inject/retention.js +119 -0
- package/dist/core/inject/retention.js.map +1 -0
- package/dist/core/inject/system-prompt.d.ts +11 -0
- package/dist/core/inject/system-prompt.d.ts.map +1 -0
- package/dist/core/inject/system-prompt.js +22 -0
- package/dist/core/inject/system-prompt.js.map +1 -0
- package/dist/core/macro-runner.d.ts +36 -0
- package/dist/core/macro-runner.d.ts.map +1 -0
- package/dist/core/macro-runner.js +66 -0
- package/dist/core/macro-runner.js.map +1 -0
- package/dist/core/macros.d.ts +10 -0
- package/dist/core/macros.d.ts.map +1 -0
- package/dist/core/macros.js +59 -0
- package/dist/core/macros.js.map +1 -0
- package/dist/core/path-safety.d.ts +33 -0
- package/dist/core/path-safety.d.ts.map +1 -0
- package/dist/core/path-safety.js +63 -0
- package/dist/core/path-safety.js.map +1 -0
- package/dist/core/paths.d.ts +27 -0
- package/dist/core/paths.d.ts.map +1 -0
- package/dist/core/paths.js +43 -0
- package/dist/core/paths.js.map +1 -0
- package/dist/core/port-detector.d.ts +69 -0
- package/dist/core/port-detector.d.ts.map +1 -0
- package/dist/core/port-detector.js +121 -0
- package/dist/core/port-detector.js.map +1 -0
- package/dist/core/session-manager.d.ts +275 -0
- package/dist/core/session-manager.d.ts.map +1 -0
- package/dist/core/session-manager.js +729 -0
- package/dist/core/session-manager.js.map +1 -0
- package/dist/core/task-manager.d.ts +138 -0
- package/dist/core/task-manager.d.ts.map +1 -0
- package/dist/core/task-manager.js +286 -0
- package/dist/core/task-manager.js.map +1 -0
- package/dist/core/task-stream.d.ts +32 -0
- package/dist/core/task-stream.d.ts.map +1 -0
- package/dist/core/task-stream.js +87 -0
- package/dist/core/task-stream.js.map +1 -0
- package/dist/core/workflow-registry.d.ts +36 -0
- package/dist/core/workflow-registry.d.ts.map +1 -0
- package/dist/core/workflow-registry.js +220 -0
- package/dist/core/workflow-registry.js.map +1 -0
- package/dist/core/workspace-context.d.ts +43 -0
- package/dist/core/workspace-context.d.ts.map +1 -0
- package/dist/core/workspace-context.js +108 -0
- package/dist/core/workspace-context.js.map +1 -0
- package/dist/core/workspace-watcher.d.ts +26 -0
- package/dist/core/workspace-watcher.d.ts.map +1 -0
- package/dist/core/workspace-watcher.js +174 -0
- package/dist/core/workspace-watcher.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/profiles/canvas-guidelines.d.ts +20 -0
- package/dist/profiles/canvas-guidelines.d.ts.map +1 -0
- package/dist/profiles/canvas-guidelines.js +48 -0
- package/dist/profiles/canvas-guidelines.js.map +1 -0
- package/dist/profiles/default.d.ts +10 -0
- package/dist/profiles/default.d.ts.map +1 -0
- package/dist/profiles/default.js +70 -0
- package/dist/profiles/default.js.map +1 -0
- package/dist/server/auth.d.ts +9 -0
- package/dist/server/auth.d.ts.map +1 -0
- package/dist/server/auth.js +28 -0
- package/dist/server/auth.js.map +1 -0
- package/dist/server/canvas-render.d.ts +18 -0
- package/dist/server/canvas-render.d.ts.map +1 -0
- package/dist/server/canvas-render.js +24 -0
- package/dist/server/canvas-render.js.map +1 -0
- package/dist/server/canvas.d.ts +12 -0
- package/dist/server/canvas.d.ts.map +1 -0
- package/dist/server/canvas.js +174 -0
- package/dist/server/canvas.js.map +1 -0
- package/dist/server/events-ws.d.ts +11 -0
- package/dist/server/events-ws.d.ts.map +1 -0
- package/dist/server/events-ws.js +24 -0
- package/dist/server/events-ws.js.map +1 -0
- package/dist/server/fs.d.ts +4 -0
- package/dist/server/fs.d.ts.map +1 -0
- package/dist/server/fs.js +88 -0
- package/dist/server/fs.js.map +1 -0
- package/dist/server/index.d.ts +83 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +0 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/ingest.d.ts +74 -0
- package/dist/server/ingest.d.ts.map +1 -0
- package/dist/server/ingest.js +74 -0
- package/dist/server/ingest.js.map +1 -0
- package/dist/server/macros.d.ts +32 -0
- package/dist/server/macros.d.ts.map +1 -0
- package/dist/server/macros.js +76 -0
- package/dist/server/macros.js.map +1 -0
- package/dist/server/rest.d.ts +75 -0
- package/dist/server/rest.d.ts.map +1 -0
- package/dist/server/rest.js +235 -0
- package/dist/server/rest.js.map +1 -0
- package/dist/server/static.d.ts +8 -0
- package/dist/server/static.d.ts.map +1 -0
- package/dist/server/static.js +36 -0
- package/dist/server/static.js.map +1 -0
- package/dist/server/terminal-ws.d.ts +9 -0
- package/dist/server/terminal-ws.d.ts.map +1 -0
- package/dist/server/terminal-ws.js +59 -0
- package/dist/server/terminal-ws.js.map +1 -0
- package/dist/server/ws-router.d.ts +16 -0
- package/dist/server/ws-router.d.ts.map +1 -0
- package/dist/server/ws-router.js +26 -0
- package/dist/server/ws-router.js.map +1 -0
- package/dist/shared/types.d.ts +485 -0
- package/dist/shared/types.d.ts.map +1 -0
- package/dist/shared/types.js +80 -0
- package/dist/shared/types.js.map +1 -0
- package/dist/web/assets/index-B9R4TzH7.css +32 -0
- package/dist/web/assets/index-Dh97QAgq.js +192 -0
- package/dist/web/index.html +27 -0
- package/package.json +84 -7
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
var kv=Object.defineProperty;var Ov=(L,X,J)=>X in L?kv(L,X,{enumerable:!0,configurable:!0,writable:!0,value:J}):L[X]=J;var wo=(L,X,J)=>Ov(L,typeof X!="symbol"?X+"":X,J);(function(){const X=document.createElement("link").relList;if(X&&X.supports&&X.supports("modulepreload"))return;for(const re of document.querySelectorAll('link[rel="modulepreload"]'))H(re);new MutationObserver(re=>{for(const ue of re)if(ue.type==="childList")for(const Y of ue.addedNodes)Y.tagName==="LINK"&&Y.rel==="modulepreload"&&H(Y)}).observe(document,{childList:!0,subtree:!0});function J(re){const ue={};return re.integrity&&(ue.integrity=re.integrity),re.referrerPolicy&&(ue.referrerPolicy=re.referrerPolicy),re.crossOrigin==="use-credentials"?ue.credentials="include":re.crossOrigin==="anonymous"?ue.credentials="omit":ue.credentials="same-origin",ue}function H(re){if(re.ep)return;re.ep=!0;const ue=J(re);fetch(re.href,ue)}})();var Eo={exports:{}},Kr={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Kf;function Bv(){if(Kf)return Kr;Kf=1;var L=Symbol.for("react.transitional.element"),X=Symbol.for("react.fragment");function J(H,re,ue){var Y=null;if(ue!==void 0&&(Y=""+ue),re.key!==void 0&&(Y=""+re.key),"key"in re){ue={};for(var u in re)u!=="key"&&(ue[u]=re[u])}else ue=re;return re=ue.ref,{$$typeof:L,type:H,key:Y,ref:re!==void 0?re:null,props:ue}}return Kr.Fragment=X,Kr.jsx=J,Kr.jsxs=J,Kr}var Gf;function Hv(){return Gf||(Gf=1,Eo.exports=Bv()),Eo.exports}var q=Hv(),Ao={exports:{}},ye={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Yf;function Nv(){if(Yf)return ye;Yf=1;var L=Symbol.for("react.transitional.element"),X=Symbol.for("react.portal"),J=Symbol.for("react.fragment"),H=Symbol.for("react.strict_mode"),re=Symbol.for("react.profiler"),ue=Symbol.for("react.consumer"),Y=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),g=Symbol.iterator;function y(D){return D===null||typeof D!="object"?null:(D=g&&D[g]||D["@@iterator"],typeof D=="function"?D:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,o={};function c(D,T,N){this.props=D,this.context=T,this.refs=o,this.updater=N||E}c.prototype.isReactComponent={},c.prototype.setState=function(D,T){if(typeof D!="object"&&typeof D!="function"&&D!=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,D,T,"setState")},c.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function n(){}n.prototype=c.prototype;function l(D,T,N){this.props=D,this.context=T,this.refs=o,this.updater=N||E}var _=l.prototype=new n;_.constructor=l,v(_,c.prototype),_.isPureReactComponent=!0;var b=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},m=Object.prototype.hasOwnProperty;function A(D,T,N){var G=N.ref;return{$$typeof:L,type:D,key:T,ref:G!==void 0?G:null,props:N}}function B(D,T){return A(D.type,T,D.props)}function U(D){return typeof D=="object"&&D!==null&&D.$$typeof===L}function z(D){var T={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(N){return T[N]})}var O=/\/+/g;function P(D,T){return typeof D=="object"&&D!==null&&D.key!=null?z(""+D.key):T.toString(36)}function te(D){switch(D.status){case"fulfilled":return D.value;case"rejected":throw D.reason;default:switch(typeof D.status=="string"?D.then(C,C):(D.status="pending",D.then(function(T){D.status==="pending"&&(D.status="fulfilled",D.value=T)},function(T){D.status==="pending"&&(D.status="rejected",D.reason=T)})),D.status){case"fulfilled":return D.value;case"rejected":throw D.reason}}throw D}function I(D,T,N,G,ee){var he=typeof D;(he==="undefined"||he==="boolean")&&(D=null);var K=!1;if(D===null)K=!0;else switch(he){case"bigint":case"string":case"number":K=!0;break;case"object":switch(D.$$typeof){case L:case X:K=!0;break;case p:return K=D._init,I(K(D._payload),T,N,G,ee)}}if(K)return ee=ee(D),K=G===""?"."+P(D,0):G,b(ee)?(N="",K!=null&&(N=K.replace(O,"$&/")+"/"),I(ee,T,N,"",function(ne){return ne})):ee!=null&&(U(ee)&&(ee=B(ee,N+(ee.key==null||D&&D.key===ee.key?"":(""+ee.key).replace(O,"$&/")+"/")+K)),T.push(ee)),1;K=0;var M=G===""?".":G+":";if(b(D))for(var oe=0;oe<D.length;oe++)G=D[oe],he=M+P(G,oe),K+=I(G,T,N,he,ee);else if(oe=y(D),typeof oe=="function")for(D=oe.call(D),oe=0;!(G=D.next()).done;)G=G.value,he=M+P(G,oe++),K+=I(G,T,N,he,ee);else if(he==="object"){if(typeof D.then=="function")return I(te(D),T,N,G,ee);throw T=String(D),Error("Objects are not valid as a React child (found: "+(T==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":T)+"). If you meant to render a collection of children, use an array instead.")}return K}function F(D,T,N){if(D==null)return D;var G=[],ee=0;return I(D,G,"","",function(he){return T.call(N,he,ee++)}),G}function ie(D){if(D._status===-1){var T=D._result;T=T(),T.then(function(N){(D._status===0||D._status===-1)&&(D._status=1,D._result=N)},function(N){(D._status===0||D._status===-1)&&(D._status=2,D._result=N)}),D._status===-1&&(D._status=0,D._result=T)}if(D._status===1)return D._result.default;throw D._result}var x=typeof reportError=="function"?reportError:function(D){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var T=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof D=="object"&&D!==null&&typeof D.message=="string"?String(D.message):String(D),error:D});if(!window.dispatchEvent(T))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",D);return}console.error(D)},k={map:F,forEach:function(D,T,N){F(D,function(){T.apply(this,arguments)},N)},count:function(D){var T=0;return F(D,function(){T++}),T},toArray:function(D){return F(D,function(T){return T})||[]},only:function(D){if(!U(D))throw Error("React.Children.only expected to receive a single React element child.");return D}};return ye.Activity=h,ye.Children=k,ye.Component=c,ye.Fragment=J,ye.Profiler=re,ye.PureComponent=l,ye.StrictMode=H,ye.Suspense=f,ye.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,ye.__COMPILER_RUNTIME={__proto__:null,c:function(D){return w.H.useMemoCache(D)}},ye.cache=function(D){return function(){return D.apply(null,arguments)}},ye.cacheSignal=function(){return null},ye.cloneElement=function(D,T,N){if(D==null)throw Error("The argument must be a React element, but you passed "+D+".");var G=v({},D.props),ee=D.key;if(T!=null)for(he in T.key!==void 0&&(ee=""+T.key),T)!m.call(T,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&T.ref===void 0||(G[he]=T[he]);var he=arguments.length-2;if(he===1)G.children=N;else if(1<he){for(var K=Array(he),M=0;M<he;M++)K[M]=arguments[M+2];G.children=K}return A(D.type,ee,G)},ye.createContext=function(D){return D={$$typeof:Y,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null},D.Provider=D,D.Consumer={$$typeof:ue,_context:D},D},ye.createElement=function(D,T,N){var G,ee={},he=null;if(T!=null)for(G in T.key!==void 0&&(he=""+T.key),T)m.call(T,G)&&G!=="key"&&G!=="__self"&&G!=="__source"&&(ee[G]=T[G]);var K=arguments.length-2;if(K===1)ee.children=N;else if(1<K){for(var M=Array(K),oe=0;oe<K;oe++)M[oe]=arguments[oe+2];ee.children=M}if(D&&D.defaultProps)for(G in K=D.defaultProps,K)ee[G]===void 0&&(ee[G]=K[G]);return A(D,he,ee)},ye.createRef=function(){return{current:null}},ye.forwardRef=function(D){return{$$typeof:u,render:D}},ye.isValidElement=U,ye.lazy=function(D){return{$$typeof:p,_payload:{_status:-1,_result:D},_init:ie}},ye.memo=function(D,T){return{$$typeof:d,type:D,compare:T===void 0?null:T}},ye.startTransition=function(D){var T=w.T,N={};w.T=N;try{var G=D(),ee=w.S;ee!==null&&ee(N,G),typeof G=="object"&&G!==null&&typeof G.then=="function"&&G.then(C,x)}catch(he){x(he)}finally{T!==null&&N.types!==null&&(T.types=N.types),w.T=T}},ye.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},ye.use=function(D){return w.H.use(D)},ye.useActionState=function(D,T,N){return w.H.useActionState(D,T,N)},ye.useCallback=function(D,T){return w.H.useCallback(D,T)},ye.useContext=function(D){return w.H.useContext(D)},ye.useDebugValue=function(){},ye.useDeferredValue=function(D,T){return w.H.useDeferredValue(D,T)},ye.useEffect=function(D,T){return w.H.useEffect(D,T)},ye.useEffectEvent=function(D){return w.H.useEffectEvent(D)},ye.useId=function(){return w.H.useId()},ye.useImperativeHandle=function(D,T,N){return w.H.useImperativeHandle(D,T,N)},ye.useInsertionEffect=function(D,T){return w.H.useInsertionEffect(D,T)},ye.useLayoutEffect=function(D,T){return w.H.useLayoutEffect(D,T)},ye.useMemo=function(D,T){return w.H.useMemo(D,T)},ye.useOptimistic=function(D,T){return w.H.useOptimistic(D,T)},ye.useReducer=function(D,T,N){return w.H.useReducer(D,T,N)},ye.useRef=function(D){return w.H.useRef(D)},ye.useState=function(D){return w.H.useState(D)},ye.useSyncExternalStore=function(D,T,N){return w.H.useSyncExternalStore(D,T,N)},ye.useTransition=function(){return w.H.useTransition()},ye.version="19.2.7",ye}var Pf;function qo(){return Pf||(Pf=1,Ao.exports=Nv()),Ao.exports}var fe=qo(),Do={exports:{}},Gr={},xo={exports:{}},To={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var Ff;function zv(){return Ff||(Ff=1,(function(L){function X(I,F){var ie=I.length;I.push(F);e:for(;0<ie;){var x=ie-1>>>1,k=I[x];if(0<re(k,F))I[x]=F,I[ie]=k,ie=x;else break e}}function J(I){return I.length===0?null:I[0]}function H(I){if(I.length===0)return null;var F=I[0],ie=I.pop();if(ie!==F){I[0]=ie;e:for(var x=0,k=I.length,D=k>>>1;x<D;){var T=2*(x+1)-1,N=I[T],G=T+1,ee=I[G];if(0>re(N,ie))G<k&&0>re(ee,N)?(I[x]=ee,I[G]=ie,x=G):(I[x]=N,I[T]=ie,x=T);else if(G<k&&0>re(ee,ie))I[x]=ee,I[G]=ie,x=G;else break e}}return F}function re(I,F){var ie=I.sortIndex-F.sortIndex;return ie!==0?ie:I.id-F.id}if(L.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var ue=performance;L.unstable_now=function(){return ue.now()}}else{var Y=Date,u=Y.now();L.unstable_now=function(){return Y.now()-u}}var f=[],d=[],p=1,h=null,g=3,y=!1,E=!1,v=!1,o=!1,c=typeof setTimeout=="function"?setTimeout:null,n=typeof clearTimeout=="function"?clearTimeout:null,l=typeof setImmediate<"u"?setImmediate:null;function _(I){for(var F=J(d);F!==null;){if(F.callback===null)H(d);else if(F.startTime<=I)H(d),F.sortIndex=F.expirationTime,X(f,F);else break;F=J(d)}}function b(I){if(v=!1,_(I),!E)if(J(f)!==null)E=!0,C||(C=!0,z());else{var F=J(d);F!==null&&te(b,F.startTime-I)}}var C=!1,w=-1,m=5,A=-1;function B(){return o?!0:!(L.unstable_now()-A<m)}function U(){if(o=!1,C){var I=L.unstable_now();A=I;var F=!0;try{e:{E=!1,v&&(v=!1,n(w),w=-1),y=!0;var ie=g;try{t:{for(_(I),h=J(f);h!==null&&!(h.expirationTime>I&&B());){var x=h.callback;if(typeof x=="function"){h.callback=null,g=h.priorityLevel;var k=x(h.expirationTime<=I);if(I=L.unstable_now(),typeof k=="function"){h.callback=k,_(I),F=!0;break t}h===J(f)&&H(f),_(I)}else H(f);h=J(f)}if(h!==null)F=!0;else{var D=J(d);D!==null&&te(b,D.startTime-I),F=!1}}break e}finally{h=null,g=ie,y=!1}F=void 0}}finally{F?z():C=!1}}}var z;if(typeof l=="function")z=function(){l(U)};else if(typeof MessageChannel<"u"){var O=new MessageChannel,P=O.port2;O.port1.onmessage=U,z=function(){P.postMessage(null)}}else z=function(){c(U,0)};function te(I,F){w=c(function(){I(L.unstable_now())},F)}L.unstable_IdlePriority=5,L.unstable_ImmediatePriority=1,L.unstable_LowPriority=4,L.unstable_NormalPriority=3,L.unstable_Profiling=null,L.unstable_UserBlockingPriority=2,L.unstable_cancelCallback=function(I){I.callback=null},L.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):m=0<I?Math.floor(1e3/I):5},L.unstable_getCurrentPriorityLevel=function(){return g},L.unstable_next=function(I){switch(g){case 1:case 2:case 3:var F=3;break;default:F=g}var ie=g;g=F;try{return I()}finally{g=ie}},L.unstable_requestPaint=function(){o=!0},L.unstable_runWithPriority=function(I,F){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var ie=g;g=I;try{return F()}finally{g=ie}},L.unstable_scheduleCallback=function(I,F,ie){var x=L.unstable_now();switch(typeof ie=="object"&&ie!==null?(ie=ie.delay,ie=typeof ie=="number"&&0<ie?x+ie:x):ie=x,I){case 1:var k=-1;break;case 2:k=250;break;case 5:k=1073741823;break;case 4:k=1e4;break;default:k=5e3}return k=ie+k,I={id:p++,callback:F,priorityLevel:I,startTime:ie,expirationTime:k,sortIndex:-1},ie>x?(I.sortIndex=ie,X(d,I),J(f)===null&&I===J(d)&&(v?(n(w),w=-1):v=!0,te(b,ie-x))):(I.sortIndex=k,X(f,I),E||y||(E=!0,C||(C=!0,z()))),I},L.unstable_shouldYield=B,L.unstable_wrapCallback=function(I){var F=g;return function(){var ie=g;g=F;try{return I.apply(this,arguments)}finally{g=ie}}}})(To)),To}var Xf;function Uv(){return Xf||(Xf=1,xo.exports=zv()),xo.exports}var Ro={exports:{}},ct={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var Vf;function jv(){if(Vf)return ct;Vf=1;var L=qo();function X(f){var d="https://react.dev/errors/"+f;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)d+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+f+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function J(){}var H={d:{f:J,r:function(){throw Error(X(522))},D:J,C:J,L:J,m:J,X:J,S:J,M:J},p:0,findDOMNode:null},re=Symbol.for("react.portal");function ue(f,d,p){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:re,key:h==null?null:""+h,children:f,containerInfo:d,implementation:p}}var Y=L.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(f,d){if(f==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return ct.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=H,ct.createPortal=function(f,d){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(X(299));return ue(f,d,null,p)},ct.flushSync=function(f){var d=Y.T,p=H.p;try{if(Y.T=null,H.p=2,f)return f()}finally{Y.T=d,H.p=p,H.d.f()}},ct.preconnect=function(f,d){typeof f=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,H.d.C(f,d))},ct.prefetchDNS=function(f){typeof f=="string"&&H.d.D(f)},ct.preinit=function(f,d){if(typeof f=="string"&&d&&typeof d.as=="string"){var p=d.as,h=u(p,d.crossOrigin),g=typeof d.integrity=="string"?d.integrity:void 0,y=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;p==="style"?H.d.S(f,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:h,integrity:g,fetchPriority:y}):p==="script"&&H.d.X(f,{crossOrigin:h,integrity:g,fetchPriority:y,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},ct.preinitModule=function(f,d){if(typeof f=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var p=u(d.as,d.crossOrigin);H.d.M(f,{crossOrigin:p,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&H.d.M(f)},ct.preload=function(f,d){if(typeof f=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var p=d.as,h=u(p,d.crossOrigin);H.d.L(f,p,{crossOrigin:h,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},ct.preloadModule=function(f,d){if(typeof f=="string")if(d){var p=u(d.as,d.crossOrigin);H.d.m(f,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:p,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else H.d.m(f)},ct.requestFormReset=function(f){H.d.r(f)},ct.unstable_batchedUpdates=function(f,d){return f(d)},ct.useFormState=function(f,d,p){return Y.H.useFormState(f,d,p)},ct.useFormStatus=function(){return Y.H.useHostTransitionStatus()},ct.version="19.2.7",ct}var Zf;function qv(){if(Zf)return Ro.exports;Zf=1;function L(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(L)}catch(X){console.error(X)}}return L(),Ro.exports=jv(),Ro.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var Qf;function Iv(){if(Qf)return Gr;Qf=1;var L=Uv(),X=qo(),J=qv();function H(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i])}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 re(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ue(e){var t=e,i=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(i=t.return),e=t.return;while(e)}return t.tag===3?i:null}function Y(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 u(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 f(e){if(ue(e)!==e)throw Error(H(188))}function d(e){var t=e.alternate;if(!t){if(t=ue(e),t===null)throw Error(H(188));return t!==e?null:e}for(var i=e,s=t;;){var r=i.return;if(r===null)break;var a=r.alternate;if(a===null){if(s=r.return,s!==null){i=s;continue}break}if(r.child===a.child){for(a=r.child;a;){if(a===i)return f(r),e;if(a===s)return f(r),t;a=a.sibling}throw Error(H(188))}if(i.return!==s.return)i=r,s=a;else{for(var S=!1,R=r.child;R;){if(R===i){S=!0,i=r,s=a;break}if(R===s){S=!0,s=r,i=a;break}R=R.sibling}if(!S){for(R=a.child;R;){if(R===i){S=!0,i=a,s=r;break}if(R===s){S=!0,s=a,i=r;break}R=R.sibling}if(!S)throw Error(H(189))}}if(i.alternate!==s)throw Error(H(190))}if(i.tag!==3)throw Error(H(188));return i.stateNode.current===i?e:t}function p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),n=Symbol.for("react.consumer"),l=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),A=Symbol.for("react.activity"),B=Symbol.for("react.memo_cache_sentinel"),U=Symbol.iterator;function z(e){return e===null||typeof e!="object"?null:(e=U&&e[U]||e["@@iterator"],typeof e=="function"?e:null)}var O=Symbol.for("react.client.reference");function P(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===O?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case v:return"Fragment";case c:return"Profiler";case o:return"StrictMode";case b:return"Suspense";case C:return"SuspenseList";case A:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case E:return"Portal";case l:return e.displayName||"Context";case n:return(e._context.displayName||"Context")+".Consumer";case _:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case w:return t=e.displayName||null,t!==null?t:P(e.type)||"Memo";case m:t=e._payload,e=e._init;try{return P(e(t))}catch{}}return null}var te=Array.isArray,I=X.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=J.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie={pending:!1,data:null,method:null,action:null},x=[],k=-1;function D(e){return{current:e}}function T(e){0>k||(e.current=x[k],x[k]=null,k--)}function N(e,t){k++,x[k]=e.current,e.current=t}var G=D(null),ee=D(null),he=D(null),K=D(null);function M(e,t){switch(N(he,t),N(ee,e),N(G,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?ff(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=ff(t),e=df(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}T(G),N(G,e)}function oe(){T(G),T(ee),T(he)}function ne(e){e.memoizedState!==null&&N(K,e);var t=G.current,i=df(t,e.type);t!==i&&(N(ee,e),N(G,i))}function _e(e){ee.current===e&&(T(G),T(ee)),K.current===e&&(T(K),jr._currentValue=ie)}var de,we;function ke(e){if(de===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);de=t&&t[1]||"",we=-1<i.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+de+e+we}var je=!1;function tt(e,t){if(!e||je)return"";je=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var ce=function(){throw Error()};if(Object.defineProperty(ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ce,[])}catch(se){var $=se}Reflect.construct(e,[],ce)}else{try{ce.call()}catch(se){$=se}e.call(ce.prototype)}}else{try{throw Error()}catch(se){$=se}(ce=e())&&typeof ce.catch=="function"&&ce.catch(function(){})}}catch(se){if(se&&$&&typeof se.stack=="string")return[se.stack,$.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var a=s.DetermineComponentFrameRoot(),S=a[0],R=a[1];if(S&&R){var j=S.split(`
|
|
44
|
+
`),Q=R.split(`
|
|
45
|
+
`);for(r=s=0;s<j.length&&!j[s].includes("DetermineComponentFrameRoot");)s++;for(;r<Q.length&&!Q[r].includes("DetermineComponentFrameRoot");)r++;if(s===j.length||r===Q.length)for(s=j.length-1,r=Q.length-1;1<=s&&0<=r&&j[s]!==Q[r];)r--;for(;1<=s&&0<=r;s--,r--)if(j[s]!==Q[r]){if(s!==1||r!==1)do if(s--,r--,0>r||j[s]!==Q[r]){var ae=`
|
|
46
|
+
`+j[s].replace(" at new "," at ");return e.displayName&&ae.includes("<anonymous>")&&(ae=ae.replace("<anonymous>",e.displayName)),ae}while(1<=s&&0<=r);break}}}finally{je=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?ke(i):""}function Se(e,t){switch(e.tag){case 26:case 27:case 5:return ke(e.type);case 16:return ke("Lazy");case 13:return e.child!==t&&t!==null?ke("Suspense Fallback"):ke("Suspense");case 19:return ke("SuspenseList");case 0:case 15:return tt(e.type,!1);case 11:return tt(e.type.render,!1);case 1:return tt(e.type,!0);case 31:return ke("Activity");default:return""}}function _i(e){try{var t="",i=null;do t+=Se(e,i),i=e,e=e.return;while(e);return t}catch(s){return`
|
|
47
|
+
Error generating stack: `+s.message+`
|
|
48
|
+
`+s.stack}}var Ii=Object.prototype.hasOwnProperty,Wi=L.unstable_scheduleCallback,Ki=L.unstable_cancelCallback,hs=L.unstable_shouldYield,ft=L.unstable_requestPaint,Je=L.unstable_now,Lt=L.unstable_getCurrentPriorityLevel,vi=L.unstable_ImmediatePriority,fs=L.unstable_UserBlockingPriority,bt=L.unstable_NormalPriority,ds=L.unstable_LowPriority,Wt=L.unstable_IdlePriority,Gi=L.log,qe=L.unstable_setDisableYieldValue,Yi=null,Ct=null;function mi(e){if(typeof Gi=="function"&&qe(e),Ct&&typeof Ct.setStrictMode=="function")try{Ct.setStrictMode(Yi,e)}catch{}}var wt=Math.clz32?Math.clz32:pd,md=Math.log,gd=Math.LN2;function pd(e){return e>>>=0,e===0?32:31-(md(e)/gd|0)|0}var Yr=256,Pr=262144,Fr=4194304;function Pi(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&261888;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 Xr(e,t,i){var s=e.pendingLanes;if(s===0)return 0;var r=0,a=e.suspendedLanes,S=e.pingedLanes;e=e.warmLanes;var R=s&134217727;return R!==0?(s=R&~a,s!==0?r=Pi(s):(S&=R,S!==0?r=Pi(S):i||(i=R&~e,i!==0&&(r=Pi(i))))):(R=s&~a,R!==0?r=Pi(R):S!==0?r=Pi(S):i||(i=s&~e,i!==0&&(r=Pi(i)))),r===0?0:t!==0&&t!==r&&(t&a)===0&&(a=r&-r,i=t&-t,a>=i||a===32&&(i&4194048)!==0)?t:r}function $s(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Sd(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 Po(){var e=Fr;return Fr<<=1,(Fr&62914560)===0&&(Fr=4194304),e}function ua(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function Js(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function yd(e,t,i,s,r,a){var S=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var R=e.entanglements,j=e.expirationTimes,Q=e.hiddenUpdates;for(i=S&~i;0<i;){var ae=31-wt(i),ce=1<<ae;R[ae]=0,j[ae]=-1;var $=Q[ae];if($!==null)for(Q[ae]=null,ae=0;ae<$.length;ae++){var se=$[ae];se!==null&&(se.lane&=-536870913)}i&=~ce}s!==0&&Fo(e,s,0),a!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=a&~(S&~t))}function Fo(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-wt(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|i&261930}function Xo(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var s=31-wt(i),r=1<<s;r&t|e[s]&t&&(e[s]|=t),i&=~r}}function Vo(e,t){var i=t&-t;return i=(i&42)!==0?1:ha(i),(i&(e.suspendedLanes|t))!==0?0:i}function ha(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 fa(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Zo(){var e=F.p;return e!==0?e:(e=window.event,e===void 0?32:Nf(e.type))}function Qo(e,t){var i=F.p;try{return F.p=e,t()}finally{F.p=i}}var gi=Math.random().toString(36).slice(2),rt="__reactFiber$"+gi,dt="__reactProps$"+gi,_s="__reactContainer$"+gi,da="__reactEvents$"+gi,bd="__reactListeners$"+gi,Cd="__reactHandles$"+gi,$o="__reactResources$"+gi,er="__reactMarker$"+gi;function _a(e){delete e[rt],delete e[dt],delete e[da],delete e[bd],delete e[Cd]}function vs(e){var t=e[rt];if(t)return t;for(var i=e.parentNode;i;){if(t=i[_s]||i[rt]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=yf(e);e!==null;){if(i=e[rt])return i;e=yf(e)}return t}e=i,i=e.parentNode}return null}function ms(e){if(e=e[rt]||e[_s]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function tr(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(H(33))}function gs(e){var t=e[$o];return t||(t=e[$o]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function it(e){e[er]=!0}var Jo=new Set,ec={};function Fi(e,t){ps(e,t),ps(e+"Capture",t)}function ps(e,t){for(ec[e]=t,e=0;e<t.length;e++)Jo.add(t[e])}var wd=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]*$"),tc={},ic={};function Ed(e){return Ii.call(ic,e)?!0:Ii.call(tc,e)?!1:wd.test(e)?ic[e]=!0:(tc[e]=!0,!1)}function Vr(e,t,i){if(Ed(t))if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var s=t.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+i)}}function Zr(e,t,i){if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+i)}}function Zt(e,t,i,s){if(s===null)e.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(t,i,""+s)}}function kt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function sc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ad(e,t,i){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var r=s.get,a=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(S){i=""+S,a.call(this,S)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return i},setValue:function(S){i=""+S},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function va(e){if(!e._valueTracker){var t=sc(e)?"checked":"value";e._valueTracker=Ad(e,t,""+e[t])}}function rc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=sc(e)?e.checked?"true":"false":e.value),e=s,e!==i?(t.setValue(e),!0):!1}function Qr(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}}var Dd=/[\n"\\]/g;function Ot(e){return e.replace(Dd,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ma(e,t,i,s,r,a,S,R){e.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.type=S:e.removeAttribute("type"),t!=null?S==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+kt(t)):e.value!==""+kt(t)&&(e.value=""+kt(t)):S!=="submit"&&S!=="reset"||e.removeAttribute("value"),t!=null?ga(e,S,kt(t)):i!=null?ga(e,S,kt(i)):s!=null&&e.removeAttribute("value"),r==null&&a!=null&&(e.defaultChecked=!!a),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"?e.name=""+kt(R):e.removeAttribute("name")}function nc(e,t,i,s,r,a,S,R){if(a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"&&(e.type=a),t!=null||i!=null){if(!(a!=="submit"&&a!=="reset"||t!=null)){va(e);return}i=i!=null?""+kt(i):"",t=t!=null?""+kt(t):i,R||t===e.value||(e.value=t),e.defaultValue=t}s=s??r,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=R?e.checked:!!s,e.defaultChecked=!!s,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(e.name=S),va(e)}function ga(e,t,i){t==="number"&&Qr(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function Ss(e,t,i,s){if(e=e.options,t){t={};for(var r=0;r<i.length;r++)t["$"+i[r]]=!0;for(i=0;i<e.length;i++)r=t.hasOwnProperty("$"+e[i].value),e[i].selected!==r&&(e[i].selected=r),r&&s&&(e[i].defaultSelected=!0)}else{for(i=""+kt(i),t=null,r=0;r<e.length;r++){if(e[r].value===i){e[r].selected=!0,s&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function ac(e,t,i){if(t!=null&&(t=""+kt(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+kt(i):""}function lc(e,t,i,s){if(t==null){if(s!=null){if(i!=null)throw Error(H(92));if(te(s)){if(1<s.length)throw Error(H(93));s=s[0]}i=s}i==null&&(i=""),t=i}i=kt(t),e.defaultValue=i,s=e.textContent,s===i&&s!==""&&s!==null&&(e.value=s),va(e)}function ys(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var xd=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 oc(e,t,i){var s=t.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?s?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":s?e.setProperty(t,i):typeof i!="number"||i===0||xd.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function cc(e,t,i){if(t!=null&&typeof t!="object")throw Error(H(62));if(e=e.style,i!=null){for(var s in i)!i.hasOwnProperty(s)||t!=null&&t.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="");for(var r in t)s=t[r],t.hasOwnProperty(r)&&i[r]!==s&&oc(e,r,s)}else for(var a in t)t.hasOwnProperty(a)&&oc(e,a,t[a])}function pa(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 Td=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Rd=/^[\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 $r(e){return Rd.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Qt(){}var Sa=null;function ya(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var bs=null,Cs=null;function uc(e){var t=ms(e);if(t&&(e=t.stateNode)){var i=e[dt]||null;e:switch(e=t.stateNode,t.type){case"input":if(ma(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),t=i.name,i.type==="radio"&&t!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+Ot(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var s=i[t];if(s!==e&&s.form===e.form){var r=s[dt]||null;if(!r)throw Error(H(90));ma(s,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<i.length;t++)s=i[t],s.form===e.form&&rc(s)}break e;case"textarea":ac(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&Ss(e,!!i.multiple,t,!1)}}}var ba=!1;function hc(e,t,i){if(ba)return e(t,i);ba=!0;try{var s=e(t);return s}finally{if(ba=!1,(bs!==null||Cs!==null)&&(qn(),bs&&(t=bs,e=Cs,Cs=bs=null,uc(t),e)))for(t=0;t<e.length;t++)uc(e[t])}}function ir(e,t){var i=e.stateNode;if(i===null)return null;var s=i[dt]||null;if(s===null)return null;i=s[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":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(H(231,t,typeof i));return i}var $t=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ca=!1;if($t)try{var sr={};Object.defineProperty(sr,"passive",{get:function(){Ca=!0}}),window.addEventListener("test",sr,sr),window.removeEventListener("test",sr,sr)}catch{Ca=!1}var pi=null,wa=null,Jr=null;function fc(){if(Jr)return Jr;var e,t=wa,i=t.length,s,r="value"in pi?pi.value:pi.textContent,a=r.length;for(e=0;e<i&&t[e]===r[e];e++);var S=i-e;for(s=1;s<=S&&t[i-s]===r[a-s];s++);return Jr=r.slice(e,1<s?1-s:void 0)}function en(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 tn(){return!0}function dc(){return!1}function _t(e){function t(i,s,r,a,S){this._reactName=i,this._targetInst=r,this.type=s,this.nativeEvent=a,this.target=S,this.currentTarget=null;for(var R in e)e.hasOwnProperty(R)&&(i=e[R],this[R]=i?i(a):a[R]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?tn:dc,this.isPropagationStopped=dc,this}return h(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=tn)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=tn)},persist:function(){},isPersistent:tn}),t}var Xi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},sn=_t(Xi),rr=h({},Xi,{view:0,detail:0}),Md=_t(rr),Ea,Aa,nr,rn=h({},rr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xa,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!==nr&&(nr&&e.type==="mousemove"?(Ea=e.screenX-nr.screenX,Aa=e.screenY-nr.screenY):Aa=Ea=0,nr=e),Ea)},movementY:function(e){return"movementY"in e?e.movementY:Aa}}),_c=_t(rn),Ld=h({},rn,{dataTransfer:0}),kd=_t(Ld),Od=h({},rr,{relatedTarget:0}),Da=_t(Od),Bd=h({},Xi,{animationName:0,elapsedTime:0,pseudoElement:0}),Hd=_t(Bd),Nd=h({},Xi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),zd=_t(Nd),Ud=h({},Xi,{data:0}),vc=_t(Ud),jd={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},qd={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"},Id={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Wd(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Id[e])?!!t[e]:!1}function xa(){return Wd}var Kd=h({},rr,{key:function(e){if(e.key){var t=jd[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=en(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?qd[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xa,charCode:function(e){return e.type==="keypress"?en(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?en(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Gd=_t(Kd),Yd=h({},rn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),mc=_t(Yd),Pd=h({},rr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xa}),Fd=_t(Pd),Xd=h({},Xi,{propertyName:0,elapsedTime:0,pseudoElement:0}),Vd=_t(Xd),Zd=h({},rn,{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}),Qd=_t(Zd),$d=h({},Xi,{newState:0,oldState:0}),Jd=_t($d),e_=[9,13,27,32],Ta=$t&&"CompositionEvent"in window,ar=null;$t&&"documentMode"in document&&(ar=document.documentMode);var t_=$t&&"TextEvent"in window&&!ar,gc=$t&&(!Ta||ar&&8<ar&&11>=ar),pc=" ",Sc=!1;function yc(e,t){switch(e){case"keyup":return e_.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ws=!1;function i_(e,t){switch(e){case"compositionend":return bc(t);case"keypress":return t.which!==32?null:(Sc=!0,pc);case"textInput":return e=t.data,e===pc&&Sc?null:e;default:return null}}function s_(e,t){if(ws)return e==="compositionend"||!Ta&&yc(e,t)?(e=fc(),Jr=wa=pi=null,ws=!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 gc&&t.locale!=="ko"?null:t.data;default:return null}}var r_={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 Cc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!r_[e.type]:t==="textarea"}function wc(e,t,i,s){bs?Cs?Cs.push(s):Cs=[s]:bs=s,t=Fn(t,"onChange"),0<t.length&&(i=new sn("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var lr=null,or=null;function n_(e){af(e,0)}function nn(e){var t=tr(e);if(rc(t))return e}function Ec(e,t){if(e==="change")return t}var Ac=!1;if($t){var Ra;if($t){var Ma="oninput"in document;if(!Ma){var Dc=document.createElement("div");Dc.setAttribute("oninput","return;"),Ma=typeof Dc.oninput=="function"}Ra=Ma}else Ra=!1;Ac=Ra&&(!document.documentMode||9<document.documentMode)}function xc(){lr&&(lr.detachEvent("onpropertychange",Tc),or=lr=null)}function Tc(e){if(e.propertyName==="value"&&nn(or)){var t=[];wc(t,or,e,ya(e)),hc(n_,t)}}function a_(e,t,i){e==="focusin"?(xc(),lr=t,or=i,lr.attachEvent("onpropertychange",Tc)):e==="focusout"&&xc()}function l_(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return nn(or)}function o_(e,t){if(e==="click")return nn(t)}function c_(e,t){if(e==="input"||e==="change")return nn(t)}function u_(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Et=typeof Object.is=="function"?Object.is:u_;function cr(e,t){if(Et(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),s=Object.keys(t);if(i.length!==s.length)return!1;for(s=0;s<i.length;s++){var r=i[s];if(!Ii.call(t,r)||!Et(e[r],t[r]))return!1}return!0}function Rc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Mc(e,t){var i=Rc(e);e=0;for(var s;i;){if(i.nodeType===3){if(s=e+i.textContent.length,e<=t&&s>=t)return{node:i,offset:t-e};e=s}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Rc(i)}}function Lc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Lc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function kc(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Qr(e.document);t instanceof e.HTMLIFrameElement;){try{var i=typeof t.contentWindow.location.href=="string"}catch{i=!1}if(i)e=t.contentWindow;else break;t=Qr(e.document)}return t}function La(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 h_=$t&&"documentMode"in document&&11>=document.documentMode,Es=null,ka=null,ur=null,Oa=!1;function Oc(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Oa||Es==null||Es!==Qr(s)||(s=Es,"selectionStart"in s&&La(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),ur&&cr(ur,s)||(ur=s,s=Fn(ka,"onSelect"),0<s.length&&(t=new sn("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=Es)))}function Vi(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var As={animationend:Vi("Animation","AnimationEnd"),animationiteration:Vi("Animation","AnimationIteration"),animationstart:Vi("Animation","AnimationStart"),transitionrun:Vi("Transition","TransitionRun"),transitionstart:Vi("Transition","TransitionStart"),transitioncancel:Vi("Transition","TransitionCancel"),transitionend:Vi("Transition","TransitionEnd")},Ba={},Bc={};$t&&(Bc=document.createElement("div").style,"AnimationEvent"in window||(delete As.animationend.animation,delete As.animationiteration.animation,delete As.animationstart.animation),"TransitionEvent"in window||delete As.transitionend.transition);function Zi(e){if(Ba[e])return Ba[e];if(!As[e])return e;var t=As[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Bc)return Ba[e]=t[i];return e}var Hc=Zi("animationend"),Nc=Zi("animationiteration"),zc=Zi("animationstart"),f_=Zi("transitionrun"),d_=Zi("transitionstart"),__=Zi("transitioncancel"),Uc=Zi("transitionend"),jc=new Map,Ha="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Ha.push("scrollEnd");function Kt(e,t){jc.set(e,t),Fi(t,[e])}var an=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)},Bt=[],Ds=0,Na=0;function ln(){for(var e=Ds,t=Na=Ds=0;t<e;){var i=Bt[t];Bt[t++]=null;var s=Bt[t];Bt[t++]=null;var r=Bt[t];Bt[t++]=null;var a=Bt[t];if(Bt[t++]=null,s!==null&&r!==null){var S=s.pending;S===null?r.next=r:(r.next=S.next,S.next=r),s.pending=r}a!==0&&qc(i,r,a)}}function on(e,t,i,s){Bt[Ds++]=e,Bt[Ds++]=t,Bt[Ds++]=i,Bt[Ds++]=s,Na|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function za(e,t,i,s){return on(e,t,i,s),cn(e)}function Qi(e,t){return on(e,null,null,t),cn(e)}function qc(e,t,i){e.lanes|=i;var s=e.alternate;s!==null&&(s.lanes|=i);for(var r=!1,a=e.return;a!==null;)a.childLanes|=i,s=a.alternate,s!==null&&(s.childLanes|=i),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(r=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,r&&t!==null&&(r=31-wt(i),e=a.hiddenUpdates,s=e[r],s===null?e[r]=[t]:s.push(t),t.lane=i|536870912),a):null}function cn(e){if(50<kr)throw kr=0,Pl=null,Error(H(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var xs={};function v_(e,t,i,s){this.tag=e,this.key=i,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=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function At(e,t,i,s){return new v_(e,t,i,s)}function Ua(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Jt(e,t){var i=e.alternate;return i===null?(i=At(e.tag,t,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=t,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,t=e.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function Ic(e,t){e.flags&=65011714;var i=e.alternate;return i===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=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,t=i.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function un(e,t,i,s,r,a){var S=0;if(s=e,typeof e=="function")Ua(e)&&(S=1);else if(typeof e=="string")S=yv(e,i,G.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case A:return e=At(31,i,t,r),e.elementType=A,e.lanes=a,e;case v:return $i(i.children,r,a,t);case o:S=8,r|=24;break;case c:return e=At(12,i,t,r|2),e.elementType=c,e.lanes=a,e;case b:return e=At(13,i,t,r),e.elementType=b,e.lanes=a,e;case C:return e=At(19,i,t,r),e.elementType=C,e.lanes=a,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case l:S=10;break e;case n:S=9;break e;case _:S=11;break e;case w:S=14;break e;case m:S=16,s=null;break e}S=29,i=Error(H(130,e===null?"null":typeof e,"")),s=null}return t=At(S,i,t,r),t.elementType=e,t.type=s,t.lanes=a,t}function $i(e,t,i,s){return e=At(7,e,s,t),e.lanes=i,e}function ja(e,t,i){return e=At(6,e,null,t),e.lanes=i,e}function Wc(e){var t=At(18,null,null,0);return t.stateNode=e,t}function qa(e,t,i){return t=At(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Kc=new WeakMap;function Ht(e,t){if(typeof e=="object"&&e!==null){var i=Kc.get(e);return i!==void 0?i:(t={value:e,source:t,stack:_i(t)},Kc.set(e,t),t)}return{value:e,source:t,stack:_i(t)}}var Ts=[],Rs=0,hn=null,hr=0,Nt=[],zt=0,Si=null,Pt=1,Ft="";function ei(e,t){Ts[Rs++]=hr,Ts[Rs++]=hn,hn=e,hr=t}function Gc(e,t,i){Nt[zt++]=Pt,Nt[zt++]=Ft,Nt[zt++]=Si,Si=e;var s=Pt;e=Ft;var r=32-wt(s)-1;s&=~(1<<r),i+=1;var a=32-wt(t)+r;if(30<a){var S=r-r%5;a=(s&(1<<S)-1).toString(32),s>>=S,r-=S,Pt=1<<32-wt(t)+r|i<<r|s,Ft=a+e}else Pt=1<<a|i<<r|s,Ft=e}function Ia(e){e.return!==null&&(ei(e,1),Gc(e,1,0))}function Wa(e){for(;e===hn;)hn=Ts[--Rs],Ts[Rs]=null,hr=Ts[--Rs],Ts[Rs]=null;for(;e===Si;)Si=Nt[--zt],Nt[zt]=null,Ft=Nt[--zt],Nt[zt]=null,Pt=Nt[--zt],Nt[zt]=null}function Yc(e,t){Nt[zt++]=Pt,Nt[zt++]=Ft,Nt[zt++]=Si,Pt=t.id,Ft=t.overflow,Si=e}var nt=null,Ie=null,Te=!1,yi=null,Ut=!1,Ka=Error(H(519));function bi(e){var t=Error(H(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw fr(Ht(t,e)),Ka}function Pc(e){var t=e.stateNode,i=e.type,s=e.memoizedProps;switch(t[rt]=e,t[dt]=s,i){case"dialog":Ae("cancel",t),Ae("close",t);break;case"iframe":case"object":case"embed":Ae("load",t);break;case"video":case"audio":for(i=0;i<Br.length;i++)Ae(Br[i],t);break;case"source":Ae("error",t);break;case"img":case"image":case"link":Ae("error",t),Ae("load",t);break;case"details":Ae("toggle",t);break;case"input":Ae("invalid",t),nc(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Ae("invalid",t);break;case"textarea":Ae("invalid",t),lc(t,s.value,s.defaultValue,s.children)}i=s.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||s.suppressHydrationWarning===!0||uf(t.textContent,i)?(s.popover!=null&&(Ae("beforetoggle",t),Ae("toggle",t)),s.onScroll!=null&&Ae("scroll",t),s.onScrollEnd!=null&&Ae("scrollend",t),s.onClick!=null&&(t.onclick=Qt),t=!0):t=!1,t||bi(e,!0)}function Fc(e){for(nt=e.return;nt;)switch(nt.tag){case 5:case 31:case 13:Ut=!1;return;case 27:case 3:Ut=!0;return;default:nt=nt.return}}function Ms(e){if(e!==nt)return!1;if(!Te)return Fc(e),Te=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||lo(e.type,e.memoizedProps)),i=!i),i&&Ie&&bi(e),Fc(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(H(317));Ie=Sf(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(H(317));Ie=Sf(e)}else t===27?(t=Ie,Hi(e.type)?(e=fo,fo=null,Ie=e):Ie=t):Ie=nt?qt(e.stateNode.nextSibling):null;return!0}function Ji(){Ie=nt=null,Te=!1}function Ga(){var e=yi;return e!==null&&(pt===null?pt=e:pt.push.apply(pt,e),yi=null),e}function fr(e){yi===null?yi=[e]:yi.push(e)}var Ya=D(null),es=null,ti=null;function Ci(e,t,i){N(Ya,t._currentValue),t._currentValue=i}function ii(e){e._currentValue=Ya.current,T(Ya)}function Pa(e,t,i){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===i)break;e=e.return}}function Fa(e,t,i,s){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var a=r.dependencies;if(a!==null){var S=r.child;a=a.firstContext;e:for(;a!==null;){var R=a;a=r;for(var j=0;j<t.length;j++)if(R.context===t[j]){a.lanes|=i,R=a.alternate,R!==null&&(R.lanes|=i),Pa(a.return,i,e),s||(S=null);break e}a=R.next}}else if(r.tag===18){if(S=r.return,S===null)throw Error(H(341));S.lanes|=i,a=S.alternate,a!==null&&(a.lanes|=i),Pa(S,i,e),S=null}else S=r.child;if(S!==null)S.return=r;else for(S=r;S!==null;){if(S===e){S=null;break}if(r=S.sibling,r!==null){r.return=S.return,S=r;break}S=S.return}r=S}}function Ls(e,t,i,s){e=null;for(var r=t,a=!1;r!==null;){if(!a){if((r.flags&524288)!==0)a=!0;else if((r.flags&262144)!==0)break}if(r.tag===10){var S=r.alternate;if(S===null)throw Error(H(387));if(S=S.memoizedProps,S!==null){var R=r.type;Et(r.pendingProps.value,S.value)||(e!==null?e.push(R):e=[R])}}else if(r===K.current){if(S=r.alternate,S===null)throw Error(H(387));S.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(jr):e=[jr])}r=r.return}e!==null&&Fa(t,e,i,s),t.flags|=262144}function fn(e){for(e=e.firstContext;e!==null;){if(!Et(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ts(e){es=e,ti=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function at(e){return Xc(es,e)}function dn(e,t){return es===null&&ts(e),Xc(e,t)}function Xc(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},ti===null){if(e===null)throw Error(H(308));ti=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ti=ti.next=t;return i}var m_=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,s){e.push(s)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},g_=L.unstable_scheduleCallback,p_=L.unstable_NormalPriority,Xe={$$typeof:l,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Xa(){return{controller:new m_,data:new Map,refCount:0}}function dr(e){e.refCount--,e.refCount===0&&g_(p_,function(){e.controller.abort()})}var _r=null,Va=0,ks=0,Os=null;function S_(e,t){if(_r===null){var i=_r=[];Va=0,ks=$l(),Os={status:"pending",value:void 0,then:function(s){i.push(s)}}}return Va++,t.then(Vc,Vc),t}function Vc(){if(--Va===0&&_r!==null){Os!==null&&(Os.status="fulfilled");var e=_r;_r=null,ks=0,Os=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function y_(e,t){var i=[],s={status:"pending",value:null,reason:null,then:function(r){i.push(r)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var r=0;r<i.length;r++)(0,i[r])(t)},function(r){for(s.status="rejected",s.reason=r,r=0;r<i.length;r++)(0,i[r])(void 0)}),s}var Zc=I.S;I.S=function(e,t){Oh=Je(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&S_(e,t),Zc!==null&&Zc(e,t)};var is=D(null);function Za(){var e=is.current;return e!==null?e:Ue.pooledCache}function _n(e,t){t===null?N(is,is.current):N(is,t.pool)}function Qc(){var e=Za();return e===null?null:{parent:Xe._currentValue,pool:e}}var Bs=Error(H(460)),Qa=Error(H(474)),vn=Error(H(542)),mn={then:function(){}};function $c(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Jc(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(Qt,Qt),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,tu(e),e;default:if(typeof t.status=="string")t.then(Qt,Qt);else{if(e=Ue,e!==null&&100<e.shellSuspendCounter)throw Error(H(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=s}},function(s){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,tu(e),e}throw rs=t,Bs}}function ss(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(rs=i,Bs):i}}var rs=null;function eu(){if(rs===null)throw Error(H(459));var e=rs;return rs=null,e}function tu(e){if(e===Bs||e===vn)throw Error(H(483))}var Hs=null,vr=0;function gn(e){var t=vr;return vr+=1,Hs===null&&(Hs=[]),Jc(Hs,e,t)}function mr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function pn(e,t){throw t.$$typeof===g?Error(H(525)):(e=Object.prototype.toString.call(t),Error(H(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function iu(e){function t(V,W){if(e){var Z=V.deletions;Z===null?(V.deletions=[W],V.flags|=16):Z.push(W)}}function i(V,W){if(!e)return null;for(;W!==null;)t(V,W),W=W.sibling;return null}function s(V){for(var W=new Map;V!==null;)V.key!==null?W.set(V.key,V):W.set(V.index,V),V=V.sibling;return W}function r(V,W){return V=Jt(V,W),V.index=0,V.sibling=null,V}function a(V,W,Z){return V.index=Z,e?(Z=V.alternate,Z!==null?(Z=Z.index,Z<W?(V.flags|=67108866,W):Z):(V.flags|=67108866,W)):(V.flags|=1048576,W)}function S(V){return e&&V.alternate===null&&(V.flags|=67108866),V}function R(V,W,Z,le){return W===null||W.tag!==6?(W=ja(Z,V.mode,le),W.return=V,W):(W=r(W,Z),W.return=V,W)}function j(V,W,Z,le){var ge=Z.type;return ge===v?ae(V,W,Z.props.children,le,Z.key):W!==null&&(W.elementType===ge||typeof ge=="object"&&ge!==null&&ge.$$typeof===m&&ss(ge)===W.type)?(W=r(W,Z.props),mr(W,Z),W.return=V,W):(W=un(Z.type,Z.key,Z.props,null,V.mode,le),mr(W,Z),W.return=V,W)}function Q(V,W,Z,le){return W===null||W.tag!==4||W.stateNode.containerInfo!==Z.containerInfo||W.stateNode.implementation!==Z.implementation?(W=qa(Z,V.mode,le),W.return=V,W):(W=r(W,Z.children||[]),W.return=V,W)}function ae(V,W,Z,le,ge){return W===null||W.tag!==7?(W=$i(Z,V.mode,le,ge),W.return=V,W):(W=r(W,Z),W.return=V,W)}function ce(V,W,Z){if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return W=ja(""+W,V.mode,Z),W.return=V,W;if(typeof W=="object"&&W!==null){switch(W.$$typeof){case y:return Z=un(W.type,W.key,W.props,null,V.mode,Z),mr(Z,W),Z.return=V,Z;case E:return W=qa(W,V.mode,Z),W.return=V,W;case m:return W=ss(W),ce(V,W,Z)}if(te(W)||z(W))return W=$i(W,V.mode,Z,null),W.return=V,W;if(typeof W.then=="function")return ce(V,gn(W),Z);if(W.$$typeof===l)return ce(V,dn(V,W),Z);pn(V,W)}return null}function $(V,W,Z,le){var ge=W!==null?W.key:null;if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return ge!==null?null:R(V,W,""+Z,le);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case y:return Z.key===ge?j(V,W,Z,le):null;case E:return Z.key===ge?Q(V,W,Z,le):null;case m:return Z=ss(Z),$(V,W,Z,le)}if(te(Z)||z(Z))return ge!==null?null:ae(V,W,Z,le,null);if(typeof Z.then=="function")return $(V,W,gn(Z),le);if(Z.$$typeof===l)return $(V,W,dn(V,Z),le);pn(V,Z)}return null}function se(V,W,Z,le,ge){if(typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint")return V=V.get(Z)||null,R(W,V,""+le,ge);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case y:return V=V.get(le.key===null?Z:le.key)||null,j(W,V,le,ge);case E:return V=V.get(le.key===null?Z:le.key)||null,Q(W,V,le,ge);case m:return le=ss(le),se(V,W,Z,le,ge)}if(te(le)||z(le))return V=V.get(Z)||null,ae(W,V,le,ge,null);if(typeof le.then=="function")return se(V,W,Z,gn(le),ge);if(le.$$typeof===l)return se(V,W,Z,dn(W,le),ge);pn(W,le)}return null}function ve(V,W,Z,le){for(var ge=null,Re=null,me=W,Ce=W=0,xe=null;me!==null&&Ce<Z.length;Ce++){me.index>Ce?(xe=me,me=null):xe=me.sibling;var Me=$(V,me,Z[Ce],le);if(Me===null){me===null&&(me=xe);break}e&&me&&Me.alternate===null&&t(V,me),W=a(Me,W,Ce),Re===null?ge=Me:Re.sibling=Me,Re=Me,me=xe}if(Ce===Z.length)return i(V,me),Te&&ei(V,Ce),ge;if(me===null){for(;Ce<Z.length;Ce++)me=ce(V,Z[Ce],le),me!==null&&(W=a(me,W,Ce),Re===null?ge=me:Re.sibling=me,Re=me);return Te&&ei(V,Ce),ge}for(me=s(me);Ce<Z.length;Ce++)xe=se(me,V,Ce,Z[Ce],le),xe!==null&&(e&&xe.alternate!==null&&me.delete(xe.key===null?Ce:xe.key),W=a(xe,W,Ce),Re===null?ge=xe:Re.sibling=xe,Re=xe);return e&&me.forEach(function(qi){return t(V,qi)}),Te&&ei(V,Ce),ge}function pe(V,W,Z,le){if(Z==null)throw Error(H(151));for(var ge=null,Re=null,me=W,Ce=W=0,xe=null,Me=Z.next();me!==null&&!Me.done;Ce++,Me=Z.next()){me.index>Ce?(xe=me,me=null):xe=me.sibling;var qi=$(V,me,Me.value,le);if(qi===null){me===null&&(me=xe);break}e&&me&&qi.alternate===null&&t(V,me),W=a(qi,W,Ce),Re===null?ge=qi:Re.sibling=qi,Re=qi,me=xe}if(Me.done)return i(V,me),Te&&ei(V,Ce),ge;if(me===null){for(;!Me.done;Ce++,Me=Z.next())Me=ce(V,Me.value,le),Me!==null&&(W=a(Me,W,Ce),Re===null?ge=Me:Re.sibling=Me,Re=Me);return Te&&ei(V,Ce),ge}for(me=s(me);!Me.done;Ce++,Me=Z.next())Me=se(me,V,Ce,Me.value,le),Me!==null&&(e&&Me.alternate!==null&&me.delete(Me.key===null?Ce:Me.key),W=a(Me,W,Ce),Re===null?ge=Me:Re.sibling=Me,Re=Me);return e&&me.forEach(function(Lv){return t(V,Lv)}),Te&&ei(V,Ce),ge}function ze(V,W,Z,le){if(typeof Z=="object"&&Z!==null&&Z.type===v&&Z.key===null&&(Z=Z.props.children),typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case y:e:{for(var ge=Z.key;W!==null;){if(W.key===ge){if(ge=Z.type,ge===v){if(W.tag===7){i(V,W.sibling),le=r(W,Z.props.children),le.return=V,V=le;break e}}else if(W.elementType===ge||typeof ge=="object"&&ge!==null&&ge.$$typeof===m&&ss(ge)===W.type){i(V,W.sibling),le=r(W,Z.props),mr(le,Z),le.return=V,V=le;break e}i(V,W);break}else t(V,W);W=W.sibling}Z.type===v?(le=$i(Z.props.children,V.mode,le,Z.key),le.return=V,V=le):(le=un(Z.type,Z.key,Z.props,null,V.mode,le),mr(le,Z),le.return=V,V=le)}return S(V);case E:e:{for(ge=Z.key;W!==null;){if(W.key===ge)if(W.tag===4&&W.stateNode.containerInfo===Z.containerInfo&&W.stateNode.implementation===Z.implementation){i(V,W.sibling),le=r(W,Z.children||[]),le.return=V,V=le;break e}else{i(V,W);break}else t(V,W);W=W.sibling}le=qa(Z,V.mode,le),le.return=V,V=le}return S(V);case m:return Z=ss(Z),ze(V,W,Z,le)}if(te(Z))return ve(V,W,Z,le);if(z(Z)){if(ge=z(Z),typeof ge!="function")throw Error(H(150));return Z=ge.call(Z),pe(V,W,Z,le)}if(typeof Z.then=="function")return ze(V,W,gn(Z),le);if(Z.$$typeof===l)return ze(V,W,dn(V,Z),le);pn(V,Z)}return typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint"?(Z=""+Z,W!==null&&W.tag===6?(i(V,W.sibling),le=r(W,Z),le.return=V,V=le):(i(V,W),le=ja(Z,V.mode,le),le.return=V,V=le),S(V)):i(V,W)}return function(V,W,Z,le){try{vr=0;var ge=ze(V,W,Z,le);return Hs=null,ge}catch(me){if(me===Bs||me===vn)throw me;var Re=At(29,me,null,V.mode);return Re.lanes=le,Re.return=V,Re}finally{}}}var ns=iu(!0),su=iu(!1),wi=!1;function $a(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ja(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 Ei(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ai(e,t,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(Le&2)!==0){var r=s.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),s.pending=t,t=cn(e),qc(e,null,i),t}return on(e,s,t,i),cn(e)}function gr(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,Xo(e,i)}}function el(e,t){var i=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,i===s)){var r=null,a=null;if(i=i.firstBaseUpdate,i!==null){do{var S={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};a===null?r=a=S:a=a.next=S,i=i.next}while(i!==null);a===null?r=a=t:a=a.next=t}else r=a=t;i={baseState:s.baseState,firstBaseUpdate:r,lastBaseUpdate:a,shared:s.shared,callbacks:s.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}var tl=!1;function pr(){if(tl){var e=Os;if(e!==null)throw e}}function Sr(e,t,i,s){tl=!1;var r=e.updateQueue;wi=!1;var a=r.firstBaseUpdate,S=r.lastBaseUpdate,R=r.shared.pending;if(R!==null){r.shared.pending=null;var j=R,Q=j.next;j.next=null,S===null?a=Q:S.next=Q,S=j;var ae=e.alternate;ae!==null&&(ae=ae.updateQueue,R=ae.lastBaseUpdate,R!==S&&(R===null?ae.firstBaseUpdate=Q:R.next=Q,ae.lastBaseUpdate=j))}if(a!==null){var ce=r.baseState;S=0,ae=Q=j=null,R=a;do{var $=R.lane&-536870913,se=$!==R.lane;if(se?(De&$)===$:(s&$)===$){$!==0&&$===ks&&(tl=!0),ae!==null&&(ae=ae.next={lane:0,tag:R.tag,payload:R.payload,callback:null,next:null});e:{var ve=e,pe=R;$=t;var ze=i;switch(pe.tag){case 1:if(ve=pe.payload,typeof ve=="function"){ce=ve.call(ze,ce,$);break e}ce=ve;break e;case 3:ve.flags=ve.flags&-65537|128;case 0:if(ve=pe.payload,$=typeof ve=="function"?ve.call(ze,ce,$):ve,$==null)break e;ce=h({},ce,$);break e;case 2:wi=!0}}$=R.callback,$!==null&&(e.flags|=64,se&&(e.flags|=8192),se=r.callbacks,se===null?r.callbacks=[$]:se.push($))}else se={lane:$,tag:R.tag,payload:R.payload,callback:R.callback,next:null},ae===null?(Q=ae=se,j=ce):ae=ae.next=se,S|=$;if(R=R.next,R===null){if(R=r.shared.pending,R===null)break;se=R,R=se.next,se.next=null,r.lastBaseUpdate=se,r.shared.pending=null}}while(!0);ae===null&&(j=ce),r.baseState=j,r.firstBaseUpdate=Q,r.lastBaseUpdate=ae,a===null&&(r.shared.lanes=0),Mi|=S,e.lanes=S,e.memoizedState=ce}}function ru(e,t){if(typeof e!="function")throw Error(H(191,e));e.call(t)}function nu(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)ru(i[e],t)}var Ns=D(null),Sn=D(0);function au(e,t){e=hi,N(Sn,e),N(Ns,t),hi=e|t.baseLanes}function il(){N(Sn,hi),N(Ns,Ns.current)}function sl(){hi=Sn.current,T(Ns),T(Sn)}var Dt=D(null),jt=null;function Di(e){var t=e.alternate;N(Pe,Pe.current&1),N(Dt,e),jt===null&&(t===null||Ns.current!==null||t.memoizedState!==null)&&(jt=e)}function rl(e){N(Pe,Pe.current),N(Dt,e),jt===null&&(jt=e)}function lu(e){e.tag===22?(N(Pe,Pe.current),N(Dt,e),jt===null&&(jt=e)):xi()}function xi(){N(Pe,Pe.current),N(Dt,Dt.current)}function xt(e){T(Dt),jt===e&&(jt=null),T(Pe)}var Pe=D(0);function yn(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||uo(i)||ho(i)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){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 si=0,be=null,He=null,Ve=null,bn=!1,zs=!1,as=!1,Cn=0,yr=0,Us=null,b_=0;function Ge(){throw Error(H(321))}function nl(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!Et(e[i],t[i]))return!1;return!0}function al(e,t,i,s,r,a){return si=a,be=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,I.H=e===null||e.memoizedState===null?Gu:bl,as=!1,a=i(s,r),as=!1,zs&&(a=cu(t,i,s,r)),ou(e),a}function ou(e){I.H=wr;var t=He!==null&&He.next!==null;if(si=0,Ve=He=be=null,bn=!1,yr=0,Us=null,t)throw Error(H(300));e===null||Ze||(e=e.dependencies,e!==null&&fn(e)&&(Ze=!0))}function cu(e,t,i,s){be=e;var r=0;do{if(zs&&(Us=null),yr=0,zs=!1,25<=r)throw Error(H(301));if(r+=1,Ve=He=null,e.updateQueue!=null){var a=e.updateQueue;a.lastEffect=null,a.events=null,a.stores=null,a.memoCache!=null&&(a.memoCache.index=0)}I.H=Yu,a=t(i,s)}while(zs);return a}function C_(){var e=I.H,t=e.useState()[0];return t=typeof t.then=="function"?br(t):t,e=e.useState()[0],(He!==null?He.memoizedState:null)!==e&&(be.flags|=1024),t}function ll(){var e=Cn!==0;return Cn=0,e}function ol(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function cl(e){if(bn){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}bn=!1}si=0,Ve=He=be=null,zs=!1,yr=Cn=0,Us=null}function ht(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ve===null?be.memoizedState=Ve=e:Ve=Ve.next=e,Ve}function Fe(){if(He===null){var e=be.alternate;e=e!==null?e.memoizedState:null}else e=He.next;var t=Ve===null?be.memoizedState:Ve.next;if(t!==null)Ve=t,He=e;else{if(e===null)throw be.alternate===null?Error(H(467)):Error(H(310));He=e,e={memoizedState:He.memoizedState,baseState:He.baseState,baseQueue:He.baseQueue,queue:He.queue,next:null},Ve===null?be.memoizedState=Ve=e:Ve=Ve.next=e}return Ve}function wn(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function br(e){var t=yr;return yr+=1,Us===null&&(Us=[]),e=Jc(Us,e,t),t=be,(Ve===null?t.memoizedState:Ve.next)===null&&(t=t.alternate,I.H=t===null||t.memoizedState===null?Gu:bl),e}function En(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return br(e);if(e.$$typeof===l)return at(e)}throw Error(H(438,String(e)))}function ul(e){var t=null,i=be.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var s=be.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=wn(),be.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),s=0;s<e;s++)i[s]=B;return t.index++,i}function ri(e,t){return typeof t=="function"?t(e):t}function An(e){var t=Fe();return hl(t,He,e)}function hl(e,t,i){var s=e.queue;if(s===null)throw Error(H(311));s.lastRenderedReducer=i;var r=e.baseQueue,a=s.pending;if(a!==null){if(r!==null){var S=r.next;r.next=a.next,a.next=S}t.baseQueue=r=a,s.pending=null}if(a=e.baseState,r===null)e.memoizedState=a;else{t=r.next;var R=S=null,j=null,Q=t,ae=!1;do{var ce=Q.lane&-536870913;if(ce!==Q.lane?(De&ce)===ce:(si&ce)===ce){var $=Q.revertLane;if($===0)j!==null&&(j=j.next={lane:0,revertLane:0,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null}),ce===ks&&(ae=!0);else if((si&$)===$){Q=Q.next,$===ks&&(ae=!0);continue}else ce={lane:0,revertLane:Q.revertLane,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},j===null?(R=j=ce,S=a):j=j.next=ce,be.lanes|=$,Mi|=$;ce=Q.action,as&&i(a,ce),a=Q.hasEagerState?Q.eagerState:i(a,ce)}else $={lane:ce,revertLane:Q.revertLane,gesture:Q.gesture,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},j===null?(R=j=$,S=a):j=j.next=$,be.lanes|=ce,Mi|=ce;Q=Q.next}while(Q!==null&&Q!==t);if(j===null?S=a:j.next=R,!Et(a,e.memoizedState)&&(Ze=!0,ae&&(i=Os,i!==null)))throw i;e.memoizedState=a,e.baseState=S,e.baseQueue=j,s.lastRenderedState=a}return r===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function fl(e){var t=Fe(),i=t.queue;if(i===null)throw Error(H(311));i.lastRenderedReducer=e;var s=i.dispatch,r=i.pending,a=t.memoizedState;if(r!==null){i.pending=null;var S=r=r.next;do a=e(a,S.action),S=S.next;while(S!==r);Et(a,t.memoizedState)||(Ze=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),i.lastRenderedState=a}return[a,s]}function uu(e,t,i){var s=be,r=Fe(),a=Te;if(a){if(i===void 0)throw Error(H(407));i=i()}else i=t();var S=!Et((He||r).memoizedState,i);if(S&&(r.memoizedState=i,Ze=!0),r=r.queue,vl(du.bind(null,s,r,e),[e]),r.getSnapshot!==t||S||Ve!==null&&Ve.memoizedState.tag&1){if(s.flags|=2048,js(9,{destroy:void 0},fu.bind(null,s,r,i,t),null),Ue===null)throw Error(H(349));a||(si&127)!==0||hu(s,t,i)}return i}function hu(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=be.updateQueue,t===null?(t=wn(),be.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function fu(e,t,i,s){t.value=i,t.getSnapshot=s,_u(t)&&vu(e)}function du(e,t,i){return i(function(){_u(t)&&vu(e)})}function _u(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!Et(e,i)}catch{return!0}}function vu(e){var t=Qi(e,2);t!==null&&St(t,e,2)}function dl(e){var t=ht();if(typeof e=="function"){var i=e;if(e=i(),as){mi(!0);try{i()}finally{mi(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ri,lastRenderedState:e},t}function mu(e,t,i,s){return e.baseState=i,hl(e,He,typeof s=="function"?s:ri)}function w_(e,t,i,s,r){if(Tn(e))throw Error(H(485));if(e=t.action,e!==null){var a={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(S){a.listeners.push(S)}};I.T!==null?i(!0):a.isTransition=!1,s(a),i=t.pending,i===null?(a.next=t.pending=a,gu(t,a)):(a.next=i.next,t.pending=i.next=a)}}function gu(e,t){var i=t.action,s=t.payload,r=e.state;if(t.isTransition){var a=I.T,S={};I.T=S;try{var R=i(r,s),j=I.S;j!==null&&j(S,R),pu(e,t,R)}catch(Q){_l(e,t,Q)}finally{a!==null&&S.types!==null&&(a.types=S.types),I.T=a}}else try{a=i(r,s),pu(e,t,a)}catch(Q){_l(e,t,Q)}}function pu(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){Su(e,t,s)},function(s){return _l(e,t,s)}):Su(e,t,i)}function Su(e,t,i){t.status="fulfilled",t.value=i,yu(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,gu(e,i)))}function _l(e,t,i){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=i,yu(t),t=t.next;while(t!==s)}e.action=null}function yu(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function bu(e,t){return t}function Cu(e,t){if(Te){var i=Ue.formState;if(i!==null){e:{var s=be;if(Te){if(Ie){t:{for(var r=Ie,a=Ut;r.nodeType!==8;){if(!a){r=null;break t}if(r=qt(r.nextSibling),r===null){r=null;break t}}a=r.data,r=a==="F!"||a==="F"?r:null}if(r){Ie=qt(r.nextSibling),s=r.data==="F!";break e}}bi(s)}s=!1}s&&(t=i[0])}}return i=ht(),i.memoizedState=i.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:bu,lastRenderedState:t},i.queue=s,i=Iu.bind(null,be,s),s.dispatch=i,s=dl(!1),a=yl.bind(null,be,!1,s.queue),s=ht(),r={state:t,dispatch:null,action:e,pending:null},s.queue=r,i=w_.bind(null,be,r,a,i),r.dispatch=i,s.memoizedState=e,[t,i,!1]}function wu(e){var t=Fe();return Eu(t,He,e)}function Eu(e,t,i){if(t=hl(e,t,bu)[0],e=An(ri)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=br(t)}catch(S){throw S===Bs?vn:S}else s=t;t=Fe();var r=t.queue,a=r.dispatch;return i!==t.memoizedState&&(be.flags|=2048,js(9,{destroy:void 0},E_.bind(null,r,i),null)),[s,a,e]}function E_(e,t){e.action=t}function Au(e){var t=Fe(),i=He;if(i!==null)return Eu(t,i,e);Fe(),t=t.memoizedState,i=Fe();var s=i.queue.dispatch;return i.memoizedState=e,[t,s,!1]}function js(e,t,i,s){return e={tag:e,create:i,deps:s,inst:t,next:null},t=be.updateQueue,t===null&&(t=wn(),be.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(s=i.next,i.next=e,e.next=s,t.lastEffect=e),e}function Du(){return Fe().memoizedState}function Dn(e,t,i,s){var r=ht();be.flags|=e,r.memoizedState=js(1|t,{destroy:void 0},i,s===void 0?null:s)}function xn(e,t,i,s){var r=Fe();s=s===void 0?null:s;var a=r.memoizedState.inst;He!==null&&s!==null&&nl(s,He.memoizedState.deps)?r.memoizedState=js(t,a,i,s):(be.flags|=e,r.memoizedState=js(1|t,a,i,s))}function xu(e,t){Dn(8390656,8,e,t)}function vl(e,t){xn(2048,8,e,t)}function A_(e){be.flags|=4;var t=be.updateQueue;if(t===null)t=wn(),be.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function Tu(e){var t=Fe().memoizedState;return A_({ref:t,nextImpl:e}),function(){if((Le&2)!==0)throw Error(H(440));return t.impl.apply(void 0,arguments)}}function Ru(e,t){return xn(4,2,e,t)}function Mu(e,t){return xn(4,4,e,t)}function Lu(e,t){if(typeof t=="function"){e=e();var i=t(e);return function(){typeof i=="function"?i():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ku(e,t,i){i=i!=null?i.concat([e]):null,xn(4,4,Lu.bind(null,t,e),i)}function ml(){}function Ou(e,t){var i=Fe();t=t===void 0?null:t;var s=i.memoizedState;return t!==null&&nl(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function Bu(e,t){var i=Fe();t=t===void 0?null:t;var s=i.memoizedState;if(t!==null&&nl(t,s[1]))return s[0];if(s=e(),as){mi(!0);try{e()}finally{mi(!1)}}return i.memoizedState=[s,t],s}function gl(e,t,i){return i===void 0||(si&1073741824)!==0&&(De&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=Hh(),be.lanes|=e,Mi|=e,i)}function Hu(e,t,i,s){return Et(i,t)?i:Ns.current!==null?(e=gl(e,i,s),Et(e,t)||(Ze=!0),e):(si&42)===0||(si&1073741824)!==0&&(De&261930)===0?(Ze=!0,e.memoizedState=i):(e=Hh(),be.lanes|=e,Mi|=e,t)}function Nu(e,t,i,s,r){var a=F.p;F.p=a!==0&&8>a?a:8;var S=I.T,R={};I.T=R,yl(e,!1,t,i);try{var j=r(),Q=I.S;if(Q!==null&&Q(R,j),j!==null&&typeof j=="object"&&typeof j.then=="function"){var ae=y_(j,s);Cr(e,t,ae,Mt(e))}else Cr(e,t,s,Mt(e))}catch(ce){Cr(e,t,{then:function(){},status:"rejected",reason:ce},Mt())}finally{F.p=a,S!==null&&R.types!==null&&(S.types=R.types),I.T=S}}function D_(){}function pl(e,t,i,s){if(e.tag!==5)throw Error(H(476));var r=zu(e).queue;Nu(e,r,t,ie,i===null?D_:function(){return Uu(e),i(s)})}function zu(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ie,baseState:ie,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ri,lastRenderedState:ie},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ri,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Uu(e){var t=zu(e);t.next===null&&(t=e.alternate.memoizedState),Cr(e,t.next.queue,{},Mt())}function Sl(){return at(jr)}function ju(){return Fe().memoizedState}function qu(){return Fe().memoizedState}function x_(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=Mt();e=Ei(i);var s=Ai(t,e,i);s!==null&&(St(s,t,i),gr(s,t,i)),t={cache:Xa()},e.payload=t;return}t=t.return}}function T_(e,t,i){var s=Mt();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Tn(e)?Wu(t,i):(i=za(e,t,i,s),i!==null&&(St(i,e,s),Ku(i,t,s)))}function Iu(e,t,i){var s=Mt();Cr(e,t,i,s)}function Cr(e,t,i,s){var r={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Tn(e))Wu(t,r);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var S=t.lastRenderedState,R=a(S,i);if(r.hasEagerState=!0,r.eagerState=R,Et(R,S))return on(e,t,r,0),Ue===null&&ln(),!1}catch{}finally{}if(i=za(e,t,r,s),i!==null)return St(i,e,s),Ku(i,t,s),!0}return!1}function yl(e,t,i,s){if(s={lane:2,revertLane:$l(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Tn(e)){if(t)throw Error(H(479))}else t=za(e,i,s,2),t!==null&&St(t,e,2)}function Tn(e){var t=e.alternate;return e===be||t!==null&&t===be}function Wu(e,t){zs=bn=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Ku(e,t,i){if((i&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,Xo(e,i)}}var wr={readContext:at,use:En,useCallback:Ge,useContext:Ge,useEffect:Ge,useImperativeHandle:Ge,useLayoutEffect:Ge,useInsertionEffect:Ge,useMemo:Ge,useReducer:Ge,useRef:Ge,useState:Ge,useDebugValue:Ge,useDeferredValue:Ge,useTransition:Ge,useSyncExternalStore:Ge,useId:Ge,useHostTransitionStatus:Ge,useFormState:Ge,useActionState:Ge,useOptimistic:Ge,useMemoCache:Ge,useCacheRefresh:Ge};wr.useEffectEvent=Ge;var Gu={readContext:at,use:En,useCallback:function(e,t){return ht().memoizedState=[e,t===void 0?null:t],e},useContext:at,useEffect:xu,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,Dn(4194308,4,Lu.bind(null,t,e),i)},useLayoutEffect:function(e,t){return Dn(4194308,4,e,t)},useInsertionEffect:function(e,t){Dn(4,2,e,t)},useMemo:function(e,t){var i=ht();t=t===void 0?null:t;var s=e();if(as){mi(!0);try{e()}finally{mi(!1)}}return i.memoizedState=[s,t],s},useReducer:function(e,t,i){var s=ht();if(i!==void 0){var r=i(t);if(as){mi(!0);try{i(t)}finally{mi(!1)}}}else r=t;return s.memoizedState=s.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},s.queue=e,e=e.dispatch=T_.bind(null,be,e),[s.memoizedState,e]},useRef:function(e){var t=ht();return e={current:e},t.memoizedState=e},useState:function(e){e=dl(e);var t=e.queue,i=Iu.bind(null,be,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:ml,useDeferredValue:function(e,t){var i=ht();return gl(i,e,t)},useTransition:function(){var e=dl(!1);return e=Nu.bind(null,be,e.queue,!0,!1),ht().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var s=be,r=ht();if(Te){if(i===void 0)throw Error(H(407));i=i()}else{if(i=t(),Ue===null)throw Error(H(349));(De&127)!==0||hu(s,t,i)}r.memoizedState=i;var a={value:i,getSnapshot:t};return r.queue=a,xu(du.bind(null,s,a,e),[e]),s.flags|=2048,js(9,{destroy:void 0},fu.bind(null,s,a,i,t),null),i},useId:function(){var e=ht(),t=Ue.identifierPrefix;if(Te){var i=Ft,s=Pt;i=(s&~(1<<32-wt(s)-1)).toString(32)+i,t="_"+t+"R_"+i,i=Cn++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=b_++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Sl,useFormState:Cu,useActionState:Cu,useOptimistic:function(e){var t=ht();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=yl.bind(null,be,!0,i),i.dispatch=t,[e,t]},useMemoCache:ul,useCacheRefresh:function(){return ht().memoizedState=x_.bind(null,be)},useEffectEvent:function(e){var t=ht(),i={impl:e};return t.memoizedState=i,function(){if((Le&2)!==0)throw Error(H(440));return i.impl.apply(void 0,arguments)}}},bl={readContext:at,use:En,useCallback:Ou,useContext:at,useEffect:vl,useImperativeHandle:ku,useInsertionEffect:Ru,useLayoutEffect:Mu,useMemo:Bu,useReducer:An,useRef:Du,useState:function(){return An(ri)},useDebugValue:ml,useDeferredValue:function(e,t){var i=Fe();return Hu(i,He.memoizedState,e,t)},useTransition:function(){var e=An(ri)[0],t=Fe().memoizedState;return[typeof e=="boolean"?e:br(e),t]},useSyncExternalStore:uu,useId:ju,useHostTransitionStatus:Sl,useFormState:wu,useActionState:wu,useOptimistic:function(e,t){var i=Fe();return mu(i,He,e,t)},useMemoCache:ul,useCacheRefresh:qu};bl.useEffectEvent=Tu;var Yu={readContext:at,use:En,useCallback:Ou,useContext:at,useEffect:vl,useImperativeHandle:ku,useInsertionEffect:Ru,useLayoutEffect:Mu,useMemo:Bu,useReducer:fl,useRef:Du,useState:function(){return fl(ri)},useDebugValue:ml,useDeferredValue:function(e,t){var i=Fe();return He===null?gl(i,e,t):Hu(i,He.memoizedState,e,t)},useTransition:function(){var e=fl(ri)[0],t=Fe().memoizedState;return[typeof e=="boolean"?e:br(e),t]},useSyncExternalStore:uu,useId:ju,useHostTransitionStatus:Sl,useFormState:Au,useActionState:Au,useOptimistic:function(e,t){var i=Fe();return He!==null?mu(i,He,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:ul,useCacheRefresh:qu};Yu.useEffectEvent=Tu;function Cl(e,t,i,s){t=e.memoizedState,i=i(s,t),i=i==null?t:h({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var wl={enqueueSetState:function(e,t,i){e=e._reactInternals;var s=Mt(),r=Ei(s);r.payload=t,i!=null&&(r.callback=i),t=Ai(e,r,s),t!==null&&(St(t,e,s),gr(t,e,s))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=Mt(),r=Ei(s);r.tag=1,r.payload=t,i!=null&&(r.callback=i),t=Ai(e,r,s),t!==null&&(St(t,e,s),gr(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=Mt(),s=Ei(i);s.tag=2,t!=null&&(s.callback=t),t=Ai(e,s,i),t!==null&&(St(t,e,i),gr(t,e,i))}};function Pu(e,t,i,s,r,a,S){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,a,S):t.prototype&&t.prototype.isPureReactComponent?!cr(i,s)||!cr(r,a):!0}function Fu(e,t,i,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,s),t.state!==e&&wl.enqueueReplaceState(t,t.state,null)}function ls(e,t){var i=t;if("ref"in t){i={};for(var s in t)s!=="ref"&&(i[s]=t[s])}if(e=e.defaultProps){i===t&&(i=h({},i));for(var r in e)i[r]===void 0&&(i[r]=e[r])}return i}function Xu(e){an(e)}function Vu(e){console.error(e)}function Zu(e){an(e)}function Rn(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function Qu(e,t,i){try{var s=e.onCaughtError;s(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function El(e,t,i){return i=Ei(i),i.tag=3,i.payload={element:null},i.callback=function(){Rn(e,t)},i}function $u(e){return e=Ei(e),e.tag=3,e}function Ju(e,t,i,s){var r=i.type.getDerivedStateFromError;if(typeof r=="function"){var a=s.value;e.payload=function(){return r(a)},e.callback=function(){Qu(t,i,s)}}var S=i.stateNode;S!==null&&typeof S.componentDidCatch=="function"&&(e.callback=function(){Qu(t,i,s),typeof r!="function"&&(Li===null?Li=new Set([this]):Li.add(this));var R=s.stack;this.componentDidCatch(s.value,{componentStack:R!==null?R:""})})}function R_(e,t,i,s,r){if(i.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=i.alternate,t!==null&&Ls(t,i,r,!0),i=Dt.current,i!==null){switch(i.tag){case 31:case 13:return jt===null?In():i.alternate===null&&Ye===0&&(Ye=3),i.flags&=-257,i.flags|=65536,i.lanes=r,s===mn?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([s]):t.add(s),Vl(e,s,r)),!1;case 22:return i.flags|=65536,s===mn?i.flags|=16384:(t=i.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([s])},i.updateQueue=t):(i=t.retryQueue,i===null?t.retryQueue=new Set([s]):i.add(s)),Vl(e,s,r)),!1}throw Error(H(435,i.tag))}return Vl(e,s,r),In(),!1}if(Te)return t=Dt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,s!==Ka&&(e=Error(H(422),{cause:s}),fr(Ht(e,i)))):(s!==Ka&&(t=Error(H(423),{cause:s}),fr(Ht(t,i))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,s=Ht(s,i),r=El(e.stateNode,s,r),el(e,r),Ye!==4&&(Ye=2)),!1;var a=Error(H(520),{cause:s});if(a=Ht(a,i),Lr===null?Lr=[a]:Lr.push(a),Ye!==4&&(Ye=2),t===null)return!0;s=Ht(s,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=r&-r,i.lanes|=e,e=El(i.stateNode,s,e),el(i,e),!1;case 1:if(t=i.type,a=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||a!==null&&typeof a.componentDidCatch=="function"&&(Li===null||!Li.has(a))))return i.flags|=65536,r&=-r,i.lanes|=r,r=$u(r),Ju(r,e,i,s),el(i,r),!1}i=i.return}while(i!==null);return!1}var Al=Error(H(461)),Ze=!1;function lt(e,t,i,s){t.child=e===null?su(t,null,i,s):ns(t,e.child,i,s)}function eh(e,t,i,s,r){i=i.render;var a=t.ref;if("ref"in s){var S={};for(var R in s)R!=="ref"&&(S[R]=s[R])}else S=s;return ts(t),s=al(e,t,i,S,a,r),R=ll(),e!==null&&!Ze?(ol(e,t,r),ni(e,t,r)):(Te&&R&&Ia(t),t.flags|=1,lt(e,t,s,r),t.child)}function th(e,t,i,s,r){if(e===null){var a=i.type;return typeof a=="function"&&!Ua(a)&&a.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=a,ih(e,t,a,s,r)):(e=un(i.type,null,s,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Ol(e,r)){var S=a.memoizedProps;if(i=i.compare,i=i!==null?i:cr,i(S,s)&&e.ref===t.ref)return ni(e,t,r)}return t.flags|=1,e=Jt(a,s),e.ref=t.ref,e.return=t,t.child=e}function ih(e,t,i,s,r){if(e!==null){var a=e.memoizedProps;if(cr(a,s)&&e.ref===t.ref)if(Ze=!1,t.pendingProps=s=a,Ol(e,r))(e.flags&131072)!==0&&(Ze=!0);else return t.lanes=e.lanes,ni(e,t,r)}return Dl(e,t,i,s,r)}function sh(e,t,i,s){var r=s.children,a=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((t.flags&128)!==0){if(a=a!==null?a.baseLanes|i:i,e!==null){for(s=t.child=e.child,r=0;s!==null;)r=r|s.lanes|s.childLanes,s=s.sibling;s=r&~a}else s=0,t.child=null;return rh(e,t,a,i,s)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&_n(t,a!==null?a.cachePool:null),a!==null?au(t,a):il(),lu(t);else return s=t.lanes=536870912,rh(e,t,a!==null?a.baseLanes|i:i,i,s)}else a!==null?(_n(t,a.cachePool),au(t,a),xi(),t.memoizedState=null):(e!==null&&_n(t,null),il(),xi());return lt(e,t,r,i),t.child}function Er(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function rh(e,t,i,s,r){var a=Za();return a=a===null?null:{parent:Xe._currentValue,pool:a},t.memoizedState={baseLanes:i,cachePool:a},e!==null&&_n(t,null),il(),lu(t),e!==null&&Ls(e,t,s,!0),t.childLanes=r,null}function Mn(e,t){return t=kn({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function nh(e,t,i){return ns(t,e.child,null,i),e=Mn(t,t.pendingProps),e.flags|=2,xt(t),t.memoizedState=null,e}function M_(e,t,i){var s=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Te){if(s.mode==="hidden")return e=Mn(t,s),t.lanes=536870912,Er(null,e);if(rl(t),(e=Ie)?(e=pf(e,Ut),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Si!==null?{id:Pt,overflow:Ft}:null,retryLane:536870912,hydrationErrors:null},i=Wc(e),i.return=t,t.child=i,nt=t,Ie=null)):e=null,e===null)throw bi(t);return t.lanes=536870912,null}return Mn(t,s)}var a=e.memoizedState;if(a!==null){var S=a.dehydrated;if(rl(t),r)if(t.flags&256)t.flags&=-257,t=nh(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(H(558));else if(Ze||Ls(e,t,i,!1),r=(i&e.childLanes)!==0,Ze||r){if(s=Ue,s!==null&&(S=Vo(s,i),S!==0&&S!==a.retryLane))throw a.retryLane=S,Qi(e,S),St(s,e,S),Al;In(),t=nh(e,t,i)}else e=a.treeContext,Ie=qt(S.nextSibling),nt=t,Te=!0,yi=null,Ut=!1,e!==null&&Yc(t,e),t=Mn(t,s),t.flags|=4096;return t}return e=Jt(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ln(e,t){var i=t.ref;if(i===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(H(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function Dl(e,t,i,s,r){return ts(t),i=al(e,t,i,s,void 0,r),s=ll(),e!==null&&!Ze?(ol(e,t,r),ni(e,t,r)):(Te&&s&&Ia(t),t.flags|=1,lt(e,t,i,r),t.child)}function ah(e,t,i,s,r,a){return ts(t),t.updateQueue=null,i=cu(t,s,i,r),ou(e),s=ll(),e!==null&&!Ze?(ol(e,t,a),ni(e,t,a)):(Te&&s&&Ia(t),t.flags|=1,lt(e,t,i,a),t.child)}function lh(e,t,i,s,r){if(ts(t),t.stateNode===null){var a=xs,S=i.contextType;typeof S=="object"&&S!==null&&(a=at(S)),a=new i(s,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=wl,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=s,a.state=t.memoizedState,a.refs={},$a(t),S=i.contextType,a.context=typeof S=="object"&&S!==null?at(S):xs,a.state=t.memoizedState,S=i.getDerivedStateFromProps,typeof S=="function"&&(Cl(t,i,S,s),a.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(S=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),S!==a.state&&wl.enqueueReplaceState(a,a.state,null),Sr(t,s,a,r),pr(),a.state=t.memoizedState),typeof a.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){a=t.stateNode;var R=t.memoizedProps,j=ls(i,R);a.props=j;var Q=a.context,ae=i.contextType;S=xs,typeof ae=="object"&&ae!==null&&(S=at(ae));var ce=i.getDerivedStateFromProps;ae=typeof ce=="function"||typeof a.getSnapshotBeforeUpdate=="function",R=t.pendingProps!==R,ae||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(R||Q!==S)&&Fu(t,a,s,S),wi=!1;var $=t.memoizedState;a.state=$,Sr(t,s,a,r),pr(),Q=t.memoizedState,R||$!==Q||wi?(typeof ce=="function"&&(Cl(t,i,ce,s),Q=t.memoizedState),(j=wi||Pu(t,i,j,s,$,Q,S))?(ae||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=Q),a.props=s,a.state=Q,a.context=S,s=j):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{a=t.stateNode,Ja(e,t),S=t.memoizedProps,ae=ls(i,S),a.props=ae,ce=t.pendingProps,$=a.context,Q=i.contextType,j=xs,typeof Q=="object"&&Q!==null&&(j=at(Q)),R=i.getDerivedStateFromProps,(Q=typeof R=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(S!==ce||$!==j)&&Fu(t,a,s,j),wi=!1,$=t.memoizedState,a.state=$,Sr(t,s,a,r),pr();var se=t.memoizedState;S!==ce||$!==se||wi||e!==null&&e.dependencies!==null&&fn(e.dependencies)?(typeof R=="function"&&(Cl(t,i,R,s),se=t.memoizedState),(ae=wi||Pu(t,i,ae,s,$,se,j)||e!==null&&e.dependencies!==null&&fn(e.dependencies))?(Q||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(s,se,j),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(s,se,j)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||S===e.memoizedProps&&$===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||S===e.memoizedProps&&$===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=se),a.props=s,a.state=se,a.context=j,s=ae):(typeof a.componentDidUpdate!="function"||S===e.memoizedProps&&$===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||S===e.memoizedProps&&$===e.memoizedState||(t.flags|=1024),s=!1)}return a=s,Ln(e,t),s=(t.flags&128)!==0,a||s?(a=t.stateNode,i=s&&typeof i.getDerivedStateFromError!="function"?null:a.render(),t.flags|=1,e!==null&&s?(t.child=ns(t,e.child,null,r),t.child=ns(t,null,i,r)):lt(e,t,i,r),t.memoizedState=a.state,e=t.child):e=ni(e,t,r),e}function oh(e,t,i,s){return Ji(),t.flags|=256,lt(e,t,i,s),t.child}var xl={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Tl(e){return{baseLanes:e,cachePool:Qc()}}function Rl(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=Rt),e}function ch(e,t,i){var s=t.pendingProps,r=!1,a=(t.flags&128)!==0,S;if((S=a)||(S=e!==null&&e.memoizedState===null?!1:(Pe.current&2)!==0),S&&(r=!0,t.flags&=-129),S=(t.flags&32)!==0,t.flags&=-33,e===null){if(Te){if(r?Di(t):xi(),(e=Ie)?(e=pf(e,Ut),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Si!==null?{id:Pt,overflow:Ft}:null,retryLane:536870912,hydrationErrors:null},i=Wc(e),i.return=t,t.child=i,nt=t,Ie=null)):e=null,e===null)throw bi(t);return ho(e)?t.lanes=32:t.lanes=536870912,null}var R=s.children;return s=s.fallback,r?(xi(),r=t.mode,R=kn({mode:"hidden",children:R},r),s=$i(s,r,i,null),R.return=t,s.return=t,R.sibling=s,t.child=R,s=t.child,s.memoizedState=Tl(i),s.childLanes=Rl(e,S,i),t.memoizedState=xl,Er(null,s)):(Di(t),Ml(t,R))}var j=e.memoizedState;if(j!==null&&(R=j.dehydrated,R!==null)){if(a)t.flags&256?(Di(t),t.flags&=-257,t=Ll(e,t,i)):t.memoizedState!==null?(xi(),t.child=e.child,t.flags|=128,t=null):(xi(),R=s.fallback,r=t.mode,s=kn({mode:"visible",children:s.children},r),R=$i(R,r,i,null),R.flags|=2,s.return=t,R.return=t,s.sibling=R,t.child=s,ns(t,e.child,null,i),s=t.child,s.memoizedState=Tl(i),s.childLanes=Rl(e,S,i),t.memoizedState=xl,t=Er(null,s));else if(Di(t),ho(R)){if(S=R.nextSibling&&R.nextSibling.dataset,S)var Q=S.dgst;S=Q,s=Error(H(419)),s.stack="",s.digest=S,fr({value:s,source:null,stack:null}),t=Ll(e,t,i)}else if(Ze||Ls(e,t,i,!1),S=(i&e.childLanes)!==0,Ze||S){if(S=Ue,S!==null&&(s=Vo(S,i),s!==0&&s!==j.retryLane))throw j.retryLane=s,Qi(e,s),St(S,e,s),Al;uo(R)||In(),t=Ll(e,t,i)}else uo(R)?(t.flags|=192,t.child=e.child,t=null):(e=j.treeContext,Ie=qt(R.nextSibling),nt=t,Te=!0,yi=null,Ut=!1,e!==null&&Yc(t,e),t=Ml(t,s.children),t.flags|=4096);return t}return r?(xi(),R=s.fallback,r=t.mode,j=e.child,Q=j.sibling,s=Jt(j,{mode:"hidden",children:s.children}),s.subtreeFlags=j.subtreeFlags&65011712,Q!==null?R=Jt(Q,R):(R=$i(R,r,i,null),R.flags|=2),R.return=t,s.return=t,s.sibling=R,t.child=s,Er(null,s),s=t.child,R=e.child.memoizedState,R===null?R=Tl(i):(r=R.cachePool,r!==null?(j=Xe._currentValue,r=r.parent!==j?{parent:j,pool:j}:r):r=Qc(),R={baseLanes:R.baseLanes|i,cachePool:r}),s.memoizedState=R,s.childLanes=Rl(e,S,i),t.memoizedState=xl,Er(e.child,s)):(Di(t),i=e.child,e=i.sibling,i=Jt(i,{mode:"visible",children:s.children}),i.return=t,i.sibling=null,e!==null&&(S=t.deletions,S===null?(t.deletions=[e],t.flags|=16):S.push(e)),t.child=i,t.memoizedState=null,i)}function Ml(e,t){return t=kn({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function kn(e,t){return e=At(22,e,null,t),e.lanes=0,e}function Ll(e,t,i){return ns(t,e.child,null,i),e=Ml(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function uh(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),Pa(e.return,t,i)}function kl(e,t,i,s,r,a){var S=e.memoizedState;S===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:r,treeForkCount:a}:(S.isBackwards=t,S.rendering=null,S.renderingStartTime=0,S.last=s,S.tail=i,S.tailMode=r,S.treeForkCount=a)}function hh(e,t,i){var s=t.pendingProps,r=s.revealOrder,a=s.tail;s=s.children;var S=Pe.current,R=(S&2)!==0;if(R?(S=S&1|2,t.flags|=128):S&=1,N(Pe,S),lt(e,t,s,i),s=Te?hr:0,!R&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&uh(e,i,t);else if(e.tag===19)uh(e,i,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(r){case"forwards":for(i=t.child,r=null;i!==null;)e=i.alternate,e!==null&&yn(e)===null&&(r=i),i=i.sibling;i=r,i===null?(r=t.child,t.child=null):(r=i.sibling,i.sibling=null),kl(t,!1,r,i,a,s);break;case"backwards":case"unstable_legacy-backwards":for(i=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&yn(e)===null){t.child=r;break}e=r.sibling,r.sibling=i,i=r,r=e}kl(t,!0,i,null,a,s);break;case"together":kl(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function ni(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),Mi|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(Ls(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(H(153));if(t.child!==null){for(e=t.child,i=Jt(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=Jt(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function Ol(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&fn(e)))}function L_(e,t,i){switch(t.tag){case 3:M(t,t.stateNode.containerInfo),Ci(t,Xe,e.memoizedState.cache),Ji();break;case 27:case 5:ne(t);break;case 4:M(t,t.stateNode.containerInfo);break;case 10:Ci(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,rl(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(Di(t),t.flags|=128,null):(i&t.child.childLanes)!==0?ch(e,t,i):(Di(t),e=ni(e,t,i),e!==null?e.sibling:null);Di(t);break;case 19:var r=(e.flags&128)!==0;if(s=(i&t.childLanes)!==0,s||(Ls(e,t,i,!1),s=(i&t.childLanes)!==0),r){if(s)return hh(e,t,i);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),N(Pe,Pe.current),s)break;return null;case 22:return t.lanes=0,sh(e,t,i,t.pendingProps);case 24:Ci(t,Xe,e.memoizedState.cache)}return ni(e,t,i)}function fh(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ze=!0;else{if(!Ol(e,i)&&(t.flags&128)===0)return Ze=!1,L_(e,t,i);Ze=(e.flags&131072)!==0}else Ze=!1,Te&&(t.flags&1048576)!==0&&Gc(t,hr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=ss(t.elementType),t.type=e,typeof e=="function")Ua(e)?(s=ls(e,s),t.tag=1,t=lh(null,t,e,s,i)):(t.tag=0,t=Dl(null,t,e,s,i));else{if(e!=null){var r=e.$$typeof;if(r===_){t.tag=11,t=eh(null,t,e,s,i);break e}else if(r===w){t.tag=14,t=th(null,t,e,s,i);break e}}throw t=P(e)||e,Error(H(306,t,""))}}return t;case 0:return Dl(e,t,t.type,t.pendingProps,i);case 1:return s=t.type,r=ls(s,t.pendingProps),lh(e,t,s,r,i);case 3:e:{if(M(t,t.stateNode.containerInfo),e===null)throw Error(H(387));s=t.pendingProps;var a=t.memoizedState;r=a.element,Ja(e,t),Sr(t,s,null,i);var S=t.memoizedState;if(s=S.cache,Ci(t,Xe,s),s!==a.cache&&Fa(t,[Xe],i,!0),pr(),s=S.element,a.isDehydrated)if(a={element:s,isDehydrated:!1,cache:S.cache},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){t=oh(e,t,s,i);break e}else if(s!==r){r=Ht(Error(H(424)),t),fr(r),t=oh(e,t,s,i);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ie=qt(e.firstChild),nt=t,Te=!0,yi=null,Ut=!0,i=su(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(Ji(),s===r){t=ni(e,t,i);break e}lt(e,t,s,i)}t=t.child}return t;case 26:return Ln(e,t),e===null?(i=Ef(t.type,null,t.pendingProps,null))?t.memoizedState=i:Te||(i=t.type,e=t.pendingProps,s=Xn(he.current).createElement(i),s[rt]=t,s[dt]=e,ot(s,i,e),it(s),t.stateNode=s):t.memoizedState=Ef(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ne(t),e===null&&Te&&(s=t.stateNode=bf(t.type,t.pendingProps,he.current),nt=t,Ut=!0,r=Ie,Hi(t.type)?(fo=r,Ie=qt(s.firstChild)):Ie=r),lt(e,t,t.pendingProps.children,i),Ln(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Te&&((r=s=Ie)&&(s=lv(s,t.type,t.pendingProps,Ut),s!==null?(t.stateNode=s,nt=t,Ie=qt(s.firstChild),Ut=!1,r=!0):r=!1),r||bi(t)),ne(t),r=t.type,a=t.pendingProps,S=e!==null?e.memoizedProps:null,s=a.children,lo(r,a)?s=null:S!==null&&lo(r,S)&&(t.flags|=32),t.memoizedState!==null&&(r=al(e,t,C_,null,null,i),jr._currentValue=r),Ln(e,t),lt(e,t,s,i),t.child;case 6:return e===null&&Te&&((e=i=Ie)&&(i=ov(i,t.pendingProps,Ut),i!==null?(t.stateNode=i,nt=t,Ie=null,e=!0):e=!1),e||bi(t)),null;case 13:return ch(e,t,i);case 4:return M(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=ns(t,null,s,i):lt(e,t,s,i),t.child;case 11:return eh(e,t,t.type,t.pendingProps,i);case 7:return lt(e,t,t.pendingProps,i),t.child;case 8:return lt(e,t,t.pendingProps.children,i),t.child;case 12:return lt(e,t,t.pendingProps.children,i),t.child;case 10:return s=t.pendingProps,Ci(t,t.type,s.value),lt(e,t,s.children,i),t.child;case 9:return r=t.type._context,s=t.pendingProps.children,ts(t),r=at(r),s=s(r),t.flags|=1,lt(e,t,s,i),t.child;case 14:return th(e,t,t.type,t.pendingProps,i);case 15:return ih(e,t,t.type,t.pendingProps,i);case 19:return hh(e,t,i);case 31:return M_(e,t,i);case 22:return sh(e,t,i,t.pendingProps);case 24:return ts(t),s=at(Xe),e===null?(r=Za(),r===null&&(r=Ue,a=Xa(),r.pooledCache=a,a.refCount++,a!==null&&(r.pooledCacheLanes|=i),r=a),t.memoizedState={parent:s,cache:r},$a(t),Ci(t,Xe,r)):((e.lanes&i)!==0&&(Ja(e,t),Sr(t,null,null,i),pr()),r=e.memoizedState,a=t.memoizedState,r.parent!==s?(r={parent:s,cache:s},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),Ci(t,Xe,s)):(s=a.cache,Ci(t,Xe,s),s!==r.cache&&Fa(t,[Xe],i,!0))),lt(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(H(156,t.tag))}function ai(e){e.flags|=4}function Bl(e,t,i,s,r){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(r&335544128)===r)if(e.stateNode.complete)e.flags|=8192;else if(jh())e.flags|=8192;else throw rs=mn,Qa}else e.flags&=-16777217}function dh(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Rf(t))if(jh())e.flags|=8192;else throw rs=mn,Qa}function On(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Po():536870912,e.lanes|=t,Ks|=t)}function Ar(e,t){if(!Te)switch(e.tailMode){case"hidden":t=e.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function We(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,s=0;if(t)for(var r=e.child;r!==null;)i|=r.lanes|r.childLanes,s|=r.subtreeFlags&65011712,s|=r.flags&65011712,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)i|=r.lanes|r.childLanes,s|=r.subtreeFlags,s|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=s,e.childLanes=i,t}function k_(e,t,i){var s=t.pendingProps;switch(Wa(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return We(t),null;case 1:return We(t),null;case 3:return i=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),ii(Xe),oe(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Ms(t)?ai(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Ga())),We(t),null;case 26:var r=t.type,a=t.memoizedState;return e===null?(ai(t),a!==null?(We(t),dh(t,a)):(We(t),Bl(t,r,null,s,i))):a?a!==e.memoizedState?(ai(t),We(t),dh(t,a)):(We(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&ai(t),We(t),Bl(t,r,e,s,i)),null;case 27:if(_e(t),i=he.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&ai(t);else{if(!s){if(t.stateNode===null)throw Error(H(166));return We(t),null}e=G.current,Ms(t)?Pc(t):(e=bf(r,s,i),t.stateNode=e,ai(t))}return We(t),null;case 5:if(_e(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&ai(t);else{if(!s){if(t.stateNode===null)throw Error(H(166));return We(t),null}if(a=G.current,Ms(t))Pc(t);else{var S=Xn(he.current);switch(a){case 1:a=S.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:a=S.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":a=S.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":a=S.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":a=S.createElement("div"),a.innerHTML="<script><\/script>",a=a.removeChild(a.firstChild);break;case"select":a=typeof s.is=="string"?S.createElement("select",{is:s.is}):S.createElement("select"),s.multiple?a.multiple=!0:s.size&&(a.size=s.size);break;default:a=typeof s.is=="string"?S.createElement(r,{is:s.is}):S.createElement(r)}}a[rt]=t,a[dt]=s;e:for(S=t.child;S!==null;){if(S.tag===5||S.tag===6)a.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===t)break e;for(;S.sibling===null;){if(S.return===null||S.return===t)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}t.stateNode=a;e:switch(ot(a,r,s),r){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&ai(t)}}return We(t),Bl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&ai(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(H(166));if(e=he.current,Ms(t)){if(e=t.stateNode,i=t.memoizedProps,s=null,r=nt,r!==null)switch(r.tag){case 27:case 5:s=r.memoizedProps}e[rt]=t,e=!!(e.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||uf(e.nodeValue,i)),e||bi(t,!0)}else e=Xn(e).createTextNode(s),e[rt]=t,t.stateNode=e}return We(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(s=Ms(t),i!==null){if(e===null){if(!s)throw Error(H(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(H(557));e[rt]=t}else Ji(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;We(t),e=!1}else i=Ga(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(xt(t),t):(xt(t),null);if((t.flags&128)!==0)throw Error(H(558))}return We(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=Ms(t),s!==null&&s.dehydrated!==null){if(e===null){if(!r)throw Error(H(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(H(317));r[rt]=t}else Ji(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;We(t),r=!1}else r=Ga(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(xt(t),t):(xt(t),null)}return xt(t),(t.flags&128)!==0?(t.lanes=i,t):(i=s!==null,e=e!==null&&e.memoizedState!==null,i&&(s=t.child,r=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(r=s.alternate.memoizedState.cachePool.pool),a=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(a=s.memoizedState.cachePool.pool),a!==r&&(s.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),On(t,t.updateQueue),We(t),null);case 4:return oe(),e===null&&io(t.stateNode.containerInfo),We(t),null;case 10:return ii(t.type),We(t),null;case 19:if(T(Pe),s=t.memoizedState,s===null)return We(t),null;if(r=(t.flags&128)!==0,a=s.rendering,a===null)if(r)Ar(s,!1);else{if(Ye!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(a=yn(e),a!==null){for(t.flags|=128,Ar(s,!1),e=a.updateQueue,t.updateQueue=e,On(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)Ic(i,e),i=i.sibling;return N(Pe,Pe.current&1|2),Te&&ei(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&Je()>Un&&(t.flags|=128,r=!0,Ar(s,!1),t.lanes=4194304)}else{if(!r)if(e=yn(a),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,On(t,e),Ar(s,!0),s.tail===null&&s.tailMode==="hidden"&&!a.alternate&&!Te)return We(t),null}else 2*Je()-s.renderingStartTime>Un&&i!==536870912&&(t.flags|=128,r=!0,Ar(s,!1),t.lanes=4194304);s.isBackwards?(a.sibling=t.child,t.child=a):(e=s.last,e!==null?e.sibling=a:t.child=a,s.last=a)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Je(),e.sibling=null,i=Pe.current,N(Pe,r?i&1|2:i&1),Te&&ei(t,s.treeForkCount),e):(We(t),null);case 22:case 23:return xt(t),sl(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?(i&536870912)!==0&&(t.flags&128)===0&&(We(t),t.subtreeFlags&6&&(t.flags|=8192)):We(t),i=t.updateQueue,i!==null&&On(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==i&&(t.flags|=2048),e!==null&&T(is),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),ii(Xe),We(t),null;case 25:return null;case 30:return null}throw Error(H(156,t.tag))}function O_(e,t){switch(Wa(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ii(Xe),oe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return _e(t),null;case 31:if(t.memoizedState!==null){if(xt(t),t.alternate===null)throw Error(H(340));Ji()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(xt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(H(340));Ji()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return T(Pe),null;case 4:return oe(),null;case 10:return ii(t.type),null;case 22:case 23:return xt(t),sl(),e!==null&&T(is),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ii(Xe),null;case 25:return null;default:return null}}function _h(e,t){switch(Wa(t),t.tag){case 3:ii(Xe),oe();break;case 26:case 27:case 5:_e(t);break;case 4:oe();break;case 31:t.memoizedState!==null&&xt(t);break;case 13:xt(t);break;case 19:T(Pe);break;case 10:ii(t.type);break;case 22:case 23:xt(t),sl(),e!==null&&T(is);break;case 24:ii(Xe)}}function Dr(e,t){try{var i=t.updateQueue,s=i!==null?i.lastEffect:null;if(s!==null){var r=s.next;i=r;do{if((i.tag&e)===e){s=void 0;var a=i.create,S=i.inst;s=a(),S.destroy=s}i=i.next}while(i!==r)}}catch(R){Be(t,t.return,R)}}function Ti(e,t,i){try{var s=t.updateQueue,r=s!==null?s.lastEffect:null;if(r!==null){var a=r.next;s=a;do{if((s.tag&e)===e){var S=s.inst,R=S.destroy;if(R!==void 0){S.destroy=void 0,r=t;var j=i,Q=R;try{Q()}catch(ae){Be(r,j,ae)}}}s=s.next}while(s!==a)}}catch(ae){Be(t,t.return,ae)}}function vh(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{nu(t,i)}catch(s){Be(e,e.return,s)}}}function mh(e,t,i){i.props=ls(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(s){Be(e,t,s)}}function xr(e,t){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}typeof i=="function"?e.refCleanup=i(s):i.current=s}}catch(r){Be(e,t,r)}}function Xt(e,t){var i=e.ref,s=e.refCleanup;if(i!==null)if(typeof s=="function")try{s()}catch(r){Be(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(r){Be(e,t,r)}else i.current=null}function gh(e){var t=e.type,i=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&s.focus();break e;case"img":i.src?s.src=i.src:i.srcSet&&(s.srcset=i.srcSet)}}catch(r){Be(e,e.return,r)}}function Hl(e,t,i){try{var s=e.stateNode;tv(s,e.type,i,t),s[dt]=t}catch(r){Be(e,e.return,r)}}function ph(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Hi(e.type)||e.tag===4}function Nl(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ph(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&&Hi(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 zl(e,t,i){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,t):(t=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,t.appendChild(e),i=i._reactRootContainer,i!=null||t.onclick!==null||(t.onclick=Qt));else if(s!==4&&(s===27&&Hi(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(zl(e,t,i),e=e.sibling;e!==null;)zl(e,t,i),e=e.sibling}function Bn(e,t,i){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(s!==4&&(s===27&&Hi(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(Bn(e,t,i),e=e.sibling;e!==null;)Bn(e,t,i),e=e.sibling}function Sh(e){var t=e.stateNode,i=e.memoizedProps;try{for(var s=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);ot(t,s,i),t[rt]=e,t[dt]=i}catch(a){Be(e,e.return,a)}}var li=!1,Qe=!1,Ul=!1,yh=typeof WeakSet=="function"?WeakSet:Set,st=null;function B_(e,t){if(e=e.containerInfo,no=ta,e=kc(e),La(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var s=i.getSelection&&i.getSelection();if(s&&s.rangeCount!==0){i=s.anchorNode;var r=s.anchorOffset,a=s.focusNode;s=s.focusOffset;try{i.nodeType,a.nodeType}catch{i=null;break e}var S=0,R=-1,j=-1,Q=0,ae=0,ce=e,$=null;t:for(;;){for(var se;ce!==i||r!==0&&ce.nodeType!==3||(R=S+r),ce!==a||s!==0&&ce.nodeType!==3||(j=S+s),ce.nodeType===3&&(S+=ce.nodeValue.length),(se=ce.firstChild)!==null;)$=ce,ce=se;for(;;){if(ce===e)break t;if($===i&&++Q===r&&(R=S),$===a&&++ae===s&&(j=S),(se=ce.nextSibling)!==null)break;ce=$,$=ce.parentNode}ce=se}i=R===-1||j===-1?null:{start:R,end:j}}else i=null}i=i||{start:0,end:0}}else i=null;for(ao={focusedElem:e,selectionRange:i},ta=!1,st=t;st!==null;)if(t=st,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,st=e;else for(;st!==null;){switch(t=st,a=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(i=0;i<e.length;i++)r=e[i],r.ref.impl=r.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&a!==null){e=void 0,i=t,r=a.memoizedProps,a=a.memoizedState,s=i.stateNode;try{var ve=ls(i.type,r);e=s.getSnapshotBeforeUpdate(ve,a),s.__reactInternalSnapshotBeforeUpdate=e}catch(pe){Be(i,i.return,pe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)co(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":co(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(H(163))}if(e=t.sibling,e!==null){e.return=t.return,st=e;break}st=t.return}}function bh(e,t,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:ci(e,i),s&4&&Dr(5,i);break;case 1:if(ci(e,i),s&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(S){Be(i,i.return,S)}else{var r=ls(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(S){Be(i,i.return,S)}}s&64&&vh(i),s&512&&xr(i,i.return);break;case 3:if(ci(e,i),s&64&&(e=i.updateQueue,e!==null)){if(t=null,i.child!==null)switch(i.child.tag){case 27:case 5:t=i.child.stateNode;break;case 1:t=i.child.stateNode}try{nu(e,t)}catch(S){Be(i,i.return,S)}}break;case 27:t===null&&s&4&&Sh(i);case 26:case 5:ci(e,i),t===null&&s&4&&gh(i),s&512&&xr(i,i.return);break;case 12:ci(e,i);break;case 31:ci(e,i),s&4&&Eh(e,i);break;case 13:ci(e,i),s&4&&Ah(e,i),s&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=K_.bind(null,i),cv(e,i))));break;case 22:if(s=i.memoizedState!==null||li,!s){t=t!==null&&t.memoizedState!==null||Qe,r=li;var a=Qe;li=s,(Qe=t)&&!a?ui(e,i,(i.subtreeFlags&8772)!==0):ci(e,i),li=r,Qe=a}break;case 30:break;default:ci(e,i)}}function Ch(e){var t=e.alternate;t!==null&&(e.alternate=null,Ch(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&_a(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 Ke=null,vt=!1;function oi(e,t,i){for(i=i.child;i!==null;)wh(e,t,i),i=i.sibling}function wh(e,t,i){if(Ct&&typeof Ct.onCommitFiberUnmount=="function")try{Ct.onCommitFiberUnmount(Yi,i)}catch{}switch(i.tag){case 26:Qe||Xt(i,t),oi(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:Qe||Xt(i,t);var s=Ke,r=vt;Hi(i.type)&&(Ke=i.stateNode,vt=!1),oi(e,t,i),Nr(i.stateNode),Ke=s,vt=r;break;case 5:Qe||Xt(i,t);case 6:if(s=Ke,r=vt,Ke=null,oi(e,t,i),Ke=s,vt=r,Ke!==null)if(vt)try{(Ke.nodeType===9?Ke.body:Ke.nodeName==="HTML"?Ke.ownerDocument.body:Ke).removeChild(i.stateNode)}catch(a){Be(i,t,a)}else try{Ke.removeChild(i.stateNode)}catch(a){Be(i,t,a)}break;case 18:Ke!==null&&(vt?(e=Ke,mf(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Qs(e)):mf(Ke,i.stateNode));break;case 4:s=Ke,r=vt,Ke=i.stateNode.containerInfo,vt=!0,oi(e,t,i),Ke=s,vt=r;break;case 0:case 11:case 14:case 15:Ti(2,i,t),Qe||Ti(4,i,t),oi(e,t,i);break;case 1:Qe||(Xt(i,t),s=i.stateNode,typeof s.componentWillUnmount=="function"&&mh(i,t,s)),oi(e,t,i);break;case 21:oi(e,t,i);break;case 22:Qe=(s=Qe)||i.memoizedState!==null,oi(e,t,i),Qe=s;break;default:oi(e,t,i)}}function Eh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Qs(e)}catch(i){Be(t,t.return,i)}}}function Ah(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Qs(e)}catch(i){Be(t,t.return,i)}}function H_(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new yh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new yh),t;default:throw Error(H(435,e.tag))}}function Hn(e,t){var i=H_(e);t.forEach(function(s){if(!i.has(s)){i.add(s);var r=G_.bind(null,e,s);s.then(r,r)}})}function mt(e,t){var i=t.deletions;if(i!==null)for(var s=0;s<i.length;s++){var r=i[s],a=e,S=t,R=S;e:for(;R!==null;){switch(R.tag){case 27:if(Hi(R.type)){Ke=R.stateNode,vt=!1;break e}break;case 5:Ke=R.stateNode,vt=!1;break e;case 3:case 4:Ke=R.stateNode.containerInfo,vt=!0;break e}R=R.return}if(Ke===null)throw Error(H(160));wh(a,S,r),Ke=null,vt=!1,a=r.alternate,a!==null&&(a.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Dh(t,e),t=t.sibling}var Gt=null;function Dh(e,t){var i=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:mt(t,e),gt(e),s&4&&(Ti(3,e,e.return),Dr(3,e),Ti(5,e,e.return));break;case 1:mt(t,e),gt(e),s&512&&(Qe||i===null||Xt(i,i.return)),s&64&&li&&(e=e.updateQueue,e!==null&&(s=e.callbacks,s!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?s:i.concat(s))));break;case 26:var r=Gt;if(mt(t,e),gt(e),s&512&&(Qe||i===null||Xt(i,i.return)),s&4){var a=i!==null?i.memoizedState:null;if(s=e.memoizedState,i===null)if(s===null)if(e.stateNode===null){e:{s=e.type,i=e.memoizedProps,r=r.ownerDocument||r;t:switch(s){case"title":a=r.getElementsByTagName("title")[0],(!a||a[er]||a[rt]||a.namespaceURI==="http://www.w3.org/2000/svg"||a.hasAttribute("itemprop"))&&(a=r.createElement(s),r.head.insertBefore(a,r.querySelector("head > title"))),ot(a,s,i),a[rt]=e,it(a),s=a;break e;case"link":var S=xf("link","href",r).get(s+(i.href||""));if(S){for(var R=0;R<S.length;R++)if(a=S[R],a.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&a.getAttribute("rel")===(i.rel==null?null:i.rel)&&a.getAttribute("title")===(i.title==null?null:i.title)&&a.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){S.splice(R,1);break t}}a=r.createElement(s),ot(a,s,i),r.head.appendChild(a);break;case"meta":if(S=xf("meta","content",r).get(s+(i.content||""))){for(R=0;R<S.length;R++)if(a=S[R],a.getAttribute("content")===(i.content==null?null:""+i.content)&&a.getAttribute("name")===(i.name==null?null:i.name)&&a.getAttribute("property")===(i.property==null?null:i.property)&&a.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&a.getAttribute("charset")===(i.charSet==null?null:i.charSet)){S.splice(R,1);break t}}a=r.createElement(s),ot(a,s,i),r.head.appendChild(a);break;default:throw Error(H(468,s))}a[rt]=e,it(a),s=a}e.stateNode=s}else Tf(r,e.type,e.stateNode);else e.stateNode=Df(r,s,e.memoizedProps);else a!==s?(a===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):a.count--,s===null?Tf(r,e.type,e.stateNode):Df(r,s,e.memoizedProps)):s===null&&e.stateNode!==null&&Hl(e,e.memoizedProps,i.memoizedProps)}break;case 27:mt(t,e),gt(e),s&512&&(Qe||i===null||Xt(i,i.return)),i!==null&&s&4&&Hl(e,e.memoizedProps,i.memoizedProps);break;case 5:if(mt(t,e),gt(e),s&512&&(Qe||i===null||Xt(i,i.return)),e.flags&32){r=e.stateNode;try{ys(r,"")}catch(ve){Be(e,e.return,ve)}}s&4&&e.stateNode!=null&&(r=e.memoizedProps,Hl(e,r,i!==null?i.memoizedProps:r)),s&1024&&(Ul=!0);break;case 6:if(mt(t,e),gt(e),s&4){if(e.stateNode===null)throw Error(H(162));s=e.memoizedProps,i=e.stateNode;try{i.nodeValue=s}catch(ve){Be(e,e.return,ve)}}break;case 3:if(Qn=null,r=Gt,Gt=Vn(t.containerInfo),mt(t,e),Gt=r,gt(e),s&4&&i!==null&&i.memoizedState.isDehydrated)try{Qs(t.containerInfo)}catch(ve){Be(e,e.return,ve)}Ul&&(Ul=!1,xh(e));break;case 4:s=Gt,Gt=Vn(e.stateNode.containerInfo),mt(t,e),gt(e),Gt=s;break;case 12:mt(t,e),gt(e);break;case 31:mt(t,e),gt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Hn(e,s)));break;case 13:mt(t,e),gt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(zn=Je()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Hn(e,s)));break;case 22:r=e.memoizedState!==null;var j=i!==null&&i.memoizedState!==null,Q=li,ae=Qe;if(li=Q||r,Qe=ae||j,mt(t,e),Qe=ae,li=Q,gt(e),s&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(i===null||j||li||Qe||os(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){j=i=t;try{if(a=j.stateNode,r)S=a.style,typeof S.setProperty=="function"?S.setProperty("display","none","important"):S.display="none";else{R=j.stateNode;var ce=j.memoizedProps.style,$=ce!=null&&ce.hasOwnProperty("display")?ce.display:null;R.style.display=$==null||typeof $=="boolean"?"":(""+$).trim()}}catch(ve){Be(j,j.return,ve)}}}else if(t.tag===6){if(i===null){j=t;try{j.stateNode.nodeValue=r?"":j.memoizedProps}catch(ve){Be(j,j.return,ve)}}}else if(t.tag===18){if(i===null){j=t;try{var se=j.stateNode;r?gf(se,!0):gf(j.stateNode,!1)}catch(ve){Be(j,j.return,ve)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;i===t&&(i=null),t=t.return}i===t&&(i=null),t.sibling.return=t.return,t=t.sibling}s&4&&(s=e.updateQueue,s!==null&&(i=s.retryQueue,i!==null&&(s.retryQueue=null,Hn(e,i))));break;case 19:mt(t,e),gt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Hn(e,s)));break;case 30:break;case 21:break;default:mt(t,e),gt(e)}}function gt(e){var t=e.flags;if(t&2){try{for(var i,s=e.return;s!==null;){if(ph(s)){i=s;break}s=s.return}if(i==null)throw Error(H(160));switch(i.tag){case 27:var r=i.stateNode,a=Nl(e);Bn(e,a,r);break;case 5:var S=i.stateNode;i.flags&32&&(ys(S,""),i.flags&=-33);var R=Nl(e);Bn(e,R,S);break;case 3:case 4:var j=i.stateNode.containerInfo,Q=Nl(e);zl(e,Q,j);break;default:throw Error(H(161))}}catch(ae){Be(e,e.return,ae)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function xh(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;xh(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ci(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)bh(e,t.alternate,t),t=t.sibling}function os(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ti(4,t,t.return),os(t);break;case 1:Xt(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&mh(t,t.return,i),os(t);break;case 27:Nr(t.stateNode);case 26:case 5:Xt(t,t.return),os(t);break;case 22:t.memoizedState===null&&os(t);break;case 30:os(t);break;default:os(t)}e=e.sibling}}function ui(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,r=e,a=t,S=a.flags;switch(a.tag){case 0:case 11:case 15:ui(r,a,i),Dr(4,a);break;case 1:if(ui(r,a,i),s=a,r=s.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(Q){Be(s,s.return,Q)}if(s=a,r=s.updateQueue,r!==null){var R=s.stateNode;try{var j=r.shared.hiddenCallbacks;if(j!==null)for(r.shared.hiddenCallbacks=null,r=0;r<j.length;r++)ru(j[r],R)}catch(Q){Be(s,s.return,Q)}}i&&S&64&&vh(a),xr(a,a.return);break;case 27:Sh(a);case 26:case 5:ui(r,a,i),i&&s===null&&S&4&&gh(a),xr(a,a.return);break;case 12:ui(r,a,i);break;case 31:ui(r,a,i),i&&S&4&&Eh(r,a);break;case 13:ui(r,a,i),i&&S&4&&Ah(r,a);break;case 22:a.memoizedState===null&&ui(r,a,i),xr(a,a.return);break;case 30:break;default:ui(r,a,i)}t=t.sibling}}function jl(e,t){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==i&&(e!=null&&e.refCount++,i!=null&&dr(i))}function ql(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&dr(e))}function Yt(e,t,i,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Th(e,t,i,s),t=t.sibling}function Th(e,t,i,s){var r=t.flags;switch(t.tag){case 0:case 11:case 15:Yt(e,t,i,s),r&2048&&Dr(9,t);break;case 1:Yt(e,t,i,s);break;case 3:Yt(e,t,i,s),r&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&dr(e)));break;case 12:if(r&2048){Yt(e,t,i,s),e=t.stateNode;try{var a=t.memoizedProps,S=a.id,R=a.onPostCommit;typeof R=="function"&&R(S,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(j){Be(t,t.return,j)}}else Yt(e,t,i,s);break;case 31:Yt(e,t,i,s);break;case 13:Yt(e,t,i,s);break;case 23:break;case 22:a=t.stateNode,S=t.alternate,t.memoizedState!==null?a._visibility&2?Yt(e,t,i,s):Tr(e,t):a._visibility&2?Yt(e,t,i,s):(a._visibility|=2,qs(e,t,i,s,(t.subtreeFlags&10256)!==0||!1)),r&2048&&jl(S,t);break;case 24:Yt(e,t,i,s),r&2048&&ql(t.alternate,t);break;default:Yt(e,t,i,s)}}function qs(e,t,i,s,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var a=e,S=t,R=i,j=s,Q=S.flags;switch(S.tag){case 0:case 11:case 15:qs(a,S,R,j,r),Dr(8,S);break;case 23:break;case 22:var ae=S.stateNode;S.memoizedState!==null?ae._visibility&2?qs(a,S,R,j,r):Tr(a,S):(ae._visibility|=2,qs(a,S,R,j,r)),r&&Q&2048&&jl(S.alternate,S);break;case 24:qs(a,S,R,j,r),r&&Q&2048&&ql(S.alternate,S);break;default:qs(a,S,R,j,r)}t=t.sibling}}function Tr(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,s=t,r=s.flags;switch(s.tag){case 22:Tr(i,s),r&2048&&jl(s.alternate,s);break;case 24:Tr(i,s),r&2048&&ql(s.alternate,s);break;default:Tr(i,s)}t=t.sibling}}var Rr=8192;function Is(e,t,i){if(e.subtreeFlags&Rr)for(e=e.child;e!==null;)Rh(e,t,i),e=e.sibling}function Rh(e,t,i){switch(e.tag){case 26:Is(e,t,i),e.flags&Rr&&e.memoizedState!==null&&bv(i,Gt,e.memoizedState,e.memoizedProps);break;case 5:Is(e,t,i);break;case 3:case 4:var s=Gt;Gt=Vn(e.stateNode.containerInfo),Is(e,t,i),Gt=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=Rr,Rr=16777216,Is(e,t,i),Rr=s):Is(e,t,i));break;default:Is(e,t,i)}}function Mh(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 Mr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];st=s,kh(s,e)}Mh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Lh(e),e=e.sibling}function Lh(e){switch(e.tag){case 0:case 11:case 15:Mr(e),e.flags&2048&&Ti(9,e,e.return);break;case 3:Mr(e);break;case 12:Mr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Nn(e)):Mr(e);break;default:Mr(e)}}function Nn(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];st=s,kh(s,e)}Mh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ti(8,t,t.return),Nn(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,Nn(t));break;default:Nn(t)}e=e.sibling}}function kh(e,t){for(;st!==null;){var i=st;switch(i.tag){case 0:case 11:case 15:Ti(8,i,t);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var s=i.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:dr(i.memoizedState.cache)}if(s=i.child,s!==null)s.return=i,st=s;else e:for(i=e;st!==null;){s=st;var r=s.sibling,a=s.return;if(Ch(s),s===i){st=null;break e}if(r!==null){r.return=a,st=r;break e}st=a}}}var N_={getCacheForType:function(e){var t=at(Xe),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return at(Xe).controller.signal}},z_=typeof WeakMap=="function"?WeakMap:Map,Le=0,Ue=null,Ee=null,De=0,Oe=0,Tt=null,Ri=!1,Ws=!1,Il=!1,hi=0,Ye=0,Mi=0,cs=0,Wl=0,Rt=0,Ks=0,Lr=null,pt=null,Kl=!1,zn=0,Oh=0,Un=1/0,jn=null,Li=null,et=0,ki=null,Gs=null,fi=0,Gl=0,Yl=null,Bh=null,kr=0,Pl=null;function Mt(){return(Le&2)!==0&&De!==0?De&-De:I.T!==null?$l():Zo()}function Hh(){if(Rt===0)if((De&536870912)===0||Te){var e=Pr;Pr<<=1,(Pr&3932160)===0&&(Pr=262144),Rt=e}else Rt=536870912;return e=Dt.current,e!==null&&(e.flags|=32),Rt}function St(e,t,i){(e===Ue&&(Oe===2||Oe===9)||e.cancelPendingCommit!==null)&&(Ys(e,0),Oi(e,De,Rt,!1)),Js(e,i),((Le&2)===0||e!==Ue)&&(e===Ue&&((Le&2)===0&&(cs|=i),Ye===4&&Oi(e,De,Rt,!1)),Vt(e))}function Nh(e,t,i){if((Le&6)!==0)throw Error(H(327));var s=!i&&(t&127)===0&&(t&e.expiredLanes)===0||$s(e,t),r=s?q_(e,t):Xl(e,t,!0),a=s;do{if(r===0){Ws&&!s&&Oi(e,t,0,!1);break}else{if(i=e.current.alternate,a&&!U_(i)){r=Xl(e,t,!1),a=!1;continue}if(r===2){if(a=t,e.errorRecoveryDisabledLanes&a)var S=0;else S=e.pendingLanes&-536870913,S=S!==0?S:S&536870912?536870912:0;if(S!==0){t=S;e:{var R=e;r=Lr;var j=R.current.memoizedState.isDehydrated;if(j&&(Ys(R,S).flags|=256),S=Xl(R,S,!1),S!==2){if(Il&&!j){R.errorRecoveryDisabledLanes|=a,cs|=a,r=4;break e}a=pt,pt=r,a!==null&&(pt===null?pt=a:pt.push.apply(pt,a))}r=S}if(a=!1,r!==2)continue}}if(r===1){Ys(e,0),Oi(e,t,0,!0);break}e:{switch(s=e,a=r,a){case 0:case 1:throw Error(H(345));case 4:if((t&4194048)!==t)break;case 6:Oi(s,t,Rt,!Ri);break e;case 2:pt=null;break;case 3:case 5:break;default:throw Error(H(329))}if((t&62914560)===t&&(r=zn+300-Je(),10<r)){if(Oi(s,t,Rt,!Ri),Xr(s,0,!0)!==0)break e;fi=t,s.timeoutHandle=_f(zh.bind(null,s,i,pt,jn,Kl,t,Rt,cs,Ks,Ri,a,"Throttled",-0,0),r);break e}zh(s,i,pt,jn,Kl,t,Rt,cs,Ks,Ri,a,null,-0,0)}}break}while(!0);Vt(e)}function zh(e,t,i,s,r,a,S,R,j,Q,ae,ce,$,se){if(e.timeoutHandle=-1,ce=t.subtreeFlags,ce&8192||(ce&16785408)===16785408){ce={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Qt},Rh(t,a,ce);var ve=(a&62914560)===a?zn-Je():(a&4194048)===a?Oh-Je():0;if(ve=Cv(ce,ve),ve!==null){fi=a,e.cancelPendingCommit=ve(Yh.bind(null,e,t,a,i,s,r,S,R,j,ae,ce,null,$,se)),Oi(e,a,S,!Q);return}}Yh(e,t,a,i,s,r,S,R,j)}function U_(e){for(var t=e;;){var i=t.tag;if((i===0||i===11||i===15)&&t.flags&16384&&(i=t.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var s=0;s<i.length;s++){var r=i[s],a=r.getSnapshot;r=r.value;try{if(!Et(a(),r))return!1}catch{return!1}}if(i=t.child,t.subtreeFlags&16384&&i!==null)i.return=t,t=i;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 Oi(e,t,i,s){t&=~Wl,t&=~cs,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var r=t;0<r;){var a=31-wt(r),S=1<<a;s[a]=-1,r&=~S}i!==0&&Fo(e,i,t)}function qn(){return(Le&6)===0?(Or(0),!1):!0}function Fl(){if(Ee!==null){if(Oe===0)var e=Ee.return;else e=Ee,ti=es=null,cl(e),Hs=null,vr=0,e=Ee;for(;e!==null;)_h(e.alternate,e),e=e.return;Ee=null}}function Ys(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,rv(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),fi=0,Fl(),Ue=e,Ee=i=Jt(e.current,null),De=t,Oe=0,Tt=null,Ri=!1,Ws=$s(e,t),Il=!1,Ks=Rt=Wl=cs=Mi=Ye=0,pt=Lr=null,Kl=!1,(t&8)!==0&&(t|=t&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=t;0<s;){var r=31-wt(s),a=1<<r;t|=e[r],s&=~a}return hi=t,ln(),i}function Uh(e,t){be=null,I.H=wr,t===Bs||t===vn?(t=eu(),Oe=3):t===Qa?(t=eu(),Oe=4):Oe=t===Al?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Tt=t,Ee===null&&(Ye=1,Rn(e,Ht(t,e.current)))}function jh(){var e=Dt.current;return e===null?!0:(De&4194048)===De?jt===null:(De&62914560)===De||(De&536870912)!==0?e===jt:!1}function qh(){var e=I.H;return I.H=wr,e===null?wr:e}function Ih(){var e=I.A;return I.A=N_,e}function In(){Ye=4,Ri||(De&4194048)!==De&&Dt.current!==null||(Ws=!0),(Mi&134217727)===0&&(cs&134217727)===0||Ue===null||Oi(Ue,De,Rt,!1)}function Xl(e,t,i){var s=Le;Le|=2;var r=qh(),a=Ih();(Ue!==e||De!==t)&&(jn=null,Ys(e,t)),t=!1;var S=Ye;e:do try{if(Oe!==0&&Ee!==null){var R=Ee,j=Tt;switch(Oe){case 8:Fl(),S=6;break e;case 3:case 2:case 9:case 6:Dt.current===null&&(t=!0);var Q=Oe;if(Oe=0,Tt=null,Ps(e,R,j,Q),i&&Ws){S=0;break e}break;default:Q=Oe,Oe=0,Tt=null,Ps(e,R,j,Q)}}j_(),S=Ye;break}catch(ae){Uh(e,ae)}while(!0);return t&&e.shellSuspendCounter++,ti=es=null,Le=s,I.H=r,I.A=a,Ee===null&&(Ue=null,De=0,ln()),S}function j_(){for(;Ee!==null;)Wh(Ee)}function q_(e,t){var i=Le;Le|=2;var s=qh(),r=Ih();Ue!==e||De!==t?(jn=null,Un=Je()+500,Ys(e,t)):Ws=$s(e,t);e:do try{if(Oe!==0&&Ee!==null){t=Ee;var a=Tt;t:switch(Oe){case 1:Oe=0,Tt=null,Ps(e,t,a,1);break;case 2:case 9:if($c(a)){Oe=0,Tt=null,Kh(t);break}t=function(){Oe!==2&&Oe!==9||Ue!==e||(Oe=7),Vt(e)},a.then(t,t);break e;case 3:Oe=7;break e;case 4:Oe=5;break e;case 7:$c(a)?(Oe=0,Tt=null,Kh(t)):(Oe=0,Tt=null,Ps(e,t,a,7));break;case 5:var S=null;switch(Ee.tag){case 26:S=Ee.memoizedState;case 5:case 27:var R=Ee;if(S?Rf(S):R.stateNode.complete){Oe=0,Tt=null;var j=R.sibling;if(j!==null)Ee=j;else{var Q=R.return;Q!==null?(Ee=Q,Wn(Q)):Ee=null}break t}}Oe=0,Tt=null,Ps(e,t,a,5);break;case 6:Oe=0,Tt=null,Ps(e,t,a,6);break;case 8:Fl(),Ye=6;break e;default:throw Error(H(462))}}I_();break}catch(ae){Uh(e,ae)}while(!0);return ti=es=null,I.H=s,I.A=r,Le=i,Ee!==null?0:(Ue=null,De=0,ln(),Ye)}function I_(){for(;Ee!==null&&!hs();)Wh(Ee)}function Wh(e){var t=fh(e.alternate,e,hi);e.memoizedProps=e.pendingProps,t===null?Wn(e):Ee=t}function Kh(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=ah(i,t,t.pendingProps,t.type,void 0,De);break;case 11:t=ah(i,t,t.pendingProps,t.type.render,t.ref,De);break;case 5:cl(t);default:_h(i,t),t=Ee=Ic(t,hi),t=fh(i,t,hi)}e.memoizedProps=e.pendingProps,t===null?Wn(e):Ee=t}function Ps(e,t,i,s){ti=es=null,cl(t),Hs=null,vr=0;var r=t.return;try{if(R_(e,r,t,i,De)){Ye=1,Rn(e,Ht(i,e.current)),Ee=null;return}}catch(a){if(r!==null)throw Ee=r,a;Ye=1,Rn(e,Ht(i,e.current)),Ee=null;return}t.flags&32768?(Te||s===1?e=!0:Ws||(De&536870912)!==0?e=!1:(Ri=e=!0,(s===2||s===9||s===3||s===6)&&(s=Dt.current,s!==null&&s.tag===13&&(s.flags|=16384))),Gh(t,e)):Wn(t)}function Wn(e){var t=e;do{if((t.flags&32768)!==0){Gh(t,Ri);return}e=t.return;var i=k_(t.alternate,t,hi);if(i!==null){Ee=i;return}if(t=t.sibling,t!==null){Ee=t;return}Ee=t=e}while(t!==null);Ye===0&&(Ye=5)}function Gh(e,t){do{var i=O_(e.alternate,e);if(i!==null){i.flags&=32767,Ee=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){Ee=e;return}Ee=e=i}while(e!==null);Ye=6,Ee=null}function Yh(e,t,i,s,r,a,S,R,j){e.cancelPendingCommit=null;do Kn();while(et!==0);if((Le&6)!==0)throw Error(H(327));if(t!==null){if(t===e.current)throw Error(H(177));if(a=t.lanes|t.childLanes,a|=Na,yd(e,i,a,S,R,j),e===Ue&&(Ee=Ue=null,De=0),Gs=t,ki=e,fi=i,Gl=a,Yl=r,Bh=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Y_(bt,function(){return Zh(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=I.T,I.T=null,r=F.p,F.p=2,S=Le,Le|=4;try{B_(e,t,i)}finally{Le=S,F.p=r,I.T=s}}et=1,Ph(),Fh(),Xh()}}function Ph(){if(et===1){et=0;var e=ki,t=Gs,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=I.T,I.T=null;var s=F.p;F.p=2;var r=Le;Le|=4;try{Dh(t,e);var a=ao,S=kc(e.containerInfo),R=a.focusedElem,j=a.selectionRange;if(S!==R&&R&&R.ownerDocument&&Lc(R.ownerDocument.documentElement,R)){if(j!==null&&La(R)){var Q=j.start,ae=j.end;if(ae===void 0&&(ae=Q),"selectionStart"in R)R.selectionStart=Q,R.selectionEnd=Math.min(ae,R.value.length);else{var ce=R.ownerDocument||document,$=ce&&ce.defaultView||window;if($.getSelection){var se=$.getSelection(),ve=R.textContent.length,pe=Math.min(j.start,ve),ze=j.end===void 0?pe:Math.min(j.end,ve);!se.extend&&pe>ze&&(S=ze,ze=pe,pe=S);var V=Mc(R,pe),W=Mc(R,ze);if(V&&W&&(se.rangeCount!==1||se.anchorNode!==V.node||se.anchorOffset!==V.offset||se.focusNode!==W.node||se.focusOffset!==W.offset)){var Z=ce.createRange();Z.setStart(V.node,V.offset),se.removeAllRanges(),pe>ze?(se.addRange(Z),se.extend(W.node,W.offset)):(Z.setEnd(W.node,W.offset),se.addRange(Z))}}}}for(ce=[],se=R;se=se.parentNode;)se.nodeType===1&&ce.push({element:se,left:se.scrollLeft,top:se.scrollTop});for(typeof R.focus=="function"&&R.focus(),R=0;R<ce.length;R++){var le=ce[R];le.element.scrollLeft=le.left,le.element.scrollTop=le.top}}ta=!!no,ao=no=null}finally{Le=r,F.p=s,I.T=i}}e.current=t,et=2}}function Fh(){if(et===2){et=0;var e=ki,t=Gs,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=I.T,I.T=null;var s=F.p;F.p=2;var r=Le;Le|=4;try{bh(e,t.alternate,t)}finally{Le=r,F.p=s,I.T=i}}et=3}}function Xh(){if(et===4||et===3){et=0,ft();var e=ki,t=Gs,i=fi,s=Bh;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?et=5:(et=0,Gs=ki=null,Vh(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(Li=null),fa(i),t=t.stateNode,Ct&&typeof Ct.onCommitFiberRoot=="function")try{Ct.onCommitFiberRoot(Yi,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=I.T,r=F.p,F.p=2,I.T=null;try{for(var a=e.onRecoverableError,S=0;S<s.length;S++){var R=s[S];a(R.value,{componentStack:R.stack})}}finally{I.T=t,F.p=r}}(fi&3)!==0&&Kn(),Vt(e),r=e.pendingLanes,(i&261930)!==0&&(r&42)!==0?e===Pl?kr++:(kr=0,Pl=e):kr=0,Or(0)}}function Vh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,dr(t)))}function Kn(){return Ph(),Fh(),Xh(),Zh()}function Zh(){if(et!==5)return!1;var e=ki,t=Gl;Gl=0;var i=fa(fi),s=I.T,r=F.p;try{F.p=32>i?32:i,I.T=null,i=Yl,Yl=null;var a=ki,S=fi;if(et=0,Gs=ki=null,fi=0,(Le&6)!==0)throw Error(H(331));var R=Le;if(Le|=4,Lh(a.current),Th(a,a.current,S,i),Le=R,Or(0,!1),Ct&&typeof Ct.onPostCommitFiberRoot=="function")try{Ct.onPostCommitFiberRoot(Yi,a)}catch{}return!0}finally{F.p=r,I.T=s,Vh(e,t)}}function Qh(e,t,i){t=Ht(i,t),t=El(e.stateNode,t,2),e=Ai(e,t,2),e!==null&&(Js(e,2),Vt(e))}function Be(e,t,i){if(e.tag===3)Qh(e,e,i);else for(;t!==null;){if(t.tag===3){Qh(t,e,i);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Li===null||!Li.has(s))){e=Ht(i,e),i=$u(2),s=Ai(t,i,2),s!==null&&(Ju(i,s,t,e),Js(s,2),Vt(s));break}}t=t.return}}function Vl(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new z_;var r=new Set;s.set(t,r)}else r=s.get(t),r===void 0&&(r=new Set,s.set(t,r));r.has(i)||(Il=!0,r.add(i),e=W_.bind(null,e,t,i),t.then(e,e))}function W_(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,Ue===e&&(De&i)===i&&(Ye===4||Ye===3&&(De&62914560)===De&&300>Je()-zn?(Le&2)===0&&Ys(e,0):Wl|=i,Ks===De&&(Ks=0)),Vt(e)}function $h(e,t){t===0&&(t=Po()),e=Qi(e,t),e!==null&&(Js(e,t),Vt(e))}function K_(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),$h(e,i)}function G_(e,t){var i=0;switch(e.tag){case 31:case 13:var s=e.stateNode,r=e.memoizedState;r!==null&&(i=r.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(H(314))}s!==null&&s.delete(t),$h(e,i)}function Y_(e,t){return Wi(e,t)}var Gn=null,Fs=null,Zl=!1,Yn=!1,Ql=!1,Bi=0;function Vt(e){e!==Fs&&e.next===null&&(Fs===null?Gn=Fs=e:Fs=Fs.next=e),Yn=!0,Zl||(Zl=!0,F_())}function Or(e,t){if(!Ql&&Yn){Ql=!0;do for(var i=!1,s=Gn;s!==null;){if(e!==0){var r=s.pendingLanes;if(r===0)var a=0;else{var S=s.suspendedLanes,R=s.pingedLanes;a=(1<<31-wt(42|e)+1)-1,a&=r&~(S&~R),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(i=!0,sf(s,a))}else a=De,a=Xr(s,s===Ue?a:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(a&3)===0||$s(s,a)||(i=!0,sf(s,a));s=s.next}while(i);Ql=!1}}function P_(){Jh()}function Jh(){Yn=Zl=!1;var e=0;Bi!==0&&sv()&&(e=Bi);for(var t=Je(),i=null,s=Gn;s!==null;){var r=s.next,a=ef(s,t);a===0?(s.next=null,i===null?Gn=r:i.next=r,r===null&&(Fs=i)):(i=s,(e!==0||(a&3)!==0)&&(Yn=!0)),s=r}et!==0&&et!==5||Or(e),Bi!==0&&(Bi=0)}function ef(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,r=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var S=31-wt(a),R=1<<S,j=r[S];j===-1?((R&i)===0||(R&s)!==0)&&(r[S]=Sd(R,t)):j<=t&&(e.expiredLanes|=R),a&=~R}if(t=Ue,i=De,i=Xr(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,i===0||e===t&&(Oe===2||Oe===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&Ki(s),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||$s(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(s!==null&&Ki(s),fa(i)){case 2:case 8:i=fs;break;case 32:i=bt;break;case 268435456:i=Wt;break;default:i=bt}return s=tf.bind(null,e),i=Wi(i,s),e.callbackPriority=t,e.callbackNode=i,t}return s!==null&&s!==null&&Ki(s),e.callbackPriority=2,e.callbackNode=null,2}function tf(e,t){if(et!==0&&et!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(Kn()&&e.callbackNode!==i)return null;var s=De;return s=Xr(e,e===Ue?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Nh(e,s,t),ef(e,Je()),e.callbackNode!=null&&e.callbackNode===i?tf.bind(null,e):null)}function sf(e,t){if(Kn())return null;Nh(e,t,!0)}function F_(){nv(function(){(Le&6)!==0?Wi(vi,P_):Jh()})}function $l(){if(Bi===0){var e=ks;e===0&&(e=Yr,Yr<<=1,(Yr&261888)===0&&(Yr=256)),Bi=e}return Bi}function rf(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:$r(""+e)}function nf(e,t){var i=t.ownerDocument.createElement("input");return i.name=t.name,i.value=t.value,e.id&&i.setAttribute("form",e.id),t.parentNode.insertBefore(i,t),e=new FormData(e),i.parentNode.removeChild(i),e}function X_(e,t,i,s,r){if(t==="submit"&&i&&i.stateNode===r){var a=rf((r[dt]||null).action),S=s.submitter;S&&(t=(t=S[dt]||null)?rf(t.formAction):S.getAttribute("formAction"),t!==null&&(a=t,S=null));var R=new sn("action","action",null,s,r);e.push({event:R,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Bi!==0){var j=S?nf(r,S):new FormData(r);pl(i,{pending:!0,data:j,method:r.method,action:a},null,j)}}else typeof a=="function"&&(R.preventDefault(),j=S?nf(r,S):new FormData(r),pl(i,{pending:!0,data:j,method:r.method,action:a},a,j))},currentTarget:r}]})}}for(var Jl=0;Jl<Ha.length;Jl++){var eo=Ha[Jl],V_=eo.toLowerCase(),Z_=eo[0].toUpperCase()+eo.slice(1);Kt(V_,"on"+Z_)}Kt(Hc,"onAnimationEnd"),Kt(Nc,"onAnimationIteration"),Kt(zc,"onAnimationStart"),Kt("dblclick","onDoubleClick"),Kt("focusin","onFocus"),Kt("focusout","onBlur"),Kt(f_,"onTransitionRun"),Kt(d_,"onTransitionStart"),Kt(__,"onTransitionCancel"),Kt(Uc,"onTransitionEnd"),ps("onMouseEnter",["mouseout","mouseover"]),ps("onMouseLeave",["mouseout","mouseover"]),ps("onPointerEnter",["pointerout","pointerover"]),ps("onPointerLeave",["pointerout","pointerover"]),Fi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Fi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Fi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Fi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Fi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Fi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Br="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(" "),Q_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Br));function af(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var s=e[i],r=s.event;s=s.listeners;e:{var a=void 0;if(t)for(var S=s.length-1;0<=S;S--){var R=s[S],j=R.instance,Q=R.currentTarget;if(R=R.listener,j!==a&&r.isPropagationStopped())break e;a=R,r.currentTarget=Q;try{a(r)}catch(ae){an(ae)}r.currentTarget=null,a=j}else for(S=0;S<s.length;S++){if(R=s[S],j=R.instance,Q=R.currentTarget,R=R.listener,j!==a&&r.isPropagationStopped())break e;a=R,r.currentTarget=Q;try{a(r)}catch(ae){an(ae)}r.currentTarget=null,a=j}}}}function Ae(e,t){var i=t[da];i===void 0&&(i=t[da]=new Set);var s=e+"__bubble";i.has(s)||(lf(t,e,2,!1),i.add(s))}function to(e,t,i){var s=0;t&&(s|=4),lf(i,e,s,t)}var Pn="_reactListening"+Math.random().toString(36).slice(2);function io(e){if(!e[Pn]){e[Pn]=!0,Jo.forEach(function(i){i!=="selectionchange"&&(Q_.has(i)||to(i,!1,e),to(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Pn]||(t[Pn]=!0,to("selectionchange",!1,t))}}function lf(e,t,i,s){switch(Nf(t)){case 2:var r=Av;break;case 8:r=Dv;break;default:r=po}i=r.bind(null,t,i,e),r=void 0,!Ca||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),s?r!==void 0?e.addEventListener(t,i,{capture:!0,passive:r}):e.addEventListener(t,i,!0):r!==void 0?e.addEventListener(t,i,{passive:r}):e.addEventListener(t,i,!1)}function so(e,t,i,s,r){var a=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var S=s.tag;if(S===3||S===4){var R=s.stateNode.containerInfo;if(R===r)break;if(S===4)for(S=s.return;S!==null;){var j=S.tag;if((j===3||j===4)&&S.stateNode.containerInfo===r)return;S=S.return}for(;R!==null;){if(S=vs(R),S===null)return;if(j=S.tag,j===5||j===6||j===26||j===27){s=a=S;continue e}R=R.parentNode}}s=s.return}hc(function(){var Q=a,ae=ya(i),ce=[];e:{var $=jc.get(e);if($!==void 0){var se=sn,ve=e;switch(e){case"keypress":if(en(i)===0)break e;case"keydown":case"keyup":se=Gd;break;case"focusin":ve="focus",se=Da;break;case"focusout":ve="blur",se=Da;break;case"beforeblur":case"afterblur":se=Da;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":se=_c;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":se=kd;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":se=Fd;break;case Hc:case Nc:case zc:se=Hd;break;case Uc:se=Vd;break;case"scroll":case"scrollend":se=Md;break;case"wheel":se=Qd;break;case"copy":case"cut":case"paste":se=zd;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":se=mc;break;case"toggle":case"beforetoggle":se=Jd}var pe=(t&4)!==0,ze=!pe&&(e==="scroll"||e==="scrollend"),V=pe?$!==null?$+"Capture":null:$;pe=[];for(var W=Q,Z;W!==null;){var le=W;if(Z=le.stateNode,le=le.tag,le!==5&&le!==26&&le!==27||Z===null||V===null||(le=ir(W,V),le!=null&&pe.push(Hr(W,le,Z))),ze)break;W=W.return}0<pe.length&&($=new se($,ve,null,i,ae),ce.push({event:$,listeners:pe}))}}if((t&7)===0){e:{if($=e==="mouseover"||e==="pointerover",se=e==="mouseout"||e==="pointerout",$&&i!==Sa&&(ve=i.relatedTarget||i.fromElement)&&(vs(ve)||ve[_s]))break e;if((se||$)&&($=ae.window===ae?ae:($=ae.ownerDocument)?$.defaultView||$.parentWindow:window,se?(ve=i.relatedTarget||i.toElement,se=Q,ve=ve?vs(ve):null,ve!==null&&(ze=ue(ve),pe=ve.tag,ve!==ze||pe!==5&&pe!==27&&pe!==6)&&(ve=null)):(se=null,ve=Q),se!==ve)){if(pe=_c,le="onMouseLeave",V="onMouseEnter",W="mouse",(e==="pointerout"||e==="pointerover")&&(pe=mc,le="onPointerLeave",V="onPointerEnter",W="pointer"),ze=se==null?$:tr(se),Z=ve==null?$:tr(ve),$=new pe(le,W+"leave",se,i,ae),$.target=ze,$.relatedTarget=Z,le=null,vs(ae)===Q&&(pe=new pe(V,W+"enter",ve,i,ae),pe.target=Z,pe.relatedTarget=ze,le=pe),ze=le,se&&ve)t:{for(pe=$_,V=se,W=ve,Z=0,le=V;le;le=pe(le))Z++;le=0;for(var ge=W;ge;ge=pe(ge))le++;for(;0<Z-le;)V=pe(V),Z--;for(;0<le-Z;)W=pe(W),le--;for(;Z--;){if(V===W||W!==null&&V===W.alternate){pe=V;break t}V=pe(V),W=pe(W)}pe=null}else pe=null;se!==null&&of(ce,$,se,pe,!1),ve!==null&&ze!==null&&of(ce,ze,ve,pe,!0)}}e:{if($=Q?tr(Q):window,se=$.nodeName&&$.nodeName.toLowerCase(),se==="select"||se==="input"&&$.type==="file")var Re=Ec;else if(Cc($))if(Ac)Re=c_;else{Re=l_;var me=a_}else se=$.nodeName,!se||se.toLowerCase()!=="input"||$.type!=="checkbox"&&$.type!=="radio"?Q&&pa(Q.elementType)&&(Re=Ec):Re=o_;if(Re&&(Re=Re(e,Q))){wc(ce,Re,i,ae);break e}me&&me(e,$,Q),e==="focusout"&&Q&&$.type==="number"&&Q.memoizedProps.value!=null&&ga($,"number",$.value)}switch(me=Q?tr(Q):window,e){case"focusin":(Cc(me)||me.contentEditable==="true")&&(Es=me,ka=Q,ur=null);break;case"focusout":ur=ka=Es=null;break;case"mousedown":Oa=!0;break;case"contextmenu":case"mouseup":case"dragend":Oa=!1,Oc(ce,i,ae);break;case"selectionchange":if(h_)break;case"keydown":case"keyup":Oc(ce,i,ae)}var Ce;if(Ta)e:{switch(e){case"compositionstart":var xe="onCompositionStart";break e;case"compositionend":xe="onCompositionEnd";break e;case"compositionupdate":xe="onCompositionUpdate";break e}xe=void 0}else ws?yc(e,i)&&(xe="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(xe="onCompositionStart");xe&&(gc&&i.locale!=="ko"&&(ws||xe!=="onCompositionStart"?xe==="onCompositionEnd"&&ws&&(Ce=fc()):(pi=ae,wa="value"in pi?pi.value:pi.textContent,ws=!0)),me=Fn(Q,xe),0<me.length&&(xe=new vc(xe,e,null,i,ae),ce.push({event:xe,listeners:me}),Ce?xe.data=Ce:(Ce=bc(i),Ce!==null&&(xe.data=Ce)))),(Ce=t_?i_(e,i):s_(e,i))&&(xe=Fn(Q,"onBeforeInput"),0<xe.length&&(me=new vc("onBeforeInput","beforeinput",null,i,ae),ce.push({event:me,listeners:xe}),me.data=Ce)),X_(ce,e,Q,i,ae)}af(ce,t)})}function Hr(e,t,i){return{instance:e,listener:t,currentTarget:i}}function Fn(e,t){for(var i=t+"Capture",s=[];e!==null;){var r=e,a=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||a===null||(r=ir(e,i),r!=null&&s.unshift(Hr(e,r,a)),r=ir(e,t),r!=null&&s.push(Hr(e,r,a))),e.tag===3)return s;e=e.return}return[]}function $_(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function of(e,t,i,s,r){for(var a=t._reactName,S=[];i!==null&&i!==s;){var R=i,j=R.alternate,Q=R.stateNode;if(R=R.tag,j!==null&&j===s)break;R!==5&&R!==26&&R!==27||Q===null||(j=Q,r?(Q=ir(i,a),Q!=null&&S.unshift(Hr(i,Q,j))):r||(Q=ir(i,a),Q!=null&&S.push(Hr(i,Q,j)))),i=i.return}S.length!==0&&e.push({event:t,listeners:S})}var J_=/\r\n?/g,ev=/\u0000|\uFFFD/g;function cf(e){return(typeof e=="string"?e:""+e).replace(J_,`
|
|
49
|
+
`).replace(ev,"")}function uf(e,t){return t=cf(t),cf(e)===t}function Ne(e,t,i,s,r,a){switch(i){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||ys(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&ys(e,""+s);break;case"className":Zr(e,"class",s);break;case"tabIndex":Zr(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":Zr(e,i,s);break;case"style":cc(e,s,a);break;case"data":if(t!=="object"){Zr(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||i!=="href")){e.removeAttribute(i);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=$r(""+s),e.setAttribute(i,s);break;case"action":case"formAction":if(typeof s=="function"){e.setAttribute(i,"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 a=="function"&&(i==="formAction"?(t!=="input"&&Ne(e,t,"name",r.name,r,null),Ne(e,t,"formEncType",r.formEncType,r,null),Ne(e,t,"formMethod",r.formMethod,r,null),Ne(e,t,"formTarget",r.formTarget,r,null)):(Ne(e,t,"encType",r.encType,r,null),Ne(e,t,"method",r.method,r,null),Ne(e,t,"target",r.target,r,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=$r(""+s),e.setAttribute(i,s);break;case"onClick":s!=null&&(e.onclick=Qt);break;case"onScroll":s!=null&&Ae("scroll",e);break;case"onScrollEnd":s!=null&&Ae("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(H(61));if(i=s.__html,i!=null){if(r.children!=null)throw Error(H(60));e.innerHTML=i}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}i=$r(""+s),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,""+s):e.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":s===!0?e.setAttribute(i,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,s):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(i,s):e.removeAttribute(i);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(i):e.setAttribute(i,s);break;case"popover":Ae("beforetoggle",e),Ae("toggle",e),Vr(e,"popover",s);break;case"xlinkActuate":Zt(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":Zt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":Zt(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":Zt(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":Zt(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":Zt(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":Zt(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":Zt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":Zt(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Vr(e,"is",s);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=Td.get(i)||i,Vr(e,i,s))}}function ro(e,t,i,s,r,a){switch(i){case"style":cc(e,s,a);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(H(61));if(i=s.__html,i!=null){if(r.children!=null)throw Error(H(60));e.innerHTML=i}}break;case"children":typeof s=="string"?ys(e,s):(typeof s=="number"||typeof s=="bigint")&&ys(e,""+s);break;case"onScroll":s!=null&&Ae("scroll",e);break;case"onScrollEnd":s!=null&&Ae("scrollend",e);break;case"onClick":s!=null&&(e.onclick=Qt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ec.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(r=i.endsWith("Capture"),t=i.slice(2,r?i.length-7:void 0),a=e[dt]||null,a=a!=null?a[i]:null,typeof a=="function"&&e.removeEventListener(t,a,r),typeof s=="function")){typeof a!="function"&&a!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,s,r);break e}i in e?e[i]=s:s===!0?e.setAttribute(i,""):Vr(e,i,s)}}}function ot(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ae("error",e),Ae("load",e);var s=!1,r=!1,a;for(a in i)if(i.hasOwnProperty(a)){var S=i[a];if(S!=null)switch(a){case"src":s=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(H(137,t));default:Ne(e,t,a,S,i,null)}}r&&Ne(e,t,"srcSet",i.srcSet,i,null),s&&Ne(e,t,"src",i.src,i,null);return;case"input":Ae("invalid",e);var R=a=S=r=null,j=null,Q=null;for(s in i)if(i.hasOwnProperty(s)){var ae=i[s];if(ae!=null)switch(s){case"name":r=ae;break;case"type":S=ae;break;case"checked":j=ae;break;case"defaultChecked":Q=ae;break;case"value":a=ae;break;case"defaultValue":R=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(H(137,t));break;default:Ne(e,t,s,ae,i,null)}}nc(e,a,R,j,Q,S,r,!1);return;case"select":Ae("invalid",e),s=S=a=null;for(r in i)if(i.hasOwnProperty(r)&&(R=i[r],R!=null))switch(r){case"value":a=R;break;case"defaultValue":S=R;break;case"multiple":s=R;default:Ne(e,t,r,R,i,null)}t=a,i=S,e.multiple=!!s,t!=null?Ss(e,!!s,t,!1):i!=null&&Ss(e,!!s,i,!0);return;case"textarea":Ae("invalid",e),a=r=s=null;for(S in i)if(i.hasOwnProperty(S)&&(R=i[S],R!=null))switch(S){case"value":s=R;break;case"defaultValue":r=R;break;case"children":a=R;break;case"dangerouslySetInnerHTML":if(R!=null)throw Error(H(91));break;default:Ne(e,t,S,R,i,null)}lc(e,s,r,a);return;case"option":for(j in i)if(i.hasOwnProperty(j)&&(s=i[j],s!=null))switch(j){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:Ne(e,t,j,s,i,null)}return;case"dialog":Ae("beforetoggle",e),Ae("toggle",e),Ae("cancel",e),Ae("close",e);break;case"iframe":case"object":Ae("load",e);break;case"video":case"audio":for(s=0;s<Br.length;s++)Ae(Br[s],e);break;case"image":Ae("error",e),Ae("load",e);break;case"details":Ae("toggle",e);break;case"embed":case"source":case"link":Ae("error",e),Ae("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(Q in i)if(i.hasOwnProperty(Q)&&(s=i[Q],s!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":throw Error(H(137,t));default:Ne(e,t,Q,s,i,null)}return;default:if(pa(t)){for(ae in i)i.hasOwnProperty(ae)&&(s=i[ae],s!==void 0&&ro(e,t,ae,s,i,void 0));return}}for(R in i)i.hasOwnProperty(R)&&(s=i[R],s!=null&&Ne(e,t,R,s,i,null))}function tv(e,t,i,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,a=null,S=null,R=null,j=null,Q=null,ae=null;for(se in i){var ce=i[se];if(i.hasOwnProperty(se)&&ce!=null)switch(se){case"checked":break;case"value":break;case"defaultValue":j=ce;default:s.hasOwnProperty(se)||Ne(e,t,se,null,s,ce)}}for(var $ in s){var se=s[$];if(ce=i[$],s.hasOwnProperty($)&&(se!=null||ce!=null))switch($){case"type":a=se;break;case"name":r=se;break;case"checked":Q=se;break;case"defaultChecked":ae=se;break;case"value":S=se;break;case"defaultValue":R=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(H(137,t));break;default:se!==ce&&Ne(e,t,$,se,s,ce)}}ma(e,S,R,j,Q,ae,a,r);return;case"select":se=S=R=$=null;for(a in i)if(j=i[a],i.hasOwnProperty(a)&&j!=null)switch(a){case"value":break;case"multiple":se=j;default:s.hasOwnProperty(a)||Ne(e,t,a,null,s,j)}for(r in s)if(a=s[r],j=i[r],s.hasOwnProperty(r)&&(a!=null||j!=null))switch(r){case"value":$=a;break;case"defaultValue":R=a;break;case"multiple":S=a;default:a!==j&&Ne(e,t,r,a,s,j)}t=R,i=S,s=se,$!=null?Ss(e,!!i,$,!1):!!s!=!!i&&(t!=null?Ss(e,!!i,t,!0):Ss(e,!!i,i?[]:"",!1));return;case"textarea":se=$=null;for(R in i)if(r=i[R],i.hasOwnProperty(R)&&r!=null&&!s.hasOwnProperty(R))switch(R){case"value":break;case"children":break;default:Ne(e,t,R,null,s,r)}for(S in s)if(r=s[S],a=i[S],s.hasOwnProperty(S)&&(r!=null||a!=null))switch(S){case"value":$=r;break;case"defaultValue":se=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(H(91));break;default:r!==a&&Ne(e,t,S,r,s,a)}ac(e,$,se);return;case"option":for(var ve in i)if($=i[ve],i.hasOwnProperty(ve)&&$!=null&&!s.hasOwnProperty(ve))switch(ve){case"selected":e.selected=!1;break;default:Ne(e,t,ve,null,s,$)}for(j in s)if($=s[j],se=i[j],s.hasOwnProperty(j)&&$!==se&&($!=null||se!=null))switch(j){case"selected":e.selected=$&&typeof $!="function"&&typeof $!="symbol";break;default:Ne(e,t,j,$,s,se)}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 pe in i)$=i[pe],i.hasOwnProperty(pe)&&$!=null&&!s.hasOwnProperty(pe)&&Ne(e,t,pe,null,s,$);for(Q in s)if($=s[Q],se=i[Q],s.hasOwnProperty(Q)&&$!==se&&($!=null||se!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(H(137,t));break;default:Ne(e,t,Q,$,s,se)}return;default:if(pa(t)){for(var ze in i)$=i[ze],i.hasOwnProperty(ze)&&$!==void 0&&!s.hasOwnProperty(ze)&&ro(e,t,ze,void 0,s,$);for(ae in s)$=s[ae],se=i[ae],!s.hasOwnProperty(ae)||$===se||$===void 0&&se===void 0||ro(e,t,ae,$,s,se);return}}for(var V in i)$=i[V],i.hasOwnProperty(V)&&$!=null&&!s.hasOwnProperty(V)&&Ne(e,t,V,null,s,$);for(ce in s)$=s[ce],se=i[ce],!s.hasOwnProperty(ce)||$===se||$==null&&se==null||Ne(e,t,ce,$,s,se)}function hf(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function iv(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),s=0;s<i.length;s++){var r=i[s],a=r.transferSize,S=r.initiatorType,R=r.duration;if(a&&R&&hf(S)){for(S=0,R=r.responseEnd,s+=1;s<i.length;s++){var j=i[s],Q=j.startTime;if(Q>R)break;var ae=j.transferSize,ce=j.initiatorType;ae&&hf(ce)&&(j=j.responseEnd,S+=ae*(j<R?1:(R-Q)/(j-Q)))}if(--s,t+=8*(a+S)/(r.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 no=null,ao=null;function Xn(e){return e.nodeType===9?e:e.ownerDocument}function ff(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 df(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 lo(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 oo=null;function sv(){var e=window.event;return e&&e.type==="popstate"?e===oo?!1:(oo=e,!0):(oo=null,!1)}var _f=typeof setTimeout=="function"?setTimeout:void 0,rv=typeof clearTimeout=="function"?clearTimeout:void 0,vf=typeof Promise=="function"?Promise:void 0,nv=typeof queueMicrotask=="function"?queueMicrotask:typeof vf<"u"?function(e){return vf.resolve(null).then(e).catch(av)}:_f;function av(e){setTimeout(function(){throw e})}function Hi(e){return e==="head"}function mf(e,t){var i=t,s=0;do{var r=i.nextSibling;if(e.removeChild(i),r&&r.nodeType===8)if(i=r.data,i==="/$"||i==="/&"){if(s===0){e.removeChild(r),Qs(t);return}s--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")s++;else if(i==="html")Nr(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,Nr(i);for(var a=i.firstChild;a;){var S=a.nextSibling,R=a.nodeName;a[er]||R==="SCRIPT"||R==="STYLE"||R==="LINK"&&a.rel.toLowerCase()==="stylesheet"||i.removeChild(a),a=S}}else i==="body"&&Nr(e.ownerDocument.body);i=r}while(i);Qs(t)}function gf(e,t){var i=e;e=0;do{var s=i.nextSibling;if(i.nodeType===1?t?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(t?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),s&&s.nodeType===8)if(i=s.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=s}while(i)}function co(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var i=t;switch(t=t.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":co(i),_a(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function lv(e,t,i,s){for(;e.nodeType===1;){var r=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[er])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(a=e.getAttribute("rel"),a==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(a!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(a=e.getAttribute("src"),(a!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&a&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var a=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===a)return e}else return e;if(e=qt(e.nextSibling),e===null)break}return null}function ov(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=qt(e.nextSibling),e===null))return null;return e}function pf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=qt(e.nextSibling),e===null))return null;return e}function uo(e){return e.data==="$?"||e.data==="$~"}function ho(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function cv(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var s=function(){t(),i.removeEventListener("DOMContentLoaded",s)};i.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function qt(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 fo=null;function Sf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return qt(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function yf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(t===0)return e;t--}else i!=="/$"&&i!=="/&"||t++}e=e.previousSibling}return null}function bf(e,t,i){switch(t=Xn(i),e){case"html":if(e=t.documentElement,!e)throw Error(H(452));return e;case"head":if(e=t.head,!e)throw Error(H(453));return e;case"body":if(e=t.body,!e)throw Error(H(454));return e;default:throw Error(H(451))}}function Nr(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);_a(e)}var It=new Map,Cf=new Set;function Vn(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var di=F.d;F.d={f:uv,r:hv,D:fv,C:dv,L:_v,m:vv,X:gv,S:mv,M:pv};function uv(){var e=di.f(),t=qn();return e||t}function hv(e){var t=ms(e);t!==null&&t.tag===5&&t.type==="form"?Uu(t):di.r(e)}var Xs=typeof document>"u"?null:document;function wf(e,t,i){var s=Xs;if(s&&typeof t=="string"&&t){var r=Ot(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof i=="string"&&(r+='[crossorigin="'+i+'"]'),Cf.has(r)||(Cf.add(r),e={rel:e,crossOrigin:i,href:t},s.querySelector(r)===null&&(t=s.createElement("link"),ot(t,"link",e),it(t),s.head.appendChild(t)))}}function fv(e){di.D(e),wf("dns-prefetch",e,null)}function dv(e,t){di.C(e,t),wf("preconnect",e,t)}function _v(e,t,i){di.L(e,t,i);var s=Xs;if(s&&e&&t){var r='link[rel="preload"][as="'+Ot(t)+'"]';t==="image"&&i&&i.imageSrcSet?(r+='[imagesrcset="'+Ot(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(r+='[imagesizes="'+Ot(i.imageSizes)+'"]')):r+='[href="'+Ot(e)+'"]';var a=r;switch(t){case"style":a=Vs(e);break;case"script":a=Zs(e)}It.has(a)||(e=h({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),It.set(a,e),s.querySelector(r)!==null||t==="style"&&s.querySelector(zr(a))||t==="script"&&s.querySelector(Ur(a))||(t=s.createElement("link"),ot(t,"link",e),it(t),s.head.appendChild(t)))}}function vv(e,t){di.m(e,t);var i=Xs;if(i&&e){var s=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+Ot(s)+'"][href="'+Ot(e)+'"]',a=r;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":a=Zs(e)}if(!It.has(a)&&(e=h({rel:"modulepreload",href:e},t),It.set(a,e),i.querySelector(r)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Ur(a)))return}s=i.createElement("link"),ot(s,"link",e),it(s),i.head.appendChild(s)}}}function mv(e,t,i){di.S(e,t,i);var s=Xs;if(s&&e){var r=gs(s).hoistableStyles,a=Vs(e);t=t||"default";var S=r.get(a);if(!S){var R={loading:0,preload:null};if(S=s.querySelector(zr(a)))R.loading=5;else{e=h({rel:"stylesheet",href:e,"data-precedence":t},i),(i=It.get(a))&&_o(e,i);var j=S=s.createElement("link");it(j),ot(j,"link",e),j._p=new Promise(function(Q,ae){j.onload=Q,j.onerror=ae}),j.addEventListener("load",function(){R.loading|=1}),j.addEventListener("error",function(){R.loading|=2}),R.loading|=4,Zn(S,t,s)}S={type:"stylesheet",instance:S,count:1,state:R},r.set(a,S)}}}function gv(e,t){di.X(e,t);var i=Xs;if(i&&e){var s=gs(i).hoistableScripts,r=Zs(e),a=s.get(r);a||(a=i.querySelector(Ur(r)),a||(e=h({src:e,async:!0},t),(t=It.get(r))&&vo(e,t),a=i.createElement("script"),it(a),ot(a,"link",e),i.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},s.set(r,a))}}function pv(e,t){di.M(e,t);var i=Xs;if(i&&e){var s=gs(i).hoistableScripts,r=Zs(e),a=s.get(r);a||(a=i.querySelector(Ur(r)),a||(e=h({src:e,async:!0,type:"module"},t),(t=It.get(r))&&vo(e,t),a=i.createElement("script"),it(a),ot(a,"link",e),i.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},s.set(r,a))}}function Ef(e,t,i,s){var r=(r=he.current)?Vn(r):null;if(!r)throw Error(H(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=Vs(i.href),i=gs(r).hoistableStyles,s=i.get(t),s||(s={type:"style",instance:null,count:0,state:null},i.set(t,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=Vs(i.href);var a=gs(r).hoistableStyles,S=a.get(e);if(S||(r=r.ownerDocument||r,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},a.set(e,S),(a=r.querySelector(zr(e)))&&!a._p&&(S.instance=a,S.state.loading=5),It.has(e)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},It.set(e,i),a||Sv(r,e,i,S.state))),t&&s===null)throw Error(H(528,""));return S}if(t&&s!==null)throw Error(H(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Zs(i),i=gs(r).hoistableScripts,s=i.get(t),s||(s={type:"script",instance:null,count:0,state:null},i.set(t,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(H(444,e))}}function Vs(e){return'href="'+Ot(e)+'"'}function zr(e){return'link[rel="stylesheet"]['+e+"]"}function Af(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function Sv(e,t,i,s){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?s.loading=1:(t=e.createElement("link"),s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2}),ot(t,"link",i),it(t),e.head.appendChild(t))}function Zs(e){return'[src="'+Ot(e)+'"]'}function Ur(e){return"script[async]"+e}function Df(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+Ot(i.href)+'"]');if(s)return t.instance=s,it(s),s;var r=h({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),it(s),ot(s,"style",r),Zn(s,i.precedence,e),t.instance=s;case"stylesheet":r=Vs(i.href);var a=e.querySelector(zr(r));if(a)return t.state.loading|=4,t.instance=a,it(a),a;s=Af(i),(r=It.get(r))&&_o(s,r),a=(e.ownerDocument||e).createElement("link"),it(a);var S=a;return S._p=new Promise(function(R,j){S.onload=R,S.onerror=j}),ot(a,"link",s),t.state.loading|=4,Zn(a,i.precedence,e),t.instance=a;case"script":return a=Zs(i.src),(r=e.querySelector(Ur(a)))?(t.instance=r,it(r),r):(s=i,(r=It.get(a))&&(s=h({},i),vo(s,r)),e=e.ownerDocument||e,r=e.createElement("script"),it(r),ot(r,"link",s),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(H(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,Zn(s,i.precedence,e));return t.instance}function Zn(e,t,i){for(var s=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=s.length?s[s.length-1]:null,a=r,S=0;S<s.length;S++){var R=s[S];if(R.dataset.precedence===t)a=R;else if(a!==r)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function _o(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function vo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Qn=null;function xf(e,t,i){if(Qn===null){var s=new Map,r=Qn=new Map;r.set(i,s)}else r=Qn,s=r.get(i),s||(s=new Map,r.set(i,s));if(s.has(e))return s;for(s.set(e,null),i=i.getElementsByTagName(e),r=0;r<i.length;r++){var a=i[r];if(!(a[er]||a[rt]||e==="link"&&a.getAttribute("rel")==="stylesheet")&&a.namespaceURI!=="http://www.w3.org/2000/svg"){var S=a.getAttribute(t)||"";S=e+S;var R=s.get(S);R?R.push(a):s.set(S,[a])}}return s}function Tf(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function yv(e,t,i){if(i===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;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!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 Rf(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function bv(e,t,i,s){if(i.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var r=Vs(s.href),a=t.querySelector(zr(r));if(a){t=a._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=$n.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=a,it(a);return}a=t.ownerDocument||t,s=Af(s),(r=It.get(r))&&_o(s,r),a=a.createElement("link"),it(a);var S=a;S._p=new Promise(function(R,j){S.onload=R,S.onerror=j}),ot(a,"link",s),i.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=$n.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var mo=0;function Cv(e,t){return e.stylesheets&&e.count===0&&ea(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var s=setTimeout(function(){if(e.stylesheets&&ea(e,e.stylesheets),e.unsuspend){var a=e.unsuspend;e.unsuspend=null,a()}},6e4+t);0<e.imgBytes&&mo===0&&(mo=62500*iv());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ea(e,e.stylesheets),e.unsuspend)){var a=e.unsuspend;e.unsuspend=null,a()}},(e.imgBytes>mo?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(r)}}:null}function $n(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ea(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Jn=null;function ea(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Jn=new Map,t.forEach(wv,e),Jn=null,$n.call(e))}function wv(e,t){if(!(t.state.loading&4)){var i=Jn.get(e);if(i)var s=i.get(null);else{i=new Map,Jn.set(e,i);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),a=0;a<r.length;a++){var S=r[a];(S.nodeName==="LINK"||S.getAttribute("media")!=="not all")&&(i.set(S.dataset.precedence,S),s=S)}s&&i.set(null,s)}r=t.instance,S=r.getAttribute("data-precedence"),a=i.get(S)||s,a===s&&i.set(null,r),i.set(S,r),this.count++,s=$n.bind(this),r.addEventListener("load",s),r.addEventListener("error",s),a?a.parentNode.insertBefore(r,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var jr={$$typeof:l,Provider:null,Consumer:null,_currentValue:ie,_currentValue2:ie,_threadCount:0};function Ev(e,t,i,s,r,a,S,R,j){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=ua(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ua(0),this.hiddenUpdates=ua(null),this.identifierPrefix=s,this.onUncaughtError=r,this.onCaughtError=a,this.onRecoverableError=S,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=j,this.incompleteTransitions=new Map}function Mf(e,t,i,s,r,a,S,R,j,Q,ae,ce){return e=new Ev(e,t,i,S,j,Q,ae,ce,R),t=1,a===!0&&(t|=24),a=At(3,null,null,t),e.current=a,a.stateNode=e,t=Xa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:s,isDehydrated:i,cache:t},$a(a),e}function Lf(e){return e?(e=xs,e):xs}function kf(e,t,i,s,r,a){r=Lf(r),s.context===null?s.context=r:s.pendingContext=r,s=Ei(t),s.payload={element:i},a=a===void 0?null:a,a!==null&&(s.callback=a),i=Ai(e,s,t),i!==null&&(St(i,e,t),gr(i,e,t))}function Of(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function go(e,t){Of(e,t),(e=e.alternate)&&Of(e,t)}function Bf(e){if(e.tag===13||e.tag===31){var t=Qi(e,67108864);t!==null&&St(t,e,67108864),go(e,67108864)}}function Hf(e){if(e.tag===13||e.tag===31){var t=Mt();t=ha(t);var i=Qi(e,t);i!==null&&St(i,e,t),go(e,t)}}var ta=!0;function Av(e,t,i,s){var r=I.T;I.T=null;var a=F.p;try{F.p=2,po(e,t,i,s)}finally{F.p=a,I.T=r}}function Dv(e,t,i,s){var r=I.T;I.T=null;var a=F.p;try{F.p=8,po(e,t,i,s)}finally{F.p=a,I.T=r}}function po(e,t,i,s){if(ta){var r=So(s);if(r===null)so(e,t,s,ia,i),zf(e,s);else if(Tv(r,e,t,i,s))s.stopPropagation();else if(zf(e,s),t&4&&-1<xv.indexOf(e)){for(;r!==null;){var a=ms(r);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var S=Pi(a.pendingLanes);if(S!==0){var R=a;for(R.pendingLanes|=2,R.entangledLanes|=2;S;){var j=1<<31-wt(S);R.entanglements[1]|=j,S&=~j}Vt(a),(Le&6)===0&&(Un=Je()+500,Or(0))}}break;case 31:case 13:R=Qi(a,2),R!==null&&St(R,a,2),qn(),go(a,2)}if(a=So(s),a===null&&so(e,t,s,ia,i),a===r)break;r=a}r!==null&&s.stopPropagation()}else so(e,t,s,null,i)}}function So(e){return e=ya(e),yo(e)}var ia=null;function yo(e){if(ia=null,e=vs(e),e!==null){var t=ue(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=Y(t),e!==null)return e;e=null}else if(i===31){if(e=u(t),e!==null)return e;e=null}else if(i===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return ia=e,null}function Nf(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"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Lt()){case vi:return 2;case fs:return 8;case bt:case ds:return 32;case Wt:return 268435456;default:return 32}default:return 32}}var bo=!1,Ni=null,zi=null,Ui=null,qr=new Map,Ir=new Map,ji=[],xv="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 zf(e,t){switch(e){case"focusin":case"focusout":Ni=null;break;case"dragenter":case"dragleave":zi=null;break;case"mouseover":case"mouseout":Ui=null;break;case"pointerover":case"pointerout":qr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ir.delete(t.pointerId)}}function Wr(e,t,i,s,r,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:i,eventSystemFlags:s,nativeEvent:a,targetContainers:[r]},t!==null&&(t=ms(t),t!==null&&Bf(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function Tv(e,t,i,s,r){switch(t){case"focusin":return Ni=Wr(Ni,e,t,i,s,r),!0;case"dragenter":return zi=Wr(zi,e,t,i,s,r),!0;case"mouseover":return Ui=Wr(Ui,e,t,i,s,r),!0;case"pointerover":var a=r.pointerId;return qr.set(a,Wr(qr.get(a)||null,e,t,i,s,r)),!0;case"gotpointercapture":return a=r.pointerId,Ir.set(a,Wr(Ir.get(a)||null,e,t,i,s,r)),!0}return!1}function Uf(e){var t=vs(e.target);if(t!==null){var i=ue(t);if(i!==null){if(t=i.tag,t===13){if(t=Y(i),t!==null){e.blockedOn=t,Qo(e.priority,function(){Hf(i)});return}}else if(t===31){if(t=u(i),t!==null){e.blockedOn=t,Qo(e.priority,function(){Hf(i)});return}}else if(t===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function sa(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=So(e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);Sa=s,i.target.dispatchEvent(s),Sa=null}else return t=ms(i),t!==null&&Bf(t),e.blockedOn=i,!1;t.shift()}return!0}function jf(e,t,i){sa(e)&&i.delete(t)}function Rv(){bo=!1,Ni!==null&&sa(Ni)&&(Ni=null),zi!==null&&sa(zi)&&(zi=null),Ui!==null&&sa(Ui)&&(Ui=null),qr.forEach(jf),Ir.forEach(jf)}function ra(e,t){e.blockedOn===t&&(e.blockedOn=null,bo||(bo=!0,L.unstable_scheduleCallback(L.unstable_NormalPriority,Rv)))}var na=null;function qf(e){na!==e&&(na=e,L.unstable_scheduleCallback(L.unstable_NormalPriority,function(){na===e&&(na=null);for(var t=0;t<e.length;t+=3){var i=e[t],s=e[t+1],r=e[t+2];if(typeof s!="function"){if(yo(s||i)===null)continue;break}var a=ms(i);a!==null&&(e.splice(t,3),t-=3,pl(a,{pending:!0,data:r,method:i.method,action:s},s,r))}}))}function Qs(e){function t(j){return ra(j,e)}Ni!==null&&ra(Ni,e),zi!==null&&ra(zi,e),Ui!==null&&ra(Ui,e),qr.forEach(t),Ir.forEach(t);for(var i=0;i<ji.length;i++){var s=ji[i];s.blockedOn===e&&(s.blockedOn=null)}for(;0<ji.length&&(i=ji[0],i.blockedOn===null);)Uf(i),i.blockedOn===null&&ji.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(s=0;s<i.length;s+=3){var r=i[s],a=i[s+1],S=r[dt]||null;if(typeof a=="function")S||qf(i);else if(S){var R=null;if(a&&a.hasAttribute("formAction")){if(r=a,S=a[dt]||null)R=S.formAction;else if(yo(r)!==null)continue}else R=S.action;typeof R=="function"?i[s+1]=R:(i.splice(s,3),s-=3),qf(i)}}}function If(){function e(a){a.canIntercept&&a.info==="react-transition"&&a.intercept({handler:function(){return new Promise(function(S){return r=S})},focusReset:"manual",scroll:"manual"})}function t(){r!==null&&(r(),r=null),s||setTimeout(i,20)}function i(){if(!s&&!navigation.transition){var a=navigation.currentEntry;a&&a.url!=null&&navigation.navigate(a.url,{state:a.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,r=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),r!==null&&(r(),r=null)}}}function Co(e){this._internalRoot=e}aa.prototype.render=Co.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(H(409));var i=t.current,s=Mt();kf(i,s,e,t,null,null)},aa.prototype.unmount=Co.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;kf(e.current,2,null,e,null,null),qn(),t[_s]=null}};function aa(e){this._internalRoot=e}aa.prototype.unstable_scheduleHydration=function(e){if(e){var t=Zo();e={blockedOn:null,target:e,priority:t};for(var i=0;i<ji.length&&t!==0&&t<ji[i].priority;i++);ji.splice(i,0,e),i===0&&Uf(e)}};var Wf=X.version;if(Wf!=="19.2.7")throw Error(H(527,Wf,"19.2.7"));F.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(H(188)):(e=Object.keys(e).join(","),Error(H(268,e)));return e=d(t),e=e!==null?p(e):null,e=e===null?null:e.stateNode,e};var Mv={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:I,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var la=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!la.isDisabled&&la.supportsFiber)try{Yi=la.inject(Mv),Ct=la}catch{}}return Gr.createRoot=function(e,t){if(!re(e))throw Error(H(299));var i=!1,s="",r=Xu,a=Vu,S=Zu;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(a=t.onCaughtError),t.onRecoverableError!==void 0&&(S=t.onRecoverableError)),t=Mf(e,1,!1,null,null,i,s,null,r,a,S,If),e[_s]=t.current,io(e),new Co(t)},Gr.hydrateRoot=function(e,t,i){if(!re(e))throw Error(H(299));var s=!1,r="",a=Xu,S=Vu,R=Zu,j=null;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(r=i.identifierPrefix),i.onUncaughtError!==void 0&&(a=i.onUncaughtError),i.onCaughtError!==void 0&&(S=i.onCaughtError),i.onRecoverableError!==void 0&&(R=i.onRecoverableError),i.formState!==void 0&&(j=i.formState)),t=Mf(e,1,!0,t,i??null,s,r,j,a,S,R,If),t.context=Lf(null),i=t.current,s=Mt(),s=ha(s),r=Ei(s),r.callback=null,Ai(i,r,s),i=s,t.current.lanes=i,Js(t,i),Vt(t),e[_s]=t.current,io(e),new aa(t)},Gr.version="19.2.7",Gr}var $f;function Wv(){if($f)return Do.exports;$f=1;function L(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(L)}catch(X){console.error(X)}}return L(),Do.exports=Iv(),Do.exports}var Kv=Wv();const Gv="data:image/svg+xml,%3csvg%20width='115'%20height='122'%20viewBox='0%200%20115%20122'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M105.267%2060.7219L98.8902%2071.7648L92.1353%2083.4669L83.3114%2098.7521L70.18%20121.491H0L13.1249%2098.7521H57.042L72.6274%2071.7648L79.0038%2060.7219L72.2619%2049.0459H98.5247L105.267%2060.7219Z'%20fill='%236BE195'/%3e%3cpath%20d='M114.072%200L100.954%2022.7189H57.0694L57.0498%2022.6928L57.0368%2022.7189L41.8365%2049.047L35.0945%2060.723L41.471%2071.7659H15.2016L8.8252%2060.723L15.5671%2049.047L21.9631%2037.978L30.774%2022.7189L43.8923%200H114.072Z'%20fill='%236BE195'/%3e%3c/svg%3e",nd="sapiom-harness-theme",Ho=new Set;function Yv(){var L;return typeof window<"u"&&((L=window.matchMedia)==null?void 0:L.call(window,"(prefers-color-scheme: dark)").matches)===!0}function Pv(){const L=typeof window<"u"?window.localStorage.getItem(nd):null;return L==="light"||L==="dark"?L:Yv()?"dark":"light"}let Io=Pv();function oa(){return Io}function Fv(L){Io=L,document.documentElement.dataset.theme=L,window.localStorage.setItem(nd,L),Ho.forEach(X=>X(L))}function Xv(){Fv(Io==="dark"?"light":"dark")}function Wo(L){return Ho.add(L),()=>Ho.delete(L)}/**
|
|
50
|
+
* @license lucide-react v1.23.0 - ISC
|
|
51
|
+
*
|
|
52
|
+
* This source code is licensed under the ISC license.
|
|
53
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
54
|
+
*/const ad=(...L)=>L.filter((X,J,H)=>!!X&&X.trim()!==""&&H.indexOf(X)===J).join(" ").trim();/**
|
|
55
|
+
* @license lucide-react v1.23.0 - ISC
|
|
56
|
+
*
|
|
57
|
+
* This source code is licensed under the ISC license.
|
|
58
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
59
|
+
*/const Vv=L=>L.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
60
|
+
* @license lucide-react v1.23.0 - ISC
|
|
61
|
+
*
|
|
62
|
+
* This source code is licensed under the ISC license.
|
|
63
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
64
|
+
*/const Zv=L=>L.replace(/^([A-Z])|[\s-_]+(\w)/g,(X,J,H)=>H?H.toUpperCase():J.toLowerCase());/**
|
|
65
|
+
* @license lucide-react v1.23.0 - ISC
|
|
66
|
+
*
|
|
67
|
+
* This source code is licensed under the ISC license.
|
|
68
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
69
|
+
*/const Jf=L=>{const X=Zv(L);return X.charAt(0).toUpperCase()+X.slice(1)};/**
|
|
70
|
+
* @license lucide-react v1.23.0 - ISC
|
|
71
|
+
*
|
|
72
|
+
* This source code is licensed under the ISC license.
|
|
73
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
74
|
+
*/var Mo={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
75
|
+
* @license lucide-react v1.23.0 - ISC
|
|
76
|
+
*
|
|
77
|
+
* This source code is licensed under the ISC license.
|
|
78
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
79
|
+
*/const Qv=L=>{for(const X in L)if(X.startsWith("aria-")||X==="role"||X==="title")return!0;return!1},$v=fe.createContext({}),Jv=()=>fe.useContext($v),em=fe.forwardRef(({color:L,size:X,strokeWidth:J,absoluteStrokeWidth:H,className:re="",children:ue,iconNode:Y,...u},f)=>{const{size:d=24,strokeWidth:p=2,absoluteStrokeWidth:h=!1,color:g="currentColor",className:y=""}=Jv()??{},E=H??h?Number(J??p)*24/Number(X??d):J??p;return fe.createElement("svg",{ref:f,...Mo,width:X??d??Mo.width,height:X??d??Mo.height,stroke:L??g,strokeWidth:E,className:ad("lucide",y,re),...!ue&&!Qv(u)&&{"aria-hidden":"true"},...u},[...Y.map(([v,o])=>fe.createElement(v,o)),...Array.isArray(ue)?ue:[ue]])});/**
|
|
80
|
+
* @license lucide-react v1.23.0 - ISC
|
|
81
|
+
*
|
|
82
|
+
* This source code is licensed under the ISC license.
|
|
83
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
84
|
+
*/const $e=(L,X)=>{const J=fe.forwardRef(({className:H,...re},ue)=>fe.createElement(em,{ref:ue,iconNode:X,className:ad(`lucide-${Vv(Jf(L))}`,`lucide-${L}`,H),...re}));return J.displayName=Jf(L),J};/**
|
|
85
|
+
* @license lucide-react v1.23.0 - ISC
|
|
86
|
+
*
|
|
87
|
+
* This source code is licensed under the ISC license.
|
|
88
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
89
|
+
*/const tm=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],im=$e("chevron-down",tm);/**
|
|
90
|
+
* @license lucide-react v1.23.0 - ISC
|
|
91
|
+
*
|
|
92
|
+
* This source code is licensed under the ISC license.
|
|
93
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
94
|
+
*/const sm=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],rm=$e("circle-question-mark",sm);/**
|
|
95
|
+
* @license lucide-react v1.23.0 - ISC
|
|
96
|
+
*
|
|
97
|
+
* This source code is licensed under the ISC license.
|
|
98
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
99
|
+
*/const nm=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],am=$e("cloud",nm);/**
|
|
100
|
+
* @license lucide-react v1.23.0 - ISC
|
|
101
|
+
*
|
|
102
|
+
* This source code is licensed under the ISC license.
|
|
103
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
104
|
+
*/const lm=[["path",{d:"M14 9 9 4 4 9",key:"1af5af"}],["path",{d:"M20 20h-7a4 4 0 0 1-4-4V4",key:"1blwi3"}]],om=$e("corner-left-up",lm);/**
|
|
105
|
+
* @license lucide-react v1.23.0 - ISC
|
|
106
|
+
*
|
|
107
|
+
* This source code is licensed under the ISC license.
|
|
108
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
109
|
+
*/const cm=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],um=$e("external-link",cm);/**
|
|
110
|
+
* @license lucide-react v1.23.0 - ISC
|
|
111
|
+
*
|
|
112
|
+
* This source code is licensed under the ISC license.
|
|
113
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
114
|
+
*/const hm=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],fm=$e("folder",hm);/**
|
|
115
|
+
* @license lucide-react v1.23.0 - ISC
|
|
116
|
+
*
|
|
117
|
+
* This source code is licensed under the ISC license.
|
|
118
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
119
|
+
*/const dm=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],_m=$e("history",dm);/**
|
|
120
|
+
* @license lucide-react v1.23.0 - ISC
|
|
121
|
+
*
|
|
122
|
+
* This source code is licensed under the ISC license.
|
|
123
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
124
|
+
*/const vm=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],mm=$e("moon",vm);/**
|
|
125
|
+
* @license lucide-react v1.23.0 - ISC
|
|
126
|
+
*
|
|
127
|
+
* This source code is licensed under the ISC license.
|
|
128
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
129
|
+
*/const gm=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],pm=$e("play",gm);/**
|
|
130
|
+
* @license lucide-react v1.23.0 - ISC
|
|
131
|
+
*
|
|
132
|
+
* This source code is licensed under the ISC license.
|
|
133
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
134
|
+
*/const Sm=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],ym=$e("plus",Sm);/**
|
|
135
|
+
* @license lucide-react v1.23.0 - ISC
|
|
136
|
+
*
|
|
137
|
+
* This source code is licensed under the ISC license.
|
|
138
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
139
|
+
*/const bm=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],Cm=$e("radio",bm);/**
|
|
140
|
+
* @license lucide-react v1.23.0 - ISC
|
|
141
|
+
*
|
|
142
|
+
* This source code is licensed under the ISC license.
|
|
143
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
144
|
+
*/const wm=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Em=$e("refresh-cw",wm);/**
|
|
145
|
+
* @license lucide-react v1.23.0 - ISC
|
|
146
|
+
*
|
|
147
|
+
* This source code is licensed under the ISC license.
|
|
148
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
149
|
+
*/const Am=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Dm=$e("search",Am);/**
|
|
150
|
+
* @license lucide-react v1.23.0 - ISC
|
|
151
|
+
*
|
|
152
|
+
* This source code is licensed under the ISC license.
|
|
153
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
154
|
+
*/const xm=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Tm=$e("settings",xm);/**
|
|
155
|
+
* @license lucide-react v1.23.0 - ISC
|
|
156
|
+
*
|
|
157
|
+
* This source code is licensed under the ISC license.
|
|
158
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
159
|
+
*/const Rm=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],Mm=$e("sparkles",Rm);/**
|
|
160
|
+
* @license lucide-react v1.23.0 - ISC
|
|
161
|
+
*
|
|
162
|
+
* This source code is licensed under the ISC license.
|
|
163
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
164
|
+
*/const Lm=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],km=$e("sun",Lm);/**
|
|
165
|
+
* @license lucide-react v1.23.0 - ISC
|
|
166
|
+
*
|
|
167
|
+
* This source code is licensed under the ISC license.
|
|
168
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
169
|
+
*/const Om=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Bm=$e("triangle-alert",Om);/**
|
|
170
|
+
* @license lucide-react v1.23.0 - ISC
|
|
171
|
+
*
|
|
172
|
+
* This source code is licensed under the ISC license.
|
|
173
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
174
|
+
*/const Hm=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],Nm=$e("wand-sparkles",Hm);/**
|
|
175
|
+
* @license lucide-react v1.23.0 - ISC
|
|
176
|
+
*
|
|
177
|
+
* This source code is licensed under the ISC license.
|
|
178
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
179
|
+
*/const zm=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Um=$e("x",zm);/**
|
|
180
|
+
* @license lucide-react v1.23.0 - ISC
|
|
181
|
+
*
|
|
182
|
+
* This source code is licensed under the ISC license.
|
|
183
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
184
|
+
*/const jm=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],qm=$e("zap",jm),Im={ChevronDown:im,Cloud:am,CornerLeftUp:om,ExternalLink:um,Folder:fm,History:_m,Moon:mm,Play:pm,Plus:ym,Radio:Cm,RefreshCw:Em,Search:Dm,Settings:Tm,Sparkles:Mm,Sun:km,TriangleAlert:Bm,Wand2:Nm,X:Um,Zap:qm};function ut({name:L,size:X=16}){const J=Im[L]??rm;return q.jsx(J,{size:X,strokeWidth:1.75,"aria-hidden":"true"})}const Wm=typeof navigator<"u"&&navigator.platform.toUpperCase().includes("MAC"),Km=Wm?"⌘K":"Ctrl+K";function Gm({authenticated:L,organizationName:X,onOpenPalette:J}){const[H,re]=fe.useState(oa());return fe.useEffect(()=>Wo(re),[]),q.jsxs("header",{className:"brand-header",children:[q.jsxs("div",{className:"brand-lockup",children:[q.jsx("img",{src:Gv,alt:"",className:"brand-mark"}),q.jsx("span",{className:"brand-name",children:"Sapiom"}),q.jsx("span",{className:"brand-divider"}),q.jsx("span",{className:"brand-product",children:"Harness"})]}),q.jsxs("div",{className:"brand-header-right",children:[q.jsxs("button",{className:"palette-trigger","data-testid":"palette-trigger","aria-label":"Jump to session, workflow, or path",onClick:J,children:[q.jsx(ut,{name:"Search",size:13}),"Jump",q.jsx("span",{className:"palette-trigger-hint",children:Km})]}),q.jsx("button",{className:"theme-toggle","data-testid":"theme-toggle","aria-label":H==="dark"?"Switch to light mode":"Switch to dark mode",title:H==="dark"?"Switch to light mode":"Switch to dark mode",onClick:Xv,children:q.jsx(ut,{name:H==="dark"?"Sun":"Moon",size:15})}),q.jsxs("div",{className:"brand-identity","data-testid":"brand-identity",children:[q.jsx("span",{className:"identity-dot","data-authenticated":L}),L?X??"Signed in":"Not signed in"]})]})]})}const ld=Date.now(),us=L=>new Date(ld-L*6e4).toISOString(),ca=L=>new Date(ld-L*24*60*6e4).toISOString(),Ym="/Users/demo/acme-app";us(1),us(1),us(42),us(20),ca(2),ca(1),us(0),us(0);us(1),ca(1),ca(1);function Pm(){return!1}function od(L){return(L==null?void 0:L.boundWorkflowPath)??null}class cd extends Error{constructor(J,H,re){super(H);wo(this,"status");wo(this,"reason");this.name="ApiError",this.status=J,this.reason=re}}function Ko(){const L=window.__HARNESS__;return L!=null&&L.token?L.token:new URLSearchParams(window.location.search).get("token")??""}class Fm{async request(X,J){const H=await fetch(X,{...J,headers:{"Content-Type":"application/json","X-Harness-Token":Ko(),...J==null?void 0:J.headers}});if(!H.ok){const re=await H.text().catch(()=>"");let ue;try{const Y=re?JSON.parse(re):void 0;Y&&typeof Y=="object"&&typeof Y.error=="string"&&(ue=Y.error)}catch{}throw new cd(H.status,`${(J==null?void 0:J.method)??"GET"} ${X} → ${H.status}${re?`: ${re}`:""}`,ue)}if(H.status!==204)return await H.json()}getState(){return this.request("/api/state")}createSession(X){return this.request("/api/sessions",{method:"POST",body:JSON.stringify(X)})}listSessions(){return this.request("/api/sessions")}sessionHistory(X){return this.request(`/api/sessions/history?cwd=${encodeURIComponent(X)}`)}resumeSession(X){return this.request(`/api/sessions/${encodeURIComponent(X)}/resume`,{method:"POST"})}async killSession(X){await this.request(`/api/sessions/${encodeURIComponent(X)}`,{method:"DELETE"})}async injectInput(X,J){await this.request(`/api/sessions/${encodeURIComponent(X)}/input`,{method:"POST",body:JSON.stringify(J)})}listWorkflows(){return this.request("/api/workflows")}connectWorkflow(X){return this.request("/api/workflows/connect",{method:"POST",body:JSON.stringify({path:X})})}scanWorkflows(X){return this.request("/api/workflows/scan",{method:"POST",body:JSON.stringify({root:X})})}listMacros(){return this.request("/api/macros")}async runMacro(X,J){await this.request(`/api/macros/${encodeURIComponent(X)}/run`,{method:"POST",body:JSON.stringify(J)})}getSettings(){return this.request("/api/settings")}updateSettings(X){return this.request("/api/settings",{method:"PATCH",body:JSON.stringify(X)})}listDir(X){const J=X?`?path=${encodeURIComponent(X)}`:"";return this.request(`/api/fs/list${J}`)}bindWorkflow(X,J){const H={workflowPath:J};return this.request(`/api/sessions/${encodeURIComponent(X)}/workflow`,{method:"PATCH",body:JSON.stringify(H)})}seedSampleProject(){return this.request("/api/sample-project",{method:"POST"})}}function Xm(){return new Fm}function Vm(L){return L.find(X=>X.id==="visualize")}function ud(L,X,J){if(L.requiresWorkflow){if(!X)return"Select a workflow first";if(L.action.kind==="open-url"&&L.action.url.includes("{{workflow.definitionId}}")&&X.definitionId==null)return"Not deployed yet"}return L.action.kind!=="open-url"&&!J?"Start a session first":null}function Zm(L,X){return L.replace("{{workflow.definitionId}}",String((X==null?void 0:X.definitionId)??""))}function Qm({workflow:L,onReVisualize:X,reVisualizeDisabledReason:J}){return q.jsxs("div",{className:"workflow-actions-header","data-testid":"workflow-actions-header",children:[q.jsx("span",{className:"workflow-actions-name",children:L.name}),L.definitionId!=null&&q.jsx("span",{className:"workflow-dot workflow-dot-pinned","data-tooltip":"Deployed to production"}),q.jsx("button",{className:"macro-icon-btn canvas-refresh-btn","aria-label":"Re-visualize","data-testid":"canvas-revisualize","data-tooltip":J??"Re-visualize",disabled:!!J,onClick:X,children:q.jsx(ut,{name:"RefreshCw",size:14})})]})}function $m({sessionId:L,lastMessage:X,boundWorkflow:J,activeSessionId:H,macros:re,tasks:ue,onRunMacro:Y}){const[u,f]=fe.useState(!1),[d,p]=fe.useState(0),[h,g]=fe.useState(oa()),[y,E]=fe.useState(!1),[v,o]=fe.useState(!0),[c,n]=fe.useState(new Set);fe.useEffect(()=>Wo(g),[]),fe.useEffect(()=>{if(f(!1),o(!0),!L||Pm())return;let z=!1;return E(!0),fetch(`/canvas/${L}/`,{method:"HEAD"}).then(O=>!z&&f(O.ok)).catch(()=>{}).finally(()=>!z&&E(!1)),()=>{z=!0}},[L]),fe.useEffect(()=>{!X||!L||X.type==="canvas.reload"&&X.harnessSessionId===L&&(f(!0),o(!0),p(z=>z+1))},[X,L]);const l=(J==null?void 0:J.path)??null;fe.useEffect(()=>{o(!0),p(z=>z+1)},[l]);const _=Vm(re),b=_?ud(_,J,H):null,C=ue.filter(z=>z.harnessSessionId===L&&(z.workflowPath==null||z.workflowPath===l)),w=C.find(z=>z.status==="running")??null,m=C.filter(z=>z.status!=="running").sort((z,O)=>(O.endedAt??"").localeCompare(z.endedAt??""))[0],A=!w&&(m==null?void 0:m.status)==="failed"&&!c.has(m.id)?m:null,B=A?re.find(z=>z.id===A.macroId)??null:null,U=()=>{_&&Y(_)};return q.jsxs("aside",{className:"canvas-pane",children:[J&&q.jsx(Qm,{workflow:J,onReVisualize:U,reVisualizeDisabledReason:b}),L?w?q.jsxs("div",{className:"canvas-task-activity","data-testid":"canvas-task-activity",children:[q.jsxs("div",{className:"canvas-task-title",children:[q.jsx("span",{className:"canvas-task-spinner","aria-hidden":"true"}),q.jsxs("span",{children:[w.label," is running…"]})]}),w.statusLines.length>0&&q.jsx("ul",{className:"canvas-task-lines","data-testid":"canvas-task-lines",children:w.statusLines.slice(-8).map((z,O)=>q.jsx("li",{children:z},`${O}-${z}`))}),q.jsx("p",{className:"canvas-empty-hint",children:"Running as a background task — your session stays free. The canvas reloads here when it finishes."})]}):A?q.jsxs("div",{className:"canvas-task-failed","data-testid":"canvas-task-failed",children:[q.jsxs("p",{className:"canvas-task-title",children:[q.jsx(ut,{name:"TriangleAlert",size:14})," ",A.label," failed."]}),A.errorTail&&q.jsx("pre",{className:"canvas-task-error",children:A.errorTail}),q.jsxs("div",{className:"canvas-task-actions",children:[B&&q.jsx("button",{className:"btn-primary","data-testid":"canvas-task-retry",onClick:()=>Y(B),children:"Retry"}),q.jsx("button",{className:"btn-ghost","data-testid":"canvas-task-dismiss",onClick:()=>n(z=>{const O=new Set(z);return O.add(A.id),O}),children:"Dismiss"})]})]}):y?q.jsxs("div",{className:"canvas-loading","data-testid":"canvas-loading",children:[q.jsx("span",{className:"canvas-task-spinner","aria-hidden":"true"}),q.jsx("p",{className:"canvas-empty-hint",children:"Loading canvas…"})]}):u?q.jsxs("div",{className:"canvas-frame-wrap",children:[v&&q.jsxs("div",{className:"canvas-loading canvas-loading--overlay","data-testid":"canvas-loading",children:[q.jsx("span",{className:"canvas-task-spinner","aria-hidden":"true"}),q.jsx("p",{className:"canvas-empty-hint",children:"Rendering diagram…"})]}),q.jsx("iframe",{className:"canvas-iframe",src:`/canvas/${L}/?theme=${h}`,sandbox:"allow-scripts",onLoad:()=>o(!1)},`${L}:${d}`)]}):q.jsxs("div",{className:"canvas-empty",children:[q.jsx("p",{children:"Nothing generated yet."}),_&&q.jsxs("button",{className:"btn-primary canvas-visualize-cta","data-testid":"canvas-visualize-cta","data-tooltip":b??_.label,disabled:!!b,onClick:()=>Y(_),children:[q.jsx(ut,{name:"Sparkles",size:14})," Visualize"]}),q.jsxs("p",{className:"canvas-empty-hint",children:["Ask your agent to visualize, or write HTML directly to ",q.jsx("code",{children:".sapiom/canvas/index.html"})," — this pane hot-reloads whenever it changes."]})]}):q.jsx("div",{className:"canvas-empty",children:"Start a session to see its canvas here."})]})}function Jm(L,X){if(!L)return 0;const J=L.toLowerCase(),H=X.toLowerCase();let re=0,ue=0,Y=0;for(let u=0;u<J.length;u++){const f=J[u],d=H.indexOf(f,ue);if(d===-1)return null;Y=d===ue?Y+1:0,re+=10-Math.min(d-ue,8),re+=Y*3,d===0&&(re+=5),ue=d+1}return re}const eg={session:"Radio",workflow:"Folder",recent:"Folder",path:"Folder"};function tg({sessions:L,workflows:X,recentDirs:J,listDir:H,onSelectSession:re,onOpenPath:ue,onClose:Y}){const[u,f]=fe.useState(""),[d,p]=fe.useState([]),[h,g]=fe.useState(!1),[y,E]=fe.useState(0),v=fe.useRef(null);fe.useEffect(()=>{var _;(_=v.current)==null||_.focus()},[]);const o=u.startsWith("/")||u.startsWith("~");fe.useEffect(()=>{if(!o){p([]);return}let _=!1;g(!0);const b=setTimeout(()=>{H(u).then(C=>{_||p(C.dirs)}).catch(()=>{}).finally(()=>!_&&g(!1))},150);return()=>{_=!0,clearTimeout(b)}},[u,o,H]);const c=fe.useMemo(()=>{if(o){const A=u.trim(),B=A?[{id:`confirm:${A}`,kind:"path",label:A,meta:"Open this path",path:A}]:[],U=d.map(z=>({id:`dir:${z.path}`,kind:"path",label:z.name,meta:z.path,path:z.path}));return[...B,...U]}const _=L.filter(A=>A.status!=="exited").map(A=>({id:`session:${A.id}`,kind:"session",label:A.title,meta:A.cwd,sessionId:A.id})),b=X.map(A=>({id:`workflow:${A.path}`,kind:"workflow",label:A.name,meta:A.path,path:A.path})),C=new Set(X.map(A=>A.path)),w=J.filter(A=>!C.has(A)).map(A=>({id:`recent:${A}`,kind:"recent",label:A.split("/").filter(Boolean).pop()??A,meta:A,path:A})),m=[..._,...b,...w];return u?m.map(A=>({item:A,score:Jm(u,`${A.label} ${A.meta}`)})).filter(A=>A.score!==null).sort((A,B)=>B.score-A.score).map(A=>A.item).slice(0,20):m.slice(0,20)},[u,o,d,L,X,J]);fe.useEffect(()=>E(0),[c.length,u]);const n=_=>{_.kind==="session"&&_.sessionId?re(_.sessionId):_.path&&ue(_.path),Y()},l=_=>{if(_.key==="ArrowDown")_.preventDefault(),E(b=>Math.min(b+1,c.length-1));else if(_.key==="ArrowUp")_.preventDefault(),E(b=>Math.max(b-1,0));else if(_.key==="Enter"){_.preventDefault();const b=c[y];b&&n(b)}else _.key==="Escape"&&Y()};return q.jsx("div",{className:"modal-backdrop",onClick:Y,children:q.jsxs("div",{className:"modal command-palette",onClick:_=>_.stopPropagation(),children:[q.jsx("input",{ref:v,className:"command-palette-input","data-testid":"command-palette-input",placeholder:"Jump to a session, workflow, or path…",value:u,onChange:_=>f(_.target.value),onKeyDown:l}),q.jsxs("div",{className:"command-palette-list","data-testid":"command-palette-list",children:[o&&h&&q.jsx("div",{className:"command-palette-empty",children:"Loading…"}),c.length===0&&!h&&q.jsx("div",{className:"command-palette-empty",children:"No matches"}),c.map((_,b)=>q.jsxs("button",{type:"button",className:"command-palette-item"+(b===y?" is-selected":""),"data-testid":`command-palette-item-${b}`,onMouseEnter:()=>E(b),onClick:()=>n(_),children:[q.jsx(ut,{name:eg[_.kind],size:14}),q.jsx("span",{className:"command-palette-item-label",children:_.label}),q.jsx("span",{className:"command-palette-item-meta",children:_.meta})]},_.id))]})]})})}function ig({session:L,onResume:X,onClose:J}){return q.jsxs("div",{className:"dead-session-pane","data-testid":"dead-session-pane",children:[q.jsx("div",{className:"dead-session-title",children:"Session exited"}),q.jsxs("div",{className:"dead-session-meta",children:[L.cwd,L.exitCode!=null&&` · exit code ${L.exitCode}`]}),q.jsxs("div",{className:"dead-session-actions",children:[q.jsx("button",{className:"btn-primary","data-testid":"dead-session-resume",onClick:X,children:"Resume"}),q.jsx("button",{className:"btn-ghost","data-testid":"dead-session-close",onClick:J,children:"Close"})]})]})}function No(L,{onDismiss:X,containerRef:J,triggerRef:H}){fe.useEffect(()=>{if(!L)return;const re=Y=>{const u=J.current;u&&Y.target instanceof Node&&!u.contains(Y.target)&&X()},ue=Y=>{var u;Y.key==="Escape"&&(X(),(u=H==null?void 0:H.current)==null||u.focus())};return document.addEventListener("mousedown",re),document.addEventListener("keydown",ue),()=>{document.removeEventListener("mousedown",re),document.removeEventListener("keydown",ue)}},[L,X,J,H])}function sg({value:L,onChange:X,onSubmit:J,recentDirs:H,listDir:re}){const[ue,Y]=fe.useState(L),[u,f]=fe.useState([]),[d,p]=fe.useState(L),[h,g]=fe.useState(!1);fe.useEffect(()=>{let c=!1;g(!0);const n=setTimeout(()=>{re(L||void 0).then(l=>{c||(Y(l.path),f(l.dirs),p(l.parent))}).catch(()=>{}).finally(()=>!c&&g(!1))},150);return()=>{c=!0,clearTimeout(n)}},[L]);const y=L.startsWith(ue)?L.slice(ue.length).replace(/^\//,""):"",E=y?u.filter(c=>c.name.toLowerCase().startsWith(y.toLowerCase())):u,v=c=>X(c),o=c=>{c.key==="Enter"&&(E.length>0?v(E[0].path):J())};return q.jsxs("div",{className:"dir-picker",children:[q.jsxs("div",{className:"dir-picker-inputrow",children:[q.jsx("button",{type:"button",className:"dir-picker-up","data-testid":"dir-picker-up",disabled:d===ue,onClick:()=>v(d),title:"Up to parent directory",children:q.jsx(ut,{name:"CornerLeftUp",size:14})}),q.jsx("input",{id:"new-session-cwd",autoFocus:!0,className:"modal-input dir-picker-input","data-testid":"dir-picker-input",value:L,placeholder:"/path/to/project",onChange:c=>X(c.target.value),onKeyDown:o})]}),H.length>0&&q.jsx("div",{className:"recent-dirs",children:H.map(c=>q.jsx("button",{type:"button",className:"recent-dir-chip",onClick:()=>v(c),children:c},c))}),q.jsxs("div",{className:"dir-picker-listing","data-testid":"dir-picker-listing",children:[q.jsx("div",{className:"dir-picker-path",children:ue}),h&&q.jsx("div",{className:"dir-picker-empty",children:"Loading…"}),!h&&E.length===0&&q.jsx("div",{className:"dir-picker-empty",children:"No subdirectories"}),!h&&E.map(c=>q.jsxs("button",{type:"button",className:"dir-picker-item","data-testid":`dir-picker-item-${c.name}`,onClick:()=>v(c.path),children:[q.jsx(ut,{name:"Folder",size:13}),c.name]},c.path))]})]})}const rg=[{id:"claude-code",label:"Claude Code"},{id:"codex",label:"Codex"}];function hd({recentDirs:L,launchDir:X,listDir:J,onClose:H,onCreate:re,triggerRef:ue}){const[Y,u]=fe.useState(X??L[0]??""),[f,d]=fe.useState("claude-code"),[p,h]=fe.useState(!1),[g,y]=fe.useState(null),E=fe.useRef(null);No(!0,{onDismiss:H,containerRef:E,triggerRef:ue});const v=async()=>{const o=Y.trim();if(o){h(!0),y(null);try{await re(o,f),H()}catch(c){y(c.message)}finally{h(!1)}}};return q.jsx("div",{className:"modal-backdrop",children:q.jsxs("div",{className:"modal modal-new-session",ref:E,children:[q.jsx("div",{className:"modal-header",children:"New session"}),q.jsx("label",{className:"modal-label",htmlFor:"new-session-cwd",children:"Directory"}),q.jsx(sg,{value:Y,onChange:u,onSubmit:()=>void v(),recentDirs:L,listDir:J}),q.jsx("div",{className:"modal-label",children:"Harness"}),q.jsx("div",{className:"harness-picker",children:rg.map(o=>q.jsx("button",{type:"button",className:"harness-option"+(f===o.id?" is-selected":""),onClick:()=>d(o.id),children:o.label},o.id))}),g&&q.jsx("div",{className:"modal-error",children:g}),q.jsxs("div",{className:"modal-actions",children:[q.jsx("button",{className:"btn-ghost",onClick:H,disabled:p,children:"Cancel"}),q.jsx("button",{className:"btn-primary",onClick:()=>void v(),disabled:p||!Y.trim(),children:p?"Starting…":"Start session"})]})]})})}const ng="~/.sapiom/harness",ag={events:`${ng}/events.ndjson`};function lg({authenticated:L,organizationName:X,telemetryOptIn:J,onToggleTelemetry:H,onClose:re}){const[ue,Y]=fe.useState(!1),u=async()=>{Y(!0);try{await H(!J)}finally{Y(!1)}};return q.jsxs("div",{className:"settings-popover","data-testid":"settings-popover",children:[q.jsx("div",{className:"settings-identity",children:L?X??"Signed in":"Not signed in"}),q.jsxs("label",{className:"settings-toggle-row",children:[q.jsx("span",{children:"Send usage analytics to Sapiom"}),q.jsx("button",{type:"button",role:"switch","aria-checked":J,"data-testid":"telemetry-toggle",className:"toggle-switch"+(J?" is-on":""),disabled:ue,onClick:()=>void u(),children:q.jsx("span",{className:"toggle-knob"})})]}),q.jsxs("p",{className:"settings-note",children:["Prompts, tool calls, and session lifecycle events are always written locally to"," ",q.jsx("code",{children:ag.events}),". With your consent, they’re also sent to Sapiom."]}),q.jsx("button",{className:"btn-ghost settings-close",onClick:re,children:"Close"})]})}function og({sessions:L,activeSessionId:X,onSelectSession:J,onResumeHistory:H,history:re,historyLoading:ue,onOpenHistory:Y,recentDirs:u,launchDir:f,listDir:d,onCreateSession:p,boundWorkflowName:h,authenticated:g,organizationName:y,telemetryOptIn:E,onToggleTelemetry:v,busySessionIds:o}){const[c,n]=fe.useState(!1),[l,_]=fe.useState(!1),[b,C]=fe.useState(!1),w=fe.useRef(null),m=fe.useRef(null),A=fe.useRef(null),B=fe.useRef(null),U=fe.useRef(null),z=fe.useCallback(()=>n(!1),[]),O=fe.useCallback(()=>C(!1),[]);No(c,{onDismiss:z,containerRef:w,triggerRef:m}),No(b,{onDismiss:O,containerRef:A,triggerRef:B});const P=fe.useMemo(()=>L.filter(F=>F.status!=="exited").sort((F,ie)=>F.createdAt.localeCompare(ie.createdAt)),[L]),te=L.filter(F=>F.status==="exited"),I=()=>{const F=!c;if(n(F),F){const ie=L.find(k=>k.id===X)??null,x=(ie==null?void 0:ie.cwd)??u[0];x&&Y(x)}};return q.jsxs("div",{className:"session-bar",children:[q.jsxs("div",{className:"session-tabs",role:"tablist","data-testid":"session-tabs",children:[P.map(F=>{const ie=F.id===X;return q.jsxs("button",{role:"tab","aria-selected":ie,className:"session-tab"+(ie?" is-active":""),"data-testid":`session-tab-${F.id}`,onClick:()=>J(F.id),children:[q.jsx("span",{className:"session-dot","data-status":F.status}),q.jsx("span",{className:"session-tab-title",children:F.title}),o.has(F.id)&&q.jsx("span",{className:"session-tab-busy","data-testid":`session-tab-busy-${F.id}`,"aria-hidden":"true"}),ie&&h&&q.jsxs("span",{className:"session-workflow-chip","data-testid":"session-workflow-chip",children:["▸ working on ",h]})]},F.id)}),q.jsx("button",{ref:U,className:"session-tab-add","data-testid":"new-session-btn",onClick:()=>_(!0),"aria-label":"New session",title:"New session",children:q.jsx(ut,{name:"Plus",size:14})})]}),q.jsxs("div",{className:"session-history-wrap",ref:w,children:[q.jsxs("button",{ref:m,className:"session-history-trigger","data-testid":"history-trigger",onClick:I,"aria-label":"Session history",title:"Session history",children:[q.jsx(ut,{name:"History",size:14}),te.length>0&&q.jsx("span",{className:"session-history-badge","data-testid":"session-history-badge",children:te.length})]}),c&&q.jsxs("div",{className:"session-dropdown-menu","data-testid":"history-menu",children:[q.jsx("div",{className:"session-dropdown-section",children:"Exited"}),te.length===0&&q.jsx("div",{className:"session-dropdown-empty",children:"No exited sessions"}),te.map(F=>q.jsxs("button",{"data-testid":`exited-session-${F.id}`,className:"session-dropdown-item"+(F.id===X?" is-selected":""),onClick:()=>{J(F.id),n(!1)},children:[q.jsx("span",{className:"session-dot","data-status":F.status}),q.jsx("span",{className:"session-item-title",children:F.title}),q.jsx("span",{className:"session-item-cwd",children:F.cwd})]},F.id)),q.jsx("div",{className:"session-dropdown-section",children:"History"}),ue&&q.jsx("div",{className:"session-dropdown-empty",children:"Loading…"}),!ue&&re.length===0&&q.jsx("div",{className:"session-dropdown-empty",children:"No past sessions for this directory"}),!ue&&re.map(F=>q.jsxs("button",{className:"session-dropdown-item","data-testid":`history-${F.agentSessionId}`,onClick:()=>{H(F),n(!1)},children:[q.jsx("span",{className:"session-item-title",children:F.title}),q.jsxs("span",{className:"session-item-meta",children:[F.harness," · ",new Date(F.lastActiveAt).toLocaleString()]})]},F.agentSessionId))]})]}),q.jsxs("div",{className:"settings-wrap",ref:A,children:[q.jsx("button",{ref:B,className:"gear-btn","aria-label":"Settings","data-testid":"settings-trigger",onClick:()=>C(F=>!F),children:q.jsx(ut,{name:"Settings",size:16})}),b&&q.jsx(lg,{authenticated:g,organizationName:y,telemetryOptIn:E,onToggleTelemetry:v,onClose:()=>C(!1)})]}),l&&q.jsx(hd,{recentDirs:u,launchDir:f,listDir:d,onClose:()=>_(!1),onCreate:p,triggerRef:U})]})}var Lo={exports:{}},ed;function cg(){return ed||(ed=1,(function(L,X){(function(J,H){L.exports=H()})(globalThis,(()=>(()=>{var J={4567:function(Y,u,f){var d=this&&this.__decorate||function(n,l,_,b){var C,w=arguments.length,m=w<3?l:b===null?b=Object.getOwnPropertyDescriptor(l,_):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(n,l,_,b);else for(var A=n.length-1;A>=0;A--)(C=n[A])&&(m=(w<3?C(m):w>3?C(l,_,m):C(l,_))||m);return w>3&&m&&Object.defineProperty(l,_,m),m},p=this&&this.__param||function(n,l){return function(_,b){l(_,b,n)}};Object.defineProperty(u,"__esModule",{value:!0}),u.AccessibilityManager=void 0;const h=f(9042),g=f(9924),y=f(844),E=f(4725),v=f(2585),o=f(3656);let c=u.AccessibilityManager=class extends y.Disposable{constructor(n,l,_,b){super(),this._terminal=n,this._coreBrowserService=_,this._renderService=b,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let C=0;C<this._terminal.rows;C++)this._rowElements[C]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[C]);if(this._topBoundaryFocusListener=C=>this._handleBoundaryFocus(C,0),this._bottomBoundaryFocusListener=C=>this._handleBoundaryFocus(C,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new g.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((C=>this._handleResize(C.rows)))),this.register(this._terminal.onRender((C=>this._refreshRows(C.start,C.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((C=>this._handleChar(C)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
185
|
+
`)))),this.register(this._terminal.onA11yTab((C=>this._handleTab(C)))),this.register(this._terminal.onKey((C=>this._handleKey(C.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,o.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,y.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(n){for(let l=0;l<n;l++)this._handleChar(" ")}_handleChar(n){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==n&&(this._charsToAnnounce+=n):this._charsToAnnounce+=n,n===`
|
|
186
|
+
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=h.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(n){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(n)||this._charsToConsume.push(n)}_refreshRows(n,l){this._liveRegionDebouncer.refresh(n,l,this._terminal.rows)}_renderRows(n,l){const _=this._terminal.buffer,b=_.lines.length.toString();for(let C=n;C<=l;C++){const w=_.lines.get(_.ydisp+C),m=[],A=(w==null?void 0:w.translateToString(!0,void 0,void 0,m))||"",B=(_.ydisp+C+1).toString(),U=this._rowElements[C];U&&(A.length===0?(U.innerText=" ",this._rowColumns.set(U,[0,1])):(U.textContent=A,this._rowColumns.set(U,m)),U.setAttribute("aria-posinset",B),U.setAttribute("aria-setsize",b))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(n,l){const _=n.target,b=this._rowElements[l===0?1:this._rowElements.length-2];if(_.getAttribute("aria-posinset")===(l===0?"1":`${this._terminal.buffer.lines.length}`)||n.relatedTarget!==b)return;let C,w;if(l===0?(C=_,w=this._rowElements.pop(),this._rowContainer.removeChild(w)):(C=this._rowElements.shift(),w=_,this._rowContainer.removeChild(C)),C.removeEventListener("focus",this._topBoundaryFocusListener),w.removeEventListener("focus",this._bottomBoundaryFocusListener),l===0){const m=this._createAccessibilityTreeNode();this._rowElements.unshift(m),this._rowContainer.insertAdjacentElement("afterbegin",m)}else{const m=this._createAccessibilityTreeNode();this._rowElements.push(m),this._rowContainer.appendChild(m)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(l===0?-1:1),this._rowElements[l===0?1:this._rowElements.length-2].focus(),n.preventDefault(),n.stopImmediatePropagation()}_handleSelectionChange(){var A;if(this._rowElements.length===0)return;const n=document.getSelection();if(!n)return;if(n.isCollapsed)return void(this._rowContainer.contains(n.anchorNode)&&this._terminal.clearSelection());if(!n.anchorNode||!n.focusNode)return void console.error("anchorNode and/or focusNode are null");let l={node:n.anchorNode,offset:n.anchorOffset},_={node:n.focusNode,offset:n.focusOffset};if((l.node.compareDocumentPosition(_.node)&Node.DOCUMENT_POSITION_PRECEDING||l.node===_.node&&l.offset>_.offset)&&([l,_]=[_,l]),l.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(l={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(l.node))return;const b=this._rowElements.slice(-1)[0];if(_.node.compareDocumentPosition(b)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(_={node:b,offset:((A=b.textContent)==null?void 0:A.length)??0}),!this._rowContainer.contains(_.node))return;const C=({node:B,offset:U})=>{const z=B instanceof Text?B.parentNode:B;let O=parseInt(z==null?void 0:z.getAttribute("aria-posinset"),10)-1;if(isNaN(O))return console.warn("row is invalid. Race condition?"),null;const P=this._rowColumns.get(z);if(!P)return console.warn("columns is null. Race condition?"),null;let te=U<P.length?P[U]:P.slice(-1)[0]+1;return te>=this._terminal.cols&&(++O,te=0),{row:O,column:te}},w=C(l),m=C(_);if(w&&m){if(w.row>m.row||w.row===m.row&&w.column>=m.column)throw new Error("invalid range");this._terminal.select(w.column,w.row,(m.row-w.row)*this._terminal.cols-w.column+m.column)}}_handleResize(n){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let l=this._rowContainer.children.length;l<this._terminal.rows;l++)this._rowElements[l]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[l]);for(;this._rowElements.length>n;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const n=this._coreBrowserService.mainDocument.createElement("div");return n.setAttribute("role","listitem"),n.tabIndex=-1,this._refreshRowDimensions(n),n}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let n=0;n<this._terminal.rows;n++)this._refreshRowDimensions(this._rowElements[n])}}_refreshRowDimensions(n){n.style.height=`${this._renderService.dimensions.css.cell.height}px`}};u.AccessibilityManager=c=d([p(1,v.IInstantiationService),p(2,E.ICoreBrowserService),p(3,E.IRenderService)],c)},3614:(Y,u)=>{function f(g){return g.replace(/\r?\n/g,"\r")}function d(g,y){return y?"\x1B[200~"+g+"\x1B[201~":g}function p(g,y,E,v){g=d(g=f(g),E.decPrivateModes.bracketedPasteMode&&v.rawOptions.ignoreBracketedPasteMode!==!0),E.triggerDataEvent(g,!0),y.value=""}function h(g,y,E){const v=E.getBoundingClientRect(),o=g.clientX-v.left-10,c=g.clientY-v.top-10;y.style.width="20px",y.style.height="20px",y.style.left=`${o}px`,y.style.top=`${c}px`,y.style.zIndex="1000",y.focus()}Object.defineProperty(u,"__esModule",{value:!0}),u.rightClickHandler=u.moveTextAreaUnderMouseCursor=u.paste=u.handlePasteEvent=u.copyHandler=u.bracketTextForPaste=u.prepareTextForTerminal=void 0,u.prepareTextForTerminal=f,u.bracketTextForPaste=d,u.copyHandler=function(g,y){g.clipboardData&&g.clipboardData.setData("text/plain",y.selectionText),g.preventDefault()},u.handlePasteEvent=function(g,y,E,v){g.stopPropagation(),g.clipboardData&&p(g.clipboardData.getData("text/plain"),y,E,v)},u.paste=p,u.moveTextAreaUnderMouseCursor=h,u.rightClickHandler=function(g,y,E,v,o){h(g,y,E),o&&v.rightClickSelect(g),y.value=v.selectionText,y.select()}},7239:(Y,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ColorContrastCache=void 0;const d=f(1505);u.ColorContrastCache=class{constructor(){this._color=new d.TwoKeyMap,this._css=new d.TwoKeyMap}setCss(p,h,g){this._css.set(p,h,g)}getCss(p,h){return this._css.get(p,h)}setColor(p,h,g){this._color.set(p,h,g)}getColor(p,h){return this._color.get(p,h)}clear(){this._color.clear(),this._css.clear()}}},3656:(Y,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.addDisposableDomListener=void 0,u.addDisposableDomListener=function(f,d,p,h){f.addEventListener(d,p,h);let g=!1;return{dispose:()=>{g||(g=!0,f.removeEventListener(d,p,h))}}}},3551:function(Y,u,f){var d=this&&this.__decorate||function(c,n,l,_){var b,C=arguments.length,w=C<3?n:_===null?_=Object.getOwnPropertyDescriptor(n,l):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(c,n,l,_);else for(var m=c.length-1;m>=0;m--)(b=c[m])&&(w=(C<3?b(w):C>3?b(n,l,w):b(n,l))||w);return C>3&&w&&Object.defineProperty(n,l,w),w},p=this&&this.__param||function(c,n){return function(l,_){n(l,_,c)}};Object.defineProperty(u,"__esModule",{value:!0}),u.Linkifier=void 0;const h=f(3656),g=f(8460),y=f(844),E=f(2585),v=f(4725);let o=u.Linkifier=class extends y.Disposable{get currentLink(){return this._currentLink}constructor(c,n,l,_,b){super(),this._element=c,this._mouseService=n,this._renderService=l,this._bufferService=_,this._linkProviderService=b,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new g.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new g.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,y.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,y.toDisposable)((()=>{var C;this._lastMouseEvent=void 0,(C=this._activeProviderReplies)==null||C.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,h.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,h.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(c){this._lastMouseEvent=c;const n=this._positionFromMouseEvent(c,this._element,this._mouseService);if(!n)return;this._isMouseOut=!1;const l=c.composedPath();for(let _=0;_<l.length;_++){const b=l[_];if(b.classList.contains("xterm"))break;if(b.classList.contains("xterm-hover"))return}this._lastBufferCell&&n.x===this._lastBufferCell.x&&n.y===this._lastBufferCell.y||(this._handleHover(n),this._lastBufferCell=n)}_handleHover(c){if(this._activeLine!==c.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(c,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,c)||(this._clearCurrentLink(),this._askForLink(c,!0))}_askForLink(c,n){var _,b;this._activeProviderReplies&&n||((_=this._activeProviderReplies)==null||_.forEach((C=>{C==null||C.forEach((w=>{w.link.dispose&&w.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=c.y);let l=!1;for(const[C,w]of this._linkProviderService.linkProviders.entries())n?(b=this._activeProviderReplies)!=null&&b.get(C)&&(l=this._checkLinkProviderResult(C,c,l)):w.provideLinks(c.y,(m=>{var B,U;if(this._isMouseOut)return;const A=m==null?void 0:m.map((z=>({link:z})));(B=this._activeProviderReplies)==null||B.set(C,A),l=this._checkLinkProviderResult(C,c,l),((U=this._activeProviderReplies)==null?void 0:U.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(c.y,this._activeProviderReplies)}))}_removeIntersectingLinks(c,n){const l=new Set;for(let _=0;_<n.size;_++){const b=n.get(_);if(b)for(let C=0;C<b.length;C++){const w=b[C],m=w.link.range.start.y<c?0:w.link.range.start.x,A=w.link.range.end.y>c?this._bufferService.cols:w.link.range.end.x;for(let B=m;B<=A;B++){if(l.has(B)){b.splice(C--,1);break}l.add(B)}}}}_checkLinkProviderResult(c,n,l){var C;if(!this._activeProviderReplies)return l;const _=this._activeProviderReplies.get(c);let b=!1;for(let w=0;w<c;w++)this._activeProviderReplies.has(w)&&!this._activeProviderReplies.get(w)||(b=!0);if(!b&&_){const w=_.find((m=>this._linkAtPosition(m.link,n)));w&&(l=!0,this._handleNewLink(w))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!l)for(let w=0;w<this._activeProviderReplies.size;w++){const m=(C=this._activeProviderReplies.get(w))==null?void 0:C.find((A=>this._linkAtPosition(A.link,n)));if(m){l=!0,this._handleNewLink(m);break}}return l}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(c){if(!this._currentLink)return;const n=this._positionFromMouseEvent(c,this._element,this._mouseService);n&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,n)&&this._currentLink.link.activate(c,this._currentLink.link.text)}_clearCurrentLink(c,n){this._currentLink&&this._lastMouseEvent&&(!c||!n||this._currentLink.link.range.start.y>=c&&this._currentLink.link.range.end.y<=n)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,y.disposeArray)(this._linkCacheDisposables))}_handleNewLink(c){if(!this._lastMouseEvent)return;const n=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);n&&this._linkAtPosition(c.link,n)&&(this._currentLink=c,this._currentLink.state={decorations:{underline:c.link.decorations===void 0||c.link.decorations.underline,pointerCursor:c.link.decorations===void 0||c.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,c.link,this._lastMouseEvent),c.link.decorations={},Object.defineProperties(c.link.decorations,{pointerCursor:{get:()=>{var l,_;return(_=(l=this._currentLink)==null?void 0:l.state)==null?void 0:_.decorations.pointerCursor},set:l=>{var _;(_=this._currentLink)!=null&&_.state&&this._currentLink.state.decorations.pointerCursor!==l&&(this._currentLink.state.decorations.pointerCursor=l,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",l))}},underline:{get:()=>{var l,_;return(_=(l=this._currentLink)==null?void 0:l.state)==null?void 0:_.decorations.underline},set:l=>{var _,b,C;(_=this._currentLink)!=null&&_.state&&((C=(b=this._currentLink)==null?void 0:b.state)==null?void 0:C.decorations.underline)!==l&&(this._currentLink.state.decorations.underline=l,this._currentLink.state.isHovered&&this._fireUnderlineEvent(c.link,l))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((l=>{if(!this._currentLink)return;const _=l.start===0?0:l.start+1+this._bufferService.buffer.ydisp,b=this._bufferService.buffer.ydisp+1+l.end;if(this._currentLink.link.range.start.y>=_&&this._currentLink.link.range.end.y<=b&&(this._clearCurrentLink(_,b),this._lastMouseEvent)){const C=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);C&&this._askForLink(C,!1)}}))))}_linkHover(c,n,l){var _;(_=this._currentLink)!=null&&_.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(n,!0),this._currentLink.state.decorations.pointerCursor&&c.classList.add("xterm-cursor-pointer")),n.hover&&n.hover(l,n.text)}_fireUnderlineEvent(c,n){const l=c.range,_=this._bufferService.buffer.ydisp,b=this._createLinkUnderlineEvent(l.start.x-1,l.start.y-_-1,l.end.x,l.end.y-_-1,void 0);(n?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(b)}_linkLeave(c,n,l){var _;(_=this._currentLink)!=null&&_.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(n,!1),this._currentLink.state.decorations.pointerCursor&&c.classList.remove("xterm-cursor-pointer")),n.leave&&n.leave(l,n.text)}_linkAtPosition(c,n){const l=c.range.start.y*this._bufferService.cols+c.range.start.x,_=c.range.end.y*this._bufferService.cols+c.range.end.x,b=n.y*this._bufferService.cols+n.x;return l<=b&&b<=_}_positionFromMouseEvent(c,n,l){const _=l.getCoords(c,n,this._bufferService.cols,this._bufferService.rows);if(_)return{x:_[0],y:_[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(c,n,l,_,b){return{x1:c,y1:n,x2:l,y2:_,cols:this._bufferService.cols,fg:b}}};u.Linkifier=o=d([p(1,v.IMouseService),p(2,v.IRenderService),p(3,E.IBufferService),p(4,v.ILinkProviderService)],o)},9042:(Y,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.tooMuchOutput=u.promptLabel=void 0,u.promptLabel="Terminal input",u.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(Y,u,f){var d=this&&this.__decorate||function(v,o,c,n){var l,_=arguments.length,b=_<3?o:n===null?n=Object.getOwnPropertyDescriptor(o,c):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(v,o,c,n);else for(var C=v.length-1;C>=0;C--)(l=v[C])&&(b=(_<3?l(b):_>3?l(o,c,b):l(o,c))||b);return _>3&&b&&Object.defineProperty(o,c,b),b},p=this&&this.__param||function(v,o){return function(c,n){o(c,n,v)}};Object.defineProperty(u,"__esModule",{value:!0}),u.OscLinkProvider=void 0;const h=f(511),g=f(2585);let y=u.OscLinkProvider=class{constructor(v,o,c){this._bufferService=v,this._optionsService=o,this._oscLinkService=c}provideLinks(v,o){var A;const c=this._bufferService.buffer.lines.get(v-1);if(!c)return void o(void 0);const n=[],l=this._optionsService.rawOptions.linkHandler,_=new h.CellData,b=c.getTrimmedLength();let C=-1,w=-1,m=!1;for(let B=0;B<b;B++)if(w!==-1||c.hasContent(B)){if(c.loadCell(B,_),_.hasExtendedAttrs()&&_.extended.urlId){if(w===-1){w=B,C=_.extended.urlId;continue}m=_.extended.urlId!==C}else w!==-1&&(m=!0);if(m||w!==-1&&B===b-1){const U=(A=this._oscLinkService.getLinkData(C))==null?void 0:A.uri;if(U){const z={start:{x:w+1,y:v},end:{x:B+(m||B!==b-1?0:1),y:v}};let O=!1;if(!(l!=null&&l.allowNonHttpProtocols))try{const P=new URL(U);["http:","https:"].includes(P.protocol)||(O=!0)}catch{O=!0}O||n.push({text:U,range:z,activate:(P,te)=>l?l.activate(P,te,z):E(0,te),hover:(P,te)=>{var I;return(I=l==null?void 0:l.hover)==null?void 0:I.call(l,P,te,z)},leave:(P,te)=>{var I;return(I=l==null?void 0:l.leave)==null?void 0:I.call(l,P,te,z)}})}m=!1,_.hasExtendedAttrs()&&_.extended.urlId?(w=B,C=_.extended.urlId):(w=-1,C=-1)}}o(n)}};function E(v,o){if(confirm(`Do you want to navigate to ${o}?
|
|
187
|
+
|
|
188
|
+
WARNING: This link could potentially be dangerous`)){const c=window.open();if(c){try{c.opener=null}catch{}c.location.href=o}else console.warn("Opening link blocked as opener could not be cleared")}}u.OscLinkProvider=y=d([p(0,g.IBufferService),p(1,g.IOptionsService),p(2,g.IOscLinkService)],y)},6193:(Y,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.RenderDebouncer=void 0,u.RenderDebouncer=class{constructor(f,d){this._renderCallback=f,this._coreBrowserService=d,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(f){return this._refreshCallbacks.push(f),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(f,d,p){this._rowCount=p,f=f!==void 0?f:0,d=d!==void 0?d:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,f):f,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,d):d,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const f=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(f,d),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const f of this._refreshCallbacks)f(0);this._refreshCallbacks=[]}}},3236:(Y,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Terminal=void 0;const d=f(3614),p=f(3656),h=f(3551),g=f(9042),y=f(3730),E=f(1680),v=f(3107),o=f(5744),c=f(2950),n=f(1296),l=f(428),_=f(4269),b=f(5114),C=f(8934),w=f(3230),m=f(9312),A=f(4725),B=f(6731),U=f(8055),z=f(8969),O=f(8460),P=f(844),te=f(6114),I=f(8437),F=f(2584),ie=f(7399),x=f(5941),k=f(9074),D=f(2585),T=f(5435),N=f(4567),G=f(779);class ee extends z.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(K={}){super(K),this.browser=te,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new P.MutableDisposable),this._onCursorMove=this.register(new O.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new O.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new O.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new O.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new O.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new O.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new O.EventEmitter),this._onBlur=this.register(new O.EventEmitter),this._onA11yCharEmitter=this.register(new O.EventEmitter),this._onA11yTabEmitter=this.register(new O.EventEmitter),this._onWillOpen=this.register(new O.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(k.DecorationService),this._instantiationService.setService(D.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(G.LinkProviderService),this._instantiationService.setService(A.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(y.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((M,oe)=>this.refresh(M,oe)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((M=>this._reportWindowsOptions(M)))),this.register(this._inputHandler.onColor((M=>this._handleColorEvent(M)))),this.register((0,O.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,O.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,O.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,O.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((M=>this._afterResize(M.cols,M.rows)))),this.register((0,P.toDisposable)((()=>{var M,oe;this._customKeyEventHandler=void 0,(oe=(M=this.element)==null?void 0:M.parentNode)==null||oe.removeChild(this.element)})))}_handleColorEvent(K){if(this._themeService)for(const M of K){let oe,ne="";switch(M.index){case 256:oe="foreground",ne="10";break;case 257:oe="background",ne="11";break;case 258:oe="cursor",ne="12";break;default:oe="ansi",ne="4;"+M.index}switch(M.type){case 0:const _e=U.color.toColorRGB(oe==="ansi"?this._themeService.colors.ansi[M.index]:this._themeService.colors[oe]);this.coreService.triggerDataEvent(`${F.C0.ESC}]${ne};${(0,x.toRgbString)(_e)}${F.C1_ESCAPED.ST}`);break;case 1:if(oe==="ansi")this._themeService.modifyColors((de=>de.ansi[M.index]=U.channels.toColor(...M.color)));else{const de=oe;this._themeService.modifyColors((we=>we[de]=U.channels.toColor(...M.color)))}break;case 2:this._themeService.restoreColor(M.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(K){K?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(N.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(K){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(F.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var K;return(K=this.textarea)==null?void 0:K.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(F.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const K=this.buffer.ybase+this.buffer.y,M=this.buffer.lines.get(K);if(!M)return;const oe=Math.min(this.buffer.x,this.cols-1),ne=this._renderService.dimensions.css.cell.height,_e=M.getWidth(oe),de=this._renderService.dimensions.css.cell.width*_e,we=this.buffer.y*this._renderService.dimensions.css.cell.height,ke=oe*this._renderService.dimensions.css.cell.width;this.textarea.style.left=ke+"px",this.textarea.style.top=we+"px",this.textarea.style.width=de+"px",this.textarea.style.height=ne+"px",this.textarea.style.lineHeight=ne+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,p.addDisposableDomListener)(this.element,"copy",(M=>{this.hasSelection()&&(0,d.copyHandler)(M,this._selectionService)})));const K=M=>(0,d.handlePasteEvent)(M,this.textarea,this.coreService,this.optionsService);this.register((0,p.addDisposableDomListener)(this.textarea,"paste",K)),this.register((0,p.addDisposableDomListener)(this.element,"paste",K)),te.isFirefox?this.register((0,p.addDisposableDomListener)(this.element,"mousedown",(M=>{M.button===2&&(0,d.rightClickHandler)(M,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,p.addDisposableDomListener)(this.element,"contextmenu",(M=>{(0,d.rightClickHandler)(M,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),te.isLinux&&this.register((0,p.addDisposableDomListener)(this.element,"auxclick",(M=>{M.button===1&&(0,d.moveTextAreaUnderMouseCursor)(M,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,p.addDisposableDomListener)(this.textarea,"keyup",(K=>this._keyUp(K)),!0)),this.register((0,p.addDisposableDomListener)(this.textarea,"keydown",(K=>this._keyDown(K)),!0)),this.register((0,p.addDisposableDomListener)(this.textarea,"keypress",(K=>this._keyPress(K)),!0)),this.register((0,p.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,p.addDisposableDomListener)(this.textarea,"compositionupdate",(K=>this._compositionHelper.compositionupdate(K)))),this.register((0,p.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,p.addDisposableDomListener)(this.textarea,"input",(K=>this._inputEvent(K)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(K){var oe;if(!K)throw new Error("Terminal requires a parent element.");if(K.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((oe=this.element)==null?void 0:oe.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=K.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),K.appendChild(this.element);const M=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),M.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,p.addDisposableDomListener)(this.screenElement,"mousemove",(ne=>this.updateCursorStyle(ne)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),M.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",g.promptLabel),te.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(b.CoreBrowserService,this.textarea,K.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(A.ICoreBrowserService,this._coreBrowserService),this.register((0,p.addDisposableDomListener)(this.textarea,"focus",(ne=>this._handleTextAreaFocus(ne)))),this.register((0,p.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(l.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(A.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(B.ThemeService),this._instantiationService.setService(A.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(_.CharacterJoinerService),this._instantiationService.setService(A.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(w.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(A.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((ne=>this._onRender.fire(ne)))),this.onResize((ne=>this._renderService.resize(ne.cols,ne.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(c.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(C.MouseService),this._instantiationService.setService(A.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(h.Linkifier,this.screenElement)),this.element.appendChild(M);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(E.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((ne=>this.scrollLines(ne.amount,ne.suppressScrollEvent,1))),this.register(this._inputHandler.onRequestSyncScrollBar((()=>this.viewport.syncScrollArea()))),this.register(this.viewport),this.register(this.onCursorMove((()=>{this._renderService.handleCursorMove(),this._syncTextArea()}))),this.register(this.onResize((()=>this._renderService.handleResize(this.cols,this.rows)))),this.register(this.onBlur((()=>this._renderService.handleBlur()))),this.register(this.onFocus((()=>this._renderService.handleFocus()))),this.register(this._renderService.onDimensionsChange((()=>this.viewport.syncScrollArea()))),this._selectionService=this.register(this._instantiationService.createInstance(m.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(A.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((ne=>this.scrollLines(ne.amount,ne.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((ne=>this._renderService.handleSelectionChanged(ne.start,ne.end,ne.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((ne=>{this.textarea.value=ne,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((ne=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,p.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(v.BufferDecorationRenderer,this.screenElement)),this.register((0,p.addDisposableDomListener)(this.element,"mousedown",(ne=>this._selectionService.handleMouseDown(ne)))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(N.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(ne=>this._handleScreenReaderModeOptionChange(ne)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(o.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(ne=>{!this._overviewRulerRenderer&&ne&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(o.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(n.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const K=this,M=this.element;function oe(de){const we=K._mouseService.getMouseReportCoords(de,K.screenElement);if(!we)return!1;let ke,je;switch(de.overrideType||de.type){case"mousemove":je=32,de.buttons===void 0?(ke=3,de.button!==void 0&&(ke=de.button<3?de.button:3)):ke=1&de.buttons?0:4&de.buttons?1:2&de.buttons?2:3;break;case"mouseup":je=0,ke=de.button<3?de.button:3;break;case"mousedown":je=1,ke=de.button<3?de.button:3;break;case"wheel":if(K._customWheelEventHandler&&K._customWheelEventHandler(de)===!1||K.viewport.getLinesScrolled(de)===0)return!1;je=de.deltaY<0?0:1,ke=4;break;default:return!1}return!(je===void 0||ke===void 0||ke>4)&&K.coreMouseService.triggerMouseEvent({col:we.col,row:we.row,x:we.x,y:we.y,button:ke,action:je,ctrl:de.ctrlKey,alt:de.altKey,shift:de.shiftKey})}const ne={mouseup:null,wheel:null,mousedrag:null,mousemove:null},_e={mouseup:de=>(oe(de),de.buttons||(this._document.removeEventListener("mouseup",ne.mouseup),ne.mousedrag&&this._document.removeEventListener("mousemove",ne.mousedrag)),this.cancel(de)),wheel:de=>(oe(de),this.cancel(de,!0)),mousedrag:de=>{de.buttons&&oe(de)},mousemove:de=>{de.buttons||oe(de)}};this.register(this.coreMouseService.onProtocolChange((de=>{de?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(de)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&de?ne.mousemove||(M.addEventListener("mousemove",_e.mousemove),ne.mousemove=_e.mousemove):(M.removeEventListener("mousemove",ne.mousemove),ne.mousemove=null),16&de?ne.wheel||(M.addEventListener("wheel",_e.wheel,{passive:!1}),ne.wheel=_e.wheel):(M.removeEventListener("wheel",ne.wheel),ne.wheel=null),2&de?ne.mouseup||(ne.mouseup=_e.mouseup):(this._document.removeEventListener("mouseup",ne.mouseup),ne.mouseup=null),4&de?ne.mousedrag||(ne.mousedrag=_e.mousedrag):(this._document.removeEventListener("mousemove",ne.mousedrag),ne.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,p.addDisposableDomListener)(M,"mousedown",(de=>{if(de.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(de))return oe(de),ne.mouseup&&this._document.addEventListener("mouseup",ne.mouseup),ne.mousedrag&&this._document.addEventListener("mousemove",ne.mousedrag),this.cancel(de)}))),this.register((0,p.addDisposableDomListener)(M,"wheel",(de=>{if(!ne.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(de)===!1)return!1;if(!this.buffer.hasScrollback){const we=this.viewport.getLinesScrolled(de);if(we===0)return;const ke=F.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(de.deltaY<0?"A":"B");let je="";for(let tt=0;tt<Math.abs(we);tt++)je+=ke;return this.coreService.triggerDataEvent(je,!0),this.cancel(de,!0)}return this.viewport.handleWheel(de)?this.cancel(de):void 0}}),{passive:!1})),this.register((0,p.addDisposableDomListener)(M,"touchstart",(de=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(de),this.cancel(de)}),{passive:!0})),this.register((0,p.addDisposableDomListener)(M,"touchmove",(de=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(de)?void 0:this.cancel(de)}),{passive:!1}))}refresh(K,M){var oe;(oe=this._renderService)==null||oe.refreshRows(K,M)}updateCursorStyle(K){var M;(M=this._selectionService)!=null&&M.shouldColumnSelect(K)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(K,M,oe=0){var ne;oe===1?(super.scrollLines(K,M,oe),this.refresh(0,this.rows-1)):(ne=this.viewport)==null||ne.scrollLines(K)}paste(K){(0,d.paste)(K,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(K){this._customKeyEventHandler=K}attachCustomWheelEventHandler(K){this._customWheelEventHandler=K}registerLinkProvider(K){return this._linkProviderService.registerLinkProvider(K)}registerCharacterJoiner(K){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const M=this._characterJoinerService.register(K);return this.refresh(0,this.rows-1),M}deregisterCharacterJoiner(K){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(K)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(K){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+K)}registerDecoration(K){return this._decorationService.registerDecoration(K)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(K,M,oe){this._selectionService.setSelection(K,M,oe)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){var K;(K=this._selectionService)==null||K.clearSelection()}selectAll(){var K;(K=this._selectionService)==null||K.selectAll()}selectLines(K,M){var oe;(oe=this._selectionService)==null||oe.selectLines(K,M)}_keyDown(K){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(K)===!1)return!1;const M=this.browser.isMac&&this.options.macOptionIsMeta&&K.altKey;if(!M&&!this._compositionHelper.keydown(K))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;M||K.key!=="Dead"&&K.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const oe=(0,ie.evaluateKeyboardEvent)(K,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(K),oe.type===3||oe.type===2){const ne=this.rows-1;return this.scrollLines(oe.type===2?-ne:ne),this.cancel(K,!0)}return oe.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,K)||(oe.cancel&&this.cancel(K,!0),!oe.key||!!(K.key&&!K.ctrlKey&&!K.altKey&&!K.metaKey&&K.key.length===1&&K.key.charCodeAt(0)>=65&&K.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(oe.key!==F.C0.ETX&&oe.key!==F.C0.CR||(this.textarea.value=""),this._onKey.fire({key:oe.key,domEvent:K}),this._showCursor(),this.coreService.triggerDataEvent(oe.key,!0),!this.optionsService.rawOptions.screenReaderMode||K.altKey||K.ctrlKey?this.cancel(K,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(K,M){const oe=K.isMac&&!this.options.macOptionIsMeta&&M.altKey&&!M.ctrlKey&&!M.metaKey||K.isWindows&&M.altKey&&M.ctrlKey&&!M.metaKey||K.isWindows&&M.getModifierState("AltGraph");return M.type==="keypress"?oe:oe&&(!M.keyCode||M.keyCode>47)}_keyUp(K){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(K)===!1||((function(M){return M.keyCode===16||M.keyCode===17||M.keyCode===18})(K)||this.focus(),this.updateCursorStyle(K),this._keyPressHandled=!1)}_keyPress(K){let M;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(K)===!1)return!1;if(this.cancel(K),K.charCode)M=K.charCode;else if(K.which===null||K.which===void 0)M=K.keyCode;else{if(K.which===0||K.charCode===0)return!1;M=K.which}return!(!M||(K.altKey||K.ctrlKey||K.metaKey)&&!this._isThirdLevelShift(this.browser,K)||(M=String.fromCharCode(M),this._onKey.fire({key:M,domEvent:K}),this._showCursor(),this.coreService.triggerDataEvent(M,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(K){if(K.data&&K.inputType==="insertText"&&(!K.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const M=K.data;return this.coreService.triggerDataEvent(M,!0),this.cancel(K),!0}return!1}resize(K,M){K!==this.cols||M!==this.rows?super.resize(K,M):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(K,M){var oe,ne;(oe=this._charSizeService)==null||oe.measure(),(ne=this.viewport)==null||ne.syncScrollArea(!0)}clear(){var K;if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let M=1;M<this.rows;M++)this.buffer.lines.push(this.buffer.getBlankLine(I.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(K=this.viewport)==null||K.reset(),this.refresh(0,this.rows-1)}}reset(){var M,oe;this.options.rows=this.rows,this.options.cols=this.cols;const K=this._customKeyEventHandler;this._setup(),super.reset(),(M=this._selectionService)==null||M.reset(),this._decorationService.reset(),(oe=this.viewport)==null||oe.reset(),this._customKeyEventHandler=K,this.refresh(0,this.rows-1)}clearTextureAtlas(){var K;(K=this._renderService)==null||K.clearTextureAtlas()}_reportFocus(){var K;(K=this.element)!=null&&K.classList.contains("focus")?this.coreService.triggerDataEvent(F.C0.ESC+"[I"):this.coreService.triggerDataEvent(F.C0.ESC+"[O")}_reportWindowsOptions(K){if(this._renderService)switch(K){case T.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const M=this._renderService.dimensions.css.canvas.width.toFixed(0),oe=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${F.C0.ESC}[4;${oe};${M}t`);break;case T.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const ne=this._renderService.dimensions.css.cell.width.toFixed(0),_e=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${F.C0.ESC}[6;${_e};${ne}t`)}}cancel(K,M){if(this.options.cancelEvents||M)return K.preventDefault(),K.stopPropagation(),!1}}u.Terminal=ee},9924:(Y,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.TimeBasedDebouncer=void 0,u.TimeBasedDebouncer=class{constructor(f,d=1e3){this._renderCallback=f,this._debounceThresholdMS=d,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(f,d,p){this._rowCount=p,f=f!==void 0?f:0,d=d!==void 0?d:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,f):f,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,d):d;const h=Date.now();if(h-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=h,this._innerRefresh();else if(!this._additionalRefreshRequested){const g=h-this._lastRefreshMs,y=this._debounceThresholdMS-g;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),y)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const f=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(f,d)}}},1680:function(Y,u,f){var d=this&&this.__decorate||function(c,n,l,_){var b,C=arguments.length,w=C<3?n:_===null?_=Object.getOwnPropertyDescriptor(n,l):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(c,n,l,_);else for(var m=c.length-1;m>=0;m--)(b=c[m])&&(w=(C<3?b(w):C>3?b(n,l,w):b(n,l))||w);return C>3&&w&&Object.defineProperty(n,l,w),w},p=this&&this.__param||function(c,n){return function(l,_){n(l,_,c)}};Object.defineProperty(u,"__esModule",{value:!0}),u.Viewport=void 0;const h=f(3656),g=f(4725),y=f(8460),E=f(844),v=f(2585);let o=u.Viewport=class extends E.Disposable{constructor(c,n,l,_,b,C,w,m){super(),this._viewportElement=c,this._scrollArea=n,this._bufferService=l,this._optionsService=_,this._charSizeService=b,this._renderService=C,this._coreBrowserService=w,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new y.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,h.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((A=>this._activeBuffer=A.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((A=>this._renderDimensions=A))),this._handleThemeChange(m.colors),this.register(m.onChangeColors((A=>this._handleThemeChange(A)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(c){this._viewportElement.style.backgroundColor=c.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame((()=>this.syncScrollArea()))}_refresh(c){if(c)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const n=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==n&&(this._lastRecordedBufferHeight=n,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const c=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==c&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=c),this._refreshAnimationFrame=null}syncScrollArea(c=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(c);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(c)}_handleScroll(c){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const n=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:n,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const c=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(c*(this._smoothScrollState.target-this._smoothScrollState.origin)),c<1?this._coreBrowserService.window.requestAnimationFrame((()=>this._smoothScroll())):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(c,n){const l=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(n<0&&this._viewportElement.scrollTop!==0||n>0&&l<this._lastRecordedBufferHeight)||(c.cancelable&&c.preventDefault(),!1)}handleWheel(c){const n=this._getPixelsScrolled(c);return n!==0&&(this._optionsService.rawOptions.smoothScrollDuration?(this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target===-1?this._smoothScrollState.target=this._viewportElement.scrollTop+n:this._smoothScrollState.target+=n,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=n,this._bubbleScroll(c,n))}scrollLines(c){if(c!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const n=c*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+n,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:c,suppressScrollEvent:!1})}_getPixelsScrolled(c){if(c.deltaY===0||c.shiftKey)return 0;let n=this._applyScrollModifier(c.deltaY,c);return c.deltaMode===WheelEvent.DOM_DELTA_LINE?n*=this._currentRowHeight:c.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(n*=this._currentRowHeight*this._bufferService.rows),n}getBufferElements(c,n){var m;let l,_="";const b=[],C=n??this._bufferService.buffer.lines.length,w=this._bufferService.buffer.lines;for(let A=c;A<C;A++){const B=w.get(A);if(!B)continue;const U=(m=w.get(A+1))==null?void 0:m.isWrapped;if(_+=B.translateToString(!U),!U||A===w.length-1){const z=document.createElement("div");z.textContent=_,b.push(z),_.length>0&&(l=z),_=""}}return{bufferElements:b,cursorElement:l}}getLinesScrolled(c){if(c.deltaY===0||c.shiftKey)return 0;let n=this._applyScrollModifier(c.deltaY,c);return c.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(n/=this._currentRowHeight+0,this._wheelPartialScroll+=n,n=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):c.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(n*=this._bufferService.rows),n}_applyScrollModifier(c,n){const l=this._optionsService.rawOptions.fastScrollModifier;return l==="alt"&&n.altKey||l==="ctrl"&&n.ctrlKey||l==="shift"&&n.shiftKey?c*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:c*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(c){this._lastTouchY=c.touches[0].pageY}handleTouchMove(c){const n=this._lastTouchY-c.touches[0].pageY;return this._lastTouchY=c.touches[0].pageY,n!==0&&(this._viewportElement.scrollTop+=n,this._bubbleScroll(c,n))}};u.Viewport=o=d([p(2,v.IBufferService),p(3,v.IOptionsService),p(4,g.ICharSizeService),p(5,g.IRenderService),p(6,g.ICoreBrowserService),p(7,g.IThemeService)],o)},3107:function(Y,u,f){var d=this&&this.__decorate||function(v,o,c,n){var l,_=arguments.length,b=_<3?o:n===null?n=Object.getOwnPropertyDescriptor(o,c):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(v,o,c,n);else for(var C=v.length-1;C>=0;C--)(l=v[C])&&(b=(_<3?l(b):_>3?l(o,c,b):l(o,c))||b);return _>3&&b&&Object.defineProperty(o,c,b),b},p=this&&this.__param||function(v,o){return function(c,n){o(c,n,v)}};Object.defineProperty(u,"__esModule",{value:!0}),u.BufferDecorationRenderer=void 0;const h=f(4725),g=f(844),y=f(2585);let E=u.BufferDecorationRenderer=class extends g.Disposable{constructor(v,o,c,n,l){super(),this._screenElement=v,this._bufferService=o,this._coreBrowserService=c,this._decorationService=n,this._renderService=l,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange((()=>this._doRefreshDecorations()))),this.register(this._renderService.onDimensionsChange((()=>{this._dimensionsChanged=!0,this._queueRefresh()}))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt}))),this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh()))),this.register(this._decorationService.onDecorationRemoved((_=>this._removeDecoration(_)))),this.register((0,g.toDisposable)((()=>{this._container.remove(),this._decorationElements.clear()})))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback((()=>{this._doRefreshDecorations(),this._animationFrame=void 0})))}_doRefreshDecorations(){for(const v of this._decorationService.decorations)this._renderDecoration(v);this._dimensionsChanged=!1}_renderDecoration(v){this._refreshStyle(v),this._dimensionsChanged&&this._refreshXPosition(v)}_createElement(v){var n;const o=this._coreBrowserService.mainDocument.createElement("div");o.classList.add("xterm-decoration"),o.classList.toggle("xterm-decoration-top-layer",((n=v==null?void 0:v.options)==null?void 0:n.layer)==="top"),o.style.width=`${Math.round((v.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,o.style.height=(v.options.height||1)*this._renderService.dimensions.css.cell.height+"px",o.style.top=(v.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",o.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const c=v.options.x??0;return c&&c>this._bufferService.cols&&(o.style.display="none"),this._refreshXPosition(v,o),o}_refreshStyle(v){const o=v.marker.line-this._bufferService.buffers.active.ydisp;if(o<0||o>=this._bufferService.rows)v.element&&(v.element.style.display="none",v.onRenderEmitter.fire(v.element));else{let c=this._decorationElements.get(v);c||(c=this._createElement(v),v.element=c,this._decorationElements.set(v,c),this._container.appendChild(c),v.onDispose((()=>{this._decorationElements.delete(v),c.remove()}))),c.style.top=o*this._renderService.dimensions.css.cell.height+"px",c.style.display=this._altBufferIsActive?"none":"block",v.onRenderEmitter.fire(c)}}_refreshXPosition(v,o=v.element){if(!o)return;const c=v.options.x??0;(v.options.anchor||"left")==="right"?o.style.right=c?c*this._renderService.dimensions.css.cell.width+"px":"":o.style.left=c?c*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(v){var o;(o=this._decorationElements.get(v))==null||o.remove(),this._decorationElements.delete(v),v.dispose()}};u.BufferDecorationRenderer=E=d([p(1,y.IBufferService),p(2,h.ICoreBrowserService),p(3,y.IDecorationService),p(4,h.IRenderService)],E)},5871:(Y,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ColorZoneStore=void 0,u.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(f){if(f.options.overviewRulerOptions){for(const d of this._zones)if(d.color===f.options.overviewRulerOptions.color&&d.position===f.options.overviewRulerOptions.position){if(this._lineIntersectsZone(d,f.marker.line))return;if(this._lineAdjacentToZone(d,f.marker.line,f.options.overviewRulerOptions.position))return void this._addLineToZone(d,f.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=f.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=f.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=f.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=f.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:f.options.overviewRulerOptions.color,position:f.options.overviewRulerOptions.position,startBufferLine:f.marker.line,endBufferLine:f.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(f){this._linePadding=f}_lineIntersectsZone(f,d){return d>=f.startBufferLine&&d<=f.endBufferLine}_lineAdjacentToZone(f,d,p){return d>=f.startBufferLine-this._linePadding[p||"full"]&&d<=f.endBufferLine+this._linePadding[p||"full"]}_addLineToZone(f,d){f.startBufferLine=Math.min(f.startBufferLine,d),f.endBufferLine=Math.max(f.endBufferLine,d)}}},5744:function(Y,u,f){var d=this&&this.__decorate||function(l,_,b,C){var w,m=arguments.length,A=m<3?_:C===null?C=Object.getOwnPropertyDescriptor(_,b):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(l,_,b,C);else for(var B=l.length-1;B>=0;B--)(w=l[B])&&(A=(m<3?w(A):m>3?w(_,b,A):w(_,b))||A);return m>3&&A&&Object.defineProperty(_,b,A),A},p=this&&this.__param||function(l,_){return function(b,C){_(b,C,l)}};Object.defineProperty(u,"__esModule",{value:!0}),u.OverviewRulerRenderer=void 0;const h=f(5871),g=f(4725),y=f(844),E=f(2585),v={full:0,left:0,center:0,right:0},o={full:0,left:0,center:0,right:0},c={full:0,left:0,center:0,right:0};let n=u.OverviewRulerRenderer=class extends y.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(l,_,b,C,w,m,A){var U;super(),this._viewportElement=l,this._screenElement=_,this._bufferService=b,this._decorationService=C,this._renderService=w,this._optionsService=m,this._coreBrowserService=A,this._colorZoneStore=new h.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(U=this._viewportElement.parentElement)==null||U.insertBefore(this._canvas,this._viewportElement);const B=this._canvas.getContext("2d");if(!B)throw new Error("Ctx cannot be null");this._ctx=B,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,y.toDisposable)((()=>{var z;(z=this._canvas)==null||z.remove()})))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh(void 0,!0)))),this.register(this._decorationService.onDecorationRemoved((()=>this._queueRefresh(void 0,!0))))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"}))),this.register(this._bufferService.onScroll((()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender((()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)}))),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",(()=>this._queueRefresh(!0)))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh(!0)))),this._queueRefresh(!0)}_refreshDrawConstants(){const l=Math.floor(this._canvas.width/3),_=Math.ceil(this._canvas.width/3);o.full=this._canvas.width,o.left=l,o.center=_,o.right=l,this._refreshDrawHeightConstants(),c.full=0,c.left=0,c.center=o.left,c.right=o.left+o.center}_refreshDrawHeightConstants(){v.full=Math.round(2*this._coreBrowserService.dpr);const l=this._canvas.height/this._bufferService.buffer.lines.length,_=Math.round(Math.max(Math.min(l,12),6)*this._coreBrowserService.dpr);v.left=_,v.center=_,v.right=_}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*v.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*v.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*v.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*v.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(const _ of this._decorationService.decorations)this._colorZoneStore.addDecoration(_);this._ctx.lineWidth=1;const l=this._colorZoneStore.zones;for(const _ of l)_.position!=="full"&&this._renderColorZone(_);for(const _ of l)_.position==="full"&&this._renderColorZone(_);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(l){this._ctx.fillStyle=l.color,this._ctx.fillRect(c[l.position||"full"],Math.round((this._canvas.height-1)*(l.startBufferLine/this._bufferService.buffers.active.lines.length)-v[l.position||"full"]/2),o[l.position||"full"],Math.round((this._canvas.height-1)*((l.endBufferLine-l.startBufferLine)/this._bufferService.buffers.active.lines.length)+v[l.position||"full"]))}_queueRefresh(l,_){this._shouldUpdateDimensions=l||this._shouldUpdateDimensions,this._shouldUpdateAnchor=_||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};u.OverviewRulerRenderer=n=d([p(2,E.IBufferService),p(3,E.IDecorationService),p(4,g.IRenderService),p(5,E.IOptionsService),p(6,g.ICoreBrowserService)],n)},2950:function(Y,u,f){var d=this&&this.__decorate||function(v,o,c,n){var l,_=arguments.length,b=_<3?o:n===null?n=Object.getOwnPropertyDescriptor(o,c):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(v,o,c,n);else for(var C=v.length-1;C>=0;C--)(l=v[C])&&(b=(_<3?l(b):_>3?l(o,c,b):l(o,c))||b);return _>3&&b&&Object.defineProperty(o,c,b),b},p=this&&this.__param||function(v,o){return function(c,n){o(c,n,v)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CompositionHelper=void 0;const h=f(4725),g=f(2585),y=f(2584);let E=u.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(v,o,c,n,l,_){this._textarea=v,this._compositionView=o,this._bufferService=c,this._optionsService=n,this._coreService=l,this._renderService=_,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(v){this._compositionView.textContent=v.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(v){if(this._isComposing||this._isSendingComposition){if(v.keyCode===229||v.keyCode===16||v.keyCode===17||v.keyCode===18)return!1;this._finalizeComposition(!1)}return v.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(v){if(this._compositionView.classList.remove("active"),this._isComposing=!1,v){const o={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let c;this._isSendingComposition=!1,o.start+=this._dataAlreadySent.length,c=this._isComposing?this._textarea.value.substring(o.start,o.end):this._textarea.value.substring(o.start),c.length>0&&this._coreService.triggerDataEvent(c,!0)}}),0)}else{this._isSendingComposition=!1;const o=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(o,!0)}}_handleAnyTextareaChanges(){const v=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const o=this._textarea.value,c=o.replace(v,"");this._dataAlreadySent=c,o.length>v.length?this._coreService.triggerDataEvent(c,!0):o.length<v.length?this._coreService.triggerDataEvent(`${y.C0.DEL}`,!0):o.length===v.length&&o!==v&&this._coreService.triggerDataEvent(o,!0)}}),0)}updateCompositionElements(v){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const o=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),c=this._renderService.dimensions.css.cell.height,n=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,l=o*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=l+"px",this._compositionView.style.top=n+"px",this._compositionView.style.height=c+"px",this._compositionView.style.lineHeight=c+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const _=this._compositionView.getBoundingClientRect();this._textarea.style.left=l+"px",this._textarea.style.top=n+"px",this._textarea.style.width=Math.max(_.width,1)+"px",this._textarea.style.height=Math.max(_.height,1)+"px",this._textarea.style.lineHeight=_.height+"px"}v||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};u.CompositionHelper=E=d([p(2,g.IBufferService),p(3,g.IOptionsService),p(4,g.ICoreService),p(5,h.IRenderService)],E)},9806:(Y,u)=>{function f(d,p,h){const g=h.getBoundingClientRect(),y=d.getComputedStyle(h),E=parseInt(y.getPropertyValue("padding-left")),v=parseInt(y.getPropertyValue("padding-top"));return[p.clientX-g.left-E,p.clientY-g.top-v]}Object.defineProperty(u,"__esModule",{value:!0}),u.getCoords=u.getCoordsRelativeToElement=void 0,u.getCoordsRelativeToElement=f,u.getCoords=function(d,p,h,g,y,E,v,o,c){if(!E)return;const n=f(d,p,h);return n?(n[0]=Math.ceil((n[0]+(c?v/2:0))/v),n[1]=Math.ceil(n[1]/o),n[0]=Math.min(Math.max(n[0],1),g+(c?1:0)),n[1]=Math.min(Math.max(n[1],1),y),n):void 0}},9504:(Y,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.moveToCellSequence=void 0;const d=f(2584);function p(o,c,n,l){const _=o-h(o,n),b=c-h(c,n),C=Math.abs(_-b)-(function(w,m,A){let B=0;const U=w-h(w,A),z=m-h(m,A);for(let O=0;O<Math.abs(U-z);O++){const P=g(w,m)==="A"?-1:1,te=A.buffer.lines.get(U+P*O);te!=null&&te.isWrapped&&B++}return B})(o,c,n);return v(C,E(g(o,c),l))}function h(o,c){let n=0,l=c.buffer.lines.get(o),_=l==null?void 0:l.isWrapped;for(;_&&o>=0&&o<c.rows;)n++,l=c.buffer.lines.get(--o),_=l==null?void 0:l.isWrapped;return n}function g(o,c){return o>c?"A":"B"}function y(o,c,n,l,_,b){let C=o,w=c,m="";for(;C!==n||w!==l;)C+=_?1:-1,_&&C>b.cols-1?(m+=b.buffer.translateBufferLineToString(w,!1,o,C),C=0,o=0,w++):!_&&C<0&&(m+=b.buffer.translateBufferLineToString(w,!1,0,o+1),C=b.cols-1,o=C,w--);return m+b.buffer.translateBufferLineToString(w,!1,o,C)}function E(o,c){const n=c?"O":"[";return d.C0.ESC+n+o}function v(o,c){o=Math.floor(o);let n="";for(let l=0;l<o;l++)n+=c;return n}u.moveToCellSequence=function(o,c,n,l){const _=n.buffer.x,b=n.buffer.y;if(!n.buffer.hasScrollback)return(function(m,A,B,U,z,O){return p(A,U,z,O).length===0?"":v(y(m,A,m,A-h(A,z),!1,z).length,E("D",O))})(_,b,0,c,n,l)+p(b,c,n,l)+(function(m,A,B,U,z,O){let P;P=p(A,U,z,O).length>0?U-h(U,z):A;const te=U,I=(function(F,ie,x,k,D,T){let N;return N=p(x,k,D,T).length>0?k-h(k,D):ie,F<x&&N<=k||F>=x&&N<k?"C":"D"})(m,A,B,U,z,O);return v(y(m,P,B,te,I==="C",z).length,E(I,O))})(_,b,o,c,n,l);let C;if(b===c)return C=_>o?"D":"C",v(Math.abs(_-o),E(C,l));C=b>c?"D":"C";const w=Math.abs(b-c);return v((function(m,A){return A.cols-m})(b>c?o:_,n)+(w-1)*n.cols+1+((b>c?_:o)-1),E(C,l))}},1296:function(Y,u,f){var d=this&&this.__decorate||function(O,P,te,I){var F,ie=arguments.length,x=ie<3?P:I===null?I=Object.getOwnPropertyDescriptor(P,te):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(O,P,te,I);else for(var k=O.length-1;k>=0;k--)(F=O[k])&&(x=(ie<3?F(x):ie>3?F(P,te,x):F(P,te))||x);return ie>3&&x&&Object.defineProperty(P,te,x),x},p=this&&this.__param||function(O,P){return function(te,I){P(te,I,O)}};Object.defineProperty(u,"__esModule",{value:!0}),u.DomRenderer=void 0;const h=f(3787),g=f(2550),y=f(2223),E=f(6171),v=f(6052),o=f(4725),c=f(8055),n=f(8460),l=f(844),_=f(2585),b="xterm-dom-renderer-owner-",C="xterm-rows",w="xterm-fg-",m="xterm-bg-",A="xterm-focus",B="xterm-selection";let U=1,z=u.DomRenderer=class extends l.Disposable{constructor(O,P,te,I,F,ie,x,k,D,T,N,G,ee){super(),this._terminal=O,this._document=P,this._element=te,this._screenElement=I,this._viewportElement=F,this._helperContainer=ie,this._linkifier2=x,this._charSizeService=D,this._optionsService=T,this._bufferService=N,this._coreBrowserService=G,this._themeService=ee,this._terminalClass=U++,this._rowElements=[],this._selectionRenderModel=(0,v.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new n.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(C),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(B),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,E.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((he=>this._injectCss(he)))),this._injectCss(this._themeService.colors),this._rowFactory=k.createInstance(h.DomRendererRowFactory,document),this._element.classList.add(b+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((he=>this._handleLinkHover(he)))),this.register(this._linkifier2.onHideLinkUnderline((he=>this._handleLinkLeave(he)))),this.register((0,l.toDisposable)((()=>{this._element.classList.remove(b+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new g.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const O=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*O,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*O),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/O),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/O),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const te of this._rowElements)te.style.width=`${this.dimensions.css.canvas.width}px`,te.style.height=`${this.dimensions.css.cell.height}px`,te.style.lineHeight=`${this.dimensions.css.cell.height}px`,te.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const P=`${this._terminalSelector} .${C} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=P,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(O){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let P=`${this._terminalSelector} .${C} { color: ${O.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;P+=`${this._terminalSelector} .${C} .xterm-dim { color: ${c.color.multiplyOpacity(O.foreground,.5).css};}`,P+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;const te=`blink_underline_${this._terminalClass}`,I=`blink_bar_${this._terminalClass}`,F=`blink_block_${this._terminalClass}`;P+=`@keyframes ${te} { 50% { border-bottom-style: hidden; }}`,P+=`@keyframes ${I} { 50% { box-shadow: none; }}`,P+=`@keyframes ${F} { 0% { background-color: ${O.cursor.css}; color: ${O.cursorAccent.css}; } 50% { background-color: inherit; color: ${O.cursor.css}; }}`,P+=`${this._terminalSelector} .${C}.${A} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${te} 1s step-end infinite;}${this._terminalSelector} .${C}.${A} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${I} 1s step-end infinite;}${this._terminalSelector} .${C}.${A} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${F} 1s step-end infinite;}${this._terminalSelector} .${C} .xterm-cursor.xterm-cursor-block { background-color: ${O.cursor.css}; color: ${O.cursorAccent.css};}${this._terminalSelector} .${C} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${O.cursor.css} !important; color: ${O.cursorAccent.css} !important;}${this._terminalSelector} .${C} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${O.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${C} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${O.cursor.css} inset;}${this._terminalSelector} .${C} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${O.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,P+=`${this._terminalSelector} .${B} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${B} div { position: absolute; background-color: ${O.selectionBackgroundOpaque.css};}${this._terminalSelector} .${B} div { position: absolute; background-color: ${O.selectionInactiveBackgroundOpaque.css};}`;for(const[ie,x]of O.ansi.entries())P+=`${this._terminalSelector} .${w}${ie} { color: ${x.css}; }${this._terminalSelector} .${w}${ie}.xterm-dim { color: ${c.color.multiplyOpacity(x,.5).css}; }${this._terminalSelector} .${m}${ie} { background-color: ${x.css}; }`;P+=`${this._terminalSelector} .${w}${y.INVERTED_DEFAULT_COLOR} { color: ${c.color.opaque(O.background).css}; }${this._terminalSelector} .${w}${y.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${c.color.multiplyOpacity(c.color.opaque(O.background),.5).css}; }${this._terminalSelector} .${m}${y.INVERTED_DEFAULT_COLOR} { background-color: ${O.foreground.css}; }`,this._themeStyleElement.textContent=P}_setDefaultSpacing(){const O=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${O}px`,this._rowFactory.defaultSpacing=O}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(O,P){for(let te=this._rowElements.length;te<=P;te++){const I=this._document.createElement("div");this._rowContainer.appendChild(I),this._rowElements.push(I)}for(;this._rowElements.length>P;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(O,P){this._refreshRowElements(O,P),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(A),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(A),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(O,P,te){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(O,P,te),this.renderRows(0,this._bufferService.rows-1),!O||!P)return;this._selectionRenderModel.update(this._terminal,O,P,te);const I=this._selectionRenderModel.viewportStartRow,F=this._selectionRenderModel.viewportEndRow,ie=this._selectionRenderModel.viewportCappedStartRow,x=this._selectionRenderModel.viewportCappedEndRow;if(ie>=this._bufferService.rows||x<0)return;const k=this._document.createDocumentFragment();if(te){const D=O[0]>P[0];k.appendChild(this._createSelectionElement(ie,D?P[0]:O[0],D?O[0]:P[0],x-ie+1))}else{const D=I===ie?O[0]:0,T=ie===F?P[0]:this._bufferService.cols;k.appendChild(this._createSelectionElement(ie,D,T));const N=x-ie-1;if(k.appendChild(this._createSelectionElement(ie+1,0,this._bufferService.cols,N)),ie!==x){const G=F===x?P[0]:this._bufferService.cols;k.appendChild(this._createSelectionElement(x,0,G))}}this._selectionContainer.appendChild(k)}_createSelectionElement(O,P,te,I=1){const F=this._document.createElement("div"),ie=P*this.dimensions.css.cell.width;let x=this.dimensions.css.cell.width*(te-P);return ie+x>this.dimensions.css.canvas.width&&(x=this.dimensions.css.canvas.width-ie),F.style.height=I*this.dimensions.css.cell.height+"px",F.style.top=O*this.dimensions.css.cell.height+"px",F.style.left=`${ie}px`,F.style.width=`${x}px`,F}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const O of this._rowElements)O.replaceChildren()}renderRows(O,P){const te=this._bufferService.buffer,I=te.ybase+te.y,F=Math.min(te.x,this._bufferService.cols-1),ie=this._optionsService.rawOptions.cursorBlink,x=this._optionsService.rawOptions.cursorStyle,k=this._optionsService.rawOptions.cursorInactiveStyle;for(let D=O;D<=P;D++){const T=D+te.ydisp,N=this._rowElements[D],G=te.lines.get(T);if(!N||!G)break;N.replaceChildren(...this._rowFactory.createRow(G,T,T===I,x,k,F,ie,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${b}${this._terminalClass}`}_handleLinkHover(O){this._setCellUnderline(O.x1,O.x2,O.y1,O.y2,O.cols,!0)}_handleLinkLeave(O){this._setCellUnderline(O.x1,O.x2,O.y1,O.y2,O.cols,!1)}_setCellUnderline(O,P,te,I,F,ie){te<0&&(O=0),I<0&&(P=0);const x=this._bufferService.rows-1;te=Math.max(Math.min(te,x),0),I=Math.max(Math.min(I,x),0),F=Math.min(F,this._bufferService.cols);const k=this._bufferService.buffer,D=k.ybase+k.y,T=Math.min(k.x,F-1),N=this._optionsService.rawOptions.cursorBlink,G=this._optionsService.rawOptions.cursorStyle,ee=this._optionsService.rawOptions.cursorInactiveStyle;for(let he=te;he<=I;++he){const K=he+k.ydisp,M=this._rowElements[he],oe=k.lines.get(K);if(!M||!oe)break;M.replaceChildren(...this._rowFactory.createRow(oe,K,K===D,G,ee,T,N,this.dimensions.css.cell.width,this._widthCache,ie?he===te?O:0:-1,ie?(he===I?P:F)-1:-1))}}};u.DomRenderer=z=d([p(7,_.IInstantiationService),p(8,o.ICharSizeService),p(9,_.IOptionsService),p(10,_.IBufferService),p(11,o.ICoreBrowserService),p(12,o.IThemeService)],z)},3787:function(Y,u,f){var d=this&&this.__decorate||function(C,w,m,A){var B,U=arguments.length,z=U<3?w:A===null?A=Object.getOwnPropertyDescriptor(w,m):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(C,w,m,A);else for(var O=C.length-1;O>=0;O--)(B=C[O])&&(z=(U<3?B(z):U>3?B(w,m,z):B(w,m))||z);return U>3&&z&&Object.defineProperty(w,m,z),z},p=this&&this.__param||function(C,w){return function(m,A){w(m,A,C)}};Object.defineProperty(u,"__esModule",{value:!0}),u.DomRendererRowFactory=void 0;const h=f(2223),g=f(643),y=f(511),E=f(2585),v=f(8055),o=f(4725),c=f(4269),n=f(6171),l=f(3734);let _=u.DomRendererRowFactory=class{constructor(C,w,m,A,B,U,z){this._document=C,this._characterJoinerService=w,this._optionsService=m,this._coreBrowserService=A,this._coreService=B,this._decorationService=U,this._themeService=z,this._workCell=new y.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(C,w,m){this._selectionStart=C,this._selectionEnd=w,this._columnSelectMode=m}createRow(C,w,m,A,B,U,z,O,P,te,I){const F=[],ie=this._characterJoinerService.getJoinedCharacters(w),x=this._themeService.colors;let k,D=C.getNoBgTrimmedLength();m&&D<U+1&&(D=U+1);let T=0,N="",G=0,ee=0,he=0,K=!1,M=0,oe=!1,ne=0;const _e=[],de=te!==-1&&I!==-1;for(let we=0;we<D;we++){C.loadCell(we,this._workCell);let ke=this._workCell.getWidth();if(ke===0)continue;let je=!1,tt=we,Se=this._workCell;if(ie.length>0&&we===ie[0][0]){je=!0;const qe=ie.shift();Se=new c.JoinedCellData(this._workCell,C.translateToString(!0,qe[0],qe[1]),qe[1]-qe[0]),tt=qe[1]-1,ke=Se.getWidth()}const _i=this._isCellInSelection(we,w),Ii=m&&we===U,Wi=de&&we>=te&&we<=I;let Ki=!1;this._decorationService.forEachDecorationAtCell(we,w,void 0,(qe=>{Ki=!0}));let hs=Se.getChars()||g.WHITESPACE_CELL_CHAR;if(hs===" "&&(Se.isUnderline()||Se.isOverline())&&(hs=" "),ne=ke*O-P.get(hs,Se.isBold(),Se.isItalic()),k){if(T&&(_i&&oe||!_i&&!oe&&Se.bg===G)&&(_i&&oe&&x.selectionForeground||Se.fg===ee)&&Se.extended.ext===he&&Wi===K&&ne===M&&!Ii&&!je&&!Ki){Se.isInvisible()?N+=g.WHITESPACE_CELL_CHAR:N+=hs,T++;continue}T&&(k.textContent=N),k=this._document.createElement("span"),T=0,N=""}else k=this._document.createElement("span");if(G=Se.bg,ee=Se.fg,he=Se.extended.ext,K=Wi,M=ne,oe=_i,je&&U>=we&&U<=tt&&(U=we),!this._coreService.isCursorHidden&&Ii&&this._coreService.isCursorInitialized){if(_e.push("xterm-cursor"),this._coreBrowserService.isFocused)z&&_e.push("xterm-cursor-blink"),_e.push(A==="bar"?"xterm-cursor-bar":A==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(B)switch(B){case"outline":_e.push("xterm-cursor-outline");break;case"block":_e.push("xterm-cursor-block");break;case"bar":_e.push("xterm-cursor-bar");break;case"underline":_e.push("xterm-cursor-underline")}}if(Se.isBold()&&_e.push("xterm-bold"),Se.isItalic()&&_e.push("xterm-italic"),Se.isDim()&&_e.push("xterm-dim"),N=Se.isInvisible()?g.WHITESPACE_CELL_CHAR:Se.getChars()||g.WHITESPACE_CELL_CHAR,Se.isUnderline()&&(_e.push(`xterm-underline-${Se.extended.underlineStyle}`),N===" "&&(N=" "),!Se.isUnderlineColorDefault()))if(Se.isUnderlineColorRGB())k.style.textDecorationColor=`rgb(${l.AttributeData.toColorRGB(Se.getUnderlineColor()).join(",")})`;else{let qe=Se.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Se.isBold()&&qe<8&&(qe+=8),k.style.textDecorationColor=x.ansi[qe].css}Se.isOverline()&&(_e.push("xterm-overline"),N===" "&&(N=" ")),Se.isStrikethrough()&&_e.push("xterm-strikethrough"),Wi&&(k.style.textDecoration="underline");let ft=Se.getFgColor(),Je=Se.getFgColorMode(),Lt=Se.getBgColor(),vi=Se.getBgColorMode();const fs=!!Se.isInverse();if(fs){const qe=ft;ft=Lt,Lt=qe;const Yi=Je;Je=vi,vi=Yi}let bt,ds,Wt,Gi=!1;switch(this._decorationService.forEachDecorationAtCell(we,w,void 0,(qe=>{qe.options.layer!=="top"&&Gi||(qe.backgroundColorRGB&&(vi=50331648,Lt=qe.backgroundColorRGB.rgba>>8&16777215,bt=qe.backgroundColorRGB),qe.foregroundColorRGB&&(Je=50331648,ft=qe.foregroundColorRGB.rgba>>8&16777215,ds=qe.foregroundColorRGB),Gi=qe.options.layer==="top")})),!Gi&&_i&&(bt=this._coreBrowserService.isFocused?x.selectionBackgroundOpaque:x.selectionInactiveBackgroundOpaque,Lt=bt.rgba>>8&16777215,vi=50331648,Gi=!0,x.selectionForeground&&(Je=50331648,ft=x.selectionForeground.rgba>>8&16777215,ds=x.selectionForeground)),Gi&&_e.push("xterm-decoration-top"),vi){case 16777216:case 33554432:Wt=x.ansi[Lt],_e.push(`xterm-bg-${Lt}`);break;case 50331648:Wt=v.channels.toColor(Lt>>16,Lt>>8&255,255&Lt),this._addStyle(k,`background-color:#${b((Lt>>>0).toString(16),"0",6)}`);break;default:fs?(Wt=x.foreground,_e.push(`xterm-bg-${h.INVERTED_DEFAULT_COLOR}`)):Wt=x.background}switch(bt||Se.isDim()&&(bt=v.color.multiplyOpacity(Wt,.5)),Je){case 16777216:case 33554432:Se.isBold()&&ft<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(ft+=8),this._applyMinimumContrast(k,Wt,x.ansi[ft],Se,bt,void 0)||_e.push(`xterm-fg-${ft}`);break;case 50331648:const qe=v.channels.toColor(ft>>16&255,ft>>8&255,255&ft);this._applyMinimumContrast(k,Wt,qe,Se,bt,ds)||this._addStyle(k,`color:#${b(ft.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(k,Wt,x.foreground,Se,bt,ds)||fs&&_e.push(`xterm-fg-${h.INVERTED_DEFAULT_COLOR}`)}_e.length&&(k.className=_e.join(" "),_e.length=0),Ii||je||Ki?k.textContent=N:T++,ne!==this.defaultSpacing&&(k.style.letterSpacing=`${ne}px`),F.push(k),we=tt}return k&&T&&(k.textContent=N),F}_applyMinimumContrast(C,w,m,A,B,U){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,n.treatGlyphAsBackgroundColor)(A.getCode()))return!1;const z=this._getContrastCache(A);let O;if(B||U||(O=z.getColor(w.rgba,m.rgba)),O===void 0){const P=this._optionsService.rawOptions.minimumContrastRatio/(A.isDim()?2:1);O=v.color.ensureContrastRatio(B||w,U||m,P),z.setColor((B||w).rgba,(U||m).rgba,O??null)}return!!O&&(this._addStyle(C,`color:${O.css}`),!0)}_getContrastCache(C){return C.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(C,w){C.setAttribute("style",`${C.getAttribute("style")||""}${w};`)}_isCellInSelection(C,w){const m=this._selectionStart,A=this._selectionEnd;return!(!m||!A)&&(this._columnSelectMode?m[0]<=A[0]?C>=m[0]&&w>=m[1]&&C<A[0]&&w<=A[1]:C<m[0]&&w>=m[1]&&C>=A[0]&&w<=A[1]:w>m[1]&&w<A[1]||m[1]===A[1]&&w===m[1]&&C>=m[0]&&C<A[0]||m[1]<A[1]&&w===A[1]&&C<A[0]||m[1]<A[1]&&w===m[1]&&C>=m[0])}};function b(C,w,m){for(;C.length<m;)C=w+C;return C}u.DomRendererRowFactory=_=d([p(1,o.ICharacterJoinerService),p(2,E.IOptionsService),p(3,o.ICoreBrowserService),p(4,E.ICoreService),p(5,E.IDecorationService),p(6,o.IThemeService)],_)},2550:(Y,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.WidthCache=void 0,u.WidthCache=class{constructor(f,d){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=f.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const p=f.createElement("span");p.classList.add("xterm-char-measure-element");const h=f.createElement("span");h.classList.add("xterm-char-measure-element"),h.style.fontWeight="bold";const g=f.createElement("span");g.classList.add("xterm-char-measure-element"),g.style.fontStyle="italic";const y=f.createElement("span");y.classList.add("xterm-char-measure-element"),y.style.fontWeight="bold",y.style.fontStyle="italic",this._measureElements=[p,h,g,y],this._container.appendChild(p),this._container.appendChild(h),this._container.appendChild(g),this._container.appendChild(y),d.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(f,d,p,h){f===this._font&&d===this._fontSize&&p===this._weight&&h===this._weightBold||(this._font=f,this._fontSize=d,this._weight=p,this._weightBold=h,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${p}`,this._measureElements[1].style.fontWeight=`${h}`,this._measureElements[2].style.fontWeight=`${p}`,this._measureElements[3].style.fontWeight=`${h}`,this.clear())}get(f,d,p){let h=0;if(!d&&!p&&f.length===1&&(h=f.charCodeAt(0))<256){if(this._flat[h]!==-9999)return this._flat[h];const E=this._measure(f,0);return E>0&&(this._flat[h]=E),E}let g=f;d&&(g+="B"),p&&(g+="I");let y=this._holey.get(g);if(y===void 0){let E=0;d&&(E|=1),p&&(E|=2),y=this._measure(f,E),y>0&&this._holey.set(g,y)}return y}_measure(f,d){const p=this._measureElements[d];return p.textContent=f.repeat(32),p.offsetWidth/32}}},2223:(Y,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.TEXT_BASELINE=u.DIM_OPACITY=u.INVERTED_DEFAULT_COLOR=void 0;const d=f(6114);u.INVERTED_DEFAULT_COLOR=257,u.DIM_OPACITY=.5,u.TEXT_BASELINE=d.isFirefox||d.isLegacyEdge?"bottom":"ideographic"},6171:(Y,u)=>{function f(p){return 57508<=p&&p<=57558}function d(p){return p>=128512&&p<=128591||p>=127744&&p<=128511||p>=128640&&p<=128767||p>=9728&&p<=9983||p>=9984&&p<=10175||p>=65024&&p<=65039||p>=129280&&p<=129535||p>=127462&&p<=127487}Object.defineProperty(u,"__esModule",{value:!0}),u.computeNextVariantOffset=u.createRenderDimensions=u.treatGlyphAsBackgroundColor=u.allowRescaling=u.isEmoji=u.isRestrictedPowerlineGlyph=u.isPowerlineGlyph=u.throwIfFalsy=void 0,u.throwIfFalsy=function(p){if(!p)throw new Error("value must not be falsy");return p},u.isPowerlineGlyph=f,u.isRestrictedPowerlineGlyph=function(p){return 57520<=p&&p<=57527},u.isEmoji=d,u.allowRescaling=function(p,h,g,y){return h===1&&g>Math.ceil(1.5*y)&&p!==void 0&&p>255&&!d(p)&&!f(p)&&!(function(E){return 57344<=E&&E<=63743})(p)},u.treatGlyphAsBackgroundColor=function(p){return f(p)||(function(h){return 9472<=h&&h<=9631})(p)},u.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},u.computeNextVariantOffset=function(p,h,g=0){return(p-(2*Math.round(h)-g))%(2*Math.round(h))}},6052:(Y,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.createSelectionRenderModel=void 0;class f{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(p,h,g,y=!1){if(this.selectionStart=h,this.selectionEnd=g,!h||!g||h[0]===g[0]&&h[1]===g[1])return void this.clear();const E=p.buffers.active.ydisp,v=h[1]-E,o=g[1]-E,c=Math.max(v,0),n=Math.min(o,p.rows-1);c>=p.rows||n<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=y,this.viewportStartRow=v,this.viewportEndRow=o,this.viewportCappedStartRow=c,this.viewportCappedEndRow=n,this.startCol=h[0],this.endCol=g[0])}isCellSelected(p,h,g){return!!this.hasSelection&&(g-=p.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?h>=this.startCol&&g>=this.viewportCappedStartRow&&h<this.endCol&&g<=this.viewportCappedEndRow:h<this.startCol&&g>=this.viewportCappedStartRow&&h>=this.endCol&&g<=this.viewportCappedEndRow:g>this.viewportStartRow&&g<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&g===this.viewportStartRow&&h>=this.startCol&&h<this.endCol||this.viewportStartRow<this.viewportEndRow&&g===this.viewportEndRow&&h<this.endCol||this.viewportStartRow<this.viewportEndRow&&g===this.viewportStartRow&&h>=this.startCol)}}u.createSelectionRenderModel=function(){return new f}},456:(Y,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.SelectionModel=void 0,u.SelectionModel=class{constructor(f){this._bufferService=f,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const f=this.selectionStart[0]+this.selectionStartLength;return f>this._bufferService.cols?f%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(f/this._bufferService.cols)-1]:[f%this._bufferService.cols,this.selectionStart[1]+Math.floor(f/this._bufferService.cols)]:[f,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const f=this.selectionStart[0]+this.selectionStartLength;return f>this._bufferService.cols?[f%this._bufferService.cols,this.selectionStart[1]+Math.floor(f/this._bufferService.cols)]:[Math.max(f,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const f=this.selectionStart,d=this.selectionEnd;return!(!f||!d)&&(f[1]>d[1]||f[1]===d[1]&&f[0]>d[0])}handleTrim(f){return this.selectionStart&&(this.selectionStart[1]-=f),this.selectionEnd&&(this.selectionEnd[1]-=f),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(Y,u,f){var d=this&&this.__decorate||function(n,l,_,b){var C,w=arguments.length,m=w<3?l:b===null?b=Object.getOwnPropertyDescriptor(l,_):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(n,l,_,b);else for(var A=n.length-1;A>=0;A--)(C=n[A])&&(m=(w<3?C(m):w>3?C(l,_,m):C(l,_))||m);return w>3&&m&&Object.defineProperty(l,_,m),m},p=this&&this.__param||function(n,l){return function(_,b){l(_,b,n)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CharSizeService=void 0;const h=f(2585),g=f(8460),y=f(844);let E=u.CharSizeService=class extends y.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(n,l,_){super(),this._optionsService=_,this.width=0,this.height=0,this._onCharSizeChange=this.register(new g.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new c(this._optionsService))}catch{this._measureStrategy=this.register(new o(n,l,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const n=this._measureStrategy.measure();n.width===this.width&&n.height===this.height||(this.width=n.width,this.height=n.height,this._onCharSizeChange.fire())}};u.CharSizeService=E=d([p(2,h.IOptionsService)],E);class v extends y.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(l,_){l!==void 0&&l>0&&_!==void 0&&_>0&&(this._result.width=l,this._result.height=_)}}class o extends v{constructor(l,_,b){super(),this._document=l,this._parentElement=_,this._optionsService=b,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class c extends v{constructor(l){super(),this._optionsService=l,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const _=this._ctx.measureText("W");if(!("width"in _&&"fontBoundingBoxAscent"in _&&"fontBoundingBoxDescent"in _))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const l=this._ctx.measureText("W");return this._validateAndSet(l.width,l.fontBoundingBoxAscent+l.fontBoundingBoxDescent),this._result}}},4269:function(Y,u,f){var d=this&&this.__decorate||function(c,n,l,_){var b,C=arguments.length,w=C<3?n:_===null?_=Object.getOwnPropertyDescriptor(n,l):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(c,n,l,_);else for(var m=c.length-1;m>=0;m--)(b=c[m])&&(w=(C<3?b(w):C>3?b(n,l,w):b(n,l))||w);return C>3&&w&&Object.defineProperty(n,l,w),w},p=this&&this.__param||function(c,n){return function(l,_){n(l,_,c)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CharacterJoinerService=u.JoinedCellData=void 0;const h=f(3734),g=f(643),y=f(511),E=f(2585);class v extends h.AttributeData{constructor(n,l,_){super(),this.content=0,this.combinedData="",this.fg=n.fg,this.bg=n.bg,this.combinedData=l,this._width=_}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(n){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}u.JoinedCellData=v;let o=u.CharacterJoinerService=class fd{constructor(n){this._bufferService=n,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new y.CellData}register(n){const l={id:this._nextCharacterJoinerId++,handler:n};return this._characterJoiners.push(l),l.id}deregister(n){for(let l=0;l<this._characterJoiners.length;l++)if(this._characterJoiners[l].id===n)return this._characterJoiners.splice(l,1),!0;return!1}getJoinedCharacters(n){if(this._characterJoiners.length===0)return[];const l=this._bufferService.buffer.lines.get(n);if(!l||l.length===0)return[];const _=[],b=l.translateToString(!0);let C=0,w=0,m=0,A=l.getFg(0),B=l.getBg(0);for(let U=0;U<l.getTrimmedLength();U++)if(l.loadCell(U,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==A||this._workCell.bg!==B){if(U-C>1){const z=this._getJoinedRanges(b,m,w,l,C);for(let O=0;O<z.length;O++)_.push(z[O])}C=U,m=w,A=this._workCell.fg,B=this._workCell.bg}w+=this._workCell.getChars().length||g.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-C>1){const U=this._getJoinedRanges(b,m,w,l,C);for(let z=0;z<U.length;z++)_.push(U[z])}return _}_getJoinedRanges(n,l,_,b,C){const w=n.substring(l,_);let m=[];try{m=this._characterJoiners[0].handler(w)}catch(A){console.error(A)}for(let A=1;A<this._characterJoiners.length;A++)try{const B=this._characterJoiners[A].handler(w);for(let U=0;U<B.length;U++)fd._mergeRanges(m,B[U])}catch(B){console.error(B)}return this._stringRangesToCellRanges(m,b,C),m}_stringRangesToCellRanges(n,l,_){let b=0,C=!1,w=0,m=n[b];if(m){for(let A=_;A<this._bufferService.cols;A++){const B=l.getWidth(A),U=l.getString(A).length||g.WHITESPACE_CELL_CHAR.length;if(B!==0){if(!C&&m[0]<=w&&(m[0]=A,C=!0),m[1]<=w){if(m[1]=A,m=n[++b],!m)break;m[0]<=w?(m[0]=A,C=!0):C=!1}w+=U}}m&&(m[1]=this._bufferService.cols)}}static _mergeRanges(n,l){let _=!1;for(let b=0;b<n.length;b++){const C=n[b];if(_){if(l[1]<=C[0])return n[b-1][1]=l[1],n;if(l[1]<=C[1])return n[b-1][1]=Math.max(l[1],C[1]),n.splice(b,1),n;n.splice(b,1),b--}else{if(l[1]<=C[0])return n.splice(b,0,l),n;if(l[1]<=C[1])return C[0]=Math.min(l[0],C[0]),n;l[0]<C[1]&&(C[0]=Math.min(l[0],C[0]),_=!0)}}return _?n[n.length-1][1]=l[1]:n.push(l),n}};u.CharacterJoinerService=o=d([p(0,E.IBufferService)],o)},5114:(Y,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CoreBrowserService=void 0;const d=f(844),p=f(8460),h=f(3656);class g extends d.Disposable{constructor(v,o,c){super(),this._textarea=v,this._window=o,this.mainDocument=c,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new y(this._window),this._onDprChange=this.register(new p.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new p.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((n=>this._screenDprMonitor.setWindow(n)))),this.register((0,p.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",(()=>this._isFocused=!0)),this._textarea.addEventListener("blur",(()=>this._isFocused=!1))}get window(){return this._window}set window(v){this._window!==v&&(this._window=v,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask((()=>this._cachedIsFocused=void 0))),this._cachedIsFocused}}u.CoreBrowserService=g;class y extends d.Disposable{constructor(v){super(),this._parentWindow=v,this._windowResizeListener=this.register(new d.MutableDisposable),this._onDprChange=this.register(new p.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,d.toDisposable)((()=>this.clearListener())))}setWindow(v){this._parentWindow=v,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,h.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var v;this._outerListener&&((v=this._resolutionMediaMatchList)==null||v.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}}},779:(Y,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.LinkProviderService=void 0;const d=f(844);class p extends d.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,d.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(g){return this.linkProviders.push(g),{dispose:()=>{const y=this.linkProviders.indexOf(g);y!==-1&&this.linkProviders.splice(y,1)}}}}u.LinkProviderService=p},8934:function(Y,u,f){var d=this&&this.__decorate||function(E,v,o,c){var n,l=arguments.length,_=l<3?v:c===null?c=Object.getOwnPropertyDescriptor(v,o):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(E,v,o,c);else for(var b=E.length-1;b>=0;b--)(n=E[b])&&(_=(l<3?n(_):l>3?n(v,o,_):n(v,o))||_);return l>3&&_&&Object.defineProperty(v,o,_),_},p=this&&this.__param||function(E,v){return function(o,c){v(o,c,E)}};Object.defineProperty(u,"__esModule",{value:!0}),u.MouseService=void 0;const h=f(4725),g=f(9806);let y=u.MouseService=class{constructor(E,v){this._renderService=E,this._charSizeService=v}getCoords(E,v,o,c,n){return(0,g.getCoords)(window,E,v,o,c,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,n)}getMouseReportCoords(E,v){const o=(0,g.getCoordsRelativeToElement)(window,E,v);if(this._charSizeService.hasValidSize)return o[0]=Math.min(Math.max(o[0],0),this._renderService.dimensions.css.canvas.width-1),o[1]=Math.min(Math.max(o[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(o[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(o[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(o[0]),y:Math.floor(o[1])}}};u.MouseService=y=d([p(0,h.IRenderService),p(1,h.ICharSizeService)],y)},3230:function(Y,u,f){var d=this&&this.__decorate||function(n,l,_,b){var C,w=arguments.length,m=w<3?l:b===null?b=Object.getOwnPropertyDescriptor(l,_):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(n,l,_,b);else for(var A=n.length-1;A>=0;A--)(C=n[A])&&(m=(w<3?C(m):w>3?C(l,_,m):C(l,_))||m);return w>3&&m&&Object.defineProperty(l,_,m),m},p=this&&this.__param||function(n,l){return function(_,b){l(_,b,n)}};Object.defineProperty(u,"__esModule",{value:!0}),u.RenderService=void 0;const h=f(6193),g=f(4725),y=f(8460),E=f(844),v=f(7226),o=f(2585);let c=u.RenderService=class extends E.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(n,l,_,b,C,w,m,A){super(),this._rowCount=n,this._charSizeService=b,this._renderer=this.register(new E.MutableDisposable),this._pausedResizeTask=new v.DebouncedIdleTask,this._observerDisposable=this.register(new E.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new y.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new y.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new y.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new y.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new h.RenderDebouncer(((B,U)=>this._renderRows(B,U)),m),this.register(this._renderDebouncer),this.register(m.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(w.onResize((()=>this._fullRefresh()))),this.register(w.buffers.onBufferActivate((()=>{var B;return(B=this._renderer.value)==null?void 0:B.clear()}))),this.register(_.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(C.onDecorationRegistered((()=>this._fullRefresh()))),this.register(C.onDecorationRemoved((()=>this._fullRefresh()))),this.register(_.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(w.cols,w.rows),this._fullRefresh()}))),this.register(_.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(w.buffer.y,w.buffer.y,!0)))),this.register(A.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(m.window,l),this.register(m.onWindowChange((B=>this._registerIntersectionObserver(B,l))))}_registerIntersectionObserver(n,l){if("IntersectionObserver"in n){const _=new n.IntersectionObserver((b=>this._handleIntersectionChange(b[b.length-1])),{threshold:0});_.observe(l),this._observerDisposable.value=(0,E.toDisposable)((()=>_.disconnect()))}}_handleIntersectionChange(n){this._isPaused=n.isIntersecting===void 0?n.intersectionRatio===0:!n.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(n,l,_=!1){this._isPaused?this._needsFullRefresh=!0:(_||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(n,l,this._rowCount))}_renderRows(n,l){this._renderer.value&&(n=Math.min(n,this._rowCount-1),l=Math.min(l,this._rowCount-1),this._renderer.value.renderRows(n,l),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:n,end:l}),this._onRender.fire({start:n,end:l}),this._isNextRenderRedrawOnly=!0)}resize(n,l){this._rowCount=l,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(n){this._renderer.value=n,this._renderer.value&&(this._renderer.value.onRequestRedraw((l=>this.refreshRows(l.start,l.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(n){return this._renderDebouncer.addRefreshCallback(n)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var n,l;this._renderer.value&&((l=(n=this._renderer.value).clearTextureAtlas)==null||l.call(n),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(n,l){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var _;return(_=this._renderer.value)==null?void 0:_.handleResize(n,l)})):this._renderer.value.handleResize(n,l),this._fullRefresh())}handleCharSizeChanged(){var n;(n=this._renderer.value)==null||n.handleCharSizeChanged()}handleBlur(){var n;(n=this._renderer.value)==null||n.handleBlur()}handleFocus(){var n;(n=this._renderer.value)==null||n.handleFocus()}handleSelectionChanged(n,l,_){var b;this._selectionState.start=n,this._selectionState.end=l,this._selectionState.columnSelectMode=_,(b=this._renderer.value)==null||b.handleSelectionChanged(n,l,_)}handleCursorMove(){var n;(n=this._renderer.value)==null||n.handleCursorMove()}clear(){var n;(n=this._renderer.value)==null||n.clear()}};u.RenderService=c=d([p(2,o.IOptionsService),p(3,g.ICharSizeService),p(4,o.IDecorationService),p(5,o.IBufferService),p(6,g.ICoreBrowserService),p(7,g.IThemeService)],c)},9312:function(Y,u,f){var d=this&&this.__decorate||function(m,A,B,U){var z,O=arguments.length,P=O<3?A:U===null?U=Object.getOwnPropertyDescriptor(A,B):U;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(m,A,B,U);else for(var te=m.length-1;te>=0;te--)(z=m[te])&&(P=(O<3?z(P):O>3?z(A,B,P):z(A,B))||P);return O>3&&P&&Object.defineProperty(A,B,P),P},p=this&&this.__param||function(m,A){return function(B,U){A(B,U,m)}};Object.defineProperty(u,"__esModule",{value:!0}),u.SelectionService=void 0;const h=f(9806),g=f(9504),y=f(456),E=f(4725),v=f(8460),o=f(844),c=f(6114),n=f(4841),l=f(511),_=f(2585),b=" ",C=new RegExp(b,"g");let w=u.SelectionService=class extends o.Disposable{constructor(m,A,B,U,z,O,P,te,I){super(),this._element=m,this._screenElement=A,this._linkifier=B,this._bufferService=U,this._coreService=z,this._mouseService=O,this._optionsService=P,this._renderService=te,this._coreBrowserService=I,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new l.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new v.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new v.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new v.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new v.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=F=>this._handleMouseMove(F),this._mouseUpListener=F=>this._handleMouseUp(F),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((F=>this._handleTrim(F))),this.register(this._bufferService.buffers.onBufferActivate((F=>this._handleBufferActivate(F)))),this.enable(),this._model=new y.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,o.toDisposable)((()=>{this._removeMouseDownListeners()})))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const m=this._model.finalSelectionStart,A=this._model.finalSelectionEnd;return!(!m||!A||m[0]===A[0]&&m[1]===A[1])}get selectionText(){const m=this._model.finalSelectionStart,A=this._model.finalSelectionEnd;if(!m||!A)return"";const B=this._bufferService.buffer,U=[];if(this._activeSelectionMode===3){if(m[0]===A[0])return"";const z=m[0]<A[0]?m[0]:A[0],O=m[0]<A[0]?A[0]:m[0];for(let P=m[1];P<=A[1];P++){const te=B.translateBufferLineToString(P,!0,z,O);U.push(te)}}else{const z=m[1]===A[1]?A[0]:void 0;U.push(B.translateBufferLineToString(m[1],!0,m[0],z));for(let O=m[1]+1;O<=A[1]-1;O++){const P=B.lines.get(O),te=B.translateBufferLineToString(O,!0);P!=null&&P.isWrapped?U[U.length-1]+=te:U.push(te)}if(m[1]!==A[1]){const O=B.lines.get(A[1]),P=B.translateBufferLineToString(A[1],!0,0,A[0]);O&&O.isWrapped?U[U.length-1]+=P:U.push(P)}}return U.map((z=>z.replace(C," "))).join(c.isWindows?`\r
|
|
189
|
+
`:`
|
|
190
|
+
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(m){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),c.isLinux&&m&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(m){const A=this._getMouseBufferCoords(m),B=this._model.finalSelectionStart,U=this._model.finalSelectionEnd;return!!(B&&U&&A)&&this._areCoordsInSelection(A,B,U)}isCellInSelection(m,A){const B=this._model.finalSelectionStart,U=this._model.finalSelectionEnd;return!(!B||!U)&&this._areCoordsInSelection([m,A],B,U)}_areCoordsInSelection(m,A,B){return m[1]>A[1]&&m[1]<B[1]||A[1]===B[1]&&m[1]===A[1]&&m[0]>=A[0]&&m[0]<B[0]||A[1]<B[1]&&m[1]===B[1]&&m[0]<B[0]||A[1]<B[1]&&m[1]===A[1]&&m[0]>=A[0]}_selectWordAtCursor(m,A){var z,O;const B=(O=(z=this._linkifier.currentLink)==null?void 0:z.link)==null?void 0:O.range;if(B)return this._model.selectionStart=[B.start.x-1,B.start.y-1],this._model.selectionStartLength=(0,n.getRangeLength)(B,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const U=this._getMouseBufferCoords(m);return!!U&&(this._selectWordAt(U,A),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(m,A){this._model.clearSelection(),m=Math.max(m,0),A=Math.min(A,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,m],this._model.selectionEnd=[this._bufferService.cols,A],this.refresh(),this._onSelectionChange.fire()}_handleTrim(m){this._model.handleTrim(m)&&this.refresh()}_getMouseBufferCoords(m){const A=this._mouseService.getCoords(m,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(A)return A[0]--,A[1]--,A[1]+=this._bufferService.buffer.ydisp,A}_getMouseEventScrollAmount(m){let A=(0,h.getCoordsRelativeToElement)(this._coreBrowserService.window,m,this._screenElement)[1];const B=this._renderService.dimensions.css.canvas.height;return A>=0&&A<=B?0:(A>B&&(A-=B),A=Math.min(Math.max(A,-50),50),A/=50,A/Math.abs(A)+Math.round(14*A))}shouldForceSelection(m){return c.isMac?m.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:m.shiftKey}handleMouseDown(m){if(this._mouseDownTimeStamp=m.timeStamp,(m.button!==2||!this.hasSelection)&&m.button===0){if(!this._enabled){if(!this.shouldForceSelection(m))return;m.stopPropagation()}m.preventDefault(),this._dragScrollAmount=0,this._enabled&&m.shiftKey?this._handleIncrementalClick(m):m.detail===1?this._handleSingleClick(m):m.detail===2?this._handleDoubleClick(m):m.detail===3&&this._handleTripleClick(m),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval((()=>this._dragScroll()),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(m){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(m))}_handleSingleClick(m){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(m)?3:0,this._model.selectionStart=this._getMouseBufferCoords(m),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const A=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);A&&A.length!==this._model.selectionStart[0]&&A.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(m){this._selectWordAtCursor(m,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(m){const A=this._getMouseBufferCoords(m);A&&(this._activeSelectionMode=2,this._selectLineAt(A[1]))}shouldColumnSelect(m){return m.altKey&&!(c.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(m){if(m.stopImmediatePropagation(),!this._model.selectionStart)return;const A=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(m),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(m),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const B=this._bufferService.buffer;if(this._model.selectionEnd[1]<B.lines.length){const U=B.lines.get(this._model.selectionEnd[1]);U&&U.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}A&&A[0]===this._model.selectionEnd[0]&&A[1]===this._model.selectionEnd[1]||this.refresh(!0)}_dragScroll(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});const m=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(m.ydisp+this._bufferService.rows,m.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=m.ydisp),this.refresh()}}_handleMouseUp(m){const A=m.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&A<500&&m.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const B=this._mouseService.getCoords(m,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(B&&B[0]!==void 0&&B[1]!==void 0){const U=(0,g.moveToCellSequence)(B[0]-1,B[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(U,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const m=this._model.finalSelectionStart,A=this._model.finalSelectionEnd,B=!(!m||!A||m[0]===A[0]&&m[1]===A[1]);B?m&&A&&(this._oldSelectionStart&&this._oldSelectionEnd&&m[0]===this._oldSelectionStart[0]&&m[1]===this._oldSelectionStart[1]&&A[0]===this._oldSelectionEnd[0]&&A[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(m,A,B)):this._oldHasSelection&&this._fireOnSelectionChange(m,A,B)}_fireOnSelectionChange(m,A,B){this._oldSelectionStart=m,this._oldSelectionEnd=A,this._oldHasSelection=B,this._onSelectionChange.fire()}_handleBufferActivate(m){this.clearSelection(),this._trimListener.dispose(),this._trimListener=m.activeBuffer.lines.onTrim((A=>this._handleTrim(A)))}_convertViewportColToCharacterIndex(m,A){let B=A;for(let U=0;A>=U;U++){const z=m.loadCell(U,this._workCell).getChars().length;this._workCell.getWidth()===0?B--:z>1&&A!==U&&(B+=z-1)}return B}setSelection(m,A,B){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[m,A],this._model.selectionStartLength=B,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(m){this._isClickInSelection(m)||(this._selectWordAtCursor(m,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(m,A,B=!0,U=!0){if(m[0]>=this._bufferService.cols)return;const z=this._bufferService.buffer,O=z.lines.get(m[1]);if(!O)return;const P=z.translateBufferLineToString(m[1],!1);let te=this._convertViewportColToCharacterIndex(O,m[0]),I=te;const F=m[0]-te;let ie=0,x=0,k=0,D=0;if(P.charAt(te)===" "){for(;te>0&&P.charAt(te-1)===" ";)te--;for(;I<P.length&&P.charAt(I+1)===" ";)I++}else{let G=m[0],ee=m[0];O.getWidth(G)===0&&(ie++,G--),O.getWidth(ee)===2&&(x++,ee++);const he=O.getString(ee).length;for(he>1&&(D+=he-1,I+=he-1);G>0&&te>0&&!this._isCharWordSeparator(O.loadCell(G-1,this._workCell));){O.loadCell(G-1,this._workCell);const K=this._workCell.getChars().length;this._workCell.getWidth()===0?(ie++,G--):K>1&&(k+=K-1,te-=K-1),te--,G--}for(;ee<O.length&&I+1<P.length&&!this._isCharWordSeparator(O.loadCell(ee+1,this._workCell));){O.loadCell(ee+1,this._workCell);const K=this._workCell.getChars().length;this._workCell.getWidth()===2?(x++,ee++):K>1&&(D+=K-1,I+=K-1),I++,ee++}}I++;let T=te+F-ie+k,N=Math.min(this._bufferService.cols,I-te+ie+x-k-D);if(A||P.slice(te,I).trim()!==""){if(B&&T===0&&O.getCodePoint(0)!==32){const G=z.lines.get(m[1]-1);if(G&&O.isWrapped&&G.getCodePoint(this._bufferService.cols-1)!==32){const ee=this._getWordAt([this._bufferService.cols-1,m[1]-1],!1,!0,!1);if(ee){const he=this._bufferService.cols-ee.start;T-=he,N+=he}}}if(U&&T+N===this._bufferService.cols&&O.getCodePoint(this._bufferService.cols-1)!==32){const G=z.lines.get(m[1]+1);if(G!=null&&G.isWrapped&&G.getCodePoint(0)!==32){const ee=this._getWordAt([0,m[1]+1],!1,!1,!0);ee&&(N+=ee.length)}}return{start:T,length:N}}}_selectWordAt(m,A){const B=this._getWordAt(m,A);if(B){for(;B.start<0;)B.start+=this._bufferService.cols,m[1]--;this._model.selectionStart=[B.start,m[1]],this._model.selectionStartLength=B.length}}_selectToWordAt(m){const A=this._getWordAt(m,!0);if(A){let B=m[1];for(;A.start<0;)A.start+=this._bufferService.cols,B--;if(!this._model.areSelectionValuesReversed())for(;A.start+A.length>this._bufferService.cols;)A.length-=this._bufferService.cols,B++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?A.start:A.start+A.length,B]}}_isCharWordSeparator(m){return m.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(m.getChars())>=0}_selectLineAt(m){const A=this._bufferService.buffer.getWrappedRangeForLine(m),B={start:{x:0,y:A.first},end:{x:this._bufferService.cols-1,y:A.last}};this._model.selectionStart=[0,A.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,n.getRangeLength)(B,this._bufferService.cols)}};u.SelectionService=w=d([p(3,_.IBufferService),p(4,_.ICoreService),p(5,E.IMouseService),p(6,_.IOptionsService),p(7,E.IRenderService),p(8,E.ICoreBrowserService)],w)},4725:(Y,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ILinkProviderService=u.IThemeService=u.ICharacterJoinerService=u.ISelectionService=u.IRenderService=u.IMouseService=u.ICoreBrowserService=u.ICharSizeService=void 0;const d=f(8343);u.ICharSizeService=(0,d.createDecorator)("CharSizeService"),u.ICoreBrowserService=(0,d.createDecorator)("CoreBrowserService"),u.IMouseService=(0,d.createDecorator)("MouseService"),u.IRenderService=(0,d.createDecorator)("RenderService"),u.ISelectionService=(0,d.createDecorator)("SelectionService"),u.ICharacterJoinerService=(0,d.createDecorator)("CharacterJoinerService"),u.IThemeService=(0,d.createDecorator)("ThemeService"),u.ILinkProviderService=(0,d.createDecorator)("LinkProviderService")},6731:function(Y,u,f){var d=this&&this.__decorate||function(w,m,A,B){var U,z=arguments.length,O=z<3?m:B===null?B=Object.getOwnPropertyDescriptor(m,A):B;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(w,m,A,B);else for(var P=w.length-1;P>=0;P--)(U=w[P])&&(O=(z<3?U(O):z>3?U(m,A,O):U(m,A))||O);return z>3&&O&&Object.defineProperty(m,A,O),O},p=this&&this.__param||function(w,m){return function(A,B){m(A,B,w)}};Object.defineProperty(u,"__esModule",{value:!0}),u.ThemeService=u.DEFAULT_ANSI_COLORS=void 0;const h=f(7239),g=f(8055),y=f(8460),E=f(844),v=f(2585),o=g.css.toColor("#ffffff"),c=g.css.toColor("#000000"),n=g.css.toColor("#ffffff"),l=g.css.toColor("#000000"),_={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};u.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const w=[g.css.toColor("#2e3436"),g.css.toColor("#cc0000"),g.css.toColor("#4e9a06"),g.css.toColor("#c4a000"),g.css.toColor("#3465a4"),g.css.toColor("#75507b"),g.css.toColor("#06989a"),g.css.toColor("#d3d7cf"),g.css.toColor("#555753"),g.css.toColor("#ef2929"),g.css.toColor("#8ae234"),g.css.toColor("#fce94f"),g.css.toColor("#729fcf"),g.css.toColor("#ad7fa8"),g.css.toColor("#34e2e2"),g.css.toColor("#eeeeec")],m=[0,95,135,175,215,255];for(let A=0;A<216;A++){const B=m[A/36%6|0],U=m[A/6%6|0],z=m[A%6];w.push({css:g.channels.toCss(B,U,z),rgba:g.channels.toRgba(B,U,z)})}for(let A=0;A<24;A++){const B=8+10*A;w.push({css:g.channels.toCss(B,B,B),rgba:g.channels.toRgba(B,B,B)})}return w})());let b=u.ThemeService=class extends E.Disposable{get colors(){return this._colors}constructor(w){super(),this._optionsService=w,this._contrastCache=new h.ColorContrastCache,this._halfContrastCache=new h.ColorContrastCache,this._onChangeColors=this.register(new y.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:o,background:c,cursor:n,cursorAccent:l,selectionForeground:void 0,selectionBackgroundTransparent:_,selectionBackgroundOpaque:g.color.blend(c,_),selectionInactiveBackgroundTransparent:_,selectionInactiveBackgroundOpaque:g.color.blend(c,_),ansi:u.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(w={}){const m=this._colors;if(m.foreground=C(w.foreground,o),m.background=C(w.background,c),m.cursor=C(w.cursor,n),m.cursorAccent=C(w.cursorAccent,l),m.selectionBackgroundTransparent=C(w.selectionBackground,_),m.selectionBackgroundOpaque=g.color.blend(m.background,m.selectionBackgroundTransparent),m.selectionInactiveBackgroundTransparent=C(w.selectionInactiveBackground,m.selectionBackgroundTransparent),m.selectionInactiveBackgroundOpaque=g.color.blend(m.background,m.selectionInactiveBackgroundTransparent),m.selectionForeground=w.selectionForeground?C(w.selectionForeground,g.NULL_COLOR):void 0,m.selectionForeground===g.NULL_COLOR&&(m.selectionForeground=void 0),g.color.isOpaque(m.selectionBackgroundTransparent)&&(m.selectionBackgroundTransparent=g.color.opacity(m.selectionBackgroundTransparent,.3)),g.color.isOpaque(m.selectionInactiveBackgroundTransparent)&&(m.selectionInactiveBackgroundTransparent=g.color.opacity(m.selectionInactiveBackgroundTransparent,.3)),m.ansi=u.DEFAULT_ANSI_COLORS.slice(),m.ansi[0]=C(w.black,u.DEFAULT_ANSI_COLORS[0]),m.ansi[1]=C(w.red,u.DEFAULT_ANSI_COLORS[1]),m.ansi[2]=C(w.green,u.DEFAULT_ANSI_COLORS[2]),m.ansi[3]=C(w.yellow,u.DEFAULT_ANSI_COLORS[3]),m.ansi[4]=C(w.blue,u.DEFAULT_ANSI_COLORS[4]),m.ansi[5]=C(w.magenta,u.DEFAULT_ANSI_COLORS[5]),m.ansi[6]=C(w.cyan,u.DEFAULT_ANSI_COLORS[6]),m.ansi[7]=C(w.white,u.DEFAULT_ANSI_COLORS[7]),m.ansi[8]=C(w.brightBlack,u.DEFAULT_ANSI_COLORS[8]),m.ansi[9]=C(w.brightRed,u.DEFAULT_ANSI_COLORS[9]),m.ansi[10]=C(w.brightGreen,u.DEFAULT_ANSI_COLORS[10]),m.ansi[11]=C(w.brightYellow,u.DEFAULT_ANSI_COLORS[11]),m.ansi[12]=C(w.brightBlue,u.DEFAULT_ANSI_COLORS[12]),m.ansi[13]=C(w.brightMagenta,u.DEFAULT_ANSI_COLORS[13]),m.ansi[14]=C(w.brightCyan,u.DEFAULT_ANSI_COLORS[14]),m.ansi[15]=C(w.brightWhite,u.DEFAULT_ANSI_COLORS[15]),w.extendedAnsi){const A=Math.min(m.ansi.length-16,w.extendedAnsi.length);for(let B=0;B<A;B++)m.ansi[B+16]=C(w.extendedAnsi[B],u.DEFAULT_ANSI_COLORS[B+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(w){this._restoreColor(w),this._onChangeColors.fire(this.colors)}_restoreColor(w){if(w!==void 0)switch(w){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[w]=this._restoreColors.ansi[w]}else for(let m=0;m<this._restoreColors.ansi.length;++m)this._colors.ansi[m]=this._restoreColors.ansi[m]}modifyColors(w){w(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};function C(w,m){if(w!==void 0)try{return g.css.toColor(w)}catch{}return m}u.ThemeService=b=d([p(0,v.IOptionsService)],b)},6349:(Y,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CircularList=void 0;const d=f(8460),p=f(844);class h extends p.Disposable{constructor(y){super(),this._maxLength=y,this.onDeleteEmitter=this.register(new d.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new d.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new d.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(y){if(this._maxLength===y)return;const E=new Array(y);for(let v=0;v<Math.min(y,this.length);v++)E[v]=this._array[this._getCyclicIndex(v)];this._array=E,this._maxLength=y,this._startIndex=0}get length(){return this._length}set length(y){if(y>this._length)for(let E=this._length;E<y;E++)this._array[E]=void 0;this._length=y}get(y){return this._array[this._getCyclicIndex(y)]}set(y,E){this._array[this._getCyclicIndex(y)]=E}push(y){this._array[this._getCyclicIndex(this._length)]=y,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(y,E,...v){if(E){for(let o=y;o<this._length-E;o++)this._array[this._getCyclicIndex(o)]=this._array[this._getCyclicIndex(o+E)];this._length-=E,this.onDeleteEmitter.fire({index:y,amount:E})}for(let o=this._length-1;o>=y;o--)this._array[this._getCyclicIndex(o+v.length)]=this._array[this._getCyclicIndex(o)];for(let o=0;o<v.length;o++)this._array[this._getCyclicIndex(y+o)]=v[o];if(v.length&&this.onInsertEmitter.fire({index:y,amount:v.length}),this._length+v.length>this._maxLength){const o=this._length+v.length-this._maxLength;this._startIndex+=o,this._length=this._maxLength,this.onTrimEmitter.fire(o)}else this._length+=v.length}trimStart(y){y>this._length&&(y=this._length),this._startIndex+=y,this._length-=y,this.onTrimEmitter.fire(y)}shiftElements(y,E,v){if(!(E<=0)){if(y<0||y>=this._length)throw new Error("start argument out of range");if(y+v<0)throw new Error("Cannot shift elements in list beyond index 0");if(v>0){for(let c=E-1;c>=0;c--)this.set(y+c+v,this.get(y+c));const o=y+E+v-this._length;if(o>0)for(this._length+=o;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let o=0;o<E;o++)this.set(y+o+v,this.get(y+o))}}_getCyclicIndex(y){return(this._startIndex+y)%this._maxLength}}u.CircularList=h},1439:(Y,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.clone=void 0,u.clone=function f(d,p=5){if(typeof d!="object")return d;const h=Array.isArray(d)?[]:{};for(const g in d)h[g]=p<=1?d[g]:d[g]&&f(d[g],p-1);return h}},8055:(Y,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.contrastRatio=u.toPaddedHex=u.rgba=u.rgb=u.css=u.color=u.channels=u.NULL_COLOR=void 0;let f=0,d=0,p=0,h=0;var g,y,E,v,o;function c(l){const _=l.toString(16);return _.length<2?"0"+_:_}function n(l,_){return l<_?(_+.05)/(l+.05):(l+.05)/(_+.05)}u.NULL_COLOR={css:"#00000000",rgba:0},(function(l){l.toCss=function(_,b,C,w){return w!==void 0?`#${c(_)}${c(b)}${c(C)}${c(w)}`:`#${c(_)}${c(b)}${c(C)}`},l.toRgba=function(_,b,C,w=255){return(_<<24|b<<16|C<<8|w)>>>0},l.toColor=function(_,b,C,w){return{css:l.toCss(_,b,C,w),rgba:l.toRgba(_,b,C,w)}}})(g||(u.channels=g={})),(function(l){function _(b,C){return h=Math.round(255*C),[f,d,p]=o.toChannels(b.rgba),{css:g.toCss(f,d,p,h),rgba:g.toRgba(f,d,p,h)}}l.blend=function(b,C){if(h=(255&C.rgba)/255,h===1)return{css:C.css,rgba:C.rgba};const w=C.rgba>>24&255,m=C.rgba>>16&255,A=C.rgba>>8&255,B=b.rgba>>24&255,U=b.rgba>>16&255,z=b.rgba>>8&255;return f=B+Math.round((w-B)*h),d=U+Math.round((m-U)*h),p=z+Math.round((A-z)*h),{css:g.toCss(f,d,p),rgba:g.toRgba(f,d,p)}},l.isOpaque=function(b){return(255&b.rgba)==255},l.ensureContrastRatio=function(b,C,w){const m=o.ensureContrastRatio(b.rgba,C.rgba,w);if(m)return g.toColor(m>>24&255,m>>16&255,m>>8&255)},l.opaque=function(b){const C=(255|b.rgba)>>>0;return[f,d,p]=o.toChannels(C),{css:g.toCss(f,d,p),rgba:C}},l.opacity=_,l.multiplyOpacity=function(b,C){return h=255&b.rgba,_(b,h*C/255)},l.toColorRGB=function(b){return[b.rgba>>24&255,b.rgba>>16&255,b.rgba>>8&255]}})(y||(u.color=y={})),(function(l){let _,b;try{const C=document.createElement("canvas");C.width=1,C.height=1;const w=C.getContext("2d",{willReadFrequently:!0});w&&(_=w,_.globalCompositeOperation="copy",b=_.createLinearGradient(0,0,1,1))}catch{}l.toColor=function(C){if(C.match(/#[\da-f]{3,8}/i))switch(C.length){case 4:return f=parseInt(C.slice(1,2).repeat(2),16),d=parseInt(C.slice(2,3).repeat(2),16),p=parseInt(C.slice(3,4).repeat(2),16),g.toColor(f,d,p);case 5:return f=parseInt(C.slice(1,2).repeat(2),16),d=parseInt(C.slice(2,3).repeat(2),16),p=parseInt(C.slice(3,4).repeat(2),16),h=parseInt(C.slice(4,5).repeat(2),16),g.toColor(f,d,p,h);case 7:return{css:C,rgba:(parseInt(C.slice(1),16)<<8|255)>>>0};case 9:return{css:C,rgba:parseInt(C.slice(1),16)>>>0}}const w=C.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(w)return f=parseInt(w[1]),d=parseInt(w[2]),p=parseInt(w[3]),h=Math.round(255*(w[5]===void 0?1:parseFloat(w[5]))),g.toColor(f,d,p,h);if(!_||!b)throw new Error("css.toColor: Unsupported css format");if(_.fillStyle=b,_.fillStyle=C,typeof _.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(_.fillRect(0,0,1,1),[f,d,p,h]=_.getImageData(0,0,1,1).data,h!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:g.toRgba(f,d,p,h),css:C}}})(E||(u.css=E={})),(function(l){function _(b,C,w){const m=b/255,A=C/255,B=w/255;return .2126*(m<=.03928?m/12.92:Math.pow((m+.055)/1.055,2.4))+.7152*(A<=.03928?A/12.92:Math.pow((A+.055)/1.055,2.4))+.0722*(B<=.03928?B/12.92:Math.pow((B+.055)/1.055,2.4))}l.relativeLuminance=function(b){return _(b>>16&255,b>>8&255,255&b)},l.relativeLuminance2=_})(v||(u.rgb=v={})),(function(l){function _(C,w,m){const A=C>>24&255,B=C>>16&255,U=C>>8&255;let z=w>>24&255,O=w>>16&255,P=w>>8&255,te=n(v.relativeLuminance2(z,O,P),v.relativeLuminance2(A,B,U));for(;te<m&&(z>0||O>0||P>0);)z-=Math.max(0,Math.ceil(.1*z)),O-=Math.max(0,Math.ceil(.1*O)),P-=Math.max(0,Math.ceil(.1*P)),te=n(v.relativeLuminance2(z,O,P),v.relativeLuminance2(A,B,U));return(z<<24|O<<16|P<<8|255)>>>0}function b(C,w,m){const A=C>>24&255,B=C>>16&255,U=C>>8&255;let z=w>>24&255,O=w>>16&255,P=w>>8&255,te=n(v.relativeLuminance2(z,O,P),v.relativeLuminance2(A,B,U));for(;te<m&&(z<255||O<255||P<255);)z=Math.min(255,z+Math.ceil(.1*(255-z))),O=Math.min(255,O+Math.ceil(.1*(255-O))),P=Math.min(255,P+Math.ceil(.1*(255-P))),te=n(v.relativeLuminance2(z,O,P),v.relativeLuminance2(A,B,U));return(z<<24|O<<16|P<<8|255)>>>0}l.blend=function(C,w){if(h=(255&w)/255,h===1)return w;const m=w>>24&255,A=w>>16&255,B=w>>8&255,U=C>>24&255,z=C>>16&255,O=C>>8&255;return f=U+Math.round((m-U)*h),d=z+Math.round((A-z)*h),p=O+Math.round((B-O)*h),g.toRgba(f,d,p)},l.ensureContrastRatio=function(C,w,m){const A=v.relativeLuminance(C>>8),B=v.relativeLuminance(w>>8);if(n(A,B)<m){if(B<A){const O=_(C,w,m),P=n(A,v.relativeLuminance(O>>8));if(P<m){const te=b(C,w,m);return P>n(A,v.relativeLuminance(te>>8))?O:te}return O}const U=b(C,w,m),z=n(A,v.relativeLuminance(U>>8));if(z<m){const O=_(C,w,m);return z>n(A,v.relativeLuminance(O>>8))?U:O}return U}},l.reduceLuminance=_,l.increaseLuminance=b,l.toChannels=function(C){return[C>>24&255,C>>16&255,C>>8&255,255&C]}})(o||(u.rgba=o={})),u.toPaddedHex=c,u.contrastRatio=n},8969:(Y,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CoreTerminal=void 0;const d=f(844),p=f(2585),h=f(4348),g=f(7866),y=f(744),E=f(7302),v=f(6975),o=f(8460),c=f(1753),n=f(1480),l=f(7994),_=f(9282),b=f(5435),C=f(5981),w=f(2660);let m=!1;class A extends d.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new o.EventEmitter),this._onScroll.event((U=>{var z;(z=this._onScrollApi)==null||z.fire(U.position)}))),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(U){for(const z in U)this.optionsService.options[z]=U[z]}constructor(U){super(),this._windowsWrappingHeuristics=this.register(new d.MutableDisposable),this._onBinary=this.register(new o.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new o.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new o.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new o.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new o.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new o.EventEmitter),this._instantiationService=new h.InstantiationService,this.optionsService=this.register(new E.OptionsService(U)),this._instantiationService.setService(p.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(y.BufferService)),this._instantiationService.setService(p.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(g.LogService)),this._instantiationService.setService(p.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(v.CoreService)),this._instantiationService.setService(p.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(c.CoreMouseService)),this._instantiationService.setService(p.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(n.UnicodeService)),this._instantiationService.setService(p.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(l.CharsetService),this._instantiationService.setService(p.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(w.OscLinkService),this._instantiationService.setService(p.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new b.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,o.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,o.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,o.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,o.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom((()=>this.scrollToBottom()))),this.register(this.coreService.onUserInput((()=>this._writeBuffer.handleUserInput()))),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],(()=>this._handleWindowsPtyOptionChange()))),this.register(this._bufferService.onScroll((z=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this.register(this._inputHandler.onScroll((z=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this._writeBuffer=this.register(new C.WriteBuffer(((z,O)=>this._inputHandler.parse(z,O)))),this.register((0,o.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(U,z){this._writeBuffer.write(U,z)}writeSync(U,z){this._logService.logLevel<=p.LogLevelEnum.WARN&&!m&&(this._logService.warn("writeSync is unreliable and will be removed soon."),m=!0),this._writeBuffer.writeSync(U,z)}input(U,z=!0){this.coreService.triggerDataEvent(U,z)}resize(U,z){isNaN(U)||isNaN(z)||(U=Math.max(U,y.MINIMUM_COLS),z=Math.max(z,y.MINIMUM_ROWS),this._bufferService.resize(U,z))}scroll(U,z=!1){this._bufferService.scroll(U,z)}scrollLines(U,z,O){this._bufferService.scrollLines(U,z,O)}scrollPages(U){this.scrollLines(U*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(U){const z=U-this._bufferService.buffer.ydisp;z!==0&&this.scrollLines(z)}registerEscHandler(U,z){return this._inputHandler.registerEscHandler(U,z)}registerDcsHandler(U,z){return this._inputHandler.registerDcsHandler(U,z)}registerCsiHandler(U,z){return this._inputHandler.registerCsiHandler(U,z)}registerOscHandler(U,z){return this._inputHandler.registerOscHandler(U,z)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let U=!1;const z=this.optionsService.rawOptions.windowsPty;z&&z.buildNumber!==void 0&&z.buildNumber!==void 0?U=z.backend==="conpty"&&z.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(U=!0),U?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const U=[];U.push(this.onLineFeed(_.updateWindowsModeWrappedState.bind(null,this._bufferService))),U.push(this.registerCsiHandler({final:"H"},(()=>((0,_.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,d.toDisposable)((()=>{for(const z of U)z.dispose()}))}}}u.CoreTerminal=A},8460:(Y,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.runAndSubscribe=u.forwardEvent=u.EventEmitter=void 0,u.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=f=>(this._listeners.push(f),{dispose:()=>{if(!this._disposed){for(let d=0;d<this._listeners.length;d++)if(this._listeners[d]===f)return void this._listeners.splice(d,1)}}})),this._event}fire(f,d){const p=[];for(let h=0;h<this._listeners.length;h++)p.push(this._listeners[h]);for(let h=0;h<p.length;h++)p[h].call(void 0,f,d)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},u.forwardEvent=function(f,d){return f((p=>d.fire(p)))},u.runAndSubscribe=function(f,d){return d(void 0),f((p=>d(p)))}},5435:function(Y,u,f){var d=this&&this.__decorate||function(ie,x,k,D){var T,N=arguments.length,G=N<3?x:D===null?D=Object.getOwnPropertyDescriptor(x,k):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(ie,x,k,D);else for(var ee=ie.length-1;ee>=0;ee--)(T=ie[ee])&&(G=(N<3?T(G):N>3?T(x,k,G):T(x,k))||G);return N>3&&G&&Object.defineProperty(x,k,G),G},p=this&&this.__param||function(ie,x){return function(k,D){x(k,D,ie)}};Object.defineProperty(u,"__esModule",{value:!0}),u.InputHandler=u.WindowsOptionsReportType=void 0;const h=f(2584),g=f(7116),y=f(2015),E=f(844),v=f(482),o=f(8437),c=f(8460),n=f(643),l=f(511),_=f(3734),b=f(2585),C=f(1480),w=f(6242),m=f(6351),A=f(5941),B={"(":0,")":1,"*":2,"+":3,"-":1,".":2},U=131072;function z(ie,x){if(ie>24)return x.setWinLines||!1;switch(ie){case 1:return!!x.restoreWin;case 2:return!!x.minimizeWin;case 3:return!!x.setWinPosition;case 4:return!!x.setWinSizePixels;case 5:return!!x.raiseWin;case 6:return!!x.lowerWin;case 7:return!!x.refreshWin;case 8:return!!x.setWinSizeChars;case 9:return!!x.maximizeWin;case 10:return!!x.fullscreenWin;case 11:return!!x.getWinState;case 13:return!!x.getWinPosition;case 14:return!!x.getWinSizePixels;case 15:return!!x.getScreenSizePixels;case 16:return!!x.getCellSizePixels;case 18:return!!x.getWinSizeChars;case 19:return!!x.getScreenSizeChars;case 20:return!!x.getIconTitle;case 21:return!!x.getWinTitle;case 22:return!!x.pushTitle;case 23:return!!x.popTitle;case 24:return!!x.setWinLines}return!1}var O;(function(ie){ie[ie.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",ie[ie.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(O||(u.WindowsOptionsReportType=O={}));let P=0;class te extends E.Disposable{getAttrData(){return this._curAttrData}constructor(x,k,D,T,N,G,ee,he,K=new y.EscapeSequenceParser){super(),this._bufferService=x,this._charsetService=k,this._coreService=D,this._logService=T,this._optionsService=N,this._oscLinkService=G,this._coreMouseService=ee,this._unicodeService=he,this._parser=K,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new v.StringToUtf32,this._utf8Decoder=new v.Utf8ToUtf32,this._workCell=new l.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=o.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=o.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new c.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new c.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new c.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new c.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new c.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new c.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new c.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new c.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new c.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new c.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new c.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new c.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new c.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new I(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((M=>this._activeBuffer=M.activeBuffer))),this._parser.setCsiHandlerFallback(((M,oe)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(M),params:oe.toArray()})})),this._parser.setEscHandlerFallback((M=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(M)})})),this._parser.setExecuteHandlerFallback((M=>{this._logService.debug("Unknown EXECUTE code: ",{code:M})})),this._parser.setOscHandlerFallback(((M,oe,ne)=>{this._logService.debug("Unknown OSC code: ",{identifier:M,action:oe,data:ne})})),this._parser.setDcsHandlerFallback(((M,oe,ne)=>{oe==="HOOK"&&(ne=ne.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(M),action:oe,payload:ne})})),this._parser.setPrintHandler(((M,oe,ne)=>this.print(M,oe,ne))),this._parser.registerCsiHandler({final:"@"},(M=>this.insertChars(M))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(M=>this.scrollLeft(M))),this._parser.registerCsiHandler({final:"A"},(M=>this.cursorUp(M))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(M=>this.scrollRight(M))),this._parser.registerCsiHandler({final:"B"},(M=>this.cursorDown(M))),this._parser.registerCsiHandler({final:"C"},(M=>this.cursorForward(M))),this._parser.registerCsiHandler({final:"D"},(M=>this.cursorBackward(M))),this._parser.registerCsiHandler({final:"E"},(M=>this.cursorNextLine(M))),this._parser.registerCsiHandler({final:"F"},(M=>this.cursorPrecedingLine(M))),this._parser.registerCsiHandler({final:"G"},(M=>this.cursorCharAbsolute(M))),this._parser.registerCsiHandler({final:"H"},(M=>this.cursorPosition(M))),this._parser.registerCsiHandler({final:"I"},(M=>this.cursorForwardTab(M))),this._parser.registerCsiHandler({final:"J"},(M=>this.eraseInDisplay(M,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(M=>this.eraseInDisplay(M,!0))),this._parser.registerCsiHandler({final:"K"},(M=>this.eraseInLine(M,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(M=>this.eraseInLine(M,!0))),this._parser.registerCsiHandler({final:"L"},(M=>this.insertLines(M))),this._parser.registerCsiHandler({final:"M"},(M=>this.deleteLines(M))),this._parser.registerCsiHandler({final:"P"},(M=>this.deleteChars(M))),this._parser.registerCsiHandler({final:"S"},(M=>this.scrollUp(M))),this._parser.registerCsiHandler({final:"T"},(M=>this.scrollDown(M))),this._parser.registerCsiHandler({final:"X"},(M=>this.eraseChars(M))),this._parser.registerCsiHandler({final:"Z"},(M=>this.cursorBackwardTab(M))),this._parser.registerCsiHandler({final:"`"},(M=>this.charPosAbsolute(M))),this._parser.registerCsiHandler({final:"a"},(M=>this.hPositionRelative(M))),this._parser.registerCsiHandler({final:"b"},(M=>this.repeatPrecedingCharacter(M))),this._parser.registerCsiHandler({final:"c"},(M=>this.sendDeviceAttributesPrimary(M))),this._parser.registerCsiHandler({prefix:">",final:"c"},(M=>this.sendDeviceAttributesSecondary(M))),this._parser.registerCsiHandler({final:"d"},(M=>this.linePosAbsolute(M))),this._parser.registerCsiHandler({final:"e"},(M=>this.vPositionRelative(M))),this._parser.registerCsiHandler({final:"f"},(M=>this.hVPosition(M))),this._parser.registerCsiHandler({final:"g"},(M=>this.tabClear(M))),this._parser.registerCsiHandler({final:"h"},(M=>this.setMode(M))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(M=>this.setModePrivate(M))),this._parser.registerCsiHandler({final:"l"},(M=>this.resetMode(M))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(M=>this.resetModePrivate(M))),this._parser.registerCsiHandler({final:"m"},(M=>this.charAttributes(M))),this._parser.registerCsiHandler({final:"n"},(M=>this.deviceStatus(M))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(M=>this.deviceStatusPrivate(M))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(M=>this.softReset(M))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(M=>this.setCursorStyle(M))),this._parser.registerCsiHandler({final:"r"},(M=>this.setScrollRegion(M))),this._parser.registerCsiHandler({final:"s"},(M=>this.saveCursor(M))),this._parser.registerCsiHandler({final:"t"},(M=>this.windowOptions(M))),this._parser.registerCsiHandler({final:"u"},(M=>this.restoreCursor(M))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(M=>this.insertColumns(M))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(M=>this.deleteColumns(M))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(M=>this.selectProtected(M))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(M=>this.requestMode(M,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(M=>this.requestMode(M,!1))),this._parser.setExecuteHandler(h.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(h.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(h.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(h.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(h.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(h.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(h.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(h.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(h.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(h.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(h.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(h.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new w.OscHandler((M=>(this.setTitle(M),this.setIconName(M),!0)))),this._parser.registerOscHandler(1,new w.OscHandler((M=>this.setIconName(M)))),this._parser.registerOscHandler(2,new w.OscHandler((M=>this.setTitle(M)))),this._parser.registerOscHandler(4,new w.OscHandler((M=>this.setOrReportIndexedColor(M)))),this._parser.registerOscHandler(8,new w.OscHandler((M=>this.setHyperlink(M)))),this._parser.registerOscHandler(10,new w.OscHandler((M=>this.setOrReportFgColor(M)))),this._parser.registerOscHandler(11,new w.OscHandler((M=>this.setOrReportBgColor(M)))),this._parser.registerOscHandler(12,new w.OscHandler((M=>this.setOrReportCursorColor(M)))),this._parser.registerOscHandler(104,new w.OscHandler((M=>this.restoreIndexedColor(M)))),this._parser.registerOscHandler(110,new w.OscHandler((M=>this.restoreFgColor(M)))),this._parser.registerOscHandler(111,new w.OscHandler((M=>this.restoreBgColor(M)))),this._parser.registerOscHandler(112,new w.OscHandler((M=>this.restoreCursorColor(M)))),this._parser.registerEscHandler({final:"7"},(()=>this.saveCursor())),this._parser.registerEscHandler({final:"8"},(()=>this.restoreCursor())),this._parser.registerEscHandler({final:"D"},(()=>this.index())),this._parser.registerEscHandler({final:"E"},(()=>this.nextLine())),this._parser.registerEscHandler({final:"H"},(()=>this.tabSet())),this._parser.registerEscHandler({final:"M"},(()=>this.reverseIndex())),this._parser.registerEscHandler({final:"="},(()=>this.keypadApplicationMode())),this._parser.registerEscHandler({final:">"},(()=>this.keypadNumericMode())),this._parser.registerEscHandler({final:"c"},(()=>this.fullReset())),this._parser.registerEscHandler({final:"n"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"o"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"|"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"}"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"~"},(()=>this.setgLevel(1))),this._parser.registerEscHandler({intermediates:"%",final:"@"},(()=>this.selectDefaultCharset())),this._parser.registerEscHandler({intermediates:"%",final:"G"},(()=>this.selectDefaultCharset()));for(const M in g.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:M},(()=>this.selectCharset("("+M))),this._parser.registerEscHandler({intermediates:")",final:M},(()=>this.selectCharset(")"+M))),this._parser.registerEscHandler({intermediates:"*",final:M},(()=>this.selectCharset("*"+M))),this._parser.registerEscHandler({intermediates:"+",final:M},(()=>this.selectCharset("+"+M))),this._parser.registerEscHandler({intermediates:"-",final:M},(()=>this.selectCharset("-"+M))),this._parser.registerEscHandler({intermediates:".",final:M},(()=>this.selectCharset("."+M))),this._parser.registerEscHandler({intermediates:"/",final:M},(()=>this.selectCharset("/"+M)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((M=>(this._logService.error("Parsing error: ",M),M))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new m.DcsHandler(((M,oe)=>this.requestStatusString(M,oe))))}_preserveStack(x,k,D,T){this._parseStack.paused=!0,this._parseStack.cursorStartX=x,this._parseStack.cursorStartY=k,this._parseStack.decodedLength=D,this._parseStack.position=T}_logSlowResolvingAsync(x){this._logService.logLevel<=b.LogLevelEnum.WARN&&Promise.race([x,new Promise(((k,D)=>setTimeout((()=>D("#SLOW_TIMEOUT")),5e3)))]).catch((k=>{if(k!=="#SLOW_TIMEOUT")throw k;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(x,k){let D,T=this._activeBuffer.x,N=this._activeBuffer.y,G=0;const ee=this._parseStack.paused;if(ee){if(D=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,k))return this._logSlowResolvingAsync(D),D;T=this._parseStack.cursorStartX,N=this._parseStack.cursorStartY,this._parseStack.paused=!1,x.length>U&&(G=this._parseStack.position+U)}if(this._logService.logLevel<=b.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof x=="string"?` "${x}"`:` "${Array.prototype.map.call(x,(M=>String.fromCharCode(M))).join("")}"`),typeof x=="string"?x.split("").map((M=>M.charCodeAt(0))):x),this._parseBuffer.length<x.length&&this._parseBuffer.length<U&&(this._parseBuffer=new Uint32Array(Math.min(x.length,U))),ee||this._dirtyRowTracker.clearRange(),x.length>U)for(let M=G;M<x.length;M+=U){const oe=M+U<x.length?M+U:x.length,ne=typeof x=="string"?this._stringDecoder.decode(x.substring(M,oe),this._parseBuffer):this._utf8Decoder.decode(x.subarray(M,oe),this._parseBuffer);if(D=this._parser.parse(this._parseBuffer,ne))return this._preserveStack(T,N,ne,M),this._logSlowResolvingAsync(D),D}else if(!ee){const M=typeof x=="string"?this._stringDecoder.decode(x,this._parseBuffer):this._utf8Decoder.decode(x,this._parseBuffer);if(D=this._parser.parse(this._parseBuffer,M))return this._preserveStack(T,N,M,0),this._logSlowResolvingAsync(D),D}this._activeBuffer.x===T&&this._activeBuffer.y===N||this._onCursorMove.fire();const he=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),K=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);K<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(K,this._bufferService.rows-1),Math.min(he,this._bufferService.rows-1))}print(x,k,D){let T,N;const G=this._charsetService.charset,ee=this._optionsService.rawOptions.screenReaderMode,he=this._bufferService.cols,K=this._coreService.decPrivateModes.wraparound,M=this._coreService.modes.insertMode,oe=this._curAttrData;let ne=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&D-k>0&&ne.getWidth(this._activeBuffer.x-1)===2&&ne.setCellFromCodepoint(this._activeBuffer.x-1,0,1,oe);let _e=this._parser.precedingJoinState;for(let de=k;de<D;++de){if(T=x[de],T<127&&G){const tt=G[String.fromCharCode(T)];tt&&(T=tt.charCodeAt(0))}const we=this._unicodeService.charProperties(T,_e);N=C.UnicodeService.extractWidth(we);const ke=C.UnicodeService.extractShouldJoin(we),je=ke?C.UnicodeService.extractWidth(_e):0;if(_e=we,ee&&this._onA11yChar.fire((0,v.stringFromCodePoint)(T)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+N-je>he){if(K){const tt=ne;let Se=this._activeBuffer.x-je;for(this._activeBuffer.x=je,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),ne=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),je>0&&ne instanceof o.BufferLine&&ne.copyCellsFrom(tt,Se,0,je,!1);Se<he;)tt.setCellFromCodepoint(Se++,0,1,oe)}else if(this._activeBuffer.x=he-1,N===2)continue}if(ke&&this._activeBuffer.x){const tt=ne.getWidth(this._activeBuffer.x-1)?1:2;ne.addCodepointToCell(this._activeBuffer.x-tt,T,N);for(let Se=N-je;--Se>=0;)ne.setCellFromCodepoint(this._activeBuffer.x++,0,0,oe)}else if(M&&(ne.insertCells(this._activeBuffer.x,N-je,this._activeBuffer.getNullCell(oe)),ne.getWidth(he-1)===2&&ne.setCellFromCodepoint(he-1,n.NULL_CELL_CODE,n.NULL_CELL_WIDTH,oe)),ne.setCellFromCodepoint(this._activeBuffer.x++,T,N,oe),N>0)for(;--N;)ne.setCellFromCodepoint(this._activeBuffer.x++,0,0,oe)}this._parser.precedingJoinState=_e,this._activeBuffer.x<he&&D-k>0&&ne.getWidth(this._activeBuffer.x)===0&&!ne.hasContent(this._activeBuffer.x)&&ne.setCellFromCodepoint(this._activeBuffer.x,0,1,oe),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(x,k){return x.final!=="t"||x.prefix||x.intermediates?this._parser.registerCsiHandler(x,k):this._parser.registerCsiHandler(x,(D=>!z(D.params[0],this._optionsService.rawOptions.windowOptions)||k(D)))}registerDcsHandler(x,k){return this._parser.registerDcsHandler(x,new m.DcsHandler(k))}registerEscHandler(x,k){return this._parser.registerEscHandler(x,k)}registerOscHandler(x,k){return this._parser.registerOscHandler(x,new w.OscHandler(k))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var x;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&((x=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&x.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const k=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);k.hasWidth(this._activeBuffer.x)&&!k.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const x=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-x),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(x=this._bufferService.cols-1){this._activeBuffer.x=Math.min(x,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(x,k){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=x,this._activeBuffer.y=this._activeBuffer.scrollTop+k):(this._activeBuffer.x=x,this._activeBuffer.y=k),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(x,k){this._restrictCursor(),this._setCursor(this._activeBuffer.x+x,this._activeBuffer.y+k)}cursorUp(x){const k=this._activeBuffer.y-this._activeBuffer.scrollTop;return k>=0?this._moveCursor(0,-Math.min(k,x.params[0]||1)):this._moveCursor(0,-(x.params[0]||1)),!0}cursorDown(x){const k=this._activeBuffer.scrollBottom-this._activeBuffer.y;return k>=0?this._moveCursor(0,Math.min(k,x.params[0]||1)):this._moveCursor(0,x.params[0]||1),!0}cursorForward(x){return this._moveCursor(x.params[0]||1,0),!0}cursorBackward(x){return this._moveCursor(-(x.params[0]||1),0),!0}cursorNextLine(x){return this.cursorDown(x),this._activeBuffer.x=0,!0}cursorPrecedingLine(x){return this.cursorUp(x),this._activeBuffer.x=0,!0}cursorCharAbsolute(x){return this._setCursor((x.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(x){return this._setCursor(x.length>=2?(x.params[1]||1)-1:0,(x.params[0]||1)-1),!0}charPosAbsolute(x){return this._setCursor((x.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(x){return this._moveCursor(x.params[0]||1,0),!0}linePosAbsolute(x){return this._setCursor(this._activeBuffer.x,(x.params[0]||1)-1),!0}vPositionRelative(x){return this._moveCursor(0,x.params[0]||1),!0}hVPosition(x){return this.cursorPosition(x),!0}tabClear(x){const k=x.params[0];return k===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:k===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(x){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let k=x.params[0]||1;for(;k--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(x){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let k=x.params[0]||1;for(;k--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(x){const k=x.params[0];return k===1&&(this._curAttrData.bg|=536870912),k!==2&&k!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(x,k,D,T=!1,N=!1){const G=this._activeBuffer.lines.get(this._activeBuffer.ybase+x);G.replaceCells(k,D,this._activeBuffer.getNullCell(this._eraseAttrData()),N),T&&(G.isWrapped=!1)}_resetBufferLine(x,k=!1){const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+x);D&&(D.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),k),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+x),D.isWrapped=!1)}eraseInDisplay(x,k=!1){let D;switch(this._restrictCursor(this._bufferService.cols),x.params[0]){case 0:for(D=this._activeBuffer.y,this._dirtyRowTracker.markDirty(D),this._eraseInBufferLine(D++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,k);D<this._bufferService.rows;D++)this._resetBufferLine(D,k);this._dirtyRowTracker.markDirty(D);break;case 1:for(D=this._activeBuffer.y,this._dirtyRowTracker.markDirty(D),this._eraseInBufferLine(D,0,this._activeBuffer.x+1,!0,k),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(D+1).isWrapped=!1);D--;)this._resetBufferLine(D,k);this._dirtyRowTracker.markDirty(0);break;case 2:for(D=this._bufferService.rows,this._dirtyRowTracker.markDirty(D-1);D--;)this._resetBufferLine(D,k);this._dirtyRowTracker.markDirty(0);break;case 3:const T=this._activeBuffer.lines.length-this._bufferService.rows;T>0&&(this._activeBuffer.lines.trimStart(T),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-T,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-T,0),this._onScroll.fire(0))}return!0}eraseInLine(x,k=!1){switch(this._restrictCursor(this._bufferService.cols),x.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,k);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,k);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,k)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(x){this._restrictCursor();let k=x.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const D=this._activeBuffer.ybase+this._activeBuffer.y,T=this._bufferService.rows-1-this._activeBuffer.scrollBottom,N=this._bufferService.rows-1+this._activeBuffer.ybase-T+1;for(;k--;)this._activeBuffer.lines.splice(N-1,1),this._activeBuffer.lines.splice(D,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(x){this._restrictCursor();let k=x.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const D=this._activeBuffer.ybase+this._activeBuffer.y;let T;for(T=this._bufferService.rows-1-this._activeBuffer.scrollBottom,T=this._bufferService.rows-1+this._activeBuffer.ybase-T;k--;)this._activeBuffer.lines.splice(D,1),this._activeBuffer.lines.splice(T,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(x){this._restrictCursor();const k=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return k&&(k.insertCells(this._activeBuffer.x,x.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(x){this._restrictCursor();const k=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return k&&(k.deleteCells(this._activeBuffer.x,x.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(x){let k=x.params[0]||1;for(;k--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(x){let k=x.params[0]||1;for(;k--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(o.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(x){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const k=x.params[0]||1;for(let D=this._activeBuffer.scrollTop;D<=this._activeBuffer.scrollBottom;++D){const T=this._activeBuffer.lines.get(this._activeBuffer.ybase+D);T.deleteCells(0,k,this._activeBuffer.getNullCell(this._eraseAttrData())),T.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(x){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const k=x.params[0]||1;for(let D=this._activeBuffer.scrollTop;D<=this._activeBuffer.scrollBottom;++D){const T=this._activeBuffer.lines.get(this._activeBuffer.ybase+D);T.insertCells(0,k,this._activeBuffer.getNullCell(this._eraseAttrData())),T.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(x){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const k=x.params[0]||1;for(let D=this._activeBuffer.scrollTop;D<=this._activeBuffer.scrollBottom;++D){const T=this._activeBuffer.lines.get(this._activeBuffer.ybase+D);T.insertCells(this._activeBuffer.x,k,this._activeBuffer.getNullCell(this._eraseAttrData())),T.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(x){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const k=x.params[0]||1;for(let D=this._activeBuffer.scrollTop;D<=this._activeBuffer.scrollBottom;++D){const T=this._activeBuffer.lines.get(this._activeBuffer.ybase+D);T.deleteCells(this._activeBuffer.x,k,this._activeBuffer.getNullCell(this._eraseAttrData())),T.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(x){this._restrictCursor();const k=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return k&&(k.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(x.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(x){const k=this._parser.precedingJoinState;if(!k)return!0;const D=x.params[0]||1,T=C.UnicodeService.extractWidth(k),N=this._activeBuffer.x-T,G=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(N),ee=new Uint32Array(G.length*D);let he=0;for(let M=0;M<G.length;){const oe=G.codePointAt(M)||0;ee[he++]=oe,M+=oe>65535?2:1}let K=he;for(let M=1;M<D;++M)ee.copyWithin(K,0,he),K+=he;return this.print(ee,0,K),!0}sendDeviceAttributesPrimary(x){return x.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(h.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(h.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(x){return x.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(h.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(h.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(x.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(h.C0.ESC+"[>83;40003;0c")),!0}_is(x){return(this._optionsService.rawOptions.termName+"").indexOf(x)===0}setMode(x){for(let k=0;k<x.length;k++)switch(x.params[k]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(x){for(let k=0;k<x.length;k++)switch(x.params[k]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,g.DEFAULT_CHARSET),this._charsetService.setgCharset(1,g.DEFAULT_CHARSET),this._charsetService.setgCharset(2,g.DEFAULT_CHARSET),this._charsetService.setgCharset(3,g.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode(x){for(let k=0;k<x.length;k++)switch(x.params[k]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(x){for(let k=0;k<x.length;k++)switch(x.params[k]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),x.params[k]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode(x,k){const D=this._coreService.decPrivateModes,{activeProtocol:T,activeEncoding:N}=this._coreMouseService,G=this._coreService,{buffers:ee,cols:he}=this._bufferService,{active:K,alt:M}=ee,oe=this._optionsService.rawOptions,ne=ke=>ke?1:2,_e=x.params[0];return de=_e,we=k?_e===2?4:_e===4?ne(G.modes.insertMode):_e===12?3:_e===20?ne(oe.convertEol):0:_e===1?ne(D.applicationCursorKeys):_e===3?oe.windowOptions.setWinLines?he===80?2:he===132?1:0:0:_e===6?ne(D.origin):_e===7?ne(D.wraparound):_e===8?3:_e===9?ne(T==="X10"):_e===12?ne(oe.cursorBlink):_e===25?ne(!G.isCursorHidden):_e===45?ne(D.reverseWraparound):_e===66?ne(D.applicationKeypad):_e===67?4:_e===1e3?ne(T==="VT200"):_e===1002?ne(T==="DRAG"):_e===1003?ne(T==="ANY"):_e===1004?ne(D.sendFocus):_e===1005?4:_e===1006?ne(N==="SGR"):_e===1015?4:_e===1016?ne(N==="SGR_PIXELS"):_e===1048?1:_e===47||_e===1047||_e===1049?ne(K===M):_e===2004?ne(D.bracketedPasteMode):0,G.triggerDataEvent(`${h.C0.ESC}[${k?"":"?"}${de};${we}$y`),!0;var de,we}_updateAttrColor(x,k,D,T,N){return k===2?(x|=50331648,x&=-16777216,x|=_.AttributeData.fromColorRGB([D,T,N])):k===5&&(x&=-50331904,x|=33554432|255&D),x}_extractColor(x,k,D){const T=[0,0,-1,0,0,0];let N=0,G=0;do{if(T[G+N]=x.params[k+G],x.hasSubParams(k+G)){const ee=x.getSubParams(k+G);let he=0;do T[1]===5&&(N=1),T[G+he+1+N]=ee[he];while(++he<ee.length&&he+G+1+N<T.length);break}if(T[1]===5&&G+N>=2||T[1]===2&&G+N>=5)break;T[1]&&(N=1)}while(++G+k<x.length&&G+N<T.length);for(let ee=2;ee<T.length;++ee)T[ee]===-1&&(T[ee]=0);switch(T[0]){case 38:D.fg=this._updateAttrColor(D.fg,T[1],T[3],T[4],T[5]);break;case 48:D.bg=this._updateAttrColor(D.bg,T[1],T[3],T[4],T[5]);break;case 58:D.extended=D.extended.clone(),D.extended.underlineColor=this._updateAttrColor(D.extended.underlineColor,T[1],T[3],T[4],T[5])}return G}_processUnderline(x,k){k.extended=k.extended.clone(),(!~x||x>5)&&(x=1),k.extended.underlineStyle=x,k.fg|=268435456,x===0&&(k.fg&=-268435457),k.updateExtended()}_processSGR0(x){x.fg=o.DEFAULT_ATTR_DATA.fg,x.bg=o.DEFAULT_ATTR_DATA.bg,x.extended=x.extended.clone(),x.extended.underlineStyle=0,x.extended.underlineColor&=-67108864,x.updateExtended()}charAttributes(x){if(x.length===1&&x.params[0]===0)return this._processSGR0(this._curAttrData),!0;const k=x.length;let D;const T=this._curAttrData;for(let N=0;N<k;N++)D=x.params[N],D>=30&&D<=37?(T.fg&=-50331904,T.fg|=16777216|D-30):D>=40&&D<=47?(T.bg&=-50331904,T.bg|=16777216|D-40):D>=90&&D<=97?(T.fg&=-50331904,T.fg|=16777224|D-90):D>=100&&D<=107?(T.bg&=-50331904,T.bg|=16777224|D-100):D===0?this._processSGR0(T):D===1?T.fg|=134217728:D===3?T.bg|=67108864:D===4?(T.fg|=268435456,this._processUnderline(x.hasSubParams(N)?x.getSubParams(N)[0]:1,T)):D===5?T.fg|=536870912:D===7?T.fg|=67108864:D===8?T.fg|=1073741824:D===9?T.fg|=2147483648:D===2?T.bg|=134217728:D===21?this._processUnderline(2,T):D===22?(T.fg&=-134217729,T.bg&=-134217729):D===23?T.bg&=-67108865:D===24?(T.fg&=-268435457,this._processUnderline(0,T)):D===25?T.fg&=-536870913:D===27?T.fg&=-67108865:D===28?T.fg&=-1073741825:D===29?T.fg&=2147483647:D===39?(T.fg&=-67108864,T.fg|=16777215&o.DEFAULT_ATTR_DATA.fg):D===49?(T.bg&=-67108864,T.bg|=16777215&o.DEFAULT_ATTR_DATA.bg):D===38||D===48||D===58?N+=this._extractColor(x,N,T):D===53?T.bg|=1073741824:D===55?T.bg&=-1073741825:D===59?(T.extended=T.extended.clone(),T.extended.underlineColor=-1,T.updateExtended()):D===100?(T.fg&=-67108864,T.fg|=16777215&o.DEFAULT_ATTR_DATA.fg,T.bg&=-67108864,T.bg|=16777215&o.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",D);return!0}deviceStatus(x){switch(x.params[0]){case 5:this._coreService.triggerDataEvent(`${h.C0.ESC}[0n`);break;case 6:const k=this._activeBuffer.y+1,D=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[${k};${D}R`)}return!0}deviceStatusPrivate(x){if(x.params[0]===6){const k=this._activeBuffer.y+1,D=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[?${k};${D}R`)}return!0}softReset(x){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=o.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(x){const k=x.params[0]||1;switch(k){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const D=k%2==1;return this._optionsService.options.cursorBlink=D,!0}setScrollRegion(x){const k=x.params[0]||1;let D;return(x.length<2||(D=x.params[1])>this._bufferService.rows||D===0)&&(D=this._bufferService.rows),D>k&&(this._activeBuffer.scrollTop=k-1,this._activeBuffer.scrollBottom=D-1,this._setCursor(0,0)),!0}windowOptions(x){if(!z(x.params[0],this._optionsService.rawOptions.windowOptions))return!0;const k=x.length>1?x.params[1]:0;switch(x.params[0]){case 14:k!==2&&this._onRequestWindowsOptionsReport.fire(O.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(O.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${h.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:k!==0&&k!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),k!==0&&k!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:k!==0&&k!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),k!==0&&k!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(x){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(x){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(x){return this._windowTitle=x,this._onTitleChange.fire(x),!0}setIconName(x){return this._iconName=x,!0}setOrReportIndexedColor(x){const k=[],D=x.split(";");for(;D.length>1;){const T=D.shift(),N=D.shift();if(/^\d+$/.exec(T)){const G=parseInt(T);if(F(G))if(N==="?")k.push({type:0,index:G});else{const ee=(0,A.parseColor)(N);ee&&k.push({type:1,index:G,color:ee})}}}return k.length&&this._onColor.fire(k),!0}setHyperlink(x){const k=x.split(";");return!(k.length<2)&&(k[1]?this._createHyperlink(k[0],k[1]):!k[0]&&this._finishHyperlink())}_createHyperlink(x,k){this._getCurrentLinkId()&&this._finishHyperlink();const D=x.split(":");let T;const N=D.findIndex((G=>G.startsWith("id=")));return N!==-1&&(T=D[N].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:T,uri:k}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(x,k){const D=x.split(";");for(let T=0;T<D.length&&!(k>=this._specialColors.length);++T,++k)if(D[T]==="?")this._onColor.fire([{type:0,index:this._specialColors[k]}]);else{const N=(0,A.parseColor)(D[T]);N&&this._onColor.fire([{type:1,index:this._specialColors[k],color:N}])}return!0}setOrReportFgColor(x){return this._setOrReportSpecialColor(x,0)}setOrReportBgColor(x){return this._setOrReportSpecialColor(x,1)}setOrReportCursorColor(x){return this._setOrReportSpecialColor(x,2)}restoreIndexedColor(x){if(!x)return this._onColor.fire([{type:2}]),!0;const k=[],D=x.split(";");for(let T=0;T<D.length;++T)if(/^\d+$/.exec(D[T])){const N=parseInt(D[T]);F(N)&&k.push({type:2,index:N})}return k.length&&this._onColor.fire(k),!0}restoreFgColor(x){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(x){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(x){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,g.DEFAULT_CHARSET),!0}selectCharset(x){return x.length!==2?(this.selectDefaultCharset(),!0):(x[0]==="/"||this._charsetService.setgCharset(B[x[0]],g.CHARSETS[x[1]]||g.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const x=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,x,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=o.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=o.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(x){return this._charsetService.setgLevel(x),!0}screenAlignmentPattern(){const x=new l.CellData;x.content=4194373,x.fg=this._curAttrData.fg,x.bg=this._curAttrData.bg,this._setCursor(0,0);for(let k=0;k<this._bufferService.rows;++k){const D=this._activeBuffer.ybase+this._activeBuffer.y+k,T=this._activeBuffer.lines.get(D);T&&(T.fill(x),T.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(x,k){const D=this._bufferService.buffer,T=this._optionsService.rawOptions;return(N=>(this._coreService.triggerDataEvent(`${h.C0.ESC}${N}${h.C0.ESC}\\`),!0))(x==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:x==='"p'?'P1$r61;1"p':x==="r"?`P1$r${D.scrollTop+1};${D.scrollBottom+1}r`:x==="m"?"P1$r0m":x===" q"?`P1$r${{block:2,underline:4,bar:6}[T.cursorStyle]-(T.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(x,k){this._dirtyRowTracker.markRangeDirty(x,k)}}u.InputHandler=te;let I=class{constructor(ie){this._bufferService=ie,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(ie){ie<this.start?this.start=ie:ie>this.end&&(this.end=ie)}markRangeDirty(ie,x){ie>x&&(P=ie,ie=x,x=P),ie<this.start&&(this.start=ie),x>this.end&&(this.end=x)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function F(ie){return 0<=ie&&ie<256}I=d([p(0,b.IBufferService)],I)},844:(Y,u)=>{function f(d){for(const p of d)p.dispose();d.length=0}Object.defineProperty(u,"__esModule",{value:!0}),u.getDisposeArrayDisposable=u.disposeArray=u.toDisposable=u.MutableDisposable=u.Disposable=void 0,u.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const d of this._disposables)d.dispose();this._disposables.length=0}register(d){return this._disposables.push(d),d}unregister(d){const p=this._disposables.indexOf(d);p!==-1&&this._disposables.splice(p,1)}},u.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(d){var p;this._isDisposed||d===this._value||((p=this._value)==null||p.dispose(),this._value=d)}clear(){this.value=void 0}dispose(){var d;this._isDisposed=!0,(d=this._value)==null||d.dispose(),this._value=void 0}},u.toDisposable=function(d){return{dispose:d}},u.disposeArray=f,u.getDisposeArrayDisposable=function(d){return{dispose:()=>f(d)}}},1505:(Y,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.FourKeyMap=u.TwoKeyMap=void 0;class f{constructor(){this._data={}}set(p,h,g){this._data[p]||(this._data[p]={}),this._data[p][h]=g}get(p,h){return this._data[p]?this._data[p][h]:void 0}clear(){this._data={}}}u.TwoKeyMap=f,u.FourKeyMap=class{constructor(){this._data=new f}set(d,p,h,g,y){this._data.get(d,p)||this._data.set(d,p,new f),this._data.get(d,p).set(h,g,y)}get(d,p,h,g){var y;return(y=this._data.get(d,p))==null?void 0:y.get(h,g)}clear(){this._data.clear()}}},6114:(Y,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.isChromeOS=u.isLinux=u.isWindows=u.isIphone=u.isIpad=u.isMac=u.getSafariVersion=u.isSafari=u.isLegacyEdge=u.isFirefox=u.isNode=void 0,u.isNode=typeof process<"u"&&"title"in process;const f=u.isNode?"node":navigator.userAgent,d=u.isNode?"node":navigator.platform;u.isFirefox=f.includes("Firefox"),u.isLegacyEdge=f.includes("Edge"),u.isSafari=/^((?!chrome|android).)*safari/i.test(f),u.getSafariVersion=function(){if(!u.isSafari)return 0;const p=f.match(/Version\/(\d+)/);return p===null||p.length<2?0:parseInt(p[1])},u.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(d),u.isIpad=d==="iPad",u.isIphone=d==="iPhone",u.isWindows=["Windows","Win16","Win32","WinCE"].includes(d),u.isLinux=d.indexOf("Linux")>=0,u.isChromeOS=/\bCrOS\b/.test(f)},6106:(Y,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.SortedList=void 0;let f=0;u.SortedList=class{constructor(d){this._getKey=d,this._array=[]}clear(){this._array.length=0}insert(d){this._array.length!==0?(f=this._search(this._getKey(d)),this._array.splice(f,0,d)):this._array.push(d)}delete(d){if(this._array.length===0)return!1;const p=this._getKey(d);if(p===void 0||(f=this._search(p),f===-1)||this._getKey(this._array[f])!==p)return!1;do if(this._array[f]===d)return this._array.splice(f,1),!0;while(++f<this._array.length&&this._getKey(this._array[f])===p);return!1}*getKeyIterator(d){if(this._array.length!==0&&(f=this._search(d),!(f<0||f>=this._array.length)&&this._getKey(this._array[f])===d))do yield this._array[f];while(++f<this._array.length&&this._getKey(this._array[f])===d)}forEachByKey(d,p){if(this._array.length!==0&&(f=this._search(d),!(f<0||f>=this._array.length)&&this._getKey(this._array[f])===d))do p(this._array[f]);while(++f<this._array.length&&this._getKey(this._array[f])===d)}values(){return[...this._array].values()}_search(d){let p=0,h=this._array.length-1;for(;h>=p;){let g=p+h>>1;const y=this._getKey(this._array[g]);if(y>d)h=g-1;else{if(!(y<d)){for(;g>0&&this._getKey(this._array[g-1])===d;)g--;return g}p=g+1}}return p}}},7226:(Y,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.DebouncedIdleTask=u.IdleTaskQueue=u.PriorityTaskQueue=void 0;const d=f(6114);class p{constructor(){this._tasks=[],this._i=0}enqueue(y){this._tasks.push(y),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(y){this._idleCallback=void 0;let E=0,v=0,o=y.timeRemaining(),c=0;for(;this._i<this._tasks.length;){if(E=Date.now(),this._tasks[this._i]()||this._i++,E=Math.max(1,Date.now()-E),v=Math.max(E,v),c=y.timeRemaining(),1.5*v>c)return o-E<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(o-E))}ms`),void this._start();o=c}this.clear()}}class h extends p{_requestCallback(y){return setTimeout((()=>y(this._createDeadline(16))))}_cancelCallback(y){clearTimeout(y)}_createDeadline(y){const E=Date.now()+y;return{timeRemaining:()=>Math.max(0,E-Date.now())}}}u.PriorityTaskQueue=h,u.IdleTaskQueue=!d.isNode&&"requestIdleCallback"in window?class extends p{_requestCallback(g){return requestIdleCallback(g)}_cancelCallback(g){cancelIdleCallback(g)}}:h,u.DebouncedIdleTask=class{constructor(){this._queue=new u.IdleTaskQueue}set(g){this._queue.clear(),this._queue.enqueue(g)}flush(){this._queue.flush()}}},9282:(Y,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.updateWindowsModeWrappedState=void 0;const d=f(643);u.updateWindowsModeWrappedState=function(p){const h=p.buffer.lines.get(p.buffer.ybase+p.buffer.y-1),g=h==null?void 0:h.get(p.cols-1),y=p.buffer.lines.get(p.buffer.ybase+p.buffer.y);y&&g&&(y.isWrapped=g[d.CHAR_DATA_CODE_INDEX]!==d.NULL_CELL_CODE&&g[d.CHAR_DATA_CODE_INDEX]!==d.WHITESPACE_CELL_CODE)}},3734:(Y,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ExtendedAttrs=u.AttributeData=void 0;class f{constructor(){this.fg=0,this.bg=0,this.extended=new d}static toColorRGB(h){return[h>>>16&255,h>>>8&255,255&h]}static fromColorRGB(h){return(255&h[0])<<16|(255&h[1])<<8|255&h[2]}clone(){const h=new f;return h.fg=this.fg,h.bg=this.bg,h.extended=this.extended.clone(),h}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}u.AttributeData=f;class d{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(h){this._ext=h}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(h){this._ext&=-469762049,this._ext|=h<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(h){this._ext&=-67108864,this._ext|=67108863&h}get urlId(){return this._urlId}set urlId(h){this._urlId=h}get underlineVariantOffset(){const h=(3758096384&this._ext)>>29;return h<0?4294967288^h:h}set underlineVariantOffset(h){this._ext&=536870911,this._ext|=h<<29&3758096384}constructor(h=0,g=0){this._ext=0,this._urlId=0,this._ext=h,this._urlId=g}clone(){return new d(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}u.ExtendedAttrs=d},9092:(Y,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Buffer=u.MAX_BUFFER_SIZE=void 0;const d=f(6349),p=f(7226),h=f(3734),g=f(8437),y=f(4634),E=f(511),v=f(643),o=f(4863),c=f(7116);u.MAX_BUFFER_SIZE=4294967295,u.Buffer=class{constructor(n,l,_){this._hasScrollback=n,this._optionsService=l,this._bufferService=_,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=g.DEFAULT_ATTR_DATA.clone(),this.savedCharset=c.DEFAULT_CHARSET,this.markers=[],this._nullCell=E.CellData.fromCharData([0,v.NULL_CELL_CHAR,v.NULL_CELL_WIDTH,v.NULL_CELL_CODE]),this._whitespaceCell=E.CellData.fromCharData([0,v.WHITESPACE_CELL_CHAR,v.WHITESPACE_CELL_WIDTH,v.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new p.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(n){return n?(this._nullCell.fg=n.fg,this._nullCell.bg=n.bg,this._nullCell.extended=n.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new h.ExtendedAttrs),this._nullCell}getWhitespaceCell(n){return n?(this._whitespaceCell.fg=n.fg,this._whitespaceCell.bg=n.bg,this._whitespaceCell.extended=n.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new h.ExtendedAttrs),this._whitespaceCell}getBlankLine(n,l){return new g.BufferLine(this._bufferService.cols,this.getNullCell(n),l)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const n=this.ybase+this.y-this.ydisp;return n>=0&&n<this._rows}_getCorrectBufferLength(n){if(!this._hasScrollback)return n;const l=n+this._optionsService.rawOptions.scrollback;return l>u.MAX_BUFFER_SIZE?u.MAX_BUFFER_SIZE:l}fillViewportRows(n){if(this.lines.length===0){n===void 0&&(n=g.DEFAULT_ATTR_DATA);let l=this._rows;for(;l--;)this.lines.push(this.getBlankLine(n))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(n,l){const _=this.getNullCell(g.DEFAULT_ATTR_DATA);let b=0;const C=this._getCorrectBufferLength(l);if(C>this.lines.maxLength&&(this.lines.maxLength=C),this.lines.length>0){if(this._cols<n)for(let m=0;m<this.lines.length;m++)b+=+this.lines.get(m).resize(n,_);let w=0;if(this._rows<l)for(let m=this._rows;m<l;m++)this.lines.length<l+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new g.BufferLine(n,_)):this.ybase>0&&this.lines.length<=this.ybase+this.y+w+1?(this.ybase--,w++,this.ydisp>0&&this.ydisp--):this.lines.push(new g.BufferLine(n,_)));else for(let m=this._rows;m>l;m--)this.lines.length>l+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(C<this.lines.maxLength){const m=this.lines.length-C;m>0&&(this.lines.trimStart(m),this.ybase=Math.max(this.ybase-m,0),this.ydisp=Math.max(this.ydisp-m,0),this.savedY=Math.max(this.savedY-m,0)),this.lines.maxLength=C}this.x=Math.min(this.x,n-1),this.y=Math.min(this.y,l-1),w&&(this.y+=w),this.savedX=Math.min(this.savedX,n-1),this.scrollTop=0}if(this.scrollBottom=l-1,this._isReflowEnabled&&(this._reflow(n,l),this._cols>n))for(let w=0;w<this.lines.length;w++)b+=+this.lines.get(w).resize(n,_);this._cols=n,this._rows=l,this._memoryCleanupQueue.clear(),b>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let n=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,n=!1);let l=0;for(;this._memoryCleanupPosition<this.lines.length;)if(l+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),l>100)return!0;return n}get _isReflowEnabled(){const n=this._optionsService.rawOptions.windowsPty;return n&&n.buildNumber?this._hasScrollback&&n.backend==="conpty"&&n.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(n,l){this._cols!==n&&(n>this._cols?this._reflowLarger(n,l):this._reflowSmaller(n,l))}_reflowLarger(n,l){const _=(0,y.reflowLargerGetLinesToRemove)(this.lines,this._cols,n,this.ybase+this.y,this.getNullCell(g.DEFAULT_ATTR_DATA));if(_.length>0){const b=(0,y.reflowLargerCreateNewLayout)(this.lines,_);(0,y.reflowLargerApplyNewLayout)(this.lines,b.layout),this._reflowLargerAdjustViewport(n,l,b.countRemoved)}}_reflowLargerAdjustViewport(n,l,_){const b=this.getNullCell(g.DEFAULT_ATTR_DATA);let C=_;for(;C-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<l&&this.lines.push(new g.BufferLine(n,b))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-_,0)}_reflowSmaller(n,l){const _=this.getNullCell(g.DEFAULT_ATTR_DATA),b=[];let C=0;for(let w=this.lines.length-1;w>=0;w--){let m=this.lines.get(w);if(!m||!m.isWrapped&&m.getTrimmedLength()<=n)continue;const A=[m];for(;m.isWrapped&&w>0;)m=this.lines.get(--w),A.unshift(m);const B=this.ybase+this.y;if(B>=w&&B<w+A.length)continue;const U=A[A.length-1].getTrimmedLength(),z=(0,y.reflowSmallerGetNewLineLengths)(A,this._cols,n),O=z.length-A.length;let P;P=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+O):Math.max(0,this.lines.length-this.lines.maxLength+O);const te=[];for(let D=0;D<O;D++){const T=this.getBlankLine(g.DEFAULT_ATTR_DATA,!0);te.push(T)}te.length>0&&(b.push({start:w+A.length+C,newLines:te}),C+=te.length),A.push(...te);let I=z.length-1,F=z[I];F===0&&(I--,F=z[I]);let ie=A.length-O-1,x=U;for(;ie>=0;){const D=Math.min(x,F);if(A[I]===void 0)break;if(A[I].copyCellsFrom(A[ie],x-D,F-D,D,!0),F-=D,F===0&&(I--,F=z[I]),x-=D,x===0){ie--;const T=Math.max(ie,0);x=(0,y.getWrappedLineTrimmedLength)(A,T,this._cols)}}for(let D=0;D<A.length;D++)z[D]<n&&A[D].setCell(z[D],_);let k=O-P;for(;k-- >0;)this.ybase===0?this.y<l-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+C)-l&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+O,this.ybase+l-1)}if(b.length>0){const w=[],m=[];for(let I=0;I<this.lines.length;I++)m.push(this.lines.get(I));const A=this.lines.length;let B=A-1,U=0,z=b[U];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+C);let O=0;for(let I=Math.min(this.lines.maxLength-1,A+C-1);I>=0;I--)if(z&&z.start>B+O){for(let F=z.newLines.length-1;F>=0;F--)this.lines.set(I--,z.newLines[F]);I++,w.push({index:B+1,amount:z.newLines.length}),O+=z.newLines.length,z=b[++U]}else this.lines.set(I,m[B--]);let P=0;for(let I=w.length-1;I>=0;I--)w[I].index+=P,this.lines.onInsertEmitter.fire(w[I]),P+=w[I].amount;const te=Math.max(0,A+C-this.lines.maxLength);te>0&&this.lines.onTrimEmitter.fire(te)}}translateBufferLineToString(n,l,_=0,b){const C=this.lines.get(n);return C?C.translateToString(l,_,b):""}getWrappedRangeForLine(n){let l=n,_=n;for(;l>0&&this.lines.get(l).isWrapped;)l--;for(;_+1<this.lines.length&&this.lines.get(_+1).isWrapped;)_++;return{first:l,last:_}}setupTabStops(n){for(n!=null?this.tabs[n]||(n=this.prevStop(n)):(this.tabs={},n=0);n<this._cols;n+=this._optionsService.rawOptions.tabStopWidth)this.tabs[n]=!0}prevStop(n){for(n==null&&(n=this.x);!this.tabs[--n]&&n>0;);return n>=this._cols?this._cols-1:n<0?0:n}nextStop(n){for(n==null&&(n=this.x);!this.tabs[++n]&&n<this._cols;);return n>=this._cols?this._cols-1:n<0?0:n}clearMarkers(n){this._isClearing=!0;for(let l=0;l<this.markers.length;l++)this.markers[l].line===n&&(this.markers[l].dispose(),this.markers.splice(l--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let n=0;n<this.markers.length;n++)this.markers[n].dispose(),this.markers.splice(n--,1);this._isClearing=!1}addMarker(n){const l=new o.Marker(n);return this.markers.push(l),l.register(this.lines.onTrim((_=>{l.line-=_,l.line<0&&l.dispose()}))),l.register(this.lines.onInsert((_=>{l.line>=_.index&&(l.line+=_.amount)}))),l.register(this.lines.onDelete((_=>{l.line>=_.index&&l.line<_.index+_.amount&&l.dispose(),l.line>_.index&&(l.line-=_.amount)}))),l.register(l.onDispose((()=>this._removeMarker(l)))),l}_removeMarker(n){this._isClearing||this.markers.splice(this.markers.indexOf(n),1)}}},8437:(Y,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferLine=u.DEFAULT_ATTR_DATA=void 0;const d=f(3734),p=f(511),h=f(643),g=f(482);u.DEFAULT_ATTR_DATA=Object.freeze(new d.AttributeData);let y=0;class E{constructor(o,c,n=!1){this.isWrapped=n,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*o);const l=c||p.CellData.fromCharData([0,h.NULL_CELL_CHAR,h.NULL_CELL_WIDTH,h.NULL_CELL_CODE]);for(let _=0;_<o;++_)this.setCell(_,l);this.length=o}get(o){const c=this._data[3*o+0],n=2097151&c;return[this._data[3*o+1],2097152&c?this._combined[o]:n?(0,g.stringFromCodePoint)(n):"",c>>22,2097152&c?this._combined[o].charCodeAt(this._combined[o].length-1):n]}set(o,c){this._data[3*o+1]=c[h.CHAR_DATA_ATTR_INDEX],c[h.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[o]=c[1],this._data[3*o+0]=2097152|o|c[h.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*o+0]=c[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|c[h.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(o){return this._data[3*o+0]>>22}hasWidth(o){return 12582912&this._data[3*o+0]}getFg(o){return this._data[3*o+1]}getBg(o){return this._data[3*o+2]}hasContent(o){return 4194303&this._data[3*o+0]}getCodePoint(o){const c=this._data[3*o+0];return 2097152&c?this._combined[o].charCodeAt(this._combined[o].length-1):2097151&c}isCombined(o){return 2097152&this._data[3*o+0]}getString(o){const c=this._data[3*o+0];return 2097152&c?this._combined[o]:2097151&c?(0,g.stringFromCodePoint)(2097151&c):""}isProtected(o){return 536870912&this._data[3*o+2]}loadCell(o,c){return y=3*o,c.content=this._data[y+0],c.fg=this._data[y+1],c.bg=this._data[y+2],2097152&c.content&&(c.combinedData=this._combined[o]),268435456&c.bg&&(c.extended=this._extendedAttrs[o]),c}setCell(o,c){2097152&c.content&&(this._combined[o]=c.combinedData),268435456&c.bg&&(this._extendedAttrs[o]=c.extended),this._data[3*o+0]=c.content,this._data[3*o+1]=c.fg,this._data[3*o+2]=c.bg}setCellFromCodepoint(o,c,n,l){268435456&l.bg&&(this._extendedAttrs[o]=l.extended),this._data[3*o+0]=c|n<<22,this._data[3*o+1]=l.fg,this._data[3*o+2]=l.bg}addCodepointToCell(o,c,n){let l=this._data[3*o+0];2097152&l?this._combined[o]+=(0,g.stringFromCodePoint)(c):2097151&l?(this._combined[o]=(0,g.stringFromCodePoint)(2097151&l)+(0,g.stringFromCodePoint)(c),l&=-2097152,l|=2097152):l=c|4194304,n&&(l&=-12582913,l|=n<<22),this._data[3*o+0]=l}insertCells(o,c,n){if((o%=this.length)&&this.getWidth(o-1)===2&&this.setCellFromCodepoint(o-1,0,1,n),c<this.length-o){const l=new p.CellData;for(let _=this.length-o-c-1;_>=0;--_)this.setCell(o+c+_,this.loadCell(o+_,l));for(let _=0;_<c;++_)this.setCell(o+_,n)}else for(let l=o;l<this.length;++l)this.setCell(l,n);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,n)}deleteCells(o,c,n){if(o%=this.length,c<this.length-o){const l=new p.CellData;for(let _=0;_<this.length-o-c;++_)this.setCell(o+_,this.loadCell(o+c+_,l));for(let _=this.length-c;_<this.length;++_)this.setCell(_,n)}else for(let l=o;l<this.length;++l)this.setCell(l,n);o&&this.getWidth(o-1)===2&&this.setCellFromCodepoint(o-1,0,1,n),this.getWidth(o)!==0||this.hasContent(o)||this.setCellFromCodepoint(o,0,1,n)}replaceCells(o,c,n,l=!1){if(l)for(o&&this.getWidth(o-1)===2&&!this.isProtected(o-1)&&this.setCellFromCodepoint(o-1,0,1,n),c<this.length&&this.getWidth(c-1)===2&&!this.isProtected(c)&&this.setCellFromCodepoint(c,0,1,n);o<c&&o<this.length;)this.isProtected(o)||this.setCell(o,n),o++;else for(o&&this.getWidth(o-1)===2&&this.setCellFromCodepoint(o-1,0,1,n),c<this.length&&this.getWidth(c-1)===2&&this.setCellFromCodepoint(c,0,1,n);o<c&&o<this.length;)this.setCell(o++,n)}resize(o,c){if(o===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const n=3*o;if(o>this.length){if(this._data.buffer.byteLength>=4*n)this._data=new Uint32Array(this._data.buffer,0,n);else{const l=new Uint32Array(n);l.set(this._data),this._data=l}for(let l=this.length;l<o;++l)this.setCell(l,c)}else{this._data=this._data.subarray(0,n);const l=Object.keys(this._combined);for(let b=0;b<l.length;b++){const C=parseInt(l[b],10);C>=o&&delete this._combined[C]}const _=Object.keys(this._extendedAttrs);for(let b=0;b<_.length;b++){const C=parseInt(_[b],10);C>=o&&delete this._extendedAttrs[C]}}return this.length=o,4*n*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const o=new Uint32Array(this._data.length);return o.set(this._data),this._data=o,1}return 0}fill(o,c=!1){if(c)for(let n=0;n<this.length;++n)this.isProtected(n)||this.setCell(n,o);else{this._combined={},this._extendedAttrs={};for(let n=0;n<this.length;++n)this.setCell(n,o)}}copyFrom(o){this.length!==o.length?this._data=new Uint32Array(o._data):this._data.set(o._data),this.length=o.length,this._combined={};for(const c in o._combined)this._combined[c]=o._combined[c];this._extendedAttrs={};for(const c in o._extendedAttrs)this._extendedAttrs[c]=o._extendedAttrs[c];this.isWrapped=o.isWrapped}clone(){const o=new E(0);o._data=new Uint32Array(this._data),o.length=this.length;for(const c in this._combined)o._combined[c]=this._combined[c];for(const c in this._extendedAttrs)o._extendedAttrs[c]=this._extendedAttrs[c];return o.isWrapped=this.isWrapped,o}getTrimmedLength(){for(let o=this.length-1;o>=0;--o)if(4194303&this._data[3*o+0])return o+(this._data[3*o+0]>>22);return 0}getNoBgTrimmedLength(){for(let o=this.length-1;o>=0;--o)if(4194303&this._data[3*o+0]||50331648&this._data[3*o+2])return o+(this._data[3*o+0]>>22);return 0}copyCellsFrom(o,c,n,l,_){const b=o._data;if(_)for(let w=l-1;w>=0;w--){for(let m=0;m<3;m++)this._data[3*(n+w)+m]=b[3*(c+w)+m];268435456&b[3*(c+w)+2]&&(this._extendedAttrs[n+w]=o._extendedAttrs[c+w])}else for(let w=0;w<l;w++){for(let m=0;m<3;m++)this._data[3*(n+w)+m]=b[3*(c+w)+m];268435456&b[3*(c+w)+2]&&(this._extendedAttrs[n+w]=o._extendedAttrs[c+w])}const C=Object.keys(o._combined);for(let w=0;w<C.length;w++){const m=parseInt(C[w],10);m>=c&&(this._combined[m-c+n]=o._combined[m])}}translateToString(o,c,n,l){c=c??0,n=n??this.length,o&&(n=Math.min(n,this.getTrimmedLength())),l&&(l.length=0);let _="";for(;c<n;){const b=this._data[3*c+0],C=2097151&b,w=2097152&b?this._combined[c]:C?(0,g.stringFromCodePoint)(C):h.WHITESPACE_CELL_CHAR;if(_+=w,l)for(let m=0;m<w.length;++m)l.push(c);c+=b>>22||1}return l&&l.push(c),_}}u.BufferLine=E},4841:(Y,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.getRangeLength=void 0,u.getRangeLength=function(f,d){if(f.start.y>f.end.y)throw new Error(`Buffer range end (${f.end.x}, ${f.end.y}) cannot be before start (${f.start.x}, ${f.start.y})`);return d*(f.end.y-f.start.y)+(f.end.x-f.start.x+1)}},4634:(Y,u)=>{function f(d,p,h){if(p===d.length-1)return d[p].getTrimmedLength();const g=!d[p].hasContent(h-1)&&d[p].getWidth(h-1)===1,y=d[p+1].getWidth(0)===2;return g&&y?h-1:h}Object.defineProperty(u,"__esModule",{value:!0}),u.getWrappedLineTrimmedLength=u.reflowSmallerGetNewLineLengths=u.reflowLargerApplyNewLayout=u.reflowLargerCreateNewLayout=u.reflowLargerGetLinesToRemove=void 0,u.reflowLargerGetLinesToRemove=function(d,p,h,g,y){const E=[];for(let v=0;v<d.length-1;v++){let o=v,c=d.get(++o);if(!c.isWrapped)continue;const n=[d.get(v)];for(;o<d.length&&c.isWrapped;)n.push(c),c=d.get(++o);if(g>=v&&g<o){v+=n.length-1;continue}let l=0,_=f(n,l,p),b=1,C=0;for(;b<n.length;){const m=f(n,b,p),A=m-C,B=h-_,U=Math.min(A,B);n[l].copyCellsFrom(n[b],C,_,U,!1),_+=U,_===h&&(l++,_=0),C+=U,C===m&&(b++,C=0),_===0&&l!==0&&n[l-1].getWidth(h-1)===2&&(n[l].copyCellsFrom(n[l-1],h-1,_++,1,!1),n[l-1].setCell(h-1,y))}n[l].replaceCells(_,h,y);let w=0;for(let m=n.length-1;m>0&&(m>l||n[m].getTrimmedLength()===0);m--)w++;w>0&&(E.push(v+n.length-w),E.push(w)),v+=n.length-1}return E},u.reflowLargerCreateNewLayout=function(d,p){const h=[];let g=0,y=p[g],E=0;for(let v=0;v<d.length;v++)if(y===v){const o=p[++g];d.onDeleteEmitter.fire({index:v-E,amount:o}),v+=o-1,E+=o,y=p[++g]}else h.push(v);return{layout:h,countRemoved:E}},u.reflowLargerApplyNewLayout=function(d,p){const h=[];for(let g=0;g<p.length;g++)h.push(d.get(p[g]));for(let g=0;g<h.length;g++)d.set(g,h[g]);d.length=p.length},u.reflowSmallerGetNewLineLengths=function(d,p,h){const g=[],y=d.map(((c,n)=>f(d,n,p))).reduce(((c,n)=>c+n));let E=0,v=0,o=0;for(;o<y;){if(y-o<h){g.push(y-o);break}E+=h;const c=f(d,v,p);E>c&&(E-=c,v++);const n=d[v].getWidth(E-1)===2;n&&E--;const l=n?h-1:h;g.push(l),o+=l}return g},u.getWrappedLineTrimmedLength=f},5295:(Y,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferSet=void 0;const d=f(8460),p=f(844),h=f(9092);class g extends p.Disposable{constructor(E,v){super(),this._optionsService=E,this._bufferService=v,this._onBufferActivate=this.register(new d.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.resize(this._bufferService.cols,this._bufferService.rows)))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",(()=>this.setupTabStops())))}reset(){this._normal=new h.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new h.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(E){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(E),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(E,v){this._normal.resize(E,v),this._alt.resize(E,v),this.setupTabStops(E)}setupTabStops(E){this._normal.setupTabStops(E),this._alt.setupTabStops(E)}}u.BufferSet=g},511:(Y,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CellData=void 0;const d=f(482),p=f(643),h=f(3734);class g extends h.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new h.ExtendedAttrs,this.combinedData=""}static fromCharData(E){const v=new g;return v.setFromCharData(E),v}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,d.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(E){this.fg=E[p.CHAR_DATA_ATTR_INDEX],this.bg=0;let v=!1;if(E[p.CHAR_DATA_CHAR_INDEX].length>2)v=!0;else if(E[p.CHAR_DATA_CHAR_INDEX].length===2){const o=E[p.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=o&&o<=56319){const c=E[p.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=c&&c<=57343?this.content=1024*(o-55296)+c-56320+65536|E[p.CHAR_DATA_WIDTH_INDEX]<<22:v=!0}else v=!0}else this.content=E[p.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|E[p.CHAR_DATA_WIDTH_INDEX]<<22;v&&(this.combinedData=E[p.CHAR_DATA_CHAR_INDEX],this.content=2097152|E[p.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}u.CellData=g},643:(Y,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.WHITESPACE_CELL_CODE=u.WHITESPACE_CELL_WIDTH=u.WHITESPACE_CELL_CHAR=u.NULL_CELL_CODE=u.NULL_CELL_WIDTH=u.NULL_CELL_CHAR=u.CHAR_DATA_CODE_INDEX=u.CHAR_DATA_WIDTH_INDEX=u.CHAR_DATA_CHAR_INDEX=u.CHAR_DATA_ATTR_INDEX=u.DEFAULT_EXT=u.DEFAULT_ATTR=u.DEFAULT_COLOR=void 0,u.DEFAULT_COLOR=0,u.DEFAULT_ATTR=256|u.DEFAULT_COLOR<<9,u.DEFAULT_EXT=0,u.CHAR_DATA_ATTR_INDEX=0,u.CHAR_DATA_CHAR_INDEX=1,u.CHAR_DATA_WIDTH_INDEX=2,u.CHAR_DATA_CODE_INDEX=3,u.NULL_CELL_CHAR="",u.NULL_CELL_WIDTH=1,u.NULL_CELL_CODE=0,u.WHITESPACE_CELL_CHAR=" ",u.WHITESPACE_CELL_WIDTH=1,u.WHITESPACE_CELL_CODE=32},4863:(Y,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Marker=void 0;const d=f(8460),p=f(844);class h{get id(){return this._id}constructor(y){this.line=y,this.isDisposed=!1,this._disposables=[],this._id=h._nextId++,this._onDispose=this.register(new d.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,p.disposeArray)(this._disposables),this._disposables.length=0)}register(y){return this._disposables.push(y),y}}u.Marker=h,h._nextId=1},7116:(Y,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.DEFAULT_CHARSET=u.CHARSETS=void 0,u.CHARSETS={},u.DEFAULT_CHARSET=u.CHARSETS.B,u.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},u.CHARSETS.A={"#":"£"},u.CHARSETS.B=void 0,u.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},u.CHARSETS.C=u.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},u.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},u.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},u.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},u.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},u.CHARSETS.E=u.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},u.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},u.CHARSETS.H=u.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},u.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(Y,u)=>{var f,d,p;Object.defineProperty(u,"__esModule",{value:!0}),u.C1_ESCAPED=u.C1=u.C0=void 0,(function(h){h.NUL="\0",h.SOH="",h.STX="",h.ETX="",h.EOT="",h.ENQ="",h.ACK="",h.BEL="\x07",h.BS="\b",h.HT=" ",h.LF=`
|
|
191
|
+
`,h.VT="\v",h.FF="\f",h.CR="\r",h.SO="",h.SI="",h.DLE="",h.DC1="",h.DC2="",h.DC3="",h.DC4="",h.NAK="",h.SYN="",h.ETB="",h.CAN="",h.EM="",h.SUB="",h.ESC="\x1B",h.FS="",h.GS="",h.RS="",h.US="",h.SP=" ",h.DEL=""})(f||(u.C0=f={})),(function(h){h.PAD="",h.HOP="",h.BPH="",h.NBH="",h.IND="",h.NEL="
",h.SSA="",h.ESA="",h.HTS="",h.HTJ="",h.VTS="",h.PLD="",h.PLU="",h.RI="",h.SS2="",h.SS3="",h.DCS="",h.PU1="",h.PU2="",h.STS="",h.CCH="",h.MW="",h.SPA="",h.EPA="",h.SOS="",h.SGCI="",h.SCI="",h.CSI="",h.ST="",h.OSC="",h.PM="",h.APC=""})(d||(u.C1=d={})),(function(h){h.ST=`${f.ESC}\\`})(p||(u.C1_ESCAPED=p={}))},7399:(Y,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.evaluateKeyboardEvent=void 0;const d=f(2584),p={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};u.evaluateKeyboardEvent=function(h,g,y,E){const v={type:0,cancel:!1,key:void 0},o=(h.shiftKey?1:0)|(h.altKey?2:0)|(h.ctrlKey?4:0)|(h.metaKey?8:0);switch(h.keyCode){case 0:h.key==="UIKeyInputUpArrow"?v.key=g?d.C0.ESC+"OA":d.C0.ESC+"[A":h.key==="UIKeyInputLeftArrow"?v.key=g?d.C0.ESC+"OD":d.C0.ESC+"[D":h.key==="UIKeyInputRightArrow"?v.key=g?d.C0.ESC+"OC":d.C0.ESC+"[C":h.key==="UIKeyInputDownArrow"&&(v.key=g?d.C0.ESC+"OB":d.C0.ESC+"[B");break;case 8:v.key=h.ctrlKey?"\b":d.C0.DEL,h.altKey&&(v.key=d.C0.ESC+v.key);break;case 9:if(h.shiftKey){v.key=d.C0.ESC+"[Z";break}v.key=d.C0.HT,v.cancel=!0;break;case 13:v.key=h.altKey?d.C0.ESC+d.C0.CR:d.C0.CR,v.cancel=!0;break;case 27:v.key=d.C0.ESC,h.altKey&&(v.key=d.C0.ESC+d.C0.ESC),v.cancel=!0;break;case 37:if(h.metaKey)break;o?(v.key=d.C0.ESC+"[1;"+(o+1)+"D",v.key===d.C0.ESC+"[1;3D"&&(v.key=d.C0.ESC+(y?"b":"[1;5D"))):v.key=g?d.C0.ESC+"OD":d.C0.ESC+"[D";break;case 39:if(h.metaKey)break;o?(v.key=d.C0.ESC+"[1;"+(o+1)+"C",v.key===d.C0.ESC+"[1;3C"&&(v.key=d.C0.ESC+(y?"f":"[1;5C"))):v.key=g?d.C0.ESC+"OC":d.C0.ESC+"[C";break;case 38:if(h.metaKey)break;o?(v.key=d.C0.ESC+"[1;"+(o+1)+"A",y||v.key!==d.C0.ESC+"[1;3A"||(v.key=d.C0.ESC+"[1;5A")):v.key=g?d.C0.ESC+"OA":d.C0.ESC+"[A";break;case 40:if(h.metaKey)break;o?(v.key=d.C0.ESC+"[1;"+(o+1)+"B",y||v.key!==d.C0.ESC+"[1;3B"||(v.key=d.C0.ESC+"[1;5B")):v.key=g?d.C0.ESC+"OB":d.C0.ESC+"[B";break;case 45:h.shiftKey||h.ctrlKey||(v.key=d.C0.ESC+"[2~");break;case 46:v.key=o?d.C0.ESC+"[3;"+(o+1)+"~":d.C0.ESC+"[3~";break;case 36:v.key=o?d.C0.ESC+"[1;"+(o+1)+"H":g?d.C0.ESC+"OH":d.C0.ESC+"[H";break;case 35:v.key=o?d.C0.ESC+"[1;"+(o+1)+"F":g?d.C0.ESC+"OF":d.C0.ESC+"[F";break;case 33:h.shiftKey?v.type=2:h.ctrlKey?v.key=d.C0.ESC+"[5;"+(o+1)+"~":v.key=d.C0.ESC+"[5~";break;case 34:h.shiftKey?v.type=3:h.ctrlKey?v.key=d.C0.ESC+"[6;"+(o+1)+"~":v.key=d.C0.ESC+"[6~";break;case 112:v.key=o?d.C0.ESC+"[1;"+(o+1)+"P":d.C0.ESC+"OP";break;case 113:v.key=o?d.C0.ESC+"[1;"+(o+1)+"Q":d.C0.ESC+"OQ";break;case 114:v.key=o?d.C0.ESC+"[1;"+(o+1)+"R":d.C0.ESC+"OR";break;case 115:v.key=o?d.C0.ESC+"[1;"+(o+1)+"S":d.C0.ESC+"OS";break;case 116:v.key=o?d.C0.ESC+"[15;"+(o+1)+"~":d.C0.ESC+"[15~";break;case 117:v.key=o?d.C0.ESC+"[17;"+(o+1)+"~":d.C0.ESC+"[17~";break;case 118:v.key=o?d.C0.ESC+"[18;"+(o+1)+"~":d.C0.ESC+"[18~";break;case 119:v.key=o?d.C0.ESC+"[19;"+(o+1)+"~":d.C0.ESC+"[19~";break;case 120:v.key=o?d.C0.ESC+"[20;"+(o+1)+"~":d.C0.ESC+"[20~";break;case 121:v.key=o?d.C0.ESC+"[21;"+(o+1)+"~":d.C0.ESC+"[21~";break;case 122:v.key=o?d.C0.ESC+"[23;"+(o+1)+"~":d.C0.ESC+"[23~";break;case 123:v.key=o?d.C0.ESC+"[24;"+(o+1)+"~":d.C0.ESC+"[24~";break;default:if(!h.ctrlKey||h.shiftKey||h.altKey||h.metaKey)if(y&&!E||!h.altKey||h.metaKey)!y||h.altKey||h.ctrlKey||h.shiftKey||!h.metaKey?h.key&&!h.ctrlKey&&!h.altKey&&!h.metaKey&&h.keyCode>=48&&h.key.length===1?v.key=h.key:h.key&&h.ctrlKey&&(h.key==="_"&&(v.key=d.C0.US),h.key==="@"&&(v.key=d.C0.NUL)):h.keyCode===65&&(v.type=1);else{const c=p[h.keyCode],n=c==null?void 0:c[h.shiftKey?1:0];if(n)v.key=d.C0.ESC+n;else if(h.keyCode>=65&&h.keyCode<=90){const l=h.ctrlKey?h.keyCode-64:h.keyCode+32;let _=String.fromCharCode(l);h.shiftKey&&(_=_.toUpperCase()),v.key=d.C0.ESC+_}else if(h.keyCode===32)v.key=d.C0.ESC+(h.ctrlKey?d.C0.NUL:" ");else if(h.key==="Dead"&&h.code.startsWith("Key")){let l=h.code.slice(3,4);h.shiftKey||(l=l.toLowerCase()),v.key=d.C0.ESC+l,v.cancel=!0}}else h.keyCode>=65&&h.keyCode<=90?v.key=String.fromCharCode(h.keyCode-64):h.keyCode===32?v.key=d.C0.NUL:h.keyCode>=51&&h.keyCode<=55?v.key=String.fromCharCode(h.keyCode-51+27):h.keyCode===56?v.key=d.C0.DEL:h.keyCode===219?v.key=d.C0.ESC:h.keyCode===220?v.key=d.C0.FS:h.keyCode===221&&(v.key=d.C0.GS)}return v}},482:(Y,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Utf8ToUtf32=u.StringToUtf32=u.utf32ToString=u.stringFromCodePoint=void 0,u.stringFromCodePoint=function(f){return f>65535?(f-=65536,String.fromCharCode(55296+(f>>10))+String.fromCharCode(f%1024+56320)):String.fromCharCode(f)},u.utf32ToString=function(f,d=0,p=f.length){let h="";for(let g=d;g<p;++g){let y=f[g];y>65535?(y-=65536,h+=String.fromCharCode(55296+(y>>10))+String.fromCharCode(y%1024+56320)):h+=String.fromCharCode(y)}return h},u.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(f,d){const p=f.length;if(!p)return 0;let h=0,g=0;if(this._interim){const y=f.charCodeAt(g++);56320<=y&&y<=57343?d[h++]=1024*(this._interim-55296)+y-56320+65536:(d[h++]=this._interim,d[h++]=y),this._interim=0}for(let y=g;y<p;++y){const E=f.charCodeAt(y);if(55296<=E&&E<=56319){if(++y>=p)return this._interim=E,h;const v=f.charCodeAt(y);56320<=v&&v<=57343?d[h++]=1024*(E-55296)+v-56320+65536:(d[h++]=E,d[h++]=v)}else E!==65279&&(d[h++]=E)}return h}},u.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(f,d){const p=f.length;if(!p)return 0;let h,g,y,E,v=0,o=0,c=0;if(this.interim[0]){let _=!1,b=this.interim[0];b&=(224&b)==192?31:(240&b)==224?15:7;let C,w=0;for(;(C=63&this.interim[++w])&&w<4;)b<<=6,b|=C;const m=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,A=m-w;for(;c<A;){if(c>=p)return 0;if(C=f[c++],(192&C)!=128){c--,_=!0;break}this.interim[w++]=C,b<<=6,b|=63&C}_||(m===2?b<128?c--:d[v++]=b:m===3?b<2048||b>=55296&&b<=57343||b===65279||(d[v++]=b):b<65536||b>1114111||(d[v++]=b)),this.interim.fill(0)}const n=p-4;let l=c;for(;l<p;){for(;!(!(l<n)||128&(h=f[l])||128&(g=f[l+1])||128&(y=f[l+2])||128&(E=f[l+3]));)d[v++]=h,d[v++]=g,d[v++]=y,d[v++]=E,l+=4;if(h=f[l++],h<128)d[v++]=h;else if((224&h)==192){if(l>=p)return this.interim[0]=h,v;if(g=f[l++],(192&g)!=128){l--;continue}if(o=(31&h)<<6|63&g,o<128){l--;continue}d[v++]=o}else if((240&h)==224){if(l>=p)return this.interim[0]=h,v;if(g=f[l++],(192&g)!=128){l--;continue}if(l>=p)return this.interim[0]=h,this.interim[1]=g,v;if(y=f[l++],(192&y)!=128){l--;continue}if(o=(15&h)<<12|(63&g)<<6|63&y,o<2048||o>=55296&&o<=57343||o===65279)continue;d[v++]=o}else if((248&h)==240){if(l>=p)return this.interim[0]=h,v;if(g=f[l++],(192&g)!=128){l--;continue}if(l>=p)return this.interim[0]=h,this.interim[1]=g,v;if(y=f[l++],(192&y)!=128){l--;continue}if(l>=p)return this.interim[0]=h,this.interim[1]=g,this.interim[2]=y,v;if(E=f[l++],(192&E)!=128){l--;continue}if(o=(7&h)<<18|(63&g)<<12|(63&y)<<6|63&E,o<65536||o>1114111)continue;d[v++]=o}}return v}}},225:(Y,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.UnicodeV6=void 0;const d=f(1480),p=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],h=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let g;u.UnicodeV6=class{constructor(){if(this.version="6",!g){g=new Uint8Array(65536),g.fill(1),g[0]=0,g.fill(0,1,32),g.fill(0,127,160),g.fill(2,4352,4448),g[9001]=2,g[9002]=2,g.fill(2,11904,42192),g[12351]=1,g.fill(2,44032,55204),g.fill(2,63744,64256),g.fill(2,65040,65050),g.fill(2,65072,65136),g.fill(2,65280,65377),g.fill(2,65504,65511);for(let y=0;y<p.length;++y)g.fill(0,p[y][0],p[y][1]+1)}}wcwidth(y){return y<32?0:y<127?1:y<65536?g[y]:(function(E,v){let o,c=0,n=v.length-1;if(E<v[0][0]||E>v[n][1])return!1;for(;n>=c;)if(o=c+n>>1,E>v[o][1])c=o+1;else{if(!(E<v[o][0]))return!0;n=o-1}return!1})(y,h)?0:y>=131072&&y<=196605||y>=196608&&y<=262141?2:1}charProperties(y,E){let v=this.wcwidth(y),o=v===0&&E!==0;if(o){const c=d.UnicodeService.extractWidth(E);c===0?o=!1:c>v&&(v=c)}return d.UnicodeService.createPropertyValue(0,v,o)}}},5981:(Y,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.WriteBuffer=void 0;const d=f(8460),p=f(844);class h extends p.Disposable{constructor(y){super(),this._action=y,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new d.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(y,E){if(E!==void 0&&this._syncCalls>E)return void(this._syncCalls=0);if(this._pendingData+=y.length,this._writeBuffer.push(y),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let v;for(this._isSyncWriting=!0;v=this._writeBuffer.shift();){this._action(v);const o=this._callbacks.shift();o&&o()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(y,E){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=y.length,this._writeBuffer.push(y),this._callbacks.push(E),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=y.length,this._writeBuffer.push(y),this._callbacks.push(E)}_innerWrite(y=0,E=!0){const v=y||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const o=this._writeBuffer[this._bufferOffset],c=this._action(o,E);if(c){const l=_=>Date.now()-v>=12?setTimeout((()=>this._innerWrite(0,_))):this._innerWrite(v,_);return void c.catch((_=>(queueMicrotask((()=>{throw _})),Promise.resolve(!1)))).then(l)}const n=this._callbacks[this._bufferOffset];if(n&&n(),this._bufferOffset++,this._pendingData-=o.length,Date.now()-v>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout((()=>this._innerWrite()))):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}u.WriteBuffer=h},5941:(Y,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.toRgbString=u.parseColor=void 0;const f=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,d=/^[\da-f]+$/;function p(h,g){const y=h.toString(16),E=y.length<2?"0"+y:y;switch(g){case 4:return y[0];case 8:return E;case 12:return(E+E).slice(0,3);default:return E+E}}u.parseColor=function(h){if(!h)return;let g=h.toLowerCase();if(g.indexOf("rgb:")===0){g=g.slice(4);const y=f.exec(g);if(y){const E=y[1]?15:y[4]?255:y[7]?4095:65535;return[Math.round(parseInt(y[1]||y[4]||y[7]||y[10],16)/E*255),Math.round(parseInt(y[2]||y[5]||y[8]||y[11],16)/E*255),Math.round(parseInt(y[3]||y[6]||y[9]||y[12],16)/E*255)]}}else if(g.indexOf("#")===0&&(g=g.slice(1),d.exec(g)&&[3,6,9,12].includes(g.length))){const y=g.length/3,E=[0,0,0];for(let v=0;v<3;++v){const o=parseInt(g.slice(y*v,y*v+y),16);E[v]=y===1?o<<4:y===2?o:y===3?o>>4:o>>8}return E}},u.toRgbString=function(h,g=16){const[y,E,v]=h;return`rgb:${p(y,g)}/${p(E,g)}/${p(v,g)}`}},5770:(Y,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.PAYLOAD_LIMIT=void 0,u.PAYLOAD_LIMIT=1e7},6351:(Y,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.DcsHandler=u.DcsParser=void 0;const d=f(482),p=f(8742),h=f(5770),g=[];u.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=g,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=g}registerHandler(E,v){this._handlers[E]===void 0&&(this._handlers[E]=[]);const o=this._handlers[E];return o.push(v),{dispose:()=>{const c=o.indexOf(v);c!==-1&&o.splice(c,1)}}}clearHandler(E){this._handlers[E]&&delete this._handlers[E]}setHandlerFallback(E){this._handlerFb=E}reset(){if(this._active.length)for(let E=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;E>=0;--E)this._active[E].unhook(!1);this._stack.paused=!1,this._active=g,this._ident=0}hook(E,v){if(this.reset(),this._ident=E,this._active=this._handlers[E]||g,this._active.length)for(let o=this._active.length-1;o>=0;o--)this._active[o].hook(v);else this._handlerFb(this._ident,"HOOK",v)}put(E,v,o){if(this._active.length)for(let c=this._active.length-1;c>=0;c--)this._active[c].put(E,v,o);else this._handlerFb(this._ident,"PUT",(0,d.utf32ToString)(E,v,o))}unhook(E,v=!0){if(this._active.length){let o=!1,c=this._active.length-1,n=!1;if(this._stack.paused&&(c=this._stack.loopPosition-1,o=v,n=this._stack.fallThrough,this._stack.paused=!1),!n&&o===!1){for(;c>=0&&(o=this._active[c].unhook(E),o!==!0);c--)if(o instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=c,this._stack.fallThrough=!1,o;c--}for(;c>=0;c--)if(o=this._active[c].unhook(!1),o instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=c,this._stack.fallThrough=!0,o}else this._handlerFb(this._ident,"UNHOOK",E);this._active=g,this._ident=0}};const y=new p.Params;y.addParam(0),u.DcsHandler=class{constructor(E){this._handler=E,this._data="",this._params=y,this._hitLimit=!1}hook(E){this._params=E.length>1||E.params[0]?E.clone():y,this._data="",this._hitLimit=!1}put(E,v,o){this._hitLimit||(this._data+=(0,d.utf32ToString)(E,v,o),this._data.length>h.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(E){let v=!1;if(this._hitLimit)v=!1;else if(E&&(v=this._handler(this._data,this._params),v instanceof Promise))return v.then((o=>(this._params=y,this._data="",this._hitLimit=!1,o)));return this._params=y,this._data="",this._hitLimit=!1,v}}},2015:(Y,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.EscapeSequenceParser=u.VT500_TRANSITION_TABLE=u.TransitionTable=void 0;const d=f(844),p=f(8742),h=f(6242),g=f(6351);class y{constructor(c){this.table=new Uint8Array(c)}setDefault(c,n){this.table.fill(c<<4|n)}add(c,n,l,_){this.table[n<<8|c]=l<<4|_}addMany(c,n,l,_){for(let b=0;b<c.length;b++)this.table[n<<8|c[b]]=l<<4|_}}u.TransitionTable=y;const E=160;u.VT500_TRANSITION_TABLE=(function(){const o=new y(4095),c=Array.apply(null,Array(256)).map(((w,m)=>m)),n=(w,m)=>c.slice(w,m),l=n(32,127),_=n(0,24);_.push(25),_.push.apply(_,n(28,32));const b=n(0,14);let C;for(C in o.setDefault(1,0),o.addMany(l,0,2,0),b)o.addMany([24,26,153,154],C,3,0),o.addMany(n(128,144),C,3,0),o.addMany(n(144,152),C,3,0),o.add(156,C,0,0),o.add(27,C,11,1),o.add(157,C,4,8),o.addMany([152,158,159],C,0,7),o.add(155,C,11,3),o.add(144,C,11,9);return o.addMany(_,0,3,0),o.addMany(_,1,3,1),o.add(127,1,0,1),o.addMany(_,8,0,8),o.addMany(_,3,3,3),o.add(127,3,0,3),o.addMany(_,4,3,4),o.add(127,4,0,4),o.addMany(_,6,3,6),o.addMany(_,5,3,5),o.add(127,5,0,5),o.addMany(_,2,3,2),o.add(127,2,0,2),o.add(93,1,4,8),o.addMany(l,8,5,8),o.add(127,8,5,8),o.addMany([156,27,24,26,7],8,6,0),o.addMany(n(28,32),8,0,8),o.addMany([88,94,95],1,0,7),o.addMany(l,7,0,7),o.addMany(_,7,0,7),o.add(156,7,0,0),o.add(127,7,0,7),o.add(91,1,11,3),o.addMany(n(64,127),3,7,0),o.addMany(n(48,60),3,8,4),o.addMany([60,61,62,63],3,9,4),o.addMany(n(48,60),4,8,4),o.addMany(n(64,127),4,7,0),o.addMany([60,61,62,63],4,0,6),o.addMany(n(32,64),6,0,6),o.add(127,6,0,6),o.addMany(n(64,127),6,0,0),o.addMany(n(32,48),3,9,5),o.addMany(n(32,48),5,9,5),o.addMany(n(48,64),5,0,6),o.addMany(n(64,127),5,7,0),o.addMany(n(32,48),4,9,5),o.addMany(n(32,48),1,9,2),o.addMany(n(32,48),2,9,2),o.addMany(n(48,127),2,10,0),o.addMany(n(48,80),1,10,0),o.addMany(n(81,88),1,10,0),o.addMany([89,90,92],1,10,0),o.addMany(n(96,127),1,10,0),o.add(80,1,11,9),o.addMany(_,9,0,9),o.add(127,9,0,9),o.addMany(n(28,32),9,0,9),o.addMany(n(32,48),9,9,12),o.addMany(n(48,60),9,8,10),o.addMany([60,61,62,63],9,9,10),o.addMany(_,11,0,11),o.addMany(n(32,128),11,0,11),o.addMany(n(28,32),11,0,11),o.addMany(_,10,0,10),o.add(127,10,0,10),o.addMany(n(28,32),10,0,10),o.addMany(n(48,60),10,8,10),o.addMany([60,61,62,63],10,0,11),o.addMany(n(32,48),10,9,12),o.addMany(_,12,0,12),o.add(127,12,0,12),o.addMany(n(28,32),12,0,12),o.addMany(n(32,48),12,9,12),o.addMany(n(48,64),12,0,11),o.addMany(n(64,127),12,12,13),o.addMany(n(64,127),10,12,13),o.addMany(n(64,127),9,12,13),o.addMany(_,13,13,13),o.addMany(l,13,13,13),o.add(127,13,0,13),o.addMany([27,156,24,26],13,14,0),o.add(E,0,2,0),o.add(E,8,5,8),o.add(E,6,0,6),o.add(E,11,0,11),o.add(E,13,13,13),o})();class v extends d.Disposable{constructor(c=u.VT500_TRANSITION_TABLE){super(),this._transitions=c,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new p.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(n,l,_)=>{},this._executeHandlerFb=n=>{},this._csiHandlerFb=(n,l)=>{},this._escHandlerFb=n=>{},this._errorHandlerFb=n=>n,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,d.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new h.OscParser),this._dcsParser=this.register(new g.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(c,n=[64,126]){let l=0;if(c.prefix){if(c.prefix.length>1)throw new Error("only one byte as prefix supported");if(l=c.prefix.charCodeAt(0),l&&60>l||l>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(c.intermediates){if(c.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let b=0;b<c.intermediates.length;++b){const C=c.intermediates.charCodeAt(b);if(32>C||C>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");l<<=8,l|=C}}if(c.final.length!==1)throw new Error("final must be a single byte");const _=c.final.charCodeAt(0);if(n[0]>_||_>n[1])throw new Error(`final must be in range ${n[0]} .. ${n[1]}`);return l<<=8,l|=_,l}identToString(c){const n=[];for(;c;)n.push(String.fromCharCode(255&c)),c>>=8;return n.reverse().join("")}setPrintHandler(c){this._printHandler=c}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(c,n){const l=this._identifier(c,[48,126]);this._escHandlers[l]===void 0&&(this._escHandlers[l]=[]);const _=this._escHandlers[l];return _.push(n),{dispose:()=>{const b=_.indexOf(n);b!==-1&&_.splice(b,1)}}}clearEscHandler(c){this._escHandlers[this._identifier(c,[48,126])]&&delete this._escHandlers[this._identifier(c,[48,126])]}setEscHandlerFallback(c){this._escHandlerFb=c}setExecuteHandler(c,n){this._executeHandlers[c.charCodeAt(0)]=n}clearExecuteHandler(c){this._executeHandlers[c.charCodeAt(0)]&&delete this._executeHandlers[c.charCodeAt(0)]}setExecuteHandlerFallback(c){this._executeHandlerFb=c}registerCsiHandler(c,n){const l=this._identifier(c);this._csiHandlers[l]===void 0&&(this._csiHandlers[l]=[]);const _=this._csiHandlers[l];return _.push(n),{dispose:()=>{const b=_.indexOf(n);b!==-1&&_.splice(b,1)}}}clearCsiHandler(c){this._csiHandlers[this._identifier(c)]&&delete this._csiHandlers[this._identifier(c)]}setCsiHandlerFallback(c){this._csiHandlerFb=c}registerDcsHandler(c,n){return this._dcsParser.registerHandler(this._identifier(c),n)}clearDcsHandler(c){this._dcsParser.clearHandler(this._identifier(c))}setDcsHandlerFallback(c){this._dcsParser.setHandlerFallback(c)}registerOscHandler(c,n){return this._oscParser.registerHandler(c,n)}clearOscHandler(c){this._oscParser.clearHandler(c)}setOscHandlerFallback(c){this._oscParser.setHandlerFallback(c)}setErrorHandler(c){this._errorHandler=c}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(c,n,l,_,b){this._parseStack.state=c,this._parseStack.handlers=n,this._parseStack.handlerPos=l,this._parseStack.transition=_,this._parseStack.chunkPos=b}parse(c,n,l){let _,b=0,C=0,w=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,w=this._parseStack.chunkPos+1;else{if(l===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const m=this._parseStack.handlers;let A=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(l===!1&&A>-1){for(;A>=0&&(_=m[A](this._params),_!==!0);A--)if(_ instanceof Promise)return this._parseStack.handlerPos=A,_}this._parseStack.handlers=[];break;case 4:if(l===!1&&A>-1){for(;A>=0&&(_=m[A](),_!==!0);A--)if(_ instanceof Promise)return this._parseStack.handlerPos=A,_}this._parseStack.handlers=[];break;case 6:if(b=c[this._parseStack.chunkPos],_=this._dcsParser.unhook(b!==24&&b!==26,l),_)return _;b===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(b=c[this._parseStack.chunkPos],_=this._oscParser.end(b!==24&&b!==26,l),_)return _;b===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,w=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let m=w;m<n;++m){switch(b=c[m],C=this._transitions.table[this.currentState<<8|(b<160?b:E)],C>>4){case 2:for(let O=m+1;;++O){if(O>=n||(b=c[O])<32||b>126&&b<E){this._printHandler(c,m,O),m=O-1;break}if(++O>=n||(b=c[O])<32||b>126&&b<E){this._printHandler(c,m,O),m=O-1;break}if(++O>=n||(b=c[O])<32||b>126&&b<E){this._printHandler(c,m,O),m=O-1;break}if(++O>=n||(b=c[O])<32||b>126&&b<E){this._printHandler(c,m,O),m=O-1;break}}break;case 3:this._executeHandlers[b]?this._executeHandlers[b]():this._executeHandlerFb(b),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:m,code:b,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const A=this._csiHandlers[this._collect<<8|b];let B=A?A.length-1:-1;for(;B>=0&&(_=A[B](this._params),_!==!0);B--)if(_ instanceof Promise)return this._preserveStack(3,A,B,C,m),_;B<0&&this._csiHandlerFb(this._collect<<8|b,this._params),this.precedingJoinState=0;break;case 8:do switch(b){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(b-48)}while(++m<n&&(b=c[m])>47&&b<60);m--;break;case 9:this._collect<<=8,this._collect|=b;break;case 10:const U=this._escHandlers[this._collect<<8|b];let z=U?U.length-1:-1;for(;z>=0&&(_=U[z](),_!==!0);z--)if(_ instanceof Promise)return this._preserveStack(4,U,z,C,m),_;z<0&&this._escHandlerFb(this._collect<<8|b),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|b,this._params);break;case 13:for(let O=m+1;;++O)if(O>=n||(b=c[O])===24||b===26||b===27||b>127&&b<E){this._dcsParser.put(c,m,O),m=O-1;break}break;case 14:if(_=this._dcsParser.unhook(b!==24&&b!==26),_)return this._preserveStack(6,[],0,C,m),_;b===27&&(C|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let O=m+1;;O++)if(O>=n||(b=c[O])<32||b>127&&b<E){this._oscParser.put(c,m,O),m=O-1;break}break;case 6:if(_=this._oscParser.end(b!==24&&b!==26),_)return this._preserveStack(5,[],0,C,m),_;b===27&&(C|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&C}}}u.EscapeSequenceParser=v},6242:(Y,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.OscHandler=u.OscParser=void 0;const d=f(5770),p=f(482),h=[];u.OscParser=class{constructor(){this._state=0,this._active=h,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(g,y){this._handlers[g]===void 0&&(this._handlers[g]=[]);const E=this._handlers[g];return E.push(y),{dispose:()=>{const v=E.indexOf(y);v!==-1&&E.splice(v,1)}}}clearHandler(g){this._handlers[g]&&delete this._handlers[g]}setHandlerFallback(g){this._handlerFb=g}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=h}reset(){if(this._state===2)for(let g=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;g>=0;--g)this._active[g].end(!1);this._stack.paused=!1,this._active=h,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||h,this._active.length)for(let g=this._active.length-1;g>=0;g--)this._active[g].start();else this._handlerFb(this._id,"START")}_put(g,y,E){if(this._active.length)for(let v=this._active.length-1;v>=0;v--)this._active[v].put(g,y,E);else this._handlerFb(this._id,"PUT",(0,p.utf32ToString)(g,y,E))}start(){this.reset(),this._state=1}put(g,y,E){if(this._state!==3){if(this._state===1)for(;y<E;){const v=g[y++];if(v===59){this._state=2,this._start();break}if(v<48||57<v)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+v-48}this._state===2&&E-y>0&&this._put(g,y,E)}}end(g,y=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let E=!1,v=this._active.length-1,o=!1;if(this._stack.paused&&(v=this._stack.loopPosition-1,E=y,o=this._stack.fallThrough,this._stack.paused=!1),!o&&E===!1){for(;v>=0&&(E=this._active[v].end(g),E!==!0);v--)if(E instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=v,this._stack.fallThrough=!1,E;v--}for(;v>=0;v--)if(E=this._active[v].end(!1),E instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=v,this._stack.fallThrough=!0,E}else this._handlerFb(this._id,"END",g);this._active=h,this._id=-1,this._state=0}}},u.OscHandler=class{constructor(g){this._handler=g,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(g,y,E){this._hitLimit||(this._data+=(0,p.utf32ToString)(g,y,E),this._data.length>d.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(g){let y=!1;if(this._hitLimit)y=!1;else if(g&&(y=this._handler(this._data),y instanceof Promise))return y.then((E=>(this._data="",this._hitLimit=!1,E)));return this._data="",this._hitLimit=!1,y}}},8742:(Y,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Params=void 0;const f=2147483647;class d{static fromArray(h){const g=new d;if(!h.length)return g;for(let y=Array.isArray(h[0])?1:0;y<h.length;++y){const E=h[y];if(Array.isArray(E))for(let v=0;v<E.length;++v)g.addSubParam(E[v]);else g.addParam(E)}return g}constructor(h=32,g=32){if(this.maxLength=h,this.maxSubParamsLength=g,g>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(h),this.length=0,this._subParams=new Int32Array(g),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(h),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const h=new d(this.maxLength,this.maxSubParamsLength);return h.params.set(this.params),h.length=this.length,h._subParams.set(this._subParams),h._subParamsLength=this._subParamsLength,h._subParamsIdx.set(this._subParamsIdx),h._rejectDigits=this._rejectDigits,h._rejectSubDigits=this._rejectSubDigits,h._digitIsSub=this._digitIsSub,h}toArray(){const h=[];for(let g=0;g<this.length;++g){h.push(this.params[g]);const y=this._subParamsIdx[g]>>8,E=255&this._subParamsIdx[g];E-y>0&&h.push(Array.prototype.slice.call(this._subParams,y,E))}return h}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(h){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=h>f?f:h}}addSubParam(h){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=h>f?f:h,this._subParamsIdx[this.length-1]++}}hasSubParams(h){return(255&this._subParamsIdx[h])-(this._subParamsIdx[h]>>8)>0}getSubParams(h){const g=this._subParamsIdx[h]>>8,y=255&this._subParamsIdx[h];return y-g>0?this._subParams.subarray(g,y):null}getSubParamsAll(){const h={};for(let g=0;g<this.length;++g){const y=this._subParamsIdx[g]>>8,E=255&this._subParamsIdx[g];E-y>0&&(h[g]=this._subParams.slice(y,E))}return h}addDigit(h){let g;if(this._rejectDigits||!(g=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const y=this._digitIsSub?this._subParams:this.params,E=y[g-1];y[g-1]=~E?Math.min(10*E+h,f):h}}u.Params=d},5741:(Y,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.AddonManager=void 0,u.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let f=this._addons.length-1;f>=0;f--)this._addons[f].instance.dispose()}loadAddon(f,d){const p={instance:d,dispose:d.dispose,isDisposed:!1};this._addons.push(p),d.dispose=()=>this._wrappedAddonDispose(p),d.activate(f)}_wrappedAddonDispose(f){if(f.isDisposed)return;let d=-1;for(let p=0;p<this._addons.length;p++)if(this._addons[p]===f){d=p;break}if(d===-1)throw new Error("Could not dispose an addon that has not been loaded");f.isDisposed=!0,f.dispose.apply(f.instance),this._addons.splice(d,1)}}},8771:(Y,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferApiView=void 0;const d=f(3785),p=f(511);u.BufferApiView=class{constructor(h,g){this._buffer=h,this.type=g}init(h){return this._buffer=h,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(h){const g=this._buffer.lines.get(h);if(g)return new d.BufferLineApiView(g)}getNullCell(){return new p.CellData}}},3785:(Y,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferLineApiView=void 0;const d=f(511);u.BufferLineApiView=class{constructor(p){this._line=p}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(p,h){if(!(p<0||p>=this._line.length))return h?(this._line.loadCell(p,h),h):this._line.loadCell(p,new d.CellData)}translateToString(p,h,g){return this._line.translateToString(p,h,g)}}},8285:(Y,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferNamespaceApi=void 0;const d=f(8771),p=f(8460),h=f(844);class g extends h.Disposable{constructor(E){super(),this._core=E,this._onBufferChange=this.register(new p.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new d.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new d.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((()=>this._onBufferChange.fire(this.active)))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}u.BufferNamespaceApi=g},7975:(Y,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ParserApi=void 0,u.ParserApi=class{constructor(f){this._core=f}registerCsiHandler(f,d){return this._core.registerCsiHandler(f,(p=>d(p.toArray())))}addCsiHandler(f,d){return this.registerCsiHandler(f,d)}registerDcsHandler(f,d){return this._core.registerDcsHandler(f,((p,h)=>d(p,h.toArray())))}addDcsHandler(f,d){return this.registerDcsHandler(f,d)}registerEscHandler(f,d){return this._core.registerEscHandler(f,d)}addEscHandler(f,d){return this.registerEscHandler(f,d)}registerOscHandler(f,d){return this._core.registerOscHandler(f,d)}addOscHandler(f,d){return this.registerOscHandler(f,d)}}},7090:(Y,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.UnicodeApi=void 0,u.UnicodeApi=class{constructor(f){this._core=f}register(f){this._core.unicodeService.register(f)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(f){this._core.unicodeService.activeVersion=f}}},744:function(Y,u,f){var d=this&&this.__decorate||function(o,c,n,l){var _,b=arguments.length,C=b<3?c:l===null?l=Object.getOwnPropertyDescriptor(c,n):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(o,c,n,l);else for(var w=o.length-1;w>=0;w--)(_=o[w])&&(C=(b<3?_(C):b>3?_(c,n,C):_(c,n))||C);return b>3&&C&&Object.defineProperty(c,n,C),C},p=this&&this.__param||function(o,c){return function(n,l){c(n,l,o)}};Object.defineProperty(u,"__esModule",{value:!0}),u.BufferService=u.MINIMUM_ROWS=u.MINIMUM_COLS=void 0;const h=f(8460),g=f(844),y=f(5295),E=f(2585);u.MINIMUM_COLS=2,u.MINIMUM_ROWS=1;let v=u.BufferService=class extends g.Disposable{get buffer(){return this.buffers.active}constructor(o){super(),this.isUserScrolling=!1,this._onResize=this.register(new h.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new h.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(o.rawOptions.cols||0,u.MINIMUM_COLS),this.rows=Math.max(o.rawOptions.rows||0,u.MINIMUM_ROWS),this.buffers=this.register(new y.BufferSet(o,this))}resize(o,c){this.cols=o,this.rows=c,this.buffers.resize(o,c),this._onResize.fire({cols:o,rows:c})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(o,c=!1){const n=this.buffer;let l;l=this._cachedBlankLine,l&&l.length===this.cols&&l.getFg(0)===o.fg&&l.getBg(0)===o.bg||(l=n.getBlankLine(o,c),this._cachedBlankLine=l),l.isWrapped=c;const _=n.ybase+n.scrollTop,b=n.ybase+n.scrollBottom;if(n.scrollTop===0){const C=n.lines.isFull;b===n.lines.length-1?C?n.lines.recycle().copyFrom(l):n.lines.push(l.clone()):n.lines.splice(b+1,0,l.clone()),C?this.isUserScrolling&&(n.ydisp=Math.max(n.ydisp-1,0)):(n.ybase++,this.isUserScrolling||n.ydisp++)}else{const C=b-_+1;n.lines.shiftElements(_+1,C-1,-1),n.lines.set(b,l.clone())}this.isUserScrolling||(n.ydisp=n.ybase),this._onScroll.fire(n.ydisp)}scrollLines(o,c,n){const l=this.buffer;if(o<0){if(l.ydisp===0)return;this.isUserScrolling=!0}else o+l.ydisp>=l.ybase&&(this.isUserScrolling=!1);const _=l.ydisp;l.ydisp=Math.max(Math.min(l.ydisp+o,l.ybase),0),_!==l.ydisp&&(c||this._onScroll.fire(l.ydisp))}};u.BufferService=v=d([p(0,E.IOptionsService)],v)},7994:(Y,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CharsetService=void 0,u.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(f){this.glevel=f,this.charset=this._charsets[f]}setgCharset(f,d){this._charsets[f]=d,this.glevel===f&&(this.charset=d)}}},1753:function(Y,u,f){var d=this&&this.__decorate||function(l,_,b,C){var w,m=arguments.length,A=m<3?_:C===null?C=Object.getOwnPropertyDescriptor(_,b):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(l,_,b,C);else for(var B=l.length-1;B>=0;B--)(w=l[B])&&(A=(m<3?w(A):m>3?w(_,b,A):w(_,b))||A);return m>3&&A&&Object.defineProperty(_,b,A),A},p=this&&this.__param||function(l,_){return function(b,C){_(b,C,l)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CoreMouseService=void 0;const h=f(2585),g=f(8460),y=f(844),E={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:l=>l.button!==4&&l.action===1&&(l.ctrl=!1,l.alt=!1,l.shift=!1,!0)},VT200:{events:19,restrict:l=>l.action!==32},DRAG:{events:23,restrict:l=>l.action!==32||l.button!==3},ANY:{events:31,restrict:l=>!0}};function v(l,_){let b=(l.ctrl?16:0)|(l.shift?4:0)|(l.alt?8:0);return l.button===4?(b|=64,b|=l.action):(b|=3&l.button,4&l.button&&(b|=64),8&l.button&&(b|=128),l.action===32?b|=32:l.action!==0||_||(b|=3)),b}const o=String.fromCharCode,c={DEFAULT:l=>{const _=[v(l,!1)+32,l.col+32,l.row+32];return _[0]>255||_[1]>255||_[2]>255?"":`\x1B[M${o(_[0])}${o(_[1])}${o(_[2])}`},SGR:l=>{const _=l.action===0&&l.button!==4?"m":"M";return`\x1B[<${v(l,!0)};${l.col};${l.row}${_}`},SGR_PIXELS:l=>{const _=l.action===0&&l.button!==4?"m":"M";return`\x1B[<${v(l,!0)};${l.x};${l.y}${_}`}};let n=u.CoreMouseService=class extends y.Disposable{constructor(l,_){super(),this._bufferService=l,this._coreService=_,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new g.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const b of Object.keys(E))this.addProtocol(b,E[b]);for(const b of Object.keys(c))this.addEncoding(b,c[b]);this.reset()}addProtocol(l,_){this._protocols[l]=_}addEncoding(l,_){this._encodings[l]=_}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(l){if(!this._protocols[l])throw new Error(`unknown protocol "${l}"`);this._activeProtocol=l,this._onProtocolChange.fire(this._protocols[l].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(l){if(!this._encodings[l])throw new Error(`unknown encoding "${l}"`);this._activeEncoding=l}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(l){if(l.col<0||l.col>=this._bufferService.cols||l.row<0||l.row>=this._bufferService.rows||l.button===4&&l.action===32||l.button===3&&l.action!==32||l.button!==4&&(l.action===2||l.action===3)||(l.col++,l.row++,l.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,l,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(l))return!1;const _=this._encodings[this._activeEncoding](l);return _&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(_):this._coreService.triggerDataEvent(_,!0)),this._lastEvent=l,!0}explainEvents(l){return{down:!!(1&l),up:!!(2&l),drag:!!(4&l),move:!!(8&l),wheel:!!(16&l)}}_equalEvents(l,_,b){if(b){if(l.x!==_.x||l.y!==_.y)return!1}else if(l.col!==_.col||l.row!==_.row)return!1;return l.button===_.button&&l.action===_.action&&l.ctrl===_.ctrl&&l.alt===_.alt&&l.shift===_.shift}};u.CoreMouseService=n=d([p(0,h.IBufferService),p(1,h.ICoreService)],n)},6975:function(Y,u,f){var d=this&&this.__decorate||function(n,l,_,b){var C,w=arguments.length,m=w<3?l:b===null?b=Object.getOwnPropertyDescriptor(l,_):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(n,l,_,b);else for(var A=n.length-1;A>=0;A--)(C=n[A])&&(m=(w<3?C(m):w>3?C(l,_,m):C(l,_))||m);return w>3&&m&&Object.defineProperty(l,_,m),m},p=this&&this.__param||function(n,l){return function(_,b){l(_,b,n)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CoreService=void 0;const h=f(1439),g=f(8460),y=f(844),E=f(2585),v=Object.freeze({insertMode:!1}),o=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let c=u.CoreService=class extends y.Disposable{constructor(n,l,_){super(),this._bufferService=n,this._logService=l,this._optionsService=_,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new g.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new g.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new g.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new g.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,h.clone)(v),this.decPrivateModes=(0,h.clone)(o)}reset(){this.modes=(0,h.clone)(v),this.decPrivateModes=(0,h.clone)(o)}triggerDataEvent(n,l=!1){if(this._optionsService.rawOptions.disableStdin)return;const _=this._bufferService.buffer;l&&this._optionsService.rawOptions.scrollOnUserInput&&_.ybase!==_.ydisp&&this._onRequestScrollToBottom.fire(),l&&this._onUserInput.fire(),this._logService.debug(`sending data "${n}"`,(()=>n.split("").map((b=>b.charCodeAt(0))))),this._onData.fire(n)}triggerBinaryEvent(n){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${n}"`,(()=>n.split("").map((l=>l.charCodeAt(0))))),this._onBinary.fire(n))}};u.CoreService=c=d([p(0,E.IBufferService),p(1,E.ILogService),p(2,E.IOptionsService)],c)},9074:(Y,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.DecorationService=void 0;const d=f(8055),p=f(8460),h=f(844),g=f(6106);let y=0,E=0;class v extends h.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new g.SortedList((n=>n==null?void 0:n.marker.line)),this._onDecorationRegistered=this.register(new p.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new p.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,h.toDisposable)((()=>this.reset())))}registerDecoration(n){if(n.marker.isDisposed)return;const l=new o(n);if(l){const _=l.marker.onDispose((()=>l.dispose()));l.onDispose((()=>{l&&(this._decorations.delete(l)&&this._onDecorationRemoved.fire(l),_.dispose())})),this._decorations.insert(l),this._onDecorationRegistered.fire(l)}return l}reset(){for(const n of this._decorations.values())n.dispose();this._decorations.clear()}*getDecorationsAtCell(n,l,_){let b=0,C=0;for(const w of this._decorations.getKeyIterator(l))b=w.options.x??0,C=b+(w.options.width??1),n>=b&&n<C&&(!_||(w.options.layer??"bottom")===_)&&(yield w)}forEachDecorationAtCell(n,l,_,b){this._decorations.forEachByKey(l,(C=>{y=C.options.x??0,E=y+(C.options.width??1),n>=y&&n<E&&(!_||(C.options.layer??"bottom")===_)&&b(C)}))}}u.DecorationService=v;class o extends h.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=d.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=d.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(n){super(),this.options=n,this.onRenderEmitter=this.register(new p.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new p.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=n.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(Y,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.InstantiationService=u.ServiceCollection=void 0;const d=f(2585),p=f(8343);class h{constructor(...y){this._entries=new Map;for(const[E,v]of y)this.set(E,v)}set(y,E){const v=this._entries.get(y);return this._entries.set(y,E),v}forEach(y){for(const[E,v]of this._entries.entries())y(E,v)}has(y){return this._entries.has(y)}get(y){return this._entries.get(y)}}u.ServiceCollection=h,u.InstantiationService=class{constructor(){this._services=new h,this._services.set(d.IInstantiationService,this)}setService(g,y){this._services.set(g,y)}getService(g){return this._services.get(g)}createInstance(g,...y){const E=(0,p.getServiceDependencies)(g).sort(((c,n)=>c.index-n.index)),v=[];for(const c of E){const n=this._services.get(c.id);if(!n)throw new Error(`[createInstance] ${g.name} depends on UNKNOWN service ${c.id}.`);v.push(n)}const o=E.length>0?E[0].index:y.length;if(y.length!==o)throw new Error(`[createInstance] First service dependency of ${g.name} at position ${o+1} conflicts with ${y.length} static arguments`);return new g(...y,...v)}}},7866:function(Y,u,f){var d=this&&this.__decorate||function(o,c,n,l){var _,b=arguments.length,C=b<3?c:l===null?l=Object.getOwnPropertyDescriptor(c,n):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(o,c,n,l);else for(var w=o.length-1;w>=0;w--)(_=o[w])&&(C=(b<3?_(C):b>3?_(c,n,C):_(c,n))||C);return b>3&&C&&Object.defineProperty(c,n,C),C},p=this&&this.__param||function(o,c){return function(n,l){c(n,l,o)}};Object.defineProperty(u,"__esModule",{value:!0}),u.traceCall=u.setTraceLogger=u.LogService=void 0;const h=f(844),g=f(2585),y={trace:g.LogLevelEnum.TRACE,debug:g.LogLevelEnum.DEBUG,info:g.LogLevelEnum.INFO,warn:g.LogLevelEnum.WARN,error:g.LogLevelEnum.ERROR,off:g.LogLevelEnum.OFF};let E,v=u.LogService=class extends h.Disposable{get logLevel(){return this._logLevel}constructor(o){super(),this._optionsService=o,this._logLevel=g.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),E=this}_updateLogLevel(){this._logLevel=y[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(o){for(let c=0;c<o.length;c++)typeof o[c]=="function"&&(o[c]=o[c]())}_log(o,c,n){this._evalLazyOptionalParams(n),o.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+c,...n)}trace(o,...c){var n;this._logLevel<=g.LogLevelEnum.TRACE&&this._log(((n=this._optionsService.options.logger)==null?void 0:n.trace.bind(this._optionsService.options.logger))??console.log,o,c)}debug(o,...c){var n;this._logLevel<=g.LogLevelEnum.DEBUG&&this._log(((n=this._optionsService.options.logger)==null?void 0:n.debug.bind(this._optionsService.options.logger))??console.log,o,c)}info(o,...c){var n;this._logLevel<=g.LogLevelEnum.INFO&&this._log(((n=this._optionsService.options.logger)==null?void 0:n.info.bind(this._optionsService.options.logger))??console.info,o,c)}warn(o,...c){var n;this._logLevel<=g.LogLevelEnum.WARN&&this._log(((n=this._optionsService.options.logger)==null?void 0:n.warn.bind(this._optionsService.options.logger))??console.warn,o,c)}error(o,...c){var n;this._logLevel<=g.LogLevelEnum.ERROR&&this._log(((n=this._optionsService.options.logger)==null?void 0:n.error.bind(this._optionsService.options.logger))??console.error,o,c)}};u.LogService=v=d([p(0,g.IOptionsService)],v),u.setTraceLogger=function(o){E=o},u.traceCall=function(o,c,n){if(typeof n.value!="function")throw new Error("not supported");const l=n.value;n.value=function(..._){if(E.logLevel!==g.LogLevelEnum.TRACE)return l.apply(this,_);E.trace(`GlyphRenderer#${l.name}(${_.map((C=>JSON.stringify(C))).join(", ")})`);const b=l.apply(this,_);return E.trace(`GlyphRenderer#${l.name} return`,b),b}}},7302:(Y,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.OptionsService=u.DEFAULT_OPTIONS=void 0;const d=f(8460),p=f(844),h=f(6114);u.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:h.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const g=["normal","bold","100","200","300","400","500","600","700","800","900"];class y extends p.Disposable{constructor(v){super(),this._onOptionChange=this.register(new d.EventEmitter),this.onOptionChange=this._onOptionChange.event;const o={...u.DEFAULT_OPTIONS};for(const c in v)if(c in o)try{const n=v[c];o[c]=this._sanitizeAndValidateOption(c,n)}catch(n){console.error(n)}this.rawOptions=o,this.options={...o},this._setupOptions(),this.register((0,p.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(v,o){return this.onOptionChange((c=>{c===v&&o(this.rawOptions[v])}))}onMultipleOptionChange(v,o){return this.onOptionChange((c=>{v.indexOf(c)!==-1&&o()}))}_setupOptions(){const v=c=>{if(!(c in u.DEFAULT_OPTIONS))throw new Error(`No option with key "${c}"`);return this.rawOptions[c]},o=(c,n)=>{if(!(c in u.DEFAULT_OPTIONS))throw new Error(`No option with key "${c}"`);n=this._sanitizeAndValidateOption(c,n),this.rawOptions[c]!==n&&(this.rawOptions[c]=n,this._onOptionChange.fire(c))};for(const c in this.rawOptions){const n={get:v.bind(this,c),set:o.bind(this,c)};Object.defineProperty(this.options,c,n)}}_sanitizeAndValidateOption(v,o){switch(v){case"cursorStyle":if(o||(o=u.DEFAULT_OPTIONS[v]),!(function(c){return c==="block"||c==="underline"||c==="bar"})(o))throw new Error(`"${o}" is not a valid value for ${v}`);break;case"wordSeparator":o||(o=u.DEFAULT_OPTIONS[v]);break;case"fontWeight":case"fontWeightBold":if(typeof o=="number"&&1<=o&&o<=1e3)break;o=g.includes(o)?o:u.DEFAULT_OPTIONS[v];break;case"cursorWidth":o=Math.floor(o);case"lineHeight":case"tabStopWidth":if(o<1)throw new Error(`${v} cannot be less than 1, value: ${o}`);break;case"minimumContrastRatio":o=Math.max(1,Math.min(21,Math.round(10*o)/10));break;case"scrollback":if((o=Math.min(o,4294967295))<0)throw new Error(`${v} cannot be less than 0, value: ${o}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(o<=0)throw new Error(`${v} cannot be less than or equal to 0, value: ${o}`);break;case"rows":case"cols":if(!o&&o!==0)throw new Error(`${v} must be numeric, value: ${o}`);break;case"windowsPty":o=o??{}}return o}}u.OptionsService=y},2660:function(Y,u,f){var d=this&&this.__decorate||function(y,E,v,o){var c,n=arguments.length,l=n<3?E:o===null?o=Object.getOwnPropertyDescriptor(E,v):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(y,E,v,o);else for(var _=y.length-1;_>=0;_--)(c=y[_])&&(l=(n<3?c(l):n>3?c(E,v,l):c(E,v))||l);return n>3&&l&&Object.defineProperty(E,v,l),l},p=this&&this.__param||function(y,E){return function(v,o){E(v,o,y)}};Object.defineProperty(u,"__esModule",{value:!0}),u.OscLinkService=void 0;const h=f(2585);let g=u.OscLinkService=class{constructor(y){this._bufferService=y,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(y){const E=this._bufferService.buffer;if(y.id===void 0){const _=E.addMarker(E.ybase+E.y),b={data:y,id:this._nextId++,lines:[_]};return _.onDispose((()=>this._removeMarkerFromLink(b,_))),this._dataByLinkId.set(b.id,b),b.id}const v=y,o=this._getEntryIdKey(v),c=this._entriesWithId.get(o);if(c)return this.addLineToLink(c.id,E.ybase+E.y),c.id;const n=E.addMarker(E.ybase+E.y),l={id:this._nextId++,key:this._getEntryIdKey(v),data:v,lines:[n]};return n.onDispose((()=>this._removeMarkerFromLink(l,n))),this._entriesWithId.set(l.key,l),this._dataByLinkId.set(l.id,l),l.id}addLineToLink(y,E){const v=this._dataByLinkId.get(y);if(v&&v.lines.every((o=>o.line!==E))){const o=this._bufferService.buffer.addMarker(E);v.lines.push(o),o.onDispose((()=>this._removeMarkerFromLink(v,o)))}}getLinkData(y){var E;return(E=this._dataByLinkId.get(y))==null?void 0:E.data}_getEntryIdKey(y){return`${y.id};;${y.uri}`}_removeMarkerFromLink(y,E){const v=y.lines.indexOf(E);v!==-1&&(y.lines.splice(v,1),y.lines.length===0&&(y.data.id!==void 0&&this._entriesWithId.delete(y.key),this._dataByLinkId.delete(y.id)))}};u.OscLinkService=g=d([p(0,h.IBufferService)],g)},8343:(Y,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.createDecorator=u.getServiceDependencies=u.serviceRegistry=void 0;const f="di$target",d="di$dependencies";u.serviceRegistry=new Map,u.getServiceDependencies=function(p){return p[d]||[]},u.createDecorator=function(p){if(u.serviceRegistry.has(p))return u.serviceRegistry.get(p);const h=function(g,y,E){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(v,o,c){o[f]===o?o[d].push({id:v,index:c}):(o[d]=[{id:v,index:c}],o[f]=o)})(h,g,E)};return h.toString=()=>p,u.serviceRegistry.set(p,h),h}},2585:(Y,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.IDecorationService=u.IUnicodeService=u.IOscLinkService=u.IOptionsService=u.ILogService=u.LogLevelEnum=u.IInstantiationService=u.ICharsetService=u.ICoreService=u.ICoreMouseService=u.IBufferService=void 0;const d=f(8343);var p;u.IBufferService=(0,d.createDecorator)("BufferService"),u.ICoreMouseService=(0,d.createDecorator)("CoreMouseService"),u.ICoreService=(0,d.createDecorator)("CoreService"),u.ICharsetService=(0,d.createDecorator)("CharsetService"),u.IInstantiationService=(0,d.createDecorator)("InstantiationService"),(function(h){h[h.TRACE=0]="TRACE",h[h.DEBUG=1]="DEBUG",h[h.INFO=2]="INFO",h[h.WARN=3]="WARN",h[h.ERROR=4]="ERROR",h[h.OFF=5]="OFF"})(p||(u.LogLevelEnum=p={})),u.ILogService=(0,d.createDecorator)("LogService"),u.IOptionsService=(0,d.createDecorator)("OptionsService"),u.IOscLinkService=(0,d.createDecorator)("OscLinkService"),u.IUnicodeService=(0,d.createDecorator)("UnicodeService"),u.IDecorationService=(0,d.createDecorator)("DecorationService")},1480:(Y,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.UnicodeService=void 0;const d=f(8460),p=f(225);class h{static extractShouldJoin(y){return(1&y)!=0}static extractWidth(y){return y>>1&3}static extractCharKind(y){return y>>3}static createPropertyValue(y,E,v=!1){return(16777215&y)<<3|(3&E)<<1|(v?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new d.EventEmitter,this.onChange=this._onChange.event;const y=new p.UnicodeV6;this.register(y),this._active=y.version,this._activeProvider=y}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(y){if(!this._providers[y])throw new Error(`unknown Unicode version "${y}"`);this._active=y,this._activeProvider=this._providers[y],this._onChange.fire(y)}register(y){this._providers[y.version]=y}wcwidth(y){return this._activeProvider.wcwidth(y)}getStringCellWidth(y){let E=0,v=0;const o=y.length;for(let c=0;c<o;++c){let n=y.charCodeAt(c);if(55296<=n&&n<=56319){if(++c>=o)return E+this.wcwidth(n);const b=y.charCodeAt(c);56320<=b&&b<=57343?n=1024*(n-55296)+b-56320+65536:E+=this.wcwidth(b)}const l=this.charProperties(n,v);let _=h.extractWidth(l);h.extractShouldJoin(l)&&(_-=h.extractWidth(v)),E+=_,v=l}return E}charProperties(y,E){return this._activeProvider.charProperties(y,E)}}u.UnicodeService=h}},H={};function re(Y){var u=H[Y];if(u!==void 0)return u.exports;var f=H[Y]={exports:{}};return J[Y].call(f.exports,f,f.exports,re),f.exports}var ue={};return(()=>{var Y=ue;Object.defineProperty(Y,"__esModule",{value:!0}),Y.Terminal=void 0;const u=re(9042),f=re(3236),d=re(844),p=re(5741),h=re(8285),g=re(7975),y=re(7090),E=["cols","rows"];class v extends d.Disposable{constructor(c){super(),this._core=this.register(new f.Terminal(c)),this._addonManager=this.register(new p.AddonManager),this._publicOptions={...this._core.options};const n=_=>this._core.options[_],l=(_,b)=>{this._checkReadonlyOptions(_),this._core.options[_]=b};for(const _ in this._core.options){const b={get:n.bind(this,_),set:l.bind(this,_)};Object.defineProperty(this._publicOptions,_,b)}}_checkReadonlyOptions(c){if(E.includes(c))throw new Error(`Option "${c}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new g.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new y.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new h.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const c=this._core.coreService.decPrivateModes;let n="none";switch(this._core.coreMouseService.activeProtocol){case"X10":n="x10";break;case"VT200":n="vt200";break;case"DRAG":n="drag";break;case"ANY":n="any"}return{applicationCursorKeysMode:c.applicationCursorKeys,applicationKeypadMode:c.applicationKeypad,bracketedPasteMode:c.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:n,originMode:c.origin,reverseWraparoundMode:c.reverseWraparound,sendFocusMode:c.sendFocus,wraparoundMode:c.wraparound}}get options(){return this._publicOptions}set options(c){for(const n in c)this._publicOptions[n]=c[n]}blur(){this._core.blur()}focus(){this._core.focus()}input(c,n=!0){this._core.input(c,n)}resize(c,n){this._verifyIntegers(c,n),this._core.resize(c,n)}open(c){this._core.open(c)}attachCustomKeyEventHandler(c){this._core.attachCustomKeyEventHandler(c)}attachCustomWheelEventHandler(c){this._core.attachCustomWheelEventHandler(c)}registerLinkProvider(c){return this._core.registerLinkProvider(c)}registerCharacterJoiner(c){return this._checkProposedApi(),this._core.registerCharacterJoiner(c)}deregisterCharacterJoiner(c){this._checkProposedApi(),this._core.deregisterCharacterJoiner(c)}registerMarker(c=0){return this._verifyIntegers(c),this._core.registerMarker(c)}registerDecoration(c){return this._checkProposedApi(),this._verifyPositiveIntegers(c.x??0,c.width??0,c.height??0),this._core.registerDecoration(c)}hasSelection(){return this._core.hasSelection()}select(c,n,l){this._verifyIntegers(c,n,l),this._core.select(c,n,l)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(c,n){this._verifyIntegers(c,n),this._core.selectLines(c,n)}dispose(){super.dispose()}scrollLines(c){this._verifyIntegers(c),this._core.scrollLines(c)}scrollPages(c){this._verifyIntegers(c),this._core.scrollPages(c)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(c){this._verifyIntegers(c),this._core.scrollToLine(c)}clear(){this._core.clear()}write(c,n){this._core.write(c,n)}writeln(c,n){this._core.write(c),this._core.write(`\r
|
|
192
|
+
`,n)}paste(c){this._core.paste(c)}refresh(c,n){this._verifyIntegers(c,n),this._core.refresh(c,n)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(c){this._addonManager.loadAddon(this,c)}static get strings(){return u}_verifyIntegers(...c){for(const n of c)if(n===1/0||isNaN(n)||n%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...c){for(const n of c)if(n&&(n===1/0||isNaN(n)||n%1!=0||n<0))throw new Error("This API only accepts positive integers")}}Y.Terminal=v})(),ue})()))})(Lo)),Lo.exports}var ug=cg(),ko={exports:{}},td;function hg(){return td||(td=1,(function(L,X){(function(J,H){L.exports=H()})(self,(()=>(()=>{var J={};return(()=>{var H=J;Object.defineProperty(H,"__esModule",{value:!0}),H.FitAddon=void 0,H.FitAddon=class{activate(re){this._terminal=re}dispose(){}fit(){const re=this.proposeDimensions();if(!re||!this._terminal||isNaN(re.cols)||isNaN(re.rows))return;const ue=this._terminal._core;this._terminal.rows===re.rows&&this._terminal.cols===re.cols||(ue._renderService.clear(),this._terminal.resize(re.cols,re.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const re=this._terminal._core,ue=re._renderService.dimensions;if(ue.css.cell.width===0||ue.css.cell.height===0)return;const Y=this._terminal.options.scrollback===0?0:re.viewport.scrollBarWidth,u=window.getComputedStyle(this._terminal.element.parentElement),f=parseInt(u.getPropertyValue("height")),d=Math.max(0,parseInt(u.getPropertyValue("width"))),p=window.getComputedStyle(this._terminal.element),h=f-(parseInt(p.getPropertyValue("padding-top"))+parseInt(p.getPropertyValue("padding-bottom"))),g=d-(parseInt(p.getPropertyValue("padding-right"))+parseInt(p.getPropertyValue("padding-left")))-Y;return{cols:Math.max(2,Math.floor(g/ue.css.cell.width)),rows:Math.max(1,Math.floor(h/ue.css.cell.height))}}}})(),J})()))})(ko)),ko.exports}var fg=hg(),Oo={exports:{}},id;function dg(){return id||(id=1,(function(L,X){(function(J,H){L.exports=H()})(self,(()=>(()=>{var J={6:(Y,u)=>{function f(p){try{const h=new URL(p),g=h.password&&h.username?`${h.protocol}//${h.username}:${h.password}@${h.host}`:h.username?`${h.protocol}//${h.username}@${h.host}`:`${h.protocol}//${h.host}`;return p.toLocaleLowerCase().startsWith(g.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(u,"__esModule",{value:!0}),u.LinkComputer=u.WebLinkProvider=void 0,u.WebLinkProvider=class{constructor(p,h,g,y={}){this._terminal=p,this._regex=h,this._handler=g,this._options=y}provideLinks(p,h){const g=d.computeLink(p,this._regex,this._terminal,this._handler);h(this._addCallbacks(g))}_addCallbacks(p){return p.map((h=>(h.leave=this._options.leave,h.hover=(g,y)=>{if(this._options.hover){const{range:E}=h;this._options.hover(g,y,E)}},h)))}};class d{static computeLink(h,g,y,E){const v=new RegExp(g.source,(g.flags||"")+"g"),[o,c]=d._getWindowedLineStrings(h-1,y),n=o.join("");let l;const _=[];for(;l=v.exec(n);){const b=l[0];if(!f(b))continue;const[C,w]=d._mapStrIdx(y,c,0,l.index),[m,A]=d._mapStrIdx(y,C,w,b.length);if(C===-1||w===-1||m===-1||A===-1)continue;const B={start:{x:w+1,y:C+1},end:{x:A,y:m+1}};_.push({range:B,text:b,activate:E})}return _}static _getWindowedLineStrings(h,g){let y,E=h,v=h,o=0,c="";const n=[];if(y=g.buffer.active.getLine(h)){const l=y.translateToString(!0);if(y.isWrapped&&l[0]!==" "){for(o=0;(y=g.buffer.active.getLine(--E))&&o<2048&&(c=y.translateToString(!0),o+=c.length,n.push(c),y.isWrapped&&c.indexOf(" ")===-1););n.reverse()}for(n.push(l),o=0;(y=g.buffer.active.getLine(++v))&&y.isWrapped&&o<2048&&(c=y.translateToString(!0),o+=c.length,n.push(c),c.indexOf(" ")===-1););}return[n,E]}static _mapStrIdx(h,g,y,E){const v=h.buffer.active,o=v.getNullCell();let c=y;for(;E;){const n=v.getLine(g);if(!n)return[-1,-1];for(let l=c;l<n.length;++l){n.getCell(l,o);const _=o.getChars();if(o.getWidth()&&(E-=_.length||1,l===n.length-1&&_==="")){const b=v.getLine(g+1);b&&b.isWrapped&&(b.getCell(0,o),o.getWidth()===2&&(E+=1))}if(E<0)return[g,l]}g++,c=0}return[g,c]}}u.LinkComputer=d}},H={};function re(Y){var u=H[Y];if(u!==void 0)return u.exports;var f=H[Y]={exports:{}};return J[Y](f,f.exports,re),f.exports}var ue={};return(()=>{var Y=ue;Object.defineProperty(Y,"__esModule",{value:!0}),Y.WebLinksAddon=void 0;const u=re(6),f=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function d(p,h){const g=window.open();if(g){try{g.opener=null}catch{}g.location.href=h}else console.warn("Opening link blocked as opener could not be cleared")}Y.WebLinksAddon=class{constructor(p=d,h={}){this._handler=p,this._options=h}activate(p){this._terminal=p;const h=this._options,g=h.urlRegex||f;this._linkProvider=this._terminal.registerLinkProvider(new u.WebLinkProvider(this._terminal,g,this._handler,h))}dispose(){var p;(p=this._linkProvider)==null||p.dispose()}}})(),ue})()))})(Oo)),Oo.exports}var _g=dg();function vg(L,X){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws/terminal?session=${encodeURIComponent(L)}&token=${encodeURIComponent(X)}`}const mg=15e3,gg=new Set([4001,4004]),pg="#10B981",Sg="#F59E0B",yg="#EF4444",sd='"SF Mono", Menlo, Monaco, Inconsolata, "Source Code Pro", Consolas, "Liberation Mono", "Ubuntu Mono", "Courier Prime", "JetBrains Mono", "Courier New", monospace',bg={panelBackground:"#0E0E0E",textMuted:"#A1A1AA",borderSubtle:"#2E2E2E",xterm:{background:"#0E0E0E",foreground:"#FAFAFA",cursor:"#6BE195",cursorAccent:"#0E0E0E",selectionBackground:"rgba(107, 225, 149, 0.25)",black:"#1A1A1A",red:"#f87171",green:"#6BE195",yellow:"#f59e0b",blue:"#3b82f6",magenta:"#a78bfa",cyan:"#22d3ee",white:"#FAFAFA",brightBlack:"#404040",brightRed:"#ff9b96",brightGreen:"#8bd4a6",brightYellow:"#ffd966",brightBlue:"#60a5fa",brightMagenta:"#c4b5fd",brightCyan:"#67e8f9",brightWhite:"#ffffff"}},Cg={panelBackground:"#FFFFFF",textMuted:"#737373",borderSubtle:"#E5E5E5",xterm:{background:"#FFFFFF",foreground:"#1A1A1A",cursor:"#05A9BC",cursorAccent:"#FFFFFF",selectionBackground:"rgba(5, 169, 188, 0.18)",black:"#3A3A3A",red:"#dc2626",green:"#05A9BC",yellow:"#b45309",blue:"#2563eb",magenta:"#7c3aed",cyan:"#0891b2",white:"#d4d4d8",brightBlack:"#737373",brightRed:"#ef4444",brightGreen:"#06b6d4",brightYellow:"#f59e0b",brightBlue:"#3b82f6",brightMagenta:"#a78bfa",brightCyan:"#22d3ee",brightWhite:"#ffffff"}},Bo=L=>L==="dark"?bg:Cg,wg=({sessionId:L,token:X})=>{const J=fe.useRef(null),H=fe.useRef(null),[re,ue]=fe.useState("connecting"),[Y,u]=fe.useState(null),[f,d]=fe.useState(oa());fe.useEffect(()=>Wo(d),[]),fe.useEffect(()=>{H.current&&(H.current.options.theme=Bo(f).xterm)},[f]),fe.useEffect(()=>{const y=J.current;if(!y)return;let E=!1,v=0,o=null,c=null;const n=new ug.Terminal({cursorBlink:!0,fontSize:13,fontFamily:sd,theme:Bo(oa()).xterm,scrollback:1e4,allowProposedApi:!0});H.current=n;const l=new fg.FitAddon;n.loadAddon(l),n.loadAddon(new _g.WebLinksAddon),n.parser.registerCsiHandler({prefix:">",final:"q"},()=>(n.write("\x1BP>|XTerm(370)\x1B\\"),!0)),n.parser.registerOscHandler(52,m=>{var U;const A=m.split(";");if(A.length<2)return!1;const B=A[A.length-1];try{const z=atob(B),O=Uint8Array.from(z,te=>te.charCodeAt(0)),P=new TextDecoder().decode(O);(U=navigator.clipboard)==null||U.writeText(P).catch(()=>{})}catch{}return!0}),n.open(y),l.fit();const _=n.onData(m=>{(c==null?void 0:c.readyState)===WebSocket.OPEN&&c.send(m)}),b=()=>{(c==null?void 0:c.readyState)===WebSocket.OPEN&&c.send(JSON.stringify({type:"resize",cols:n.cols,rows:n.rows}))},C=new ResizeObserver(()=>{l.fit(),b()});C.observe(y);function w(){if(E)return;const m=new WebSocket(vg(L,X));c=m,m.onopen=()=>{v=0,ue("connected"),u(null),l.fit(),b()},m.onmessage=A=>{const B=typeof A.data=="string"?A.data:new TextDecoder().decode(A.data);n.write(B)},m.onclose=A=>{if(E)return;if(gg.has(A.code)){ue("error"),u(A.reason||`Connection refused (${A.code})`);return}const B=Math.min(1e3*2**v,mg);v+=1,ue("connecting"),o=setTimeout(w,B)}}return w(),()=>{E=!0,o&&clearTimeout(o),C.disconnect(),_.dispose(),c==null||c.close(),n.dispose(),H.current=null}},[L,X]);const p=re==="connected"?pg:re==="error"?yg:Sg,h=re==="connected"?"Connected":re==="error"?Y??"Error":"Connecting…",g=Bo(f);return q.jsxs("div",{className:"harness-terminal",style:{display:"flex",flexDirection:"column",height:"100%",width:"100%",background:g.panelBackground,borderRadius:8,border:`1px solid ${g.borderSubtle}`,overflow:"hidden"},children:[q.jsxs("div",{"data-status":re,style:{display:"flex",alignItems:"center",gap:6,flexShrink:0,padding:"6px 10px",borderBottom:`1px solid ${g.borderSubtle}`,fontFamily:sd,fontSize:11},children:[q.jsx("span",{"aria-hidden":"true",style:{width:7,height:7,borderRadius:"50%",background:p,boxShadow:re==="connecting"?`0 0 0 3px ${p}33`:"none",flexShrink:0}}),q.jsx("span",{style:{color:g.textMuted},children:h})]}),q.jsx("div",{ref:J,style:{flex:1,minHeight:0,padding:8,overflow:"hidden"}})]})},Eg=8e3;function Ag({message:L,onDismiss:X}){return fe.useEffect(()=>{const J=window.setTimeout(X,Eg);return()=>window.clearTimeout(J)},[L,X]),q.jsxs("div",{className:"toast",role:"alert","data-testid":"toast",children:[q.jsx("span",{className:"toast-message",children:L}),q.jsx("button",{className:"toast-dismiss","aria-label":"Dismiss",onClick:X,children:"×"})]})}function Dg({recentDirs:L,launchDir:X,listDir:J,onCreateSession:H,onRunSample:re,onDismiss:ue}){const[Y,u]=fe.useState(!1),[f,d]=fe.useState(!1),[p,h]=fe.useState(null),g=fe.useRef(null),y=async()=>{d(!0),h(null);try{await re()}catch(E){h(E.message),d(!1)}};return q.jsxs("div",{className:"welcome-panel","data-testid":"welcome-panel",children:[q.jsxs("div",{className:"welcome-card",children:[q.jsx("div",{className:"welcome-eyebrow",children:"Welcome"}),q.jsx("h1",{className:"welcome-title",children:"Your coding agent, wired into Sapiom"}),q.jsx("p",{className:"welcome-intro",children:"This is your own coding agent — Claude Code or Codex — running in a Sapiom-configured workspace. Agent workflows you build here show up in the rail, get visualized live on the canvas, and can be run locally or deployed with one click."}),q.jsxs("div",{className:"welcome-actions",children:[q.jsx("button",{ref:g,className:"btn-primary welcome-action","data-testid":"welcome-start-project",onClick:()=>u(!0),children:"Start a new project"}),q.jsx("button",{className:"btn-ghost welcome-action","data-testid":"welcome-run-sample",onClick:()=>void y(),disabled:f,children:f?"Setting up the sample…":"Run the sample project"})]}),q.jsxs("p",{className:"welcome-sample-note",children:["The sample is ",q.jsx("code",{children:"order-triage"}),", a small support-ticket triage agent — ready to visualize, run, and deploy."]}),p&&q.jsx("div",{className:"welcome-error",children:p}),q.jsxs("div",{className:"welcome-hints","data-testid":"welcome-hints",children:[q.jsx("span",{className:"welcome-hints-label",children:"In a project you can"}),q.jsxs("span",{className:"welcome-hint-chip",children:[q.jsx(ut,{name:"Sparkles",size:11})," Visualize"]}),q.jsxs("span",{className:"welcome-hint-chip",children:[q.jsx(ut,{name:"Play",size:11})," Run local"]}),q.jsxs("span",{className:"welcome-hint-chip",children:[q.jsx(ut,{name:"Cloud",size:11})," Deploy"]}),q.jsxs("span",{className:"welcome-hints-kbd",children:["— or press ",q.jsx("kbd",{children:"⌘K"})]})]}),q.jsx("button",{className:"welcome-dismiss","data-testid":"welcome-dismiss",onClick:ue,children:"Skip for now"})]}),Y&&q.jsx(hd,{recentDirs:L,launchDir:X,listDir:J,onClose:()=>u(!1),onCreate:H,triggerRef:g})]})}function xg({workflow:L,top:X,height:J,activeSessionId:H,macros:re,onRunMacro:ue}){const Y={top:X,height:J},u={top:X};return q.jsxs(q.Fragment,{children:[q.jsx("div",{className:"workflow-action-strip-notch",style:Y,"data-testid":"workflow-action-strip-notch"}),q.jsx("div",{className:"workflow-action-strip",style:u,"data-testid":"workflow-action-strip",children:re.map(f=>{const d=ud(f,L,H);return q.jsxs("button",{className:"strip-item","data-testid":`macro-${f.id}`,"aria-label":d?`${f.label}: ${d}`:f.label,disabled:!!d,onClick:()=>ue(f),children:[q.jsx("span",{className:"strip-item-icon",children:q.jsx(ut,{name:f.icon,size:15})}),q.jsxs("span",{className:"strip-item-text",children:[q.jsx("span",{className:"strip-item-label",children:f.label}),d&&q.jsx("span",{className:"strip-item-reason",children:d})]})]},f.id)})})]})}const Tg=L=>L.split("/").filter(Boolean).pop()??L,Rg=(L,X)=>L===X||L.startsWith(`${X}/`);function Mg(L,X,J){const H=X.find(f=>f.id===J)??null,re=new Set(L),ue=[],Y=new Set,u=[...H?[H.cwd]:[],...X.map(f=>f.cwd).filter(f=>f!==(H==null?void 0:H.cwd))].filter(f=>Y.has(f)?!1:(Y.add(f),!0));for(const f of u){const d=L.filter(h=>re.has(h)&&Rg(h.path,f)),p=f===(H==null?void 0:H.cwd);d.length===0&&!p||(d.forEach(h=>re.delete(h)),ue.push({cwd:f,label:Tg(f),isActive:p,workflows:d}))}return{groups:ue,ungrouped:Array.from(re)}}function Lg({workflow:L,isSelected:X,onSelect:J,onSelectedRowElement:H}){return q.jsx("div",{ref:X?H:void 0,className:"workflow-item"+(X?" is-selected":""),"data-testid":`workflow-${L.name}`,children:q.jsxs("button",{className:"workflow-item-trigger",onClick:()=>J(L.path),title:L.path,children:[q.jsx("span",{className:"workflow-caret",children:"▸"}),q.jsx("span",{className:"workflow-name",children:L.name}),L.definitionId!=null&&q.jsx("span",{className:"workflow-dot",title:"Deployed"})]})})}function kg({workflows:L,sessions:X,activeSessionId:J,selectedPath:H,onSelect:re,onSelectedRowElement:ue,onConnect:Y}){const[u,f]=fe.useState(!1),[d,p]=fe.useState(""),[h,g]=fe.useState(!1),[y,E]=fe.useState(null),v=async()=>{const l=d.trim();if(l){g(!0),E(null);try{await Y(l),p(""),f(!1)}catch(_){E(_.message)}finally{g(!1)}}},{groups:o,ungrouped:c}=Mg(L,X,J),n=l=>q.jsx(Lg,{workflow:l,isSelected:l.path===H,onSelect:re,onSelectedRowElement:ue},l.path);return q.jsxs("aside",{className:"rail rail-workflows",children:[q.jsx("div",{className:"rail-header",children:"Workspace"}),q.jsxs("div",{className:"rail-list",children:[o.length===0&&c.length===0&&q.jsx("div",{className:"rail-empty",children:"No workflows yet"}),o.map(l=>q.jsxs("div",{className:"workspace-group"+(l.isActive?" is-active":""),children:[q.jsxs("div",{className:"workspace-group-header","data-testid":`workspace-group-${l.label}`,children:[q.jsx(ut,{name:l.isActive?"Radio":"Folder",size:11}),l.label]}),l.workflows.length===0&&q.jsx("div",{className:"workspace-group-empty",children:"No workflows here yet"}),l.workflows.map(n)]},l.cwd)),c.length>0&&q.jsxs("div",{className:"workspace-group",children:[q.jsx("div",{className:"workspace-group-header",children:"Other"}),c.map(n)]})]}),u?q.jsxs("div",{className:"connect-form",children:[q.jsx("input",{autoFocus:!0,className:"connect-input",placeholder:"/path/to/project",value:d,onChange:l=>p(l.target.value),onKeyDown:l=>{l.key==="Enter"&&v(),l.key==="Escape"&&f(!1)}}),y&&q.jsx("div",{className:"connect-error",children:y}),q.jsxs("div",{className:"connect-actions",children:[q.jsx("button",{className:"btn-ghost",onClick:()=>f(!1),disabled:h,children:"Cancel"}),q.jsx("button",{className:"btn-primary",onClick:()=>void v(),disabled:h||!d.trim(),children:h?"Connecting…":"Connect"})]})]}):q.jsx("button",{className:"connect-trigger",onClick:()=>f(!0),children:"+ Connect"})]})}function Og(L,X){const[J,H]=fe.useState(null);return fe.useLayoutEffect(()=>{if(!L||!X){H(null);return}const re=()=>{const u=L.getBoundingClientRect(),f=X.getBoundingClientRect();H({top:u.top-f.top,height:u.height})};re();const ue=L.closest(".rail-list");ue==null||ue.addEventListener("scroll",re),window.addEventListener("resize",re);const Y=new ResizeObserver(re);return Y.observe(L),Y.observe(X),()=>{ue==null||ue.removeEventListener("scroll",re),window.removeEventListener("resize",re),Y.disconnect()}},[L,X]),J}const dd="sapiom-harness-pane-widths",Go=180,_d=480,zo=220,Yo=280,vd=720,Uo=420;function jo(L,X,J){return Math.min(Math.max(L,X),J)}function Bg(){const L={rail:zo,canvas:Uo};if(typeof window>"u")return L;try{const X=window.localStorage.getItem(dd);if(!X)return L;const J=JSON.parse(X);return{rail:jo(typeof J.rail=="number"?J.rail:zo,Go,_d),canvas:jo(typeof J.canvas=="number"?J.canvas:Uo,Yo,vd)}}catch{return L}}function rd(L){window.localStorage.setItem(dd,JSON.stringify(L))}function Hg(){const[L,X]=fe.useState(Bg),J=(re,ue,Y,u)=>f=>{const d=f.currentTarget;d.setPointerCapture(f.pointerId);const p=f.clientX,h=L[re],g=E=>{const v=jo(h+(E.clientX-p)*ue,Y,u);X(o=>o[re]===v?o:{...o,[re]:v})},y=()=>{d.removeEventListener("pointermove",g),d.removeEventListener("pointerup",y),X(E=>(rd(E),E))};d.addEventListener("pointermove",g),d.addEventListener("pointerup",y)},H=(re,ue)=>{X(Y=>{const u={...Y,[re]:ue};return rd(u),u})};return{widths:L,startRailDrag:J("rail",1,Go,_d),startCanvasDrag:J("canvas",-1,Yo,vd),resetRail:()=>H("rail",zo),resetCanvas:()=>H("canvas",Uo)}}const Ng=2e3;function zg(L){const X=new URL("/ws/events",window.location.href);X.protocol=X.protocol==="https:"?"wss:":"ws:",X.searchParams.set("token",Ko());let J=null,H=null,re=!1;const ue=()=>{J=new WebSocket(X),J.addEventListener("message",Y=>{try{L(JSON.parse(Y.data))}catch{}}),J.addEventListener("close",()=>{re||(H=setTimeout(ue,Ng))})};return ue(),()=>{re=!0,H&&clearTimeout(H),J==null||J.close()}}const yt=Xm(),Ug=3e3;function jg(){const[L,X]=fe.useState(null),[J,H]=fe.useState(null),[re,ue]=fe.useState(!0),[Y,u]=fe.useState(null),[f,d]=fe.useState(null),[p,h]=fe.useState(null),[g,y]=fe.useState([]),[E,v]=fe.useState(null),[o,c]=fe.useState(!1),[n,l]=fe.useState(null),[_,b]=fe.useState(new Set),[C,w]=fe.useState([]),m=fe.useRef(new Map);fe.useEffect(()=>{const T=m.current;return()=>{T.forEach(N=>clearTimeout(N)),T.clear()}},[]),fe.useEffect(()=>{let T=!1;return Promise.all([yt.getState(),yt.getSettings()]).then(([N,G])=>{if(T)return;X(N),H(G),N.tasks&&w(N.tasks);const ee=N.sessions.find(he=>he.status!=="exited");ee&&h(ee.id),N.workflows[0]&&d(N.workflows[0].path)}).catch(N=>!T&&u(N.message)).finally(()=>!T&&ue(!1)),()=>{T=!0}},[]),fe.useEffect(()=>{if(!p)return;const T=L==null?void 0:L.sessions.find(G=>G.id===p),N=od(T);N&&d(N)},[p]);const A=fe.useCallback(async()=>{const T=await yt.listWorkflows();X(N=>N&&{...N,workflows:T})},[]);fe.useEffect(()=>zg(T=>{if(l(T),T.type==="session.status"){if(X(N=>{if(!N)return N;const ee=N.sessions.some(he=>he.id===T.session.id)?N.sessions.map(he=>he.id===T.session.id?T.session:he):[...N.sessions,T.session];return{...N,sessions:ee}}),T.session.status==="exited"){const N=T.session.id,G=m.current.get(N);G&&(clearTimeout(G),m.current.delete(N)),b(ee=>{if(!ee.has(N))return ee;const he=new Set(ee);return he.delete(N),he})}}else if(T.type==="workflows.changed")A();else if(T.type==="task.status")w(N=>N.some(ee=>ee.id===T.task.id)?N.map(ee=>ee.id===T.task.id?T.task:ee):[...N,T.task]);else if(T.type==="session.activity"){const N=T.harnessSessionId;b(ee=>ee.has(N)?ee:new Set(ee).add(N));const G=m.current.get(N);G&&clearTimeout(G),m.current.set(N,setTimeout(()=>{m.current.delete(N),b(ee=>{if(!ee.has(N))return ee;const he=new Set(ee);return he.delete(N),he})},Ug))}}),[A]);const B=fe.useCallback(async T=>{c(!0);try{y(await yt.sessionHistory(T))}finally{c(!1)}},[]),U=fe.useCallback(async T=>{const N=await yt.createSession(T);X(ee=>ee&&!ee.sessions.some(he=>he.id===N.id)?{...ee,sessions:[...ee.sessions,N]}:ee),h(N.id);let G=[];H(ee=>(G=[T.cwd,...((ee==null?void 0:ee.recentDirs)??[]).filter(he=>he!==T.cwd)].slice(0,8),ee&&{...ee,recentDirs:G}));try{const ee=await yt.updateSettings({recentDirs:G});H(he=>he&&{...he,recentDirs:ee.recentDirs})}catch{}return N},[]),z=fe.useCallback(async()=>{var G;const T=await yt.seedSampleProject(),N=((G=L==null?void 0:L.availableHarnesses)==null?void 0:G[0])??"claude-code";return U({cwd:T.root,harness:N})},[L==null?void 0:L.availableHarnesses,U]),O=fe.useCallback(async T=>{const N=await yt.resumeSession(T);return X(G=>G&&{...G,sessions:G.sessions.map(ee=>ee.id===N.id?N:ee)}),h(N.id),N},[]),P=fe.useCallback(async T=>{var G;const N=T.harnessSessionId??((G=L==null?void 0:L.sessions.find(ee=>ee.agentSessionId===T.agentSessionId))==null?void 0:G.id);return N?O(N):U({cwd:T.cwd,harness:T.harness})},[L,O,U]),te=fe.useCallback(async T=>{await yt.killSession(T);const N=((L==null?void 0:L.sessions)??[]).filter(G=>G.id!==T);if(X(G=>G&&{...G,sessions:N}),p===T){const G=N.find(ee=>ee.status!=="exited");h(G?G.id:null)}},[L,p]),I=fe.useCallback(async T=>{const N=await yt.connectWorkflow(T);return X(G=>G&&{...G,workflows:[...G.workflows.filter(ee=>ee.path!==N.path),N]}),N},[]),F=fe.useCallback(async(T,N)=>{const G=await yt.bindWorkflow(T,N);X(ee=>ee&&{...ee,sessions:ee.sessions.map(he=>he.id===G.id?G:he)})},[]),ie=fe.useCallback(async T=>{const N=await yt.updateSettings(T);return H(N),T.telemetryOptIn!==void 0&&X(G=>G&&{...G,telemetryOptIn:N.telemetryOptIn}),N},[]),x=fe.useCallback(async(T,N)=>{try{await yt.runMacro(T,N)}catch(G){v(G instanceof cd&&G.reason?G.reason:G.message)}},[]),k=fe.useCallback(()=>v(null),[]),D=fe.useCallback(T=>yt.listDir(T),[]);return{state:L,loading:re,error:Y,settings:J,bootToken:Ko(),selectedWorkflowPath:f,setSelectedWorkflowPath:d,activeSessionId:p,setActiveSessionId:h,history:g,historyLoading:o,loadHistory:B,createSession:U,createSampleSession:z,resumeSession:O,resumeFromHistory:P,closeSession:te,connectWorkflow:I,bindWorkflow:F,updateSettings:ie,runMacro:x,listDir:D,lastMessage:n,toast:E,dismissToast:k,busySessionIds:_,tasks:C}}const qg=()=>{var A,B,U,z,O;const L=jg(),[X,J]=fe.useState(!1),[H,re]=fe.useState(!1),[ue,Y]=fe.useState(null),[u,f]=fe.useState(null),d=Og(ue,u),{widths:p,startRailDrag:h,startCanvasDrag:g,resetRail:y,resetCanvas:E}=Hg();if(fe.useEffect(()=>{const P=te=>{var F;const I=te.key.toLowerCase();if((te.metaKey||te.ctrlKey)&&(I==="k"||I==="p")){te.preventDefault(),J(!0);return}if((te.metaKey||te.ctrlKey)&&/^[1-9]$/.test(te.key)){const ie=(F=L.state)==null?void 0:F.sessions.filter(k=>k.status!=="exited").sort((k,D)=>k.createdAt.localeCompare(D.createdAt)),x=ie==null?void 0:ie[Number(te.key)-1];x&&(te.preventDefault(),L.setActiveSessionId(x.id))}};return window.addEventListener("keydown",P),()=>window.removeEventListener("keydown",P)},[(A=L.state)==null?void 0:A.sessions]),L.loading)return q.jsx("div",{className:"app-status",children:"Loading Sapiom Harness…"});if(L.error||!L.state)return q.jsxs("div",{className:"app-status app-status-error",children:["Failed to load: ",L.error]});const{state:v}=L,o=v.sessions.find(P=>P.id===L.activeSessionId)??null,c=od(o),n=v.workflows.find(P=>P.path===c)??null,l=v.workflows.find(P=>P.path===L.selectedWorkflowPath)??null,_=v.sessions.some(P=>P.status!=="exited"),b=v.firstRun===!0&&!_&&!H,C=async(P,te)=>{await L.createSession({cwd:P,harness:te})},w=P=>{L.setSelectedWorkflowPath(P),L.activeSessionId&&L.bindWorkflow(L.activeSessionId,P)},m=(P,te)=>{if(P&&w(P.path),te.action.kind==="open-url"){window.open(Zm(te.action.url,P),"_blank","noopener,noreferrer");return}L.activeSessionId&&L.runMacro(te.id,{harnessSessionId:L.activeSessionId,workflowPath:P==null?void 0:P.path})};return q.jsxs("div",{className:"app-shell",children:[q.jsx(Gm,{authenticated:v.authenticated,organizationName:v.organizationName,onOpenPalette:()=>J(!0)}),q.jsxs("div",{className:"app",style:{gridTemplateColumns:`minmax(${Go}px, ${p.rail}px) 32px minmax(360px, 1fr) minmax(${Yo}px, ${p.canvas}px)`},children:[q.jsx(kg,{workflows:v.workflows,sessions:v.sessions,activeSessionId:L.activeSessionId,selectedPath:L.selectedWorkflowPath,onSelect:w,onSelectedRowElement:Y,onConnect:async P=>{await L.connectWorkflow(P)}}),q.jsx("div",{className:"workflow-action-strip-col",ref:f,children:l&&d&&q.jsx(xg,{workflow:l,top:d.top,height:d.height,activeSessionId:L.activeSessionId,macros:v.macros,onRunMacro:P=>m(l,P)})}),q.jsx("div",{className:"pane-resize-handle pane-resize-handle-rail",style:{left:p.rail+32},onPointerDown:h,onDoubleClick:y,role:"separator","aria-orientation":"vertical","aria-label":"Resize workspace rail","data-testid":"resize-handle-rail"}),q.jsxs("div",{className:"center-pane",children:[q.jsx(og,{sessions:v.sessions,activeSessionId:L.activeSessionId,onSelectSession:L.setActiveSessionId,onResumeHistory:P=>void L.resumeFromHistory(P),history:L.history,historyLoading:L.historyLoading,onOpenHistory:P=>void L.loadHistory(P),recentDirs:((B=L.settings)==null?void 0:B.recentDirs)??[],launchDir:v.launchDir??null,listDir:L.listDir,onCreateSession:C,boundWorkflowName:(n==null?void 0:n.name)??null,authenticated:v.authenticated,organizationName:v.organizationName,telemetryOptIn:((U=L.settings)==null?void 0:U.telemetryOptIn)??v.telemetryOptIn,onToggleTelemetry:async P=>{await L.updateSettings({telemetryOptIn:P})},busySessionIds:L.busySessionIds}),q.jsx("div",{className:"terminal-slot",children:(o==null?void 0:o.status)==="exited"?q.jsx(ig,{session:o,onResume:()=>void L.resumeSession(o.id),onClose:()=>void L.closeSession(o.id)}):L.activeSessionId?q.jsx(wg,{sessionId:L.activeSessionId,token:L.bootToken}):b?q.jsx(Dg,{recentDirs:((z=L.settings)==null?void 0:z.recentDirs)??[],launchDir:v.launchDir??null,listDir:L.listDir,onCreateSession:C,onRunSample:async()=>{await L.createSampleSession()},onDismiss:()=>re(!0)}):q.jsx("div",{className:"terminal-empty",children:"No active session — click “+ new” to start one."})})]}),q.jsx("div",{className:"pane-resize-handle pane-resize-handle-canvas",style:{right:p.canvas},onPointerDown:g,onDoubleClick:E,role:"separator","aria-orientation":"vertical","aria-label":"Resize canvas pane","data-testid":"resize-handle-canvas"}),q.jsx($m,{sessionId:L.activeSessionId,lastMessage:L.lastMessage,boundWorkflow:n,activeSessionId:L.activeSessionId,macros:v.macros,tasks:L.tasks,onRunMacro:P=>m(n,P)})]}),X&&q.jsx(tg,{sessions:v.sessions,workflows:v.workflows,recentDirs:((O=L.settings)==null?void 0:O.recentDirs)??[],listDir:L.listDir,onSelectSession:L.setActiveSessionId,onOpenPath:P=>void C(P,"claude-code"),onClose:()=>J(!1)}),L.toast&&q.jsx(Ag,{message:L.toast,onDismiss:L.dismissToast})]})};window.addEventListener("scroll",()=>{(window.scrollX!==0||window.scrollY!==0)&&window.scrollTo(0,0)},{passive:!0});Kv.createRoot(document.getElementById("root")).render(q.jsx(fe.StrictMode,{children:q.jsx(qg,{})}));
|