@cluesmith/codev 2.0.2 → 2.0.6
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/dashboard/dist/assets/index-B-s8BA2l.js +135 -0
- package/dashboard/dist/assets/index-B-s8BA2l.js.map +1 -0
- package/dashboard/dist/assets/index-DB2AxRP7.css +32 -0
- package/dashboard/dist/index.html +2 -2
- package/dist/agent-farm/cli.d.ts.map +1 -1
- package/dist/agent-farm/cli.js +32 -14
- package/dist/agent-farm/cli.js.map +1 -1
- package/dist/agent-farm/commands/architect.d.ts +1 -1
- package/dist/agent-farm/commands/architect.js +3 -3
- package/dist/agent-farm/commands/architect.js.map +1 -1
- package/dist/agent-farm/commands/attach.d.ts +19 -0
- package/dist/agent-farm/commands/attach.d.ts.map +1 -1
- package/dist/agent-farm/commands/attach.js +172 -12
- package/dist/agent-farm/commands/attach.js.map +1 -1
- package/dist/agent-farm/commands/cleanup.js +6 -6
- package/dist/agent-farm/commands/cleanup.js.map +1 -1
- package/dist/agent-farm/commands/open.js +5 -5
- package/dist/agent-farm/commands/open.js.map +1 -1
- package/dist/agent-farm/commands/send.d.ts +22 -2
- package/dist/agent-farm/commands/send.d.ts.map +1 -1
- package/dist/agent-farm/commands/send.js +100 -181
- package/dist/agent-farm/commands/send.js.map +1 -1
- package/dist/agent-farm/commands/shell.js +5 -5
- package/dist/agent-farm/commands/shell.js.map +1 -1
- package/dist/agent-farm/commands/spawn-roles.d.ts +3 -9
- package/dist/agent-farm/commands/spawn-roles.d.ts.map +1 -1
- package/dist/agent-farm/commands/spawn-roles.js +14 -53
- package/dist/agent-farm/commands/spawn-roles.js.map +1 -1
- package/dist/agent-farm/commands/spawn-worktree.d.ts +11 -17
- package/dist/agent-farm/commands/spawn-worktree.d.ts.map +1 -1
- package/dist/agent-farm/commands/spawn-worktree.js +32 -13
- package/dist/agent-farm/commands/spawn-worktree.js.map +1 -1
- package/dist/agent-farm/commands/spawn.d.ts +8 -6
- package/dist/agent-farm/commands/spawn.d.ts.map +1 -1
- package/dist/agent-farm/commands/spawn.js +183 -69
- package/dist/agent-farm/commands/spawn.js.map +1 -1
- package/dist/agent-farm/commands/start.d.ts +4 -4
- package/dist/agent-farm/commands/start.js +16 -16
- package/dist/agent-farm/commands/start.js.map +1 -1
- package/dist/agent-farm/commands/status.d.ts +1 -1
- package/dist/agent-farm/commands/status.d.ts.map +1 -1
- package/dist/agent-farm/commands/status.js +15 -26
- package/dist/agent-farm/commands/status.js.map +1 -1
- package/dist/agent-farm/commands/stop.d.ts +4 -4
- package/dist/agent-farm/commands/stop.js +9 -9
- package/dist/agent-farm/commands/stop.js.map +1 -1
- package/dist/agent-farm/db/index.d.ts.map +1 -1
- package/dist/agent-farm/db/index.js +82 -7
- package/dist/agent-farm/db/index.js.map +1 -1
- package/dist/agent-farm/db/schema.d.ts +2 -2
- package/dist/agent-farm/db/schema.d.ts.map +1 -1
- package/dist/agent-farm/db/schema.js +21 -4
- package/dist/agent-farm/db/schema.js.map +1 -1
- package/dist/agent-farm/lib/tower-client.d.ts +36 -26
- package/dist/agent-farm/lib/tower-client.d.ts.map +1 -1
- package/dist/agent-farm/lib/tower-client.js +50 -25
- package/dist/agent-farm/lib/tower-client.js.map +1 -1
- package/dist/agent-farm/lib/tunnel-client.d.ts +12 -2
- package/dist/agent-farm/lib/tunnel-client.d.ts.map +1 -1
- package/dist/agent-farm/lib/tunnel-client.js +59 -1
- package/dist/agent-farm/lib/tunnel-client.js.map +1 -1
- package/dist/agent-farm/servers/overview.d.ts +111 -0
- package/dist/agent-farm/servers/overview.d.ts.map +1 -0
- package/dist/agent-farm/servers/overview.js +385 -0
- package/dist/agent-farm/servers/overview.js.map +1 -0
- package/dist/agent-farm/servers/tower-instances.d.ts +18 -20
- package/dist/agent-farm/servers/tower-instances.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-instances.js +97 -100
- package/dist/agent-farm/servers/tower-instances.js.map +1 -1
- package/dist/agent-farm/servers/tower-messages.d.ts +87 -0
- package/dist/agent-farm/servers/tower-messages.d.ts.map +1 -0
- package/dist/agent-farm/servers/tower-messages.js +202 -0
- package/dist/agent-farm/servers/tower-messages.js.map +1 -0
- package/dist/agent-farm/servers/tower-routes.d.ts +1 -1
- package/dist/agent-farm/servers/tower-routes.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-routes.js +343 -174
- package/dist/agent-farm/servers/tower-routes.js.map +1 -1
- package/dist/agent-farm/servers/tower-server.js +50 -21
- package/dist/agent-farm/servers/tower-server.js.map +1 -1
- package/dist/agent-farm/servers/tower-terminals.d.ts +35 -31
- package/dist/agent-farm/servers/tower-terminals.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-terminals.js +208 -184
- package/dist/agent-farm/servers/tower-terminals.js.map +1 -1
- package/dist/agent-farm/servers/tower-tunnel.d.ts +2 -2
- package/dist/agent-farm/servers/tower-tunnel.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-tunnel.js +12 -12
- package/dist/agent-farm/servers/tower-tunnel.js.map +1 -1
- package/dist/agent-farm/servers/tower-types.d.ts +8 -12
- package/dist/agent-farm/servers/tower-types.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-utils.d.ts +9 -9
- package/dist/agent-farm/servers/tower-utils.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-utils.js +18 -18
- package/dist/agent-farm/servers/tower-utils.js.map +1 -1
- package/dist/agent-farm/servers/tower-websocket.d.ts +2 -2
- package/dist/agent-farm/servers/tower-websocket.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-websocket.js +39 -18
- package/dist/agent-farm/servers/tower-websocket.js.map +1 -1
- package/dist/agent-farm/types.d.ts +5 -6
- package/dist/agent-farm/types.d.ts.map +1 -1
- package/dist/agent-farm/utils/agent-names.d.ts +85 -0
- package/dist/agent-farm/utils/agent-names.d.ts.map +1 -0
- package/dist/agent-farm/utils/agent-names.js +140 -0
- package/dist/agent-farm/utils/agent-names.js.map +1 -0
- package/dist/agent-farm/utils/config.d.ts +1 -1
- package/dist/agent-farm/utils/config.d.ts.map +1 -1
- package/dist/agent-farm/utils/config.js +16 -16
- package/dist/agent-farm/utils/config.js.map +1 -1
- package/dist/agent-farm/utils/file-tabs.d.ts +3 -3
- package/dist/agent-farm/utils/file-tabs.d.ts.map +1 -1
- package/dist/agent-farm/utils/file-tabs.js +9 -9
- package/dist/agent-farm/utils/file-tabs.js.map +1 -1
- package/dist/agent-farm/utils/index.d.ts +0 -1
- package/dist/agent-farm/utils/index.d.ts.map +1 -1
- package/dist/agent-farm/utils/index.js +0 -1
- package/dist/agent-farm/utils/index.js.map +1 -1
- package/dist/agent-farm/utils/message-format.d.ts +17 -0
- package/dist/agent-farm/utils/message-format.d.ts.map +1 -0
- package/dist/agent-farm/utils/message-format.js +41 -0
- package/dist/agent-farm/utils/message-format.js.map +1 -0
- package/dist/agent-farm/utils/notifications.d.ts +4 -4
- package/dist/agent-farm/utils/notifications.d.ts.map +1 -1
- package/dist/agent-farm/utils/notifications.js +18 -18
- package/dist/agent-farm/utils/notifications.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +26 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/adopt.d.ts +2 -2
- package/dist/commands/adopt.d.ts.map +1 -1
- package/dist/commands/adopt.js +13 -15
- package/dist/commands/adopt.js.map +1 -1
- package/dist/commands/consult/index.d.ts +26 -2
- package/dist/commands/consult/index.d.ts.map +1 -1
- package/dist/commands/consult/index.js +296 -83
- package/dist/commands/consult/index.js.map +1 -1
- package/dist/commands/consult/metrics.d.ts +90 -0
- package/dist/commands/consult/metrics.d.ts.map +1 -0
- package/dist/commands/consult/metrics.js +203 -0
- package/dist/commands/consult/metrics.js.map +1 -0
- package/dist/commands/consult/stats.d.ts +18 -0
- package/dist/commands/consult/stats.d.ts.map +1 -0
- package/dist/commands/consult/stats.js +150 -0
- package/dist/commands/consult/stats.js.map +1 -0
- package/dist/commands/consult/usage-extractor.d.ts +38 -0
- package/dist/commands/consult/usage-extractor.d.ts.map +1 -0
- package/dist/commands/consult/usage-extractor.js +99 -0
- package/dist/commands/consult/usage-extractor.js.map +1 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +11 -9
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/import.js +4 -4
- package/dist/commands/import.js.map +1 -1
- package/dist/commands/init.d.ts +2 -2
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +13 -15
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/porch/index.d.ts +6 -6
- package/dist/commands/porch/index.d.ts.map +1 -1
- package/dist/commands/porch/index.js +37 -37
- package/dist/commands/porch/index.js.map +1 -1
- package/dist/commands/porch/next.d.ts +1 -1
- package/dist/commands/porch/next.d.ts.map +1 -1
- package/dist/commands/porch/next.js +86 -92
- package/dist/commands/porch/next.js.map +1 -1
- package/dist/commands/porch/notify.d.ts +11 -0
- package/dist/commands/porch/notify.d.ts.map +1 -0
- package/dist/commands/porch/notify.js +30 -0
- package/dist/commands/porch/notify.js.map +1 -0
- package/dist/commands/porch/plan.d.ts +1 -1
- package/dist/commands/porch/plan.d.ts.map +1 -1
- package/dist/commands/porch/plan.js +3 -3
- package/dist/commands/porch/plan.js.map +1 -1
- package/dist/commands/porch/prompts.d.ts +10 -1
- package/dist/commands/porch/prompts.d.ts.map +1 -1
- package/dist/commands/porch/prompts.js +59 -35
- package/dist/commands/porch/prompts.js.map +1 -1
- package/dist/commands/porch/protocol.d.ts +1 -1
- package/dist/commands/porch/protocol.d.ts.map +1 -1
- package/dist/commands/porch/protocol.js +8 -8
- package/dist/commands/porch/protocol.js.map +1 -1
- package/dist/commands/porch/state.d.ts +6 -6
- package/dist/commands/porch/state.d.ts.map +1 -1
- package/dist/commands/porch/state.js +14 -12
- package/dist/commands/porch/state.js.map +1 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +10 -11
- package/dist/commands/update.js.map +1 -1
- package/dist/lib/github.d.ts +81 -0
- package/dist/lib/github.d.ts.map +1 -0
- package/dist/lib/github.js +141 -0
- package/dist/lib/github.js.map +1 -0
- package/dist/lib/scaffold.d.ts +13 -21
- package/dist/lib/scaffold.d.ts.map +1 -1
- package/dist/lib/scaffold.js +34 -57
- package/dist/lib/scaffold.js.map +1 -1
- package/dist/lib/skeleton.d.ts +7 -7
- package/dist/lib/skeleton.d.ts.map +1 -1
- package/dist/lib/skeleton.js +10 -10
- package/dist/lib/skeleton.js.map +1 -1
- package/dist/terminal/index.d.ts +14 -0
- package/dist/terminal/index.d.ts.map +1 -1
- package/dist/terminal/index.js +12 -0
- package/dist/terminal/index.js.map +1 -1
- package/dist/terminal/pty-manager.d.ts +1 -1
- package/dist/terminal/pty-manager.d.ts.map +1 -1
- package/dist/terminal/pty-manager.js +10 -7
- package/dist/terminal/pty-manager.js.map +1 -1
- package/dist/terminal/pty-session.js +3 -3
- package/dist/terminal/pty-session.js.map +1 -1
- package/dist/terminal/session-manager.d.ts +64 -0
- package/dist/terminal/session-manager.d.ts.map +1 -1
- package/dist/terminal/session-manager.js +299 -10
- package/dist/terminal/session-manager.js.map +1 -1
- package/dist/terminal/shellper-client.d.ts +2 -1
- package/dist/terminal/shellper-client.d.ts.map +1 -1
- package/dist/terminal/shellper-client.js +4 -2
- package/dist/terminal/shellper-client.js.map +1 -1
- package/dist/terminal/shellper-main.js +33 -4
- package/dist/terminal/shellper-main.js.map +1 -1
- package/dist/terminal/shellper-process.d.ts +24 -7
- package/dist/terminal/shellper-process.d.ts.map +1 -1
- package/dist/terminal/shellper-process.js +139 -36
- package/dist/terminal/shellper-process.js.map +1 -1
- package/dist/terminal/shellper-protocol.d.ts +1 -0
- package/dist/terminal/shellper-protocol.d.ts.map +1 -1
- package/dist/terminal/shellper-protocol.js.map +1 -1
- package/package.json +4 -1
- package/skeleton/.claude/skills/af/SKILL.md +7 -7
- package/skeleton/.claude/skills/consult/SKILL.md +1 -1
- package/skeleton/builders.md +2 -2
- package/skeleton/maintain/.gitkeep +1 -1
- package/skeleton/porch/prompts/specify.md +1 -1
- package/skeleton/protocols/bugfix/prompts/pr.md +15 -4
- package/skeleton/protocols/experiment/protocol.md +17 -17
- package/skeleton/protocols/maintain/prompts/audit.md +2 -2
- package/skeleton/protocols/maintain/prompts/sync.md +1 -1
- package/skeleton/protocols/maintain/prompts/verify.md +1 -1
- package/skeleton/protocols/maintain/protocol.md +8 -9
- package/skeleton/protocols/maintain/templates/maintenance-run.md +2 -2
- package/skeleton/protocols/spir/protocol.json +5 -5
- package/skeleton/protocols/spir/protocol.md +8 -8
- package/skeleton/protocols/tick/protocol.md +31 -31
- package/skeleton/resources/commands/agent-farm.md +14 -14
- package/skeleton/resources/commands/codev.md +0 -1
- package/skeleton/resources/commands/consult.md +3 -3
- package/skeleton/resources/spikes.md +3 -3
- package/skeleton/resources/workflow-reference.md +14 -14
- package/skeleton/roles/architect.md +25 -25
- package/skeleton/roles/builder.md +1 -1
- package/skeleton/roles/consultant.md +6 -0
- package/skeleton/templates/AGENTS.md +5 -5
- package/skeleton/templates/CLAUDE.md +5 -5
- package/skeleton/templates/lifecycle.md +9 -9
- package/templates/open.html +19 -16
- package/templates/tower.html +54 -94
- package/templates/vendor/marked.min.js +6 -0
- package/templates/vendor/prism-bash.min.js +1 -0
- package/templates/vendor/prism-css.min.js +1 -0
- package/templates/vendor/prism-javascript.min.js +1 -0
- package/templates/vendor/prism-json.min.js +1 -0
- package/templates/vendor/prism-markdown.min.js +1 -0
- package/templates/vendor/prism-markup.min.js +1 -0
- package/templates/vendor/prism-python.min.js +1 -0
- package/templates/vendor/prism-tomorrow.min.css +1 -0
- package/templates/vendor/prism-typescript.min.js +1 -0
- package/templates/vendor/prism-yaml.min.js +1 -0
- package/templates/vendor/prism.min.js +1 -0
- package/templates/vendor/purify.min.js +3 -0
- package/dashboard/dist/assets/index-4n9zpWLY.css +0 -32
- package/dashboard/dist/assets/index-b38SaXk5.js +0 -136
- package/dashboard/dist/assets/index-b38SaXk5.js.map +0 -1
- package/dist/agent-farm/hq-connector.d.ts +0 -19
- package/dist/agent-farm/hq-connector.d.ts.map +0 -1
- package/dist/agent-farm/hq-connector.js +0 -351
- package/dist/agent-farm/hq-connector.js.map +0 -1
- package/dist/agent-farm/utils/deps.d.ts +0 -51
- package/dist/agent-farm/utils/deps.d.ts.map +0 -1
- package/dist/agent-farm/utils/deps.js +0 -162
- package/dist/agent-farm/utils/deps.js.map +0 -1
- package/dist/agent-farm/utils/gate-status.d.ts +0 -16
- package/dist/agent-farm/utils/gate-status.d.ts.map +0 -1
- package/dist/agent-farm/utils/gate-status.js +0 -79
- package/dist/agent-farm/utils/gate-status.js.map +0 -1
- package/dist/agent-farm/utils/gate-watcher.d.ts +0 -38
- package/dist/agent-farm/utils/gate-watcher.d.ts.map +0 -1
- package/dist/agent-farm/utils/gate-watcher.js +0 -122
- package/dist/agent-farm/utils/gate-watcher.js.map +0 -1
- package/dist/agent-farm/utils/session.d.ts +0 -32
- package/dist/agent-farm/utils/session.d.ts.map +0 -1
- package/dist/agent-farm/utils/session.js +0 -57
- package/dist/agent-farm/utils/session.js.map +0 -1
- package/dist/lib/projectlist-parser.d.ts +0 -70
- package/dist/lib/projectlist-parser.d.ts.map +0 -1
- package/dist/lib/projectlist-parser.js +0 -200
- package/dist/lib/projectlist-parser.js.map +0 -1
- package/skeleton/templates/projectlist-archive.md +0 -21
- package/skeleton/templates/projectlist.md +0 -147
- package/templates/dashboard/css/dialogs.css +0 -149
- package/templates/dashboard/css/files.css +0 -558
- package/templates/dashboard/css/layout.css +0 -133
- package/templates/dashboard/css/projects.css +0 -501
- package/templates/dashboard/css/statusbar.css +0 -23
- package/templates/dashboard/css/tabs.css +0 -314
- package/templates/dashboard/css/utilities.css +0 -50
- package/templates/dashboard/css/variables.css +0 -45
- package/templates/dashboard/index.html +0 -149
- package/templates/dashboard/js/dialogs.js +0 -368
- package/templates/dashboard/js/files.js +0 -448
- package/templates/dashboard/js/main.js +0 -476
- package/templates/dashboard/js/projects.js +0 -544
- package/templates/dashboard/js/state.js +0 -91
- package/templates/dashboard/js/tabs.js +0 -518
- package/templates/dashboard/js/utils.js +0 -191
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
var Ev=Object.defineProperty;var Lv=(F,V,X)=>V in F?Ev(F,V,{enumerable:!0,configurable:!0,writable:!0,value:X}):F[V]=X;var ca=(F,V,X)=>Lv(F,typeof V!="symbol"?V+"":V,X);(function(){const V=document.createElement("link").relList;if(V&&V.supports&&V.supports("modulepreload"))return;for(const ee of document.querySelectorAll('link[rel="modulepreload"]'))U(ee);new MutationObserver(ee=>{for(const ae of ee)if(ae.type==="childList")for(const j of ae.addedNodes)j.tagName==="LINK"&&j.rel==="modulepreload"&&U(j)}).observe(document,{childList:!0,subtree:!0});function X(ee){const ae={};return ee.integrity&&(ae.integrity=ee.integrity),ee.referrerPolicy&&(ae.referrerPolicy=ee.referrerPolicy),ee.crossOrigin==="use-credentials"?ae.credentials="include":ee.crossOrigin==="anonymous"?ae.credentials="omit":ae.credentials="same-origin",ae}function U(ee){if(ee.ep)return;ee.ep=!0;const ae=X(ee);fetch(ee.href,ae)}})();var Eo={exports:{}},Xr={};/**
|
|
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 Od;function Mv(){if(Od)return Xr;Od=1;var F=Symbol.for("react.transitional.element"),V=Symbol.for("react.fragment");function X(U,ee,ae){var j=null;if(ae!==void 0&&(j=""+ae),ee.key!==void 0&&(j=""+ee.key),"key"in ee){ae={};for(var n in ee)n!=="key"&&(ae[n]=ee[n])}else ae=ee;return ee=ae.ref,{$$typeof:F,type:U,key:j,ref:ee!==void 0?ee:null,props:ae}}return Xr.Fragment=V,Xr.jsx=X,Xr.jsxs=X,Xr}var kd;function Av(){return kd||(kd=1,Eo.exports=Mv()),Eo.exports}var re=Av(),Lo={exports:{}},De={};/**
|
|
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 Hd;function Rv(){if(Hd)return De;Hd=1;var F=Symbol.for("react.transitional.element"),V=Symbol.for("react.portal"),X=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),ee=Symbol.for("react.profiler"),ae=Symbol.for("react.consumer"),j=Symbol.for("react.context"),n=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),a=Symbol.for("react.activity"),p=Symbol.iterator;function w(T){return T===null||typeof T!="object"?null:(T=p&&T[p]||T["@@iterator"],typeof T=="function"?T:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},c=Object.assign,r={};function h(T,k,G){this.props=T,this.context=k,this.refs=r,this.updater=G||b}h.prototype.isReactComponent={},h.prototype.setState=function(T,k){if(typeof T!="object"&&typeof T!="function"&&T!=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,T,k,"setState")},h.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function o(){}o.prototype=h.prototype;function l(T,k,G){this.props=T,this.context=k,this.refs=r,this.updater=G||b}var S=l.prototype=new o;S.constructor=l,c(S,h.prototype),S.isPureReactComponent=!0;var x=Array.isArray;function v(){}var y={H:null,A:null,T:null,S:null},m=Object.prototype.hasOwnProperty;function C(T,k,G){var K=G.ref;return{$$typeof:F,type:T,key:k,ref:K!==void 0?K:null,props:G}}function E(T,k){return C(T.type,k,T.props)}function R(T){return typeof T=="object"&&T!==null&&T.$$typeof===F}function L(T){var k={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(G){return k[G]})}var D=/\/+/g;function O(T,k){return typeof T=="object"&&T!==null&&T.key!=null?L(""+T.key):k.toString(36)}function $(T){switch(T.status){case"fulfilled":return T.value;case"rejected":throw T.reason;default:switch(typeof T.status=="string"?T.then(v,v):(T.status="pending",T.then(function(k){T.status==="pending"&&(T.status="fulfilled",T.value=k)},function(k){T.status==="pending"&&(T.status="rejected",T.reason=k)})),T.status){case"fulfilled":return T.value;case"rejected":throw T.reason}}throw T}function I(T,k,G,K,ue){var le=typeof T;(le==="undefined"||le==="boolean")&&(T=null);var q=!1;if(T===null)q=!0;else switch(le){case"bigint":case"string":case"number":q=!0;break;case"object":switch(T.$$typeof){case F:case V:q=!0;break;case _:return q=T._init,I(q(T._payload),k,G,K,ue)}}if(q)return ue=ue(T),q=K===""?"."+O(T,0):K,x(ue)?(G="",q!=null&&(G=q.replace(D,"$&/")+"/"),I(ue,k,G,"",function(te){return te})):ue!=null&&(R(ue)&&(ue=E(ue,G+(ue.key==null||T&&T.key===ue.key?"":(""+ue.key).replace(D,"$&/")+"/")+q)),k.push(ue)),1;q=0;var N=K===""?".":K+":";if(x(T))for(var ie=0;ie<T.length;ie++)K=T[ie],le=N+O(K,ie),q+=I(K,k,G,le,ue);else if(ie=w(T),typeof ie=="function")for(T=ie.call(T),ie=0;!(K=T.next()).done;)K=K.value,le=N+O(K,ie++),q+=I(K,k,G,le,ue);else if(le==="object"){if(typeof T.then=="function")return I($(T),k,G,K,ue);throw k=String(T),Error("Objects are not valid as a React child (found: "+(k==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":k)+"). If you meant to render a collection of children, use an array instead.")}return q}function P(T,k,G){if(T==null)return T;var K=[],ue=0;return I(T,K,"","",function(le){return k.call(G,le,ue++)}),K}function z(T){if(T._status===-1){var k=T._result;k=k(),k.then(function(G){(T._status===0||T._status===-1)&&(T._status=1,T._result=G)},function(G){(T._status===0||T._status===-1)&&(T._status=2,T._result=G)}),T._status===-1&&(T._status=0,T._result=k)}if(T._status===1)return T._result.default;throw T._result}var M=typeof reportError=="function"?reportError:function(T){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var k=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof T=="object"&&T!==null&&typeof T.message=="string"?String(T.message):String(T),error:T});if(!window.dispatchEvent(k))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",T);return}console.error(T)},B={map:P,forEach:function(T,k,G){P(T,function(){k.apply(this,arguments)},G)},count:function(T){var k=0;return P(T,function(){k++}),k},toArray:function(T){return P(T,function(k){return k})||[]},only:function(T){if(!R(T))throw Error("React.Children.only expected to receive a single React element child.");return T}};return De.Activity=a,De.Children=B,De.Component=h,De.Fragment=X,De.Profiler=ee,De.PureComponent=l,De.StrictMode=U,De.Suspense=u,De.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=y,De.__COMPILER_RUNTIME={__proto__:null,c:function(T){return y.H.useMemoCache(T)}},De.cache=function(T){return function(){return T.apply(null,arguments)}},De.cacheSignal=function(){return null},De.cloneElement=function(T,k,G){if(T==null)throw Error("The argument must be a React element, but you passed "+T+".");var K=c({},T.props),ue=T.key;if(k!=null)for(le in k.key!==void 0&&(ue=""+k.key),k)!m.call(k,le)||le==="key"||le==="__self"||le==="__source"||le==="ref"&&k.ref===void 0||(K[le]=k[le]);var le=arguments.length-2;if(le===1)K.children=G;else if(1<le){for(var q=Array(le),N=0;N<le;N++)q[N]=arguments[N+2];K.children=q}return C(T.type,ue,K)},De.createContext=function(T){return T={$$typeof:j,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null},T.Provider=T,T.Consumer={$$typeof:ae,_context:T},T},De.createElement=function(T,k,G){var K,ue={},le=null;if(k!=null)for(K in k.key!==void 0&&(le=""+k.key),k)m.call(k,K)&&K!=="key"&&K!=="__self"&&K!=="__source"&&(ue[K]=k[K]);var q=arguments.length-2;if(q===1)ue.children=G;else if(1<q){for(var N=Array(q),ie=0;ie<q;ie++)N[ie]=arguments[ie+2];ue.children=N}if(T&&T.defaultProps)for(K in q=T.defaultProps,q)ue[K]===void 0&&(ue[K]=q[K]);return C(T,le,ue)},De.createRef=function(){return{current:null}},De.forwardRef=function(T){return{$$typeof:n,render:T}},De.isValidElement=R,De.lazy=function(T){return{$$typeof:_,_payload:{_status:-1,_result:T},_init:z}},De.memo=function(T,k){return{$$typeof:d,type:T,compare:k===void 0?null:k}},De.startTransition=function(T){var k=y.T,G={};y.T=G;try{var K=T(),ue=y.S;ue!==null&&ue(G,K),typeof K=="object"&&K!==null&&typeof K.then=="function"&&K.then(v,M)}catch(le){M(le)}finally{k!==null&&G.types!==null&&(k.types=G.types),y.T=k}},De.unstable_useCacheRefresh=function(){return y.H.useCacheRefresh()},De.use=function(T){return y.H.use(T)},De.useActionState=function(T,k,G){return y.H.useActionState(T,k,G)},De.useCallback=function(T,k){return y.H.useCallback(T,k)},De.useContext=function(T){return y.H.useContext(T)},De.useDebugValue=function(){},De.useDeferredValue=function(T,k){return y.H.useDeferredValue(T,k)},De.useEffect=function(T,k){return y.H.useEffect(T,k)},De.useEffectEvent=function(T){return y.H.useEffectEvent(T)},De.useId=function(){return y.H.useId()},De.useImperativeHandle=function(T,k,G){return y.H.useImperativeHandle(T,k,G)},De.useInsertionEffect=function(T,k){return y.H.useInsertionEffect(T,k)},De.useLayoutEffect=function(T,k){return y.H.useLayoutEffect(T,k)},De.useMemo=function(T,k){return y.H.useMemo(T,k)},De.useOptimistic=function(T,k){return y.H.useOptimistic(T,k)},De.useReducer=function(T,k,G){return y.H.useReducer(T,k,G)},De.useRef=function(T){return y.H.useRef(T)},De.useState=function(T){return y.H.useState(T)},De.useSyncExternalStore=function(T,k,G){return y.H.useSyncExternalStore(T,k,G)},De.useTransition=function(){return y.H.useTransition()},De.version="19.2.4",De}var zd;function zo(){return zd||(zd=1,Lo.exports=Rv()),Lo.exports}var be=zo(),Mo={exports:{}},Vr={},Ao={exports:{}},Ro={};/**
|
|
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 Nd;function Dv(){return Nd||(Nd=1,(function(F){function V(I,P){var z=I.length;I.push(P);e:for(;0<z;){var M=z-1>>>1,B=I[M];if(0<ee(B,P))I[M]=P,I[z]=B,z=M;else break e}}function X(I){return I.length===0?null:I[0]}function U(I){if(I.length===0)return null;var P=I[0],z=I.pop();if(z!==P){I[0]=z;e:for(var M=0,B=I.length,T=B>>>1;M<T;){var k=2*(M+1)-1,G=I[k],K=k+1,ue=I[K];if(0>ee(G,z))K<B&&0>ee(ue,G)?(I[M]=ue,I[K]=z,M=K):(I[M]=G,I[k]=z,M=k);else if(K<B&&0>ee(ue,z))I[M]=ue,I[K]=z,M=K;else break e}}return P}function ee(I,P){var z=I.sortIndex-P.sortIndex;return z!==0?z:I.id-P.id}if(F.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var ae=performance;F.unstable_now=function(){return ae.now()}}else{var j=Date,n=j.now();F.unstable_now=function(){return j.now()-n}}var u=[],d=[],_=1,a=null,p=3,w=!1,b=!1,c=!1,r=!1,h=typeof setTimeout=="function"?setTimeout:null,o=typeof clearTimeout=="function"?clearTimeout:null,l=typeof setImmediate<"u"?setImmediate:null;function S(I){for(var P=X(d);P!==null;){if(P.callback===null)U(d);else if(P.startTime<=I)U(d),P.sortIndex=P.expirationTime,V(u,P);else break;P=X(d)}}function x(I){if(c=!1,S(I),!b)if(X(u)!==null)b=!0,v||(v=!0,L());else{var P=X(d);P!==null&&$(x,P.startTime-I)}}var v=!1,y=-1,m=5,C=-1;function E(){return r?!0:!(F.unstable_now()-C<m)}function R(){if(r=!1,v){var I=F.unstable_now();C=I;var P=!0;try{e:{b=!1,c&&(c=!1,o(y),y=-1),w=!0;var z=p;try{t:{for(S(I),a=X(u);a!==null&&!(a.expirationTime>I&&E());){var M=a.callback;if(typeof M=="function"){a.callback=null,p=a.priorityLevel;var B=M(a.expirationTime<=I);if(I=F.unstable_now(),typeof B=="function"){a.callback=B,S(I),P=!0;break t}a===X(u)&&U(u),S(I)}else U(u);a=X(u)}if(a!==null)P=!0;else{var T=X(d);T!==null&&$(x,T.startTime-I),P=!1}}break e}finally{a=null,p=z,w=!1}P=void 0}}finally{P?L():v=!1}}}var L;if(typeof l=="function")L=function(){l(R)};else if(typeof MessageChannel<"u"){var D=new MessageChannel,O=D.port2;D.port1.onmessage=R,L=function(){O.postMessage(null)}}else L=function(){h(R,0)};function $(I,P){y=h(function(){I(F.unstable_now())},P)}F.unstable_IdlePriority=5,F.unstable_ImmediatePriority=1,F.unstable_LowPriority=4,F.unstable_NormalPriority=3,F.unstable_Profiling=null,F.unstable_UserBlockingPriority=2,F.unstable_cancelCallback=function(I){I.callback=null},F.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},F.unstable_getCurrentPriorityLevel=function(){return p},F.unstable_next=function(I){switch(p){case 1:case 2:case 3:var P=3;break;default:P=p}var z=p;p=P;try{return I()}finally{p=z}},F.unstable_requestPaint=function(){r=!0},F.unstable_runWithPriority=function(I,P){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var z=p;p=I;try{return P()}finally{p=z}},F.unstable_scheduleCallback=function(I,P,z){var M=F.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?M+z:M):z=M,I){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=z+B,I={id:_++,callback:P,priorityLevel:I,startTime:z,expirationTime:B,sortIndex:-1},z>M?(I.sortIndex=z,V(d,I),X(u)===null&&I===X(d)&&(c?(o(y),y=-1):c=!0,$(x,z-M))):(I.sortIndex=B,V(u,I),b||w||(b=!0,v||(v=!0,L()))),I},F.unstable_shouldYield=E,F.unstable_wrapCallback=function(I){var P=p;return function(){var z=p;p=P;try{return I.apply(this,arguments)}finally{p=z}}}})(Ro)),Ro}var Ud;function Tv(){return Ud||(Ud=1,Ao.exports=Dv()),Ao.exports}var Do={exports:{}},wt={};/**
|
|
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 Id;function Bv(){if(Id)return wt;Id=1;var F=zo();function V(u){var d="https://react.dev/errors/"+u;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var _=2;_<arguments.length;_++)d+="&args[]="+encodeURIComponent(arguments[_])}return"Minified React error #"+u+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function X(){}var U={d:{f:X,r:function(){throw Error(V(522))},D:X,C:X,L:X,m:X,X,S:X,M:X},p:0,findDOMNode:null},ee=Symbol.for("react.portal");function ae(u,d,_){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ee,key:a==null?null:""+a,children:u,containerInfo:d,implementation:_}}var j=F.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function n(u,d){if(u==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return wt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=U,wt.createPortal=function(u,d){var _=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(V(299));return ae(u,d,null,_)},wt.flushSync=function(u){var d=j.T,_=U.p;try{if(j.T=null,U.p=2,u)return u()}finally{j.T=d,U.p=_,U.d.f()}},wt.preconnect=function(u,d){typeof u=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,U.d.C(u,d))},wt.prefetchDNS=function(u){typeof u=="string"&&U.d.D(u)},wt.preinit=function(u,d){if(typeof u=="string"&&d&&typeof d.as=="string"){var _=d.as,a=n(_,d.crossOrigin),p=typeof d.integrity=="string"?d.integrity:void 0,w=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;_==="style"?U.d.S(u,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:a,integrity:p,fetchPriority:w}):_==="script"&&U.d.X(u,{crossOrigin:a,integrity:p,fetchPriority:w,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},wt.preinitModule=function(u,d){if(typeof u=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var _=n(d.as,d.crossOrigin);U.d.M(u,{crossOrigin:_,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&U.d.M(u)},wt.preload=function(u,d){if(typeof u=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var _=d.as,a=n(_,d.crossOrigin);U.d.L(u,_,{crossOrigin:a,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})}},wt.preloadModule=function(u,d){if(typeof u=="string")if(d){var _=n(d.as,d.crossOrigin);U.d.m(u,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:_,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else U.d.m(u)},wt.requestFormReset=function(u){U.d.r(u)},wt.unstable_batchedUpdates=function(u,d){return u(d)},wt.useFormState=function(u,d,_){return j.H.useFormState(u,d,_)},wt.useFormStatus=function(){return j.H.useHostTransitionStatus()},wt.version="19.2.4",wt}var Pd;function Ov(){if(Pd)return Do.exports;Pd=1;function F(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(F)}catch(V){console.error(V)}}return F(),Do.exports=Bv(),Do.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 Fd;function kv(){if(Fd)return Vr;Fd=1;var F=Tv(),V=zo(),X=Ov();function U(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 ee(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ae(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 j(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 n(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 u(e){if(ae(e)!==e)throw Error(U(188))}function d(e){var t=e.alternate;if(!t){if(t=ae(e),t===null)throw Error(U(188));return t!==e?null:e}for(var i=e,s=t;;){var f=i.return;if(f===null)break;var g=f.alternate;if(g===null){if(s=f.return,s!==null){i=s;continue}break}if(f.child===g.child){for(g=f.child;g;){if(g===i)return u(f),e;if(g===s)return u(f),t;g=g.sibling}throw Error(U(188))}if(i.return!==s.return)i=f,s=g;else{for(var A=!1,H=f.child;H;){if(H===i){A=!0,i=f,s=g;break}if(H===s){A=!0,s=f,i=g;break}H=H.sibling}if(!A){for(H=g.child;H;){if(H===i){A=!0,i=g,s=f;break}if(H===s){A=!0,s=g,i=f;break}H=H.sibling}if(!A)throw Error(U(189))}}if(i.alternate!==s)throw Error(U(190))}if(i.tag!==3)throw Error(U(188));return i.stateNode.current===i?e:t}function _(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=_(e),t!==null)return t;e=e.sibling}return null}var a=Object.assign,p=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),l=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),v=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),C=Symbol.for("react.activity"),E=Symbol.for("react.memo_cache_sentinel"),R=Symbol.iterator;function L(e){return e===null||typeof e!="object"?null:(e=R&&e[R]||e["@@iterator"],typeof e=="function"?e:null)}var D=Symbol.for("react.client.reference");function O(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===D?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case c:return"Fragment";case h:return"Profiler";case r:return"StrictMode";case x:return"Suspense";case v:return"SuspenseList";case C:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case b:return"Portal";case l:return e.displayName||"Context";case o:return(e._context.displayName||"Context")+".Consumer";case S:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case y:return t=e.displayName||null,t!==null?t:O(e.type)||"Memo";case m:t=e._payload,e=e._init;try{return O(e(t))}catch{}}return null}var $=Array.isArray,I=V.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=X.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z={pending:!1,data:null,method:null,action:null},M=[],B=-1;function T(e){return{current:e}}function k(e){0>B||(e.current=M[B],M[B]=null,B--)}function G(e,t){B++,M[B]=e.current,e.current=t}var K=T(null),ue=T(null),le=T(null),q=T(null);function N(e,t){switch(G(le,t),G(ue,e),G(K,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?id(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=id(t),e=sd(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}k(K),G(K,e)}function ie(){k(K),k(ue),k(le)}function te(e){e.memoizedState!==null&&G(q,e);var t=K.current,i=sd(t,e.type);t!==i&&(G(ue,e),G(K,i))}function ve(e){ue.current===e&&(k(K),k(ue)),q.current===e&&(k(q),$r._currentValue=z)}var fe,Me;function _e(e){if(fe===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);fe=t&&t[1]||"",Me=-1<i.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+fe+e+Me}var Oe=!1;function qe(e,t){if(!e||Oe)return"";Oe=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var de=function(){throw Error()};if(Object.defineProperty(de.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(de,[])}catch(ne){var se=ne}Reflect.construct(e,[],de)}else{try{de.call()}catch(ne){se=ne}e.call(de.prototype)}}else{try{throw Error()}catch(ne){se=ne}(de=e())&&typeof de.catch=="function"&&de.catch(function(){})}}catch(ne){if(ne&&se&&typeof ne.stack=="string")return[ne.stack,se.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=s.DetermineComponentFrameRoot(),A=g[0],H=g[1];if(A&&H){var W=A.split(`
|
|
44
|
+
`),J=H.split(`
|
|
45
|
+
`);for(f=s=0;s<W.length&&!W[s].includes("DetermineComponentFrameRoot");)s++;for(;f<J.length&&!J[f].includes("DetermineComponentFrameRoot");)f++;if(s===W.length||f===J.length)for(s=W.length-1,f=J.length-1;1<=s&&0<=f&&W[s]!==J[f];)f--;for(;1<=s&&0<=f;s--,f--)if(W[s]!==J[f]){if(s!==1||f!==1)do if(s--,f--,0>f||W[s]!==J[f]){var oe=`
|
|
46
|
+
`+W[s].replace(" at new "," at ");return e.displayName&&oe.includes("<anonymous>")&&(oe=oe.replace("<anonymous>",e.displayName)),oe}while(1<=s&&0<=f);break}}}finally{Oe=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?_e(i):""}function we(e,t){switch(e.tag){case 26:case 27:case 5:return _e(e.type);case 16:return _e("Lazy");case 13:return e.child!==t&&t!==null?_e("Suspense Fallback"):_e("Suspense");case 19:return _e("SuspenseList");case 0:case 15:return qe(e.type,!1);case 11:return qe(e.type.render,!1);case 1:return qe(e.type,!0);case 31:return _e("Activity");default:return""}}function ft(e){try{var t="",i=null;do t+=we(e,i),i=e,e=e.return;while(e);return t}catch(s){return`
|
|
47
|
+
Error generating stack: `+s.message+`
|
|
48
|
+
`+s.stack}}var Ot=Object.prototype.hasOwnProperty,Se=F.unstable_scheduleCallback,pe=F.unstable_cancelCallback,me=F.unstable_shouldYield,he=F.unstable_requestPaint,ge=F.unstable_now,ze=F.unstable_getCurrentPriorityLevel,Re=F.unstable_ImmediatePriority,_t=F.unstable_UserBlockingPriority,Qe=F.unstable_NormalPriority,it=F.unstable_LowPriority,Ie=F.unstable_IdlePriority,Ae=F.log,Ee=F.unstable_setDisableYieldValue,xt=null,tt=null;function vt(e){if(typeof Ae=="function"&&Ee(e),tt&&typeof tt.setStrictMode=="function")try{tt.setStrictMode(xt,e)}catch{}}var ut=Math.clz32?Math.clz32:tr,Zt=Math.log,er=Math.LN2;function tr(e){return e>>>=0,e===0?32:31-(Zt(e)/er|0)|0}var Ft=256,si=262144,ri=4194304;function Jt(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 Yr(e,t,i){var s=e.pendingLanes;if(s===0)return 0;var f=0,g=e.suspendedLanes,A=e.pingedLanes;e=e.warmLanes;var H=s&134217727;return H!==0?(s=H&~g,s!==0?f=Jt(s):(A&=H,A!==0?f=Jt(A):i||(i=H&~e,i!==0&&(f=Jt(i))))):(H=s&~g,H!==0?f=Jt(H):A!==0?f=Jt(A):i||(i=s&~e,i!==0&&(f=Jt(i)))),f===0?0:t!==0&&t!==f&&(t&g)===0&&(g=f&-f,i=t&-t,g>=i||g===32&&(i&4194048)!==0)?t:f}function ir(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function df(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 No(){var e=ri;return ri<<=1,(ri&62914560)===0&&(ri=4194304),e}function da(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function sr(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ff(e,t,i,s,f,g){var A=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 H=e.entanglements,W=e.expirationTimes,J=e.hiddenUpdates;for(i=A&~i;0<i;){var oe=31-ut(i),de=1<<oe;H[oe]=0,W[oe]=-1;var se=J[oe];if(se!==null)for(J[oe]=null,oe=0;oe<se.length;oe++){var ne=se[oe];ne!==null&&(ne.lane&=-536870913)}i&=~de}s!==0&&Uo(e,s,0),g!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=g&~(A&~t))}function Uo(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-ut(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|i&261930}function Io(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var s=31-ut(i),f=1<<s;f&t|e[s]&t&&(e[s]|=t),i&=~f}}function Po(e,t){var i=t&-t;return i=(i&42)!==0?1:fa(i),(i&(e.suspendedLanes|t))!==0?0:i}function fa(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 _a(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Fo(){var e=P.p;return e!==0?e:(e=window.event,e===void 0?32:Ld(e.type))}function jo(e,t){var i=P.p;try{return P.p=e,t()}finally{P.p=i}}var Ri=Math.random().toString(36).slice(2),mt="__reactFiber$"+Ri,Lt="__reactProps$"+Ri,gs="__reactContainer$"+Ri,va="__reactEvents$"+Ri,_f="__reactListeners$"+Ri,vf="__reactHandles$"+Ri,$o="__reactResources$"+Ri,rr="__reactMarker$"+Ri;function ga(e){delete e[mt],delete e[Lt],delete e[va],delete e[_f],delete e[vf]}function ps(e){var t=e[mt];if(t)return t;for(var i=e.parentNode;i;){if(t=i[gs]||i[mt]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=hd(e);e!==null;){if(i=e[mt])return i;e=hd(e)}return t}e=i,i=e.parentNode}return null}function ms(e){if(e=e[mt]||e[gs]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function nr(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(U(33))}function Ss(e){var t=e[$o];return t||(t=e[$o]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function gt(e){e[rr]=!0}var qo=new Set,Wo={};function Ji(e,t){Cs(e,t),Cs(e+"Capture",t)}function Cs(e,t){for(Wo[e]=t,e=0;e<t.length;e++)qo.add(t[e])}var gf=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]*$"),Go={},Xo={};function pf(e){return Ot.call(Xo,e)?!0:Ot.call(Go,e)?!1:gf.test(e)?Xo[e]=!0:(Go[e]=!0,!1)}function Kr(e,t,i){if(pf(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 Qr(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 ui(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 jt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Vo(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function mf(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 f=s.get,g=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return f.call(this)},set:function(A){i=""+A,g.call(this,A)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return i},setValue:function(A){i=""+A},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function pa(e){if(!e._valueTracker){var t=Vo(e)?"checked":"value";e._valueTracker=mf(e,t,""+e[t])}}function Yo(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=Vo(e)?e.checked?"true":"false":e.value),e=s,e!==i?(t.setValue(e),!0):!1}function Zr(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 Sf=/[\n"\\]/g;function $t(e){return e.replace(Sf,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ma(e,t,i,s,f,g,A,H){e.name="",A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?e.type=A:e.removeAttribute("type"),t!=null?A==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+jt(t)):e.value!==""+jt(t)&&(e.value=""+jt(t)):A!=="submit"&&A!=="reset"||e.removeAttribute("value"),t!=null?Sa(e,A,jt(t)):i!=null?Sa(e,A,jt(i)):s!=null&&e.removeAttribute("value"),f==null&&g!=null&&(e.defaultChecked=!!g),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),H!=null&&typeof H!="function"&&typeof H!="symbol"&&typeof H!="boolean"?e.name=""+jt(H):e.removeAttribute("name")}function Ko(e,t,i,s,f,g,A,H){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.type=g),t!=null||i!=null){if(!(g!=="submit"&&g!=="reset"||t!=null)){pa(e);return}i=i!=null?""+jt(i):"",t=t!=null?""+jt(t):i,H||t===e.value||(e.value=t),e.defaultValue=t}s=s??f,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=H?e.checked:!!s,e.defaultChecked=!!s,A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"&&(e.name=A),pa(e)}function Sa(e,t,i){t==="number"&&Zr(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function ys(e,t,i,s){if(e=e.options,t){t={};for(var f=0;f<i.length;f++)t["$"+i[f]]=!0;for(i=0;i<e.length;i++)f=t.hasOwnProperty("$"+e[i].value),e[i].selected!==f&&(e[i].selected=f),f&&s&&(e[i].defaultSelected=!0)}else{for(i=""+jt(i),t=null,f=0;f<e.length;f++){if(e[f].value===i){e[f].selected=!0,s&&(e[f].defaultSelected=!0);return}t!==null||e[f].disabled||(t=e[f])}t!==null&&(t.selected=!0)}}function Qo(e,t,i){if(t!=null&&(t=""+jt(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+jt(i):""}function Zo(e,t,i,s){if(t==null){if(s!=null){if(i!=null)throw Error(U(92));if($(s)){if(1<s.length)throw Error(U(93));s=s[0]}i=s}i==null&&(i=""),t=i}i=jt(t),e.defaultValue=i,s=e.textContent,s===i&&s!==""&&s!==null&&(e.value=s),pa(e)}function bs(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var Cf=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 Jo(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||Cf.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function ec(e,t,i){if(t!=null&&typeof t!="object")throw Error(U(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 f in t)s=t[f],t.hasOwnProperty(f)&&i[f]!==s&&Jo(e,f,s)}else for(var g in t)t.hasOwnProperty(g)&&Jo(e,g,t[g])}function Ca(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 yf=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"]]),bf=/^[\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 Jr(e){return bf.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function di(){}var ya=null;function ba(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ws=null,xs=null;function tc(e){var t=ms(e);if(t&&(e=t.stateNode)){var i=e[Lt]||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="'+$t(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var s=i[t];if(s!==e&&s.form===e.form){var f=s[Lt]||null;if(!f)throw Error(U(90));ma(s,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(t=0;t<i.length;t++)s=i[t],s.form===e.form&&Yo(s)}break e;case"textarea":Qo(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&ys(e,!!i.multiple,t,!1)}}}var wa=!1;function ic(e,t,i){if(wa)return e(t,i);wa=!0;try{var s=e(t);return s}finally{if(wa=!1,(ws!==null||xs!==null)&&(Fn(),ws&&(t=ws,e=xs,xs=ws=null,tc(t),e)))for(t=0;t<e.length;t++)tc(e[t])}}function ar(e,t){var i=e.stateNode;if(i===null)return null;var s=i[Lt]||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(U(231,t,typeof i));return i}var fi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),xa=!1;if(fi)try{var lr={};Object.defineProperty(lr,"passive",{get:function(){xa=!0}}),window.addEventListener("test",lr,lr),window.removeEventListener("test",lr,lr)}catch{xa=!1}var Di=null,Ea=null,en=null;function sc(){if(en)return en;var e,t=Ea,i=t.length,s,f="value"in Di?Di.value:Di.textContent,g=f.length;for(e=0;e<i&&t[e]===f[e];e++);var A=i-e;for(s=1;s<=A&&t[i-s]===f[g-s];s++);return en=f.slice(e,1<s?1-s:void 0)}function tn(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 sn(){return!0}function rc(){return!1}function Mt(e){function t(i,s,f,g,A){this._reactName=i,this._targetInst=f,this.type=s,this.nativeEvent=g,this.target=A,this.currentTarget=null;for(var H in e)e.hasOwnProperty(H)&&(i=e[H],this[H]=i?i(g):g[H]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?sn:rc,this.isPropagationStopped=rc,this}return a(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=sn)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=sn)},persist:function(){},isPersistent:sn}),t}var es={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},rn=Mt(es),or=a({},es,{view:0,detail:0}),wf=Mt(or),La,Ma,cr,nn=a({},or,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ra,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!==cr&&(cr&&e.type==="mousemove"?(La=e.screenX-cr.screenX,Ma=e.screenY-cr.screenY):Ma=La=0,cr=e),La)},movementY:function(e){return"movementY"in e?e.movementY:Ma}}),nc=Mt(nn),xf=a({},nn,{dataTransfer:0}),Ef=Mt(xf),Lf=a({},or,{relatedTarget:0}),Aa=Mt(Lf),Mf=a({},es,{animationName:0,elapsedTime:0,pseudoElement:0}),Af=Mt(Mf),Rf=a({},es,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Df=Mt(Rf),Tf=a({},es,{data:0}),ac=Mt(Tf),Bf={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Of={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"},kf={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Hf(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=kf[e])?!!t[e]:!1}function Ra(){return Hf}var zf=a({},or,{key:function(e){if(e.key){var t=Bf[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=tn(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Of[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ra,charCode:function(e){return e.type==="keypress"?tn(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?tn(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Nf=Mt(zf),Uf=a({},nn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),lc=Mt(Uf),If=a({},or,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ra}),Pf=Mt(If),Ff=a({},es,{propertyName:0,elapsedTime:0,pseudoElement:0}),jf=Mt(Ff),$f=a({},nn,{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}),qf=Mt($f),Wf=a({},es,{newState:0,oldState:0}),Gf=Mt(Wf),Xf=[9,13,27,32],Da=fi&&"CompositionEvent"in window,hr=null;fi&&"documentMode"in document&&(hr=document.documentMode);var Vf=fi&&"TextEvent"in window&&!hr,oc=fi&&(!Da||hr&&8<hr&&11>=hr),cc=" ",hc=!1;function uc(e,t){switch(e){case"keyup":return Xf.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function dc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Es=!1;function Yf(e,t){switch(e){case"compositionend":return dc(t);case"keypress":return t.which!==32?null:(hc=!0,cc);case"textInput":return e=t.data,e===cc&&hc?null:e;default:return null}}function Kf(e,t){if(Es)return e==="compositionend"||!Da&&uc(e,t)?(e=sc(),en=Ea=Di=null,Es=!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 oc&&t.locale!=="ko"?null:t.data;default:return null}}var Qf={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 fc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Qf[e.type]:t==="textarea"}function _c(e,t,i,s){ws?xs?xs.push(s):xs=[s]:ws=s,t=Vn(t,"onChange"),0<t.length&&(i=new rn("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var ur=null,dr=null;function Zf(e){Ku(e,0)}function an(e){var t=nr(e);if(Yo(t))return e}function vc(e,t){if(e==="change")return t}var gc=!1;if(fi){var Ta;if(fi){var Ba="oninput"in document;if(!Ba){var pc=document.createElement("div");pc.setAttribute("oninput","return;"),Ba=typeof pc.oninput=="function"}Ta=Ba}else Ta=!1;gc=Ta&&(!document.documentMode||9<document.documentMode)}function mc(){ur&&(ur.detachEvent("onpropertychange",Sc),dr=ur=null)}function Sc(e){if(e.propertyName==="value"&&an(dr)){var t=[];_c(t,dr,e,ba(e)),ic(Zf,t)}}function Jf(e,t,i){e==="focusin"?(mc(),ur=t,dr=i,ur.attachEvent("onpropertychange",Sc)):e==="focusout"&&mc()}function e_(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return an(dr)}function t_(e,t){if(e==="click")return an(t)}function i_(e,t){if(e==="input"||e==="change")return an(t)}function s_(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var kt=typeof Object.is=="function"?Object.is:s_;function fr(e,t){if(kt(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 f=i[s];if(!Ot.call(t,f)||!kt(e[f],t[f]))return!1}return!0}function Cc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function yc(e,t){var i=Cc(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=Cc(i)}}function bc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?bc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function wc(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Zr(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=Zr(e.document)}return t}function Oa(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 r_=fi&&"documentMode"in document&&11>=document.documentMode,Ls=null,ka=null,_r=null,Ha=!1;function xc(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Ha||Ls==null||Ls!==Zr(s)||(s=Ls,"selectionStart"in s&&Oa(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}),_r&&fr(_r,s)||(_r=s,s=Vn(ka,"onSelect"),0<s.length&&(t=new rn("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=Ls)))}function ts(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var Ms={animationend:ts("Animation","AnimationEnd"),animationiteration:ts("Animation","AnimationIteration"),animationstart:ts("Animation","AnimationStart"),transitionrun:ts("Transition","TransitionRun"),transitionstart:ts("Transition","TransitionStart"),transitioncancel:ts("Transition","TransitionCancel"),transitionend:ts("Transition","TransitionEnd")},za={},Ec={};fi&&(Ec=document.createElement("div").style,"AnimationEvent"in window||(delete Ms.animationend.animation,delete Ms.animationiteration.animation,delete Ms.animationstart.animation),"TransitionEvent"in window||delete Ms.transitionend.transition);function is(e){if(za[e])return za[e];if(!Ms[e])return e;var t=Ms[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Ec)return za[e]=t[i];return e}var Lc=is("animationend"),Mc=is("animationiteration"),Ac=is("animationstart"),n_=is("transitionrun"),a_=is("transitionstart"),l_=is("transitioncancel"),Rc=is("transitionend"),Dc=new Map,Na="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(" ");Na.push("scrollEnd");function ei(e,t){Dc.set(e,t),Ji(t,[e])}var ln=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)},qt=[],As=0,Ua=0;function on(){for(var e=As,t=Ua=As=0;t<e;){var i=qt[t];qt[t++]=null;var s=qt[t];qt[t++]=null;var f=qt[t];qt[t++]=null;var g=qt[t];if(qt[t++]=null,s!==null&&f!==null){var A=s.pending;A===null?f.next=f:(f.next=A.next,A.next=f),s.pending=f}g!==0&&Tc(i,f,g)}}function cn(e,t,i,s){qt[As++]=e,qt[As++]=t,qt[As++]=i,qt[As++]=s,Ua|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function Ia(e,t,i,s){return cn(e,t,i,s),hn(e)}function ss(e,t){return cn(e,null,null,t),hn(e)}function Tc(e,t,i){e.lanes|=i;var s=e.alternate;s!==null&&(s.lanes|=i);for(var f=!1,g=e.return;g!==null;)g.childLanes|=i,s=g.alternate,s!==null&&(s.childLanes|=i),g.tag===22&&(e=g.stateNode,e===null||e._visibility&1||(f=!0)),e=g,g=g.return;return e.tag===3?(g=e.stateNode,f&&t!==null&&(f=31-ut(i),e=g.hiddenUpdates,s=e[f],s===null?e[f]=[t]:s.push(t),t.lane=i|536870912),g):null}function hn(e){if(50<zr)throw zr=0,Vl=null,Error(U(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Rs={};function o_(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 Ht(e,t,i,s){return new o_(e,t,i,s)}function Pa(e){return e=e.prototype,!(!e||!e.isReactComponent)}function _i(e,t){var i=e.alternate;return i===null?(i=Ht(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 Bc(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,f,g){var A=0;if(s=e,typeof e=="function")Pa(e)&&(A=1);else if(typeof e=="string")A=fv(e,i,K.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case C:return e=Ht(31,i,t,f),e.elementType=C,e.lanes=g,e;case c:return rs(i.children,f,g,t);case r:A=8,f|=24;break;case h:return e=Ht(12,i,t,f|2),e.elementType=h,e.lanes=g,e;case x:return e=Ht(13,i,t,f),e.elementType=x,e.lanes=g,e;case v:return e=Ht(19,i,t,f),e.elementType=v,e.lanes=g,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case l:A=10;break e;case o:A=9;break e;case S:A=11;break e;case y:A=14;break e;case m:A=16,s=null;break e}A=29,i=Error(U(130,e===null?"null":typeof e,"")),s=null}return t=Ht(A,i,t,f),t.elementType=e,t.type=s,t.lanes=g,t}function rs(e,t,i,s){return e=Ht(7,e,s,t),e.lanes=i,e}function Fa(e,t,i){return e=Ht(6,e,null,t),e.lanes=i,e}function Oc(e){var t=Ht(18,null,null,0);return t.stateNode=e,t}function ja(e,t,i){return t=Ht(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 Wt(e,t){if(typeof e=="object"&&e!==null){var i=kc.get(e);return i!==void 0?i:(t={value:e,source:t,stack:ft(t)},kc.set(e,t),t)}return{value:e,source:t,stack:ft(t)}}var Ds=[],Ts=0,dn=null,vr=0,Gt=[],Xt=0,Ti=null,ni=1,ai="";function vi(e,t){Ds[Ts++]=vr,Ds[Ts++]=dn,dn=e,vr=t}function Hc(e,t,i){Gt[Xt++]=ni,Gt[Xt++]=ai,Gt[Xt++]=Ti,Ti=e;var s=ni;e=ai;var f=32-ut(s)-1;s&=~(1<<f),i+=1;var g=32-ut(t)+f;if(30<g){var A=f-f%5;g=(s&(1<<A)-1).toString(32),s>>=A,f-=A,ni=1<<32-ut(t)+f|i<<f|s,ai=g+e}else ni=1<<g|i<<f|s,ai=e}function $a(e){e.return!==null&&(vi(e,1),Hc(e,1,0))}function qa(e){for(;e===dn;)dn=Ds[--Ts],Ds[Ts]=null,vr=Ds[--Ts],Ds[Ts]=null;for(;e===Ti;)Ti=Gt[--Xt],Gt[Xt]=null,ai=Gt[--Xt],Gt[Xt]=null,ni=Gt[--Xt],Gt[Xt]=null}function zc(e,t){Gt[Xt++]=ni,Gt[Xt++]=ai,Gt[Xt++]=Ti,ni=t.id,ai=t.overflow,Ti=e}var St=null,Ze=null,Pe=!1,Bi=null,Vt=!1,Wa=Error(U(519));function Oi(e){var t=Error(U(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw gr(Wt(t,e)),Wa}function Nc(e){var t=e.stateNode,i=e.type,s=e.memoizedProps;switch(t[mt]=e,t[Lt]=s,i){case"dialog":He("cancel",t),He("close",t);break;case"iframe":case"object":case"embed":He("load",t);break;case"video":case"audio":for(i=0;i<Ur.length;i++)He(Ur[i],t);break;case"source":He("error",t);break;case"img":case"image":case"link":He("error",t),He("load",t);break;case"details":He("toggle",t);break;case"input":He("invalid",t),Ko(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":He("invalid",t);break;case"textarea":He("invalid",t),Zo(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||ed(t.textContent,i)?(s.popover!=null&&(He("beforetoggle",t),He("toggle",t)),s.onScroll!=null&&He("scroll",t),s.onScrollEnd!=null&&He("scrollend",t),s.onClick!=null&&(t.onclick=di),t=!0):t=!1,t||Oi(e,!0)}function Uc(e){for(St=e.return;St;)switch(St.tag){case 5:case 31:case 13:Vt=!1;return;case 27:case 3:Vt=!0;return;default:St=St.return}}function Bs(e){if(e!==St)return!1;if(!Pe)return Uc(e),Pe=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||co(e.type,e.memoizedProps)),i=!i),i&&Ze&&Oi(e),Uc(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(317));Ze=cd(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(317));Ze=cd(e)}else t===27?(t=Ze,Xi(e.type)?(e=vo,vo=null,Ze=e):Ze=t):Ze=St?Kt(e.stateNode.nextSibling):null;return!0}function ns(){Ze=St=null,Pe=!1}function Ga(){var e=Bi;return e!==null&&(Tt===null?Tt=e:Tt.push.apply(Tt,e),Bi=null),e}function gr(e){Bi===null?Bi=[e]:Bi.push(e)}var Xa=T(null),as=null,gi=null;function ki(e,t,i){G(Xa,t._currentValue),t._currentValue=i}function pi(e){e._currentValue=Xa.current,k(Xa)}function Va(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 Ya(e,t,i,s){var f=e.child;for(f!==null&&(f.return=e);f!==null;){var g=f.dependencies;if(g!==null){var A=f.child;g=g.firstContext;e:for(;g!==null;){var H=g;g=f;for(var W=0;W<t.length;W++)if(H.context===t[W]){g.lanes|=i,H=g.alternate,H!==null&&(H.lanes|=i),Va(g.return,i,e),s||(A=null);break e}g=H.next}}else if(f.tag===18){if(A=f.return,A===null)throw Error(U(341));A.lanes|=i,g=A.alternate,g!==null&&(g.lanes|=i),Va(A,i,e),A=null}else A=f.child;if(A!==null)A.return=f;else for(A=f;A!==null;){if(A===e){A=null;break}if(f=A.sibling,f!==null){f.return=A.return,A=f;break}A=A.return}f=A}}function Os(e,t,i,s){e=null;for(var f=t,g=!1;f!==null;){if(!g){if((f.flags&524288)!==0)g=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var A=f.alternate;if(A===null)throw Error(U(387));if(A=A.memoizedProps,A!==null){var H=f.type;kt(f.pendingProps.value,A.value)||(e!==null?e.push(H):e=[H])}}else if(f===q.current){if(A=f.alternate,A===null)throw Error(U(387));A.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(e!==null?e.push($r):e=[$r])}f=f.return}e!==null&&Ya(t,e,i,s),t.flags|=262144}function fn(e){for(e=e.firstContext;e!==null;){if(!kt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ls(e){as=e,gi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ct(e){return Ic(as,e)}function _n(e,t){return as===null&&ls(e),Ic(e,t)}function Ic(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},gi===null){if(e===null)throw Error(U(308));gi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else gi=gi.next=t;return i}var c_=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()})}},h_=F.unstable_scheduleCallback,u_=F.unstable_NormalPriority,lt={$$typeof:l,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ka(){return{controller:new c_,data:new Map,refCount:0}}function pr(e){e.refCount--,e.refCount===0&&h_(u_,function(){e.controller.abort()})}var mr=null,Qa=0,ks=0,Hs=null;function d_(e,t){if(mr===null){var i=mr=[];Qa=0,ks=eo(),Hs={status:"pending",value:void 0,then:function(s){i.push(s)}}}return Qa++,t.then(Pc,Pc),t}function Pc(){if(--Qa===0&&mr!==null){Hs!==null&&(Hs.status="fulfilled");var e=mr;mr=null,ks=0,Hs=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function f_(e,t){var i=[],s={status:"pending",value:null,reason:null,then:function(f){i.push(f)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var f=0;f<i.length;f++)(0,i[f])(t)},function(f){for(s.status="rejected",s.reason=f,f=0;f<i.length;f++)(0,i[f])(void 0)}),s}var Fc=I.S;I.S=function(e,t){xu=ge(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&d_(e,t),Fc!==null&&Fc(e,t)};var os=T(null);function Za(){var e=os.current;return e!==null?e:Ke.pooledCache}function vn(e,t){t===null?G(os,os.current):G(os,t.pool)}function jc(){var e=Za();return e===null?null:{parent:lt._currentValue,pool:e}}var zs=Error(U(460)),Ja=Error(U(474)),gn=Error(U(542)),pn={then:function(){}};function $c(e){return e=e.status,e==="fulfilled"||e==="rejected"}function qc(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(di,di),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Gc(e),e;default:if(typeof t.status=="string")t.then(di,di);else{if(e=Ke,e!==null&&100<e.shellSuspendCounter)throw Error(U(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var f=t;f.status="fulfilled",f.value=s}},function(s){if(t.status==="pending"){var f=t;f.status="rejected",f.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Gc(e),e}throw hs=t,zs}}function cs(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(hs=i,zs):i}}var hs=null;function Wc(){if(hs===null)throw Error(U(459));var e=hs;return hs=null,e}function Gc(e){if(e===zs||e===gn)throw Error(U(483))}var Ns=null,Sr=0;function mn(e){var t=Sr;return Sr+=1,Ns===null&&(Ns=[]),qc(Ns,e,t)}function Cr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Sn(e,t){throw t.$$typeof===p?Error(U(525)):(e=Object.prototype.toString.call(t),Error(U(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Xc(e){function t(Q,Y){if(e){var Z=Q.deletions;Z===null?(Q.deletions=[Y],Q.flags|=16):Z.push(Y)}}function i(Q,Y){if(!e)return null;for(;Y!==null;)t(Q,Y),Y=Y.sibling;return null}function s(Q){for(var Y=new Map;Q!==null;)Q.key!==null?Y.set(Q.key,Q):Y.set(Q.index,Q),Q=Q.sibling;return Y}function f(Q,Y){return Q=_i(Q,Y),Q.index=0,Q.sibling=null,Q}function g(Q,Y,Z){return Q.index=Z,e?(Z=Q.alternate,Z!==null?(Z=Z.index,Z<Y?(Q.flags|=67108866,Y):Z):(Q.flags|=67108866,Y)):(Q.flags|=1048576,Y)}function A(Q){return e&&Q.alternate===null&&(Q.flags|=67108866),Q}function H(Q,Y,Z,ce){return Y===null||Y.tag!==6?(Y=Fa(Z,Q.mode,ce),Y.return=Q,Y):(Y=f(Y,Z),Y.return=Q,Y)}function W(Q,Y,Z,ce){var xe=Z.type;return xe===c?oe(Q,Y,Z.props.children,ce,Z.key):Y!==null&&(Y.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===m&&cs(xe)===Y.type)?(Y=f(Y,Z.props),Cr(Y,Z),Y.return=Q,Y):(Y=un(Z.type,Z.key,Z.props,null,Q.mode,ce),Cr(Y,Z),Y.return=Q,Y)}function J(Q,Y,Z,ce){return Y===null||Y.tag!==4||Y.stateNode.containerInfo!==Z.containerInfo||Y.stateNode.implementation!==Z.implementation?(Y=ja(Z,Q.mode,ce),Y.return=Q,Y):(Y=f(Y,Z.children||[]),Y.return=Q,Y)}function oe(Q,Y,Z,ce,xe){return Y===null||Y.tag!==7?(Y=rs(Z,Q.mode,ce,xe),Y.return=Q,Y):(Y=f(Y,Z),Y.return=Q,Y)}function de(Q,Y,Z){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return Y=Fa(""+Y,Q.mode,Z),Y.return=Q,Y;if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case w:return Z=un(Y.type,Y.key,Y.props,null,Q.mode,Z),Cr(Z,Y),Z.return=Q,Z;case b:return Y=ja(Y,Q.mode,Z),Y.return=Q,Y;case m:return Y=cs(Y),de(Q,Y,Z)}if($(Y)||L(Y))return Y=rs(Y,Q.mode,Z,null),Y.return=Q,Y;if(typeof Y.then=="function")return de(Q,mn(Y),Z);if(Y.$$typeof===l)return de(Q,_n(Q,Y),Z);Sn(Q,Y)}return null}function se(Q,Y,Z,ce){var xe=Y!==null?Y.key:null;if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return xe!==null?null:H(Q,Y,""+Z,ce);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case w:return Z.key===xe?W(Q,Y,Z,ce):null;case b:return Z.key===xe?J(Q,Y,Z,ce):null;case m:return Z=cs(Z),se(Q,Y,Z,ce)}if($(Z)||L(Z))return xe!==null?null:oe(Q,Y,Z,ce,null);if(typeof Z.then=="function")return se(Q,Y,mn(Z),ce);if(Z.$$typeof===l)return se(Q,Y,_n(Q,Z),ce);Sn(Q,Z)}return null}function ne(Q,Y,Z,ce,xe){if(typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint")return Q=Q.get(Z)||null,H(Y,Q,""+ce,xe);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case w:return Q=Q.get(ce.key===null?Z:ce.key)||null,W(Y,Q,ce,xe);case b:return Q=Q.get(ce.key===null?Z:ce.key)||null,J(Y,Q,ce,xe);case m:return ce=cs(ce),ne(Q,Y,Z,ce,xe)}if($(ce)||L(ce))return Q=Q.get(Z)||null,oe(Y,Q,ce,xe,null);if(typeof ce.then=="function")return ne(Q,Y,Z,mn(ce),xe);if(ce.$$typeof===l)return ne(Q,Y,Z,_n(Y,ce),xe);Sn(Y,ce)}return null}function Ce(Q,Y,Z,ce){for(var xe=null,Fe=null,ye=Y,Be=Y=0,Ue=null;ye!==null&&Be<Z.length;Be++){ye.index>Be?(Ue=ye,ye=null):Ue=ye.sibling;var je=se(Q,ye,Z[Be],ce);if(je===null){ye===null&&(ye=Ue);break}e&&ye&&je.alternate===null&&t(Q,ye),Y=g(je,Y,Be),Fe===null?xe=je:Fe.sibling=je,Fe=je,ye=Ue}if(Be===Z.length)return i(Q,ye),Pe&&vi(Q,Be),xe;if(ye===null){for(;Be<Z.length;Be++)ye=de(Q,Z[Be],ce),ye!==null&&(Y=g(ye,Y,Be),Fe===null?xe=ye:Fe.sibling=ye,Fe=ye);return Pe&&vi(Q,Be),xe}for(ye=s(ye);Be<Z.length;Be++)Ue=ne(ye,Q,Be,Z[Be],ce),Ue!==null&&(e&&Ue.alternate!==null&&ye.delete(Ue.key===null?Be:Ue.key),Y=g(Ue,Y,Be),Fe===null?xe=Ue:Fe.sibling=Ue,Fe=Ue);return e&&ye.forEach(function(Zi){return t(Q,Zi)}),Pe&&vi(Q,Be),xe}function Le(Q,Y,Z,ce){if(Z==null)throw Error(U(151));for(var xe=null,Fe=null,ye=Y,Be=Y=0,Ue=null,je=Z.next();ye!==null&&!je.done;Be++,je=Z.next()){ye.index>Be?(Ue=ye,ye=null):Ue=ye.sibling;var Zi=se(Q,ye,je.value,ce);if(Zi===null){ye===null&&(ye=Ue);break}e&&ye&&Zi.alternate===null&&t(Q,ye),Y=g(Zi,Y,Be),Fe===null?xe=Zi:Fe.sibling=Zi,Fe=Zi,ye=Ue}if(je.done)return i(Q,ye),Pe&&vi(Q,Be),xe;if(ye===null){for(;!je.done;Be++,je=Z.next())je=de(Q,je.value,ce),je!==null&&(Y=g(je,Y,Be),Fe===null?xe=je:Fe.sibling=je,Fe=je);return Pe&&vi(Q,Be),xe}for(ye=s(ye);!je.done;Be++,je=Z.next())je=ne(ye,Q,Be,je.value,ce),je!==null&&(e&&je.alternate!==null&&ye.delete(je.key===null?Be:je.key),Y=g(je,Y,Be),Fe===null?xe=je:Fe.sibling=je,Fe=je);return e&&ye.forEach(function(xv){return t(Q,xv)}),Pe&&vi(Q,Be),xe}function Ye(Q,Y,Z,ce){if(typeof Z=="object"&&Z!==null&&Z.type===c&&Z.key===null&&(Z=Z.props.children),typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case w:e:{for(var xe=Z.key;Y!==null;){if(Y.key===xe){if(xe=Z.type,xe===c){if(Y.tag===7){i(Q,Y.sibling),ce=f(Y,Z.props.children),ce.return=Q,Q=ce;break e}}else if(Y.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===m&&cs(xe)===Y.type){i(Q,Y.sibling),ce=f(Y,Z.props),Cr(ce,Z),ce.return=Q,Q=ce;break e}i(Q,Y);break}else t(Q,Y);Y=Y.sibling}Z.type===c?(ce=rs(Z.props.children,Q.mode,ce,Z.key),ce.return=Q,Q=ce):(ce=un(Z.type,Z.key,Z.props,null,Q.mode,ce),Cr(ce,Z),ce.return=Q,Q=ce)}return A(Q);case b:e:{for(xe=Z.key;Y!==null;){if(Y.key===xe)if(Y.tag===4&&Y.stateNode.containerInfo===Z.containerInfo&&Y.stateNode.implementation===Z.implementation){i(Q,Y.sibling),ce=f(Y,Z.children||[]),ce.return=Q,Q=ce;break e}else{i(Q,Y);break}else t(Q,Y);Y=Y.sibling}ce=ja(Z,Q.mode,ce),ce.return=Q,Q=ce}return A(Q);case m:return Z=cs(Z),Ye(Q,Y,Z,ce)}if($(Z))return Ce(Q,Y,Z,ce);if(L(Z)){if(xe=L(Z),typeof xe!="function")throw Error(U(150));return Z=xe.call(Z),Le(Q,Y,Z,ce)}if(typeof Z.then=="function")return Ye(Q,Y,mn(Z),ce);if(Z.$$typeof===l)return Ye(Q,Y,_n(Q,Z),ce);Sn(Q,Z)}return typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint"?(Z=""+Z,Y!==null&&Y.tag===6?(i(Q,Y.sibling),ce=f(Y,Z),ce.return=Q,Q=ce):(i(Q,Y),ce=Fa(Z,Q.mode,ce),ce.return=Q,Q=ce),A(Q)):i(Q,Y)}return function(Q,Y,Z,ce){try{Sr=0;var xe=Ye(Q,Y,Z,ce);return Ns=null,xe}catch(ye){if(ye===zs||ye===gn)throw ye;var Fe=Ht(29,ye,null,Q.mode);return Fe.lanes=ce,Fe.return=Q,Fe}finally{}}}var us=Xc(!0),Vc=Xc(!1),Hi=!1;function el(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function tl(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 zi(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ni(e,t,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,($e&2)!==0){var f=s.pending;return f===null?t.next=t:(t.next=f.next,f.next=t),s.pending=t,t=hn(e),Tc(e,null,i),t}return cn(e,s,t,i),hn(e)}function yr(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,Io(e,i)}}function il(e,t){var i=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,i===s)){var f=null,g=null;if(i=i.firstBaseUpdate,i!==null){do{var A={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};g===null?f=g=A:g=g.next=A,i=i.next}while(i!==null);g===null?f=g=t:g=g.next=t}else f=g=t;i={baseState:s.baseState,firstBaseUpdate:f,lastBaseUpdate:g,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 sl=!1;function br(){if(sl){var e=Hs;if(e!==null)throw e}}function wr(e,t,i,s){sl=!1;var f=e.updateQueue;Hi=!1;var g=f.firstBaseUpdate,A=f.lastBaseUpdate,H=f.shared.pending;if(H!==null){f.shared.pending=null;var W=H,J=W.next;W.next=null,A===null?g=J:A.next=J,A=W;var oe=e.alternate;oe!==null&&(oe=oe.updateQueue,H=oe.lastBaseUpdate,H!==A&&(H===null?oe.firstBaseUpdate=J:H.next=J,oe.lastBaseUpdate=W))}if(g!==null){var de=f.baseState;A=0,oe=J=W=null,H=g;do{var se=H.lane&-536870913,ne=se!==H.lane;if(ne?(Ne&se)===se:(s&se)===se){se!==0&&se===ks&&(sl=!0),oe!==null&&(oe=oe.next={lane:0,tag:H.tag,payload:H.payload,callback:null,next:null});e:{var Ce=e,Le=H;se=t;var Ye=i;switch(Le.tag){case 1:if(Ce=Le.payload,typeof Ce=="function"){de=Ce.call(Ye,de,se);break e}de=Ce;break e;case 3:Ce.flags=Ce.flags&-65537|128;case 0:if(Ce=Le.payload,se=typeof Ce=="function"?Ce.call(Ye,de,se):Ce,se==null)break e;de=a({},de,se);break e;case 2:Hi=!0}}se=H.callback,se!==null&&(e.flags|=64,ne&&(e.flags|=8192),ne=f.callbacks,ne===null?f.callbacks=[se]:ne.push(se))}else ne={lane:se,tag:H.tag,payload:H.payload,callback:H.callback,next:null},oe===null?(J=oe=ne,W=de):oe=oe.next=ne,A|=se;if(H=H.next,H===null){if(H=f.shared.pending,H===null)break;ne=H,H=ne.next,ne.next=null,f.lastBaseUpdate=ne,f.shared.pending=null}}while(!0);oe===null&&(W=de),f.baseState=W,f.firstBaseUpdate=J,f.lastBaseUpdate=oe,g===null&&(f.shared.lanes=0),ji|=A,e.lanes=A,e.memoizedState=de}}function Yc(e,t){if(typeof e!="function")throw Error(U(191,e));e.call(t)}function Kc(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Yc(i[e],t)}var Us=T(null),Cn=T(0);function Qc(e,t){e=Li,G(Cn,e),G(Us,t),Li=e|t.baseLanes}function rl(){G(Cn,Li),G(Us,Us.current)}function nl(){Li=Cn.current,k(Us),k(Cn)}var zt=T(null),Yt=null;function Ui(e){var t=e.alternate;G(nt,nt.current&1),G(zt,e),Yt===null&&(t===null||Us.current!==null||t.memoizedState!==null)&&(Yt=e)}function al(e){G(nt,nt.current),G(zt,e),Yt===null&&(Yt=e)}function Zc(e){e.tag===22?(G(nt,nt.current),G(zt,e),Yt===null&&(Yt=e)):Ii()}function Ii(){G(nt,nt.current),G(zt,zt.current)}function Nt(e){k(zt),Yt===e&&(Yt=null),k(nt)}var nt=T(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||fo(i)||_o(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 mi=0,Te=null,Xe=null,ot=null,bn=!1,Is=!1,ds=!1,wn=0,xr=0,Ps=null,__=0;function st(){throw Error(U(321))}function ll(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!kt(e[i],t[i]))return!1;return!0}function ol(e,t,i,s,f,g){return mi=g,Te=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,I.H=e===null||e.memoizedState===null?Hh:wl,ds=!1,g=i(s,f),ds=!1,Is&&(g=eh(t,i,s,f)),Jc(e),g}function Jc(e){I.H=Mr;var t=Xe!==null&&Xe.next!==null;if(mi=0,ot=Xe=Te=null,bn=!1,xr=0,Ps=null,t)throw Error(U(300));e===null||ct||(e=e.dependencies,e!==null&&fn(e)&&(ct=!0))}function eh(e,t,i,s){Te=e;var f=0;do{if(Is&&(Ps=null),xr=0,Is=!1,25<=f)throw Error(U(301));if(f+=1,ot=Xe=null,e.updateQueue!=null){var g=e.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}I.H=zh,g=t(i,s)}while(Is);return g}function v_(){var e=I.H,t=e.useState()[0];return t=typeof t.then=="function"?Er(t):t,e=e.useState()[0],(Xe!==null?Xe.memoizedState:null)!==e&&(Te.flags|=1024),t}function cl(){var e=wn!==0;return wn=0,e}function hl(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function ul(e){if(bn){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}bn=!1}mi=0,ot=Xe=Te=null,Is=!1,xr=wn=0,Ps=null}function Et(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ot===null?Te.memoizedState=ot=e:ot=ot.next=e,ot}function at(){if(Xe===null){var e=Te.alternate;e=e!==null?e.memoizedState:null}else e=Xe.next;var t=ot===null?Te.memoizedState:ot.next;if(t!==null)ot=t,Xe=e;else{if(e===null)throw Te.alternate===null?Error(U(467)):Error(U(310));Xe=e,e={memoizedState:Xe.memoizedState,baseState:Xe.baseState,baseQueue:Xe.baseQueue,queue:Xe.queue,next:null},ot===null?Te.memoizedState=ot=e:ot=ot.next=e}return ot}function xn(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Er(e){var t=xr;return xr+=1,Ps===null&&(Ps=[]),e=qc(Ps,e,t),t=Te,(ot===null?t.memoizedState:ot.next)===null&&(t=t.alternate,I.H=t===null||t.memoizedState===null?Hh:wl),e}function En(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Er(e);if(e.$$typeof===l)return Ct(e)}throw Error(U(438,String(e)))}function dl(e){var t=null,i=Te.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var s=Te.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(f){return f.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=xn(),Te.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]=E;return t.index++,i}function Si(e,t){return typeof t=="function"?t(e):t}function Ln(e){var t=at();return fl(t,Xe,e)}function fl(e,t,i){var s=e.queue;if(s===null)throw Error(U(311));s.lastRenderedReducer=i;var f=e.baseQueue,g=s.pending;if(g!==null){if(f!==null){var A=f.next;f.next=g.next,g.next=A}t.baseQueue=f=g,s.pending=null}if(g=e.baseState,f===null)e.memoizedState=g;else{t=f.next;var H=A=null,W=null,J=t,oe=!1;do{var de=J.lane&-536870913;if(de!==J.lane?(Ne&de)===de:(mi&de)===de){var se=J.revertLane;if(se===0)W!==null&&(W=W.next={lane:0,revertLane:0,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null}),de===ks&&(oe=!0);else if((mi&se)===se){J=J.next,se===ks&&(oe=!0);continue}else de={lane:0,revertLane:J.revertLane,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},W===null?(H=W=de,A=g):W=W.next=de,Te.lanes|=se,ji|=se;de=J.action,ds&&i(g,de),g=J.hasEagerState?J.eagerState:i(g,de)}else se={lane:de,revertLane:J.revertLane,gesture:J.gesture,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},W===null?(H=W=se,A=g):W=W.next=se,Te.lanes|=de,ji|=de;J=J.next}while(J!==null&&J!==t);if(W===null?A=g:W.next=H,!kt(g,e.memoizedState)&&(ct=!0,oe&&(i=Hs,i!==null)))throw i;e.memoizedState=g,e.baseState=A,e.baseQueue=W,s.lastRenderedState=g}return f===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function _l(e){var t=at(),i=t.queue;if(i===null)throw Error(U(311));i.lastRenderedReducer=e;var s=i.dispatch,f=i.pending,g=t.memoizedState;if(f!==null){i.pending=null;var A=f=f.next;do g=e(g,A.action),A=A.next;while(A!==f);kt(g,t.memoizedState)||(ct=!0),t.memoizedState=g,t.baseQueue===null&&(t.baseState=g),i.lastRenderedState=g}return[g,s]}function th(e,t,i){var s=Te,f=at(),g=Pe;if(g){if(i===void 0)throw Error(U(407));i=i()}else i=t();var A=!kt((Xe||f).memoizedState,i);if(A&&(f.memoizedState=i,ct=!0),f=f.queue,pl(rh.bind(null,s,f,e),[e]),f.getSnapshot!==t||A||ot!==null&&ot.memoizedState.tag&1){if(s.flags|=2048,Fs(9,{destroy:void 0},sh.bind(null,s,f,i,t),null),Ke===null)throw Error(U(349));g||(mi&127)!==0||ih(s,t,i)}return i}function ih(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=Te.updateQueue,t===null?(t=xn(),Te.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function sh(e,t,i,s){t.value=i,t.getSnapshot=s,nh(t)&&ah(e)}function rh(e,t,i){return i(function(){nh(t)&&ah(e)})}function nh(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!kt(e,i)}catch{return!0}}function ah(e){var t=ss(e,2);t!==null&&Bt(t,e,2)}function vl(e){var t=Et();if(typeof e=="function"){var i=e;if(e=i(),ds){vt(!0);try{i()}finally{vt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Si,lastRenderedState:e},t}function lh(e,t,i,s){return e.baseState=i,fl(e,Xe,typeof s=="function"?s:Si)}function g_(e,t,i,s,f){if(Rn(e))throw Error(U(485));if(e=t.action,e!==null){var g={payload:f,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(A){g.listeners.push(A)}};I.T!==null?i(!0):g.isTransition=!1,s(g),i=t.pending,i===null?(g.next=t.pending=g,oh(t,g)):(g.next=i.next,t.pending=i.next=g)}}function oh(e,t){var i=t.action,s=t.payload,f=e.state;if(t.isTransition){var g=I.T,A={};I.T=A;try{var H=i(f,s),W=I.S;W!==null&&W(A,H),ch(e,t,H)}catch(J){gl(e,t,J)}finally{g!==null&&A.types!==null&&(g.types=A.types),I.T=g}}else try{g=i(f,s),ch(e,t,g)}catch(J){gl(e,t,J)}}function ch(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){hh(e,t,s)},function(s){return gl(e,t,s)}):hh(e,t,i)}function hh(e,t,i){t.status="fulfilled",t.value=i,uh(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,oh(e,i)))}function gl(e,t,i){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=i,uh(t),t=t.next;while(t!==s)}e.action=null}function uh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function dh(e,t){return t}function fh(e,t){if(Pe){var i=Ke.formState;if(i!==null){e:{var s=Te;if(Pe){if(Ze){t:{for(var f=Ze,g=Vt;f.nodeType!==8;){if(!g){f=null;break t}if(f=Kt(f.nextSibling),f===null){f=null;break t}}g=f.data,f=g==="F!"||g==="F"?f:null}if(f){Ze=Kt(f.nextSibling),s=f.data==="F!";break e}}Oi(s)}s=!1}s&&(t=i[0])}}return i=Et(),i.memoizedState=i.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:dh,lastRenderedState:t},i.queue=s,i=Bh.bind(null,Te,s),s.dispatch=i,s=vl(!1),g=bl.bind(null,Te,!1,s.queue),s=Et(),f={state:t,dispatch:null,action:e,pending:null},s.queue=f,i=g_.bind(null,Te,f,g,i),f.dispatch=i,s.memoizedState=e,[t,i,!1]}function _h(e){var t=at();return vh(t,Xe,e)}function vh(e,t,i){if(t=fl(e,t,dh)[0],e=Ln(Si)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=Er(t)}catch(A){throw A===zs?gn:A}else s=t;t=at();var f=t.queue,g=f.dispatch;return i!==t.memoizedState&&(Te.flags|=2048,Fs(9,{destroy:void 0},p_.bind(null,f,i),null)),[s,g,e]}function p_(e,t){e.action=t}function gh(e){var t=at(),i=Xe;if(i!==null)return vh(t,i,e);at(),t=t.memoizedState,i=at();var s=i.queue.dispatch;return i.memoizedState=e,[t,s,!1]}function Fs(e,t,i,s){return e={tag:e,create:i,deps:s,inst:t,next:null},t=Te.updateQueue,t===null&&(t=xn(),Te.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 ph(){return at().memoizedState}function Mn(e,t,i,s){var f=Et();Te.flags|=e,f.memoizedState=Fs(1|t,{destroy:void 0},i,s===void 0?null:s)}function An(e,t,i,s){var f=at();s=s===void 0?null:s;var g=f.memoizedState.inst;Xe!==null&&s!==null&&ll(s,Xe.memoizedState.deps)?f.memoizedState=Fs(t,g,i,s):(Te.flags|=e,f.memoizedState=Fs(1|t,g,i,s))}function mh(e,t){Mn(8390656,8,e,t)}function pl(e,t){An(2048,8,e,t)}function m_(e){Te.flags|=4;var t=Te.updateQueue;if(t===null)t=xn(),Te.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function Sh(e){var t=at().memoizedState;return m_({ref:t,nextImpl:e}),function(){if(($e&2)!==0)throw Error(U(440));return t.impl.apply(void 0,arguments)}}function Ch(e,t){return An(4,2,e,t)}function yh(e,t){return An(4,4,e,t)}function bh(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 wh(e,t,i){i=i!=null?i.concat([e]):null,An(4,4,bh.bind(null,t,e),i)}function ml(){}function xh(e,t){var i=at();t=t===void 0?null:t;var s=i.memoizedState;return t!==null&&ll(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function Eh(e,t){var i=at();t=t===void 0?null:t;var s=i.memoizedState;if(t!==null&&ll(t,s[1]))return s[0];if(s=e(),ds){vt(!0);try{e()}finally{vt(!1)}}return i.memoizedState=[s,t],s}function Sl(e,t,i){return i===void 0||(mi&1073741824)!==0&&(Ne&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=Lu(),Te.lanes|=e,ji|=e,i)}function Lh(e,t,i,s){return kt(i,t)?i:Us.current!==null?(e=Sl(e,i,s),kt(e,t)||(ct=!0),e):(mi&42)===0||(mi&1073741824)!==0&&(Ne&261930)===0?(ct=!0,e.memoizedState=i):(e=Lu(),Te.lanes|=e,ji|=e,t)}function Mh(e,t,i,s,f){var g=P.p;P.p=g!==0&&8>g?g:8;var A=I.T,H={};I.T=H,bl(e,!1,t,i);try{var W=f(),J=I.S;if(J!==null&&J(H,W),W!==null&&typeof W=="object"&&typeof W.then=="function"){var oe=f_(W,s);Lr(e,t,oe,Pt(e))}else Lr(e,t,s,Pt(e))}catch(de){Lr(e,t,{then:function(){},status:"rejected",reason:de},Pt())}finally{P.p=g,A!==null&&H.types!==null&&(A.types=H.types),I.T=A}}function S_(){}function Cl(e,t,i,s){if(e.tag!==5)throw Error(U(476));var f=Ah(e).queue;Mh(e,f,t,z,i===null?S_:function(){return Rh(e),i(s)})}function Ah(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:z,baseState:z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Si,lastRenderedState:z},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Si,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Rh(e){var t=Ah(e);t.next===null&&(t=e.alternate.memoizedState),Lr(e,t.next.queue,{},Pt())}function yl(){return Ct($r)}function Dh(){return at().memoizedState}function Th(){return at().memoizedState}function C_(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=Pt();e=zi(i);var s=Ni(t,e,i);s!==null&&(Bt(s,t,i),yr(s,t,i)),t={cache:Ka()},e.payload=t;return}t=t.return}}function y_(e,t,i){var s=Pt();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Rn(e)?Oh(t,i):(i=Ia(e,t,i,s),i!==null&&(Bt(i,e,s),kh(i,t,s)))}function Bh(e,t,i){var s=Pt();Lr(e,t,i,s)}function Lr(e,t,i,s){var f={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Rn(e))Oh(t,f);else{var g=e.alternate;if(e.lanes===0&&(g===null||g.lanes===0)&&(g=t.lastRenderedReducer,g!==null))try{var A=t.lastRenderedState,H=g(A,i);if(f.hasEagerState=!0,f.eagerState=H,kt(H,A))return cn(e,t,f,0),Ke===null&&on(),!1}catch{}finally{}if(i=Ia(e,t,f,s),i!==null)return Bt(i,e,s),kh(i,t,s),!0}return!1}function bl(e,t,i,s){if(s={lane:2,revertLane:eo(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Rn(e)){if(t)throw Error(U(479))}else t=Ia(e,i,s,2),t!==null&&Bt(t,e,2)}function Rn(e){var t=e.alternate;return e===Te||t!==null&&t===Te}function Oh(e,t){Is=bn=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function kh(e,t,i){if((i&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,Io(e,i)}}var Mr={readContext:Ct,use:En,useCallback:st,useContext:st,useEffect:st,useImperativeHandle:st,useLayoutEffect:st,useInsertionEffect:st,useMemo:st,useReducer:st,useRef:st,useState:st,useDebugValue:st,useDeferredValue:st,useTransition:st,useSyncExternalStore:st,useId:st,useHostTransitionStatus:st,useFormState:st,useActionState:st,useOptimistic:st,useMemoCache:st,useCacheRefresh:st};Mr.useEffectEvent=st;var Hh={readContext:Ct,use:En,useCallback:function(e,t){return Et().memoizedState=[e,t===void 0?null:t],e},useContext:Ct,useEffect:mh,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,Mn(4194308,4,bh.bind(null,t,e),i)},useLayoutEffect:function(e,t){return Mn(4194308,4,e,t)},useInsertionEffect:function(e,t){Mn(4,2,e,t)},useMemo:function(e,t){var i=Et();t=t===void 0?null:t;var s=e();if(ds){vt(!0);try{e()}finally{vt(!1)}}return i.memoizedState=[s,t],s},useReducer:function(e,t,i){var s=Et();if(i!==void 0){var f=i(t);if(ds){vt(!0);try{i(t)}finally{vt(!1)}}}else f=t;return s.memoizedState=s.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},s.queue=e,e=e.dispatch=y_.bind(null,Te,e),[s.memoizedState,e]},useRef:function(e){var t=Et();return e={current:e},t.memoizedState=e},useState:function(e){e=vl(e);var t=e.queue,i=Bh.bind(null,Te,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:ml,useDeferredValue:function(e,t){var i=Et();return Sl(i,e,t)},useTransition:function(){var e=vl(!1);return e=Mh.bind(null,Te,e.queue,!0,!1),Et().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var s=Te,f=Et();if(Pe){if(i===void 0)throw Error(U(407));i=i()}else{if(i=t(),Ke===null)throw Error(U(349));(Ne&127)!==0||ih(s,t,i)}f.memoizedState=i;var g={value:i,getSnapshot:t};return f.queue=g,mh(rh.bind(null,s,g,e),[e]),s.flags|=2048,Fs(9,{destroy:void 0},sh.bind(null,s,g,i,t),null),i},useId:function(){var e=Et(),t=Ke.identifierPrefix;if(Pe){var i=ai,s=ni;i=(s&~(1<<32-ut(s)-1)).toString(32)+i,t="_"+t+"R_"+i,i=wn++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=__++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:yl,useFormState:fh,useActionState:fh,useOptimistic:function(e){var t=Et();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=bl.bind(null,Te,!0,i),i.dispatch=t,[e,t]},useMemoCache:dl,useCacheRefresh:function(){return Et().memoizedState=C_.bind(null,Te)},useEffectEvent:function(e){var t=Et(),i={impl:e};return t.memoizedState=i,function(){if(($e&2)!==0)throw Error(U(440));return i.impl.apply(void 0,arguments)}}},wl={readContext:Ct,use:En,useCallback:xh,useContext:Ct,useEffect:pl,useImperativeHandle:wh,useInsertionEffect:Ch,useLayoutEffect:yh,useMemo:Eh,useReducer:Ln,useRef:ph,useState:function(){return Ln(Si)},useDebugValue:ml,useDeferredValue:function(e,t){var i=at();return Lh(i,Xe.memoizedState,e,t)},useTransition:function(){var e=Ln(Si)[0],t=at().memoizedState;return[typeof e=="boolean"?e:Er(e),t]},useSyncExternalStore:th,useId:Dh,useHostTransitionStatus:yl,useFormState:_h,useActionState:_h,useOptimistic:function(e,t){var i=at();return lh(i,Xe,e,t)},useMemoCache:dl,useCacheRefresh:Th};wl.useEffectEvent=Sh;var zh={readContext:Ct,use:En,useCallback:xh,useContext:Ct,useEffect:pl,useImperativeHandle:wh,useInsertionEffect:Ch,useLayoutEffect:yh,useMemo:Eh,useReducer:_l,useRef:ph,useState:function(){return _l(Si)},useDebugValue:ml,useDeferredValue:function(e,t){var i=at();return Xe===null?Sl(i,e,t):Lh(i,Xe.memoizedState,e,t)},useTransition:function(){var e=_l(Si)[0],t=at().memoizedState;return[typeof e=="boolean"?e:Er(e),t]},useSyncExternalStore:th,useId:Dh,useHostTransitionStatus:yl,useFormState:gh,useActionState:gh,useOptimistic:function(e,t){var i=at();return Xe!==null?lh(i,Xe,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:dl,useCacheRefresh:Th};zh.useEffectEvent=Sh;function xl(e,t,i,s){t=e.memoizedState,i=i(s,t),i=i==null?t:a({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var El={enqueueSetState:function(e,t,i){e=e._reactInternals;var s=Pt(),f=zi(s);f.payload=t,i!=null&&(f.callback=i),t=Ni(e,f,s),t!==null&&(Bt(t,e,s),yr(t,e,s))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=Pt(),f=zi(s);f.tag=1,f.payload=t,i!=null&&(f.callback=i),t=Ni(e,f,s),t!==null&&(Bt(t,e,s),yr(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=Pt(),s=zi(i);s.tag=2,t!=null&&(s.callback=t),t=Ni(e,s,i),t!==null&&(Bt(t,e,i),yr(t,e,i))}};function Nh(e,t,i,s,f,g,A){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,g,A):t.prototype&&t.prototype.isPureReactComponent?!fr(i,s)||!fr(f,g):!0}function Uh(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&&El.enqueueReplaceState(t,t.state,null)}function fs(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=a({},i));for(var f in e)i[f]===void 0&&(i[f]=e[f])}return i}function Ih(e){ln(e)}function Ph(e){console.error(e)}function Fh(e){ln(e)}function Dn(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function jh(e,t,i){try{var s=e.onCaughtError;s(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function Ll(e,t,i){return i=zi(i),i.tag=3,i.payload={element:null},i.callback=function(){Dn(e,t)},i}function $h(e){return e=zi(e),e.tag=3,e}function qh(e,t,i,s){var f=i.type.getDerivedStateFromError;if(typeof f=="function"){var g=s.value;e.payload=function(){return f(g)},e.callback=function(){jh(t,i,s)}}var A=i.stateNode;A!==null&&typeof A.componentDidCatch=="function"&&(e.callback=function(){jh(t,i,s),typeof f!="function"&&($i===null?$i=new Set([this]):$i.add(this));var H=s.stack;this.componentDidCatch(s.value,{componentStack:H!==null?H:""})})}function b_(e,t,i,s,f){if(i.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=i.alternate,t!==null&&Os(t,i,f,!0),i=zt.current,i!==null){switch(i.tag){case 31:case 13:return Yt===null?jn():i.alternate===null&&rt===0&&(rt=3),i.flags&=-257,i.flags|=65536,i.lanes=f,s===pn?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([s]):t.add(s),Ql(e,s,f)),!1;case 22:return i.flags|=65536,s===pn?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)),Ql(e,s,f)),!1}throw Error(U(435,i.tag))}return Ql(e,s,f),jn(),!1}if(Pe)return t=zt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=f,s!==Wa&&(e=Error(U(422),{cause:s}),gr(Wt(e,i)))):(s!==Wa&&(t=Error(U(423),{cause:s}),gr(Wt(t,i))),e=e.current.alternate,e.flags|=65536,f&=-f,e.lanes|=f,s=Wt(s,i),f=Ll(e.stateNode,s,f),il(e,f),rt!==4&&(rt=2)),!1;var g=Error(U(520),{cause:s});if(g=Wt(g,i),Hr===null?Hr=[g]:Hr.push(g),rt!==4&&(rt=2),t===null)return!0;s=Wt(s,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=f&-f,i.lanes|=e,e=Ll(i.stateNode,s,e),il(i,e),!1;case 1:if(t=i.type,g=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&($i===null||!$i.has(g))))return i.flags|=65536,f&=-f,i.lanes|=f,f=$h(f),qh(f,e,i,s),il(i,f),!1}i=i.return}while(i!==null);return!1}var Ml=Error(U(461)),ct=!1;function yt(e,t,i,s){t.child=e===null?Vc(t,null,i,s):us(t,e.child,i,s)}function Wh(e,t,i,s,f){i=i.render;var g=t.ref;if("ref"in s){var A={};for(var H in s)H!=="ref"&&(A[H]=s[H])}else A=s;return ls(t),s=ol(e,t,i,A,g,f),H=cl(),e!==null&&!ct?(hl(e,t,f),Ci(e,t,f)):(Pe&&H&&$a(t),t.flags|=1,yt(e,t,s,f),t.child)}function Gh(e,t,i,s,f){if(e===null){var g=i.type;return typeof g=="function"&&!Pa(g)&&g.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=g,Xh(e,t,g,s,f)):(e=un(i.type,null,s,t,t.mode,f),e.ref=t.ref,e.return=t,t.child=e)}if(g=e.child,!Hl(e,f)){var A=g.memoizedProps;if(i=i.compare,i=i!==null?i:fr,i(A,s)&&e.ref===t.ref)return Ci(e,t,f)}return t.flags|=1,e=_i(g,s),e.ref=t.ref,e.return=t,t.child=e}function Xh(e,t,i,s,f){if(e!==null){var g=e.memoizedProps;if(fr(g,s)&&e.ref===t.ref)if(ct=!1,t.pendingProps=s=g,Hl(e,f))(e.flags&131072)!==0&&(ct=!0);else return t.lanes=e.lanes,Ci(e,t,f)}return Al(e,t,i,s,f)}function Vh(e,t,i,s){var f=s.children,g=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(g=g!==null?g.baseLanes|i:i,e!==null){for(s=t.child=e.child,f=0;s!==null;)f=f|s.lanes|s.childLanes,s=s.sibling;s=f&~g}else s=0,t.child=null;return Yh(e,t,g,i,s)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&vn(t,g!==null?g.cachePool:null),g!==null?Qc(t,g):rl(),Zc(t);else return s=t.lanes=536870912,Yh(e,t,g!==null?g.baseLanes|i:i,i,s)}else g!==null?(vn(t,g.cachePool),Qc(t,g),Ii(),t.memoizedState=null):(e!==null&&vn(t,null),rl(),Ii());return yt(e,t,f,i),t.child}function Ar(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Yh(e,t,i,s,f){var g=Za();return g=g===null?null:{parent:lt._currentValue,pool:g},t.memoizedState={baseLanes:i,cachePool:g},e!==null&&vn(t,null),rl(),Zc(t),e!==null&&Os(e,t,s,!0),t.childLanes=f,null}function Tn(e,t){return t=On({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Kh(e,t,i){return us(t,e.child,null,i),e=Tn(t,t.pendingProps),e.flags|=2,Nt(t),t.memoizedState=null,e}function w_(e,t,i){var s=t.pendingProps,f=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Pe){if(s.mode==="hidden")return e=Tn(t,s),t.lanes=536870912,Ar(null,e);if(al(t),(e=Ze)?(e=od(e,Vt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ti!==null?{id:ni,overflow:ai}:null,retryLane:536870912,hydrationErrors:null},i=Oc(e),i.return=t,t.child=i,St=t,Ze=null)):e=null,e===null)throw Oi(t);return t.lanes=536870912,null}return Tn(t,s)}var g=e.memoizedState;if(g!==null){var A=g.dehydrated;if(al(t),f)if(t.flags&256)t.flags&=-257,t=Kh(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(U(558));else if(ct||Os(e,t,i,!1),f=(i&e.childLanes)!==0,ct||f){if(s=Ke,s!==null&&(A=Po(s,i),A!==0&&A!==g.retryLane))throw g.retryLane=A,ss(e,A),Bt(s,e,A),Ml;jn(),t=Kh(e,t,i)}else e=g.treeContext,Ze=Kt(A.nextSibling),St=t,Pe=!0,Bi=null,Vt=!1,e!==null&&zc(t,e),t=Tn(t,s),t.flags|=4096;return t}return e=_i(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Bn(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(U(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function Al(e,t,i,s,f){return ls(t),i=ol(e,t,i,s,void 0,f),s=cl(),e!==null&&!ct?(hl(e,t,f),Ci(e,t,f)):(Pe&&s&&$a(t),t.flags|=1,yt(e,t,i,f),t.child)}function Qh(e,t,i,s,f,g){return ls(t),t.updateQueue=null,i=eh(t,s,i,f),Jc(e),s=cl(),e!==null&&!ct?(hl(e,t,g),Ci(e,t,g)):(Pe&&s&&$a(t),t.flags|=1,yt(e,t,i,g),t.child)}function Zh(e,t,i,s,f){if(ls(t),t.stateNode===null){var g=Rs,A=i.contextType;typeof A=="object"&&A!==null&&(g=Ct(A)),g=new i(s,g),t.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=El,t.stateNode=g,g._reactInternals=t,g=t.stateNode,g.props=s,g.state=t.memoizedState,g.refs={},el(t),A=i.contextType,g.context=typeof A=="object"&&A!==null?Ct(A):Rs,g.state=t.memoizedState,A=i.getDerivedStateFromProps,typeof A=="function"&&(xl(t,i,A,s),g.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(A=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),A!==g.state&&El.enqueueReplaceState(g,g.state,null),wr(t,s,g,f),br(),g.state=t.memoizedState),typeof g.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){g=t.stateNode;var H=t.memoizedProps,W=fs(i,H);g.props=W;var J=g.context,oe=i.contextType;A=Rs,typeof oe=="object"&&oe!==null&&(A=Ct(oe));var de=i.getDerivedStateFromProps;oe=typeof de=="function"||typeof g.getSnapshotBeforeUpdate=="function",H=t.pendingProps!==H,oe||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(H||J!==A)&&Uh(t,g,s,A),Hi=!1;var se=t.memoizedState;g.state=se,wr(t,s,g,f),br(),J=t.memoizedState,H||se!==J||Hi?(typeof de=="function"&&(xl(t,i,de,s),J=t.memoizedState),(W=Hi||Nh(t,i,W,s,se,J,A))?(oe||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(t.flags|=4194308)):(typeof g.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=J),g.props=s,g.state=J,g.context=A,s=W):(typeof g.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{g=t.stateNode,tl(e,t),A=t.memoizedProps,oe=fs(i,A),g.props=oe,de=t.pendingProps,se=g.context,J=i.contextType,W=Rs,typeof J=="object"&&J!==null&&(W=Ct(J)),H=i.getDerivedStateFromProps,(J=typeof H=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(A!==de||se!==W)&&Uh(t,g,s,W),Hi=!1,se=t.memoizedState,g.state=se,wr(t,s,g,f),br();var ne=t.memoizedState;A!==de||se!==ne||Hi||e!==null&&e.dependencies!==null&&fn(e.dependencies)?(typeof H=="function"&&(xl(t,i,H,s),ne=t.memoizedState),(oe=Hi||Nh(t,i,oe,s,se,ne,W)||e!==null&&e.dependencies!==null&&fn(e.dependencies))?(J||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(s,ne,W),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(s,ne,W)),typeof g.componentDidUpdate=="function"&&(t.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof g.componentDidUpdate!="function"||A===e.memoizedProps&&se===e.memoizedState||(t.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||A===e.memoizedProps&&se===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=ne),g.props=s,g.state=ne,g.context=W,s=oe):(typeof g.componentDidUpdate!="function"||A===e.memoizedProps&&se===e.memoizedState||(t.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||A===e.memoizedProps&&se===e.memoizedState||(t.flags|=1024),s=!1)}return g=s,Bn(e,t),s=(t.flags&128)!==0,g||s?(g=t.stateNode,i=s&&typeof i.getDerivedStateFromError!="function"?null:g.render(),t.flags|=1,e!==null&&s?(t.child=us(t,e.child,null,f),t.child=us(t,null,i,f)):yt(e,t,i,f),t.memoizedState=g.state,e=t.child):e=Ci(e,t,f),e}function Jh(e,t,i,s){return ns(),t.flags|=256,yt(e,t,i,s),t.child}var Rl={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Dl(e){return{baseLanes:e,cachePool:jc()}}function Tl(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=It),e}function eu(e,t,i){var s=t.pendingProps,f=!1,g=(t.flags&128)!==0,A;if((A=g)||(A=e!==null&&e.memoizedState===null?!1:(nt.current&2)!==0),A&&(f=!0,t.flags&=-129),A=(t.flags&32)!==0,t.flags&=-33,e===null){if(Pe){if(f?Ui(t):Ii(),(e=Ze)?(e=od(e,Vt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ti!==null?{id:ni,overflow:ai}:null,retryLane:536870912,hydrationErrors:null},i=Oc(e),i.return=t,t.child=i,St=t,Ze=null)):e=null,e===null)throw Oi(t);return _o(e)?t.lanes=32:t.lanes=536870912,null}var H=s.children;return s=s.fallback,f?(Ii(),f=t.mode,H=On({mode:"hidden",children:H},f),s=rs(s,f,i,null),H.return=t,s.return=t,H.sibling=s,t.child=H,s=t.child,s.memoizedState=Dl(i),s.childLanes=Tl(e,A,i),t.memoizedState=Rl,Ar(null,s)):(Ui(t),Bl(t,H))}var W=e.memoizedState;if(W!==null&&(H=W.dehydrated,H!==null)){if(g)t.flags&256?(Ui(t),t.flags&=-257,t=Ol(e,t,i)):t.memoizedState!==null?(Ii(),t.child=e.child,t.flags|=128,t=null):(Ii(),H=s.fallback,f=t.mode,s=On({mode:"visible",children:s.children},f),H=rs(H,f,i,null),H.flags|=2,s.return=t,H.return=t,s.sibling=H,t.child=s,us(t,e.child,null,i),s=t.child,s.memoizedState=Dl(i),s.childLanes=Tl(e,A,i),t.memoizedState=Rl,t=Ar(null,s));else if(Ui(t),_o(H)){if(A=H.nextSibling&&H.nextSibling.dataset,A)var J=A.dgst;A=J,s=Error(U(419)),s.stack="",s.digest=A,gr({value:s,source:null,stack:null}),t=Ol(e,t,i)}else if(ct||Os(e,t,i,!1),A=(i&e.childLanes)!==0,ct||A){if(A=Ke,A!==null&&(s=Po(A,i),s!==0&&s!==W.retryLane))throw W.retryLane=s,ss(e,s),Bt(A,e,s),Ml;fo(H)||jn(),t=Ol(e,t,i)}else fo(H)?(t.flags|=192,t.child=e.child,t=null):(e=W.treeContext,Ze=Kt(H.nextSibling),St=t,Pe=!0,Bi=null,Vt=!1,e!==null&&zc(t,e),t=Bl(t,s.children),t.flags|=4096);return t}return f?(Ii(),H=s.fallback,f=t.mode,W=e.child,J=W.sibling,s=_i(W,{mode:"hidden",children:s.children}),s.subtreeFlags=W.subtreeFlags&65011712,J!==null?H=_i(J,H):(H=rs(H,f,i,null),H.flags|=2),H.return=t,s.return=t,s.sibling=H,t.child=s,Ar(null,s),s=t.child,H=e.child.memoizedState,H===null?H=Dl(i):(f=H.cachePool,f!==null?(W=lt._currentValue,f=f.parent!==W?{parent:W,pool:W}:f):f=jc(),H={baseLanes:H.baseLanes|i,cachePool:f}),s.memoizedState=H,s.childLanes=Tl(e,A,i),t.memoizedState=Rl,Ar(e.child,s)):(Ui(t),i=e.child,e=i.sibling,i=_i(i,{mode:"visible",children:s.children}),i.return=t,i.sibling=null,e!==null&&(A=t.deletions,A===null?(t.deletions=[e],t.flags|=16):A.push(e)),t.child=i,t.memoizedState=null,i)}function Bl(e,t){return t=On({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function On(e,t){return e=Ht(22,e,null,t),e.lanes=0,e}function Ol(e,t,i){return us(t,e.child,null,i),e=Bl(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function tu(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),Va(e.return,t,i)}function kl(e,t,i,s,f,g){var A=e.memoizedState;A===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:f,treeForkCount:g}:(A.isBackwards=t,A.rendering=null,A.renderingStartTime=0,A.last=s,A.tail=i,A.tailMode=f,A.treeForkCount=g)}function iu(e,t,i){var s=t.pendingProps,f=s.revealOrder,g=s.tail;s=s.children;var A=nt.current,H=(A&2)!==0;if(H?(A=A&1|2,t.flags|=128):A&=1,G(nt,A),yt(e,t,s,i),s=Pe?vr:0,!H&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&tu(e,i,t);else if(e.tag===19)tu(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(f){case"forwards":for(i=t.child,f=null;i!==null;)e=i.alternate,e!==null&&yn(e)===null&&(f=i),i=i.sibling;i=f,i===null?(f=t.child,t.child=null):(f=i.sibling,i.sibling=null),kl(t,!1,f,i,g,s);break;case"backwards":case"unstable_legacy-backwards":for(i=null,f=t.child,t.child=null;f!==null;){if(e=f.alternate,e!==null&&yn(e)===null){t.child=f;break}e=f.sibling,f.sibling=i,i=f,f=e}kl(t,!0,i,null,g,s);break;case"together":kl(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function Ci(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),ji|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(Os(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(U(153));if(t.child!==null){for(e=t.child,i=_i(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=_i(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function Hl(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&fn(e)))}function x_(e,t,i){switch(t.tag){case 3:N(t,t.stateNode.containerInfo),ki(t,lt,e.memoizedState.cache),ns();break;case 27:case 5:te(t);break;case 4:N(t,t.stateNode.containerInfo);break;case 10:ki(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,al(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(Ui(t),t.flags|=128,null):(i&t.child.childLanes)!==0?eu(e,t,i):(Ui(t),e=Ci(e,t,i),e!==null?e.sibling:null);Ui(t);break;case 19:var f=(e.flags&128)!==0;if(s=(i&t.childLanes)!==0,s||(Os(e,t,i,!1),s=(i&t.childLanes)!==0),f){if(s)return iu(e,t,i);t.flags|=128}if(f=t.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),G(nt,nt.current),s)break;return null;case 22:return t.lanes=0,Vh(e,t,i,t.pendingProps);case 24:ki(t,lt,e.memoizedState.cache)}return Ci(e,t,i)}function su(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)ct=!0;else{if(!Hl(e,i)&&(t.flags&128)===0)return ct=!1,x_(e,t,i);ct=(e.flags&131072)!==0}else ct=!1,Pe&&(t.flags&1048576)!==0&&Hc(t,vr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=cs(t.elementType),t.type=e,typeof e=="function")Pa(e)?(s=fs(e,s),t.tag=1,t=Zh(null,t,e,s,i)):(t.tag=0,t=Al(null,t,e,s,i));else{if(e!=null){var f=e.$$typeof;if(f===S){t.tag=11,t=Wh(null,t,e,s,i);break e}else if(f===y){t.tag=14,t=Gh(null,t,e,s,i);break e}}throw t=O(e)||e,Error(U(306,t,""))}}return t;case 0:return Al(e,t,t.type,t.pendingProps,i);case 1:return s=t.type,f=fs(s,t.pendingProps),Zh(e,t,s,f,i);case 3:e:{if(N(t,t.stateNode.containerInfo),e===null)throw Error(U(387));s=t.pendingProps;var g=t.memoizedState;f=g.element,tl(e,t),wr(t,s,null,i);var A=t.memoizedState;if(s=A.cache,ki(t,lt,s),s!==g.cache&&Ya(t,[lt],i,!0),br(),s=A.element,g.isDehydrated)if(g={element:s,isDehydrated:!1,cache:A.cache},t.updateQueue.baseState=g,t.memoizedState=g,t.flags&256){t=Jh(e,t,s,i);break e}else if(s!==f){f=Wt(Error(U(424)),t),gr(f),t=Jh(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(Ze=Kt(e.firstChild),St=t,Pe=!0,Bi=null,Vt=!0,i=Vc(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(ns(),s===f){t=Ci(e,t,i);break e}yt(e,t,s,i)}t=t.child}return t;case 26:return Bn(e,t),e===null?(i=_d(t.type,null,t.pendingProps,null))?t.memoizedState=i:Pe||(i=t.type,e=t.pendingProps,s=Yn(le.current).createElement(i),s[mt]=t,s[Lt]=e,bt(s,i,e),gt(s),t.stateNode=s):t.memoizedState=_d(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return te(t),e===null&&Pe&&(s=t.stateNode=ud(t.type,t.pendingProps,le.current),St=t,Vt=!0,f=Ze,Xi(t.type)?(vo=f,Ze=Kt(s.firstChild)):Ze=f),yt(e,t,t.pendingProps.children,i),Bn(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Pe&&((f=s=Ze)&&(s=ev(s,t.type,t.pendingProps,Vt),s!==null?(t.stateNode=s,St=t,Ze=Kt(s.firstChild),Vt=!1,f=!0):f=!1),f||Oi(t)),te(t),f=t.type,g=t.pendingProps,A=e!==null?e.memoizedProps:null,s=g.children,co(f,g)?s=null:A!==null&&co(f,A)&&(t.flags|=32),t.memoizedState!==null&&(f=ol(e,t,v_,null,null,i),$r._currentValue=f),Bn(e,t),yt(e,t,s,i),t.child;case 6:return e===null&&Pe&&((e=i=Ze)&&(i=tv(i,t.pendingProps,Vt),i!==null?(t.stateNode=i,St=t,Ze=null,e=!0):e=!1),e||Oi(t)),null;case 13:return eu(e,t,i);case 4:return N(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=us(t,null,s,i):yt(e,t,s,i),t.child;case 11:return Wh(e,t,t.type,t.pendingProps,i);case 7:return yt(e,t,t.pendingProps,i),t.child;case 8:return yt(e,t,t.pendingProps.children,i),t.child;case 12:return yt(e,t,t.pendingProps.children,i),t.child;case 10:return s=t.pendingProps,ki(t,t.type,s.value),yt(e,t,s.children,i),t.child;case 9:return f=t.type._context,s=t.pendingProps.children,ls(t),f=Ct(f),s=s(f),t.flags|=1,yt(e,t,s,i),t.child;case 14:return Gh(e,t,t.type,t.pendingProps,i);case 15:return Xh(e,t,t.type,t.pendingProps,i);case 19:return iu(e,t,i);case 31:return w_(e,t,i);case 22:return Vh(e,t,i,t.pendingProps);case 24:return ls(t),s=Ct(lt),e===null?(f=Za(),f===null&&(f=Ke,g=Ka(),f.pooledCache=g,g.refCount++,g!==null&&(f.pooledCacheLanes|=i),f=g),t.memoizedState={parent:s,cache:f},el(t),ki(t,lt,f)):((e.lanes&i)!==0&&(tl(e,t),wr(t,null,null,i),br()),f=e.memoizedState,g=t.memoizedState,f.parent!==s?(f={parent:s,cache:s},t.memoizedState=f,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=f),ki(t,lt,s)):(s=g.cache,ki(t,lt,s),s!==f.cache&&Ya(t,[lt],i,!0))),yt(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(U(156,t.tag))}function yi(e){e.flags|=4}function zl(e,t,i,s,f){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(f&335544128)===f)if(e.stateNode.complete)e.flags|=8192;else if(Du())e.flags|=8192;else throw hs=pn,Ja}else e.flags&=-16777217}function ru(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Sd(t))if(Du())e.flags|=8192;else throw hs=pn,Ja}function kn(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?No():536870912,e.lanes|=t,Ws|=t)}function Rr(e,t){if(!Pe)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 Je(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,s=0;if(t)for(var f=e.child;f!==null;)i|=f.lanes|f.childLanes,s|=f.subtreeFlags&65011712,s|=f.flags&65011712,f.return=e,f=f.sibling;else for(f=e.child;f!==null;)i|=f.lanes|f.childLanes,s|=f.subtreeFlags,s|=f.flags,f.return=e,f=f.sibling;return e.subtreeFlags|=s,e.childLanes=i,t}function E_(e,t,i){var s=t.pendingProps;switch(qa(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Je(t),null;case 1:return Je(t),null;case 3:return i=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),pi(lt),ie(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Bs(t)?yi(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Ga())),Je(t),null;case 26:var f=t.type,g=t.memoizedState;return e===null?(yi(t),g!==null?(Je(t),ru(t,g)):(Je(t),zl(t,f,null,s,i))):g?g!==e.memoizedState?(yi(t),Je(t),ru(t,g)):(Je(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&yi(t),Je(t),zl(t,f,e,s,i)),null;case 27:if(ve(t),i=le.current,f=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&yi(t);else{if(!s){if(t.stateNode===null)throw Error(U(166));return Je(t),null}e=K.current,Bs(t)?Nc(t):(e=ud(f,s,i),t.stateNode=e,yi(t))}return Je(t),null;case 5:if(ve(t),f=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&yi(t);else{if(!s){if(t.stateNode===null)throw Error(U(166));return Je(t),null}if(g=K.current,Bs(t))Nc(t);else{var A=Yn(le.current);switch(g){case 1:g=A.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:g=A.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":g=A.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":g=A.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":g=A.createElement("div"),g.innerHTML="<script><\/script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof s.is=="string"?A.createElement("select",{is:s.is}):A.createElement("select"),s.multiple?g.multiple=!0:s.size&&(g.size=s.size);break;default:g=typeof s.is=="string"?A.createElement(f,{is:s.is}):A.createElement(f)}}g[mt]=t,g[Lt]=s;e:for(A=t.child;A!==null;){if(A.tag===5||A.tag===6)g.appendChild(A.stateNode);else if(A.tag!==4&&A.tag!==27&&A.child!==null){A.child.return=A,A=A.child;continue}if(A===t)break e;for(;A.sibling===null;){if(A.return===null||A.return===t)break e;A=A.return}A.sibling.return=A.return,A=A.sibling}t.stateNode=g;e:switch(bt(g,f,s),f){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&yi(t)}}return Je(t),zl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&yi(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(U(166));if(e=le.current,Bs(t)){if(e=t.stateNode,i=t.memoizedProps,s=null,f=St,f!==null)switch(f.tag){case 27:case 5:s=f.memoizedProps}e[mt]=t,e=!!(e.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||ed(e.nodeValue,i)),e||Oi(t,!0)}else e=Yn(e).createTextNode(s),e[mt]=t,t.stateNode=e}return Je(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(s=Bs(t),i!==null){if(e===null){if(!s)throw Error(U(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(557));e[mt]=t}else ns(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Je(t),e=!1}else i=Ga(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(Nt(t),t):(Nt(t),null);if((t.flags&128)!==0)throw Error(U(558))}return Je(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=Bs(t),s!==null&&s.dehydrated!==null){if(e===null){if(!f)throw Error(U(318));if(f=t.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(U(317));f[mt]=t}else ns(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Je(t),f=!1}else f=Ga(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return t.flags&256?(Nt(t),t):(Nt(t),null)}return Nt(t),(t.flags&128)!==0?(t.lanes=i,t):(i=s!==null,e=e!==null&&e.memoizedState!==null,i&&(s=t.child,f=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(f=s.alternate.memoizedState.cachePool.pool),g=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(g=s.memoizedState.cachePool.pool),g!==f&&(s.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),kn(t,t.updateQueue),Je(t),null);case 4:return ie(),e===null&&ro(t.stateNode.containerInfo),Je(t),null;case 10:return pi(t.type),Je(t),null;case 19:if(k(nt),s=t.memoizedState,s===null)return Je(t),null;if(f=(t.flags&128)!==0,g=s.rendering,g===null)if(f)Rr(s,!1);else{if(rt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(g=yn(e),g!==null){for(t.flags|=128,Rr(s,!1),e=g.updateQueue,t.updateQueue=e,kn(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)Bc(i,e),i=i.sibling;return G(nt,nt.current&1|2),Pe&&vi(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&ge()>In&&(t.flags|=128,f=!0,Rr(s,!1),t.lanes=4194304)}else{if(!f)if(e=yn(g),e!==null){if(t.flags|=128,f=!0,e=e.updateQueue,t.updateQueue=e,kn(t,e),Rr(s,!0),s.tail===null&&s.tailMode==="hidden"&&!g.alternate&&!Pe)return Je(t),null}else 2*ge()-s.renderingStartTime>In&&i!==536870912&&(t.flags|=128,f=!0,Rr(s,!1),t.lanes=4194304);s.isBackwards?(g.sibling=t.child,t.child=g):(e=s.last,e!==null?e.sibling=g:t.child=g,s.last=g)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=ge(),e.sibling=null,i=nt.current,G(nt,f?i&1|2:i&1),Pe&&vi(t,s.treeForkCount),e):(Je(t),null);case 22:case 23:return Nt(t),nl(),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&&(Je(t),t.subtreeFlags&6&&(t.flags|=8192)):Je(t),i=t.updateQueue,i!==null&&kn(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&&k(os),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),pi(lt),Je(t),null;case 25:return null;case 30:return null}throw Error(U(156,t.tag))}function L_(e,t){switch(qa(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return pi(lt),ie(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ve(t),null;case 31:if(t.memoizedState!==null){if(Nt(t),t.alternate===null)throw Error(U(340));ns()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Nt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(U(340));ns()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return k(nt),null;case 4:return ie(),null;case 10:return pi(t.type),null;case 22:case 23:return Nt(t),nl(),e!==null&&k(os),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return pi(lt),null;case 25:return null;default:return null}}function nu(e,t){switch(qa(t),t.tag){case 3:pi(lt),ie();break;case 26:case 27:case 5:ve(t);break;case 4:ie();break;case 31:t.memoizedState!==null&&Nt(t);break;case 13:Nt(t);break;case 19:k(nt);break;case 10:pi(t.type);break;case 22:case 23:Nt(t),nl(),e!==null&&k(os);break;case 24:pi(lt)}}function Dr(e,t){try{var i=t.updateQueue,s=i!==null?i.lastEffect:null;if(s!==null){var f=s.next;i=f;do{if((i.tag&e)===e){s=void 0;var g=i.create,A=i.inst;s=g(),A.destroy=s}i=i.next}while(i!==f)}}catch(H){Ge(t,t.return,H)}}function Pi(e,t,i){try{var s=t.updateQueue,f=s!==null?s.lastEffect:null;if(f!==null){var g=f.next;s=g;do{if((s.tag&e)===e){var A=s.inst,H=A.destroy;if(H!==void 0){A.destroy=void 0,f=t;var W=i,J=H;try{J()}catch(oe){Ge(f,W,oe)}}}s=s.next}while(s!==g)}}catch(oe){Ge(t,t.return,oe)}}function au(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{Kc(t,i)}catch(s){Ge(e,e.return,s)}}}function lu(e,t,i){i.props=fs(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(s){Ge(e,t,s)}}function Tr(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(f){Ge(e,t,f)}}function li(e,t){var i=e.ref,s=e.refCleanup;if(i!==null)if(typeof s=="function")try{s()}catch(f){Ge(e,t,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(f){Ge(e,t,f)}else i.current=null}function ou(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(f){Ge(e,e.return,f)}}function Nl(e,t,i){try{var s=e.stateNode;V_(s,e.type,i,t),s[Lt]=t}catch(f){Ge(e,e.return,f)}}function cu(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Xi(e.type)||e.tag===4}function Ul(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||cu(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&&Xi(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 Il(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=di));else if(s!==4&&(s===27&&Xi(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(Il(e,t,i),e=e.sibling;e!==null;)Il(e,t,i),e=e.sibling}function Hn(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&&Xi(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(Hn(e,t,i),e=e.sibling;e!==null;)Hn(e,t,i),e=e.sibling}function hu(e){var t=e.stateNode,i=e.memoizedProps;try{for(var s=e.type,f=t.attributes;f.length;)t.removeAttributeNode(f[0]);bt(t,s,i),t[mt]=e,t[Lt]=i}catch(g){Ge(e,e.return,g)}}var bi=!1,ht=!1,Pl=!1,uu=typeof WeakSet=="function"?WeakSet:Set,pt=null;function M_(e,t){if(e=e.containerInfo,lo=ia,e=wc(e),Oa(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 f=s.anchorOffset,g=s.focusNode;s=s.focusOffset;try{i.nodeType,g.nodeType}catch{i=null;break e}var A=0,H=-1,W=-1,J=0,oe=0,de=e,se=null;t:for(;;){for(var ne;de!==i||f!==0&&de.nodeType!==3||(H=A+f),de!==g||s!==0&&de.nodeType!==3||(W=A+s),de.nodeType===3&&(A+=de.nodeValue.length),(ne=de.firstChild)!==null;)se=de,de=ne;for(;;){if(de===e)break t;if(se===i&&++J===f&&(H=A),se===g&&++oe===s&&(W=A),(ne=de.nextSibling)!==null)break;de=se,se=de.parentNode}de=ne}i=H===-1||W===-1?null:{start:H,end:W}}else i=null}i=i||{start:0,end:0}}else i=null;for(oo={focusedElem:e,selectionRange:i},ia=!1,pt=t;pt!==null;)if(t=pt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,pt=e;else for(;pt!==null;){switch(t=pt,g=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++)f=e[i],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&g!==null){e=void 0,i=t,f=g.memoizedProps,g=g.memoizedState,s=i.stateNode;try{var Ce=fs(i.type,f);e=s.getSnapshotBeforeUpdate(Ce,g),s.__reactInternalSnapshotBeforeUpdate=e}catch(Le){Ge(i,i.return,Le)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)uo(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":uo(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(U(163))}if(e=t.sibling,e!==null){e.return=t.return,pt=e;break}pt=t.return}}function du(e,t,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:xi(e,i),s&4&&Dr(5,i);break;case 1:if(xi(e,i),s&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(A){Ge(i,i.return,A)}else{var f=fs(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(f,t,e.__reactInternalSnapshotBeforeUpdate)}catch(A){Ge(i,i.return,A)}}s&64&&au(i),s&512&&Tr(i,i.return);break;case 3:if(xi(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{Kc(e,t)}catch(A){Ge(i,i.return,A)}}break;case 27:t===null&&s&4&&hu(i);case 26:case 5:xi(e,i),t===null&&s&4&&ou(i),s&512&&Tr(i,i.return);break;case 12:xi(e,i);break;case 31:xi(e,i),s&4&&vu(e,i);break;case 13:xi(e,i),s&4&&gu(e,i),s&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=z_.bind(null,i),iv(e,i))));break;case 22:if(s=i.memoizedState!==null||bi,!s){t=t!==null&&t.memoizedState!==null||ht,f=bi;var g=ht;bi=s,(ht=t)&&!g?Ei(e,i,(i.subtreeFlags&8772)!==0):xi(e,i),bi=f,ht=g}break;case 30:break;default:xi(e,i)}}function fu(e){var t=e.alternate;t!==null&&(e.alternate=null,fu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ga(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 et=null,At=!1;function wi(e,t,i){for(i=i.child;i!==null;)_u(e,t,i),i=i.sibling}function _u(e,t,i){if(tt&&typeof tt.onCommitFiberUnmount=="function")try{tt.onCommitFiberUnmount(xt,i)}catch{}switch(i.tag){case 26:ht||li(i,t),wi(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:ht||li(i,t);var s=et,f=At;Xi(i.type)&&(et=i.stateNode,At=!1),wi(e,t,i),Pr(i.stateNode),et=s,At=f;break;case 5:ht||li(i,t);case 6:if(s=et,f=At,et=null,wi(e,t,i),et=s,At=f,et!==null)if(At)try{(et.nodeType===9?et.body:et.nodeName==="HTML"?et.ownerDocument.body:et).removeChild(i.stateNode)}catch(g){Ge(i,t,g)}else try{et.removeChild(i.stateNode)}catch(g){Ge(i,t,g)}break;case 18:et!==null&&(At?(e=et,ad(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Js(e)):ad(et,i.stateNode));break;case 4:s=et,f=At,et=i.stateNode.containerInfo,At=!0,wi(e,t,i),et=s,At=f;break;case 0:case 11:case 14:case 15:Pi(2,i,t),ht||Pi(4,i,t),wi(e,t,i);break;case 1:ht||(li(i,t),s=i.stateNode,typeof s.componentWillUnmount=="function"&&lu(i,t,s)),wi(e,t,i);break;case 21:wi(e,t,i);break;case 22:ht=(s=ht)||i.memoizedState!==null,wi(e,t,i),ht=s;break;default:wi(e,t,i)}}function vu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Js(e)}catch(i){Ge(t,t.return,i)}}}function gu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Js(e)}catch(i){Ge(t,t.return,i)}}function A_(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new uu),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new uu),t;default:throw Error(U(435,e.tag))}}function zn(e,t){var i=A_(e);t.forEach(function(s){if(!i.has(s)){i.add(s);var f=N_.bind(null,e,s);s.then(f,f)}})}function Rt(e,t){var i=t.deletions;if(i!==null)for(var s=0;s<i.length;s++){var f=i[s],g=e,A=t,H=A;e:for(;H!==null;){switch(H.tag){case 27:if(Xi(H.type)){et=H.stateNode,At=!1;break e}break;case 5:et=H.stateNode,At=!1;break e;case 3:case 4:et=H.stateNode.containerInfo,At=!0;break e}H=H.return}if(et===null)throw Error(U(160));_u(g,A,f),et=null,At=!1,g=f.alternate,g!==null&&(g.return=null),f.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)pu(t,e),t=t.sibling}var ti=null;function pu(e,t){var i=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Rt(t,e),Dt(e),s&4&&(Pi(3,e,e.return),Dr(3,e),Pi(5,e,e.return));break;case 1:Rt(t,e),Dt(e),s&512&&(ht||i===null||li(i,i.return)),s&64&&bi&&(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 f=ti;if(Rt(t,e),Dt(e),s&512&&(ht||i===null||li(i,i.return)),s&4){var g=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,f=f.ownerDocument||f;t:switch(s){case"title":g=f.getElementsByTagName("title")[0],(!g||g[rr]||g[mt]||g.namespaceURI==="http://www.w3.org/2000/svg"||g.hasAttribute("itemprop"))&&(g=f.createElement(s),f.head.insertBefore(g,f.querySelector("head > title"))),bt(g,s,i),g[mt]=e,gt(g),s=g;break e;case"link":var A=pd("link","href",f).get(s+(i.href||""));if(A){for(var H=0;H<A.length;H++)if(g=A[H],g.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&g.getAttribute("rel")===(i.rel==null?null:i.rel)&&g.getAttribute("title")===(i.title==null?null:i.title)&&g.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){A.splice(H,1);break t}}g=f.createElement(s),bt(g,s,i),f.head.appendChild(g);break;case"meta":if(A=pd("meta","content",f).get(s+(i.content||""))){for(H=0;H<A.length;H++)if(g=A[H],g.getAttribute("content")===(i.content==null?null:""+i.content)&&g.getAttribute("name")===(i.name==null?null:i.name)&&g.getAttribute("property")===(i.property==null?null:i.property)&&g.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&g.getAttribute("charset")===(i.charSet==null?null:i.charSet)){A.splice(H,1);break t}}g=f.createElement(s),bt(g,s,i),f.head.appendChild(g);break;default:throw Error(U(468,s))}g[mt]=e,gt(g),s=g}e.stateNode=s}else md(f,e.type,e.stateNode);else e.stateNode=gd(f,s,e.memoizedProps);else g!==s?(g===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):g.count--,s===null?md(f,e.type,e.stateNode):gd(f,s,e.memoizedProps)):s===null&&e.stateNode!==null&&Nl(e,e.memoizedProps,i.memoizedProps)}break;case 27:Rt(t,e),Dt(e),s&512&&(ht||i===null||li(i,i.return)),i!==null&&s&4&&Nl(e,e.memoizedProps,i.memoizedProps);break;case 5:if(Rt(t,e),Dt(e),s&512&&(ht||i===null||li(i,i.return)),e.flags&32){f=e.stateNode;try{bs(f,"")}catch(Ce){Ge(e,e.return,Ce)}}s&4&&e.stateNode!=null&&(f=e.memoizedProps,Nl(e,f,i!==null?i.memoizedProps:f)),s&1024&&(Pl=!0);break;case 6:if(Rt(t,e),Dt(e),s&4){if(e.stateNode===null)throw Error(U(162));s=e.memoizedProps,i=e.stateNode;try{i.nodeValue=s}catch(Ce){Ge(e,e.return,Ce)}}break;case 3:if(Zn=null,f=ti,ti=Kn(t.containerInfo),Rt(t,e),ti=f,Dt(e),s&4&&i!==null&&i.memoizedState.isDehydrated)try{Js(t.containerInfo)}catch(Ce){Ge(e,e.return,Ce)}Pl&&(Pl=!1,mu(e));break;case 4:s=ti,ti=Kn(e.stateNode.containerInfo),Rt(t,e),Dt(e),ti=s;break;case 12:Rt(t,e),Dt(e);break;case 31:Rt(t,e),Dt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,zn(e,s)));break;case 13:Rt(t,e),Dt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Un=ge()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,zn(e,s)));break;case 22:f=e.memoizedState!==null;var W=i!==null&&i.memoizedState!==null,J=bi,oe=ht;if(bi=J||f,ht=oe||W,Rt(t,e),ht=oe,bi=J,Dt(e),s&8192)e:for(t=e.stateNode,t._visibility=f?t._visibility&-2:t._visibility|1,f&&(i===null||W||bi||ht||_s(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){W=i=t;try{if(g=W.stateNode,f)A=g.style,typeof A.setProperty=="function"?A.setProperty("display","none","important"):A.display="none";else{H=W.stateNode;var de=W.memoizedProps.style,se=de!=null&&de.hasOwnProperty("display")?de.display:null;H.style.display=se==null||typeof se=="boolean"?"":(""+se).trim()}}catch(Ce){Ge(W,W.return,Ce)}}}else if(t.tag===6){if(i===null){W=t;try{W.stateNode.nodeValue=f?"":W.memoizedProps}catch(Ce){Ge(W,W.return,Ce)}}}else if(t.tag===18){if(i===null){W=t;try{var ne=W.stateNode;f?ld(ne,!0):ld(W.stateNode,!1)}catch(Ce){Ge(W,W.return,Ce)}}}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,zn(e,i))));break;case 19:Rt(t,e),Dt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,zn(e,s)));break;case 30:break;case 21:break;default:Rt(t,e),Dt(e)}}function Dt(e){var t=e.flags;if(t&2){try{for(var i,s=e.return;s!==null;){if(cu(s)){i=s;break}s=s.return}if(i==null)throw Error(U(160));switch(i.tag){case 27:var f=i.stateNode,g=Ul(e);Hn(e,g,f);break;case 5:var A=i.stateNode;i.flags&32&&(bs(A,""),i.flags&=-33);var H=Ul(e);Hn(e,H,A);break;case 3:case 4:var W=i.stateNode.containerInfo,J=Ul(e);Il(e,J,W);break;default:throw Error(U(161))}}catch(oe){Ge(e,e.return,oe)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function mu(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;mu(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function xi(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)du(e,t.alternate,t),t=t.sibling}function _s(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Pi(4,t,t.return),_s(t);break;case 1:li(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&lu(t,t.return,i),_s(t);break;case 27:Pr(t.stateNode);case 26:case 5:li(t,t.return),_s(t);break;case 22:t.memoizedState===null&&_s(t);break;case 30:_s(t);break;default:_s(t)}e=e.sibling}}function Ei(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,f=e,g=t,A=g.flags;switch(g.tag){case 0:case 11:case 15:Ei(f,g,i),Dr(4,g);break;case 1:if(Ei(f,g,i),s=g,f=s.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(J){Ge(s,s.return,J)}if(s=g,f=s.updateQueue,f!==null){var H=s.stateNode;try{var W=f.shared.hiddenCallbacks;if(W!==null)for(f.shared.hiddenCallbacks=null,f=0;f<W.length;f++)Yc(W[f],H)}catch(J){Ge(s,s.return,J)}}i&&A&64&&au(g),Tr(g,g.return);break;case 27:hu(g);case 26:case 5:Ei(f,g,i),i&&s===null&&A&4&&ou(g),Tr(g,g.return);break;case 12:Ei(f,g,i);break;case 31:Ei(f,g,i),i&&A&4&&vu(f,g);break;case 13:Ei(f,g,i),i&&A&4&&gu(f,g);break;case 22:g.memoizedState===null&&Ei(f,g,i),Tr(g,g.return);break;case 30:break;default:Ei(f,g,i)}t=t.sibling}}function Fl(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&&pr(i))}function jl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&pr(e))}function ii(e,t,i,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Su(e,t,i,s),t=t.sibling}function Su(e,t,i,s){var f=t.flags;switch(t.tag){case 0:case 11:case 15:ii(e,t,i,s),f&2048&&Dr(9,t);break;case 1:ii(e,t,i,s);break;case 3:ii(e,t,i,s),f&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&pr(e)));break;case 12:if(f&2048){ii(e,t,i,s),e=t.stateNode;try{var g=t.memoizedProps,A=g.id,H=g.onPostCommit;typeof H=="function"&&H(A,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(W){Ge(t,t.return,W)}}else ii(e,t,i,s);break;case 31:ii(e,t,i,s);break;case 13:ii(e,t,i,s);break;case 23:break;case 22:g=t.stateNode,A=t.alternate,t.memoizedState!==null?g._visibility&2?ii(e,t,i,s):Br(e,t):g._visibility&2?ii(e,t,i,s):(g._visibility|=2,js(e,t,i,s,(t.subtreeFlags&10256)!==0||!1)),f&2048&&Fl(A,t);break;case 24:ii(e,t,i,s),f&2048&&jl(t.alternate,t);break;default:ii(e,t,i,s)}}function js(e,t,i,s,f){for(f=f&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var g=e,A=t,H=i,W=s,J=A.flags;switch(A.tag){case 0:case 11:case 15:js(g,A,H,W,f),Dr(8,A);break;case 23:break;case 22:var oe=A.stateNode;A.memoizedState!==null?oe._visibility&2?js(g,A,H,W,f):Br(g,A):(oe._visibility|=2,js(g,A,H,W,f)),f&&J&2048&&Fl(A.alternate,A);break;case 24:js(g,A,H,W,f),f&&J&2048&&jl(A.alternate,A);break;default:js(g,A,H,W,f)}t=t.sibling}}function Br(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,s=t,f=s.flags;switch(s.tag){case 22:Br(i,s),f&2048&&Fl(s.alternate,s);break;case 24:Br(i,s),f&2048&&jl(s.alternate,s);break;default:Br(i,s)}t=t.sibling}}var Or=8192;function $s(e,t,i){if(e.subtreeFlags&Or)for(e=e.child;e!==null;)Cu(e,t,i),e=e.sibling}function Cu(e,t,i){switch(e.tag){case 26:$s(e,t,i),e.flags&Or&&e.memoizedState!==null&&_v(i,ti,e.memoizedState,e.memoizedProps);break;case 5:$s(e,t,i);break;case 3:case 4:var s=ti;ti=Kn(e.stateNode.containerInfo),$s(e,t,i),ti=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=Or,Or=16777216,$s(e,t,i),Or=s):$s(e,t,i));break;default:$s(e,t,i)}}function yu(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 kr(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];pt=s,wu(s,e)}yu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)bu(e),e=e.sibling}function bu(e){switch(e.tag){case 0:case 11:case 15:kr(e),e.flags&2048&&Pi(9,e,e.return);break;case 3:kr(e);break;case 12:kr(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)):kr(e);break;default:kr(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];pt=s,wu(s,e)}yu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Pi(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 wu(e,t){for(;pt!==null;){var i=pt;switch(i.tag){case 0:case 11:case 15:Pi(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:pr(i.memoizedState.cache)}if(s=i.child,s!==null)s.return=i,pt=s;else e:for(i=e;pt!==null;){s=pt;var f=s.sibling,g=s.return;if(fu(s),s===i){pt=null;break e}if(f!==null){f.return=g,pt=f;break e}pt=g}}}var R_={getCacheForType:function(e){var t=Ct(lt),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return Ct(lt).controller.signal}},D_=typeof WeakMap=="function"?WeakMap:Map,$e=0,Ke=null,ke=null,Ne=0,We=0,Ut=null,Fi=!1,qs=!1,$l=!1,Li=0,rt=0,ji=0,vs=0,ql=0,It=0,Ws=0,Hr=null,Tt=null,Wl=!1,Un=0,xu=0,In=1/0,Pn=null,$i=null,dt=0,qi=null,Gs=null,Mi=0,Gl=0,Xl=null,Eu=null,zr=0,Vl=null;function Pt(){return($e&2)!==0&&Ne!==0?Ne&-Ne:I.T!==null?eo():Fo()}function Lu(){if(It===0)if((Ne&536870912)===0||Pe){var e=si;si<<=1,(si&3932160)===0&&(si=262144),It=e}else It=536870912;return e=zt.current,e!==null&&(e.flags|=32),It}function Bt(e,t,i){(e===Ke&&(We===2||We===9)||e.cancelPendingCommit!==null)&&(Xs(e,0),Wi(e,Ne,It,!1)),sr(e,i),(($e&2)===0||e!==Ke)&&(e===Ke&&(($e&2)===0&&(vs|=i),rt===4&&Wi(e,Ne,It,!1)),oi(e))}function Mu(e,t,i){if(($e&6)!==0)throw Error(U(327));var s=!i&&(t&127)===0&&(t&e.expiredLanes)===0||ir(e,t),f=s?O_(e,t):Kl(e,t,!0),g=s;do{if(f===0){qs&&!s&&Wi(e,t,0,!1);break}else{if(i=e.current.alternate,g&&!T_(i)){f=Kl(e,t,!1),g=!1;continue}if(f===2){if(g=t,e.errorRecoveryDisabledLanes&g)var A=0;else A=e.pendingLanes&-536870913,A=A!==0?A:A&536870912?536870912:0;if(A!==0){t=A;e:{var H=e;f=Hr;var W=H.current.memoizedState.isDehydrated;if(W&&(Xs(H,A).flags|=256),A=Kl(H,A,!1),A!==2){if($l&&!W){H.errorRecoveryDisabledLanes|=g,vs|=g,f=4;break e}g=Tt,Tt=f,g!==null&&(Tt===null?Tt=g:Tt.push.apply(Tt,g))}f=A}if(g=!1,f!==2)continue}}if(f===1){Xs(e,0),Wi(e,t,0,!0);break}e:{switch(s=e,g=f,g){case 0:case 1:throw Error(U(345));case 4:if((t&4194048)!==t)break;case 6:Wi(s,t,It,!Fi);break e;case 2:Tt=null;break;case 3:case 5:break;default:throw Error(U(329))}if((t&62914560)===t&&(f=Un+300-ge(),10<f)){if(Wi(s,t,It,!Fi),Yr(s,0,!0)!==0)break e;Mi=t,s.timeoutHandle=rd(Au.bind(null,s,i,Tt,Pn,Wl,t,It,vs,Ws,Fi,g,"Throttled",-0,0),f);break e}Au(s,i,Tt,Pn,Wl,t,It,vs,Ws,Fi,g,null,-0,0)}}break}while(!0);oi(e)}function Au(e,t,i,s,f,g,A,H,W,J,oe,de,se,ne){if(e.timeoutHandle=-1,de=t.subtreeFlags,de&8192||(de&16785408)===16785408){de={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:di},Cu(t,g,de);var Ce=(g&62914560)===g?Un-ge():(g&4194048)===g?xu-ge():0;if(Ce=vv(de,Ce),Ce!==null){Mi=g,e.cancelPendingCommit=Ce(zu.bind(null,e,t,g,i,s,f,A,H,W,oe,de,null,se,ne)),Wi(e,g,A,!J);return}}zu(e,t,g,i,s,f,A,H,W)}function T_(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 f=i[s],g=f.getSnapshot;f=f.value;try{if(!kt(g(),f))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 Wi(e,t,i,s){t&=~ql,t&=~vs,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var f=t;0<f;){var g=31-ut(f),A=1<<g;s[g]=-1,f&=~A}i!==0&&Uo(e,i,t)}function Fn(){return($e&6)===0?(Nr(0),!1):!0}function Yl(){if(ke!==null){if(We===0)var e=ke.return;else e=ke,gi=as=null,ul(e),Ns=null,Sr=0,e=ke;for(;e!==null;)nu(e.alternate,e),e=e.return;ke=null}}function Xs(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,Q_(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),Mi=0,Yl(),Ke=e,ke=i=_i(e.current,null),Ne=t,We=0,Ut=null,Fi=!1,qs=ir(e,t),$l=!1,Ws=It=ql=vs=ji=rt=0,Tt=Hr=null,Wl=!1,(t&8)!==0&&(t|=t&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=t;0<s;){var f=31-ut(s),g=1<<f;t|=e[f],s&=~g}return Li=t,on(),i}function Ru(e,t){Te=null,I.H=Mr,t===zs||t===gn?(t=Wc(),We=3):t===Ja?(t=Wc(),We=4):We=t===Ml?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Ut=t,ke===null&&(rt=1,Dn(e,Wt(t,e.current)))}function Du(){var e=zt.current;return e===null?!0:(Ne&4194048)===Ne?Yt===null:(Ne&62914560)===Ne||(Ne&536870912)!==0?e===Yt:!1}function Tu(){var e=I.H;return I.H=Mr,e===null?Mr:e}function Bu(){var e=I.A;return I.A=R_,e}function jn(){rt=4,Fi||(Ne&4194048)!==Ne&&zt.current!==null||(qs=!0),(ji&134217727)===0&&(vs&134217727)===0||Ke===null||Wi(Ke,Ne,It,!1)}function Kl(e,t,i){var s=$e;$e|=2;var f=Tu(),g=Bu();(Ke!==e||Ne!==t)&&(Pn=null,Xs(e,t)),t=!1;var A=rt;e:do try{if(We!==0&&ke!==null){var H=ke,W=Ut;switch(We){case 8:Yl(),A=6;break e;case 3:case 2:case 9:case 6:zt.current===null&&(t=!0);var J=We;if(We=0,Ut=null,Vs(e,H,W,J),i&&qs){A=0;break e}break;default:J=We,We=0,Ut=null,Vs(e,H,W,J)}}B_(),A=rt;break}catch(oe){Ru(e,oe)}while(!0);return t&&e.shellSuspendCounter++,gi=as=null,$e=s,I.H=f,I.A=g,ke===null&&(Ke=null,Ne=0,on()),A}function B_(){for(;ke!==null;)Ou(ke)}function O_(e,t){var i=$e;$e|=2;var s=Tu(),f=Bu();Ke!==e||Ne!==t?(Pn=null,In=ge()+500,Xs(e,t)):qs=ir(e,t);e:do try{if(We!==0&&ke!==null){t=ke;var g=Ut;t:switch(We){case 1:We=0,Ut=null,Vs(e,t,g,1);break;case 2:case 9:if($c(g)){We=0,Ut=null,ku(t);break}t=function(){We!==2&&We!==9||Ke!==e||(We=7),oi(e)},g.then(t,t);break e;case 3:We=7;break e;case 4:We=5;break e;case 7:$c(g)?(We=0,Ut=null,ku(t)):(We=0,Ut=null,Vs(e,t,g,7));break;case 5:var A=null;switch(ke.tag){case 26:A=ke.memoizedState;case 5:case 27:var H=ke;if(A?Sd(A):H.stateNode.complete){We=0,Ut=null;var W=H.sibling;if(W!==null)ke=W;else{var J=H.return;J!==null?(ke=J,$n(J)):ke=null}break t}}We=0,Ut=null,Vs(e,t,g,5);break;case 6:We=0,Ut=null,Vs(e,t,g,6);break;case 8:Yl(),rt=6;break e;default:throw Error(U(462))}}k_();break}catch(oe){Ru(e,oe)}while(!0);return gi=as=null,I.H=s,I.A=f,$e=i,ke!==null?0:(Ke=null,Ne=0,on(),rt)}function k_(){for(;ke!==null&&!me();)Ou(ke)}function Ou(e){var t=su(e.alternate,e,Li);e.memoizedProps=e.pendingProps,t===null?$n(e):ke=t}function ku(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=Qh(i,t,t.pendingProps,t.type,void 0,Ne);break;case 11:t=Qh(i,t,t.pendingProps,t.type.render,t.ref,Ne);break;case 5:ul(t);default:nu(i,t),t=ke=Bc(t,Li),t=su(i,t,Li)}e.memoizedProps=e.pendingProps,t===null?$n(e):ke=t}function Vs(e,t,i,s){gi=as=null,ul(t),Ns=null,Sr=0;var f=t.return;try{if(b_(e,f,t,i,Ne)){rt=1,Dn(e,Wt(i,e.current)),ke=null;return}}catch(g){if(f!==null)throw ke=f,g;rt=1,Dn(e,Wt(i,e.current)),ke=null;return}t.flags&32768?(Pe||s===1?e=!0:qs||(Ne&536870912)!==0?e=!1:(Fi=e=!0,(s===2||s===9||s===3||s===6)&&(s=zt.current,s!==null&&s.tag===13&&(s.flags|=16384))),Hu(t,e)):$n(t)}function $n(e){var t=e;do{if((t.flags&32768)!==0){Hu(t,Fi);return}e=t.return;var i=E_(t.alternate,t,Li);if(i!==null){ke=i;return}if(t=t.sibling,t!==null){ke=t;return}ke=t=e}while(t!==null);rt===0&&(rt=5)}function Hu(e,t){do{var i=L_(e.alternate,e);if(i!==null){i.flags&=32767,ke=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){ke=e;return}ke=e=i}while(e!==null);rt=6,ke=null}function zu(e,t,i,s,f,g,A,H,W){e.cancelPendingCommit=null;do qn();while(dt!==0);if(($e&6)!==0)throw Error(U(327));if(t!==null){if(t===e.current)throw Error(U(177));if(g=t.lanes|t.childLanes,g|=Ua,ff(e,i,g,A,H,W),e===Ke&&(ke=Ke=null,Ne=0),Gs=t,qi=e,Mi=i,Gl=g,Xl=f,Eu=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,U_(Qe,function(){return Fu(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=I.T,I.T=null,f=P.p,P.p=2,A=$e,$e|=4;try{M_(e,t,i)}finally{$e=A,P.p=f,I.T=s}}dt=1,Nu(),Uu(),Iu()}}function Nu(){if(dt===1){dt=0;var e=qi,t=Gs,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=I.T,I.T=null;var s=P.p;P.p=2;var f=$e;$e|=4;try{pu(t,e);var g=oo,A=wc(e.containerInfo),H=g.focusedElem,W=g.selectionRange;if(A!==H&&H&&H.ownerDocument&&bc(H.ownerDocument.documentElement,H)){if(W!==null&&Oa(H)){var J=W.start,oe=W.end;if(oe===void 0&&(oe=J),"selectionStart"in H)H.selectionStart=J,H.selectionEnd=Math.min(oe,H.value.length);else{var de=H.ownerDocument||document,se=de&&de.defaultView||window;if(se.getSelection){var ne=se.getSelection(),Ce=H.textContent.length,Le=Math.min(W.start,Ce),Ye=W.end===void 0?Le:Math.min(W.end,Ce);!ne.extend&&Le>Ye&&(A=Ye,Ye=Le,Le=A);var Q=yc(H,Le),Y=yc(H,Ye);if(Q&&Y&&(ne.rangeCount!==1||ne.anchorNode!==Q.node||ne.anchorOffset!==Q.offset||ne.focusNode!==Y.node||ne.focusOffset!==Y.offset)){var Z=de.createRange();Z.setStart(Q.node,Q.offset),ne.removeAllRanges(),Le>Ye?(ne.addRange(Z),ne.extend(Y.node,Y.offset)):(Z.setEnd(Y.node,Y.offset),ne.addRange(Z))}}}}for(de=[],ne=H;ne=ne.parentNode;)ne.nodeType===1&&de.push({element:ne,left:ne.scrollLeft,top:ne.scrollTop});for(typeof H.focus=="function"&&H.focus(),H=0;H<de.length;H++){var ce=de[H];ce.element.scrollLeft=ce.left,ce.element.scrollTop=ce.top}}ia=!!lo,oo=lo=null}finally{$e=f,P.p=s,I.T=i}}e.current=t,dt=2}}function Uu(){if(dt===2){dt=0;var e=qi,t=Gs,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=I.T,I.T=null;var s=P.p;P.p=2;var f=$e;$e|=4;try{du(e,t.alternate,t)}finally{$e=f,P.p=s,I.T=i}}dt=3}}function Iu(){if(dt===4||dt===3){dt=0,he();var e=qi,t=Gs,i=Mi,s=Eu;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?dt=5:(dt=0,Gs=qi=null,Pu(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&($i=null),_a(i),t=t.stateNode,tt&&typeof tt.onCommitFiberRoot=="function")try{tt.onCommitFiberRoot(xt,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=I.T,f=P.p,P.p=2,I.T=null;try{for(var g=e.onRecoverableError,A=0;A<s.length;A++){var H=s[A];g(H.value,{componentStack:H.stack})}}finally{I.T=t,P.p=f}}(Mi&3)!==0&&qn(),oi(e),f=e.pendingLanes,(i&261930)!==0&&(f&42)!==0?e===Vl?zr++:(zr=0,Vl=e):zr=0,Nr(0)}}function Pu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,pr(t)))}function qn(){return Nu(),Uu(),Iu(),Fu()}function Fu(){if(dt!==5)return!1;var e=qi,t=Gl;Gl=0;var i=_a(Mi),s=I.T,f=P.p;try{P.p=32>i?32:i,I.T=null,i=Xl,Xl=null;var g=qi,A=Mi;if(dt=0,Gs=qi=null,Mi=0,($e&6)!==0)throw Error(U(331));var H=$e;if($e|=4,bu(g.current),Su(g,g.current,A,i),$e=H,Nr(0,!1),tt&&typeof tt.onPostCommitFiberRoot=="function")try{tt.onPostCommitFiberRoot(xt,g)}catch{}return!0}finally{P.p=f,I.T=s,Pu(e,t)}}function ju(e,t,i){t=Wt(i,t),t=Ll(e.stateNode,t,2),e=Ni(e,t,2),e!==null&&(sr(e,2),oi(e))}function Ge(e,t,i){if(e.tag===3)ju(e,e,i);else for(;t!==null;){if(t.tag===3){ju(t,e,i);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&($i===null||!$i.has(s))){e=Wt(i,e),i=$h(2),s=Ni(t,i,2),s!==null&&(qh(i,s,t,e),sr(s,2),oi(s));break}}t=t.return}}function Ql(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new D_;var f=new Set;s.set(t,f)}else f=s.get(t),f===void 0&&(f=new Set,s.set(t,f));f.has(i)||($l=!0,f.add(i),e=H_.bind(null,e,t,i),t.then(e,e))}function H_(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,Ke===e&&(Ne&i)===i&&(rt===4||rt===3&&(Ne&62914560)===Ne&&300>ge()-Un?($e&2)===0&&Xs(e,0):ql|=i,Ws===Ne&&(Ws=0)),oi(e)}function $u(e,t){t===0&&(t=No()),e=ss(e,t),e!==null&&(sr(e,t),oi(e))}function z_(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),$u(e,i)}function N_(e,t){var i=0;switch(e.tag){case 31:case 13:var s=e.stateNode,f=e.memoizedState;f!==null&&(i=f.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(U(314))}s!==null&&s.delete(t),$u(e,i)}function U_(e,t){return Se(e,t)}var Wn=null,Ys=null,Zl=!1,Gn=!1,Jl=!1,Gi=0;function oi(e){e!==Ys&&e.next===null&&(Ys===null?Wn=Ys=e:Ys=Ys.next=e),Gn=!0,Zl||(Zl=!0,P_())}function Nr(e,t){if(!Jl&&Gn){Jl=!0;do for(var i=!1,s=Wn;s!==null;){if(e!==0){var f=s.pendingLanes;if(f===0)var g=0;else{var A=s.suspendedLanes,H=s.pingedLanes;g=(1<<31-ut(42|e)+1)-1,g&=f&~(A&~H),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(i=!0,Xu(s,g))}else g=Ne,g=Yr(s,s===Ke?g:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(g&3)===0||ir(s,g)||(i=!0,Xu(s,g));s=s.next}while(i);Jl=!1}}function I_(){qu()}function qu(){Gn=Zl=!1;var e=0;Gi!==0&&K_()&&(e=Gi);for(var t=ge(),i=null,s=Wn;s!==null;){var f=s.next,g=Wu(s,t);g===0?(s.next=null,i===null?Wn=f:i.next=f,f===null&&(Ys=i)):(i=s,(e!==0||(g&3)!==0)&&(Gn=!0)),s=f}dt!==0&&dt!==5||Nr(e),Gi!==0&&(Gi=0)}function Wu(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,f=e.expirationTimes,g=e.pendingLanes&-62914561;0<g;){var A=31-ut(g),H=1<<A,W=f[A];W===-1?((H&i)===0||(H&s)!==0)&&(f[A]=df(H,t)):W<=t&&(e.expiredLanes|=H),g&=~H}if(t=Ke,i=Ne,i=Yr(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,i===0||e===t&&(We===2||We===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&pe(s),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||ir(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(s!==null&&pe(s),_a(i)){case 2:case 8:i=_t;break;case 32:i=Qe;break;case 268435456:i=Ie;break;default:i=Qe}return s=Gu.bind(null,e),i=Se(i,s),e.callbackPriority=t,e.callbackNode=i,t}return s!==null&&s!==null&&pe(s),e.callbackPriority=2,e.callbackNode=null,2}function Gu(e,t){if(dt!==0&&dt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(qn()&&e.callbackNode!==i)return null;var s=Ne;return s=Yr(e,e===Ke?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Mu(e,s,t),Wu(e,ge()),e.callbackNode!=null&&e.callbackNode===i?Gu.bind(null,e):null)}function Xu(e,t){if(qn())return null;Mu(e,t,!0)}function P_(){Z_(function(){($e&6)!==0?Se(Re,I_):qu()})}function eo(){if(Gi===0){var e=ks;e===0&&(e=Ft,Ft<<=1,(Ft&261888)===0&&(Ft=256)),Gi=e}return Gi}function Vu(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Jr(""+e)}function Yu(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 F_(e,t,i,s,f){if(t==="submit"&&i&&i.stateNode===f){var g=Vu((f[Lt]||null).action),A=s.submitter;A&&(t=(t=A[Lt]||null)?Vu(t.formAction):A.getAttribute("formAction"),t!==null&&(g=t,A=null));var H=new rn("action","action",null,s,f);e.push({event:H,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Gi!==0){var W=A?Yu(f,A):new FormData(f);Cl(i,{pending:!0,data:W,method:f.method,action:g},null,W)}}else typeof g=="function"&&(H.preventDefault(),W=A?Yu(f,A):new FormData(f),Cl(i,{pending:!0,data:W,method:f.method,action:g},g,W))},currentTarget:f}]})}}for(var to=0;to<Na.length;to++){var io=Na[to],j_=io.toLowerCase(),$_=io[0].toUpperCase()+io.slice(1);ei(j_,"on"+$_)}ei(Lc,"onAnimationEnd"),ei(Mc,"onAnimationIteration"),ei(Ac,"onAnimationStart"),ei("dblclick","onDoubleClick"),ei("focusin","onFocus"),ei("focusout","onBlur"),ei(n_,"onTransitionRun"),ei(a_,"onTransitionStart"),ei(l_,"onTransitionCancel"),ei(Rc,"onTransitionEnd"),Cs("onMouseEnter",["mouseout","mouseover"]),Cs("onMouseLeave",["mouseout","mouseover"]),Cs("onPointerEnter",["pointerout","pointerover"]),Cs("onPointerLeave",["pointerout","pointerover"]),Ji("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ji("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ji("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ji("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ji("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ji("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ur="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(Ur));function Ku(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var s=e[i],f=s.event;s=s.listeners;e:{var g=void 0;if(t)for(var A=s.length-1;0<=A;A--){var H=s[A],W=H.instance,J=H.currentTarget;if(H=H.listener,W!==g&&f.isPropagationStopped())break e;g=H,f.currentTarget=J;try{g(f)}catch(oe){ln(oe)}f.currentTarget=null,g=W}else for(A=0;A<s.length;A++){if(H=s[A],W=H.instance,J=H.currentTarget,H=H.listener,W!==g&&f.isPropagationStopped())break e;g=H,f.currentTarget=J;try{g(f)}catch(oe){ln(oe)}f.currentTarget=null,g=W}}}}function He(e,t){var i=t[va];i===void 0&&(i=t[va]=new Set);var s=e+"__bubble";i.has(s)||(Qu(t,e,2,!1),i.add(s))}function so(e,t,i){var s=0;t&&(s|=4),Qu(i,e,s,t)}var Xn="_reactListening"+Math.random().toString(36).slice(2);function ro(e){if(!e[Xn]){e[Xn]=!0,qo.forEach(function(i){i!=="selectionchange"&&(q_.has(i)||so(i,!1,e),so(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Xn]||(t[Xn]=!0,so("selectionchange",!1,t))}}function Qu(e,t,i,s){switch(Ld(t)){case 2:var f=mv;break;case 8:f=Sv;break;default:f=Co}i=f.bind(null,t,i,e),f=void 0,!xa||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(f=!0),s?f!==void 0?e.addEventListener(t,i,{capture:!0,passive:f}):e.addEventListener(t,i,!0):f!==void 0?e.addEventListener(t,i,{passive:f}):e.addEventListener(t,i,!1)}function no(e,t,i,s,f){var g=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var A=s.tag;if(A===3||A===4){var H=s.stateNode.containerInfo;if(H===f)break;if(A===4)for(A=s.return;A!==null;){var W=A.tag;if((W===3||W===4)&&A.stateNode.containerInfo===f)return;A=A.return}for(;H!==null;){if(A=ps(H),A===null)return;if(W=A.tag,W===5||W===6||W===26||W===27){s=g=A;continue e}H=H.parentNode}}s=s.return}ic(function(){var J=g,oe=ba(i),de=[];e:{var se=Dc.get(e);if(se!==void 0){var ne=rn,Ce=e;switch(e){case"keypress":if(tn(i)===0)break e;case"keydown":case"keyup":ne=Nf;break;case"focusin":Ce="focus",ne=Aa;break;case"focusout":Ce="blur",ne=Aa;break;case"beforeblur":case"afterblur":ne=Aa;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":ne=nc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ne=Ef;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ne=Pf;break;case Lc:case Mc:case Ac:ne=Af;break;case Rc:ne=jf;break;case"scroll":case"scrollend":ne=wf;break;case"wheel":ne=qf;break;case"copy":case"cut":case"paste":ne=Df;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ne=lc;break;case"toggle":case"beforetoggle":ne=Gf}var Le=(t&4)!==0,Ye=!Le&&(e==="scroll"||e==="scrollend"),Q=Le?se!==null?se+"Capture":null:se;Le=[];for(var Y=J,Z;Y!==null;){var ce=Y;if(Z=ce.stateNode,ce=ce.tag,ce!==5&&ce!==26&&ce!==27||Z===null||Q===null||(ce=ar(Y,Q),ce!=null&&Le.push(Ir(Y,ce,Z))),Ye)break;Y=Y.return}0<Le.length&&(se=new ne(se,Ce,null,i,oe),de.push({event:se,listeners:Le}))}}if((t&7)===0){e:{if(se=e==="mouseover"||e==="pointerover",ne=e==="mouseout"||e==="pointerout",se&&i!==ya&&(Ce=i.relatedTarget||i.fromElement)&&(ps(Ce)||Ce[gs]))break e;if((ne||se)&&(se=oe.window===oe?oe:(se=oe.ownerDocument)?se.defaultView||se.parentWindow:window,ne?(Ce=i.relatedTarget||i.toElement,ne=J,Ce=Ce?ps(Ce):null,Ce!==null&&(Ye=ae(Ce),Le=Ce.tag,Ce!==Ye||Le!==5&&Le!==27&&Le!==6)&&(Ce=null)):(ne=null,Ce=J),ne!==Ce)){if(Le=nc,ce="onMouseLeave",Q="onMouseEnter",Y="mouse",(e==="pointerout"||e==="pointerover")&&(Le=lc,ce="onPointerLeave",Q="onPointerEnter",Y="pointer"),Ye=ne==null?se:nr(ne),Z=Ce==null?se:nr(Ce),se=new Le(ce,Y+"leave",ne,i,oe),se.target=Ye,se.relatedTarget=Z,ce=null,ps(oe)===J&&(Le=new Le(Q,Y+"enter",Ce,i,oe),Le.target=Z,Le.relatedTarget=Ye,ce=Le),Ye=ce,ne&&Ce)t:{for(Le=W_,Q=ne,Y=Ce,Z=0,ce=Q;ce;ce=Le(ce))Z++;ce=0;for(var xe=Y;xe;xe=Le(xe))ce++;for(;0<Z-ce;)Q=Le(Q),Z--;for(;0<ce-Z;)Y=Le(Y),ce--;for(;Z--;){if(Q===Y||Y!==null&&Q===Y.alternate){Le=Q;break t}Q=Le(Q),Y=Le(Y)}Le=null}else Le=null;ne!==null&&Zu(de,se,ne,Le,!1),Ce!==null&&Ye!==null&&Zu(de,Ye,Ce,Le,!0)}}e:{if(se=J?nr(J):window,ne=se.nodeName&&se.nodeName.toLowerCase(),ne==="select"||ne==="input"&&se.type==="file")var Fe=vc;else if(fc(se))if(gc)Fe=i_;else{Fe=e_;var ye=Jf}else ne=se.nodeName,!ne||ne.toLowerCase()!=="input"||se.type!=="checkbox"&&se.type!=="radio"?J&&Ca(J.elementType)&&(Fe=vc):Fe=t_;if(Fe&&(Fe=Fe(e,J))){_c(de,Fe,i,oe);break e}ye&&ye(e,se,J),e==="focusout"&&J&&se.type==="number"&&J.memoizedProps.value!=null&&Sa(se,"number",se.value)}switch(ye=J?nr(J):window,e){case"focusin":(fc(ye)||ye.contentEditable==="true")&&(Ls=ye,ka=J,_r=null);break;case"focusout":_r=ka=Ls=null;break;case"mousedown":Ha=!0;break;case"contextmenu":case"mouseup":case"dragend":Ha=!1,xc(de,i,oe);break;case"selectionchange":if(r_)break;case"keydown":case"keyup":xc(de,i,oe)}var Be;if(Da)e:{switch(e){case"compositionstart":var Ue="onCompositionStart";break e;case"compositionend":Ue="onCompositionEnd";break e;case"compositionupdate":Ue="onCompositionUpdate";break e}Ue=void 0}else Es?uc(e,i)&&(Ue="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Ue="onCompositionStart");Ue&&(oc&&i.locale!=="ko"&&(Es||Ue!=="onCompositionStart"?Ue==="onCompositionEnd"&&Es&&(Be=sc()):(Di=oe,Ea="value"in Di?Di.value:Di.textContent,Es=!0)),ye=Vn(J,Ue),0<ye.length&&(Ue=new ac(Ue,e,null,i,oe),de.push({event:Ue,listeners:ye}),Be?Ue.data=Be:(Be=dc(i),Be!==null&&(Ue.data=Be)))),(Be=Vf?Yf(e,i):Kf(e,i))&&(Ue=Vn(J,"onBeforeInput"),0<Ue.length&&(ye=new ac("onBeforeInput","beforeinput",null,i,oe),de.push({event:ye,listeners:Ue}),ye.data=Be)),F_(de,e,J,i,oe)}Ku(de,t)})}function Ir(e,t,i){return{instance:e,listener:t,currentTarget:i}}function Vn(e,t){for(var i=t+"Capture",s=[];e!==null;){var f=e,g=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||g===null||(f=ar(e,i),f!=null&&s.unshift(Ir(e,f,g)),f=ar(e,t),f!=null&&s.push(Ir(e,f,g))),e.tag===3)return s;e=e.return}return[]}function W_(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Zu(e,t,i,s,f){for(var g=t._reactName,A=[];i!==null&&i!==s;){var H=i,W=H.alternate,J=H.stateNode;if(H=H.tag,W!==null&&W===s)break;H!==5&&H!==26&&H!==27||J===null||(W=J,f?(J=ar(i,g),J!=null&&A.unshift(Ir(i,J,W))):f||(J=ar(i,g),J!=null&&A.push(Ir(i,J,W)))),i=i.return}A.length!==0&&e.push({event:t,listeners:A})}var G_=/\r\n?/g,X_=/\u0000|\uFFFD/g;function Ju(e){return(typeof e=="string"?e:""+e).replace(G_,`
|
|
49
|
+
`).replace(X_,"")}function ed(e,t){return t=Ju(t),Ju(e)===t}function Ve(e,t,i,s,f,g){switch(i){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||bs(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&bs(e,""+s);break;case"className":Qr(e,"class",s);break;case"tabIndex":Qr(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":Qr(e,i,s);break;case"style":ec(e,s,g);break;case"data":if(t!=="object"){Qr(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=Jr(""+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 g=="function"&&(i==="formAction"?(t!=="input"&&Ve(e,t,"name",f.name,f,null),Ve(e,t,"formEncType",f.formEncType,f,null),Ve(e,t,"formMethod",f.formMethod,f,null),Ve(e,t,"formTarget",f.formTarget,f,null)):(Ve(e,t,"encType",f.encType,f,null),Ve(e,t,"method",f.method,f,null),Ve(e,t,"target",f.target,f,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=Jr(""+s),e.setAttribute(i,s);break;case"onClick":s!=null&&(e.onclick=di);break;case"onScroll":s!=null&&He("scroll",e);break;case"onScrollEnd":s!=null&&He("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(U(61));if(i=s.__html,i!=null){if(f.children!=null)throw Error(U(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=Jr(""+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":He("beforetoggle",e),He("toggle",e),Kr(e,"popover",s);break;case"xlinkActuate":ui(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":ui(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":ui(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":ui(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":ui(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":ui(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":ui(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":ui(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":ui(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Kr(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=yf.get(i)||i,Kr(e,i,s))}}function ao(e,t,i,s,f,g){switch(i){case"style":ec(e,s,g);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(U(61));if(i=s.__html,i!=null){if(f.children!=null)throw Error(U(60));e.innerHTML=i}}break;case"children":typeof s=="string"?bs(e,s):(typeof s=="number"||typeof s=="bigint")&&bs(e,""+s);break;case"onScroll":s!=null&&He("scroll",e);break;case"onScrollEnd":s!=null&&He("scrollend",e);break;case"onClick":s!=null&&(e.onclick=di);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Wo.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(f=i.endsWith("Capture"),t=i.slice(2,f?i.length-7:void 0),g=e[Lt]||null,g=g!=null?g[i]:null,typeof g=="function"&&e.removeEventListener(t,g,f),typeof s=="function")){typeof g!="function"&&g!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,s,f);break e}i in e?e[i]=s:s===!0?e.setAttribute(i,""):Kr(e,i,s)}}}function bt(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":He("error",e),He("load",e);var s=!1,f=!1,g;for(g in i)if(i.hasOwnProperty(g)){var A=i[g];if(A!=null)switch(g){case"src":s=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(U(137,t));default:Ve(e,t,g,A,i,null)}}f&&Ve(e,t,"srcSet",i.srcSet,i,null),s&&Ve(e,t,"src",i.src,i,null);return;case"input":He("invalid",e);var H=g=A=f=null,W=null,J=null;for(s in i)if(i.hasOwnProperty(s)){var oe=i[s];if(oe!=null)switch(s){case"name":f=oe;break;case"type":A=oe;break;case"checked":W=oe;break;case"defaultChecked":J=oe;break;case"value":g=oe;break;case"defaultValue":H=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(U(137,t));break;default:Ve(e,t,s,oe,i,null)}}Ko(e,g,H,W,J,A,f,!1);return;case"select":He("invalid",e),s=A=g=null;for(f in i)if(i.hasOwnProperty(f)&&(H=i[f],H!=null))switch(f){case"value":g=H;break;case"defaultValue":A=H;break;case"multiple":s=H;default:Ve(e,t,f,H,i,null)}t=g,i=A,e.multiple=!!s,t!=null?ys(e,!!s,t,!1):i!=null&&ys(e,!!s,i,!0);return;case"textarea":He("invalid",e),g=f=s=null;for(A in i)if(i.hasOwnProperty(A)&&(H=i[A],H!=null))switch(A){case"value":s=H;break;case"defaultValue":f=H;break;case"children":g=H;break;case"dangerouslySetInnerHTML":if(H!=null)throw Error(U(91));break;default:Ve(e,t,A,H,i,null)}Zo(e,s,f,g);return;case"option":for(W in i)if(i.hasOwnProperty(W)&&(s=i[W],s!=null))switch(W){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:Ve(e,t,W,s,i,null)}return;case"dialog":He("beforetoggle",e),He("toggle",e),He("cancel",e),He("close",e);break;case"iframe":case"object":He("load",e);break;case"video":case"audio":for(s=0;s<Ur.length;s++)He(Ur[s],e);break;case"image":He("error",e),He("load",e);break;case"details":He("toggle",e);break;case"embed":case"source":case"link":He("error",e),He("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(J in i)if(i.hasOwnProperty(J)&&(s=i[J],s!=null))switch(J){case"children":case"dangerouslySetInnerHTML":throw Error(U(137,t));default:Ve(e,t,J,s,i,null)}return;default:if(Ca(t)){for(oe in i)i.hasOwnProperty(oe)&&(s=i[oe],s!==void 0&&ao(e,t,oe,s,i,void 0));return}}for(H in i)i.hasOwnProperty(H)&&(s=i[H],s!=null&&Ve(e,t,H,s,i,null))}function V_(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 f=null,g=null,A=null,H=null,W=null,J=null,oe=null;for(ne in i){var de=i[ne];if(i.hasOwnProperty(ne)&&de!=null)switch(ne){case"checked":break;case"value":break;case"defaultValue":W=de;default:s.hasOwnProperty(ne)||Ve(e,t,ne,null,s,de)}}for(var se in s){var ne=s[se];if(de=i[se],s.hasOwnProperty(se)&&(ne!=null||de!=null))switch(se){case"type":g=ne;break;case"name":f=ne;break;case"checked":J=ne;break;case"defaultChecked":oe=ne;break;case"value":A=ne;break;case"defaultValue":H=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(U(137,t));break;default:ne!==de&&Ve(e,t,se,ne,s,de)}}ma(e,A,H,W,J,oe,g,f);return;case"select":ne=A=H=se=null;for(g in i)if(W=i[g],i.hasOwnProperty(g)&&W!=null)switch(g){case"value":break;case"multiple":ne=W;default:s.hasOwnProperty(g)||Ve(e,t,g,null,s,W)}for(f in s)if(g=s[f],W=i[f],s.hasOwnProperty(f)&&(g!=null||W!=null))switch(f){case"value":se=g;break;case"defaultValue":H=g;break;case"multiple":A=g;default:g!==W&&Ve(e,t,f,g,s,W)}t=H,i=A,s=ne,se!=null?ys(e,!!i,se,!1):!!s!=!!i&&(t!=null?ys(e,!!i,t,!0):ys(e,!!i,i?[]:"",!1));return;case"textarea":ne=se=null;for(H in i)if(f=i[H],i.hasOwnProperty(H)&&f!=null&&!s.hasOwnProperty(H))switch(H){case"value":break;case"children":break;default:Ve(e,t,H,null,s,f)}for(A in s)if(f=s[A],g=i[A],s.hasOwnProperty(A)&&(f!=null||g!=null))switch(A){case"value":se=f;break;case"defaultValue":ne=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(U(91));break;default:f!==g&&Ve(e,t,A,f,s,g)}Qo(e,se,ne);return;case"option":for(var Ce in i)if(se=i[Ce],i.hasOwnProperty(Ce)&&se!=null&&!s.hasOwnProperty(Ce))switch(Ce){case"selected":e.selected=!1;break;default:Ve(e,t,Ce,null,s,se)}for(W in s)if(se=s[W],ne=i[W],s.hasOwnProperty(W)&&se!==ne&&(se!=null||ne!=null))switch(W){case"selected":e.selected=se&&typeof se!="function"&&typeof se!="symbol";break;default:Ve(e,t,W,se,s,ne)}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 Le in i)se=i[Le],i.hasOwnProperty(Le)&&se!=null&&!s.hasOwnProperty(Le)&&Ve(e,t,Le,null,s,se);for(J in s)if(se=s[J],ne=i[J],s.hasOwnProperty(J)&&se!==ne&&(se!=null||ne!=null))switch(J){case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(U(137,t));break;default:Ve(e,t,J,se,s,ne)}return;default:if(Ca(t)){for(var Ye in i)se=i[Ye],i.hasOwnProperty(Ye)&&se!==void 0&&!s.hasOwnProperty(Ye)&&ao(e,t,Ye,void 0,s,se);for(oe in s)se=s[oe],ne=i[oe],!s.hasOwnProperty(oe)||se===ne||se===void 0&&ne===void 0||ao(e,t,oe,se,s,ne);return}}for(var Q in i)se=i[Q],i.hasOwnProperty(Q)&&se!=null&&!s.hasOwnProperty(Q)&&Ve(e,t,Q,null,s,se);for(de in s)se=s[de],ne=i[de],!s.hasOwnProperty(de)||se===ne||se==null&&ne==null||Ve(e,t,de,se,s,ne)}function td(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Y_(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),s=0;s<i.length;s++){var f=i[s],g=f.transferSize,A=f.initiatorType,H=f.duration;if(g&&H&&td(A)){for(A=0,H=f.responseEnd,s+=1;s<i.length;s++){var W=i[s],J=W.startTime;if(J>H)break;var oe=W.transferSize,de=W.initiatorType;oe&&td(de)&&(W=W.responseEnd,A+=oe*(W<H?1:(H-J)/(W-J)))}if(--s,t+=8*(g+A)/(f.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 lo=null,oo=null;function Yn(e){return e.nodeType===9?e:e.ownerDocument}function id(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 sd(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 co(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 ho=null;function K_(){var e=window.event;return e&&e.type==="popstate"?e===ho?!1:(ho=e,!0):(ho=null,!1)}var rd=typeof setTimeout=="function"?setTimeout:void 0,Q_=typeof clearTimeout=="function"?clearTimeout:void 0,nd=typeof Promise=="function"?Promise:void 0,Z_=typeof queueMicrotask=="function"?queueMicrotask:typeof nd<"u"?function(e){return nd.resolve(null).then(e).catch(J_)}:rd;function J_(e){setTimeout(function(){throw e})}function Xi(e){return e==="head"}function ad(e,t){var i=t,s=0;do{var f=i.nextSibling;if(e.removeChild(i),f&&f.nodeType===8)if(i=f.data,i==="/$"||i==="/&"){if(s===0){e.removeChild(f),Js(t);return}s--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")s++;else if(i==="html")Pr(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,Pr(i);for(var g=i.firstChild;g;){var A=g.nextSibling,H=g.nodeName;g[rr]||H==="SCRIPT"||H==="STYLE"||H==="LINK"&&g.rel.toLowerCase()==="stylesheet"||i.removeChild(g),g=A}}else i==="body"&&Pr(e.ownerDocument.body);i=f}while(i);Js(t)}function ld(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 uo(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":uo(i),ga(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function ev(e,t,i,s){for(;e.nodeType===1;){var f=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[rr])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(g=e.getAttribute("rel"),g==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(g!==f.rel||e.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||e.getAttribute("title")!==(f.title==null?null:f.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(g=e.getAttribute("src"),(g!==(f.src==null?null:f.src)||e.getAttribute("type")!==(f.type==null?null:f.type)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&g&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var g=f.name==null?null:""+f.name;if(f.type==="hidden"&&e.getAttribute("name")===g)return e}else return e;if(e=Kt(e.nextSibling),e===null)break}return null}function tv(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Kt(e.nextSibling),e===null))return null;return e}function od(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Kt(e.nextSibling),e===null))return null;return e}function fo(e){return e.data==="$?"||e.data==="$~"}function _o(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function iv(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 Kt(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 vo=null;function cd(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return Kt(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function hd(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 ud(e,t,i){switch(t=Yn(i),e){case"html":if(e=t.documentElement,!e)throw Error(U(452));return e;case"head":if(e=t.head,!e)throw Error(U(453));return e;case"body":if(e=t.body,!e)throw Error(U(454));return e;default:throw Error(U(451))}}function Pr(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ga(e)}var Qt=new Map,dd=new Set;function Kn(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ai=P.d;P.d={f:sv,r:rv,D:nv,C:av,L:lv,m:ov,X:hv,S:cv,M:uv};function sv(){var e=Ai.f(),t=Fn();return e||t}function rv(e){var t=ms(e);t!==null&&t.tag===5&&t.type==="form"?Rh(t):Ai.r(e)}var Ks=typeof document>"u"?null:document;function fd(e,t,i){var s=Ks;if(s&&typeof t=="string"&&t){var f=$t(t);f='link[rel="'+e+'"][href="'+f+'"]',typeof i=="string"&&(f+='[crossorigin="'+i+'"]'),dd.has(f)||(dd.add(f),e={rel:e,crossOrigin:i,href:t},s.querySelector(f)===null&&(t=s.createElement("link"),bt(t,"link",e),gt(t),s.head.appendChild(t)))}}function nv(e){Ai.D(e),fd("dns-prefetch",e,null)}function av(e,t){Ai.C(e,t),fd("preconnect",e,t)}function lv(e,t,i){Ai.L(e,t,i);var s=Ks;if(s&&e&&t){var f='link[rel="preload"][as="'+$t(t)+'"]';t==="image"&&i&&i.imageSrcSet?(f+='[imagesrcset="'+$t(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(f+='[imagesizes="'+$t(i.imageSizes)+'"]')):f+='[href="'+$t(e)+'"]';var g=f;switch(t){case"style":g=Qs(e);break;case"script":g=Zs(e)}Qt.has(g)||(e=a({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),Qt.set(g,e),s.querySelector(f)!==null||t==="style"&&s.querySelector(Fr(g))||t==="script"&&s.querySelector(jr(g))||(t=s.createElement("link"),bt(t,"link",e),gt(t),s.head.appendChild(t)))}}function ov(e,t){Ai.m(e,t);var i=Ks;if(i&&e){var s=t&&typeof t.as=="string"?t.as:"script",f='link[rel="modulepreload"][as="'+$t(s)+'"][href="'+$t(e)+'"]',g=f;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=Zs(e)}if(!Qt.has(g)&&(e=a({rel:"modulepreload",href:e},t),Qt.set(g,e),i.querySelector(f)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(jr(g)))return}s=i.createElement("link"),bt(s,"link",e),gt(s),i.head.appendChild(s)}}}function cv(e,t,i){Ai.S(e,t,i);var s=Ks;if(s&&e){var f=Ss(s).hoistableStyles,g=Qs(e);t=t||"default";var A=f.get(g);if(!A){var H={loading:0,preload:null};if(A=s.querySelector(Fr(g)))H.loading=5;else{e=a({rel:"stylesheet",href:e,"data-precedence":t},i),(i=Qt.get(g))&&go(e,i);var W=A=s.createElement("link");gt(W),bt(W,"link",e),W._p=new Promise(function(J,oe){W.onload=J,W.onerror=oe}),W.addEventListener("load",function(){H.loading|=1}),W.addEventListener("error",function(){H.loading|=2}),H.loading|=4,Qn(A,t,s)}A={type:"stylesheet",instance:A,count:1,state:H},f.set(g,A)}}}function hv(e,t){Ai.X(e,t);var i=Ks;if(i&&e){var s=Ss(i).hoistableScripts,f=Zs(e),g=s.get(f);g||(g=i.querySelector(jr(f)),g||(e=a({src:e,async:!0},t),(t=Qt.get(f))&&po(e,t),g=i.createElement("script"),gt(g),bt(g,"link",e),i.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},s.set(f,g))}}function uv(e,t){Ai.M(e,t);var i=Ks;if(i&&e){var s=Ss(i).hoistableScripts,f=Zs(e),g=s.get(f);g||(g=i.querySelector(jr(f)),g||(e=a({src:e,async:!0,type:"module"},t),(t=Qt.get(f))&&po(e,t),g=i.createElement("script"),gt(g),bt(g,"link",e),i.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},s.set(f,g))}}function _d(e,t,i,s){var f=(f=le.current)?Kn(f):null;if(!f)throw Error(U(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=Qs(i.href),i=Ss(f).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=Qs(i.href);var g=Ss(f).hoistableStyles,A=g.get(e);if(A||(f=f.ownerDocument||f,A={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(e,A),(g=f.querySelector(Fr(e)))&&!g._p&&(A.instance=g,A.state.loading=5),Qt.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},Qt.set(e,i),g||dv(f,e,i,A.state))),t&&s===null)throw Error(U(528,""));return A}if(t&&s!==null)throw Error(U(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=Ss(f).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(U(444,e))}}function Qs(e){return'href="'+$t(e)+'"'}function Fr(e){return'link[rel="stylesheet"]['+e+"]"}function vd(e){return a({},e,{"data-precedence":e.precedence,precedence:null})}function dv(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}),bt(t,"link",i),gt(t),e.head.appendChild(t))}function Zs(e){return'[src="'+$t(e)+'"]'}function jr(e){return"script[async]"+e}function gd(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+$t(i.href)+'"]');if(s)return t.instance=s,gt(s),s;var f=a({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),gt(s),bt(s,"style",f),Qn(s,i.precedence,e),t.instance=s;case"stylesheet":f=Qs(i.href);var g=e.querySelector(Fr(f));if(g)return t.state.loading|=4,t.instance=g,gt(g),g;s=vd(i),(f=Qt.get(f))&&go(s,f),g=(e.ownerDocument||e).createElement("link"),gt(g);var A=g;return A._p=new Promise(function(H,W){A.onload=H,A.onerror=W}),bt(g,"link",s),t.state.loading|=4,Qn(g,i.precedence,e),t.instance=g;case"script":return g=Zs(i.src),(f=e.querySelector(jr(g)))?(t.instance=f,gt(f),f):(s=i,(f=Qt.get(g))&&(s=a({},i),po(s,f)),e=e.ownerDocument||e,f=e.createElement("script"),gt(f),bt(f,"link",s),e.head.appendChild(f),t.instance=f);case"void":return null;default:throw Error(U(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,Qn(s,i.precedence,e));return t.instance}function Qn(e,t,i){for(var s=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=s.length?s[s.length-1]:null,g=f,A=0;A<s.length;A++){var H=s[A];if(H.dataset.precedence===t)g=H;else if(g!==f)break}g?g.parentNode.insertBefore(e,g.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function go(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function po(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Zn=null;function pd(e,t,i){if(Zn===null){var s=new Map,f=Zn=new Map;f.set(i,s)}else f=Zn,s=f.get(i),s||(s=new Map,f.set(i,s));if(s.has(e))return s;for(s.set(e,null),i=i.getElementsByTagName(e),f=0;f<i.length;f++){var g=i[f];if(!(g[rr]||g[mt]||e==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var A=g.getAttribute(t)||"";A=e+A;var H=s.get(A);H?H.push(g):s.set(A,[g])}}return s}function md(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function fv(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 Sd(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function _v(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 f=Qs(s.href),g=t.querySelector(Fr(f));if(g){t=g._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Jn.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=g,gt(g);return}g=t.ownerDocument||t,s=vd(s),(f=Qt.get(f))&&go(s,f),g=g.createElement("link"),gt(g);var A=g;A._p=new Promise(function(H,W){A.onload=H,A.onerror=W}),bt(g,"link",s),i.instance=g}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=Jn.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var mo=0;function vv(e,t){return e.stylesheets&&e.count===0&&ta(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var s=setTimeout(function(){if(e.stylesheets&&ta(e,e.stylesheets),e.unsuspend){var g=e.unsuspend;e.unsuspend=null,g()}},6e4+t);0<e.imgBytes&&mo===0&&(mo=62500*Y_());var f=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ta(e,e.stylesheets),e.unsuspend)){var g=e.unsuspend;e.unsuspend=null,g()}},(e.imgBytes>mo?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(f)}}:null}function Jn(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ta(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ea=null;function ta(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ea=new Map,t.forEach(gv,e),ea=null,Jn.call(e))}function gv(e,t){if(!(t.state.loading&4)){var i=ea.get(e);if(i)var s=i.get(null);else{i=new Map,ea.set(e,i);for(var f=e.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<f.length;g++){var A=f[g];(A.nodeName==="LINK"||A.getAttribute("media")!=="not all")&&(i.set(A.dataset.precedence,A),s=A)}s&&i.set(null,s)}f=t.instance,A=f.getAttribute("data-precedence"),g=i.get(A)||s,g===s&&i.set(null,f),i.set(A,f),this.count++,s=Jn.bind(this),f.addEventListener("load",s),f.addEventListener("error",s),g?g.parentNode.insertBefore(f,g.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(f,e.firstChild)),t.state.loading|=4}}var $r={$$typeof:l,Provider:null,Consumer:null,_currentValue:z,_currentValue2:z,_threadCount:0};function pv(e,t,i,s,f,g,A,H,W){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=da(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=da(0),this.hiddenUpdates=da(null),this.identifierPrefix=s,this.onUncaughtError=f,this.onCaughtError=g,this.onRecoverableError=A,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=W,this.incompleteTransitions=new Map}function Cd(e,t,i,s,f,g,A,H,W,J,oe,de){return e=new pv(e,t,i,A,W,J,oe,de,H),t=1,g===!0&&(t|=24),g=Ht(3,null,null,t),e.current=g,g.stateNode=e,t=Ka(),t.refCount++,e.pooledCache=t,t.refCount++,g.memoizedState={element:s,isDehydrated:i,cache:t},el(g),e}function yd(e){return e?(e=Rs,e):Rs}function bd(e,t,i,s,f,g){f=yd(f),s.context===null?s.context=f:s.pendingContext=f,s=zi(t),s.payload={element:i},g=g===void 0?null:g,g!==null&&(s.callback=g),i=Ni(e,s,t),i!==null&&(Bt(i,e,t),yr(i,e,t))}function wd(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function So(e,t){wd(e,t),(e=e.alternate)&&wd(e,t)}function xd(e){if(e.tag===13||e.tag===31){var t=ss(e,67108864);t!==null&&Bt(t,e,67108864),So(e,67108864)}}function Ed(e){if(e.tag===13||e.tag===31){var t=Pt();t=fa(t);var i=ss(e,t);i!==null&&Bt(i,e,t),So(e,t)}}var ia=!0;function mv(e,t,i,s){var f=I.T;I.T=null;var g=P.p;try{P.p=2,Co(e,t,i,s)}finally{P.p=g,I.T=f}}function Sv(e,t,i,s){var f=I.T;I.T=null;var g=P.p;try{P.p=8,Co(e,t,i,s)}finally{P.p=g,I.T=f}}function Co(e,t,i,s){if(ia){var f=yo(s);if(f===null)no(e,t,s,sa,i),Md(e,s);else if(yv(f,e,t,i,s))s.stopPropagation();else if(Md(e,s),t&4&&-1<Cv.indexOf(e)){for(;f!==null;){var g=ms(f);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var A=Jt(g.pendingLanes);if(A!==0){var H=g;for(H.pendingLanes|=2,H.entangledLanes|=2;A;){var W=1<<31-ut(A);H.entanglements[1]|=W,A&=~W}oi(g),($e&6)===0&&(In=ge()+500,Nr(0))}}break;case 31:case 13:H=ss(g,2),H!==null&&Bt(H,g,2),Fn(),So(g,2)}if(g=yo(s),g===null&&no(e,t,s,sa,i),g===f)break;f=g}f!==null&&s.stopPropagation()}else no(e,t,s,null,i)}}function yo(e){return e=ba(e),bo(e)}var sa=null;function bo(e){if(sa=null,e=ps(e),e!==null){var t=ae(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=j(t),e!==null)return e;e=null}else if(i===31){if(e=n(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 sa=e,null}function Ld(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(ze()){case Re:return 2;case _t:return 8;case Qe:case it:return 32;case Ie:return 268435456;default:return 32}default:return 32}}var wo=!1,Vi=null,Yi=null,Ki=null,qr=new Map,Wr=new Map,Qi=[],Cv="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 Md(e,t){switch(e){case"focusin":case"focusout":Vi=null;break;case"dragenter":case"dragleave":Yi=null;break;case"mouseover":case"mouseout":Ki=null;break;case"pointerover":case"pointerout":qr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Wr.delete(t.pointerId)}}function Gr(e,t,i,s,f,g){return e===null||e.nativeEvent!==g?(e={blockedOn:t,domEventName:i,eventSystemFlags:s,nativeEvent:g,targetContainers:[f]},t!==null&&(t=ms(t),t!==null&&xd(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,f!==null&&t.indexOf(f)===-1&&t.push(f),e)}function yv(e,t,i,s,f){switch(t){case"focusin":return Vi=Gr(Vi,e,t,i,s,f),!0;case"dragenter":return Yi=Gr(Yi,e,t,i,s,f),!0;case"mouseover":return Ki=Gr(Ki,e,t,i,s,f),!0;case"pointerover":var g=f.pointerId;return qr.set(g,Gr(qr.get(g)||null,e,t,i,s,f)),!0;case"gotpointercapture":return g=f.pointerId,Wr.set(g,Gr(Wr.get(g)||null,e,t,i,s,f)),!0}return!1}function Ad(e){var t=ps(e.target);if(t!==null){var i=ae(t);if(i!==null){if(t=i.tag,t===13){if(t=j(i),t!==null){e.blockedOn=t,jo(e.priority,function(){Ed(i)});return}}else if(t===31){if(t=n(i),t!==null){e.blockedOn=t,jo(e.priority,function(){Ed(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 ra(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=yo(e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);ya=s,i.target.dispatchEvent(s),ya=null}else return t=ms(i),t!==null&&xd(t),e.blockedOn=i,!1;t.shift()}return!0}function Rd(e,t,i){ra(e)&&i.delete(t)}function bv(){wo=!1,Vi!==null&&ra(Vi)&&(Vi=null),Yi!==null&&ra(Yi)&&(Yi=null),Ki!==null&&ra(Ki)&&(Ki=null),qr.forEach(Rd),Wr.forEach(Rd)}function na(e,t){e.blockedOn===t&&(e.blockedOn=null,wo||(wo=!0,F.unstable_scheduleCallback(F.unstable_NormalPriority,bv)))}var aa=null;function Dd(e){aa!==e&&(aa=e,F.unstable_scheduleCallback(F.unstable_NormalPriority,function(){aa===e&&(aa=null);for(var t=0;t<e.length;t+=3){var i=e[t],s=e[t+1],f=e[t+2];if(typeof s!="function"){if(bo(s||i)===null)continue;break}var g=ms(i);g!==null&&(e.splice(t,3),t-=3,Cl(g,{pending:!0,data:f,method:i.method,action:s},s,f))}}))}function Js(e){function t(W){return na(W,e)}Vi!==null&&na(Vi,e),Yi!==null&&na(Yi,e),Ki!==null&&na(Ki,e),qr.forEach(t),Wr.forEach(t);for(var i=0;i<Qi.length;i++){var s=Qi[i];s.blockedOn===e&&(s.blockedOn=null)}for(;0<Qi.length&&(i=Qi[0],i.blockedOn===null);)Ad(i),i.blockedOn===null&&Qi.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(s=0;s<i.length;s+=3){var f=i[s],g=i[s+1],A=f[Lt]||null;if(typeof g=="function")A||Dd(i);else if(A){var H=null;if(g&&g.hasAttribute("formAction")){if(f=g,A=g[Lt]||null)H=A.formAction;else if(bo(f)!==null)continue}else H=A.action;typeof H=="function"?i[s+1]=H:(i.splice(s,3),s-=3),Dd(i)}}}function Td(){function e(g){g.canIntercept&&g.info==="react-transition"&&g.intercept({handler:function(){return new Promise(function(A){return f=A})},focusReset:"manual",scroll:"manual"})}function t(){f!==null&&(f(),f=null),s||setTimeout(i,20)}function i(){if(!s&&!navigation.transition){var g=navigation.currentEntry;g&&g.url!=null&&navigation.navigate(g.url,{state:g.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,f=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),f!==null&&(f(),f=null)}}}function xo(e){this._internalRoot=e}la.prototype.render=xo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(U(409));var i=t.current,s=Pt();bd(i,s,e,t,null,null)},la.prototype.unmount=xo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;bd(e.current,2,null,e,null,null),Fn(),t[gs]=null}};function la(e){this._internalRoot=e}la.prototype.unstable_scheduleHydration=function(e){if(e){var t=Fo();e={blockedOn:null,target:e,priority:t};for(var i=0;i<Qi.length&&t!==0&&t<Qi[i].priority;i++);Qi.splice(i,0,e),i===0&&Ad(e)}};var Bd=V.version;if(Bd!=="19.2.4")throw Error(U(527,Bd,"19.2.4"));P.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(U(188)):(e=Object.keys(e).join(","),Error(U(268,e)));return e=d(t),e=e!==null?_(e):null,e=e===null?null:e.stateNode,e};var wv={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:I,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var oa=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!oa.isDisabled&&oa.supportsFiber)try{xt=oa.inject(wv),tt=oa}catch{}}return Vr.createRoot=function(e,t){if(!ee(e))throw Error(U(299));var i=!1,s="",f=Ih,g=Ph,A=Fh;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(f=t.onUncaughtError),t.onCaughtError!==void 0&&(g=t.onCaughtError),t.onRecoverableError!==void 0&&(A=t.onRecoverableError)),t=Cd(e,1,!1,null,null,i,s,null,f,g,A,Td),e[gs]=t.current,ro(e),new xo(t)},Vr.hydrateRoot=function(e,t,i){if(!ee(e))throw Error(U(299));var s=!1,f="",g=Ih,A=Ph,H=Fh,W=null;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(f=i.identifierPrefix),i.onUncaughtError!==void 0&&(g=i.onUncaughtError),i.onCaughtError!==void 0&&(A=i.onCaughtError),i.onRecoverableError!==void 0&&(H=i.onRecoverableError),i.formState!==void 0&&(W=i.formState)),t=Cd(e,1,!0,t,i??null,s,f,W,g,A,H,Td),t.context=yd(null),i=t.current,s=Pt(),s=fa(s),f=zi(s),f.callback=null,Ni(i,f,s),i=s,t.current.lanes=i,sr(t,i),oi(t),e[gs]=t.current,ro(e),new la(t)},Vr.version="19.2.4",Vr}var jd;function Hv(){if(jd)return Mo.exports;jd=1;function F(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(F)}catch(V){console.error(V)}}return F(),Mo.exports=kv(),Mo.exports}var zv=Hv();const Zd=768,Nv=1e3;function Jd(){return"./"}function ci(F){const V=Jd(),X=F.startsWith("/")?F.slice(1):F;return V+X}function hi(){const F=localStorage.getItem("codev-web-key");return F?{Authorization:`Bearer ${F}`}:{}}async function Uv(){const F=await fetch(ci("api/state"),{headers:hi()});if(!F.ok)throw new Error(`Failed to fetch state: ${F.status}`);return F.json()}async function Iv(){const F=await fetch(ci("api/overview"),{headers:hi()});if(!F.ok)throw new Error(`Failed to fetch overview: ${F.status}`);return F.json()}async function Pv(){await fetch(ci("api/overview/refresh"),{method:"POST",headers:hi()})}async function Fv(){const F=await fetch(ci("api/tabs/shell"),{method:"POST",headers:{"Content-Type":"application/json",...hi()}});if(!F.ok)throw new Error(await F.text());return F.json()}async function ef(F,V,X){const U=await fetch(ci("api/tabs/file"),{method:"POST",headers:{"Content-Type":"application/json",...hi()},body:JSON.stringify({path:F,line:V,terminalId:X})});if(!U.ok)throw new Error(await U.text());return U.json()}async function jv(F){const V=await fetch(ci(`api/tabs/${F}`),{method:"DELETE",headers:hi()});if(!V.ok)throw new Error(await V.text())}async function $v(){const F=await fetch(ci("api/files"),{headers:hi()});if(!F.ok)throw new Error(`Failed to fetch files: ${F.status}`);return F.json()}async function tf(F){const V=await fetch(ci("api/paste-image"),{method:"POST",headers:{"Content-Type":F.type||"image/png",...hi()},body:F});if(!V.ok)throw new Error(`Image upload failed: ${V.status}`);return V.json()}function $d(F){if(F.terminalId){const V=window.location.pathname;return`${V.endsWith("/")?V:V+"/"}ws/terminal/${F.terminalId}`}return null}async function qv(){const F=await fetch(ci("api/git/status"),{headers:hi()});if(!F.ok)throw new Error(`Failed to fetch git status: ${F.status}`);return F.json()}async function Wv(){const F=await fetch(ci("api/files/recent"),{headers:hi()});if(!F.ok)throw new Error(`Failed to fetch recent files: ${F.status}`);return F.json()}function Gv(){const[F,V]=be.useState(null),[X,U]=be.useState(null),ee=be.useCallback(async()=>{try{const ae=await Uv();V(ae),U(null)}catch(ae){U(ae.message)}},[]);return be.useEffect(()=>{ee();const ae=setInterval(ee,Nv);return()=>clearInterval(ae)},[ee]),{state:F,error:X,refresh:ee}}function Xv(F){const V=[{id:"work",type:"work",label:"Work",closable:!1}];F!=null&&F.architect&&V.push({id:"architect",type:"architect",label:"Architect",closable:!1,terminalId:F.architect.terminalId,persistent:F.architect.persistent});for(const X of(F==null?void 0:F.builders)??[])V.push({id:X.id,type:"builder",label:X.name||X.id,closable:!0,projectId:X.id,terminalId:X.terminalId,persistent:X.persistent});for(const X of(F==null?void 0:F.utils)??[])!X.terminalId&&(!X.pid||X.pid===0)||V.push({id:X.id,type:"shell",label:X.name||`Shell ${X.id}`,closable:!0,utilId:X.id,terminalId:X.terminalId,persistent:X.persistent});for(const X of(F==null?void 0:F.annotations)??[]){const U=X.file.split("/").pop()??X.file;V.push({id:X.id,type:"file",label:U,closable:!0,annotationId:X.id,filePath:X.file})}return V}function Vv(F){const[V,X]=be.useState("work"),U=be.useRef(null),ee=be.useRef(!1),ae=Xv(F);be.useEffect(()=>{if(ee.current||F===null)return;const d=new URLSearchParams(window.location.search).get("tab");if(d){const _=ae.find(a=>a.id===d||a.type===d);if(_){X(_.id),ee.current=!0;const a=new URL(window.location.href);a.searchParams.delete("tab"),window.history.replaceState({},"",a.toString())}}else ee.current=!0},[ae,F]),be.useEffect(()=>{const u=new Set(ae.map(d=>d.id));if(U.current===null){F!==null&&(U.current=u);return}for(const d of ae)!U.current.has(d.id)&&d.type!=="architect"&&X(d.id);U.current=u},[ae.map(u=>u.id).join(","),F!==null]);const j=be.useCallback(u=>{X(u)},[]),n=ae.find(u=>u.id===V)??ae[0];return{tabs:ae,activeTab:n,activeTabId:V,selectTab:j}}function sf(F){const[V,X]=be.useState(()=>typeof window<"u"?window.matchMedia(F).matches:!1);return be.useEffect(()=>{const U=window.matchMedia(F),ee=ae=>X(ae.matches);return U.addEventListener("change",ee),X(U.matches),()=>U.removeEventListener("change",ee)},[F]),V}function Yv({left:F,right:V,defaultSplit:X=50}){const[U,ee]=be.useState(X),ae=be.useRef(null),j=be.useRef(!1),n=be.useCallback(u=>{u.preventDefault(),j.current=!0;const d=a=>{if(!j.current||!ae.current)return;const p=ae.current.getBoundingClientRect(),w=(a.clientX-p.left)/p.width*100;ee(Math.max(20,Math.min(80,w)))},_=()=>{j.current=!1,document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",_)};document.addEventListener("mousemove",d),document.addEventListener("mouseup",_)},[]);return re.jsxs("div",{ref:ae,className:"split-pane",children:[re.jsx("div",{className:"split-left",style:{width:`${U}%`},children:F}),re.jsx("div",{className:"split-handle",onMouseDown:n,role:"separator","aria-label":"Resize panels"}),re.jsx("div",{className:"split-right",style:{width:`${100-U}%`},children:V})]})}function rf({tabs:F,activeTabId:V,onSelectTab:X,onRefresh:U}){const ee=async(ae,j)=>{ae.stopPropagation();try{await jv(j.id),U()}catch(n){console.error("Failed to close tab:",n)}};return re.jsx("div",{className:"tab-bar",role:"tablist","aria-label":"Content tabs",children:F.map(ae=>re.jsxs("button",{role:"tab","aria-selected":ae.id===V,className:`tab ${ae.id===V?"tab-active":""}`,onClick:()=>X(ae.id),title:ae.label,children:[re.jsx("span",{className:"tab-label",children:ae.label}),ae.closable&&re.jsx("span",{className:"tab-close",onClick:j=>ee(j,ae),role:"button","aria-label":`Close ${ae.label}`,tabIndex:0,onKeyDown:j=>{(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),ee(j,ae))},children:"×"})]},ae.id))})}var To={exports:{}},qd;function Kv(){return qd||(qd=1,(function(F,V){(function(X,U){F.exports=U()})(globalThis,(()=>(()=>{var X={4567:function(j,n,u){var d=this&&this.__decorate||function(o,l,S,x){var v,y=arguments.length,m=y<3?l:x===null?x=Object.getOwnPropertyDescriptor(l,S):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(o,l,S,x);else for(var C=o.length-1;C>=0;C--)(v=o[C])&&(m=(y<3?v(m):y>3?v(l,S,m):v(l,S))||m);return y>3&&m&&Object.defineProperty(l,S,m),m},_=this&&this.__param||function(o,l){return function(S,x){l(S,x,o)}};Object.defineProperty(n,"__esModule",{value:!0}),n.AccessibilityManager=void 0;const a=u(9042),p=u(9924),w=u(844),b=u(4725),c=u(2585),r=u(3656);let h=n.AccessibilityManager=class extends w.Disposable{constructor(o,l,S,x){super(),this._terminal=o,this._coreBrowserService=S,this._renderService=x,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 v=0;v<this._terminal.rows;v++)this._rowElements[v]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[v]);if(this._topBoundaryFocusListener=v=>this._handleBoundaryFocus(v,0),this._bottomBoundaryFocusListener=v=>this._handleBoundaryFocus(v,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 p.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((v=>this._handleResize(v.rows)))),this.register(this._terminal.onRender((v=>this._refreshRows(v.start,v.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((v=>this._handleChar(v)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
50
|
+
`)))),this.register(this._terminal.onA11yTab((v=>this._handleTab(v)))),this.register(this._terminal.onKey((v=>this._handleKey(v.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,r.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,w.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(o){for(let l=0;l<o;l++)this._handleChar(" ")}_handleChar(o){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==o&&(this._charsToAnnounce+=o):this._charsToAnnounce+=o,o===`
|
|
51
|
+
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=a.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(o){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(o)||this._charsToConsume.push(o)}_refreshRows(o,l){this._liveRegionDebouncer.refresh(o,l,this._terminal.rows)}_renderRows(o,l){const S=this._terminal.buffer,x=S.lines.length.toString();for(let v=o;v<=l;v++){const y=S.lines.get(S.ydisp+v),m=[],C=(y==null?void 0:y.translateToString(!0,void 0,void 0,m))||"",E=(S.ydisp+v+1).toString(),R=this._rowElements[v];R&&(C.length===0?(R.innerText=" ",this._rowColumns.set(R,[0,1])):(R.textContent=C,this._rowColumns.set(R,m)),R.setAttribute("aria-posinset",E),R.setAttribute("aria-setsize",x))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(o,l){const S=o.target,x=this._rowElements[l===0?1:this._rowElements.length-2];if(S.getAttribute("aria-posinset")===(l===0?"1":`${this._terminal.buffer.lines.length}`)||o.relatedTarget!==x)return;let v,y;if(l===0?(v=S,y=this._rowElements.pop(),this._rowContainer.removeChild(y)):(v=this._rowElements.shift(),y=S,this._rowContainer.removeChild(v)),v.removeEventListener("focus",this._topBoundaryFocusListener),y.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(),o.preventDefault(),o.stopImmediatePropagation()}_handleSelectionChange(){var C;if(this._rowElements.length===0)return;const o=document.getSelection();if(!o)return;if(o.isCollapsed)return void(this._rowContainer.contains(o.anchorNode)&&this._terminal.clearSelection());if(!o.anchorNode||!o.focusNode)return void console.error("anchorNode and/or focusNode are null");let l={node:o.anchorNode,offset:o.anchorOffset},S={node:o.focusNode,offset:o.focusOffset};if((l.node.compareDocumentPosition(S.node)&Node.DOCUMENT_POSITION_PRECEDING||l.node===S.node&&l.offset>S.offset)&&([l,S]=[S,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 x=this._rowElements.slice(-1)[0];if(S.node.compareDocumentPosition(x)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(S={node:x,offset:((C=x.textContent)==null?void 0:C.length)??0}),!this._rowContainer.contains(S.node))return;const v=({node:E,offset:R})=>{const L=E instanceof Text?E.parentNode:E;let D=parseInt(L==null?void 0:L.getAttribute("aria-posinset"),10)-1;if(isNaN(D))return console.warn("row is invalid. Race condition?"),null;const O=this._rowColumns.get(L);if(!O)return console.warn("columns is null. Race condition?"),null;let $=R<O.length?O[R]:O.slice(-1)[0]+1;return $>=this._terminal.cols&&(++D,$=0),{row:D,column:$}},y=v(l),m=v(S);if(y&&m){if(y.row>m.row||y.row===m.row&&y.column>=m.column)throw new Error("invalid range");this._terminal.select(y.column,y.row,(m.row-y.row)*this._terminal.cols-y.column+m.column)}}_handleResize(o){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>o;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const o=this._coreBrowserService.mainDocument.createElement("div");return o.setAttribute("role","listitem"),o.tabIndex=-1,this._refreshRowDimensions(o),o}_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 o=0;o<this._terminal.rows;o++)this._refreshRowDimensions(this._rowElements[o])}}_refreshRowDimensions(o){o.style.height=`${this._renderService.dimensions.css.cell.height}px`}};n.AccessibilityManager=h=d([_(1,c.IInstantiationService),_(2,b.ICoreBrowserService),_(3,b.IRenderService)],h)},3614:(j,n)=>{function u(p){return p.replace(/\r?\n/g,"\r")}function d(p,w){return w?"\x1B[200~"+p+"\x1B[201~":p}function _(p,w,b,c){p=d(p=u(p),b.decPrivateModes.bracketedPasteMode&&c.rawOptions.ignoreBracketedPasteMode!==!0),b.triggerDataEvent(p,!0),w.value=""}function a(p,w,b){const c=b.getBoundingClientRect(),r=p.clientX-c.left-10,h=p.clientY-c.top-10;w.style.width="20px",w.style.height="20px",w.style.left=`${r}px`,w.style.top=`${h}px`,w.style.zIndex="1000",w.focus()}Object.defineProperty(n,"__esModule",{value:!0}),n.rightClickHandler=n.moveTextAreaUnderMouseCursor=n.paste=n.handlePasteEvent=n.copyHandler=n.bracketTextForPaste=n.prepareTextForTerminal=void 0,n.prepareTextForTerminal=u,n.bracketTextForPaste=d,n.copyHandler=function(p,w){p.clipboardData&&p.clipboardData.setData("text/plain",w.selectionText),p.preventDefault()},n.handlePasteEvent=function(p,w,b,c){p.stopPropagation(),p.clipboardData&&_(p.clipboardData.getData("text/plain"),w,b,c)},n.paste=_,n.moveTextAreaUnderMouseCursor=a,n.rightClickHandler=function(p,w,b,c,r){a(p,w,b),r&&c.rightClickSelect(p),w.value=c.selectionText,w.select()}},7239:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ColorContrastCache=void 0;const d=u(1505);n.ColorContrastCache=class{constructor(){this._color=new d.TwoKeyMap,this._css=new d.TwoKeyMap}setCss(_,a,p){this._css.set(_,a,p)}getCss(_,a){return this._css.get(_,a)}setColor(_,a,p){this._color.set(_,a,p)}getColor(_,a){return this._color.get(_,a)}clear(){this._color.clear(),this._css.clear()}}},3656:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.addDisposableDomListener=void 0,n.addDisposableDomListener=function(u,d,_,a){u.addEventListener(d,_,a);let p=!1;return{dispose:()=>{p||(p=!0,u.removeEventListener(d,_,a))}}}},3551:function(j,n,u){var d=this&&this.__decorate||function(h,o,l,S){var x,v=arguments.length,y=v<3?o:S===null?S=Object.getOwnPropertyDescriptor(o,l):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(h,o,l,S);else for(var m=h.length-1;m>=0;m--)(x=h[m])&&(y=(v<3?x(y):v>3?x(o,l,y):x(o,l))||y);return v>3&&y&&Object.defineProperty(o,l,y),y},_=this&&this.__param||function(h,o){return function(l,S){o(l,S,h)}};Object.defineProperty(n,"__esModule",{value:!0}),n.Linkifier=void 0;const a=u(3656),p=u(8460),w=u(844),b=u(2585),c=u(4725);let r=n.Linkifier=class extends w.Disposable{get currentLink(){return this._currentLink}constructor(h,o,l,S,x){super(),this._element=h,this._mouseService=o,this._renderService=l,this._bufferService=S,this._linkProviderService=x,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new p.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new p.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,w.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,w.toDisposable)((()=>{var v;this._lastMouseEvent=void 0,(v=this._activeProviderReplies)==null||v.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,a.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,a.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,a.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,a.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(h){this._lastMouseEvent=h;const o=this._positionFromMouseEvent(h,this._element,this._mouseService);if(!o)return;this._isMouseOut=!1;const l=h.composedPath();for(let S=0;S<l.length;S++){const x=l[S];if(x.classList.contains("xterm"))break;if(x.classList.contains("xterm-hover"))return}this._lastBufferCell&&o.x===this._lastBufferCell.x&&o.y===this._lastBufferCell.y||(this._handleHover(o),this._lastBufferCell=o)}_handleHover(h){if(this._activeLine!==h.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(h,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,h)||(this._clearCurrentLink(),this._askForLink(h,!0))}_askForLink(h,o){var S,x;this._activeProviderReplies&&o||((S=this._activeProviderReplies)==null||S.forEach((v=>{v==null||v.forEach((y=>{y.link.dispose&&y.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=h.y);let l=!1;for(const[v,y]of this._linkProviderService.linkProviders.entries())o?(x=this._activeProviderReplies)!=null&&x.get(v)&&(l=this._checkLinkProviderResult(v,h,l)):y.provideLinks(h.y,(m=>{var E,R;if(this._isMouseOut)return;const C=m==null?void 0:m.map((L=>({link:L})));(E=this._activeProviderReplies)==null||E.set(v,C),l=this._checkLinkProviderResult(v,h,l),((R=this._activeProviderReplies)==null?void 0:R.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(h.y,this._activeProviderReplies)}))}_removeIntersectingLinks(h,o){const l=new Set;for(let S=0;S<o.size;S++){const x=o.get(S);if(x)for(let v=0;v<x.length;v++){const y=x[v],m=y.link.range.start.y<h?0:y.link.range.start.x,C=y.link.range.end.y>h?this._bufferService.cols:y.link.range.end.x;for(let E=m;E<=C;E++){if(l.has(E)){x.splice(v--,1);break}l.add(E)}}}}_checkLinkProviderResult(h,o,l){var v;if(!this._activeProviderReplies)return l;const S=this._activeProviderReplies.get(h);let x=!1;for(let y=0;y<h;y++)this._activeProviderReplies.has(y)&&!this._activeProviderReplies.get(y)||(x=!0);if(!x&&S){const y=S.find((m=>this._linkAtPosition(m.link,o)));y&&(l=!0,this._handleNewLink(y))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!l)for(let y=0;y<this._activeProviderReplies.size;y++){const m=(v=this._activeProviderReplies.get(y))==null?void 0:v.find((C=>this._linkAtPosition(C.link,o)));if(m){l=!0,this._handleNewLink(m);break}}return l}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(h){if(!this._currentLink)return;const o=this._positionFromMouseEvent(h,this._element,this._mouseService);o&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,o)&&this._currentLink.link.activate(h,this._currentLink.link.text)}_clearCurrentLink(h,o){this._currentLink&&this._lastMouseEvent&&(!h||!o||this._currentLink.link.range.start.y>=h&&this._currentLink.link.range.end.y<=o)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,w.disposeArray)(this._linkCacheDisposables))}_handleNewLink(h){if(!this._lastMouseEvent)return;const o=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);o&&this._linkAtPosition(h.link,o)&&(this._currentLink=h,this._currentLink.state={decorations:{underline:h.link.decorations===void 0||h.link.decorations.underline,pointerCursor:h.link.decorations===void 0||h.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,h.link,this._lastMouseEvent),h.link.decorations={},Object.defineProperties(h.link.decorations,{pointerCursor:{get:()=>{var l,S;return(S=(l=this._currentLink)==null?void 0:l.state)==null?void 0:S.decorations.pointerCursor},set:l=>{var S;(S=this._currentLink)!=null&&S.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,S;return(S=(l=this._currentLink)==null?void 0:l.state)==null?void 0:S.decorations.underline},set:l=>{var S,x,v;(S=this._currentLink)!=null&&S.state&&((v=(x=this._currentLink)==null?void 0:x.state)==null?void 0:v.decorations.underline)!==l&&(this._currentLink.state.decorations.underline=l,this._currentLink.state.isHovered&&this._fireUnderlineEvent(h.link,l))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((l=>{if(!this._currentLink)return;const S=l.start===0?0:l.start+1+this._bufferService.buffer.ydisp,x=this._bufferService.buffer.ydisp+1+l.end;if(this._currentLink.link.range.start.y>=S&&this._currentLink.link.range.end.y<=x&&(this._clearCurrentLink(S,x),this._lastMouseEvent)){const v=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);v&&this._askForLink(v,!1)}}))))}_linkHover(h,o,l){var S;(S=this._currentLink)!=null&&S.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(o,!0),this._currentLink.state.decorations.pointerCursor&&h.classList.add("xterm-cursor-pointer")),o.hover&&o.hover(l,o.text)}_fireUnderlineEvent(h,o){const l=h.range,S=this._bufferService.buffer.ydisp,x=this._createLinkUnderlineEvent(l.start.x-1,l.start.y-S-1,l.end.x,l.end.y-S-1,void 0);(o?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(x)}_linkLeave(h,o,l){var S;(S=this._currentLink)!=null&&S.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(o,!1),this._currentLink.state.decorations.pointerCursor&&h.classList.remove("xterm-cursor-pointer")),o.leave&&o.leave(l,o.text)}_linkAtPosition(h,o){const l=h.range.start.y*this._bufferService.cols+h.range.start.x,S=h.range.end.y*this._bufferService.cols+h.range.end.x,x=o.y*this._bufferService.cols+o.x;return l<=x&&x<=S}_positionFromMouseEvent(h,o,l){const S=l.getCoords(h,o,this._bufferService.cols,this._bufferService.rows);if(S)return{x:S[0],y:S[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(h,o,l,S,x){return{x1:h,y1:o,x2:l,y2:S,cols:this._bufferService.cols,fg:x}}};n.Linkifier=r=d([_(1,c.IMouseService),_(2,c.IRenderService),_(3,b.IBufferService),_(4,c.ILinkProviderService)],r)},9042:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.tooMuchOutput=n.promptLabel=void 0,n.promptLabel="Terminal input",n.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(j,n,u){var d=this&&this.__decorate||function(c,r,h,o){var l,S=arguments.length,x=S<3?r:o===null?o=Object.getOwnPropertyDescriptor(r,h):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(c,r,h,o);else for(var v=c.length-1;v>=0;v--)(l=c[v])&&(x=(S<3?l(x):S>3?l(r,h,x):l(r,h))||x);return S>3&&x&&Object.defineProperty(r,h,x),x},_=this&&this.__param||function(c,r){return function(h,o){r(h,o,c)}};Object.defineProperty(n,"__esModule",{value:!0}),n.OscLinkProvider=void 0;const a=u(511),p=u(2585);let w=n.OscLinkProvider=class{constructor(c,r,h){this._bufferService=c,this._optionsService=r,this._oscLinkService=h}provideLinks(c,r){var C;const h=this._bufferService.buffer.lines.get(c-1);if(!h)return void r(void 0);const o=[],l=this._optionsService.rawOptions.linkHandler,S=new a.CellData,x=h.getTrimmedLength();let v=-1,y=-1,m=!1;for(let E=0;E<x;E++)if(y!==-1||h.hasContent(E)){if(h.loadCell(E,S),S.hasExtendedAttrs()&&S.extended.urlId){if(y===-1){y=E,v=S.extended.urlId;continue}m=S.extended.urlId!==v}else y!==-1&&(m=!0);if(m||y!==-1&&E===x-1){const R=(C=this._oscLinkService.getLinkData(v))==null?void 0:C.uri;if(R){const L={start:{x:y+1,y:c},end:{x:E+(m||E!==x-1?0:1),y:c}};let D=!1;if(!(l!=null&&l.allowNonHttpProtocols))try{const O=new URL(R);["http:","https:"].includes(O.protocol)||(D=!0)}catch{D=!0}D||o.push({text:R,range:L,activate:(O,$)=>l?l.activate(O,$,L):b(0,$),hover:(O,$)=>{var I;return(I=l==null?void 0:l.hover)==null?void 0:I.call(l,O,$,L)},leave:(O,$)=>{var I;return(I=l==null?void 0:l.leave)==null?void 0:I.call(l,O,$,L)}})}m=!1,S.hasExtendedAttrs()&&S.extended.urlId?(y=E,v=S.extended.urlId):(y=-1,v=-1)}}r(o)}};function b(c,r){if(confirm(`Do you want to navigate to ${r}?
|
|
52
|
+
|
|
53
|
+
WARNING: This link could potentially be dangerous`)){const h=window.open();if(h){try{h.opener=null}catch{}h.location.href=r}else console.warn("Opening link blocked as opener could not be cleared")}}n.OscLinkProvider=w=d([_(0,p.IBufferService),_(1,p.IOptionsService),_(2,p.IOscLinkService)],w)},6193:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.RenderDebouncer=void 0,n.RenderDebouncer=class{constructor(u,d){this._renderCallback=u,this._coreBrowserService=d,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(u){return this._refreshCallbacks.push(u),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(u,d,_){this._rowCount=_,u=u!==void 0?u:0,d=d!==void 0?d:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,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 u=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,d),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const u of this._refreshCallbacks)u(0);this._refreshCallbacks=[]}}},3236:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Terminal=void 0;const d=u(3614),_=u(3656),a=u(3551),p=u(9042),w=u(3730),b=u(1680),c=u(3107),r=u(5744),h=u(2950),o=u(1296),l=u(428),S=u(4269),x=u(5114),v=u(8934),y=u(3230),m=u(9312),C=u(4725),E=u(6731),R=u(8055),L=u(8969),D=u(8460),O=u(844),$=u(6114),I=u(8437),P=u(2584),z=u(7399),M=u(5941),B=u(9074),T=u(2585),k=u(5435),G=u(4567),K=u(779);class ue extends L.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(q={}){super(q),this.browser=$,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new O.MutableDisposable),this._onCursorMove=this.register(new D.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new D.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new D.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new D.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new D.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new D.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new D.EventEmitter),this._onBlur=this.register(new D.EventEmitter),this._onA11yCharEmitter=this.register(new D.EventEmitter),this._onA11yTabEmitter=this.register(new D.EventEmitter),this._onWillOpen=this.register(new D.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(B.DecorationService),this._instantiationService.setService(T.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(K.LinkProviderService),this._instantiationService.setService(C.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(w.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((N,ie)=>this.refresh(N,ie)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((N=>this._reportWindowsOptions(N)))),this.register(this._inputHandler.onColor((N=>this._handleColorEvent(N)))),this.register((0,D.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,D.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,D.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,D.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((N=>this._afterResize(N.cols,N.rows)))),this.register((0,O.toDisposable)((()=>{var N,ie;this._customKeyEventHandler=void 0,(ie=(N=this.element)==null?void 0:N.parentNode)==null||ie.removeChild(this.element)})))}_handleColorEvent(q){if(this._themeService)for(const N of q){let ie,te="";switch(N.index){case 256:ie="foreground",te="10";break;case 257:ie="background",te="11";break;case 258:ie="cursor",te="12";break;default:ie="ansi",te="4;"+N.index}switch(N.type){case 0:const ve=R.color.toColorRGB(ie==="ansi"?this._themeService.colors.ansi[N.index]:this._themeService.colors[ie]);this.coreService.triggerDataEvent(`${P.C0.ESC}]${te};${(0,M.toRgbString)(ve)}${P.C1_ESCAPED.ST}`);break;case 1:if(ie==="ansi")this._themeService.modifyColors((fe=>fe.ansi[N.index]=R.channels.toColor(...N.color)));else{const fe=ie;this._themeService.modifyColors((Me=>Me[fe]=R.channels.toColor(...N.color)))}break;case 2:this._themeService.restoreColor(N.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(q){q?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(G.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(q){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(P.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var q;return(q=this.textarea)==null?void 0:q.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(P.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 q=this.buffer.ybase+this.buffer.y,N=this.buffer.lines.get(q);if(!N)return;const ie=Math.min(this.buffer.x,this.cols-1),te=this._renderService.dimensions.css.cell.height,ve=N.getWidth(ie),fe=this._renderService.dimensions.css.cell.width*ve,Me=this.buffer.y*this._renderService.dimensions.css.cell.height,_e=ie*this._renderService.dimensions.css.cell.width;this.textarea.style.left=_e+"px",this.textarea.style.top=Me+"px",this.textarea.style.width=fe+"px",this.textarea.style.height=te+"px",this.textarea.style.lineHeight=te+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,_.addDisposableDomListener)(this.element,"copy",(N=>{this.hasSelection()&&(0,d.copyHandler)(N,this._selectionService)})));const q=N=>(0,d.handlePasteEvent)(N,this.textarea,this.coreService,this.optionsService);this.register((0,_.addDisposableDomListener)(this.textarea,"paste",q)),this.register((0,_.addDisposableDomListener)(this.element,"paste",q)),$.isFirefox?this.register((0,_.addDisposableDomListener)(this.element,"mousedown",(N=>{N.button===2&&(0,d.rightClickHandler)(N,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,_.addDisposableDomListener)(this.element,"contextmenu",(N=>{(0,d.rightClickHandler)(N,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),$.isLinux&&this.register((0,_.addDisposableDomListener)(this.element,"auxclick",(N=>{N.button===1&&(0,d.moveTextAreaUnderMouseCursor)(N,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,_.addDisposableDomListener)(this.textarea,"keyup",(q=>this._keyUp(q)),!0)),this.register((0,_.addDisposableDomListener)(this.textarea,"keydown",(q=>this._keyDown(q)),!0)),this.register((0,_.addDisposableDomListener)(this.textarea,"keypress",(q=>this._keyPress(q)),!0)),this.register((0,_.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,_.addDisposableDomListener)(this.textarea,"compositionupdate",(q=>this._compositionHelper.compositionupdate(q)))),this.register((0,_.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,_.addDisposableDomListener)(this.textarea,"input",(q=>this._inputEvent(q)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(q){var ie;if(!q)throw new Error("Terminal requires a parent element.");if(q.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((ie=this.element)==null?void 0:ie.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=q.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"),q.appendChild(this.element);const N=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),N.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,_.addDisposableDomListener)(this.screenElement,"mousemove",(te=>this.updateCursorStyle(te)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),N.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",p.promptLabel),$.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(x.CoreBrowserService,this.textarea,q.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(C.ICoreBrowserService,this._coreBrowserService),this.register((0,_.addDisposableDomListener)(this.textarea,"focus",(te=>this._handleTextAreaFocus(te)))),this.register((0,_.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(C.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(E.ThemeService),this._instantiationService.setService(C.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(S.CharacterJoinerService),this._instantiationService.setService(C.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(y.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(C.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((te=>this._onRender.fire(te)))),this.onResize((te=>this._renderService.resize(te.cols,te.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(h.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(v.MouseService),this._instantiationService.setService(C.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(a.Linkifier,this.screenElement)),this.element.appendChild(N);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(b.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((te=>this.scrollLines(te.amount,te.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(C.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((te=>this.scrollLines(te.amount,te.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((te=>this._renderService.handleSelectionChanged(te.start,te.end,te.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((te=>{this.textarea.value=te,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((te=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,_.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(c.BufferDecorationRenderer,this.screenElement)),this.register((0,_.addDisposableDomListener)(this.element,"mousedown",(te=>this._selectionService.handleMouseDown(te)))),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(G.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(te=>this._handleScreenReaderModeOptionChange(te)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(r.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(te=>{!this._overviewRulerRenderer&&te&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(r.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(o.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const q=this,N=this.element;function ie(fe){const Me=q._mouseService.getMouseReportCoords(fe,q.screenElement);if(!Me)return!1;let _e,Oe;switch(fe.overrideType||fe.type){case"mousemove":Oe=32,fe.buttons===void 0?(_e=3,fe.button!==void 0&&(_e=fe.button<3?fe.button:3)):_e=1&fe.buttons?0:4&fe.buttons?1:2&fe.buttons?2:3;break;case"mouseup":Oe=0,_e=fe.button<3?fe.button:3;break;case"mousedown":Oe=1,_e=fe.button<3?fe.button:3;break;case"wheel":if(q._customWheelEventHandler&&q._customWheelEventHandler(fe)===!1||q.viewport.getLinesScrolled(fe)===0)return!1;Oe=fe.deltaY<0?0:1,_e=4;break;default:return!1}return!(Oe===void 0||_e===void 0||_e>4)&&q.coreMouseService.triggerMouseEvent({col:Me.col,row:Me.row,x:Me.x,y:Me.y,button:_e,action:Oe,ctrl:fe.ctrlKey,alt:fe.altKey,shift:fe.shiftKey})}const te={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ve={mouseup:fe=>(ie(fe),fe.buttons||(this._document.removeEventListener("mouseup",te.mouseup),te.mousedrag&&this._document.removeEventListener("mousemove",te.mousedrag)),this.cancel(fe)),wheel:fe=>(ie(fe),this.cancel(fe,!0)),mousedrag:fe=>{fe.buttons&&ie(fe)},mousemove:fe=>{fe.buttons||ie(fe)}};this.register(this.coreMouseService.onProtocolChange((fe=>{fe?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(fe)),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&fe?te.mousemove||(N.addEventListener("mousemove",ve.mousemove),te.mousemove=ve.mousemove):(N.removeEventListener("mousemove",te.mousemove),te.mousemove=null),16&fe?te.wheel||(N.addEventListener("wheel",ve.wheel,{passive:!1}),te.wheel=ve.wheel):(N.removeEventListener("wheel",te.wheel),te.wheel=null),2&fe?te.mouseup||(te.mouseup=ve.mouseup):(this._document.removeEventListener("mouseup",te.mouseup),te.mouseup=null),4&fe?te.mousedrag||(te.mousedrag=ve.mousedrag):(this._document.removeEventListener("mousemove",te.mousedrag),te.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,_.addDisposableDomListener)(N,"mousedown",(fe=>{if(fe.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(fe))return ie(fe),te.mouseup&&this._document.addEventListener("mouseup",te.mouseup),te.mousedrag&&this._document.addEventListener("mousemove",te.mousedrag),this.cancel(fe)}))),this.register((0,_.addDisposableDomListener)(N,"wheel",(fe=>{if(!te.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(fe)===!1)return!1;if(!this.buffer.hasScrollback){const Me=this.viewport.getLinesScrolled(fe);if(Me===0)return;const _e=P.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(fe.deltaY<0?"A":"B");let Oe="";for(let qe=0;qe<Math.abs(Me);qe++)Oe+=_e;return this.coreService.triggerDataEvent(Oe,!0),this.cancel(fe,!0)}return this.viewport.handleWheel(fe)?this.cancel(fe):void 0}}),{passive:!1})),this.register((0,_.addDisposableDomListener)(N,"touchstart",(fe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(fe),this.cancel(fe)}),{passive:!0})),this.register((0,_.addDisposableDomListener)(N,"touchmove",(fe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(fe)?void 0:this.cancel(fe)}),{passive:!1}))}refresh(q,N){var ie;(ie=this._renderService)==null||ie.refreshRows(q,N)}updateCursorStyle(q){var N;(N=this._selectionService)!=null&&N.shouldColumnSelect(q)?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(q,N,ie=0){var te;ie===1?(super.scrollLines(q,N,ie),this.refresh(0,this.rows-1)):(te=this.viewport)==null||te.scrollLines(q)}paste(q){(0,d.paste)(q,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(q){this._customKeyEventHandler=q}attachCustomWheelEventHandler(q){this._customWheelEventHandler=q}registerLinkProvider(q){return this._linkProviderService.registerLinkProvider(q)}registerCharacterJoiner(q){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const N=this._characterJoinerService.register(q);return this.refresh(0,this.rows-1),N}deregisterCharacterJoiner(q){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(q)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(q){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+q)}registerDecoration(q){return this._decorationService.registerDecoration(q)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(q,N,ie){this._selectionService.setSelection(q,N,ie)}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 q;(q=this._selectionService)==null||q.clearSelection()}selectAll(){var q;(q=this._selectionService)==null||q.selectAll()}selectLines(q,N){var ie;(ie=this._selectionService)==null||ie.selectLines(q,N)}_keyDown(q){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(q)===!1)return!1;const N=this.browser.isMac&&this.options.macOptionIsMeta&&q.altKey;if(!N&&!this._compositionHelper.keydown(q))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;N||q.key!=="Dead"&&q.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const ie=(0,z.evaluateKeyboardEvent)(q,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(q),ie.type===3||ie.type===2){const te=this.rows-1;return this.scrollLines(ie.type===2?-te:te),this.cancel(q,!0)}return ie.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,q)||(ie.cancel&&this.cancel(q,!0),!ie.key||!!(q.key&&!q.ctrlKey&&!q.altKey&&!q.metaKey&&q.key.length===1&&q.key.charCodeAt(0)>=65&&q.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(ie.key!==P.C0.ETX&&ie.key!==P.C0.CR||(this.textarea.value=""),this._onKey.fire({key:ie.key,domEvent:q}),this._showCursor(),this.coreService.triggerDataEvent(ie.key,!0),!this.optionsService.rawOptions.screenReaderMode||q.altKey||q.ctrlKey?this.cancel(q,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(q,N){const ie=q.isMac&&!this.options.macOptionIsMeta&&N.altKey&&!N.ctrlKey&&!N.metaKey||q.isWindows&&N.altKey&&N.ctrlKey&&!N.metaKey||q.isWindows&&N.getModifierState("AltGraph");return N.type==="keypress"?ie:ie&&(!N.keyCode||N.keyCode>47)}_keyUp(q){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(q)===!1||((function(N){return N.keyCode===16||N.keyCode===17||N.keyCode===18})(q)||this.focus(),this.updateCursorStyle(q),this._keyPressHandled=!1)}_keyPress(q){let N;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(q)===!1)return!1;if(this.cancel(q),q.charCode)N=q.charCode;else if(q.which===null||q.which===void 0)N=q.keyCode;else{if(q.which===0||q.charCode===0)return!1;N=q.which}return!(!N||(q.altKey||q.ctrlKey||q.metaKey)&&!this._isThirdLevelShift(this.browser,q)||(N=String.fromCharCode(N),this._onKey.fire({key:N,domEvent:q}),this._showCursor(),this.coreService.triggerDataEvent(N,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(q){if(q.data&&q.inputType==="insertText"&&(!q.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const N=q.data;return this.coreService.triggerDataEvent(N,!0),this.cancel(q),!0}return!1}resize(q,N){q!==this.cols||N!==this.rows?super.resize(q,N):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(q,N){var ie,te;(ie=this._charSizeService)==null||ie.measure(),(te=this.viewport)==null||te.syncScrollArea(!0)}clear(){var q;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 N=1;N<this.rows;N++)this.buffer.lines.push(this.buffer.getBlankLine(I.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(q=this.viewport)==null||q.reset(),this.refresh(0,this.rows-1)}}reset(){var N,ie;this.options.rows=this.rows,this.options.cols=this.cols;const q=this._customKeyEventHandler;this._setup(),super.reset(),(N=this._selectionService)==null||N.reset(),this._decorationService.reset(),(ie=this.viewport)==null||ie.reset(),this._customKeyEventHandler=q,this.refresh(0,this.rows-1)}clearTextureAtlas(){var q;(q=this._renderService)==null||q.clearTextureAtlas()}_reportFocus(){var q;(q=this.element)!=null&&q.classList.contains("focus")?this.coreService.triggerDataEvent(P.C0.ESC+"[I"):this.coreService.triggerDataEvent(P.C0.ESC+"[O")}_reportWindowsOptions(q){if(this._renderService)switch(q){case k.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const N=this._renderService.dimensions.css.canvas.width.toFixed(0),ie=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${P.C0.ESC}[4;${ie};${N}t`);break;case k.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const te=this._renderService.dimensions.css.cell.width.toFixed(0),ve=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${P.C0.ESC}[6;${ve};${te}t`)}}cancel(q,N){if(this.options.cancelEvents||N)return q.preventDefault(),q.stopPropagation(),!1}}n.Terminal=ue},9924:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TimeBasedDebouncer=void 0,n.TimeBasedDebouncer=class{constructor(u,d=1e3){this._renderCallback=u,this._debounceThresholdMS=d,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(u,d,_){this._rowCount=_,u=u!==void 0?u:0,d=d!==void 0?d:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,d):d;const a=Date.now();if(a-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=a,this._innerRefresh();else if(!this._additionalRefreshRequested){const p=a-this._lastRefreshMs,w=this._debounceThresholdMS-p;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),w)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const u=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,d)}}},1680:function(j,n,u){var d=this&&this.__decorate||function(h,o,l,S){var x,v=arguments.length,y=v<3?o:S===null?S=Object.getOwnPropertyDescriptor(o,l):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(h,o,l,S);else for(var m=h.length-1;m>=0;m--)(x=h[m])&&(y=(v<3?x(y):v>3?x(o,l,y):x(o,l))||y);return v>3&&y&&Object.defineProperty(o,l,y),y},_=this&&this.__param||function(h,o){return function(l,S){o(l,S,h)}};Object.defineProperty(n,"__esModule",{value:!0}),n.Viewport=void 0;const a=u(3656),p=u(4725),w=u(8460),b=u(844),c=u(2585);let r=n.Viewport=class extends b.Disposable{constructor(h,o,l,S,x,v,y,m){super(),this._viewportElement=h,this._scrollArea=o,this._bufferService=l,this._optionsService=S,this._charSizeService=x,this._renderService=v,this._coreBrowserService=y,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 w.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,a.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((C=>this._activeBuffer=C.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((C=>this._renderDimensions=C))),this._handleThemeChange(m.colors),this.register(m.onChangeColors((C=>this._handleThemeChange(C)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(h){this._viewportElement.style.backgroundColor=h.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(h){if(h)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 o=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==o&&(this._lastRecordedBufferHeight=o,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const h=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==h&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=h),this._refreshAnimationFrame=null}syncScrollArea(h=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(h);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(h)}_handleScroll(h){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 o=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:o,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const h=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(h*(this._smoothScrollState.target-this._smoothScrollState.origin)),h<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(h,o){const l=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(o<0&&this._viewportElement.scrollTop!==0||o>0&&l<this._lastRecordedBufferHeight)||(h.cancelable&&h.preventDefault(),!1)}handleWheel(h){const o=this._getPixelsScrolled(h);return o!==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+o:this._smoothScrollState.target+=o,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=o,this._bubbleScroll(h,o))}scrollLines(h){if(h!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const o=h*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+o,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:h,suppressScrollEvent:!1})}_getPixelsScrolled(h){if(h.deltaY===0||h.shiftKey)return 0;let o=this._applyScrollModifier(h.deltaY,h);return h.deltaMode===WheelEvent.DOM_DELTA_LINE?o*=this._currentRowHeight:h.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(o*=this._currentRowHeight*this._bufferService.rows),o}getBufferElements(h,o){var m;let l,S="";const x=[],v=o??this._bufferService.buffer.lines.length,y=this._bufferService.buffer.lines;for(let C=h;C<v;C++){const E=y.get(C);if(!E)continue;const R=(m=y.get(C+1))==null?void 0:m.isWrapped;if(S+=E.translateToString(!R),!R||C===y.length-1){const L=document.createElement("div");L.textContent=S,x.push(L),S.length>0&&(l=L),S=""}}return{bufferElements:x,cursorElement:l}}getLinesScrolled(h){if(h.deltaY===0||h.shiftKey)return 0;let o=this._applyScrollModifier(h.deltaY,h);return h.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(o/=this._currentRowHeight+0,this._wheelPartialScroll+=o,o=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):h.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(o*=this._bufferService.rows),o}_applyScrollModifier(h,o){const l=this._optionsService.rawOptions.fastScrollModifier;return l==="alt"&&o.altKey||l==="ctrl"&&o.ctrlKey||l==="shift"&&o.shiftKey?h*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:h*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(h){this._lastTouchY=h.touches[0].pageY}handleTouchMove(h){const o=this._lastTouchY-h.touches[0].pageY;return this._lastTouchY=h.touches[0].pageY,o!==0&&(this._viewportElement.scrollTop+=o,this._bubbleScroll(h,o))}};n.Viewport=r=d([_(2,c.IBufferService),_(3,c.IOptionsService),_(4,p.ICharSizeService),_(5,p.IRenderService),_(6,p.ICoreBrowserService),_(7,p.IThemeService)],r)},3107:function(j,n,u){var d=this&&this.__decorate||function(c,r,h,o){var l,S=arguments.length,x=S<3?r:o===null?o=Object.getOwnPropertyDescriptor(r,h):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(c,r,h,o);else for(var v=c.length-1;v>=0;v--)(l=c[v])&&(x=(S<3?l(x):S>3?l(r,h,x):l(r,h))||x);return S>3&&x&&Object.defineProperty(r,h,x),x},_=this&&this.__param||function(c,r){return function(h,o){r(h,o,c)}};Object.defineProperty(n,"__esModule",{value:!0}),n.BufferDecorationRenderer=void 0;const a=u(4725),p=u(844),w=u(2585);let b=n.BufferDecorationRenderer=class extends p.Disposable{constructor(c,r,h,o,l){super(),this._screenElement=c,this._bufferService=r,this._coreBrowserService=h,this._decorationService=o,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((S=>this._removeDecoration(S)))),this.register((0,p.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 c of this._decorationService.decorations)this._renderDecoration(c);this._dimensionsChanged=!1}_renderDecoration(c){this._refreshStyle(c),this._dimensionsChanged&&this._refreshXPosition(c)}_createElement(c){var o;const r=this._coreBrowserService.mainDocument.createElement("div");r.classList.add("xterm-decoration"),r.classList.toggle("xterm-decoration-top-layer",((o=c==null?void 0:c.options)==null?void 0:o.layer)==="top"),r.style.width=`${Math.round((c.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,r.style.height=(c.options.height||1)*this._renderService.dimensions.css.cell.height+"px",r.style.top=(c.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",r.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const h=c.options.x??0;return h&&h>this._bufferService.cols&&(r.style.display="none"),this._refreshXPosition(c,r),r}_refreshStyle(c){const r=c.marker.line-this._bufferService.buffers.active.ydisp;if(r<0||r>=this._bufferService.rows)c.element&&(c.element.style.display="none",c.onRenderEmitter.fire(c.element));else{let h=this._decorationElements.get(c);h||(h=this._createElement(c),c.element=h,this._decorationElements.set(c,h),this._container.appendChild(h),c.onDispose((()=>{this._decorationElements.delete(c),h.remove()}))),h.style.top=r*this._renderService.dimensions.css.cell.height+"px",h.style.display=this._altBufferIsActive?"none":"block",c.onRenderEmitter.fire(h)}}_refreshXPosition(c,r=c.element){if(!r)return;const h=c.options.x??0;(c.options.anchor||"left")==="right"?r.style.right=h?h*this._renderService.dimensions.css.cell.width+"px":"":r.style.left=h?h*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(c){var r;(r=this._decorationElements.get(c))==null||r.remove(),this._decorationElements.delete(c),c.dispose()}};n.BufferDecorationRenderer=b=d([_(1,w.IBufferService),_(2,a.ICoreBrowserService),_(3,w.IDecorationService),_(4,a.IRenderService)],b)},5871:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ColorZoneStore=void 0,n.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(u){if(u.options.overviewRulerOptions){for(const d of this._zones)if(d.color===u.options.overviewRulerOptions.color&&d.position===u.options.overviewRulerOptions.position){if(this._lineIntersectsZone(d,u.marker.line))return;if(this._lineAdjacentToZone(d,u.marker.line,u.options.overviewRulerOptions.position))return void this._addLineToZone(d,u.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=u.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=u.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=u.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=u.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:u.options.overviewRulerOptions.color,position:u.options.overviewRulerOptions.position,startBufferLine:u.marker.line,endBufferLine:u.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(u){this._linePadding=u}_lineIntersectsZone(u,d){return d>=u.startBufferLine&&d<=u.endBufferLine}_lineAdjacentToZone(u,d,_){return d>=u.startBufferLine-this._linePadding[_||"full"]&&d<=u.endBufferLine+this._linePadding[_||"full"]}_addLineToZone(u,d){u.startBufferLine=Math.min(u.startBufferLine,d),u.endBufferLine=Math.max(u.endBufferLine,d)}}},5744:function(j,n,u){var d=this&&this.__decorate||function(l,S,x,v){var y,m=arguments.length,C=m<3?S:v===null?v=Object.getOwnPropertyDescriptor(S,x):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(l,S,x,v);else for(var E=l.length-1;E>=0;E--)(y=l[E])&&(C=(m<3?y(C):m>3?y(S,x,C):y(S,x))||C);return m>3&&C&&Object.defineProperty(S,x,C),C},_=this&&this.__param||function(l,S){return function(x,v){S(x,v,l)}};Object.defineProperty(n,"__esModule",{value:!0}),n.OverviewRulerRenderer=void 0;const a=u(5871),p=u(4725),w=u(844),b=u(2585),c={full:0,left:0,center:0,right:0},r={full:0,left:0,center:0,right:0},h={full:0,left:0,center:0,right:0};let o=n.OverviewRulerRenderer=class extends w.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(l,S,x,v,y,m,C){var R;super(),this._viewportElement=l,this._screenElement=S,this._bufferService=x,this._decorationService=v,this._renderService=y,this._optionsService=m,this._coreBrowserService=C,this._colorZoneStore=new a.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(),(R=this._viewportElement.parentElement)==null||R.insertBefore(this._canvas,this._viewportElement);const E=this._canvas.getContext("2d");if(!E)throw new Error("Ctx cannot be null");this._ctx=E,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,w.toDisposable)((()=>{var L;(L=this._canvas)==null||L.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),S=Math.ceil(this._canvas.width/3);r.full=this._canvas.width,r.left=l,r.center=S,r.right=l,this._refreshDrawHeightConstants(),h.full=0,h.left=0,h.center=r.left,h.right=r.left+r.center}_refreshDrawHeightConstants(){c.full=Math.round(2*this._coreBrowserService.dpr);const l=this._canvas.height/this._bufferService.buffer.lines.length,S=Math.round(Math.max(Math.min(l,12),6)*this._coreBrowserService.dpr);c.left=S,c.center=S,c.right=S}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*c.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*c.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*c.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*c.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 S of this._decorationService.decorations)this._colorZoneStore.addDecoration(S);this._ctx.lineWidth=1;const l=this._colorZoneStore.zones;for(const S of l)S.position!=="full"&&this._renderColorZone(S);for(const S of l)S.position==="full"&&this._renderColorZone(S);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(l){this._ctx.fillStyle=l.color,this._ctx.fillRect(h[l.position||"full"],Math.round((this._canvas.height-1)*(l.startBufferLine/this._bufferService.buffers.active.lines.length)-c[l.position||"full"]/2),r[l.position||"full"],Math.round((this._canvas.height-1)*((l.endBufferLine-l.startBufferLine)/this._bufferService.buffers.active.lines.length)+c[l.position||"full"]))}_queueRefresh(l,S){this._shouldUpdateDimensions=l||this._shouldUpdateDimensions,this._shouldUpdateAnchor=S||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};n.OverviewRulerRenderer=o=d([_(2,b.IBufferService),_(3,b.IDecorationService),_(4,p.IRenderService),_(5,b.IOptionsService),_(6,p.ICoreBrowserService)],o)},2950:function(j,n,u){var d=this&&this.__decorate||function(c,r,h,o){var l,S=arguments.length,x=S<3?r:o===null?o=Object.getOwnPropertyDescriptor(r,h):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(c,r,h,o);else for(var v=c.length-1;v>=0;v--)(l=c[v])&&(x=(S<3?l(x):S>3?l(r,h,x):l(r,h))||x);return S>3&&x&&Object.defineProperty(r,h,x),x},_=this&&this.__param||function(c,r){return function(h,o){r(h,o,c)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CompositionHelper=void 0;const a=u(4725),p=u(2585),w=u(2584);let b=n.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(c,r,h,o,l,S){this._textarea=c,this._compositionView=r,this._bufferService=h,this._optionsService=o,this._coreService=l,this._renderService=S,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(c){this._compositionView.textContent=c.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(c){if(this._isComposing||this._isSendingComposition){if(c.keyCode===229||c.keyCode===16||c.keyCode===17||c.keyCode===18)return!1;this._finalizeComposition(!1)}return c.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(c){if(this._compositionView.classList.remove("active"),this._isComposing=!1,c){const r={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let h;this._isSendingComposition=!1,r.start+=this._dataAlreadySent.length,h=this._isComposing?this._textarea.value.substring(r.start,r.end):this._textarea.value.substring(r.start),h.length>0&&this._coreService.triggerDataEvent(h,!0)}}),0)}else{this._isSendingComposition=!1;const r=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(r,!0)}}_handleAnyTextareaChanges(){const c=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const r=this._textarea.value,h=r.replace(c,"");this._dataAlreadySent=h,r.length>c.length?this._coreService.triggerDataEvent(h,!0):r.length<c.length?this._coreService.triggerDataEvent(`${w.C0.DEL}`,!0):r.length===c.length&&r!==c&&this._coreService.triggerDataEvent(r,!0)}}),0)}updateCompositionElements(c){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const r=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),h=this._renderService.dimensions.css.cell.height,o=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,l=r*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=l+"px",this._compositionView.style.top=o+"px",this._compositionView.style.height=h+"px",this._compositionView.style.lineHeight=h+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const S=this._compositionView.getBoundingClientRect();this._textarea.style.left=l+"px",this._textarea.style.top=o+"px",this._textarea.style.width=Math.max(S.width,1)+"px",this._textarea.style.height=Math.max(S.height,1)+"px",this._textarea.style.lineHeight=S.height+"px"}c||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};n.CompositionHelper=b=d([_(2,p.IBufferService),_(3,p.IOptionsService),_(4,p.ICoreService),_(5,a.IRenderService)],b)},9806:(j,n)=>{function u(d,_,a){const p=a.getBoundingClientRect(),w=d.getComputedStyle(a),b=parseInt(w.getPropertyValue("padding-left")),c=parseInt(w.getPropertyValue("padding-top"));return[_.clientX-p.left-b,_.clientY-p.top-c]}Object.defineProperty(n,"__esModule",{value:!0}),n.getCoords=n.getCoordsRelativeToElement=void 0,n.getCoordsRelativeToElement=u,n.getCoords=function(d,_,a,p,w,b,c,r,h){if(!b)return;const o=u(d,_,a);return o?(o[0]=Math.ceil((o[0]+(h?c/2:0))/c),o[1]=Math.ceil(o[1]/r),o[0]=Math.min(Math.max(o[0],1),p+(h?1:0)),o[1]=Math.min(Math.max(o[1],1),w),o):void 0}},9504:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.moveToCellSequence=void 0;const d=u(2584);function _(r,h,o,l){const S=r-a(r,o),x=h-a(h,o),v=Math.abs(S-x)-(function(y,m,C){let E=0;const R=y-a(y,C),L=m-a(m,C);for(let D=0;D<Math.abs(R-L);D++){const O=p(y,m)==="A"?-1:1,$=C.buffer.lines.get(R+O*D);$!=null&&$.isWrapped&&E++}return E})(r,h,o);return c(v,b(p(r,h),l))}function a(r,h){let o=0,l=h.buffer.lines.get(r),S=l==null?void 0:l.isWrapped;for(;S&&r>=0&&r<h.rows;)o++,l=h.buffer.lines.get(--r),S=l==null?void 0:l.isWrapped;return o}function p(r,h){return r>h?"A":"B"}function w(r,h,o,l,S,x){let v=r,y=h,m="";for(;v!==o||y!==l;)v+=S?1:-1,S&&v>x.cols-1?(m+=x.buffer.translateBufferLineToString(y,!1,r,v),v=0,r=0,y++):!S&&v<0&&(m+=x.buffer.translateBufferLineToString(y,!1,0,r+1),v=x.cols-1,r=v,y--);return m+x.buffer.translateBufferLineToString(y,!1,r,v)}function b(r,h){const o=h?"O":"[";return d.C0.ESC+o+r}function c(r,h){r=Math.floor(r);let o="";for(let l=0;l<r;l++)o+=h;return o}n.moveToCellSequence=function(r,h,o,l){const S=o.buffer.x,x=o.buffer.y;if(!o.buffer.hasScrollback)return(function(m,C,E,R,L,D){return _(C,R,L,D).length===0?"":c(w(m,C,m,C-a(C,L),!1,L).length,b("D",D))})(S,x,0,h,o,l)+_(x,h,o,l)+(function(m,C,E,R,L,D){let O;O=_(C,R,L,D).length>0?R-a(R,L):C;const $=R,I=(function(P,z,M,B,T,k){let G;return G=_(M,B,T,k).length>0?B-a(B,T):z,P<M&&G<=B||P>=M&&G<B?"C":"D"})(m,C,E,R,L,D);return c(w(m,O,E,$,I==="C",L).length,b(I,D))})(S,x,r,h,o,l);let v;if(x===h)return v=S>r?"D":"C",c(Math.abs(S-r),b(v,l));v=x>h?"D":"C";const y=Math.abs(x-h);return c((function(m,C){return C.cols-m})(x>h?r:S,o)+(y-1)*o.cols+1+((x>h?S:r)-1),b(v,l))}},1296:function(j,n,u){var d=this&&this.__decorate||function(D,O,$,I){var P,z=arguments.length,M=z<3?O:I===null?I=Object.getOwnPropertyDescriptor(O,$):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(D,O,$,I);else for(var B=D.length-1;B>=0;B--)(P=D[B])&&(M=(z<3?P(M):z>3?P(O,$,M):P(O,$))||M);return z>3&&M&&Object.defineProperty(O,$,M),M},_=this&&this.__param||function(D,O){return function($,I){O($,I,D)}};Object.defineProperty(n,"__esModule",{value:!0}),n.DomRenderer=void 0;const a=u(3787),p=u(2550),w=u(2223),b=u(6171),c=u(6052),r=u(4725),h=u(8055),o=u(8460),l=u(844),S=u(2585),x="xterm-dom-renderer-owner-",v="xterm-rows",y="xterm-fg-",m="xterm-bg-",C="xterm-focus",E="xterm-selection";let R=1,L=n.DomRenderer=class extends l.Disposable{constructor(D,O,$,I,P,z,M,B,T,k,G,K,ue){super(),this._terminal=D,this._document=O,this._element=$,this._screenElement=I,this._viewportElement=P,this._helperContainer=z,this._linkifier2=M,this._charSizeService=T,this._optionsService=k,this._bufferService=G,this._coreBrowserService=K,this._themeService=ue,this._terminalClass=R++,this._rowElements=[],this._selectionRenderModel=(0,c.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new o.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(v),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(E),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,b.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((le=>this._injectCss(le)))),this._injectCss(this._themeService.colors),this._rowFactory=B.createInstance(a.DomRendererRowFactory,document),this._element.classList.add(x+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((le=>this._handleLinkHover(le)))),this.register(this._linkifier2.onHideLinkUnderline((le=>this._handleLinkLeave(le)))),this.register((0,l.toDisposable)((()=>{this._element.classList.remove(x+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new p.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 D=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*D,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*D),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/D),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/D),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 $ of this._rowElements)$.style.width=`${this.dimensions.css.canvas.width}px`,$.style.height=`${this.dimensions.css.cell.height}px`,$.style.lineHeight=`${this.dimensions.css.cell.height}px`,$.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const O=`${this._terminalSelector} .${v} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=O,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(D){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let O=`${this._terminalSelector} .${v} { color: ${D.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;O+=`${this._terminalSelector} .${v} .xterm-dim { color: ${h.color.multiplyOpacity(D.foreground,.5).css};}`,O+=`${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 $=`blink_underline_${this._terminalClass}`,I=`blink_bar_${this._terminalClass}`,P=`blink_block_${this._terminalClass}`;O+=`@keyframes ${$} { 50% { border-bottom-style: hidden; }}`,O+=`@keyframes ${I} { 50% { box-shadow: none; }}`,O+=`@keyframes ${P} { 0% { background-color: ${D.cursor.css}; color: ${D.cursorAccent.css}; } 50% { background-color: inherit; color: ${D.cursor.css}; }}`,O+=`${this._terminalSelector} .${v}.${C} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${$} 1s step-end infinite;}${this._terminalSelector} .${v}.${C} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${I} 1s step-end infinite;}${this._terminalSelector} .${v}.${C} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${P} 1s step-end infinite;}${this._terminalSelector} .${v} .xterm-cursor.xterm-cursor-block { background-color: ${D.cursor.css}; color: ${D.cursorAccent.css};}${this._terminalSelector} .${v} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${D.cursor.css} !important; color: ${D.cursorAccent.css} !important;}${this._terminalSelector} .${v} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${D.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${v} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${D.cursor.css} inset;}${this._terminalSelector} .${v} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${D.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,O+=`${this._terminalSelector} .${E} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${E} div { position: absolute; background-color: ${D.selectionBackgroundOpaque.css};}${this._terminalSelector} .${E} div { position: absolute; background-color: ${D.selectionInactiveBackgroundOpaque.css};}`;for(const[z,M]of D.ansi.entries())O+=`${this._terminalSelector} .${y}${z} { color: ${M.css}; }${this._terminalSelector} .${y}${z}.xterm-dim { color: ${h.color.multiplyOpacity(M,.5).css}; }${this._terminalSelector} .${m}${z} { background-color: ${M.css}; }`;O+=`${this._terminalSelector} .${y}${w.INVERTED_DEFAULT_COLOR} { color: ${h.color.opaque(D.background).css}; }${this._terminalSelector} .${y}${w.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${h.color.multiplyOpacity(h.color.opaque(D.background),.5).css}; }${this._terminalSelector} .${m}${w.INVERTED_DEFAULT_COLOR} { background-color: ${D.foreground.css}; }`,this._themeStyleElement.textContent=O}_setDefaultSpacing(){const D=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${D}px`,this._rowFactory.defaultSpacing=D}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(D,O){for(let $=this._rowElements.length;$<=O;$++){const I=this._document.createElement("div");this._rowContainer.appendChild(I),this._rowElements.push(I)}for(;this._rowElements.length>O;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(D,O){this._refreshRowElements(D,O),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(C),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(C),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(D,O,$){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(D,O,$),this.renderRows(0,this._bufferService.rows-1),!D||!O)return;this._selectionRenderModel.update(this._terminal,D,O,$);const I=this._selectionRenderModel.viewportStartRow,P=this._selectionRenderModel.viewportEndRow,z=this._selectionRenderModel.viewportCappedStartRow,M=this._selectionRenderModel.viewportCappedEndRow;if(z>=this._bufferService.rows||M<0)return;const B=this._document.createDocumentFragment();if($){const T=D[0]>O[0];B.appendChild(this._createSelectionElement(z,T?O[0]:D[0],T?D[0]:O[0],M-z+1))}else{const T=I===z?D[0]:0,k=z===P?O[0]:this._bufferService.cols;B.appendChild(this._createSelectionElement(z,T,k));const G=M-z-1;if(B.appendChild(this._createSelectionElement(z+1,0,this._bufferService.cols,G)),z!==M){const K=P===M?O[0]:this._bufferService.cols;B.appendChild(this._createSelectionElement(M,0,K))}}this._selectionContainer.appendChild(B)}_createSelectionElement(D,O,$,I=1){const P=this._document.createElement("div"),z=O*this.dimensions.css.cell.width;let M=this.dimensions.css.cell.width*($-O);return z+M>this.dimensions.css.canvas.width&&(M=this.dimensions.css.canvas.width-z),P.style.height=I*this.dimensions.css.cell.height+"px",P.style.top=D*this.dimensions.css.cell.height+"px",P.style.left=`${z}px`,P.style.width=`${M}px`,P}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 D of this._rowElements)D.replaceChildren()}renderRows(D,O){const $=this._bufferService.buffer,I=$.ybase+$.y,P=Math.min($.x,this._bufferService.cols-1),z=this._optionsService.rawOptions.cursorBlink,M=this._optionsService.rawOptions.cursorStyle,B=this._optionsService.rawOptions.cursorInactiveStyle;for(let T=D;T<=O;T++){const k=T+$.ydisp,G=this._rowElements[T],K=$.lines.get(k);if(!G||!K)break;G.replaceChildren(...this._rowFactory.createRow(K,k,k===I,M,B,P,z,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${x}${this._terminalClass}`}_handleLinkHover(D){this._setCellUnderline(D.x1,D.x2,D.y1,D.y2,D.cols,!0)}_handleLinkLeave(D){this._setCellUnderline(D.x1,D.x2,D.y1,D.y2,D.cols,!1)}_setCellUnderline(D,O,$,I,P,z){$<0&&(D=0),I<0&&(O=0);const M=this._bufferService.rows-1;$=Math.max(Math.min($,M),0),I=Math.max(Math.min(I,M),0),P=Math.min(P,this._bufferService.cols);const B=this._bufferService.buffer,T=B.ybase+B.y,k=Math.min(B.x,P-1),G=this._optionsService.rawOptions.cursorBlink,K=this._optionsService.rawOptions.cursorStyle,ue=this._optionsService.rawOptions.cursorInactiveStyle;for(let le=$;le<=I;++le){const q=le+B.ydisp,N=this._rowElements[le],ie=B.lines.get(q);if(!N||!ie)break;N.replaceChildren(...this._rowFactory.createRow(ie,q,q===T,K,ue,k,G,this.dimensions.css.cell.width,this._widthCache,z?le===$?D:0:-1,z?(le===I?O:P)-1:-1))}}};n.DomRenderer=L=d([_(7,S.IInstantiationService),_(8,r.ICharSizeService),_(9,S.IOptionsService),_(10,S.IBufferService),_(11,r.ICoreBrowserService),_(12,r.IThemeService)],L)},3787:function(j,n,u){var d=this&&this.__decorate||function(v,y,m,C){var E,R=arguments.length,L=R<3?y:C===null?C=Object.getOwnPropertyDescriptor(y,m):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(v,y,m,C);else for(var D=v.length-1;D>=0;D--)(E=v[D])&&(L=(R<3?E(L):R>3?E(y,m,L):E(y,m))||L);return R>3&&L&&Object.defineProperty(y,m,L),L},_=this&&this.__param||function(v,y){return function(m,C){y(m,C,v)}};Object.defineProperty(n,"__esModule",{value:!0}),n.DomRendererRowFactory=void 0;const a=u(2223),p=u(643),w=u(511),b=u(2585),c=u(8055),r=u(4725),h=u(4269),o=u(6171),l=u(3734);let S=n.DomRendererRowFactory=class{constructor(v,y,m,C,E,R,L){this._document=v,this._characterJoinerService=y,this._optionsService=m,this._coreBrowserService=C,this._coreService=E,this._decorationService=R,this._themeService=L,this._workCell=new w.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(v,y,m){this._selectionStart=v,this._selectionEnd=y,this._columnSelectMode=m}createRow(v,y,m,C,E,R,L,D,O,$,I){const P=[],z=this._characterJoinerService.getJoinedCharacters(y),M=this._themeService.colors;let B,T=v.getNoBgTrimmedLength();m&&T<R+1&&(T=R+1);let k=0,G="",K=0,ue=0,le=0,q=!1,N=0,ie=!1,te=0;const ve=[],fe=$!==-1&&I!==-1;for(let Me=0;Me<T;Me++){v.loadCell(Me,this._workCell);let _e=this._workCell.getWidth();if(_e===0)continue;let Oe=!1,qe=Me,we=this._workCell;if(z.length>0&&Me===z[0][0]){Oe=!0;const Ee=z.shift();we=new h.JoinedCellData(this._workCell,v.translateToString(!0,Ee[0],Ee[1]),Ee[1]-Ee[0]),qe=Ee[1]-1,_e=we.getWidth()}const ft=this._isCellInSelection(Me,y),Ot=m&&Me===R,Se=fe&&Me>=$&&Me<=I;let pe=!1;this._decorationService.forEachDecorationAtCell(Me,y,void 0,(Ee=>{pe=!0}));let me=we.getChars()||p.WHITESPACE_CELL_CHAR;if(me===" "&&(we.isUnderline()||we.isOverline())&&(me=" "),te=_e*D-O.get(me,we.isBold(),we.isItalic()),B){if(k&&(ft&&ie||!ft&&!ie&&we.bg===K)&&(ft&&ie&&M.selectionForeground||we.fg===ue)&&we.extended.ext===le&&Se===q&&te===N&&!Ot&&!Oe&&!pe){we.isInvisible()?G+=p.WHITESPACE_CELL_CHAR:G+=me,k++;continue}k&&(B.textContent=G),B=this._document.createElement("span"),k=0,G=""}else B=this._document.createElement("span");if(K=we.bg,ue=we.fg,le=we.extended.ext,q=Se,N=te,ie=ft,Oe&&R>=Me&&R<=qe&&(R=Me),!this._coreService.isCursorHidden&&Ot&&this._coreService.isCursorInitialized){if(ve.push("xterm-cursor"),this._coreBrowserService.isFocused)L&&ve.push("xterm-cursor-blink"),ve.push(C==="bar"?"xterm-cursor-bar":C==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(E)switch(E){case"outline":ve.push("xterm-cursor-outline");break;case"block":ve.push("xterm-cursor-block");break;case"bar":ve.push("xterm-cursor-bar");break;case"underline":ve.push("xterm-cursor-underline")}}if(we.isBold()&&ve.push("xterm-bold"),we.isItalic()&&ve.push("xterm-italic"),we.isDim()&&ve.push("xterm-dim"),G=we.isInvisible()?p.WHITESPACE_CELL_CHAR:we.getChars()||p.WHITESPACE_CELL_CHAR,we.isUnderline()&&(ve.push(`xterm-underline-${we.extended.underlineStyle}`),G===" "&&(G=" "),!we.isUnderlineColorDefault()))if(we.isUnderlineColorRGB())B.style.textDecorationColor=`rgb(${l.AttributeData.toColorRGB(we.getUnderlineColor()).join(",")})`;else{let Ee=we.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&we.isBold()&&Ee<8&&(Ee+=8),B.style.textDecorationColor=M.ansi[Ee].css}we.isOverline()&&(ve.push("xterm-overline"),G===" "&&(G=" ")),we.isStrikethrough()&&ve.push("xterm-strikethrough"),Se&&(B.style.textDecoration="underline");let he=we.getFgColor(),ge=we.getFgColorMode(),ze=we.getBgColor(),Re=we.getBgColorMode();const _t=!!we.isInverse();if(_t){const Ee=he;he=ze,ze=Ee;const xt=ge;ge=Re,Re=xt}let Qe,it,Ie,Ae=!1;switch(this._decorationService.forEachDecorationAtCell(Me,y,void 0,(Ee=>{Ee.options.layer!=="top"&&Ae||(Ee.backgroundColorRGB&&(Re=50331648,ze=Ee.backgroundColorRGB.rgba>>8&16777215,Qe=Ee.backgroundColorRGB),Ee.foregroundColorRGB&&(ge=50331648,he=Ee.foregroundColorRGB.rgba>>8&16777215,it=Ee.foregroundColorRGB),Ae=Ee.options.layer==="top")})),!Ae&&ft&&(Qe=this._coreBrowserService.isFocused?M.selectionBackgroundOpaque:M.selectionInactiveBackgroundOpaque,ze=Qe.rgba>>8&16777215,Re=50331648,Ae=!0,M.selectionForeground&&(ge=50331648,he=M.selectionForeground.rgba>>8&16777215,it=M.selectionForeground)),Ae&&ve.push("xterm-decoration-top"),Re){case 16777216:case 33554432:Ie=M.ansi[ze],ve.push(`xterm-bg-${ze}`);break;case 50331648:Ie=c.channels.toColor(ze>>16,ze>>8&255,255&ze),this._addStyle(B,`background-color:#${x((ze>>>0).toString(16),"0",6)}`);break;default:_t?(Ie=M.foreground,ve.push(`xterm-bg-${a.INVERTED_DEFAULT_COLOR}`)):Ie=M.background}switch(Qe||we.isDim()&&(Qe=c.color.multiplyOpacity(Ie,.5)),ge){case 16777216:case 33554432:we.isBold()&&he<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(he+=8),this._applyMinimumContrast(B,Ie,M.ansi[he],we,Qe,void 0)||ve.push(`xterm-fg-${he}`);break;case 50331648:const Ee=c.channels.toColor(he>>16&255,he>>8&255,255&he);this._applyMinimumContrast(B,Ie,Ee,we,Qe,it)||this._addStyle(B,`color:#${x(he.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(B,Ie,M.foreground,we,Qe,it)||_t&&ve.push(`xterm-fg-${a.INVERTED_DEFAULT_COLOR}`)}ve.length&&(B.className=ve.join(" "),ve.length=0),Ot||Oe||pe?B.textContent=G:k++,te!==this.defaultSpacing&&(B.style.letterSpacing=`${te}px`),P.push(B),Me=qe}return B&&k&&(B.textContent=G),P}_applyMinimumContrast(v,y,m,C,E,R){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,o.treatGlyphAsBackgroundColor)(C.getCode()))return!1;const L=this._getContrastCache(C);let D;if(E||R||(D=L.getColor(y.rgba,m.rgba)),D===void 0){const O=this._optionsService.rawOptions.minimumContrastRatio/(C.isDim()?2:1);D=c.color.ensureContrastRatio(E||y,R||m,O),L.setColor((E||y).rgba,(R||m).rgba,D??null)}return!!D&&(this._addStyle(v,`color:${D.css}`),!0)}_getContrastCache(v){return v.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(v,y){v.setAttribute("style",`${v.getAttribute("style")||""}${y};`)}_isCellInSelection(v,y){const m=this._selectionStart,C=this._selectionEnd;return!(!m||!C)&&(this._columnSelectMode?m[0]<=C[0]?v>=m[0]&&y>=m[1]&&v<C[0]&&y<=C[1]:v<m[0]&&y>=m[1]&&v>=C[0]&&y<=C[1]:y>m[1]&&y<C[1]||m[1]===C[1]&&y===m[1]&&v>=m[0]&&v<C[0]||m[1]<C[1]&&y===C[1]&&v<C[0]||m[1]<C[1]&&y===m[1]&&v>=m[0])}};function x(v,y,m){for(;v.length<m;)v=y+v;return v}n.DomRendererRowFactory=S=d([_(1,r.ICharacterJoinerService),_(2,b.IOptionsService),_(3,r.ICoreBrowserService),_(4,b.ICoreService),_(5,b.IDecorationService),_(6,r.IThemeService)],S)},2550:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.WidthCache=void 0,n.WidthCache=class{constructor(u,d){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=u.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 _=u.createElement("span");_.classList.add("xterm-char-measure-element");const a=u.createElement("span");a.classList.add("xterm-char-measure-element"),a.style.fontWeight="bold";const p=u.createElement("span");p.classList.add("xterm-char-measure-element"),p.style.fontStyle="italic";const w=u.createElement("span");w.classList.add("xterm-char-measure-element"),w.style.fontWeight="bold",w.style.fontStyle="italic",this._measureElements=[_,a,p,w],this._container.appendChild(_),this._container.appendChild(a),this._container.appendChild(p),this._container.appendChild(w),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(u,d,_,a){u===this._font&&d===this._fontSize&&_===this._weight&&a===this._weightBold||(this._font=u,this._fontSize=d,this._weight=_,this._weightBold=a,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${_}`,this._measureElements[1].style.fontWeight=`${a}`,this._measureElements[2].style.fontWeight=`${_}`,this._measureElements[3].style.fontWeight=`${a}`,this.clear())}get(u,d,_){let a=0;if(!d&&!_&&u.length===1&&(a=u.charCodeAt(0))<256){if(this._flat[a]!==-9999)return this._flat[a];const b=this._measure(u,0);return b>0&&(this._flat[a]=b),b}let p=u;d&&(p+="B"),_&&(p+="I");let w=this._holey.get(p);if(w===void 0){let b=0;d&&(b|=1),_&&(b|=2),w=this._measure(u,b),w>0&&this._holey.set(p,w)}return w}_measure(u,d){const _=this._measureElements[d];return _.textContent=u.repeat(32),_.offsetWidth/32}}},2223:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TEXT_BASELINE=n.DIM_OPACITY=n.INVERTED_DEFAULT_COLOR=void 0;const d=u(6114);n.INVERTED_DEFAULT_COLOR=257,n.DIM_OPACITY=.5,n.TEXT_BASELINE=d.isFirefox||d.isLegacyEdge?"bottom":"ideographic"},6171:(j,n)=>{function u(_){return 57508<=_&&_<=57558}function d(_){return _>=128512&&_<=128591||_>=127744&&_<=128511||_>=128640&&_<=128767||_>=9728&&_<=9983||_>=9984&&_<=10175||_>=65024&&_<=65039||_>=129280&&_<=129535||_>=127462&&_<=127487}Object.defineProperty(n,"__esModule",{value:!0}),n.computeNextVariantOffset=n.createRenderDimensions=n.treatGlyphAsBackgroundColor=n.allowRescaling=n.isEmoji=n.isRestrictedPowerlineGlyph=n.isPowerlineGlyph=n.throwIfFalsy=void 0,n.throwIfFalsy=function(_){if(!_)throw new Error("value must not be falsy");return _},n.isPowerlineGlyph=u,n.isRestrictedPowerlineGlyph=function(_){return 57520<=_&&_<=57527},n.isEmoji=d,n.allowRescaling=function(_,a,p,w){return a===1&&p>Math.ceil(1.5*w)&&_!==void 0&&_>255&&!d(_)&&!u(_)&&!(function(b){return 57344<=b&&b<=63743})(_)},n.treatGlyphAsBackgroundColor=function(_){return u(_)||(function(a){return 9472<=a&&a<=9631})(_)},n.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}}}},n.computeNextVariantOffset=function(_,a,p=0){return(_-(2*Math.round(a)-p))%(2*Math.round(a))}},6052:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createSelectionRenderModel=void 0;class u{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(_,a,p,w=!1){if(this.selectionStart=a,this.selectionEnd=p,!a||!p||a[0]===p[0]&&a[1]===p[1])return void this.clear();const b=_.buffers.active.ydisp,c=a[1]-b,r=p[1]-b,h=Math.max(c,0),o=Math.min(r,_.rows-1);h>=_.rows||o<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=w,this.viewportStartRow=c,this.viewportEndRow=r,this.viewportCappedStartRow=h,this.viewportCappedEndRow=o,this.startCol=a[0],this.endCol=p[0])}isCellSelected(_,a,p){return!!this.hasSelection&&(p-=_.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?a>=this.startCol&&p>=this.viewportCappedStartRow&&a<this.endCol&&p<=this.viewportCappedEndRow:a<this.startCol&&p>=this.viewportCappedStartRow&&a>=this.endCol&&p<=this.viewportCappedEndRow:p>this.viewportStartRow&&p<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&p===this.viewportStartRow&&a>=this.startCol&&a<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportEndRow&&a<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportStartRow&&a>=this.startCol)}}n.createSelectionRenderModel=function(){return new u}},456:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.SelectionModel=void 0,n.SelectionModel=class{constructor(u){this._bufferService=u,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 u=this.selectionStart[0]+this.selectionStartLength;return u>this._bufferService.cols?u%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)-1]:[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[u,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const u=this.selectionStart[0]+this.selectionStartLength;return u>this._bufferService.cols?[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[Math.max(u,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const u=this.selectionStart,d=this.selectionEnd;return!(!u||!d)&&(u[1]>d[1]||u[1]===d[1]&&u[0]>d[0])}handleTrim(u){return this.selectionStart&&(this.selectionStart[1]-=u),this.selectionEnd&&(this.selectionEnd[1]-=u),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(j,n,u){var d=this&&this.__decorate||function(o,l,S,x){var v,y=arguments.length,m=y<3?l:x===null?x=Object.getOwnPropertyDescriptor(l,S):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(o,l,S,x);else for(var C=o.length-1;C>=0;C--)(v=o[C])&&(m=(y<3?v(m):y>3?v(l,S,m):v(l,S))||m);return y>3&&m&&Object.defineProperty(l,S,m),m},_=this&&this.__param||function(o,l){return function(S,x){l(S,x,o)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CharSizeService=void 0;const a=u(2585),p=u(8460),w=u(844);let b=n.CharSizeService=class extends w.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(o,l,S){super(),this._optionsService=S,this.width=0,this.height=0,this._onCharSizeChange=this.register(new p.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new h(this._optionsService))}catch{this._measureStrategy=this.register(new r(o,l,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const o=this._measureStrategy.measure();o.width===this.width&&o.height===this.height||(this.width=o.width,this.height=o.height,this._onCharSizeChange.fire())}};n.CharSizeService=b=d([_(2,a.IOptionsService)],b);class c extends w.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(l,S){l!==void 0&&l>0&&S!==void 0&&S>0&&(this._result.width=l,this._result.height=S)}}class r extends c{constructor(l,S,x){super(),this._document=l,this._parentElement=S,this._optionsService=x,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 h extends c{constructor(l){super(),this._optionsService=l,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const S=this._ctx.measureText("W");if(!("width"in S&&"fontBoundingBoxAscent"in S&&"fontBoundingBoxDescent"in S))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(j,n,u){var d=this&&this.__decorate||function(h,o,l,S){var x,v=arguments.length,y=v<3?o:S===null?S=Object.getOwnPropertyDescriptor(o,l):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(h,o,l,S);else for(var m=h.length-1;m>=0;m--)(x=h[m])&&(y=(v<3?x(y):v>3?x(o,l,y):x(o,l))||y);return v>3&&y&&Object.defineProperty(o,l,y),y},_=this&&this.__param||function(h,o){return function(l,S){o(l,S,h)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CharacterJoinerService=n.JoinedCellData=void 0;const a=u(3734),p=u(643),w=u(511),b=u(2585);class c extends a.AttributeData{constructor(o,l,S){super(),this.content=0,this.combinedData="",this.fg=o.fg,this.bg=o.bg,this.combinedData=l,this._width=S}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(o){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}n.JoinedCellData=c;let r=n.CharacterJoinerService=class nf{constructor(o){this._bufferService=o,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new w.CellData}register(o){const l={id:this._nextCharacterJoinerId++,handler:o};return this._characterJoiners.push(l),l.id}deregister(o){for(let l=0;l<this._characterJoiners.length;l++)if(this._characterJoiners[l].id===o)return this._characterJoiners.splice(l,1),!0;return!1}getJoinedCharacters(o){if(this._characterJoiners.length===0)return[];const l=this._bufferService.buffer.lines.get(o);if(!l||l.length===0)return[];const S=[],x=l.translateToString(!0);let v=0,y=0,m=0,C=l.getFg(0),E=l.getBg(0);for(let R=0;R<l.getTrimmedLength();R++)if(l.loadCell(R,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==C||this._workCell.bg!==E){if(R-v>1){const L=this._getJoinedRanges(x,m,y,l,v);for(let D=0;D<L.length;D++)S.push(L[D])}v=R,m=y,C=this._workCell.fg,E=this._workCell.bg}y+=this._workCell.getChars().length||p.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-v>1){const R=this._getJoinedRanges(x,m,y,l,v);for(let L=0;L<R.length;L++)S.push(R[L])}return S}_getJoinedRanges(o,l,S,x,v){const y=o.substring(l,S);let m=[];try{m=this._characterJoiners[0].handler(y)}catch(C){console.error(C)}for(let C=1;C<this._characterJoiners.length;C++)try{const E=this._characterJoiners[C].handler(y);for(let R=0;R<E.length;R++)nf._mergeRanges(m,E[R])}catch(E){console.error(E)}return this._stringRangesToCellRanges(m,x,v),m}_stringRangesToCellRanges(o,l,S){let x=0,v=!1,y=0,m=o[x];if(m){for(let C=S;C<this._bufferService.cols;C++){const E=l.getWidth(C),R=l.getString(C).length||p.WHITESPACE_CELL_CHAR.length;if(E!==0){if(!v&&m[0]<=y&&(m[0]=C,v=!0),m[1]<=y){if(m[1]=C,m=o[++x],!m)break;m[0]<=y?(m[0]=C,v=!0):v=!1}y+=R}}m&&(m[1]=this._bufferService.cols)}}static _mergeRanges(o,l){let S=!1;for(let x=0;x<o.length;x++){const v=o[x];if(S){if(l[1]<=v[0])return o[x-1][1]=l[1],o;if(l[1]<=v[1])return o[x-1][1]=Math.max(l[1],v[1]),o.splice(x,1),o;o.splice(x,1),x--}else{if(l[1]<=v[0])return o.splice(x,0,l),o;if(l[1]<=v[1])return v[0]=Math.min(l[0],v[0]),o;l[0]<v[1]&&(v[0]=Math.min(l[0],v[0]),S=!0)}}return S?o[o.length-1][1]=l[1]:o.push(l),o}};n.CharacterJoinerService=r=d([_(0,b.IBufferService)],r)},5114:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CoreBrowserService=void 0;const d=u(844),_=u(8460),a=u(3656);class p extends d.Disposable{constructor(c,r,h){super(),this._textarea=c,this._window=r,this.mainDocument=h,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new w(this._window),this._onDprChange=this.register(new _.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new _.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((o=>this._screenDprMonitor.setWindow(o)))),this.register((0,_.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(c){this._window!==c&&(this._window=c,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}}n.CoreBrowserService=p;class w extends d.Disposable{constructor(c){super(),this._parentWindow=c,this._windowResizeListener=this.register(new d.MutableDisposable),this._onDprChange=this.register(new _.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(c){this._parentWindow=c,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,a.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var c;this._outerListener&&((c=this._resolutionMediaMatchList)==null||c.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:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.LinkProviderService=void 0;const d=u(844);class _ extends d.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,d.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(p){return this.linkProviders.push(p),{dispose:()=>{const w=this.linkProviders.indexOf(p);w!==-1&&this.linkProviders.splice(w,1)}}}}n.LinkProviderService=_},8934:function(j,n,u){var d=this&&this.__decorate||function(b,c,r,h){var o,l=arguments.length,S=l<3?c:h===null?h=Object.getOwnPropertyDescriptor(c,r):h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(b,c,r,h);else for(var x=b.length-1;x>=0;x--)(o=b[x])&&(S=(l<3?o(S):l>3?o(c,r,S):o(c,r))||S);return l>3&&S&&Object.defineProperty(c,r,S),S},_=this&&this.__param||function(b,c){return function(r,h){c(r,h,b)}};Object.defineProperty(n,"__esModule",{value:!0}),n.MouseService=void 0;const a=u(4725),p=u(9806);let w=n.MouseService=class{constructor(b,c){this._renderService=b,this._charSizeService=c}getCoords(b,c,r,h,o){return(0,p.getCoords)(window,b,c,r,h,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,o)}getMouseReportCoords(b,c){const r=(0,p.getCoordsRelativeToElement)(window,b,c);if(this._charSizeService.hasValidSize)return r[0]=Math.min(Math.max(r[0],0),this._renderService.dimensions.css.canvas.width-1),r[1]=Math.min(Math.max(r[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(r[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(r[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(r[0]),y:Math.floor(r[1])}}};n.MouseService=w=d([_(0,a.IRenderService),_(1,a.ICharSizeService)],w)},3230:function(j,n,u){var d=this&&this.__decorate||function(o,l,S,x){var v,y=arguments.length,m=y<3?l:x===null?x=Object.getOwnPropertyDescriptor(l,S):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(o,l,S,x);else for(var C=o.length-1;C>=0;C--)(v=o[C])&&(m=(y<3?v(m):y>3?v(l,S,m):v(l,S))||m);return y>3&&m&&Object.defineProperty(l,S,m),m},_=this&&this.__param||function(o,l){return function(S,x){l(S,x,o)}};Object.defineProperty(n,"__esModule",{value:!0}),n.RenderService=void 0;const a=u(6193),p=u(4725),w=u(8460),b=u(844),c=u(7226),r=u(2585);let h=n.RenderService=class extends b.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(o,l,S,x,v,y,m,C){super(),this._rowCount=o,this._charSizeService=x,this._renderer=this.register(new b.MutableDisposable),this._pausedResizeTask=new c.DebouncedIdleTask,this._observerDisposable=this.register(new b.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 w.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new w.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new w.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new w.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new a.RenderDebouncer(((E,R)=>this._renderRows(E,R)),m),this.register(this._renderDebouncer),this.register(m.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(y.onResize((()=>this._fullRefresh()))),this.register(y.buffers.onBufferActivate((()=>{var E;return(E=this._renderer.value)==null?void 0:E.clear()}))),this.register(S.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(v.onDecorationRegistered((()=>this._fullRefresh()))),this.register(v.onDecorationRemoved((()=>this._fullRefresh()))),this.register(S.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(y.cols,y.rows),this._fullRefresh()}))),this.register(S.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(y.buffer.y,y.buffer.y,!0)))),this.register(C.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(m.window,l),this.register(m.onWindowChange((E=>this._registerIntersectionObserver(E,l))))}_registerIntersectionObserver(o,l){if("IntersectionObserver"in o){const S=new o.IntersectionObserver((x=>this._handleIntersectionChange(x[x.length-1])),{threshold:0});S.observe(l),this._observerDisposable.value=(0,b.toDisposable)((()=>S.disconnect()))}}_handleIntersectionChange(o){this._isPaused=o.isIntersecting===void 0?o.intersectionRatio===0:!o.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(o,l,S=!1){this._isPaused?this._needsFullRefresh=!0:(S||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(o,l,this._rowCount))}_renderRows(o,l){this._renderer.value&&(o=Math.min(o,this._rowCount-1),l=Math.min(l,this._rowCount-1),this._renderer.value.renderRows(o,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:o,end:l}),this._onRender.fire({start:o,end:l}),this._isNextRenderRedrawOnly=!0)}resize(o,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(o){this._renderer.value=o,this._renderer.value&&(this._renderer.value.onRequestRedraw((l=>this.refreshRows(l.start,l.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(o){return this._renderDebouncer.addRefreshCallback(o)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var o,l;this._renderer.value&&((l=(o=this._renderer.value).clearTextureAtlas)==null||l.call(o),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(o,l){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var S;return(S=this._renderer.value)==null?void 0:S.handleResize(o,l)})):this._renderer.value.handleResize(o,l),this._fullRefresh())}handleCharSizeChanged(){var o;(o=this._renderer.value)==null||o.handleCharSizeChanged()}handleBlur(){var o;(o=this._renderer.value)==null||o.handleBlur()}handleFocus(){var o;(o=this._renderer.value)==null||o.handleFocus()}handleSelectionChanged(o,l,S){var x;this._selectionState.start=o,this._selectionState.end=l,this._selectionState.columnSelectMode=S,(x=this._renderer.value)==null||x.handleSelectionChanged(o,l,S)}handleCursorMove(){var o;(o=this._renderer.value)==null||o.handleCursorMove()}clear(){var o;(o=this._renderer.value)==null||o.clear()}};n.RenderService=h=d([_(2,r.IOptionsService),_(3,p.ICharSizeService),_(4,r.IDecorationService),_(5,r.IBufferService),_(6,p.ICoreBrowserService),_(7,p.IThemeService)],h)},9312:function(j,n,u){var d=this&&this.__decorate||function(m,C,E,R){var L,D=arguments.length,O=D<3?C:R===null?R=Object.getOwnPropertyDescriptor(C,E):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(m,C,E,R);else for(var $=m.length-1;$>=0;$--)(L=m[$])&&(O=(D<3?L(O):D>3?L(C,E,O):L(C,E))||O);return D>3&&O&&Object.defineProperty(C,E,O),O},_=this&&this.__param||function(m,C){return function(E,R){C(E,R,m)}};Object.defineProperty(n,"__esModule",{value:!0}),n.SelectionService=void 0;const a=u(9806),p=u(9504),w=u(456),b=u(4725),c=u(8460),r=u(844),h=u(6114),o=u(4841),l=u(511),S=u(2585),x=" ",v=new RegExp(x,"g");let y=n.SelectionService=class extends r.Disposable{constructor(m,C,E,R,L,D,O,$,I){super(),this._element=m,this._screenElement=C,this._linkifier=E,this._bufferService=R,this._coreService=L,this._mouseService=D,this._optionsService=O,this._renderService=$,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 c.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new c.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new c.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new c.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=P=>this._handleMouseMove(P),this._mouseUpListener=P=>this._handleMouseUp(P),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((P=>this._handleTrim(P))),this.register(this._bufferService.buffers.onBufferActivate((P=>this._handleBufferActivate(P)))),this.enable(),this._model=new w.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,r.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,C=this._model.finalSelectionEnd;return!(!m||!C||m[0]===C[0]&&m[1]===C[1])}get selectionText(){const m=this._model.finalSelectionStart,C=this._model.finalSelectionEnd;if(!m||!C)return"";const E=this._bufferService.buffer,R=[];if(this._activeSelectionMode===3){if(m[0]===C[0])return"";const L=m[0]<C[0]?m[0]:C[0],D=m[0]<C[0]?C[0]:m[0];for(let O=m[1];O<=C[1];O++){const $=E.translateBufferLineToString(O,!0,L,D);R.push($)}}else{const L=m[1]===C[1]?C[0]:void 0;R.push(E.translateBufferLineToString(m[1],!0,m[0],L));for(let D=m[1]+1;D<=C[1]-1;D++){const O=E.lines.get(D),$=E.translateBufferLineToString(D,!0);O!=null&&O.isWrapped?R[R.length-1]+=$:R.push($)}if(m[1]!==C[1]){const D=E.lines.get(C[1]),O=E.translateBufferLineToString(C[1],!0,0,C[0]);D&&D.isWrapped?R[R.length-1]+=O:R.push(O)}}return R.map((L=>L.replace(v," "))).join(h.isWindows?`\r
|
|
54
|
+
`:`
|
|
55
|
+
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(m){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),h.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 C=this._getMouseBufferCoords(m),E=this._model.finalSelectionStart,R=this._model.finalSelectionEnd;return!!(E&&R&&C)&&this._areCoordsInSelection(C,E,R)}isCellInSelection(m,C){const E=this._model.finalSelectionStart,R=this._model.finalSelectionEnd;return!(!E||!R)&&this._areCoordsInSelection([m,C],E,R)}_areCoordsInSelection(m,C,E){return m[1]>C[1]&&m[1]<E[1]||C[1]===E[1]&&m[1]===C[1]&&m[0]>=C[0]&&m[0]<E[0]||C[1]<E[1]&&m[1]===E[1]&&m[0]<E[0]||C[1]<E[1]&&m[1]===C[1]&&m[0]>=C[0]}_selectWordAtCursor(m,C){var L,D;const E=(D=(L=this._linkifier.currentLink)==null?void 0:L.link)==null?void 0:D.range;if(E)return this._model.selectionStart=[E.start.x-1,E.start.y-1],this._model.selectionStartLength=(0,o.getRangeLength)(E,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const R=this._getMouseBufferCoords(m);return!!R&&(this._selectWordAt(R,C),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(m,C){this._model.clearSelection(),m=Math.max(m,0),C=Math.min(C,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,m],this._model.selectionEnd=[this._bufferService.cols,C],this.refresh(),this._onSelectionChange.fire()}_handleTrim(m){this._model.handleTrim(m)&&this.refresh()}_getMouseBufferCoords(m){const C=this._mouseService.getCoords(m,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(C)return C[0]--,C[1]--,C[1]+=this._bufferService.buffer.ydisp,C}_getMouseEventScrollAmount(m){let C=(0,a.getCoordsRelativeToElement)(this._coreBrowserService.window,m,this._screenElement)[1];const E=this._renderService.dimensions.css.canvas.height;return C>=0&&C<=E?0:(C>E&&(C-=E),C=Math.min(Math.max(C,-50),50),C/=50,C/Math.abs(C)+Math.round(14*C))}shouldForceSelection(m){return h.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 C=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);C&&C.length!==this._model.selectionStart[0]&&C.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(m){this._selectWordAtCursor(m,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(m){const C=this._getMouseBufferCoords(m);C&&(this._activeSelectionMode=2,this._selectLineAt(C[1]))}shouldColumnSelect(m){return m.altKey&&!(h.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(m){if(m.stopImmediatePropagation(),!this._model.selectionStart)return;const C=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 E=this._bufferService.buffer;if(this._model.selectionEnd[1]<E.lines.length){const R=E.lines.get(this._model.selectionEnd[1]);R&&R.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}C&&C[0]===this._model.selectionEnd[0]&&C[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 C=m.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&C<500&&m.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const E=this._mouseService.getCoords(m,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(E&&E[0]!==void 0&&E[1]!==void 0){const R=(0,p.moveToCellSequence)(E[0]-1,E[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(R,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const m=this._model.finalSelectionStart,C=this._model.finalSelectionEnd,E=!(!m||!C||m[0]===C[0]&&m[1]===C[1]);E?m&&C&&(this._oldSelectionStart&&this._oldSelectionEnd&&m[0]===this._oldSelectionStart[0]&&m[1]===this._oldSelectionStart[1]&&C[0]===this._oldSelectionEnd[0]&&C[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(m,C,E)):this._oldHasSelection&&this._fireOnSelectionChange(m,C,E)}_fireOnSelectionChange(m,C,E){this._oldSelectionStart=m,this._oldSelectionEnd=C,this._oldHasSelection=E,this._onSelectionChange.fire()}_handleBufferActivate(m){this.clearSelection(),this._trimListener.dispose(),this._trimListener=m.activeBuffer.lines.onTrim((C=>this._handleTrim(C)))}_convertViewportColToCharacterIndex(m,C){let E=C;for(let R=0;C>=R;R++){const L=m.loadCell(R,this._workCell).getChars().length;this._workCell.getWidth()===0?E--:L>1&&C!==R&&(E+=L-1)}return E}setSelection(m,C,E){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[m,C],this._model.selectionStartLength=E,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(m){this._isClickInSelection(m)||(this._selectWordAtCursor(m,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(m,C,E=!0,R=!0){if(m[0]>=this._bufferService.cols)return;const L=this._bufferService.buffer,D=L.lines.get(m[1]);if(!D)return;const O=L.translateBufferLineToString(m[1],!1);let $=this._convertViewportColToCharacterIndex(D,m[0]),I=$;const P=m[0]-$;let z=0,M=0,B=0,T=0;if(O.charAt($)===" "){for(;$>0&&O.charAt($-1)===" ";)$--;for(;I<O.length&&O.charAt(I+1)===" ";)I++}else{let K=m[0],ue=m[0];D.getWidth(K)===0&&(z++,K--),D.getWidth(ue)===2&&(M++,ue++);const le=D.getString(ue).length;for(le>1&&(T+=le-1,I+=le-1);K>0&&$>0&&!this._isCharWordSeparator(D.loadCell(K-1,this._workCell));){D.loadCell(K-1,this._workCell);const q=this._workCell.getChars().length;this._workCell.getWidth()===0?(z++,K--):q>1&&(B+=q-1,$-=q-1),$--,K--}for(;ue<D.length&&I+1<O.length&&!this._isCharWordSeparator(D.loadCell(ue+1,this._workCell));){D.loadCell(ue+1,this._workCell);const q=this._workCell.getChars().length;this._workCell.getWidth()===2?(M++,ue++):q>1&&(T+=q-1,I+=q-1),I++,ue++}}I++;let k=$+P-z+B,G=Math.min(this._bufferService.cols,I-$+z+M-B-T);if(C||O.slice($,I).trim()!==""){if(E&&k===0&&D.getCodePoint(0)!==32){const K=L.lines.get(m[1]-1);if(K&&D.isWrapped&&K.getCodePoint(this._bufferService.cols-1)!==32){const ue=this._getWordAt([this._bufferService.cols-1,m[1]-1],!1,!0,!1);if(ue){const le=this._bufferService.cols-ue.start;k-=le,G+=le}}}if(R&&k+G===this._bufferService.cols&&D.getCodePoint(this._bufferService.cols-1)!==32){const K=L.lines.get(m[1]+1);if(K!=null&&K.isWrapped&&K.getCodePoint(0)!==32){const ue=this._getWordAt([0,m[1]+1],!1,!1,!0);ue&&(G+=ue.length)}}return{start:k,length:G}}}_selectWordAt(m,C){const E=this._getWordAt(m,C);if(E){for(;E.start<0;)E.start+=this._bufferService.cols,m[1]--;this._model.selectionStart=[E.start,m[1]],this._model.selectionStartLength=E.length}}_selectToWordAt(m){const C=this._getWordAt(m,!0);if(C){let E=m[1];for(;C.start<0;)C.start+=this._bufferService.cols,E--;if(!this._model.areSelectionValuesReversed())for(;C.start+C.length>this._bufferService.cols;)C.length-=this._bufferService.cols,E++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?C.start:C.start+C.length,E]}}_isCharWordSeparator(m){return m.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(m.getChars())>=0}_selectLineAt(m){const C=this._bufferService.buffer.getWrappedRangeForLine(m),E={start:{x:0,y:C.first},end:{x:this._bufferService.cols-1,y:C.last}};this._model.selectionStart=[0,C.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,o.getRangeLength)(E,this._bufferService.cols)}};n.SelectionService=y=d([_(3,S.IBufferService),_(4,S.ICoreService),_(5,b.IMouseService),_(6,S.IOptionsService),_(7,b.IRenderService),_(8,b.ICoreBrowserService)],y)},4725:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ILinkProviderService=n.IThemeService=n.ICharacterJoinerService=n.ISelectionService=n.IRenderService=n.IMouseService=n.ICoreBrowserService=n.ICharSizeService=void 0;const d=u(8343);n.ICharSizeService=(0,d.createDecorator)("CharSizeService"),n.ICoreBrowserService=(0,d.createDecorator)("CoreBrowserService"),n.IMouseService=(0,d.createDecorator)("MouseService"),n.IRenderService=(0,d.createDecorator)("RenderService"),n.ISelectionService=(0,d.createDecorator)("SelectionService"),n.ICharacterJoinerService=(0,d.createDecorator)("CharacterJoinerService"),n.IThemeService=(0,d.createDecorator)("ThemeService"),n.ILinkProviderService=(0,d.createDecorator)("LinkProviderService")},6731:function(j,n,u){var d=this&&this.__decorate||function(y,m,C,E){var R,L=arguments.length,D=L<3?m:E===null?E=Object.getOwnPropertyDescriptor(m,C):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(y,m,C,E);else for(var O=y.length-1;O>=0;O--)(R=y[O])&&(D=(L<3?R(D):L>3?R(m,C,D):R(m,C))||D);return L>3&&D&&Object.defineProperty(m,C,D),D},_=this&&this.__param||function(y,m){return function(C,E){m(C,E,y)}};Object.defineProperty(n,"__esModule",{value:!0}),n.ThemeService=n.DEFAULT_ANSI_COLORS=void 0;const a=u(7239),p=u(8055),w=u(8460),b=u(844),c=u(2585),r=p.css.toColor("#ffffff"),h=p.css.toColor("#000000"),o=p.css.toColor("#ffffff"),l=p.css.toColor("#000000"),S={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};n.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const y=[p.css.toColor("#2e3436"),p.css.toColor("#cc0000"),p.css.toColor("#4e9a06"),p.css.toColor("#c4a000"),p.css.toColor("#3465a4"),p.css.toColor("#75507b"),p.css.toColor("#06989a"),p.css.toColor("#d3d7cf"),p.css.toColor("#555753"),p.css.toColor("#ef2929"),p.css.toColor("#8ae234"),p.css.toColor("#fce94f"),p.css.toColor("#729fcf"),p.css.toColor("#ad7fa8"),p.css.toColor("#34e2e2"),p.css.toColor("#eeeeec")],m=[0,95,135,175,215,255];for(let C=0;C<216;C++){const E=m[C/36%6|0],R=m[C/6%6|0],L=m[C%6];y.push({css:p.channels.toCss(E,R,L),rgba:p.channels.toRgba(E,R,L)})}for(let C=0;C<24;C++){const E=8+10*C;y.push({css:p.channels.toCss(E,E,E),rgba:p.channels.toRgba(E,E,E)})}return y})());let x=n.ThemeService=class extends b.Disposable{get colors(){return this._colors}constructor(y){super(),this._optionsService=y,this._contrastCache=new a.ColorContrastCache,this._halfContrastCache=new a.ColorContrastCache,this._onChangeColors=this.register(new w.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:r,background:h,cursor:o,cursorAccent:l,selectionForeground:void 0,selectionBackgroundTransparent:S,selectionBackgroundOpaque:p.color.blend(h,S),selectionInactiveBackgroundTransparent:S,selectionInactiveBackgroundOpaque:p.color.blend(h,S),ansi:n.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(y={}){const m=this._colors;if(m.foreground=v(y.foreground,r),m.background=v(y.background,h),m.cursor=v(y.cursor,o),m.cursorAccent=v(y.cursorAccent,l),m.selectionBackgroundTransparent=v(y.selectionBackground,S),m.selectionBackgroundOpaque=p.color.blend(m.background,m.selectionBackgroundTransparent),m.selectionInactiveBackgroundTransparent=v(y.selectionInactiveBackground,m.selectionBackgroundTransparent),m.selectionInactiveBackgroundOpaque=p.color.blend(m.background,m.selectionInactiveBackgroundTransparent),m.selectionForeground=y.selectionForeground?v(y.selectionForeground,p.NULL_COLOR):void 0,m.selectionForeground===p.NULL_COLOR&&(m.selectionForeground=void 0),p.color.isOpaque(m.selectionBackgroundTransparent)&&(m.selectionBackgroundTransparent=p.color.opacity(m.selectionBackgroundTransparent,.3)),p.color.isOpaque(m.selectionInactiveBackgroundTransparent)&&(m.selectionInactiveBackgroundTransparent=p.color.opacity(m.selectionInactiveBackgroundTransparent,.3)),m.ansi=n.DEFAULT_ANSI_COLORS.slice(),m.ansi[0]=v(y.black,n.DEFAULT_ANSI_COLORS[0]),m.ansi[1]=v(y.red,n.DEFAULT_ANSI_COLORS[1]),m.ansi[2]=v(y.green,n.DEFAULT_ANSI_COLORS[2]),m.ansi[3]=v(y.yellow,n.DEFAULT_ANSI_COLORS[3]),m.ansi[4]=v(y.blue,n.DEFAULT_ANSI_COLORS[4]),m.ansi[5]=v(y.magenta,n.DEFAULT_ANSI_COLORS[5]),m.ansi[6]=v(y.cyan,n.DEFAULT_ANSI_COLORS[6]),m.ansi[7]=v(y.white,n.DEFAULT_ANSI_COLORS[7]),m.ansi[8]=v(y.brightBlack,n.DEFAULT_ANSI_COLORS[8]),m.ansi[9]=v(y.brightRed,n.DEFAULT_ANSI_COLORS[9]),m.ansi[10]=v(y.brightGreen,n.DEFAULT_ANSI_COLORS[10]),m.ansi[11]=v(y.brightYellow,n.DEFAULT_ANSI_COLORS[11]),m.ansi[12]=v(y.brightBlue,n.DEFAULT_ANSI_COLORS[12]),m.ansi[13]=v(y.brightMagenta,n.DEFAULT_ANSI_COLORS[13]),m.ansi[14]=v(y.brightCyan,n.DEFAULT_ANSI_COLORS[14]),m.ansi[15]=v(y.brightWhite,n.DEFAULT_ANSI_COLORS[15]),y.extendedAnsi){const C=Math.min(m.ansi.length-16,y.extendedAnsi.length);for(let E=0;E<C;E++)m.ansi[E+16]=v(y.extendedAnsi[E],n.DEFAULT_ANSI_COLORS[E+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(y){this._restoreColor(y),this._onChangeColors.fire(this.colors)}_restoreColor(y){if(y!==void 0)switch(y){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[y]=this._restoreColors.ansi[y]}else for(let m=0;m<this._restoreColors.ansi.length;++m)this._colors.ansi[m]=this._restoreColors.ansi[m]}modifyColors(y){y(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 v(y,m){if(y!==void 0)try{return p.css.toColor(y)}catch{}return m}n.ThemeService=x=d([_(0,c.IOptionsService)],x)},6349:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CircularList=void 0;const d=u(8460),_=u(844);class a extends _.Disposable{constructor(w){super(),this._maxLength=w,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(w){if(this._maxLength===w)return;const b=new Array(w);for(let c=0;c<Math.min(w,this.length);c++)b[c]=this._array[this._getCyclicIndex(c)];this._array=b,this._maxLength=w,this._startIndex=0}get length(){return this._length}set length(w){if(w>this._length)for(let b=this._length;b<w;b++)this._array[b]=void 0;this._length=w}get(w){return this._array[this._getCyclicIndex(w)]}set(w,b){this._array[this._getCyclicIndex(w)]=b}push(w){this._array[this._getCyclicIndex(this._length)]=w,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(w,b,...c){if(b){for(let r=w;r<this._length-b;r++)this._array[this._getCyclicIndex(r)]=this._array[this._getCyclicIndex(r+b)];this._length-=b,this.onDeleteEmitter.fire({index:w,amount:b})}for(let r=this._length-1;r>=w;r--)this._array[this._getCyclicIndex(r+c.length)]=this._array[this._getCyclicIndex(r)];for(let r=0;r<c.length;r++)this._array[this._getCyclicIndex(w+r)]=c[r];if(c.length&&this.onInsertEmitter.fire({index:w,amount:c.length}),this._length+c.length>this._maxLength){const r=this._length+c.length-this._maxLength;this._startIndex+=r,this._length=this._maxLength,this.onTrimEmitter.fire(r)}else this._length+=c.length}trimStart(w){w>this._length&&(w=this._length),this._startIndex+=w,this._length-=w,this.onTrimEmitter.fire(w)}shiftElements(w,b,c){if(!(b<=0)){if(w<0||w>=this._length)throw new Error("start argument out of range");if(w+c<0)throw new Error("Cannot shift elements in list beyond index 0");if(c>0){for(let h=b-1;h>=0;h--)this.set(w+h+c,this.get(w+h));const r=w+b+c-this._length;if(r>0)for(this._length+=r;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let r=0;r<b;r++)this.set(w+r+c,this.get(w+r))}}_getCyclicIndex(w){return(this._startIndex+w)%this._maxLength}}n.CircularList=a},1439:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.clone=void 0,n.clone=function u(d,_=5){if(typeof d!="object")return d;const a=Array.isArray(d)?[]:{};for(const p in d)a[p]=_<=1?d[p]:d[p]&&u(d[p],_-1);return a}},8055:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.contrastRatio=n.toPaddedHex=n.rgba=n.rgb=n.css=n.color=n.channels=n.NULL_COLOR=void 0;let u=0,d=0,_=0,a=0;var p,w,b,c,r;function h(l){const S=l.toString(16);return S.length<2?"0"+S:S}function o(l,S){return l<S?(S+.05)/(l+.05):(l+.05)/(S+.05)}n.NULL_COLOR={css:"#00000000",rgba:0},(function(l){l.toCss=function(S,x,v,y){return y!==void 0?`#${h(S)}${h(x)}${h(v)}${h(y)}`:`#${h(S)}${h(x)}${h(v)}`},l.toRgba=function(S,x,v,y=255){return(S<<24|x<<16|v<<8|y)>>>0},l.toColor=function(S,x,v,y){return{css:l.toCss(S,x,v,y),rgba:l.toRgba(S,x,v,y)}}})(p||(n.channels=p={})),(function(l){function S(x,v){return a=Math.round(255*v),[u,d,_]=r.toChannels(x.rgba),{css:p.toCss(u,d,_,a),rgba:p.toRgba(u,d,_,a)}}l.blend=function(x,v){if(a=(255&v.rgba)/255,a===1)return{css:v.css,rgba:v.rgba};const y=v.rgba>>24&255,m=v.rgba>>16&255,C=v.rgba>>8&255,E=x.rgba>>24&255,R=x.rgba>>16&255,L=x.rgba>>8&255;return u=E+Math.round((y-E)*a),d=R+Math.round((m-R)*a),_=L+Math.round((C-L)*a),{css:p.toCss(u,d,_),rgba:p.toRgba(u,d,_)}},l.isOpaque=function(x){return(255&x.rgba)==255},l.ensureContrastRatio=function(x,v,y){const m=r.ensureContrastRatio(x.rgba,v.rgba,y);if(m)return p.toColor(m>>24&255,m>>16&255,m>>8&255)},l.opaque=function(x){const v=(255|x.rgba)>>>0;return[u,d,_]=r.toChannels(v),{css:p.toCss(u,d,_),rgba:v}},l.opacity=S,l.multiplyOpacity=function(x,v){return a=255&x.rgba,S(x,a*v/255)},l.toColorRGB=function(x){return[x.rgba>>24&255,x.rgba>>16&255,x.rgba>>8&255]}})(w||(n.color=w={})),(function(l){let S,x;try{const v=document.createElement("canvas");v.width=1,v.height=1;const y=v.getContext("2d",{willReadFrequently:!0});y&&(S=y,S.globalCompositeOperation="copy",x=S.createLinearGradient(0,0,1,1))}catch{}l.toColor=function(v){if(v.match(/#[\da-f]{3,8}/i))switch(v.length){case 4:return u=parseInt(v.slice(1,2).repeat(2),16),d=parseInt(v.slice(2,3).repeat(2),16),_=parseInt(v.slice(3,4).repeat(2),16),p.toColor(u,d,_);case 5:return u=parseInt(v.slice(1,2).repeat(2),16),d=parseInt(v.slice(2,3).repeat(2),16),_=parseInt(v.slice(3,4).repeat(2),16),a=parseInt(v.slice(4,5).repeat(2),16),p.toColor(u,d,_,a);case 7:return{css:v,rgba:(parseInt(v.slice(1),16)<<8|255)>>>0};case 9:return{css:v,rgba:parseInt(v.slice(1),16)>>>0}}const y=v.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(y)return u=parseInt(y[1]),d=parseInt(y[2]),_=parseInt(y[3]),a=Math.round(255*(y[5]===void 0?1:parseFloat(y[5]))),p.toColor(u,d,_,a);if(!S||!x)throw new Error("css.toColor: Unsupported css format");if(S.fillStyle=x,S.fillStyle=v,typeof S.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(S.fillRect(0,0,1,1),[u,d,_,a]=S.getImageData(0,0,1,1).data,a!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:p.toRgba(u,d,_,a),css:v}}})(b||(n.css=b={})),(function(l){function S(x,v,y){const m=x/255,C=v/255,E=y/255;return .2126*(m<=.03928?m/12.92:Math.pow((m+.055)/1.055,2.4))+.7152*(C<=.03928?C/12.92:Math.pow((C+.055)/1.055,2.4))+.0722*(E<=.03928?E/12.92:Math.pow((E+.055)/1.055,2.4))}l.relativeLuminance=function(x){return S(x>>16&255,x>>8&255,255&x)},l.relativeLuminance2=S})(c||(n.rgb=c={})),(function(l){function S(v,y,m){const C=v>>24&255,E=v>>16&255,R=v>>8&255;let L=y>>24&255,D=y>>16&255,O=y>>8&255,$=o(c.relativeLuminance2(L,D,O),c.relativeLuminance2(C,E,R));for(;$<m&&(L>0||D>0||O>0);)L-=Math.max(0,Math.ceil(.1*L)),D-=Math.max(0,Math.ceil(.1*D)),O-=Math.max(0,Math.ceil(.1*O)),$=o(c.relativeLuminance2(L,D,O),c.relativeLuminance2(C,E,R));return(L<<24|D<<16|O<<8|255)>>>0}function x(v,y,m){const C=v>>24&255,E=v>>16&255,R=v>>8&255;let L=y>>24&255,D=y>>16&255,O=y>>8&255,$=o(c.relativeLuminance2(L,D,O),c.relativeLuminance2(C,E,R));for(;$<m&&(L<255||D<255||O<255);)L=Math.min(255,L+Math.ceil(.1*(255-L))),D=Math.min(255,D+Math.ceil(.1*(255-D))),O=Math.min(255,O+Math.ceil(.1*(255-O))),$=o(c.relativeLuminance2(L,D,O),c.relativeLuminance2(C,E,R));return(L<<24|D<<16|O<<8|255)>>>0}l.blend=function(v,y){if(a=(255&y)/255,a===1)return y;const m=y>>24&255,C=y>>16&255,E=y>>8&255,R=v>>24&255,L=v>>16&255,D=v>>8&255;return u=R+Math.round((m-R)*a),d=L+Math.round((C-L)*a),_=D+Math.round((E-D)*a),p.toRgba(u,d,_)},l.ensureContrastRatio=function(v,y,m){const C=c.relativeLuminance(v>>8),E=c.relativeLuminance(y>>8);if(o(C,E)<m){if(E<C){const D=S(v,y,m),O=o(C,c.relativeLuminance(D>>8));if(O<m){const $=x(v,y,m);return O>o(C,c.relativeLuminance($>>8))?D:$}return D}const R=x(v,y,m),L=o(C,c.relativeLuminance(R>>8));if(L<m){const D=S(v,y,m);return L>o(C,c.relativeLuminance(D>>8))?R:D}return R}},l.reduceLuminance=S,l.increaseLuminance=x,l.toChannels=function(v){return[v>>24&255,v>>16&255,v>>8&255,255&v]}})(r||(n.rgba=r={})),n.toPaddedHex=h,n.contrastRatio=o},8969:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CoreTerminal=void 0;const d=u(844),_=u(2585),a=u(4348),p=u(7866),w=u(744),b=u(7302),c=u(6975),r=u(8460),h=u(1753),o=u(1480),l=u(7994),S=u(9282),x=u(5435),v=u(5981),y=u(2660);let m=!1;class C extends d.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new r.EventEmitter),this._onScroll.event((R=>{var L;(L=this._onScrollApi)==null||L.fire(R.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(R){for(const L in R)this.optionsService.options[L]=R[L]}constructor(R){super(),this._windowsWrappingHeuristics=this.register(new d.MutableDisposable),this._onBinary=this.register(new r.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new r.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new r.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new r.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new r.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new r.EventEmitter),this._instantiationService=new a.InstantiationService,this.optionsService=this.register(new b.OptionsService(R)),this._instantiationService.setService(_.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(w.BufferService)),this._instantiationService.setService(_.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(p.LogService)),this._instantiationService.setService(_.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(c.CoreService)),this._instantiationService.setService(_.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(h.CoreMouseService)),this._instantiationService.setService(_.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(o.UnicodeService)),this._instantiationService.setService(_.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(l.CharsetService),this._instantiationService.setService(_.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(y.OscLinkService),this._instantiationService.setService(_.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new x.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,r.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,r.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,r.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,r.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((L=>{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((L=>{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 v.WriteBuffer(((L,D)=>this._inputHandler.parse(L,D)))),this.register((0,r.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(R,L){this._writeBuffer.write(R,L)}writeSync(R,L){this._logService.logLevel<=_.LogLevelEnum.WARN&&!m&&(this._logService.warn("writeSync is unreliable and will be removed soon."),m=!0),this._writeBuffer.writeSync(R,L)}input(R,L=!0){this.coreService.triggerDataEvent(R,L)}resize(R,L){isNaN(R)||isNaN(L)||(R=Math.max(R,w.MINIMUM_COLS),L=Math.max(L,w.MINIMUM_ROWS),this._bufferService.resize(R,L))}scroll(R,L=!1){this._bufferService.scroll(R,L)}scrollLines(R,L,D){this._bufferService.scrollLines(R,L,D)}scrollPages(R){this.scrollLines(R*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(R){const L=R-this._bufferService.buffer.ydisp;L!==0&&this.scrollLines(L)}registerEscHandler(R,L){return this._inputHandler.registerEscHandler(R,L)}registerDcsHandler(R,L){return this._inputHandler.registerDcsHandler(R,L)}registerCsiHandler(R,L){return this._inputHandler.registerCsiHandler(R,L)}registerOscHandler(R,L){return this._inputHandler.registerOscHandler(R,L)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let R=!1;const L=this.optionsService.rawOptions.windowsPty;L&&L.buildNumber!==void 0&&L.buildNumber!==void 0?R=L.backend==="conpty"&&L.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(R=!0),R?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const R=[];R.push(this.onLineFeed(S.updateWindowsModeWrappedState.bind(null,this._bufferService))),R.push(this.registerCsiHandler({final:"H"},(()=>((0,S.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,d.toDisposable)((()=>{for(const L of R)L.dispose()}))}}}n.CoreTerminal=C},8460:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.runAndSubscribe=n.forwardEvent=n.EventEmitter=void 0,n.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=u=>(this._listeners.push(u),{dispose:()=>{if(!this._disposed){for(let d=0;d<this._listeners.length;d++)if(this._listeners[d]===u)return void this._listeners.splice(d,1)}}})),this._event}fire(u,d){const _=[];for(let a=0;a<this._listeners.length;a++)_.push(this._listeners[a]);for(let a=0;a<_.length;a++)_[a].call(void 0,u,d)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},n.forwardEvent=function(u,d){return u((_=>d.fire(_)))},n.runAndSubscribe=function(u,d){return d(void 0),u((_=>d(_)))}},5435:function(j,n,u){var d=this&&this.__decorate||function(z,M,B,T){var k,G=arguments.length,K=G<3?M:T===null?T=Object.getOwnPropertyDescriptor(M,B):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")K=Reflect.decorate(z,M,B,T);else for(var ue=z.length-1;ue>=0;ue--)(k=z[ue])&&(K=(G<3?k(K):G>3?k(M,B,K):k(M,B))||K);return G>3&&K&&Object.defineProperty(M,B,K),K},_=this&&this.__param||function(z,M){return function(B,T){M(B,T,z)}};Object.defineProperty(n,"__esModule",{value:!0}),n.InputHandler=n.WindowsOptionsReportType=void 0;const a=u(2584),p=u(7116),w=u(2015),b=u(844),c=u(482),r=u(8437),h=u(8460),o=u(643),l=u(511),S=u(3734),x=u(2585),v=u(1480),y=u(6242),m=u(6351),C=u(5941),E={"(":0,")":1,"*":2,"+":3,"-":1,".":2},R=131072;function L(z,M){if(z>24)return M.setWinLines||!1;switch(z){case 1:return!!M.restoreWin;case 2:return!!M.minimizeWin;case 3:return!!M.setWinPosition;case 4:return!!M.setWinSizePixels;case 5:return!!M.raiseWin;case 6:return!!M.lowerWin;case 7:return!!M.refreshWin;case 8:return!!M.setWinSizeChars;case 9:return!!M.maximizeWin;case 10:return!!M.fullscreenWin;case 11:return!!M.getWinState;case 13:return!!M.getWinPosition;case 14:return!!M.getWinSizePixels;case 15:return!!M.getScreenSizePixels;case 16:return!!M.getCellSizePixels;case 18:return!!M.getWinSizeChars;case 19:return!!M.getScreenSizeChars;case 20:return!!M.getIconTitle;case 21:return!!M.getWinTitle;case 22:return!!M.pushTitle;case 23:return!!M.popTitle;case 24:return!!M.setWinLines}return!1}var D;(function(z){z[z.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",z[z.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(D||(n.WindowsOptionsReportType=D={}));let O=0;class $ extends b.Disposable{getAttrData(){return this._curAttrData}constructor(M,B,T,k,G,K,ue,le,q=new w.EscapeSequenceParser){super(),this._bufferService=M,this._charsetService=B,this._coreService=T,this._logService=k,this._optionsService=G,this._oscLinkService=K,this._coreMouseService=ue,this._unicodeService=le,this._parser=q,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new c.StringToUtf32,this._utf8Decoder=new c.Utf8ToUtf32,this._workCell=new l.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=r.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=r.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new h.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new h.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new h.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new h.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new h.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new h.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new h.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new h.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new h.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new h.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new h.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new h.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new h.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((N=>this._activeBuffer=N.activeBuffer))),this._parser.setCsiHandlerFallback(((N,ie)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(N),params:ie.toArray()})})),this._parser.setEscHandlerFallback((N=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(N)})})),this._parser.setExecuteHandlerFallback((N=>{this._logService.debug("Unknown EXECUTE code: ",{code:N})})),this._parser.setOscHandlerFallback(((N,ie,te)=>{this._logService.debug("Unknown OSC code: ",{identifier:N,action:ie,data:te})})),this._parser.setDcsHandlerFallback(((N,ie,te)=>{ie==="HOOK"&&(te=te.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(N),action:ie,payload:te})})),this._parser.setPrintHandler(((N,ie,te)=>this.print(N,ie,te))),this._parser.registerCsiHandler({final:"@"},(N=>this.insertChars(N))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(N=>this.scrollLeft(N))),this._parser.registerCsiHandler({final:"A"},(N=>this.cursorUp(N))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(N=>this.scrollRight(N))),this._parser.registerCsiHandler({final:"B"},(N=>this.cursorDown(N))),this._parser.registerCsiHandler({final:"C"},(N=>this.cursorForward(N))),this._parser.registerCsiHandler({final:"D"},(N=>this.cursorBackward(N))),this._parser.registerCsiHandler({final:"E"},(N=>this.cursorNextLine(N))),this._parser.registerCsiHandler({final:"F"},(N=>this.cursorPrecedingLine(N))),this._parser.registerCsiHandler({final:"G"},(N=>this.cursorCharAbsolute(N))),this._parser.registerCsiHandler({final:"H"},(N=>this.cursorPosition(N))),this._parser.registerCsiHandler({final:"I"},(N=>this.cursorForwardTab(N))),this._parser.registerCsiHandler({final:"J"},(N=>this.eraseInDisplay(N,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(N=>this.eraseInDisplay(N,!0))),this._parser.registerCsiHandler({final:"K"},(N=>this.eraseInLine(N,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(N=>this.eraseInLine(N,!0))),this._parser.registerCsiHandler({final:"L"},(N=>this.insertLines(N))),this._parser.registerCsiHandler({final:"M"},(N=>this.deleteLines(N))),this._parser.registerCsiHandler({final:"P"},(N=>this.deleteChars(N))),this._parser.registerCsiHandler({final:"S"},(N=>this.scrollUp(N))),this._parser.registerCsiHandler({final:"T"},(N=>this.scrollDown(N))),this._parser.registerCsiHandler({final:"X"},(N=>this.eraseChars(N))),this._parser.registerCsiHandler({final:"Z"},(N=>this.cursorBackwardTab(N))),this._parser.registerCsiHandler({final:"`"},(N=>this.charPosAbsolute(N))),this._parser.registerCsiHandler({final:"a"},(N=>this.hPositionRelative(N))),this._parser.registerCsiHandler({final:"b"},(N=>this.repeatPrecedingCharacter(N))),this._parser.registerCsiHandler({final:"c"},(N=>this.sendDeviceAttributesPrimary(N))),this._parser.registerCsiHandler({prefix:">",final:"c"},(N=>this.sendDeviceAttributesSecondary(N))),this._parser.registerCsiHandler({final:"d"},(N=>this.linePosAbsolute(N))),this._parser.registerCsiHandler({final:"e"},(N=>this.vPositionRelative(N))),this._parser.registerCsiHandler({final:"f"},(N=>this.hVPosition(N))),this._parser.registerCsiHandler({final:"g"},(N=>this.tabClear(N))),this._parser.registerCsiHandler({final:"h"},(N=>this.setMode(N))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(N=>this.setModePrivate(N))),this._parser.registerCsiHandler({final:"l"},(N=>this.resetMode(N))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(N=>this.resetModePrivate(N))),this._parser.registerCsiHandler({final:"m"},(N=>this.charAttributes(N))),this._parser.registerCsiHandler({final:"n"},(N=>this.deviceStatus(N))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(N=>this.deviceStatusPrivate(N))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(N=>this.softReset(N))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(N=>this.setCursorStyle(N))),this._parser.registerCsiHandler({final:"r"},(N=>this.setScrollRegion(N))),this._parser.registerCsiHandler({final:"s"},(N=>this.saveCursor(N))),this._parser.registerCsiHandler({final:"t"},(N=>this.windowOptions(N))),this._parser.registerCsiHandler({final:"u"},(N=>this.restoreCursor(N))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(N=>this.insertColumns(N))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(N=>this.deleteColumns(N))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(N=>this.selectProtected(N))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(N=>this.requestMode(N,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(N=>this.requestMode(N,!1))),this._parser.setExecuteHandler(a.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(a.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(a.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(a.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(a.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(a.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(a.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(a.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(a.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(a.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(a.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(a.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new y.OscHandler((N=>(this.setTitle(N),this.setIconName(N),!0)))),this._parser.registerOscHandler(1,new y.OscHandler((N=>this.setIconName(N)))),this._parser.registerOscHandler(2,new y.OscHandler((N=>this.setTitle(N)))),this._parser.registerOscHandler(4,new y.OscHandler((N=>this.setOrReportIndexedColor(N)))),this._parser.registerOscHandler(8,new y.OscHandler((N=>this.setHyperlink(N)))),this._parser.registerOscHandler(10,new y.OscHandler((N=>this.setOrReportFgColor(N)))),this._parser.registerOscHandler(11,new y.OscHandler((N=>this.setOrReportBgColor(N)))),this._parser.registerOscHandler(12,new y.OscHandler((N=>this.setOrReportCursorColor(N)))),this._parser.registerOscHandler(104,new y.OscHandler((N=>this.restoreIndexedColor(N)))),this._parser.registerOscHandler(110,new y.OscHandler((N=>this.restoreFgColor(N)))),this._parser.registerOscHandler(111,new y.OscHandler((N=>this.restoreBgColor(N)))),this._parser.registerOscHandler(112,new y.OscHandler((N=>this.restoreCursorColor(N)))),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 N in p.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:N},(()=>this.selectCharset("("+N))),this._parser.registerEscHandler({intermediates:")",final:N},(()=>this.selectCharset(")"+N))),this._parser.registerEscHandler({intermediates:"*",final:N},(()=>this.selectCharset("*"+N))),this._parser.registerEscHandler({intermediates:"+",final:N},(()=>this.selectCharset("+"+N))),this._parser.registerEscHandler({intermediates:"-",final:N},(()=>this.selectCharset("-"+N))),this._parser.registerEscHandler({intermediates:".",final:N},(()=>this.selectCharset("."+N))),this._parser.registerEscHandler({intermediates:"/",final:N},(()=>this.selectCharset("/"+N)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((N=>(this._logService.error("Parsing error: ",N),N))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new m.DcsHandler(((N,ie)=>this.requestStatusString(N,ie))))}_preserveStack(M,B,T,k){this._parseStack.paused=!0,this._parseStack.cursorStartX=M,this._parseStack.cursorStartY=B,this._parseStack.decodedLength=T,this._parseStack.position=k}_logSlowResolvingAsync(M){this._logService.logLevel<=x.LogLevelEnum.WARN&&Promise.race([M,new Promise(((B,T)=>setTimeout((()=>T("#SLOW_TIMEOUT")),5e3)))]).catch((B=>{if(B!=="#SLOW_TIMEOUT")throw B;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(M,B){let T,k=this._activeBuffer.x,G=this._activeBuffer.y,K=0;const ue=this._parseStack.paused;if(ue){if(T=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,B))return this._logSlowResolvingAsync(T),T;k=this._parseStack.cursorStartX,G=this._parseStack.cursorStartY,this._parseStack.paused=!1,M.length>R&&(K=this._parseStack.position+R)}if(this._logService.logLevel<=x.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof M=="string"?` "${M}"`:` "${Array.prototype.map.call(M,(N=>String.fromCharCode(N))).join("")}"`),typeof M=="string"?M.split("").map((N=>N.charCodeAt(0))):M),this._parseBuffer.length<M.length&&this._parseBuffer.length<R&&(this._parseBuffer=new Uint32Array(Math.min(M.length,R))),ue||this._dirtyRowTracker.clearRange(),M.length>R)for(let N=K;N<M.length;N+=R){const ie=N+R<M.length?N+R:M.length,te=typeof M=="string"?this._stringDecoder.decode(M.substring(N,ie),this._parseBuffer):this._utf8Decoder.decode(M.subarray(N,ie),this._parseBuffer);if(T=this._parser.parse(this._parseBuffer,te))return this._preserveStack(k,G,te,N),this._logSlowResolvingAsync(T),T}else if(!ue){const N=typeof M=="string"?this._stringDecoder.decode(M,this._parseBuffer):this._utf8Decoder.decode(M,this._parseBuffer);if(T=this._parser.parse(this._parseBuffer,N))return this._preserveStack(k,G,N,0),this._logSlowResolvingAsync(T),T}this._activeBuffer.x===k&&this._activeBuffer.y===G||this._onCursorMove.fire();const le=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),q=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);q<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(q,this._bufferService.rows-1),Math.min(le,this._bufferService.rows-1))}print(M,B,T){let k,G;const K=this._charsetService.charset,ue=this._optionsService.rawOptions.screenReaderMode,le=this._bufferService.cols,q=this._coreService.decPrivateModes.wraparound,N=this._coreService.modes.insertMode,ie=this._curAttrData;let te=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&T-B>0&&te.getWidth(this._activeBuffer.x-1)===2&&te.setCellFromCodepoint(this._activeBuffer.x-1,0,1,ie);let ve=this._parser.precedingJoinState;for(let fe=B;fe<T;++fe){if(k=M[fe],k<127&&K){const qe=K[String.fromCharCode(k)];qe&&(k=qe.charCodeAt(0))}const Me=this._unicodeService.charProperties(k,ve);G=v.UnicodeService.extractWidth(Me);const _e=v.UnicodeService.extractShouldJoin(Me),Oe=_e?v.UnicodeService.extractWidth(ve):0;if(ve=Me,ue&&this._onA11yChar.fire((0,c.stringFromCodePoint)(k)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+G-Oe>le){if(q){const qe=te;let we=this._activeBuffer.x-Oe;for(this._activeBuffer.x=Oe,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),te=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Oe>0&&te instanceof r.BufferLine&&te.copyCellsFrom(qe,we,0,Oe,!1);we<le;)qe.setCellFromCodepoint(we++,0,1,ie)}else if(this._activeBuffer.x=le-1,G===2)continue}if(_e&&this._activeBuffer.x){const qe=te.getWidth(this._activeBuffer.x-1)?1:2;te.addCodepointToCell(this._activeBuffer.x-qe,k,G);for(let we=G-Oe;--we>=0;)te.setCellFromCodepoint(this._activeBuffer.x++,0,0,ie)}else if(N&&(te.insertCells(this._activeBuffer.x,G-Oe,this._activeBuffer.getNullCell(ie)),te.getWidth(le-1)===2&&te.setCellFromCodepoint(le-1,o.NULL_CELL_CODE,o.NULL_CELL_WIDTH,ie)),te.setCellFromCodepoint(this._activeBuffer.x++,k,G,ie),G>0)for(;--G;)te.setCellFromCodepoint(this._activeBuffer.x++,0,0,ie)}this._parser.precedingJoinState=ve,this._activeBuffer.x<le&&T-B>0&&te.getWidth(this._activeBuffer.x)===0&&!te.hasContent(this._activeBuffer.x)&&te.setCellFromCodepoint(this._activeBuffer.x,0,1,ie),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(M,B){return M.final!=="t"||M.prefix||M.intermediates?this._parser.registerCsiHandler(M,B):this._parser.registerCsiHandler(M,(T=>!L(T.params[0],this._optionsService.rawOptions.windowOptions)||B(T)))}registerDcsHandler(M,B){return this._parser.registerDcsHandler(M,new m.DcsHandler(B))}registerEscHandler(M,B){return this._parser.registerEscHandler(M,B)}registerOscHandler(M,B){return this._parser.registerOscHandler(M,new y.OscHandler(B))}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 M;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&&((M=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&M.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);B.hasWidth(this._activeBuffer.x)&&!B.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const M=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-M),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(M=this._bufferService.cols-1){this._activeBuffer.x=Math.min(M,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(M,B){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=M,this._activeBuffer.y=this._activeBuffer.scrollTop+B):(this._activeBuffer.x=M,this._activeBuffer.y=B),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(M,B){this._restrictCursor(),this._setCursor(this._activeBuffer.x+M,this._activeBuffer.y+B)}cursorUp(M){const B=this._activeBuffer.y-this._activeBuffer.scrollTop;return B>=0?this._moveCursor(0,-Math.min(B,M.params[0]||1)):this._moveCursor(0,-(M.params[0]||1)),!0}cursorDown(M){const B=this._activeBuffer.scrollBottom-this._activeBuffer.y;return B>=0?this._moveCursor(0,Math.min(B,M.params[0]||1)):this._moveCursor(0,M.params[0]||1),!0}cursorForward(M){return this._moveCursor(M.params[0]||1,0),!0}cursorBackward(M){return this._moveCursor(-(M.params[0]||1),0),!0}cursorNextLine(M){return this.cursorDown(M),this._activeBuffer.x=0,!0}cursorPrecedingLine(M){return this.cursorUp(M),this._activeBuffer.x=0,!0}cursorCharAbsolute(M){return this._setCursor((M.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(M){return this._setCursor(M.length>=2?(M.params[1]||1)-1:0,(M.params[0]||1)-1),!0}charPosAbsolute(M){return this._setCursor((M.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(M){return this._moveCursor(M.params[0]||1,0),!0}linePosAbsolute(M){return this._setCursor(this._activeBuffer.x,(M.params[0]||1)-1),!0}vPositionRelative(M){return this._moveCursor(0,M.params[0]||1),!0}hVPosition(M){return this.cursorPosition(M),!0}tabClear(M){const B=M.params[0];return B===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:B===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(M){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let B=M.params[0]||1;for(;B--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(M){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let B=M.params[0]||1;for(;B--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(M){const B=M.params[0];return B===1&&(this._curAttrData.bg|=536870912),B!==2&&B!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(M,B,T,k=!1,G=!1){const K=this._activeBuffer.lines.get(this._activeBuffer.ybase+M);K.replaceCells(B,T,this._activeBuffer.getNullCell(this._eraseAttrData()),G),k&&(K.isWrapped=!1)}_resetBufferLine(M,B=!1){const T=this._activeBuffer.lines.get(this._activeBuffer.ybase+M);T&&(T.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),B),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+M),T.isWrapped=!1)}eraseInDisplay(M,B=!1){let T;switch(this._restrictCursor(this._bufferService.cols),M.params[0]){case 0:for(T=this._activeBuffer.y,this._dirtyRowTracker.markDirty(T),this._eraseInBufferLine(T++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,B);T<this._bufferService.rows;T++)this._resetBufferLine(T,B);this._dirtyRowTracker.markDirty(T);break;case 1:for(T=this._activeBuffer.y,this._dirtyRowTracker.markDirty(T),this._eraseInBufferLine(T,0,this._activeBuffer.x+1,!0,B),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(T+1).isWrapped=!1);T--;)this._resetBufferLine(T,B);this._dirtyRowTracker.markDirty(0);break;case 2:for(T=this._bufferService.rows,this._dirtyRowTracker.markDirty(T-1);T--;)this._resetBufferLine(T,B);this._dirtyRowTracker.markDirty(0);break;case 3:const k=this._activeBuffer.lines.length-this._bufferService.rows;k>0&&(this._activeBuffer.lines.trimStart(k),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-k,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-k,0),this._onScroll.fire(0))}return!0}eraseInLine(M,B=!1){switch(this._restrictCursor(this._bufferService.cols),M.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,B);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,B);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,B)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(M){this._restrictCursor();let B=M.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const T=this._activeBuffer.ybase+this._activeBuffer.y,k=this._bufferService.rows-1-this._activeBuffer.scrollBottom,G=this._bufferService.rows-1+this._activeBuffer.ybase-k+1;for(;B--;)this._activeBuffer.lines.splice(G-1,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}deleteLines(M){this._restrictCursor();let B=M.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const T=this._activeBuffer.ybase+this._activeBuffer.y;let k;for(k=this._bufferService.rows-1-this._activeBuffer.scrollBottom,k=this._bufferService.rows-1+this._activeBuffer.ybase-k;B--;)this._activeBuffer.lines.splice(T,1),this._activeBuffer.lines.splice(k,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(M){this._restrictCursor();const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return B&&(B.insertCells(this._activeBuffer.x,M.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(M){this._restrictCursor();const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return B&&(B.deleteCells(this._activeBuffer.x,M.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(M){let B=M.params[0]||1;for(;B--;)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(M){let B=M.params[0]||1;for(;B--;)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(r.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(M){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=M.params[0]||1;for(let T=this._activeBuffer.scrollTop;T<=this._activeBuffer.scrollBottom;++T){const k=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);k.deleteCells(0,B,this._activeBuffer.getNullCell(this._eraseAttrData())),k.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(M){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=M.params[0]||1;for(let T=this._activeBuffer.scrollTop;T<=this._activeBuffer.scrollBottom;++T){const k=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);k.insertCells(0,B,this._activeBuffer.getNullCell(this._eraseAttrData())),k.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(M){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=M.params[0]||1;for(let T=this._activeBuffer.scrollTop;T<=this._activeBuffer.scrollBottom;++T){const k=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);k.insertCells(this._activeBuffer.x,B,this._activeBuffer.getNullCell(this._eraseAttrData())),k.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(M){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=M.params[0]||1;for(let T=this._activeBuffer.scrollTop;T<=this._activeBuffer.scrollBottom;++T){const k=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);k.deleteCells(this._activeBuffer.x,B,this._activeBuffer.getNullCell(this._eraseAttrData())),k.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(M){this._restrictCursor();const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return B&&(B.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(M.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(M){const B=this._parser.precedingJoinState;if(!B)return!0;const T=M.params[0]||1,k=v.UnicodeService.extractWidth(B),G=this._activeBuffer.x-k,K=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(G),ue=new Uint32Array(K.length*T);let le=0;for(let N=0;N<K.length;){const ie=K.codePointAt(N)||0;ue[le++]=ie,N+=ie>65535?2:1}let q=le;for(let N=1;N<T;++N)ue.copyWithin(q,0,le),q+=le;return this.print(ue,0,q),!0}sendDeviceAttributesPrimary(M){return M.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(a.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(a.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(M){return M.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(a.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(a.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(M.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(a.C0.ESC+"[>83;40003;0c")),!0}_is(M){return(this._optionsService.rawOptions.termName+"").indexOf(M)===0}setMode(M){for(let B=0;B<M.length;B++)switch(M.params[B]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(M){for(let B=0;B<M.length;B++)switch(M.params[B]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,p.DEFAULT_CHARSET),this._charsetService.setgCharset(1,p.DEFAULT_CHARSET),this._charsetService.setgCharset(2,p.DEFAULT_CHARSET),this._charsetService.setgCharset(3,p.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(M){for(let B=0;B<M.length;B++)switch(M.params[B]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(M){for(let B=0;B<M.length;B++)switch(M.params[B]){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(),M.params[B]===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(M,B){const T=this._coreService.decPrivateModes,{activeProtocol:k,activeEncoding:G}=this._coreMouseService,K=this._coreService,{buffers:ue,cols:le}=this._bufferService,{active:q,alt:N}=ue,ie=this._optionsService.rawOptions,te=_e=>_e?1:2,ve=M.params[0];return fe=ve,Me=B?ve===2?4:ve===4?te(K.modes.insertMode):ve===12?3:ve===20?te(ie.convertEol):0:ve===1?te(T.applicationCursorKeys):ve===3?ie.windowOptions.setWinLines?le===80?2:le===132?1:0:0:ve===6?te(T.origin):ve===7?te(T.wraparound):ve===8?3:ve===9?te(k==="X10"):ve===12?te(ie.cursorBlink):ve===25?te(!K.isCursorHidden):ve===45?te(T.reverseWraparound):ve===66?te(T.applicationKeypad):ve===67?4:ve===1e3?te(k==="VT200"):ve===1002?te(k==="DRAG"):ve===1003?te(k==="ANY"):ve===1004?te(T.sendFocus):ve===1005?4:ve===1006?te(G==="SGR"):ve===1015?4:ve===1016?te(G==="SGR_PIXELS"):ve===1048?1:ve===47||ve===1047||ve===1049?te(q===N):ve===2004?te(T.bracketedPasteMode):0,K.triggerDataEvent(`${a.C0.ESC}[${B?"":"?"}${fe};${Me}$y`),!0;var fe,Me}_updateAttrColor(M,B,T,k,G){return B===2?(M|=50331648,M&=-16777216,M|=S.AttributeData.fromColorRGB([T,k,G])):B===5&&(M&=-50331904,M|=33554432|255&T),M}_extractColor(M,B,T){const k=[0,0,-1,0,0,0];let G=0,K=0;do{if(k[K+G]=M.params[B+K],M.hasSubParams(B+K)){const ue=M.getSubParams(B+K);let le=0;do k[1]===5&&(G=1),k[K+le+1+G]=ue[le];while(++le<ue.length&&le+K+1+G<k.length);break}if(k[1]===5&&K+G>=2||k[1]===2&&K+G>=5)break;k[1]&&(G=1)}while(++K+B<M.length&&K+G<k.length);for(let ue=2;ue<k.length;++ue)k[ue]===-1&&(k[ue]=0);switch(k[0]){case 38:T.fg=this._updateAttrColor(T.fg,k[1],k[3],k[4],k[5]);break;case 48:T.bg=this._updateAttrColor(T.bg,k[1],k[3],k[4],k[5]);break;case 58:T.extended=T.extended.clone(),T.extended.underlineColor=this._updateAttrColor(T.extended.underlineColor,k[1],k[3],k[4],k[5])}return K}_processUnderline(M,B){B.extended=B.extended.clone(),(!~M||M>5)&&(M=1),B.extended.underlineStyle=M,B.fg|=268435456,M===0&&(B.fg&=-268435457),B.updateExtended()}_processSGR0(M){M.fg=r.DEFAULT_ATTR_DATA.fg,M.bg=r.DEFAULT_ATTR_DATA.bg,M.extended=M.extended.clone(),M.extended.underlineStyle=0,M.extended.underlineColor&=-67108864,M.updateExtended()}charAttributes(M){if(M.length===1&&M.params[0]===0)return this._processSGR0(this._curAttrData),!0;const B=M.length;let T;const k=this._curAttrData;for(let G=0;G<B;G++)T=M.params[G],T>=30&&T<=37?(k.fg&=-50331904,k.fg|=16777216|T-30):T>=40&&T<=47?(k.bg&=-50331904,k.bg|=16777216|T-40):T>=90&&T<=97?(k.fg&=-50331904,k.fg|=16777224|T-90):T>=100&&T<=107?(k.bg&=-50331904,k.bg|=16777224|T-100):T===0?this._processSGR0(k):T===1?k.fg|=134217728:T===3?k.bg|=67108864:T===4?(k.fg|=268435456,this._processUnderline(M.hasSubParams(G)?M.getSubParams(G)[0]:1,k)):T===5?k.fg|=536870912:T===7?k.fg|=67108864:T===8?k.fg|=1073741824:T===9?k.fg|=2147483648:T===2?k.bg|=134217728:T===21?this._processUnderline(2,k):T===22?(k.fg&=-134217729,k.bg&=-134217729):T===23?k.bg&=-67108865:T===24?(k.fg&=-268435457,this._processUnderline(0,k)):T===25?k.fg&=-536870913:T===27?k.fg&=-67108865:T===28?k.fg&=-1073741825:T===29?k.fg&=2147483647:T===39?(k.fg&=-67108864,k.fg|=16777215&r.DEFAULT_ATTR_DATA.fg):T===49?(k.bg&=-67108864,k.bg|=16777215&r.DEFAULT_ATTR_DATA.bg):T===38||T===48||T===58?G+=this._extractColor(M,G,k):T===53?k.bg|=1073741824:T===55?k.bg&=-1073741825:T===59?(k.extended=k.extended.clone(),k.extended.underlineColor=-1,k.updateExtended()):T===100?(k.fg&=-67108864,k.fg|=16777215&r.DEFAULT_ATTR_DATA.fg,k.bg&=-67108864,k.bg|=16777215&r.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",T);return!0}deviceStatus(M){switch(M.params[0]){case 5:this._coreService.triggerDataEvent(`${a.C0.ESC}[0n`);break;case 6:const B=this._activeBuffer.y+1,T=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${a.C0.ESC}[${B};${T}R`)}return!0}deviceStatusPrivate(M){if(M.params[0]===6){const B=this._activeBuffer.y+1,T=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${a.C0.ESC}[?${B};${T}R`)}return!0}softReset(M){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=r.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(M){const B=M.params[0]||1;switch(B){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 T=B%2==1;return this._optionsService.options.cursorBlink=T,!0}setScrollRegion(M){const B=M.params[0]||1;let T;return(M.length<2||(T=M.params[1])>this._bufferService.rows||T===0)&&(T=this._bufferService.rows),T>B&&(this._activeBuffer.scrollTop=B-1,this._activeBuffer.scrollBottom=T-1,this._setCursor(0,0)),!0}windowOptions(M){if(!L(M.params[0],this._optionsService.rawOptions.windowOptions))return!0;const B=M.length>1?M.params[1]:0;switch(M.params[0]){case 14:B!==2&&this._onRequestWindowsOptionsReport.fire(D.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(D.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${a.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:B!==0&&B!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),B!==0&&B!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:B!==0&&B!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),B!==0&&B!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(M){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(M){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(M){return this._windowTitle=M,this._onTitleChange.fire(M),!0}setIconName(M){return this._iconName=M,!0}setOrReportIndexedColor(M){const B=[],T=M.split(";");for(;T.length>1;){const k=T.shift(),G=T.shift();if(/^\d+$/.exec(k)){const K=parseInt(k);if(P(K))if(G==="?")B.push({type:0,index:K});else{const ue=(0,C.parseColor)(G);ue&&B.push({type:1,index:K,color:ue})}}}return B.length&&this._onColor.fire(B),!0}setHyperlink(M){const B=M.split(";");return!(B.length<2)&&(B[1]?this._createHyperlink(B[0],B[1]):!B[0]&&this._finishHyperlink())}_createHyperlink(M,B){this._getCurrentLinkId()&&this._finishHyperlink();const T=M.split(":");let k;const G=T.findIndex((K=>K.startsWith("id=")));return G!==-1&&(k=T[G].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:k,uri:B}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(M,B){const T=M.split(";");for(let k=0;k<T.length&&!(B>=this._specialColors.length);++k,++B)if(T[k]==="?")this._onColor.fire([{type:0,index:this._specialColors[B]}]);else{const G=(0,C.parseColor)(T[k]);G&&this._onColor.fire([{type:1,index:this._specialColors[B],color:G}])}return!0}setOrReportFgColor(M){return this._setOrReportSpecialColor(M,0)}setOrReportBgColor(M){return this._setOrReportSpecialColor(M,1)}setOrReportCursorColor(M){return this._setOrReportSpecialColor(M,2)}restoreIndexedColor(M){if(!M)return this._onColor.fire([{type:2}]),!0;const B=[],T=M.split(";");for(let k=0;k<T.length;++k)if(/^\d+$/.exec(T[k])){const G=parseInt(T[k]);P(G)&&B.push({type:2,index:G})}return B.length&&this._onColor.fire(B),!0}restoreFgColor(M){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(M){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(M){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,p.DEFAULT_CHARSET),!0}selectCharset(M){return M.length!==2?(this.selectDefaultCharset(),!0):(M[0]==="/"||this._charsetService.setgCharset(E[M[0]],p.CHARSETS[M[1]]||p.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 M=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,M,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=r.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=r.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(M){return this._charsetService.setgLevel(M),!0}screenAlignmentPattern(){const M=new l.CellData;M.content=4194373,M.fg=this._curAttrData.fg,M.bg=this._curAttrData.bg,this._setCursor(0,0);for(let B=0;B<this._bufferService.rows;++B){const T=this._activeBuffer.ybase+this._activeBuffer.y+B,k=this._activeBuffer.lines.get(T);k&&(k.fill(M),k.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(M,B){const T=this._bufferService.buffer,k=this._optionsService.rawOptions;return(G=>(this._coreService.triggerDataEvent(`${a.C0.ESC}${G}${a.C0.ESC}\\`),!0))(M==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:M==='"p'?'P1$r61;1"p':M==="r"?`P1$r${T.scrollTop+1};${T.scrollBottom+1}r`:M==="m"?"P1$r0m":M===" q"?`P1$r${{block:2,underline:4,bar:6}[k.cursorStyle]-(k.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(M,B){this._dirtyRowTracker.markRangeDirty(M,B)}}n.InputHandler=$;let I=class{constructor(z){this._bufferService=z,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(z){z<this.start?this.start=z:z>this.end&&(this.end=z)}markRangeDirty(z,M){z>M&&(O=z,z=M,M=O),z<this.start&&(this.start=z),M>this.end&&(this.end=M)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function P(z){return 0<=z&&z<256}I=d([_(0,x.IBufferService)],I)},844:(j,n)=>{function u(d){for(const _ of d)_.dispose();d.length=0}Object.defineProperty(n,"__esModule",{value:!0}),n.getDisposeArrayDisposable=n.disposeArray=n.toDisposable=n.MutableDisposable=n.Disposable=void 0,n.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 _=this._disposables.indexOf(d);_!==-1&&this._disposables.splice(_,1)}},n.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(d){var _;this._isDisposed||d===this._value||((_=this._value)==null||_.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}},n.toDisposable=function(d){return{dispose:d}},n.disposeArray=u,n.getDisposeArrayDisposable=function(d){return{dispose:()=>u(d)}}},1505:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.FourKeyMap=n.TwoKeyMap=void 0;class u{constructor(){this._data={}}set(_,a,p){this._data[_]||(this._data[_]={}),this._data[_][a]=p}get(_,a){return this._data[_]?this._data[_][a]:void 0}clear(){this._data={}}}n.TwoKeyMap=u,n.FourKeyMap=class{constructor(){this._data=new u}set(d,_,a,p,w){this._data.get(d,_)||this._data.set(d,_,new u),this._data.get(d,_).set(a,p,w)}get(d,_,a,p){var w;return(w=this._data.get(d,_))==null?void 0:w.get(a,p)}clear(){this._data.clear()}}},6114:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.isChromeOS=n.isLinux=n.isWindows=n.isIphone=n.isIpad=n.isMac=n.getSafariVersion=n.isSafari=n.isLegacyEdge=n.isFirefox=n.isNode=void 0,n.isNode=typeof process<"u"&&"title"in process;const u=n.isNode?"node":navigator.userAgent,d=n.isNode?"node":navigator.platform;n.isFirefox=u.includes("Firefox"),n.isLegacyEdge=u.includes("Edge"),n.isSafari=/^((?!chrome|android).)*safari/i.test(u),n.getSafariVersion=function(){if(!n.isSafari)return 0;const _=u.match(/Version\/(\d+)/);return _===null||_.length<2?0:parseInt(_[1])},n.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(d),n.isIpad=d==="iPad",n.isIphone=d==="iPhone",n.isWindows=["Windows","Win16","Win32","WinCE"].includes(d),n.isLinux=d.indexOf("Linux")>=0,n.isChromeOS=/\bCrOS\b/.test(u)},6106:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.SortedList=void 0;let u=0;n.SortedList=class{constructor(d){this._getKey=d,this._array=[]}clear(){this._array.length=0}insert(d){this._array.length!==0?(u=this._search(this._getKey(d)),this._array.splice(u,0,d)):this._array.push(d)}delete(d){if(this._array.length===0)return!1;const _=this._getKey(d);if(_===void 0||(u=this._search(_),u===-1)||this._getKey(this._array[u])!==_)return!1;do if(this._array[u]===d)return this._array.splice(u,1),!0;while(++u<this._array.length&&this._getKey(this._array[u])===_);return!1}*getKeyIterator(d){if(this._array.length!==0&&(u=this._search(d),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===d))do yield this._array[u];while(++u<this._array.length&&this._getKey(this._array[u])===d)}forEachByKey(d,_){if(this._array.length!==0&&(u=this._search(d),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===d))do _(this._array[u]);while(++u<this._array.length&&this._getKey(this._array[u])===d)}values(){return[...this._array].values()}_search(d){let _=0,a=this._array.length-1;for(;a>=_;){let p=_+a>>1;const w=this._getKey(this._array[p]);if(w>d)a=p-1;else{if(!(w<d)){for(;p>0&&this._getKey(this._array[p-1])===d;)p--;return p}_=p+1}}return _}}},7226:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DebouncedIdleTask=n.IdleTaskQueue=n.PriorityTaskQueue=void 0;const d=u(6114);class _{constructor(){this._tasks=[],this._i=0}enqueue(w){this._tasks.push(w),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(w){this._idleCallback=void 0;let b=0,c=0,r=w.timeRemaining(),h=0;for(;this._i<this._tasks.length;){if(b=Date.now(),this._tasks[this._i]()||this._i++,b=Math.max(1,Date.now()-b),c=Math.max(b,c),h=w.timeRemaining(),1.5*c>h)return r-b<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(r-b))}ms`),void this._start();r=h}this.clear()}}class a extends _{_requestCallback(w){return setTimeout((()=>w(this._createDeadline(16))))}_cancelCallback(w){clearTimeout(w)}_createDeadline(w){const b=Date.now()+w;return{timeRemaining:()=>Math.max(0,b-Date.now())}}}n.PriorityTaskQueue=a,n.IdleTaskQueue=!d.isNode&&"requestIdleCallback"in window?class extends _{_requestCallback(p){return requestIdleCallback(p)}_cancelCallback(p){cancelIdleCallback(p)}}:a,n.DebouncedIdleTask=class{constructor(){this._queue=new n.IdleTaskQueue}set(p){this._queue.clear(),this._queue.enqueue(p)}flush(){this._queue.flush()}}},9282:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.updateWindowsModeWrappedState=void 0;const d=u(643);n.updateWindowsModeWrappedState=function(_){const a=_.buffer.lines.get(_.buffer.ybase+_.buffer.y-1),p=a==null?void 0:a.get(_.cols-1),w=_.buffer.lines.get(_.buffer.ybase+_.buffer.y);w&&p&&(w.isWrapped=p[d.CHAR_DATA_CODE_INDEX]!==d.NULL_CELL_CODE&&p[d.CHAR_DATA_CODE_INDEX]!==d.WHITESPACE_CELL_CODE)}},3734:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ExtendedAttrs=n.AttributeData=void 0;class u{constructor(){this.fg=0,this.bg=0,this.extended=new d}static toColorRGB(a){return[a>>>16&255,a>>>8&255,255&a]}static fromColorRGB(a){return(255&a[0])<<16|(255&a[1])<<8|255&a[2]}clone(){const a=new u;return a.fg=this.fg,a.bg=this.bg,a.extended=this.extended.clone(),a}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}}n.AttributeData=u;class d{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(a){this._ext=a}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(a){this._ext&=-469762049,this._ext|=a<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(a){this._ext&=-67108864,this._ext|=67108863&a}get urlId(){return this._urlId}set urlId(a){this._urlId=a}get underlineVariantOffset(){const a=(3758096384&this._ext)>>29;return a<0?4294967288^a:a}set underlineVariantOffset(a){this._ext&=536870911,this._ext|=a<<29&3758096384}constructor(a=0,p=0){this._ext=0,this._urlId=0,this._ext=a,this._urlId=p}clone(){return new d(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}n.ExtendedAttrs=d},9092:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Buffer=n.MAX_BUFFER_SIZE=void 0;const d=u(6349),_=u(7226),a=u(3734),p=u(8437),w=u(4634),b=u(511),c=u(643),r=u(4863),h=u(7116);n.MAX_BUFFER_SIZE=4294967295,n.Buffer=class{constructor(o,l,S){this._hasScrollback=o,this._optionsService=l,this._bufferService=S,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=p.DEFAULT_ATTR_DATA.clone(),this.savedCharset=h.DEFAULT_CHARSET,this.markers=[],this._nullCell=b.CellData.fromCharData([0,c.NULL_CELL_CHAR,c.NULL_CELL_WIDTH,c.NULL_CELL_CODE]),this._whitespaceCell=b.CellData.fromCharData([0,c.WHITESPACE_CELL_CHAR,c.WHITESPACE_CELL_WIDTH,c.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new _.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(o){return o?(this._nullCell.fg=o.fg,this._nullCell.bg=o.bg,this._nullCell.extended=o.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new a.ExtendedAttrs),this._nullCell}getWhitespaceCell(o){return o?(this._whitespaceCell.fg=o.fg,this._whitespaceCell.bg=o.bg,this._whitespaceCell.extended=o.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new a.ExtendedAttrs),this._whitespaceCell}getBlankLine(o,l){return new p.BufferLine(this._bufferService.cols,this.getNullCell(o),l)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const o=this.ybase+this.y-this.ydisp;return o>=0&&o<this._rows}_getCorrectBufferLength(o){if(!this._hasScrollback)return o;const l=o+this._optionsService.rawOptions.scrollback;return l>n.MAX_BUFFER_SIZE?n.MAX_BUFFER_SIZE:l}fillViewportRows(o){if(this.lines.length===0){o===void 0&&(o=p.DEFAULT_ATTR_DATA);let l=this._rows;for(;l--;)this.lines.push(this.getBlankLine(o))}}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(o,l){const S=this.getNullCell(p.DEFAULT_ATTR_DATA);let x=0;const v=this._getCorrectBufferLength(l);if(v>this.lines.maxLength&&(this.lines.maxLength=v),this.lines.length>0){if(this._cols<o)for(let m=0;m<this.lines.length;m++)x+=+this.lines.get(m).resize(o,S);let y=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 p.BufferLine(o,S)):this.ybase>0&&this.lines.length<=this.ybase+this.y+y+1?(this.ybase--,y++,this.ydisp>0&&this.ydisp--):this.lines.push(new p.BufferLine(o,S)));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(v<this.lines.maxLength){const m=this.lines.length-v;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=v}this.x=Math.min(this.x,o-1),this.y=Math.min(this.y,l-1),y&&(this.y+=y),this.savedX=Math.min(this.savedX,o-1),this.scrollTop=0}if(this.scrollBottom=l-1,this._isReflowEnabled&&(this._reflow(o,l),this._cols>o))for(let y=0;y<this.lines.length;y++)x+=+this.lines.get(y).resize(o,S);this._cols=o,this._rows=l,this._memoryCleanupQueue.clear(),x>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let o=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,o=!1);let l=0;for(;this._memoryCleanupPosition<this.lines.length;)if(l+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),l>100)return!0;return o}get _isReflowEnabled(){const o=this._optionsService.rawOptions.windowsPty;return o&&o.buildNumber?this._hasScrollback&&o.backend==="conpty"&&o.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(o,l){this._cols!==o&&(o>this._cols?this._reflowLarger(o,l):this._reflowSmaller(o,l))}_reflowLarger(o,l){const S=(0,w.reflowLargerGetLinesToRemove)(this.lines,this._cols,o,this.ybase+this.y,this.getNullCell(p.DEFAULT_ATTR_DATA));if(S.length>0){const x=(0,w.reflowLargerCreateNewLayout)(this.lines,S);(0,w.reflowLargerApplyNewLayout)(this.lines,x.layout),this._reflowLargerAdjustViewport(o,l,x.countRemoved)}}_reflowLargerAdjustViewport(o,l,S){const x=this.getNullCell(p.DEFAULT_ATTR_DATA);let v=S;for(;v-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<l&&this.lines.push(new p.BufferLine(o,x))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-S,0)}_reflowSmaller(o,l){const S=this.getNullCell(p.DEFAULT_ATTR_DATA),x=[];let v=0;for(let y=this.lines.length-1;y>=0;y--){let m=this.lines.get(y);if(!m||!m.isWrapped&&m.getTrimmedLength()<=o)continue;const C=[m];for(;m.isWrapped&&y>0;)m=this.lines.get(--y),C.unshift(m);const E=this.ybase+this.y;if(E>=y&&E<y+C.length)continue;const R=C[C.length-1].getTrimmedLength(),L=(0,w.reflowSmallerGetNewLineLengths)(C,this._cols,o),D=L.length-C.length;let O;O=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+D):Math.max(0,this.lines.length-this.lines.maxLength+D);const $=[];for(let T=0;T<D;T++){const k=this.getBlankLine(p.DEFAULT_ATTR_DATA,!0);$.push(k)}$.length>0&&(x.push({start:y+C.length+v,newLines:$}),v+=$.length),C.push(...$);let I=L.length-1,P=L[I];P===0&&(I--,P=L[I]);let z=C.length-D-1,M=R;for(;z>=0;){const T=Math.min(M,P);if(C[I]===void 0)break;if(C[I].copyCellsFrom(C[z],M-T,P-T,T,!0),P-=T,P===0&&(I--,P=L[I]),M-=T,M===0){z--;const k=Math.max(z,0);M=(0,w.getWrappedLineTrimmedLength)(C,k,this._cols)}}for(let T=0;T<C.length;T++)L[T]<o&&C[T].setCell(L[T],S);let B=D-O;for(;B-- >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+v)-l&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+D,this.ybase+l-1)}if(x.length>0){const y=[],m=[];for(let I=0;I<this.lines.length;I++)m.push(this.lines.get(I));const C=this.lines.length;let E=C-1,R=0,L=x[R];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+v);let D=0;for(let I=Math.min(this.lines.maxLength-1,C+v-1);I>=0;I--)if(L&&L.start>E+D){for(let P=L.newLines.length-1;P>=0;P--)this.lines.set(I--,L.newLines[P]);I++,y.push({index:E+1,amount:L.newLines.length}),D+=L.newLines.length,L=x[++R]}else this.lines.set(I,m[E--]);let O=0;for(let I=y.length-1;I>=0;I--)y[I].index+=O,this.lines.onInsertEmitter.fire(y[I]),O+=y[I].amount;const $=Math.max(0,C+v-this.lines.maxLength);$>0&&this.lines.onTrimEmitter.fire($)}}translateBufferLineToString(o,l,S=0,x){const v=this.lines.get(o);return v?v.translateToString(l,S,x):""}getWrappedRangeForLine(o){let l=o,S=o;for(;l>0&&this.lines.get(l).isWrapped;)l--;for(;S+1<this.lines.length&&this.lines.get(S+1).isWrapped;)S++;return{first:l,last:S}}setupTabStops(o){for(o!=null?this.tabs[o]||(o=this.prevStop(o)):(this.tabs={},o=0);o<this._cols;o+=this._optionsService.rawOptions.tabStopWidth)this.tabs[o]=!0}prevStop(o){for(o==null&&(o=this.x);!this.tabs[--o]&&o>0;);return o>=this._cols?this._cols-1:o<0?0:o}nextStop(o){for(o==null&&(o=this.x);!this.tabs[++o]&&o<this._cols;);return o>=this._cols?this._cols-1:o<0?0:o}clearMarkers(o){this._isClearing=!0;for(let l=0;l<this.markers.length;l++)this.markers[l].line===o&&(this.markers[l].dispose(),this.markers.splice(l--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let o=0;o<this.markers.length;o++)this.markers[o].dispose(),this.markers.splice(o--,1);this._isClearing=!1}addMarker(o){const l=new r.Marker(o);return this.markers.push(l),l.register(this.lines.onTrim((S=>{l.line-=S,l.line<0&&l.dispose()}))),l.register(this.lines.onInsert((S=>{l.line>=S.index&&(l.line+=S.amount)}))),l.register(this.lines.onDelete((S=>{l.line>=S.index&&l.line<S.index+S.amount&&l.dispose(),l.line>S.index&&(l.line-=S.amount)}))),l.register(l.onDispose((()=>this._removeMarker(l)))),l}_removeMarker(o){this._isClearing||this.markers.splice(this.markers.indexOf(o),1)}}},8437:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferLine=n.DEFAULT_ATTR_DATA=void 0;const d=u(3734),_=u(511),a=u(643),p=u(482);n.DEFAULT_ATTR_DATA=Object.freeze(new d.AttributeData);let w=0;class b{constructor(r,h,o=!1){this.isWrapped=o,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*r);const l=h||_.CellData.fromCharData([0,a.NULL_CELL_CHAR,a.NULL_CELL_WIDTH,a.NULL_CELL_CODE]);for(let S=0;S<r;++S)this.setCell(S,l);this.length=r}get(r){const h=this._data[3*r+0],o=2097151&h;return[this._data[3*r+1],2097152&h?this._combined[r]:o?(0,p.stringFromCodePoint)(o):"",h>>22,2097152&h?this._combined[r].charCodeAt(this._combined[r].length-1):o]}set(r,h){this._data[3*r+1]=h[a.CHAR_DATA_ATTR_INDEX],h[a.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[r]=h[1],this._data[3*r+0]=2097152|r|h[a.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*r+0]=h[a.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|h[a.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(r){return this._data[3*r+0]>>22}hasWidth(r){return 12582912&this._data[3*r+0]}getFg(r){return this._data[3*r+1]}getBg(r){return this._data[3*r+2]}hasContent(r){return 4194303&this._data[3*r+0]}getCodePoint(r){const h=this._data[3*r+0];return 2097152&h?this._combined[r].charCodeAt(this._combined[r].length-1):2097151&h}isCombined(r){return 2097152&this._data[3*r+0]}getString(r){const h=this._data[3*r+0];return 2097152&h?this._combined[r]:2097151&h?(0,p.stringFromCodePoint)(2097151&h):""}isProtected(r){return 536870912&this._data[3*r+2]}loadCell(r,h){return w=3*r,h.content=this._data[w+0],h.fg=this._data[w+1],h.bg=this._data[w+2],2097152&h.content&&(h.combinedData=this._combined[r]),268435456&h.bg&&(h.extended=this._extendedAttrs[r]),h}setCell(r,h){2097152&h.content&&(this._combined[r]=h.combinedData),268435456&h.bg&&(this._extendedAttrs[r]=h.extended),this._data[3*r+0]=h.content,this._data[3*r+1]=h.fg,this._data[3*r+2]=h.bg}setCellFromCodepoint(r,h,o,l){268435456&l.bg&&(this._extendedAttrs[r]=l.extended),this._data[3*r+0]=h|o<<22,this._data[3*r+1]=l.fg,this._data[3*r+2]=l.bg}addCodepointToCell(r,h,o){let l=this._data[3*r+0];2097152&l?this._combined[r]+=(0,p.stringFromCodePoint)(h):2097151&l?(this._combined[r]=(0,p.stringFromCodePoint)(2097151&l)+(0,p.stringFromCodePoint)(h),l&=-2097152,l|=2097152):l=h|4194304,o&&(l&=-12582913,l|=o<<22),this._data[3*r+0]=l}insertCells(r,h,o){if((r%=this.length)&&this.getWidth(r-1)===2&&this.setCellFromCodepoint(r-1,0,1,o),h<this.length-r){const l=new _.CellData;for(let S=this.length-r-h-1;S>=0;--S)this.setCell(r+h+S,this.loadCell(r+S,l));for(let S=0;S<h;++S)this.setCell(r+S,o)}else for(let l=r;l<this.length;++l)this.setCell(l,o);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,o)}deleteCells(r,h,o){if(r%=this.length,h<this.length-r){const l=new _.CellData;for(let S=0;S<this.length-r-h;++S)this.setCell(r+S,this.loadCell(r+h+S,l));for(let S=this.length-h;S<this.length;++S)this.setCell(S,o)}else for(let l=r;l<this.length;++l)this.setCell(l,o);r&&this.getWidth(r-1)===2&&this.setCellFromCodepoint(r-1,0,1,o),this.getWidth(r)!==0||this.hasContent(r)||this.setCellFromCodepoint(r,0,1,o)}replaceCells(r,h,o,l=!1){if(l)for(r&&this.getWidth(r-1)===2&&!this.isProtected(r-1)&&this.setCellFromCodepoint(r-1,0,1,o),h<this.length&&this.getWidth(h-1)===2&&!this.isProtected(h)&&this.setCellFromCodepoint(h,0,1,o);r<h&&r<this.length;)this.isProtected(r)||this.setCell(r,o),r++;else for(r&&this.getWidth(r-1)===2&&this.setCellFromCodepoint(r-1,0,1,o),h<this.length&&this.getWidth(h-1)===2&&this.setCellFromCodepoint(h,0,1,o);r<h&&r<this.length;)this.setCell(r++,o)}resize(r,h){if(r===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const o=3*r;if(r>this.length){if(this._data.buffer.byteLength>=4*o)this._data=new Uint32Array(this._data.buffer,0,o);else{const l=new Uint32Array(o);l.set(this._data),this._data=l}for(let l=this.length;l<r;++l)this.setCell(l,h)}else{this._data=this._data.subarray(0,o);const l=Object.keys(this._combined);for(let x=0;x<l.length;x++){const v=parseInt(l[x],10);v>=r&&delete this._combined[v]}const S=Object.keys(this._extendedAttrs);for(let x=0;x<S.length;x++){const v=parseInt(S[x],10);v>=r&&delete this._extendedAttrs[v]}}return this.length=r,4*o*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const r=new Uint32Array(this._data.length);return r.set(this._data),this._data=r,1}return 0}fill(r,h=!1){if(h)for(let o=0;o<this.length;++o)this.isProtected(o)||this.setCell(o,r);else{this._combined={},this._extendedAttrs={};for(let o=0;o<this.length;++o)this.setCell(o,r)}}copyFrom(r){this.length!==r.length?this._data=new Uint32Array(r._data):this._data.set(r._data),this.length=r.length,this._combined={};for(const h in r._combined)this._combined[h]=r._combined[h];this._extendedAttrs={};for(const h in r._extendedAttrs)this._extendedAttrs[h]=r._extendedAttrs[h];this.isWrapped=r.isWrapped}clone(){const r=new b(0);r._data=new Uint32Array(this._data),r.length=this.length;for(const h in this._combined)r._combined[h]=this._combined[h];for(const h in this._extendedAttrs)r._extendedAttrs[h]=this._extendedAttrs[h];return r.isWrapped=this.isWrapped,r}getTrimmedLength(){for(let r=this.length-1;r>=0;--r)if(4194303&this._data[3*r+0])return r+(this._data[3*r+0]>>22);return 0}getNoBgTrimmedLength(){for(let r=this.length-1;r>=0;--r)if(4194303&this._data[3*r+0]||50331648&this._data[3*r+2])return r+(this._data[3*r+0]>>22);return 0}copyCellsFrom(r,h,o,l,S){const x=r._data;if(S)for(let y=l-1;y>=0;y--){for(let m=0;m<3;m++)this._data[3*(o+y)+m]=x[3*(h+y)+m];268435456&x[3*(h+y)+2]&&(this._extendedAttrs[o+y]=r._extendedAttrs[h+y])}else for(let y=0;y<l;y++){for(let m=0;m<3;m++)this._data[3*(o+y)+m]=x[3*(h+y)+m];268435456&x[3*(h+y)+2]&&(this._extendedAttrs[o+y]=r._extendedAttrs[h+y])}const v=Object.keys(r._combined);for(let y=0;y<v.length;y++){const m=parseInt(v[y],10);m>=h&&(this._combined[m-h+o]=r._combined[m])}}translateToString(r,h,o,l){h=h??0,o=o??this.length,r&&(o=Math.min(o,this.getTrimmedLength())),l&&(l.length=0);let S="";for(;h<o;){const x=this._data[3*h+0],v=2097151&x,y=2097152&x?this._combined[h]:v?(0,p.stringFromCodePoint)(v):a.WHITESPACE_CELL_CHAR;if(S+=y,l)for(let m=0;m<y.length;++m)l.push(h);h+=x>>22||1}return l&&l.push(h),S}}n.BufferLine=b},4841:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.getRangeLength=void 0,n.getRangeLength=function(u,d){if(u.start.y>u.end.y)throw new Error(`Buffer range end (${u.end.x}, ${u.end.y}) cannot be before start (${u.start.x}, ${u.start.y})`);return d*(u.end.y-u.start.y)+(u.end.x-u.start.x+1)}},4634:(j,n)=>{function u(d,_,a){if(_===d.length-1)return d[_].getTrimmedLength();const p=!d[_].hasContent(a-1)&&d[_].getWidth(a-1)===1,w=d[_+1].getWidth(0)===2;return p&&w?a-1:a}Object.defineProperty(n,"__esModule",{value:!0}),n.getWrappedLineTrimmedLength=n.reflowSmallerGetNewLineLengths=n.reflowLargerApplyNewLayout=n.reflowLargerCreateNewLayout=n.reflowLargerGetLinesToRemove=void 0,n.reflowLargerGetLinesToRemove=function(d,_,a,p,w){const b=[];for(let c=0;c<d.length-1;c++){let r=c,h=d.get(++r);if(!h.isWrapped)continue;const o=[d.get(c)];for(;r<d.length&&h.isWrapped;)o.push(h),h=d.get(++r);if(p>=c&&p<r){c+=o.length-1;continue}let l=0,S=u(o,l,_),x=1,v=0;for(;x<o.length;){const m=u(o,x,_),C=m-v,E=a-S,R=Math.min(C,E);o[l].copyCellsFrom(o[x],v,S,R,!1),S+=R,S===a&&(l++,S=0),v+=R,v===m&&(x++,v=0),S===0&&l!==0&&o[l-1].getWidth(a-1)===2&&(o[l].copyCellsFrom(o[l-1],a-1,S++,1,!1),o[l-1].setCell(a-1,w))}o[l].replaceCells(S,a,w);let y=0;for(let m=o.length-1;m>0&&(m>l||o[m].getTrimmedLength()===0);m--)y++;y>0&&(b.push(c+o.length-y),b.push(y)),c+=o.length-1}return b},n.reflowLargerCreateNewLayout=function(d,_){const a=[];let p=0,w=_[p],b=0;for(let c=0;c<d.length;c++)if(w===c){const r=_[++p];d.onDeleteEmitter.fire({index:c-b,amount:r}),c+=r-1,b+=r,w=_[++p]}else a.push(c);return{layout:a,countRemoved:b}},n.reflowLargerApplyNewLayout=function(d,_){const a=[];for(let p=0;p<_.length;p++)a.push(d.get(_[p]));for(let p=0;p<a.length;p++)d.set(p,a[p]);d.length=_.length},n.reflowSmallerGetNewLineLengths=function(d,_,a){const p=[],w=d.map(((h,o)=>u(d,o,_))).reduce(((h,o)=>h+o));let b=0,c=0,r=0;for(;r<w;){if(w-r<a){p.push(w-r);break}b+=a;const h=u(d,c,_);b>h&&(b-=h,c++);const o=d[c].getWidth(b-1)===2;o&&b--;const l=o?a-1:a;p.push(l),r+=l}return p},n.getWrappedLineTrimmedLength=u},5295:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferSet=void 0;const d=u(8460),_=u(844),a=u(9092);class p extends _.Disposable{constructor(b,c){super(),this._optionsService=b,this._bufferService=c,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 a.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new a.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(b){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(b),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(b,c){this._normal.resize(b,c),this._alt.resize(b,c),this.setupTabStops(b)}setupTabStops(b){this._normal.setupTabStops(b),this._alt.setupTabStops(b)}}n.BufferSet=p},511:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellData=void 0;const d=u(482),_=u(643),a=u(3734);class p extends a.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new a.ExtendedAttrs,this.combinedData=""}static fromCharData(b){const c=new p;return c.setFromCharData(b),c}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(b){this.fg=b[_.CHAR_DATA_ATTR_INDEX],this.bg=0;let c=!1;if(b[_.CHAR_DATA_CHAR_INDEX].length>2)c=!0;else if(b[_.CHAR_DATA_CHAR_INDEX].length===2){const r=b[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=r&&r<=56319){const h=b[_.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=h&&h<=57343?this.content=1024*(r-55296)+h-56320+65536|b[_.CHAR_DATA_WIDTH_INDEX]<<22:c=!0}else c=!0}else this.content=b[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|b[_.CHAR_DATA_WIDTH_INDEX]<<22;c&&(this.combinedData=b[_.CHAR_DATA_CHAR_INDEX],this.content=2097152|b[_.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}n.CellData=p},643:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.WHITESPACE_CELL_CODE=n.WHITESPACE_CELL_WIDTH=n.WHITESPACE_CELL_CHAR=n.NULL_CELL_CODE=n.NULL_CELL_WIDTH=n.NULL_CELL_CHAR=n.CHAR_DATA_CODE_INDEX=n.CHAR_DATA_WIDTH_INDEX=n.CHAR_DATA_CHAR_INDEX=n.CHAR_DATA_ATTR_INDEX=n.DEFAULT_EXT=n.DEFAULT_ATTR=n.DEFAULT_COLOR=void 0,n.DEFAULT_COLOR=0,n.DEFAULT_ATTR=256|n.DEFAULT_COLOR<<9,n.DEFAULT_EXT=0,n.CHAR_DATA_ATTR_INDEX=0,n.CHAR_DATA_CHAR_INDEX=1,n.CHAR_DATA_WIDTH_INDEX=2,n.CHAR_DATA_CODE_INDEX=3,n.NULL_CELL_CHAR="",n.NULL_CELL_WIDTH=1,n.NULL_CELL_CODE=0,n.WHITESPACE_CELL_CHAR=" ",n.WHITESPACE_CELL_WIDTH=1,n.WHITESPACE_CELL_CODE=32},4863:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Marker=void 0;const d=u(8460),_=u(844);class a{get id(){return this._id}constructor(w){this.line=w,this.isDisposed=!1,this._disposables=[],this._id=a._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,_.disposeArray)(this._disposables),this._disposables.length=0)}register(w){return this._disposables.push(w),w}}n.Marker=a,a._nextId=1},7116:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DEFAULT_CHARSET=n.CHARSETS=void 0,n.CHARSETS={},n.DEFAULT_CHARSET=n.CHARSETS.B,n.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:"≥","{":"π","|":"≠","}":"£","~":"·"},n.CHARSETS.A={"#":"£"},n.CHARSETS.B=void 0,n.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},n.CHARSETS.C=n.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},n.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},n.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},n.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},n.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},n.CHARSETS.E=n.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},n.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},n.CHARSETS.H=n.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},n.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(j,n)=>{var u,d,_;Object.defineProperty(n,"__esModule",{value:!0}),n.C1_ESCAPED=n.C1=n.C0=void 0,(function(a){a.NUL="\0",a.SOH="",a.STX="",a.ETX="",a.EOT="",a.ENQ="",a.ACK="",a.BEL="\x07",a.BS="\b",a.HT=" ",a.LF=`
|
|
56
|
+
`,a.VT="\v",a.FF="\f",a.CR="\r",a.SO="",a.SI="",a.DLE="",a.DC1="",a.DC2="",a.DC3="",a.DC4="",a.NAK="",a.SYN="",a.ETB="",a.CAN="",a.EM="",a.SUB="",a.ESC="\x1B",a.FS="",a.GS="",a.RS="",a.US="",a.SP=" ",a.DEL=""})(u||(n.C0=u={})),(function(a){a.PAD="",a.HOP="",a.BPH="",a.NBH="",a.IND="",a.NEL="
",a.SSA="",a.ESA="",a.HTS="",a.HTJ="",a.VTS="",a.PLD="",a.PLU="",a.RI="",a.SS2="",a.SS3="",a.DCS="",a.PU1="",a.PU2="",a.STS="",a.CCH="",a.MW="",a.SPA="",a.EPA="",a.SOS="",a.SGCI="",a.SCI="",a.CSI="",a.ST="",a.OSC="",a.PM="",a.APC=""})(d||(n.C1=d={})),(function(a){a.ST=`${u.ESC}\\`})(_||(n.C1_ESCAPED=_={}))},7399:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.evaluateKeyboardEvent=void 0;const d=u(2584),_={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:["'",'"']};n.evaluateKeyboardEvent=function(a,p,w,b){const c={type:0,cancel:!1,key:void 0},r=(a.shiftKey?1:0)|(a.altKey?2:0)|(a.ctrlKey?4:0)|(a.metaKey?8:0);switch(a.keyCode){case 0:a.key==="UIKeyInputUpArrow"?c.key=p?d.C0.ESC+"OA":d.C0.ESC+"[A":a.key==="UIKeyInputLeftArrow"?c.key=p?d.C0.ESC+"OD":d.C0.ESC+"[D":a.key==="UIKeyInputRightArrow"?c.key=p?d.C0.ESC+"OC":d.C0.ESC+"[C":a.key==="UIKeyInputDownArrow"&&(c.key=p?d.C0.ESC+"OB":d.C0.ESC+"[B");break;case 8:c.key=a.ctrlKey?"\b":d.C0.DEL,a.altKey&&(c.key=d.C0.ESC+c.key);break;case 9:if(a.shiftKey){c.key=d.C0.ESC+"[Z";break}c.key=d.C0.HT,c.cancel=!0;break;case 13:c.key=a.altKey?d.C0.ESC+d.C0.CR:d.C0.CR,c.cancel=!0;break;case 27:c.key=d.C0.ESC,a.altKey&&(c.key=d.C0.ESC+d.C0.ESC),c.cancel=!0;break;case 37:if(a.metaKey)break;r?(c.key=d.C0.ESC+"[1;"+(r+1)+"D",c.key===d.C0.ESC+"[1;3D"&&(c.key=d.C0.ESC+(w?"b":"[1;5D"))):c.key=p?d.C0.ESC+"OD":d.C0.ESC+"[D";break;case 39:if(a.metaKey)break;r?(c.key=d.C0.ESC+"[1;"+(r+1)+"C",c.key===d.C0.ESC+"[1;3C"&&(c.key=d.C0.ESC+(w?"f":"[1;5C"))):c.key=p?d.C0.ESC+"OC":d.C0.ESC+"[C";break;case 38:if(a.metaKey)break;r?(c.key=d.C0.ESC+"[1;"+(r+1)+"A",w||c.key!==d.C0.ESC+"[1;3A"||(c.key=d.C0.ESC+"[1;5A")):c.key=p?d.C0.ESC+"OA":d.C0.ESC+"[A";break;case 40:if(a.metaKey)break;r?(c.key=d.C0.ESC+"[1;"+(r+1)+"B",w||c.key!==d.C0.ESC+"[1;3B"||(c.key=d.C0.ESC+"[1;5B")):c.key=p?d.C0.ESC+"OB":d.C0.ESC+"[B";break;case 45:a.shiftKey||a.ctrlKey||(c.key=d.C0.ESC+"[2~");break;case 46:c.key=r?d.C0.ESC+"[3;"+(r+1)+"~":d.C0.ESC+"[3~";break;case 36:c.key=r?d.C0.ESC+"[1;"+(r+1)+"H":p?d.C0.ESC+"OH":d.C0.ESC+"[H";break;case 35:c.key=r?d.C0.ESC+"[1;"+(r+1)+"F":p?d.C0.ESC+"OF":d.C0.ESC+"[F";break;case 33:a.shiftKey?c.type=2:a.ctrlKey?c.key=d.C0.ESC+"[5;"+(r+1)+"~":c.key=d.C0.ESC+"[5~";break;case 34:a.shiftKey?c.type=3:a.ctrlKey?c.key=d.C0.ESC+"[6;"+(r+1)+"~":c.key=d.C0.ESC+"[6~";break;case 112:c.key=r?d.C0.ESC+"[1;"+(r+1)+"P":d.C0.ESC+"OP";break;case 113:c.key=r?d.C0.ESC+"[1;"+(r+1)+"Q":d.C0.ESC+"OQ";break;case 114:c.key=r?d.C0.ESC+"[1;"+(r+1)+"R":d.C0.ESC+"OR";break;case 115:c.key=r?d.C0.ESC+"[1;"+(r+1)+"S":d.C0.ESC+"OS";break;case 116:c.key=r?d.C0.ESC+"[15;"+(r+1)+"~":d.C0.ESC+"[15~";break;case 117:c.key=r?d.C0.ESC+"[17;"+(r+1)+"~":d.C0.ESC+"[17~";break;case 118:c.key=r?d.C0.ESC+"[18;"+(r+1)+"~":d.C0.ESC+"[18~";break;case 119:c.key=r?d.C0.ESC+"[19;"+(r+1)+"~":d.C0.ESC+"[19~";break;case 120:c.key=r?d.C0.ESC+"[20;"+(r+1)+"~":d.C0.ESC+"[20~";break;case 121:c.key=r?d.C0.ESC+"[21;"+(r+1)+"~":d.C0.ESC+"[21~";break;case 122:c.key=r?d.C0.ESC+"[23;"+(r+1)+"~":d.C0.ESC+"[23~";break;case 123:c.key=r?d.C0.ESC+"[24;"+(r+1)+"~":d.C0.ESC+"[24~";break;default:if(!a.ctrlKey||a.shiftKey||a.altKey||a.metaKey)if(w&&!b||!a.altKey||a.metaKey)!w||a.altKey||a.ctrlKey||a.shiftKey||!a.metaKey?a.key&&!a.ctrlKey&&!a.altKey&&!a.metaKey&&a.keyCode>=48&&a.key.length===1?c.key=a.key:a.key&&a.ctrlKey&&(a.key==="_"&&(c.key=d.C0.US),a.key==="@"&&(c.key=d.C0.NUL)):a.keyCode===65&&(c.type=1);else{const h=_[a.keyCode],o=h==null?void 0:h[a.shiftKey?1:0];if(o)c.key=d.C0.ESC+o;else if(a.keyCode>=65&&a.keyCode<=90){const l=a.ctrlKey?a.keyCode-64:a.keyCode+32;let S=String.fromCharCode(l);a.shiftKey&&(S=S.toUpperCase()),c.key=d.C0.ESC+S}else if(a.keyCode===32)c.key=d.C0.ESC+(a.ctrlKey?d.C0.NUL:" ");else if(a.key==="Dead"&&a.code.startsWith("Key")){let l=a.code.slice(3,4);a.shiftKey||(l=l.toLowerCase()),c.key=d.C0.ESC+l,c.cancel=!0}}else a.keyCode>=65&&a.keyCode<=90?c.key=String.fromCharCode(a.keyCode-64):a.keyCode===32?c.key=d.C0.NUL:a.keyCode>=51&&a.keyCode<=55?c.key=String.fromCharCode(a.keyCode-51+27):a.keyCode===56?c.key=d.C0.DEL:a.keyCode===219?c.key=d.C0.ESC:a.keyCode===220?c.key=d.C0.FS:a.keyCode===221&&(c.key=d.C0.GS)}return c}},482:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Utf8ToUtf32=n.StringToUtf32=n.utf32ToString=n.stringFromCodePoint=void 0,n.stringFromCodePoint=function(u){return u>65535?(u-=65536,String.fromCharCode(55296+(u>>10))+String.fromCharCode(u%1024+56320)):String.fromCharCode(u)},n.utf32ToString=function(u,d=0,_=u.length){let a="";for(let p=d;p<_;++p){let w=u[p];w>65535?(w-=65536,a+=String.fromCharCode(55296+(w>>10))+String.fromCharCode(w%1024+56320)):a+=String.fromCharCode(w)}return a},n.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(u,d){const _=u.length;if(!_)return 0;let a=0,p=0;if(this._interim){const w=u.charCodeAt(p++);56320<=w&&w<=57343?d[a++]=1024*(this._interim-55296)+w-56320+65536:(d[a++]=this._interim,d[a++]=w),this._interim=0}for(let w=p;w<_;++w){const b=u.charCodeAt(w);if(55296<=b&&b<=56319){if(++w>=_)return this._interim=b,a;const c=u.charCodeAt(w);56320<=c&&c<=57343?d[a++]=1024*(b-55296)+c-56320+65536:(d[a++]=b,d[a++]=c)}else b!==65279&&(d[a++]=b)}return a}},n.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(u,d){const _=u.length;if(!_)return 0;let a,p,w,b,c=0,r=0,h=0;if(this.interim[0]){let S=!1,x=this.interim[0];x&=(224&x)==192?31:(240&x)==224?15:7;let v,y=0;for(;(v=63&this.interim[++y])&&y<4;)x<<=6,x|=v;const m=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,C=m-y;for(;h<C;){if(h>=_)return 0;if(v=u[h++],(192&v)!=128){h--,S=!0;break}this.interim[y++]=v,x<<=6,x|=63&v}S||(m===2?x<128?h--:d[c++]=x:m===3?x<2048||x>=55296&&x<=57343||x===65279||(d[c++]=x):x<65536||x>1114111||(d[c++]=x)),this.interim.fill(0)}const o=_-4;let l=h;for(;l<_;){for(;!(!(l<o)||128&(a=u[l])||128&(p=u[l+1])||128&(w=u[l+2])||128&(b=u[l+3]));)d[c++]=a,d[c++]=p,d[c++]=w,d[c++]=b,l+=4;if(a=u[l++],a<128)d[c++]=a;else if((224&a)==192){if(l>=_)return this.interim[0]=a,c;if(p=u[l++],(192&p)!=128){l--;continue}if(r=(31&a)<<6|63&p,r<128){l--;continue}d[c++]=r}else if((240&a)==224){if(l>=_)return this.interim[0]=a,c;if(p=u[l++],(192&p)!=128){l--;continue}if(l>=_)return this.interim[0]=a,this.interim[1]=p,c;if(w=u[l++],(192&w)!=128){l--;continue}if(r=(15&a)<<12|(63&p)<<6|63&w,r<2048||r>=55296&&r<=57343||r===65279)continue;d[c++]=r}else if((248&a)==240){if(l>=_)return this.interim[0]=a,c;if(p=u[l++],(192&p)!=128){l--;continue}if(l>=_)return this.interim[0]=a,this.interim[1]=p,c;if(w=u[l++],(192&w)!=128){l--;continue}if(l>=_)return this.interim[0]=a,this.interim[1]=p,this.interim[2]=w,c;if(b=u[l++],(192&b)!=128){l--;continue}if(r=(7&a)<<18|(63&p)<<12|(63&w)<<6|63&b,r<65536||r>1114111)continue;d[c++]=r}}return c}}},225:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeV6=void 0;const d=u(1480),_=[[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]],a=[[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 p;n.UnicodeV6=class{constructor(){if(this.version="6",!p){p=new Uint8Array(65536),p.fill(1),p[0]=0,p.fill(0,1,32),p.fill(0,127,160),p.fill(2,4352,4448),p[9001]=2,p[9002]=2,p.fill(2,11904,42192),p[12351]=1,p.fill(2,44032,55204),p.fill(2,63744,64256),p.fill(2,65040,65050),p.fill(2,65072,65136),p.fill(2,65280,65377),p.fill(2,65504,65511);for(let w=0;w<_.length;++w)p.fill(0,_[w][0],_[w][1]+1)}}wcwidth(w){return w<32?0:w<127?1:w<65536?p[w]:(function(b,c){let r,h=0,o=c.length-1;if(b<c[0][0]||b>c[o][1])return!1;for(;o>=h;)if(r=h+o>>1,b>c[r][1])h=r+1;else{if(!(b<c[r][0]))return!0;o=r-1}return!1})(w,a)?0:w>=131072&&w<=196605||w>=196608&&w<=262141?2:1}charProperties(w,b){let c=this.wcwidth(w),r=c===0&&b!==0;if(r){const h=d.UnicodeService.extractWidth(b);h===0?r=!1:h>c&&(c=h)}return d.UnicodeService.createPropertyValue(0,c,r)}}},5981:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.WriteBuffer=void 0;const d=u(8460),_=u(844);class a extends _.Disposable{constructor(w){super(),this._action=w,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(w,b){if(b!==void 0&&this._syncCalls>b)return void(this._syncCalls=0);if(this._pendingData+=w.length,this._writeBuffer.push(w),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let c;for(this._isSyncWriting=!0;c=this._writeBuffer.shift();){this._action(c);const r=this._callbacks.shift();r&&r()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(w,b){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+=w.length,this._writeBuffer.push(w),this._callbacks.push(b),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=w.length,this._writeBuffer.push(w),this._callbacks.push(b)}_innerWrite(w=0,b=!0){const c=w||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const r=this._writeBuffer[this._bufferOffset],h=this._action(r,b);if(h){const l=S=>Date.now()-c>=12?setTimeout((()=>this._innerWrite(0,S))):this._innerWrite(c,S);return void h.catch((S=>(queueMicrotask((()=>{throw S})),Promise.resolve(!1)))).then(l)}const o=this._callbacks[this._bufferOffset];if(o&&o(),this._bufferOffset++,this._pendingData-=r.length,Date.now()-c>=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()}}n.WriteBuffer=a},5941:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.toRgbString=n.parseColor=void 0;const u=/^([\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 _(a,p){const w=a.toString(16),b=w.length<2?"0"+w:w;switch(p){case 4:return w[0];case 8:return b;case 12:return(b+b).slice(0,3);default:return b+b}}n.parseColor=function(a){if(!a)return;let p=a.toLowerCase();if(p.indexOf("rgb:")===0){p=p.slice(4);const w=u.exec(p);if(w){const b=w[1]?15:w[4]?255:w[7]?4095:65535;return[Math.round(parseInt(w[1]||w[4]||w[7]||w[10],16)/b*255),Math.round(parseInt(w[2]||w[5]||w[8]||w[11],16)/b*255),Math.round(parseInt(w[3]||w[6]||w[9]||w[12],16)/b*255)]}}else if(p.indexOf("#")===0&&(p=p.slice(1),d.exec(p)&&[3,6,9,12].includes(p.length))){const w=p.length/3,b=[0,0,0];for(let c=0;c<3;++c){const r=parseInt(p.slice(w*c,w*c+w),16);b[c]=w===1?r<<4:w===2?r:w===3?r>>4:r>>8}return b}},n.toRgbString=function(a,p=16){const[w,b,c]=a;return`rgb:${_(w,p)}/${_(b,p)}/${_(c,p)}`}},5770:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.PAYLOAD_LIMIT=void 0,n.PAYLOAD_LIMIT=1e7},6351:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DcsHandler=n.DcsParser=void 0;const d=u(482),_=u(8742),a=u(5770),p=[];n.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=p,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=p}registerHandler(b,c){this._handlers[b]===void 0&&(this._handlers[b]=[]);const r=this._handlers[b];return r.push(c),{dispose:()=>{const h=r.indexOf(c);h!==-1&&r.splice(h,1)}}}clearHandler(b){this._handlers[b]&&delete this._handlers[b]}setHandlerFallback(b){this._handlerFb=b}reset(){if(this._active.length)for(let b=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;b>=0;--b)this._active[b].unhook(!1);this._stack.paused=!1,this._active=p,this._ident=0}hook(b,c){if(this.reset(),this._ident=b,this._active=this._handlers[b]||p,this._active.length)for(let r=this._active.length-1;r>=0;r--)this._active[r].hook(c);else this._handlerFb(this._ident,"HOOK",c)}put(b,c,r){if(this._active.length)for(let h=this._active.length-1;h>=0;h--)this._active[h].put(b,c,r);else this._handlerFb(this._ident,"PUT",(0,d.utf32ToString)(b,c,r))}unhook(b,c=!0){if(this._active.length){let r=!1,h=this._active.length-1,o=!1;if(this._stack.paused&&(h=this._stack.loopPosition-1,r=c,o=this._stack.fallThrough,this._stack.paused=!1),!o&&r===!1){for(;h>=0&&(r=this._active[h].unhook(b),r!==!0);h--)if(r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=h,this._stack.fallThrough=!1,r;h--}for(;h>=0;h--)if(r=this._active[h].unhook(!1),r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=h,this._stack.fallThrough=!0,r}else this._handlerFb(this._ident,"UNHOOK",b);this._active=p,this._ident=0}};const w=new _.Params;w.addParam(0),n.DcsHandler=class{constructor(b){this._handler=b,this._data="",this._params=w,this._hitLimit=!1}hook(b){this._params=b.length>1||b.params[0]?b.clone():w,this._data="",this._hitLimit=!1}put(b,c,r){this._hitLimit||(this._data+=(0,d.utf32ToString)(b,c,r),this._data.length>a.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(b){let c=!1;if(this._hitLimit)c=!1;else if(b&&(c=this._handler(this._data,this._params),c instanceof Promise))return c.then((r=>(this._params=w,this._data="",this._hitLimit=!1,r)));return this._params=w,this._data="",this._hitLimit=!1,c}}},2015:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.EscapeSequenceParser=n.VT500_TRANSITION_TABLE=n.TransitionTable=void 0;const d=u(844),_=u(8742),a=u(6242),p=u(6351);class w{constructor(h){this.table=new Uint8Array(h)}setDefault(h,o){this.table.fill(h<<4|o)}add(h,o,l,S){this.table[o<<8|h]=l<<4|S}addMany(h,o,l,S){for(let x=0;x<h.length;x++)this.table[o<<8|h[x]]=l<<4|S}}n.TransitionTable=w;const b=160;n.VT500_TRANSITION_TABLE=(function(){const r=new w(4095),h=Array.apply(null,Array(256)).map(((y,m)=>m)),o=(y,m)=>h.slice(y,m),l=o(32,127),S=o(0,24);S.push(25),S.push.apply(S,o(28,32));const x=o(0,14);let v;for(v in r.setDefault(1,0),r.addMany(l,0,2,0),x)r.addMany([24,26,153,154],v,3,0),r.addMany(o(128,144),v,3,0),r.addMany(o(144,152),v,3,0),r.add(156,v,0,0),r.add(27,v,11,1),r.add(157,v,4,8),r.addMany([152,158,159],v,0,7),r.add(155,v,11,3),r.add(144,v,11,9);return r.addMany(S,0,3,0),r.addMany(S,1,3,1),r.add(127,1,0,1),r.addMany(S,8,0,8),r.addMany(S,3,3,3),r.add(127,3,0,3),r.addMany(S,4,3,4),r.add(127,4,0,4),r.addMany(S,6,3,6),r.addMany(S,5,3,5),r.add(127,5,0,5),r.addMany(S,2,3,2),r.add(127,2,0,2),r.add(93,1,4,8),r.addMany(l,8,5,8),r.add(127,8,5,8),r.addMany([156,27,24,26,7],8,6,0),r.addMany(o(28,32),8,0,8),r.addMany([88,94,95],1,0,7),r.addMany(l,7,0,7),r.addMany(S,7,0,7),r.add(156,7,0,0),r.add(127,7,0,7),r.add(91,1,11,3),r.addMany(o(64,127),3,7,0),r.addMany(o(48,60),3,8,4),r.addMany([60,61,62,63],3,9,4),r.addMany(o(48,60),4,8,4),r.addMany(o(64,127),4,7,0),r.addMany([60,61,62,63],4,0,6),r.addMany(o(32,64),6,0,6),r.add(127,6,0,6),r.addMany(o(64,127),6,0,0),r.addMany(o(32,48),3,9,5),r.addMany(o(32,48),5,9,5),r.addMany(o(48,64),5,0,6),r.addMany(o(64,127),5,7,0),r.addMany(o(32,48),4,9,5),r.addMany(o(32,48),1,9,2),r.addMany(o(32,48),2,9,2),r.addMany(o(48,127),2,10,0),r.addMany(o(48,80),1,10,0),r.addMany(o(81,88),1,10,0),r.addMany([89,90,92],1,10,0),r.addMany(o(96,127),1,10,0),r.add(80,1,11,9),r.addMany(S,9,0,9),r.add(127,9,0,9),r.addMany(o(28,32),9,0,9),r.addMany(o(32,48),9,9,12),r.addMany(o(48,60),9,8,10),r.addMany([60,61,62,63],9,9,10),r.addMany(S,11,0,11),r.addMany(o(32,128),11,0,11),r.addMany(o(28,32),11,0,11),r.addMany(S,10,0,10),r.add(127,10,0,10),r.addMany(o(28,32),10,0,10),r.addMany(o(48,60),10,8,10),r.addMany([60,61,62,63],10,0,11),r.addMany(o(32,48),10,9,12),r.addMany(S,12,0,12),r.add(127,12,0,12),r.addMany(o(28,32),12,0,12),r.addMany(o(32,48),12,9,12),r.addMany(o(48,64),12,0,11),r.addMany(o(64,127),12,12,13),r.addMany(o(64,127),10,12,13),r.addMany(o(64,127),9,12,13),r.addMany(S,13,13,13),r.addMany(l,13,13,13),r.add(127,13,0,13),r.addMany([27,156,24,26],13,14,0),r.add(b,0,2,0),r.add(b,8,5,8),r.add(b,6,0,6),r.add(b,11,0,11),r.add(b,13,13,13),r})();class c extends d.Disposable{constructor(h=n.VT500_TRANSITION_TABLE){super(),this._transitions=h,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new _.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(o,l,S)=>{},this._executeHandlerFb=o=>{},this._csiHandlerFb=(o,l)=>{},this._escHandlerFb=o=>{},this._errorHandlerFb=o=>o,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 a.OscParser),this._dcsParser=this.register(new p.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(h,o=[64,126]){let l=0;if(h.prefix){if(h.prefix.length>1)throw new Error("only one byte as prefix supported");if(l=h.prefix.charCodeAt(0),l&&60>l||l>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(h.intermediates){if(h.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let x=0;x<h.intermediates.length;++x){const v=h.intermediates.charCodeAt(x);if(32>v||v>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");l<<=8,l|=v}}if(h.final.length!==1)throw new Error("final must be a single byte");const S=h.final.charCodeAt(0);if(o[0]>S||S>o[1])throw new Error(`final must be in range ${o[0]} .. ${o[1]}`);return l<<=8,l|=S,l}identToString(h){const o=[];for(;h;)o.push(String.fromCharCode(255&h)),h>>=8;return o.reverse().join("")}setPrintHandler(h){this._printHandler=h}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(h,o){const l=this._identifier(h,[48,126]);this._escHandlers[l]===void 0&&(this._escHandlers[l]=[]);const S=this._escHandlers[l];return S.push(o),{dispose:()=>{const x=S.indexOf(o);x!==-1&&S.splice(x,1)}}}clearEscHandler(h){this._escHandlers[this._identifier(h,[48,126])]&&delete this._escHandlers[this._identifier(h,[48,126])]}setEscHandlerFallback(h){this._escHandlerFb=h}setExecuteHandler(h,o){this._executeHandlers[h.charCodeAt(0)]=o}clearExecuteHandler(h){this._executeHandlers[h.charCodeAt(0)]&&delete this._executeHandlers[h.charCodeAt(0)]}setExecuteHandlerFallback(h){this._executeHandlerFb=h}registerCsiHandler(h,o){const l=this._identifier(h);this._csiHandlers[l]===void 0&&(this._csiHandlers[l]=[]);const S=this._csiHandlers[l];return S.push(o),{dispose:()=>{const x=S.indexOf(o);x!==-1&&S.splice(x,1)}}}clearCsiHandler(h){this._csiHandlers[this._identifier(h)]&&delete this._csiHandlers[this._identifier(h)]}setCsiHandlerFallback(h){this._csiHandlerFb=h}registerDcsHandler(h,o){return this._dcsParser.registerHandler(this._identifier(h),o)}clearDcsHandler(h){this._dcsParser.clearHandler(this._identifier(h))}setDcsHandlerFallback(h){this._dcsParser.setHandlerFallback(h)}registerOscHandler(h,o){return this._oscParser.registerHandler(h,o)}clearOscHandler(h){this._oscParser.clearHandler(h)}setOscHandlerFallback(h){this._oscParser.setHandlerFallback(h)}setErrorHandler(h){this._errorHandler=h}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(h,o,l,S,x){this._parseStack.state=h,this._parseStack.handlers=o,this._parseStack.handlerPos=l,this._parseStack.transition=S,this._parseStack.chunkPos=x}parse(h,o,l){let S,x=0,v=0,y=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,y=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 C=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(l===!1&&C>-1){for(;C>=0&&(S=m[C](this._params),S!==!0);C--)if(S instanceof Promise)return this._parseStack.handlerPos=C,S}this._parseStack.handlers=[];break;case 4:if(l===!1&&C>-1){for(;C>=0&&(S=m[C](),S!==!0);C--)if(S instanceof Promise)return this._parseStack.handlerPos=C,S}this._parseStack.handlers=[];break;case 6:if(x=h[this._parseStack.chunkPos],S=this._dcsParser.unhook(x!==24&&x!==26,l),S)return S;x===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(x=h[this._parseStack.chunkPos],S=this._oscParser.end(x!==24&&x!==26,l),S)return S;x===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,y=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let m=y;m<o;++m){switch(x=h[m],v=this._transitions.table[this.currentState<<8|(x<160?x:b)],v>>4){case 2:for(let D=m+1;;++D){if(D>=o||(x=h[D])<32||x>126&&x<b){this._printHandler(h,m,D),m=D-1;break}if(++D>=o||(x=h[D])<32||x>126&&x<b){this._printHandler(h,m,D),m=D-1;break}if(++D>=o||(x=h[D])<32||x>126&&x<b){this._printHandler(h,m,D),m=D-1;break}if(++D>=o||(x=h[D])<32||x>126&&x<b){this._printHandler(h,m,D),m=D-1;break}}break;case 3:this._executeHandlers[x]?this._executeHandlers[x]():this._executeHandlerFb(x),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:m,code:x,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const C=this._csiHandlers[this._collect<<8|x];let E=C?C.length-1:-1;for(;E>=0&&(S=C[E](this._params),S!==!0);E--)if(S instanceof Promise)return this._preserveStack(3,C,E,v,m),S;E<0&&this._csiHandlerFb(this._collect<<8|x,this._params),this.precedingJoinState=0;break;case 8:do switch(x){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(x-48)}while(++m<o&&(x=h[m])>47&&x<60);m--;break;case 9:this._collect<<=8,this._collect|=x;break;case 10:const R=this._escHandlers[this._collect<<8|x];let L=R?R.length-1:-1;for(;L>=0&&(S=R[L](),S!==!0);L--)if(S instanceof Promise)return this._preserveStack(4,R,L,v,m),S;L<0&&this._escHandlerFb(this._collect<<8|x),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|x,this._params);break;case 13:for(let D=m+1;;++D)if(D>=o||(x=h[D])===24||x===26||x===27||x>127&&x<b){this._dcsParser.put(h,m,D),m=D-1;break}break;case 14:if(S=this._dcsParser.unhook(x!==24&&x!==26),S)return this._preserveStack(6,[],0,v,m),S;x===27&&(v|=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 D=m+1;;D++)if(D>=o||(x=h[D])<32||x>127&&x<b){this._oscParser.put(h,m,D),m=D-1;break}break;case 6:if(S=this._oscParser.end(x!==24&&x!==26),S)return this._preserveStack(5,[],0,v,m),S;x===27&&(v|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&v}}}n.EscapeSequenceParser=c},6242:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.OscHandler=n.OscParser=void 0;const d=u(5770),_=u(482),a=[];n.OscParser=class{constructor(){this._state=0,this._active=a,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(p,w){this._handlers[p]===void 0&&(this._handlers[p]=[]);const b=this._handlers[p];return b.push(w),{dispose:()=>{const c=b.indexOf(w);c!==-1&&b.splice(c,1)}}}clearHandler(p){this._handlers[p]&&delete this._handlers[p]}setHandlerFallback(p){this._handlerFb=p}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=a}reset(){if(this._state===2)for(let p=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;p>=0;--p)this._active[p].end(!1);this._stack.paused=!1,this._active=a,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||a,this._active.length)for(let p=this._active.length-1;p>=0;p--)this._active[p].start();else this._handlerFb(this._id,"START")}_put(p,w,b){if(this._active.length)for(let c=this._active.length-1;c>=0;c--)this._active[c].put(p,w,b);else this._handlerFb(this._id,"PUT",(0,_.utf32ToString)(p,w,b))}start(){this.reset(),this._state=1}put(p,w,b){if(this._state!==3){if(this._state===1)for(;w<b;){const c=p[w++];if(c===59){this._state=2,this._start();break}if(c<48||57<c)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+c-48}this._state===2&&b-w>0&&this._put(p,w,b)}}end(p,w=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let b=!1,c=this._active.length-1,r=!1;if(this._stack.paused&&(c=this._stack.loopPosition-1,b=w,r=this._stack.fallThrough,this._stack.paused=!1),!r&&b===!1){for(;c>=0&&(b=this._active[c].end(p),b!==!0);c--)if(b instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=c,this._stack.fallThrough=!1,b;c--}for(;c>=0;c--)if(b=this._active[c].end(!1),b instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=c,this._stack.fallThrough=!0,b}else this._handlerFb(this._id,"END",p);this._active=a,this._id=-1,this._state=0}}},n.OscHandler=class{constructor(p){this._handler=p,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(p,w,b){this._hitLimit||(this._data+=(0,_.utf32ToString)(p,w,b),this._data.length>d.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(p){let w=!1;if(this._hitLimit)w=!1;else if(p&&(w=this._handler(this._data),w instanceof Promise))return w.then((b=>(this._data="",this._hitLimit=!1,b)));return this._data="",this._hitLimit=!1,w}}},8742:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Params=void 0;const u=2147483647;class d{static fromArray(a){const p=new d;if(!a.length)return p;for(let w=Array.isArray(a[0])?1:0;w<a.length;++w){const b=a[w];if(Array.isArray(b))for(let c=0;c<b.length;++c)p.addSubParam(b[c]);else p.addParam(b)}return p}constructor(a=32,p=32){if(this.maxLength=a,this.maxSubParamsLength=p,p>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(a),this.length=0,this._subParams=new Int32Array(p),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(a),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const a=new d(this.maxLength,this.maxSubParamsLength);return a.params.set(this.params),a.length=this.length,a._subParams.set(this._subParams),a._subParamsLength=this._subParamsLength,a._subParamsIdx.set(this._subParamsIdx),a._rejectDigits=this._rejectDigits,a._rejectSubDigits=this._rejectSubDigits,a._digitIsSub=this._digitIsSub,a}toArray(){const a=[];for(let p=0;p<this.length;++p){a.push(this.params[p]);const w=this._subParamsIdx[p]>>8,b=255&this._subParamsIdx[p];b-w>0&&a.push(Array.prototype.slice.call(this._subParams,w,b))}return a}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(a){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(a<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=a>u?u:a}}addSubParam(a){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(a<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=a>u?u:a,this._subParamsIdx[this.length-1]++}}hasSubParams(a){return(255&this._subParamsIdx[a])-(this._subParamsIdx[a]>>8)>0}getSubParams(a){const p=this._subParamsIdx[a]>>8,w=255&this._subParamsIdx[a];return w-p>0?this._subParams.subarray(p,w):null}getSubParamsAll(){const a={};for(let p=0;p<this.length;++p){const w=this._subParamsIdx[p]>>8,b=255&this._subParamsIdx[p];b-w>0&&(a[p]=this._subParams.slice(w,b))}return a}addDigit(a){let p;if(this._rejectDigits||!(p=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const w=this._digitIsSub?this._subParams:this.params,b=w[p-1];w[p-1]=~b?Math.min(10*b+a,u):a}}n.Params=d},5741:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.AddonManager=void 0,n.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let u=this._addons.length-1;u>=0;u--)this._addons[u].instance.dispose()}loadAddon(u,d){const _={instance:d,dispose:d.dispose,isDisposed:!1};this._addons.push(_),d.dispose=()=>this._wrappedAddonDispose(_),d.activate(u)}_wrappedAddonDispose(u){if(u.isDisposed)return;let d=-1;for(let _=0;_<this._addons.length;_++)if(this._addons[_]===u){d=_;break}if(d===-1)throw new Error("Could not dispose an addon that has not been loaded");u.isDisposed=!0,u.dispose.apply(u.instance),this._addons.splice(d,1)}}},8771:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferApiView=void 0;const d=u(3785),_=u(511);n.BufferApiView=class{constructor(a,p){this._buffer=a,this.type=p}init(a){return this._buffer=a,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(a){const p=this._buffer.lines.get(a);if(p)return new d.BufferLineApiView(p)}getNullCell(){return new _.CellData}}},3785:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferLineApiView=void 0;const d=u(511);n.BufferLineApiView=class{constructor(_){this._line=_}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(_,a){if(!(_<0||_>=this._line.length))return a?(this._line.loadCell(_,a),a):this._line.loadCell(_,new d.CellData)}translateToString(_,a,p){return this._line.translateToString(_,a,p)}}},8285:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferNamespaceApi=void 0;const d=u(8771),_=u(8460),a=u(844);class p extends a.Disposable{constructor(b){super(),this._core=b,this._onBufferChange=this.register(new _.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)}}n.BufferNamespaceApi=p},7975:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ParserApi=void 0,n.ParserApi=class{constructor(u){this._core=u}registerCsiHandler(u,d){return this._core.registerCsiHandler(u,(_=>d(_.toArray())))}addCsiHandler(u,d){return this.registerCsiHandler(u,d)}registerDcsHandler(u,d){return this._core.registerDcsHandler(u,((_,a)=>d(_,a.toArray())))}addDcsHandler(u,d){return this.registerDcsHandler(u,d)}registerEscHandler(u,d){return this._core.registerEscHandler(u,d)}addEscHandler(u,d){return this.registerEscHandler(u,d)}registerOscHandler(u,d){return this._core.registerOscHandler(u,d)}addOscHandler(u,d){return this.registerOscHandler(u,d)}}},7090:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeApi=void 0,n.UnicodeApi=class{constructor(u){this._core=u}register(u){this._core.unicodeService.register(u)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(u){this._core.unicodeService.activeVersion=u}}},744:function(j,n,u){var d=this&&this.__decorate||function(r,h,o,l){var S,x=arguments.length,v=x<3?h:l===null?l=Object.getOwnPropertyDescriptor(h,o):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(r,h,o,l);else for(var y=r.length-1;y>=0;y--)(S=r[y])&&(v=(x<3?S(v):x>3?S(h,o,v):S(h,o))||v);return x>3&&v&&Object.defineProperty(h,o,v),v},_=this&&this.__param||function(r,h){return function(o,l){h(o,l,r)}};Object.defineProperty(n,"__esModule",{value:!0}),n.BufferService=n.MINIMUM_ROWS=n.MINIMUM_COLS=void 0;const a=u(8460),p=u(844),w=u(5295),b=u(2585);n.MINIMUM_COLS=2,n.MINIMUM_ROWS=1;let c=n.BufferService=class extends p.Disposable{get buffer(){return this.buffers.active}constructor(r){super(),this.isUserScrolling=!1,this._onResize=this.register(new a.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new a.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(r.rawOptions.cols||0,n.MINIMUM_COLS),this.rows=Math.max(r.rawOptions.rows||0,n.MINIMUM_ROWS),this.buffers=this.register(new w.BufferSet(r,this))}resize(r,h){this.cols=r,this.rows=h,this.buffers.resize(r,h),this._onResize.fire({cols:r,rows:h})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(r,h=!1){const o=this.buffer;let l;l=this._cachedBlankLine,l&&l.length===this.cols&&l.getFg(0)===r.fg&&l.getBg(0)===r.bg||(l=o.getBlankLine(r,h),this._cachedBlankLine=l),l.isWrapped=h;const S=o.ybase+o.scrollTop,x=o.ybase+o.scrollBottom;if(o.scrollTop===0){const v=o.lines.isFull;x===o.lines.length-1?v?o.lines.recycle().copyFrom(l):o.lines.push(l.clone()):o.lines.splice(x+1,0,l.clone()),v?this.isUserScrolling&&(o.ydisp=Math.max(o.ydisp-1,0)):(o.ybase++,this.isUserScrolling||o.ydisp++)}else{const v=x-S+1;o.lines.shiftElements(S+1,v-1,-1),o.lines.set(x,l.clone())}this.isUserScrolling||(o.ydisp=o.ybase),this._onScroll.fire(o.ydisp)}scrollLines(r,h,o){const l=this.buffer;if(r<0){if(l.ydisp===0)return;this.isUserScrolling=!0}else r+l.ydisp>=l.ybase&&(this.isUserScrolling=!1);const S=l.ydisp;l.ydisp=Math.max(Math.min(l.ydisp+r,l.ybase),0),S!==l.ydisp&&(h||this._onScroll.fire(l.ydisp))}};n.BufferService=c=d([_(0,b.IOptionsService)],c)},7994:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CharsetService=void 0,n.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(u){this.glevel=u,this.charset=this._charsets[u]}setgCharset(u,d){this._charsets[u]=d,this.glevel===u&&(this.charset=d)}}},1753:function(j,n,u){var d=this&&this.__decorate||function(l,S,x,v){var y,m=arguments.length,C=m<3?S:v===null?v=Object.getOwnPropertyDescriptor(S,x):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(l,S,x,v);else for(var E=l.length-1;E>=0;E--)(y=l[E])&&(C=(m<3?y(C):m>3?y(S,x,C):y(S,x))||C);return m>3&&C&&Object.defineProperty(S,x,C),C},_=this&&this.__param||function(l,S){return function(x,v){S(x,v,l)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CoreMouseService=void 0;const a=u(2585),p=u(8460),w=u(844),b={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 c(l,S){let x=(l.ctrl?16:0)|(l.shift?4:0)|(l.alt?8:0);return l.button===4?(x|=64,x|=l.action):(x|=3&l.button,4&l.button&&(x|=64),8&l.button&&(x|=128),l.action===32?x|=32:l.action!==0||S||(x|=3)),x}const r=String.fromCharCode,h={DEFAULT:l=>{const S=[c(l,!1)+32,l.col+32,l.row+32];return S[0]>255||S[1]>255||S[2]>255?"":`\x1B[M${r(S[0])}${r(S[1])}${r(S[2])}`},SGR:l=>{const S=l.action===0&&l.button!==4?"m":"M";return`\x1B[<${c(l,!0)};${l.col};${l.row}${S}`},SGR_PIXELS:l=>{const S=l.action===0&&l.button!==4?"m":"M";return`\x1B[<${c(l,!0)};${l.x};${l.y}${S}`}};let o=n.CoreMouseService=class extends w.Disposable{constructor(l,S){super(),this._bufferService=l,this._coreService=S,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new p.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const x of Object.keys(b))this.addProtocol(x,b[x]);for(const x of Object.keys(h))this.addEncoding(x,h[x]);this.reset()}addProtocol(l,S){this._protocols[l]=S}addEncoding(l,S){this._encodings[l]=S}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 S=this._encodings[this._activeEncoding](l);return S&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(S):this._coreService.triggerDataEvent(S,!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,S,x){if(x){if(l.x!==S.x||l.y!==S.y)return!1}else if(l.col!==S.col||l.row!==S.row)return!1;return l.button===S.button&&l.action===S.action&&l.ctrl===S.ctrl&&l.alt===S.alt&&l.shift===S.shift}};n.CoreMouseService=o=d([_(0,a.IBufferService),_(1,a.ICoreService)],o)},6975:function(j,n,u){var d=this&&this.__decorate||function(o,l,S,x){var v,y=arguments.length,m=y<3?l:x===null?x=Object.getOwnPropertyDescriptor(l,S):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(o,l,S,x);else for(var C=o.length-1;C>=0;C--)(v=o[C])&&(m=(y<3?v(m):y>3?v(l,S,m):v(l,S))||m);return y>3&&m&&Object.defineProperty(l,S,m),m},_=this&&this.__param||function(o,l){return function(S,x){l(S,x,o)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CoreService=void 0;const a=u(1439),p=u(8460),w=u(844),b=u(2585),c=Object.freeze({insertMode:!1}),r=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let h=n.CoreService=class extends w.Disposable{constructor(o,l,S){super(),this._bufferService=o,this._logService=l,this._optionsService=S,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new p.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new p.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new p.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new p.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,a.clone)(c),this.decPrivateModes=(0,a.clone)(r)}reset(){this.modes=(0,a.clone)(c),this.decPrivateModes=(0,a.clone)(r)}triggerDataEvent(o,l=!1){if(this._optionsService.rawOptions.disableStdin)return;const S=this._bufferService.buffer;l&&this._optionsService.rawOptions.scrollOnUserInput&&S.ybase!==S.ydisp&&this._onRequestScrollToBottom.fire(),l&&this._onUserInput.fire(),this._logService.debug(`sending data "${o}"`,(()=>o.split("").map((x=>x.charCodeAt(0))))),this._onData.fire(o)}triggerBinaryEvent(o){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${o}"`,(()=>o.split("").map((l=>l.charCodeAt(0))))),this._onBinary.fire(o))}};n.CoreService=h=d([_(0,b.IBufferService),_(1,b.ILogService),_(2,b.IOptionsService)],h)},9074:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DecorationService=void 0;const d=u(8055),_=u(8460),a=u(844),p=u(6106);let w=0,b=0;class c extends a.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new p.SortedList((o=>o==null?void 0:o.marker.line)),this._onDecorationRegistered=this.register(new _.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new _.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,a.toDisposable)((()=>this.reset())))}registerDecoration(o){if(o.marker.isDisposed)return;const l=new r(o);if(l){const S=l.marker.onDispose((()=>l.dispose()));l.onDispose((()=>{l&&(this._decorations.delete(l)&&this._onDecorationRemoved.fire(l),S.dispose())})),this._decorations.insert(l),this._onDecorationRegistered.fire(l)}return l}reset(){for(const o of this._decorations.values())o.dispose();this._decorations.clear()}*getDecorationsAtCell(o,l,S){let x=0,v=0;for(const y of this._decorations.getKeyIterator(l))x=y.options.x??0,v=x+(y.options.width??1),o>=x&&o<v&&(!S||(y.options.layer??"bottom")===S)&&(yield y)}forEachDecorationAtCell(o,l,S,x){this._decorations.forEachByKey(l,(v=>{w=v.options.x??0,b=w+(v.options.width??1),o>=w&&o<b&&(!S||(v.options.layer??"bottom")===S)&&x(v)}))}}n.DecorationService=c;class r extends a.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(o){super(),this.options=o,this.onRenderEmitter=this.register(new _.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new _.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=o.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.InstantiationService=n.ServiceCollection=void 0;const d=u(2585),_=u(8343);class a{constructor(...w){this._entries=new Map;for(const[b,c]of w)this.set(b,c)}set(w,b){const c=this._entries.get(w);return this._entries.set(w,b),c}forEach(w){for(const[b,c]of this._entries.entries())w(b,c)}has(w){return this._entries.has(w)}get(w){return this._entries.get(w)}}n.ServiceCollection=a,n.InstantiationService=class{constructor(){this._services=new a,this._services.set(d.IInstantiationService,this)}setService(p,w){this._services.set(p,w)}getService(p){return this._services.get(p)}createInstance(p,...w){const b=(0,_.getServiceDependencies)(p).sort(((h,o)=>h.index-o.index)),c=[];for(const h of b){const o=this._services.get(h.id);if(!o)throw new Error(`[createInstance] ${p.name} depends on UNKNOWN service ${h.id}.`);c.push(o)}const r=b.length>0?b[0].index:w.length;if(w.length!==r)throw new Error(`[createInstance] First service dependency of ${p.name} at position ${r+1} conflicts with ${w.length} static arguments`);return new p(...w,...c)}}},7866:function(j,n,u){var d=this&&this.__decorate||function(r,h,o,l){var S,x=arguments.length,v=x<3?h:l===null?l=Object.getOwnPropertyDescriptor(h,o):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(r,h,o,l);else for(var y=r.length-1;y>=0;y--)(S=r[y])&&(v=(x<3?S(v):x>3?S(h,o,v):S(h,o))||v);return x>3&&v&&Object.defineProperty(h,o,v),v},_=this&&this.__param||function(r,h){return function(o,l){h(o,l,r)}};Object.defineProperty(n,"__esModule",{value:!0}),n.traceCall=n.setTraceLogger=n.LogService=void 0;const a=u(844),p=u(2585),w={trace:p.LogLevelEnum.TRACE,debug:p.LogLevelEnum.DEBUG,info:p.LogLevelEnum.INFO,warn:p.LogLevelEnum.WARN,error:p.LogLevelEnum.ERROR,off:p.LogLevelEnum.OFF};let b,c=n.LogService=class extends a.Disposable{get logLevel(){return this._logLevel}constructor(r){super(),this._optionsService=r,this._logLevel=p.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),b=this}_updateLogLevel(){this._logLevel=w[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(r){for(let h=0;h<r.length;h++)typeof r[h]=="function"&&(r[h]=r[h]())}_log(r,h,o){this._evalLazyOptionalParams(o),r.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+h,...o)}trace(r,...h){var o;this._logLevel<=p.LogLevelEnum.TRACE&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.trace.bind(this._optionsService.options.logger))??console.log,r,h)}debug(r,...h){var o;this._logLevel<=p.LogLevelEnum.DEBUG&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.debug.bind(this._optionsService.options.logger))??console.log,r,h)}info(r,...h){var o;this._logLevel<=p.LogLevelEnum.INFO&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.info.bind(this._optionsService.options.logger))??console.info,r,h)}warn(r,...h){var o;this._logLevel<=p.LogLevelEnum.WARN&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.warn.bind(this._optionsService.options.logger))??console.warn,r,h)}error(r,...h){var o;this._logLevel<=p.LogLevelEnum.ERROR&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.error.bind(this._optionsService.options.logger))??console.error,r,h)}};n.LogService=c=d([_(0,p.IOptionsService)],c),n.setTraceLogger=function(r){b=r},n.traceCall=function(r,h,o){if(typeof o.value!="function")throw new Error("not supported");const l=o.value;o.value=function(...S){if(b.logLevel!==p.LogLevelEnum.TRACE)return l.apply(this,S);b.trace(`GlyphRenderer#${l.name}(${S.map((v=>JSON.stringify(v))).join(", ")})`);const x=l.apply(this,S);return b.trace(`GlyphRenderer#${l.name} return`,x),x}}},7302:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.OptionsService=n.DEFAULT_OPTIONS=void 0;const d=u(8460),_=u(844),a=u(6114);n.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:a.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const p=["normal","bold","100","200","300","400","500","600","700","800","900"];class w extends _.Disposable{constructor(c){super(),this._onOptionChange=this.register(new d.EventEmitter),this.onOptionChange=this._onOptionChange.event;const r={...n.DEFAULT_OPTIONS};for(const h in c)if(h in r)try{const o=c[h];r[h]=this._sanitizeAndValidateOption(h,o)}catch(o){console.error(o)}this.rawOptions=r,this.options={...r},this._setupOptions(),this.register((0,_.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(c,r){return this.onOptionChange((h=>{h===c&&r(this.rawOptions[c])}))}onMultipleOptionChange(c,r){return this.onOptionChange((h=>{c.indexOf(h)!==-1&&r()}))}_setupOptions(){const c=h=>{if(!(h in n.DEFAULT_OPTIONS))throw new Error(`No option with key "${h}"`);return this.rawOptions[h]},r=(h,o)=>{if(!(h in n.DEFAULT_OPTIONS))throw new Error(`No option with key "${h}"`);o=this._sanitizeAndValidateOption(h,o),this.rawOptions[h]!==o&&(this.rawOptions[h]=o,this._onOptionChange.fire(h))};for(const h in this.rawOptions){const o={get:c.bind(this,h),set:r.bind(this,h)};Object.defineProperty(this.options,h,o)}}_sanitizeAndValidateOption(c,r){switch(c){case"cursorStyle":if(r||(r=n.DEFAULT_OPTIONS[c]),!(function(h){return h==="block"||h==="underline"||h==="bar"})(r))throw new Error(`"${r}" is not a valid value for ${c}`);break;case"wordSeparator":r||(r=n.DEFAULT_OPTIONS[c]);break;case"fontWeight":case"fontWeightBold":if(typeof r=="number"&&1<=r&&r<=1e3)break;r=p.includes(r)?r:n.DEFAULT_OPTIONS[c];break;case"cursorWidth":r=Math.floor(r);case"lineHeight":case"tabStopWidth":if(r<1)throw new Error(`${c} cannot be less than 1, value: ${r}`);break;case"minimumContrastRatio":r=Math.max(1,Math.min(21,Math.round(10*r)/10));break;case"scrollback":if((r=Math.min(r,4294967295))<0)throw new Error(`${c} cannot be less than 0, value: ${r}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(r<=0)throw new Error(`${c} cannot be less than or equal to 0, value: ${r}`);break;case"rows":case"cols":if(!r&&r!==0)throw new Error(`${c} must be numeric, value: ${r}`);break;case"windowsPty":r=r??{}}return r}}n.OptionsService=w},2660:function(j,n,u){var d=this&&this.__decorate||function(w,b,c,r){var h,o=arguments.length,l=o<3?b:r===null?r=Object.getOwnPropertyDescriptor(b,c):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(w,b,c,r);else for(var S=w.length-1;S>=0;S--)(h=w[S])&&(l=(o<3?h(l):o>3?h(b,c,l):h(b,c))||l);return o>3&&l&&Object.defineProperty(b,c,l),l},_=this&&this.__param||function(w,b){return function(c,r){b(c,r,w)}};Object.defineProperty(n,"__esModule",{value:!0}),n.OscLinkService=void 0;const a=u(2585);let p=n.OscLinkService=class{constructor(w){this._bufferService=w,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(w){const b=this._bufferService.buffer;if(w.id===void 0){const S=b.addMarker(b.ybase+b.y),x={data:w,id:this._nextId++,lines:[S]};return S.onDispose((()=>this._removeMarkerFromLink(x,S))),this._dataByLinkId.set(x.id,x),x.id}const c=w,r=this._getEntryIdKey(c),h=this._entriesWithId.get(r);if(h)return this.addLineToLink(h.id,b.ybase+b.y),h.id;const o=b.addMarker(b.ybase+b.y),l={id:this._nextId++,key:this._getEntryIdKey(c),data:c,lines:[o]};return o.onDispose((()=>this._removeMarkerFromLink(l,o))),this._entriesWithId.set(l.key,l),this._dataByLinkId.set(l.id,l),l.id}addLineToLink(w,b){const c=this._dataByLinkId.get(w);if(c&&c.lines.every((r=>r.line!==b))){const r=this._bufferService.buffer.addMarker(b);c.lines.push(r),r.onDispose((()=>this._removeMarkerFromLink(c,r)))}}getLinkData(w){var b;return(b=this._dataByLinkId.get(w))==null?void 0:b.data}_getEntryIdKey(w){return`${w.id};;${w.uri}`}_removeMarkerFromLink(w,b){const c=w.lines.indexOf(b);c!==-1&&(w.lines.splice(c,1),w.lines.length===0&&(w.data.id!==void 0&&this._entriesWithId.delete(w.key),this._dataByLinkId.delete(w.id)))}};n.OscLinkService=p=d([_(0,a.IBufferService)],p)},8343:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createDecorator=n.getServiceDependencies=n.serviceRegistry=void 0;const u="di$target",d="di$dependencies";n.serviceRegistry=new Map,n.getServiceDependencies=function(_){return _[d]||[]},n.createDecorator=function(_){if(n.serviceRegistry.has(_))return n.serviceRegistry.get(_);const a=function(p,w,b){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(c,r,h){r[u]===r?r[d].push({id:c,index:h}):(r[d]=[{id:c,index:h}],r[u]=r)})(a,p,b)};return a.toString=()=>_,n.serviceRegistry.set(_,a),a}},2585:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.IDecorationService=n.IUnicodeService=n.IOscLinkService=n.IOptionsService=n.ILogService=n.LogLevelEnum=n.IInstantiationService=n.ICharsetService=n.ICoreService=n.ICoreMouseService=n.IBufferService=void 0;const d=u(8343);var _;n.IBufferService=(0,d.createDecorator)("BufferService"),n.ICoreMouseService=(0,d.createDecorator)("CoreMouseService"),n.ICoreService=(0,d.createDecorator)("CoreService"),n.ICharsetService=(0,d.createDecorator)("CharsetService"),n.IInstantiationService=(0,d.createDecorator)("InstantiationService"),(function(a){a[a.TRACE=0]="TRACE",a[a.DEBUG=1]="DEBUG",a[a.INFO=2]="INFO",a[a.WARN=3]="WARN",a[a.ERROR=4]="ERROR",a[a.OFF=5]="OFF"})(_||(n.LogLevelEnum=_={})),n.ILogService=(0,d.createDecorator)("LogService"),n.IOptionsService=(0,d.createDecorator)("OptionsService"),n.IOscLinkService=(0,d.createDecorator)("OscLinkService"),n.IUnicodeService=(0,d.createDecorator)("UnicodeService"),n.IDecorationService=(0,d.createDecorator)("DecorationService")},1480:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeService=void 0;const d=u(8460),_=u(225);class a{static extractShouldJoin(w){return(1&w)!=0}static extractWidth(w){return w>>1&3}static extractCharKind(w){return w>>3}static createPropertyValue(w,b,c=!1){return(16777215&w)<<3|(3&b)<<1|(c?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new d.EventEmitter,this.onChange=this._onChange.event;const w=new _.UnicodeV6;this.register(w),this._active=w.version,this._activeProvider=w}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(w){if(!this._providers[w])throw new Error(`unknown Unicode version "${w}"`);this._active=w,this._activeProvider=this._providers[w],this._onChange.fire(w)}register(w){this._providers[w.version]=w}wcwidth(w){return this._activeProvider.wcwidth(w)}getStringCellWidth(w){let b=0,c=0;const r=w.length;for(let h=0;h<r;++h){let o=w.charCodeAt(h);if(55296<=o&&o<=56319){if(++h>=r)return b+this.wcwidth(o);const x=w.charCodeAt(h);56320<=x&&x<=57343?o=1024*(o-55296)+x-56320+65536:b+=this.wcwidth(x)}const l=this.charProperties(o,c);let S=a.extractWidth(l);a.extractShouldJoin(l)&&(S-=a.extractWidth(c)),b+=S,c=l}return b}charProperties(w,b){return this._activeProvider.charProperties(w,b)}}n.UnicodeService=a}},U={};function ee(j){var n=U[j];if(n!==void 0)return n.exports;var u=U[j]={exports:{}};return X[j].call(u.exports,u,u.exports,ee),u.exports}var ae={};return(()=>{var j=ae;Object.defineProperty(j,"__esModule",{value:!0}),j.Terminal=void 0;const n=ee(9042),u=ee(3236),d=ee(844),_=ee(5741),a=ee(8285),p=ee(7975),w=ee(7090),b=["cols","rows"];class c extends d.Disposable{constructor(h){super(),this._core=this.register(new u.Terminal(h)),this._addonManager=this.register(new _.AddonManager),this._publicOptions={...this._core.options};const o=S=>this._core.options[S],l=(S,x)=>{this._checkReadonlyOptions(S),this._core.options[S]=x};for(const S in this._core.options){const x={get:o.bind(this,S),set:l.bind(this,S)};Object.defineProperty(this._publicOptions,S,x)}}_checkReadonlyOptions(h){if(b.includes(h))throw new Error(`Option "${h}" 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 p.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new w.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 a.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const h=this._core.coreService.decPrivateModes;let o="none";switch(this._core.coreMouseService.activeProtocol){case"X10":o="x10";break;case"VT200":o="vt200";break;case"DRAG":o="drag";break;case"ANY":o="any"}return{applicationCursorKeysMode:h.applicationCursorKeys,applicationKeypadMode:h.applicationKeypad,bracketedPasteMode:h.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:o,originMode:h.origin,reverseWraparoundMode:h.reverseWraparound,sendFocusMode:h.sendFocus,wraparoundMode:h.wraparound}}get options(){return this._publicOptions}set options(h){for(const o in h)this._publicOptions[o]=h[o]}blur(){this._core.blur()}focus(){this._core.focus()}input(h,o=!0){this._core.input(h,o)}resize(h,o){this._verifyIntegers(h,o),this._core.resize(h,o)}open(h){this._core.open(h)}attachCustomKeyEventHandler(h){this._core.attachCustomKeyEventHandler(h)}attachCustomWheelEventHandler(h){this._core.attachCustomWheelEventHandler(h)}registerLinkProvider(h){return this._core.registerLinkProvider(h)}registerCharacterJoiner(h){return this._checkProposedApi(),this._core.registerCharacterJoiner(h)}deregisterCharacterJoiner(h){this._checkProposedApi(),this._core.deregisterCharacterJoiner(h)}registerMarker(h=0){return this._verifyIntegers(h),this._core.registerMarker(h)}registerDecoration(h){return this._checkProposedApi(),this._verifyPositiveIntegers(h.x??0,h.width??0,h.height??0),this._core.registerDecoration(h)}hasSelection(){return this._core.hasSelection()}select(h,o,l){this._verifyIntegers(h,o,l),this._core.select(h,o,l)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(h,o){this._verifyIntegers(h,o),this._core.selectLines(h,o)}dispose(){super.dispose()}scrollLines(h){this._verifyIntegers(h),this._core.scrollLines(h)}scrollPages(h){this._verifyIntegers(h),this._core.scrollPages(h)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(h){this._verifyIntegers(h),this._core.scrollToLine(h)}clear(){this._core.clear()}write(h,o){this._core.write(h,o)}writeln(h,o){this._core.write(h),this._core.write(`\r
|
|
57
|
+
`,o)}paste(h){this._core.paste(h)}refresh(h,o){this._verifyIntegers(h,o),this._core.refresh(h,o)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(h){this._addonManager.loadAddon(this,h)}static get strings(){return n}_verifyIntegers(...h){for(const o of h)if(o===1/0||isNaN(o)||o%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...h){for(const o of h)if(o&&(o===1/0||isNaN(o)||o%1!=0||o<0))throw new Error("This API only accepts positive integers")}}j.Terminal=c})(),ae})()))})(To)),To.exports}var Qv=Kv(),Bo={exports:{}},Wd;function Zv(){return Wd||(Wd=1,(function(F,V){(function(X,U){F.exports=U()})(self,(()=>(()=>{var X={};return(()=>{var U=X;Object.defineProperty(U,"__esModule",{value:!0}),U.FitAddon=void 0,U.FitAddon=class{activate(ee){this._terminal=ee}dispose(){}fit(){const ee=this.proposeDimensions();if(!ee||!this._terminal||isNaN(ee.cols)||isNaN(ee.rows))return;const ae=this._terminal._core;this._terminal.rows===ee.rows&&this._terminal.cols===ee.cols||(ae._renderService.clear(),this._terminal.resize(ee.cols,ee.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const ee=this._terminal._core,ae=ee._renderService.dimensions;if(ae.css.cell.width===0||ae.css.cell.height===0)return;const j=this._terminal.options.scrollback===0?0:ee.viewport.scrollBarWidth,n=window.getComputedStyle(this._terminal.element.parentElement),u=parseInt(n.getPropertyValue("height")),d=Math.max(0,parseInt(n.getPropertyValue("width"))),_=window.getComputedStyle(this._terminal.element),a=u-(parseInt(_.getPropertyValue("padding-top"))+parseInt(_.getPropertyValue("padding-bottom"))),p=d-(parseInt(_.getPropertyValue("padding-right"))+parseInt(_.getPropertyValue("padding-left")))-j;return{cols:Math.max(2,Math.floor(p/ae.css.cell.width)),rows:Math.max(1,Math.floor(a/ae.css.cell.height))}}}})(),X})()))})(Bo)),Bo.exports}var Jv=Zv(),Oo={exports:{}},Gd;function eg(){return Gd||(Gd=1,(function(F,V){(function(X,U){F.exports=U()})(self,(()=>(()=>{var X={965:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.GlyphRenderer=void 0;const d=u(374),_=u(509),a=u(855),p=u(859),w=u(381),b=11,c=b*Float32Array.BYTES_PER_ELEMENT;let r,h=0,o=0,l=0;class S extends p.Disposable{constructor(v,y,m,C){super(),this._terminal=v,this._gl=y,this._dimensions=m,this._optionsService=C,this._activeBuffer=0,this._vertices={count:0,attributes:new Float32Array(0),attributesBuffers:[new Float32Array(0),new Float32Array(0)]};const E=this._gl;_.TextureAtlas.maxAtlasPages===void 0&&(_.TextureAtlas.maxAtlasPages=Math.min(32,(0,d.throwIfFalsy)(E.getParameter(E.MAX_TEXTURE_IMAGE_UNITS))),_.TextureAtlas.maxTextureSize=(0,d.throwIfFalsy)(E.getParameter(E.MAX_TEXTURE_SIZE))),this._program=(0,d.throwIfFalsy)((0,w.createProgram)(E,`#version 300 es
|
|
58
|
+
layout (location = 0) in vec2 a_unitquad;
|
|
59
|
+
layout (location = 1) in vec2 a_cellpos;
|
|
60
|
+
layout (location = 2) in vec2 a_offset;
|
|
61
|
+
layout (location = 3) in vec2 a_size;
|
|
62
|
+
layout (location = 4) in float a_texpage;
|
|
63
|
+
layout (location = 5) in vec2 a_texcoord;
|
|
64
|
+
layout (location = 6) in vec2 a_texsize;
|
|
65
|
+
|
|
66
|
+
uniform mat4 u_projection;
|
|
67
|
+
uniform vec2 u_resolution;
|
|
68
|
+
|
|
69
|
+
out vec2 v_texcoord;
|
|
70
|
+
flat out int v_texpage;
|
|
71
|
+
|
|
72
|
+
void main() {
|
|
73
|
+
vec2 zeroToOne = (a_offset / u_resolution) + a_cellpos + (a_unitquad * a_size);
|
|
74
|
+
gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
|
|
75
|
+
v_texpage = int(a_texpage);
|
|
76
|
+
v_texcoord = a_texcoord + a_unitquad * a_texsize;
|
|
77
|
+
}`,(function(I){let P="";for(let z=1;z<I;z++)P+=` else if (v_texpage == ${z}) { outColor = texture(u_texture[${z}], v_texcoord); }`;return`#version 300 es
|
|
78
|
+
precision lowp float;
|
|
79
|
+
|
|
80
|
+
in vec2 v_texcoord;
|
|
81
|
+
flat in int v_texpage;
|
|
82
|
+
|
|
83
|
+
uniform sampler2D u_texture[${I}];
|
|
84
|
+
|
|
85
|
+
out vec4 outColor;
|
|
86
|
+
|
|
87
|
+
void main() {
|
|
88
|
+
if (v_texpage == 0) {
|
|
89
|
+
outColor = texture(u_texture[0], v_texcoord);
|
|
90
|
+
} ${P}
|
|
91
|
+
}`})(_.TextureAtlas.maxAtlasPages))),this.register((0,p.toDisposable)((()=>E.deleteProgram(this._program)))),this._projectionLocation=(0,d.throwIfFalsy)(E.getUniformLocation(this._program,"u_projection")),this._resolutionLocation=(0,d.throwIfFalsy)(E.getUniformLocation(this._program,"u_resolution")),this._textureLocation=(0,d.throwIfFalsy)(E.getUniformLocation(this._program,"u_texture")),this._vertexArrayObject=E.createVertexArray(),E.bindVertexArray(this._vertexArrayObject);const R=new Float32Array([0,0,1,0,0,1,1,1]),L=E.createBuffer();this.register((0,p.toDisposable)((()=>E.deleteBuffer(L)))),E.bindBuffer(E.ARRAY_BUFFER,L),E.bufferData(E.ARRAY_BUFFER,R,E.STATIC_DRAW),E.enableVertexAttribArray(0),E.vertexAttribPointer(0,2,this._gl.FLOAT,!1,0,0);const D=new Uint8Array([0,1,2,3]),O=E.createBuffer();this.register((0,p.toDisposable)((()=>E.deleteBuffer(O)))),E.bindBuffer(E.ELEMENT_ARRAY_BUFFER,O),E.bufferData(E.ELEMENT_ARRAY_BUFFER,D,E.STATIC_DRAW),this._attributesBuffer=(0,d.throwIfFalsy)(E.createBuffer()),this.register((0,p.toDisposable)((()=>E.deleteBuffer(this._attributesBuffer)))),E.bindBuffer(E.ARRAY_BUFFER,this._attributesBuffer),E.enableVertexAttribArray(2),E.vertexAttribPointer(2,2,E.FLOAT,!1,c,0),E.vertexAttribDivisor(2,1),E.enableVertexAttribArray(3),E.vertexAttribPointer(3,2,E.FLOAT,!1,c,2*Float32Array.BYTES_PER_ELEMENT),E.vertexAttribDivisor(3,1),E.enableVertexAttribArray(4),E.vertexAttribPointer(4,1,E.FLOAT,!1,c,4*Float32Array.BYTES_PER_ELEMENT),E.vertexAttribDivisor(4,1),E.enableVertexAttribArray(5),E.vertexAttribPointer(5,2,E.FLOAT,!1,c,5*Float32Array.BYTES_PER_ELEMENT),E.vertexAttribDivisor(5,1),E.enableVertexAttribArray(6),E.vertexAttribPointer(6,2,E.FLOAT,!1,c,7*Float32Array.BYTES_PER_ELEMENT),E.vertexAttribDivisor(6,1),E.enableVertexAttribArray(1),E.vertexAttribPointer(1,2,E.FLOAT,!1,c,9*Float32Array.BYTES_PER_ELEMENT),E.vertexAttribDivisor(1,1),E.useProgram(this._program);const $=new Int32Array(_.TextureAtlas.maxAtlasPages);for(let I=0;I<_.TextureAtlas.maxAtlasPages;I++)$[I]=I;E.uniform1iv(this._textureLocation,$),E.uniformMatrix4fv(this._projectionLocation,!1,w.PROJECTION_MATRIX),this._atlasTextures=[];for(let I=0;I<_.TextureAtlas.maxAtlasPages;I++){const P=new w.GLTexture((0,d.throwIfFalsy)(E.createTexture()));this.register((0,p.toDisposable)((()=>E.deleteTexture(P.texture)))),E.activeTexture(E.TEXTURE0+I),E.bindTexture(E.TEXTURE_2D,P.texture),E.texParameteri(E.TEXTURE_2D,E.TEXTURE_WRAP_S,E.CLAMP_TO_EDGE),E.texParameteri(E.TEXTURE_2D,E.TEXTURE_WRAP_T,E.CLAMP_TO_EDGE),E.texImage2D(E.TEXTURE_2D,0,E.RGBA,1,1,0,E.RGBA,E.UNSIGNED_BYTE,new Uint8Array([255,0,0,255])),this._atlasTextures[I]=P}E.enable(E.BLEND),E.blendFunc(E.SRC_ALPHA,E.ONE_MINUS_SRC_ALPHA),this.handleResize()}beginFrame(){return!this._atlas||this._atlas.beginFrame()}updateCell(v,y,m,C,E,R,L,D,O){this._updateCell(this._vertices.attributes,v,y,m,C,E,R,L,D,O)}_updateCell(v,y,m,C,E,R,L,D,O,$){h=(m*this._terminal.cols+y)*b,C!==a.NULL_CELL_CODE&&C!==void 0?this._atlas&&(r=D&&D.length>1?this._atlas.getRasterizedGlyphCombinedChar(D,E,R,L,!1):this._atlas.getRasterizedGlyph(C,E,R,L,!1),o=Math.floor((this._dimensions.device.cell.width-this._dimensions.device.char.width)/2),E!==$&&r.offset.x>o?(l=r.offset.x-o,v[h]=-(r.offset.x-l)+this._dimensions.device.char.left,v[h+1]=-r.offset.y+this._dimensions.device.char.top,v[h+2]=(r.size.x-l)/this._dimensions.device.canvas.width,v[h+3]=r.size.y/this._dimensions.device.canvas.height,v[h+4]=r.texturePage,v[h+5]=r.texturePositionClipSpace.x+l/this._atlas.pages[r.texturePage].canvas.width,v[h+6]=r.texturePositionClipSpace.y,v[h+7]=r.sizeClipSpace.x-l/this._atlas.pages[r.texturePage].canvas.width,v[h+8]=r.sizeClipSpace.y):(v[h]=-r.offset.x+this._dimensions.device.char.left,v[h+1]=-r.offset.y+this._dimensions.device.char.top,v[h+2]=r.size.x/this._dimensions.device.canvas.width,v[h+3]=r.size.y/this._dimensions.device.canvas.height,v[h+4]=r.texturePage,v[h+5]=r.texturePositionClipSpace.x,v[h+6]=r.texturePositionClipSpace.y,v[h+7]=r.sizeClipSpace.x,v[h+8]=r.sizeClipSpace.y),this._optionsService.rawOptions.rescaleOverlappingGlyphs&&(0,d.allowRescaling)(C,O,r.size.x,this._dimensions.device.cell.width)&&(v[h+2]=(this._dimensions.device.cell.width-1)/this._dimensions.device.canvas.width)):v.fill(0,h,h+b-1-2)}clear(){const v=this._terminal,y=v.cols*v.rows*b;this._vertices.count!==y?this._vertices.attributes=new Float32Array(y):this._vertices.attributes.fill(0);let m=0;for(;m<this._vertices.attributesBuffers.length;m++)this._vertices.count!==y?this._vertices.attributesBuffers[m]=new Float32Array(y):this._vertices.attributesBuffers[m].fill(0);this._vertices.count=y,m=0;for(let C=0;C<v.rows;C++)for(let E=0;E<v.cols;E++)this._vertices.attributes[m+9]=E/v.cols,this._vertices.attributes[m+10]=C/v.rows,m+=b}handleResize(){const v=this._gl;v.useProgram(this._program),v.viewport(0,0,v.canvas.width,v.canvas.height),v.uniform2f(this._resolutionLocation,v.canvas.width,v.canvas.height),this.clear()}render(v){if(!this._atlas)return;const y=this._gl;y.useProgram(this._program),y.bindVertexArray(this._vertexArrayObject),this._activeBuffer=(this._activeBuffer+1)%2;const m=this._vertices.attributesBuffers[this._activeBuffer];let C=0;for(let E=0;E<v.lineLengths.length;E++){const R=E*this._terminal.cols*b,L=this._vertices.attributes.subarray(R,R+v.lineLengths[E]*b);m.set(L,C),C+=L.length}y.bindBuffer(y.ARRAY_BUFFER,this._attributesBuffer),y.bufferData(y.ARRAY_BUFFER,m.subarray(0,C),y.STREAM_DRAW);for(let E=0;E<this._atlas.pages.length;E++)this._atlas.pages[E].version!==this._atlasTextures[E].version&&this._bindAtlasPageTexture(y,this._atlas,E);y.drawElementsInstanced(y.TRIANGLE_STRIP,4,y.UNSIGNED_BYTE,0,C/b)}setAtlas(v){this._atlas=v;for(const y of this._atlasTextures)y.version=-1}_bindAtlasPageTexture(v,y,m){v.activeTexture(v.TEXTURE0+m),v.bindTexture(v.TEXTURE_2D,this._atlasTextures[m].texture),v.texParameteri(v.TEXTURE_2D,v.TEXTURE_WRAP_S,v.CLAMP_TO_EDGE),v.texParameteri(v.TEXTURE_2D,v.TEXTURE_WRAP_T,v.CLAMP_TO_EDGE),v.texImage2D(v.TEXTURE_2D,0,v.RGBA,v.RGBA,v.UNSIGNED_BYTE,y.pages[m].canvas),v.generateMipmap(v.TEXTURE_2D),this._atlasTextures[m].version=y.pages[m].version}setDimensions(v){this._dimensions=v}}n.GlyphRenderer=S},742:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.RectangleRenderer=void 0;const d=u(374),_=u(859),a=u(310),p=u(381),w=8*Float32Array.BYTES_PER_ELEMENT;class b{constructor(){this.attributes=new Float32Array(160),this.count=0}}let c=0,r=0,h=0,o=0,l=0,S=0,x=0;class v extends _.Disposable{constructor(m,C,E,R){super(),this._terminal=m,this._gl=C,this._dimensions=E,this._themeService=R,this._vertices=new b,this._verticesCursor=new b;const L=this._gl;this._program=(0,d.throwIfFalsy)((0,p.createProgram)(L,`#version 300 es
|
|
92
|
+
layout (location = 0) in vec2 a_position;
|
|
93
|
+
layout (location = 1) in vec2 a_size;
|
|
94
|
+
layout (location = 2) in vec4 a_color;
|
|
95
|
+
layout (location = 3) in vec2 a_unitquad;
|
|
96
|
+
|
|
97
|
+
uniform mat4 u_projection;
|
|
98
|
+
|
|
99
|
+
out vec4 v_color;
|
|
100
|
+
|
|
101
|
+
void main() {
|
|
102
|
+
vec2 zeroToOne = a_position + (a_unitquad * a_size);
|
|
103
|
+
gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
|
|
104
|
+
v_color = a_color;
|
|
105
|
+
}`,`#version 300 es
|
|
106
|
+
precision lowp float;
|
|
107
|
+
|
|
108
|
+
in vec4 v_color;
|
|
109
|
+
|
|
110
|
+
out vec4 outColor;
|
|
111
|
+
|
|
112
|
+
void main() {
|
|
113
|
+
outColor = v_color;
|
|
114
|
+
}`)),this.register((0,_.toDisposable)((()=>L.deleteProgram(this._program)))),this._projectionLocation=(0,d.throwIfFalsy)(L.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=L.createVertexArray(),L.bindVertexArray(this._vertexArrayObject);const D=new Float32Array([0,0,1,0,0,1,1,1]),O=L.createBuffer();this.register((0,_.toDisposable)((()=>L.deleteBuffer(O)))),L.bindBuffer(L.ARRAY_BUFFER,O),L.bufferData(L.ARRAY_BUFFER,D,L.STATIC_DRAW),L.enableVertexAttribArray(3),L.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);const $=new Uint8Array([0,1,2,3]),I=L.createBuffer();this.register((0,_.toDisposable)((()=>L.deleteBuffer(I)))),L.bindBuffer(L.ELEMENT_ARRAY_BUFFER,I),L.bufferData(L.ELEMENT_ARRAY_BUFFER,$,L.STATIC_DRAW),this._attributesBuffer=(0,d.throwIfFalsy)(L.createBuffer()),this.register((0,_.toDisposable)((()=>L.deleteBuffer(this._attributesBuffer)))),L.bindBuffer(L.ARRAY_BUFFER,this._attributesBuffer),L.enableVertexAttribArray(0),L.vertexAttribPointer(0,2,L.FLOAT,!1,w,0),L.vertexAttribDivisor(0,1),L.enableVertexAttribArray(1),L.vertexAttribPointer(1,2,L.FLOAT,!1,w,2*Float32Array.BYTES_PER_ELEMENT),L.vertexAttribDivisor(1,1),L.enableVertexAttribArray(2),L.vertexAttribPointer(2,4,L.FLOAT,!1,w,4*Float32Array.BYTES_PER_ELEMENT),L.vertexAttribDivisor(2,1),this._updateCachedColors(R.colors),this.register(this._themeService.onChangeColors((P=>{this._updateCachedColors(P),this._updateViewportRectangle()})))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(m){const C=this._gl;C.useProgram(this._program),C.bindVertexArray(this._vertexArrayObject),C.uniformMatrix4fv(this._projectionLocation,!1,p.PROJECTION_MATRIX),C.bindBuffer(C.ARRAY_BUFFER,this._attributesBuffer),C.bufferData(C.ARRAY_BUFFER,m.attributes,C.DYNAMIC_DRAW),C.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,C.UNSIGNED_BYTE,0,m.count)}handleResize(){this._updateViewportRectangle()}setDimensions(m){this._dimensions=m}_updateCachedColors(m){this._bgFloat=this._colorToFloat32Array(m.background),this._cursorFloat=this._colorToFloat32Array(m.cursor)}_updateViewportRectangle(){this._addRectangleFloat(this._vertices.attributes,0,0,0,this._terminal.cols*this._dimensions.device.cell.width,this._terminal.rows*this._dimensions.device.cell.height,this._bgFloat)}updateBackgrounds(m){const C=this._terminal,E=this._vertices;let R,L,D,O,$,I,P,z,M,B,T,k=1;for(R=0;R<C.rows;R++){for(D=-1,O=0,$=0,I=!1,L=0;L<C.cols;L++)P=(R*C.cols+L)*a.RENDER_MODEL_INDICIES_PER_CELL,z=m.cells[P+a.RENDER_MODEL_BG_OFFSET],M=m.cells[P+a.RENDER_MODEL_FG_OFFSET],B=!!(67108864&M),(z!==O||M!==$&&(I||B))&&((O!==0||I&&$!==0)&&(T=8*k++,this._updateRectangle(E,T,$,O,D,L,R)),D=L,O=z,$=M,I=B);(O!==0||I&&$!==0)&&(T=8*k++,this._updateRectangle(E,T,$,O,D,C.cols,R))}E.count=k}updateCursor(m){const C=this._verticesCursor,E=m.cursor;if(!E||E.style==="block")return void(C.count=0);let R,L=0;E.style!=="bar"&&E.style!=="outline"||(R=8*L++,this._addRectangleFloat(C.attributes,R,E.x*this._dimensions.device.cell.width,E.y*this._dimensions.device.cell.height,E.style==="bar"?E.dpr*E.cursorWidth:E.dpr,this._dimensions.device.cell.height,this._cursorFloat)),E.style!=="underline"&&E.style!=="outline"||(R=8*L++,this._addRectangleFloat(C.attributes,R,E.x*this._dimensions.device.cell.width,(E.y+1)*this._dimensions.device.cell.height-E.dpr,E.width*this._dimensions.device.cell.width,E.dpr,this._cursorFloat)),E.style==="outline"&&(R=8*L++,this._addRectangleFloat(C.attributes,R,E.x*this._dimensions.device.cell.width,E.y*this._dimensions.device.cell.height,E.width*this._dimensions.device.cell.width,E.dpr,this._cursorFloat),R=8*L++,this._addRectangleFloat(C.attributes,R,(E.x+E.width)*this._dimensions.device.cell.width-E.dpr,E.y*this._dimensions.device.cell.height,E.dpr,this._dimensions.device.cell.height,this._cursorFloat)),C.count=L}_updateRectangle(m,C,E,R,L,D,O){if(67108864&E)switch(50331648&E){case 16777216:case 33554432:c=this._themeService.colors.ansi[255&E].rgba;break;case 50331648:c=(16777215&E)<<8;break;default:c=this._themeService.colors.foreground.rgba}else switch(50331648&R){case 16777216:case 33554432:c=this._themeService.colors.ansi[255&R].rgba;break;case 50331648:c=(16777215&R)<<8;break;default:c=this._themeService.colors.background.rgba}m.attributes.length<C+4&&(m.attributes=(0,p.expandFloat32Array)(m.attributes,this._terminal.rows*this._terminal.cols*8)),r=L*this._dimensions.device.cell.width,h=O*this._dimensions.device.cell.height,o=(c>>24&255)/255,l=(c>>16&255)/255,S=(c>>8&255)/255,x=1,this._addRectangle(m.attributes,C,r,h,(D-L)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,o,l,S,x)}_addRectangle(m,C,E,R,L,D,O,$,I,P){m[C]=E/this._dimensions.device.canvas.width,m[C+1]=R/this._dimensions.device.canvas.height,m[C+2]=L/this._dimensions.device.canvas.width,m[C+3]=D/this._dimensions.device.canvas.height,m[C+4]=O,m[C+5]=$,m[C+6]=I,m[C+7]=P}_addRectangleFloat(m,C,E,R,L,D,O){m[C]=E/this._dimensions.device.canvas.width,m[C+1]=R/this._dimensions.device.canvas.height,m[C+2]=L/this._dimensions.device.canvas.width,m[C+3]=D/this._dimensions.device.canvas.height,m[C+4]=O[0],m[C+5]=O[1],m[C+6]=O[2],m[C+7]=O[3]}_colorToFloat32Array(m){return new Float32Array([(m.rgba>>24&255)/255,(m.rgba>>16&255)/255,(m.rgba>>8&255)/255,(255&m.rgba)/255])}}n.RectangleRenderer=v},310:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.RenderModel=n.COMBINED_CHAR_BIT_MASK=n.RENDER_MODEL_EXT_OFFSET=n.RENDER_MODEL_FG_OFFSET=n.RENDER_MODEL_BG_OFFSET=n.RENDER_MODEL_INDICIES_PER_CELL=void 0;const d=u(296);n.RENDER_MODEL_INDICIES_PER_CELL=4,n.RENDER_MODEL_BG_OFFSET=1,n.RENDER_MODEL_FG_OFFSET=2,n.RENDER_MODEL_EXT_OFFSET=3,n.COMBINED_CHAR_BIT_MASK=2147483648,n.RenderModel=class{constructor(){this.cells=new Uint32Array(0),this.lineLengths=new Uint32Array(0),this.selection=(0,d.createSelectionRenderModel)()}resize(_,a){const p=_*a*n.RENDER_MODEL_INDICIES_PER_CELL;p!==this.cells.length&&(this.cells=new Uint32Array(p),this.lineLengths=new Uint32Array(a))}clear(){this.cells.fill(0,0),this.lineLengths.fill(0,0)}}},666:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.JoinedCellData=n.WebglRenderer=void 0;const d=u(820),_=u(274),a=u(627),p=u(457),w=u(56),b=u(374),c=u(345),r=u(859),h=u(147),o=u(782),l=u(855),S=u(965),x=u(742),v=u(310),y=u(733);class m extends r.Disposable{constructor(L,D,O,$,I,P,z,M,B){super(),this._terminal=L,this._characterJoinerService=D,this._charSizeService=O,this._coreBrowserService=$,this._coreService=I,this._decorationService=P,this._optionsService=z,this._themeService=M,this._cursorBlinkStateManager=new r.MutableDisposable,this._charAtlasDisposable=this.register(new r.MutableDisposable),this._observerDisposable=this.register(new r.MutableDisposable),this._model=new v.RenderModel,this._workCell=new o.CellData,this._workCell2=new o.CellData,this._rectangleRenderer=this.register(new r.MutableDisposable),this._glyphRenderer=this.register(new r.MutableDisposable),this._onChangeTextureAtlas=this.register(new c.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new c.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new c.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this.register(new c.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this.register(new c.EventEmitter),this.onContextLoss=this._onContextLoss.event,this.register(this._themeService.onChangeColors((()=>this._handleColorChange()))),this._cellColorResolver=new _.CellColorResolver(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new y.LinkRenderLayer(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,z,this._themeService)],this.dimensions=(0,b.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this.register(z.onOptionChange((()=>this._handleOptionsChanged()))),this._canvas=this._coreBrowserService.mainDocument.createElement("canvas");const T={antialias:!1,depth:!1,preserveDrawingBuffer:B};if(this._gl=this._canvas.getContext("webgl2",T),!this._gl)throw new Error("WebGL2 not supported "+this._gl);this.register((0,d.addDisposableDomListener)(this._canvas,"webglcontextlost",(k=>{console.log("webglcontextlost event received"),k.preventDefault(),this._contextRestorationTimeout=setTimeout((()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(k)}),3e3)}))),this.register((0,d.addDisposableDomListener)(this._canvas,"webglcontextrestored",(k=>{console.warn("webglcontextrestored event received"),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,(0,a.removeTerminalFromCache)(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()}))),this._observerDisposable.value=(0,w.observeDevicePixelDimensions)(this._canvas,this._coreBrowserService.window,((k,G)=>this._setCanvasDevicePixelDimensions(k,G))),this.register(this._coreBrowserService.onWindowChange((k=>{this._observerDisposable.value=(0,w.observeDevicePixelDimensions)(this._canvas,k,((G,K)=>this._setCanvasDevicePixelDimensions(G,K)))}))),this._core.screenElement.appendChild(this._canvas),[this._rectangleRenderer.value,this._glyphRenderer.value]=this._initializeWebGLState(),this._isAttached=this._coreBrowserService.window.document.body.contains(this._core.screenElement),this.register((0,r.toDisposable)((()=>{var k;for(const G of this._renderLayers)G.dispose();(k=this._canvas.parentElement)==null||k.removeChild(this._canvas),(0,a.removeTerminalFromCache)(this._terminal)})))}get textureAtlas(){var L;return(L=this._charAtlas)==null?void 0:L.pages[0].canvas}_handleColorChange(){this._refreshCharAtlas(),this._clearModel(!0)}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._terminal.cols,this._terminal.rows))}handleResize(L,D){var O,$,I,P;this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);for(const z of this._renderLayers)z.resize(this._terminal,this.dimensions);this._canvas.width=this.dimensions.device.canvas.width,this._canvas.height=this.dimensions.device.canvas.height,this._canvas.style.width=`${this.dimensions.css.canvas.width}px`,this._canvas.style.height=`${this.dimensions.css.canvas.height}px`,this._core.screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._core.screenElement.style.height=`${this.dimensions.css.canvas.height}px`,(O=this._rectangleRenderer.value)==null||O.setDimensions(this.dimensions),($=this._rectangleRenderer.value)==null||$.handleResize(),(I=this._glyphRenderer.value)==null||I.setDimensions(this.dimensions),(P=this._glyphRenderer.value)==null||P.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){var L;for(const D of this._renderLayers)D.handleBlur(this._terminal);(L=this._cursorBlinkStateManager.value)==null||L.pause(),this._requestRedrawViewport()}handleFocus(){var L;for(const D of this._renderLayers)D.handleFocus(this._terminal);(L=this._cursorBlinkStateManager.value)==null||L.resume(),this._requestRedrawViewport()}handleSelectionChanged(L,D,O){for(const $ of this._renderLayers)$.handleSelectionChanged(this._terminal,L,D,O);this._model.selection.update(this._core,L,D,O),this._requestRedrawViewport()}handleCursorMove(){var L;for(const D of this._renderLayers)D.handleCursorMove(this._terminal);(L=this._cursorBlinkStateManager.value)==null||L.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new x.RectangleRenderer(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new S.GlyphRenderer(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){var D;if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0)return void(this._isAttached=!1);const L=(0,a.acquireTextureAtlas)(this._terminal,this._optionsService.rawOptions,this._themeService.colors,this.dimensions.device.cell.width,this.dimensions.device.cell.height,this.dimensions.device.char.width,this.dimensions.device.char.height,this._coreBrowserService.dpr);this._charAtlas!==L&&(this._onChangeTextureAtlas.fire(L.pages[0].canvas),this._charAtlasDisposable.value=(0,r.getDisposeArrayDisposable)([(0,c.forwardEvent)(L.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),(0,c.forwardEvent)(L.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)])),this._charAtlas=L,this._charAtlas.warmUp(),(D=this._glyphRenderer.value)==null||D.setAtlas(this._charAtlas)}_clearModel(L){var D;this._model.clear(),L&&((D=this._glyphRenderer.value)==null||D.clear())}clearTextureAtlas(){var L;(L=this._charAtlas)==null||L.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){var L;this._clearModel(!0);for(const D of this._renderLayers)D.reset(this._terminal);(L=this._cursorBlinkStateManager.value)==null||L.restartBlinkAnimation(),this._updateCursorBlink()}registerCharacterJoiner(L){return-1}deregisterCharacterJoiner(L){return!1}renderRows(L,D){if(!this._isAttached){if(!(this._coreBrowserService.window.document.body.contains(this._core.screenElement)&&this._charSizeService.width&&this._charSizeService.height))return;this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0}for(const O of this._renderLayers)O.handleGridChanged(this._terminal,L,D);this._glyphRenderer.value&&this._rectangleRenderer.value&&(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(L,D),this._rectangleRenderer.value.renderBackgrounds(),this._glyphRenderer.value.render(this._model),this._cursorBlinkStateManager.value&&!this._cursorBlinkStateManager.value.isCursorVisible||this._rectangleRenderer.value.renderCursor())}_updateCursorBlink(){this._terminal.options.cursorBlink?this._cursorBlinkStateManager.value=new p.CursorBlinkStateManager((()=>{this._requestRedrawCursor()}),this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(L,D){const O=this._core;let $,I,P,z,M,B,T,k,G,K,ue,le,q,N,ie=this._workCell;L=E(L,O.rows-1,0),D=E(D,O.rows-1,0);const te=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,ve=te-O.buffer.ydisp,fe=Math.min(this._terminal.buffer.active.cursorX,O.cols-1);let Me=-1;const _e=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let Oe=!1;for(I=L;I<=D;I++)for(P=I+O.buffer.ydisp,z=O.buffer.lines.get(P),this._model.lineLengths[I]=0,M=this._characterJoinerService.getJoinedCharacters(P),q=0;q<O.cols;q++)if($=this._cellColorResolver.result.bg,z.loadCell(q,ie),q===0&&($=this._cellColorResolver.result.bg),B=!1,T=q,M.length>0&&q===M[0][0]&&(B=!0,k=M.shift(),ie=new C(ie,z.translateToString(!0,k[0],k[1]),k[1]-k[0]),T=k[1]-1),G=ie.getChars(),K=ie.getCode(),le=(I*O.cols+q)*v.RENDER_MODEL_INDICIES_PER_CELL,this._cellColorResolver.resolve(ie,q,P,this.dimensions.device.cell.width),_e&&P===te&&(q===fe&&(this._model.cursor={x:fe,y:ve,width:ie.getWidth(),style:this._coreBrowserService.isFocused?O.options.cursorStyle||"block":O.options.cursorInactiveStyle,cursorWidth:O.options.cursorWidth,dpr:this._devicePixelRatio},Me=fe+ie.getWidth()-1),q>=fe&&q<=Me&&(this._coreBrowserService.isFocused&&(O.options.cursorStyle||"block")==="block"||this._coreBrowserService.isFocused===!1&&O.options.cursorInactiveStyle==="block")&&(this._cellColorResolver.result.fg=50331648|this._themeService.colors.cursorAccent.rgba>>8&16777215,this._cellColorResolver.result.bg=50331648|this._themeService.colors.cursor.rgba>>8&16777215)),K!==l.NULL_CELL_CODE&&(this._model.lineLengths[I]=q+1),(this._model.cells[le]!==K||this._model.cells[le+v.RENDER_MODEL_BG_OFFSET]!==this._cellColorResolver.result.bg||this._model.cells[le+v.RENDER_MODEL_FG_OFFSET]!==this._cellColorResolver.result.fg||this._model.cells[le+v.RENDER_MODEL_EXT_OFFSET]!==this._cellColorResolver.result.ext)&&(Oe=!0,G.length>1&&(K|=v.COMBINED_CHAR_BIT_MASK),this._model.cells[le]=K,this._model.cells[le+v.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[le+v.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[le+v.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext,ue=ie.getWidth(),this._glyphRenderer.value.updateCell(q,I,K,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,G,ue,$),B))for(ie=this._workCell,q++;q<T;q++)N=(I*O.cols+q)*v.RENDER_MODEL_INDICIES_PER_CELL,this._glyphRenderer.value.updateCell(q,I,l.NULL_CELL_CODE,0,0,0,l.NULL_CELL_CHAR,0,0),this._model.cells[N]=l.NULL_CELL_CODE,this._model.cells[N+v.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[N+v.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[N+v.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext;Oe&&this._rectangleRenderer.value.updateBackgrounds(this._model),this._rectangleRenderer.value.updateCursor(this._model)}_updateDimensions(){this._charSizeService.width&&this._charSizeService.height&&(this.dimensions.device.char.width=Math.floor(this._charSizeService.width*this._devicePixelRatio),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*this._devicePixelRatio),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=this._optionsService.rawOptions.lineHeight===1?0:Math.round((this.dimensions.device.cell.height-this.dimensions.device.char.height)/2),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.char.left=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.device.canvas.height=this._terminal.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._terminal.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/this._devicePixelRatio),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/this._devicePixelRatio),this.dimensions.css.cell.height=this.dimensions.device.cell.height/this._devicePixelRatio,this.dimensions.css.cell.width=this.dimensions.device.cell.width/this._devicePixelRatio)}_setCanvasDevicePixelDimensions(L,D){this._canvas.width===L&&this._canvas.height===D||(this._canvas.width=L,this._canvas.height=D,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){const L=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:L,end:L})}}n.WebglRenderer=m;class C extends h.AttributeData{constructor(L,D,O){super(),this.content=0,this.combinedData="",this.fg=L.fg,this.bg=L.bg,this.combinedData=D,this._width=O}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(L){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}function E(R,L,D=0){return Math.max(Math.min(R,L),D)}n.JoinedCellData=C},381:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.GLTexture=n.expandFloat32Array=n.createShader=n.createProgram=n.PROJECTION_MATRIX=void 0;const d=u(374);function _(a,p,w){const b=(0,d.throwIfFalsy)(a.createShader(p));if(a.shaderSource(b,w),a.compileShader(b),a.getShaderParameter(b,a.COMPILE_STATUS))return b;console.error(a.getShaderInfoLog(b)),a.deleteShader(b)}n.PROJECTION_MATRIX=new Float32Array([2,0,0,0,0,-2,0,0,0,0,1,0,-1,1,0,1]),n.createProgram=function(a,p,w){const b=(0,d.throwIfFalsy)(a.createProgram());if(a.attachShader(b,(0,d.throwIfFalsy)(_(a,a.VERTEX_SHADER,p))),a.attachShader(b,(0,d.throwIfFalsy)(_(a,a.FRAGMENT_SHADER,w))),a.linkProgram(b),a.getProgramParameter(b,a.LINK_STATUS))return b;console.error(a.getProgramInfoLog(b)),a.deleteProgram(b)},n.createShader=_,n.expandFloat32Array=function(a,p){const w=Math.min(2*a.length,p),b=new Float32Array(w);for(let c=0;c<a.length;c++)b[c]=a[c];return b},n.GLTexture=class{constructor(a){this.texture=a,this.version=-1}}},592:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BaseRenderLayer=void 0;const d=u(627),_=u(237),a=u(374),p=u(859);class w extends p.Disposable{constructor(c,r,h,o,l,S,x,v){super(),this._container=r,this._alpha=l,this._coreBrowserService=S,this._optionsService=x,this._themeService=v,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add(`xterm-${h}-layer`),this._canvas.style.zIndex=o.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this.register(this._themeService.onChangeColors((y=>{this._refreshCharAtlas(c,y),this.reset(c)}))),this.register((0,p.toDisposable)((()=>{this._canvas.remove()})))}_initCanvas(){this._ctx=(0,a.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(c){}handleFocus(c){}handleCursorMove(c){}handleGridChanged(c,r,h){}handleSelectionChanged(c,r,h,o=!1){}_setTransparency(c,r){if(r===this._alpha)return;const h=this._canvas;this._alpha=r,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,h),this._refreshCharAtlas(c,this._themeService.colors),this.handleGridChanged(c,0,c.rows-1)}_refreshCharAtlas(c,r){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=(0,d.acquireTextureAtlas)(c,this._optionsService.rawOptions,r,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlas.warmUp())}resize(c,r){this._deviceCellWidth=r.device.cell.width,this._deviceCellHeight=r.device.cell.height,this._deviceCharWidth=r.device.char.width,this._deviceCharHeight=r.device.char.height,this._deviceCharLeft=r.device.char.left,this._deviceCharTop=r.device.char.top,this._canvas.width=r.device.canvas.width,this._canvas.height=r.device.canvas.height,this._canvas.style.width=`${r.css.canvas.width}px`,this._canvas.style.height=`${r.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(c,this._themeService.colors)}_fillBottomLineAtCells(c,r,h=1){this._ctx.fillRect(c*this._deviceCellWidth,(r+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,h*this._deviceCellWidth,this._coreBrowserService.dpr)}_clearAll(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))}_clearCells(c,r,h,o){this._alpha?this._ctx.clearRect(c*this._deviceCellWidth,r*this._deviceCellHeight,h*this._deviceCellWidth,o*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(c*this._deviceCellWidth,r*this._deviceCellHeight,h*this._deviceCellWidth,o*this._deviceCellHeight))}_fillCharTrueColor(c,r,h,o){this._ctx.font=this._getFont(c,!1,!1),this._ctx.textBaseline=_.TEXT_BASELINE,this._clipCell(h,o,r.getWidth()),this._ctx.fillText(r.getChars(),h*this._deviceCellWidth+this._deviceCharLeft,o*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(c,r,h){this._ctx.beginPath(),this._ctx.rect(c*this._deviceCellWidth,r*this._deviceCellHeight,h*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(c,r,h){return`${h?"italic":""} ${r?c.options.fontWeightBold:c.options.fontWeight} ${c.options.fontSize*this._coreBrowserService.dpr}px ${c.options.fontFamily}`}}n.BaseRenderLayer=w},733:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.LinkRenderLayer=void 0;const d=u(197),_=u(237),a=u(592);class p extends a.BaseRenderLayer{constructor(b,c,r,h,o,l,S){super(r,b,"link",c,!0,o,l,S),this.register(h.onShowLinkUnderline((x=>this._handleShowLinkUnderline(x)))),this.register(h.onHideLinkUnderline((x=>this._handleHideLinkUnderline(x))))}resize(b,c){super.resize(b,c),this._state=void 0}reset(b){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);const b=this._state.y2-this._state.y1-1;b>0&&this._clearCells(0,this._state.y1+1,this._state.cols,b),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(b){if(b.fg===_.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._themeService.colors.background.css:b.fg!==void 0&&(0,d.is256Color)(b.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[b.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,b.y1===b.y2)this._fillBottomLineAtCells(b.x1,b.y1,b.x2-b.x1);else{this._fillBottomLineAtCells(b.x1,b.y1,b.cols-b.x1);for(let c=b.y1+1;c<b.y2;c++)this._fillBottomLineAtCells(0,c,b.cols);this._fillBottomLineAtCells(0,b.y2,b.x2)}this._state=b}_handleHideLinkUnderline(b){this._clearCurrentLink()}}n.LinkRenderLayer=p},820:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.addDisposableDomListener=void 0,n.addDisposableDomListener=function(u,d,_,a){u.addEventListener(d,_,a);let p=!1;return{dispose:()=>{p||(p=!0,u.removeEventListener(d,_,a))}}}},274:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellColorResolver=void 0;const d=u(855),_=u(160),a=u(374);let p,w=0,b=0,c=!1,r=!1,h=!1,o=0;n.CellColorResolver=class{constructor(l,S,x,v,y,m){this._terminal=l,this._optionService=S,this._selectionRenderModel=x,this._decorationService=v,this._coreBrowserService=y,this._themeService=m,this.result={fg:0,bg:0,ext:0}}resolve(l,S,x,v){if(this.result.bg=l.bg,this.result.fg=l.fg,this.result.ext=268435456&l.bg?l.extended.ext:0,b=0,w=0,r=!1,c=!1,h=!1,p=this._themeService.colors,o=0,l.getCode()!==d.NULL_CELL_CODE&&l.extended.underlineStyle===4){const y=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));o=S*v%(2*Math.round(y))}if(this._decorationService.forEachDecorationAtCell(S,x,"bottom",(y=>{y.backgroundColorRGB&&(b=y.backgroundColorRGB.rgba>>8&16777215,r=!0),y.foregroundColorRGB&&(w=y.foregroundColorRGB.rgba>>8&16777215,c=!0)})),h=this._selectionRenderModel.isCellSelected(this._terminal,S,x),h){if(67108864&this.result.fg||(50331648&this.result.bg)!=0){if(67108864&this.result.fg)switch(50331648&this.result.fg){case 16777216:case 33554432:b=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:b=(16777215&this.result.fg)<<8|255;break;default:b=this._themeService.colors.foreground.rgba}else switch(50331648&this.result.bg){case 16777216:case 33554432:b=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:b=(16777215&this.result.bg)<<8|255}b=_.rgba.blend(b,4294967040&(this._coreBrowserService.isFocused?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else b=(this._coreBrowserService.isFocused?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(r=!0,p.selectionForeground&&(w=p.selectionForeground.rgba>>8&16777215,c=!0),(0,a.treatGlyphAsBackgroundColor)(l.getCode())){if(67108864&this.result.fg&&(50331648&this.result.bg)==0)w=(this._coreBrowserService.isFocused?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(67108864&this.result.fg)switch(50331648&this.result.bg){case 16777216:case 33554432:w=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:w=(16777215&this.result.bg)<<8|255}else switch(50331648&this.result.fg){case 16777216:case 33554432:w=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:w=(16777215&this.result.fg)<<8|255;break;default:w=this._themeService.colors.foreground.rgba}w=_.rgba.blend(w,4294967040&(this._coreBrowserService.isFocused?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}c=!0}}this._decorationService.forEachDecorationAtCell(S,x,"top",(y=>{y.backgroundColorRGB&&(b=y.backgroundColorRGB.rgba>>8&16777215,r=!0),y.foregroundColorRGB&&(w=y.foregroundColorRGB.rgba>>8&16777215,c=!0)})),r&&(b=h?-16777216&l.bg&-134217729|b|50331648:-16777216&l.bg|b|50331648),c&&(w=-16777216&l.fg&-67108865|w|50331648),67108864&this.result.fg&&(r&&!c&&(w=(50331648&this.result.bg)==0?-134217728&this.result.fg|16777215&p.background.rgba>>8|50331648:-134217728&this.result.fg|67108863&this.result.bg,c=!0),!r&&c&&(b=(50331648&this.result.fg)==0?-67108864&this.result.bg|16777215&p.foreground.rgba>>8|50331648:-67108864&this.result.bg|67108863&this.result.fg,r=!0)),p=void 0,this.result.bg=r?b:this.result.bg,this.result.fg=c?w:this.result.fg,this.result.ext&=536870911,this.result.ext|=o<<29&3758096384}}},627:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.removeTerminalFromCache=n.acquireTextureAtlas=void 0;const d=u(509),_=u(197),a=[];n.acquireTextureAtlas=function(p,w,b,c,r,h,o,l){const S=(0,_.generateConfig)(c,r,h,o,w,b,l);for(let y=0;y<a.length;y++){const m=a[y],C=m.ownedBy.indexOf(p);if(C>=0){if((0,_.configEquals)(m.config,S))return m.atlas;m.ownedBy.length===1?(m.atlas.dispose(),a.splice(y,1)):m.ownedBy.splice(C,1);break}}for(let y=0;y<a.length;y++){const m=a[y];if((0,_.configEquals)(m.config,S))return m.ownedBy.push(p),m.atlas}const x=p._core,v={atlas:new d.TextureAtlas(document,S,x.unicodeService),config:S,ownedBy:[p]};return a.push(v),v.atlas},n.removeTerminalFromCache=function(p){for(let w=0;w<a.length;w++){const b=a[w].ownedBy.indexOf(p);if(b!==-1){a[w].ownedBy.length===1?(a[w].atlas.dispose(),a.splice(w,1)):a[w].ownedBy.splice(b,1);break}}}},197:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.is256Color=n.configEquals=n.generateConfig=void 0;const d=u(160);n.generateConfig=function(_,a,p,w,b,c,r){const h={foreground:c.foreground,background:c.background,cursor:d.NULL_COLOR,cursorAccent:d.NULL_COLOR,selectionForeground:d.NULL_COLOR,selectionBackgroundTransparent:d.NULL_COLOR,selectionBackgroundOpaque:d.NULL_COLOR,selectionInactiveBackgroundTransparent:d.NULL_COLOR,selectionInactiveBackgroundOpaque:d.NULL_COLOR,ansi:c.ansi.slice(),contrastCache:c.contrastCache,halfContrastCache:c.halfContrastCache};return{customGlyphs:b.customGlyphs,devicePixelRatio:r,letterSpacing:b.letterSpacing,lineHeight:b.lineHeight,deviceCellWidth:_,deviceCellHeight:a,deviceCharWidth:p,deviceCharHeight:w,fontFamily:b.fontFamily,fontSize:b.fontSize,fontWeight:b.fontWeight,fontWeightBold:b.fontWeightBold,allowTransparency:b.allowTransparency,drawBoldTextInBrightColors:b.drawBoldTextInBrightColors,minimumContrastRatio:b.minimumContrastRatio,colors:h}},n.configEquals=function(_,a){for(let p=0;p<_.colors.ansi.length;p++)if(_.colors.ansi[p].rgba!==a.colors.ansi[p].rgba)return!1;return _.devicePixelRatio===a.devicePixelRatio&&_.customGlyphs===a.customGlyphs&&_.lineHeight===a.lineHeight&&_.letterSpacing===a.letterSpacing&&_.fontFamily===a.fontFamily&&_.fontSize===a.fontSize&&_.fontWeight===a.fontWeight&&_.fontWeightBold===a.fontWeightBold&&_.allowTransparency===a.allowTransparency&&_.deviceCharWidth===a.deviceCharWidth&&_.deviceCharHeight===a.deviceCharHeight&&_.drawBoldTextInBrightColors===a.drawBoldTextInBrightColors&&_.minimumContrastRatio===a.minimumContrastRatio&&_.colors.foreground.rgba===a.colors.foreground.rgba&&_.colors.background.rgba===a.colors.background.rgba},n.is256Color=function(_){return(50331648&_)==16777216||(50331648&_)==33554432}},237:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TEXT_BASELINE=n.DIM_OPACITY=n.INVERTED_DEFAULT_COLOR=void 0;const d=u(399);n.INVERTED_DEFAULT_COLOR=257,n.DIM_OPACITY=.5,n.TEXT_BASELINE=d.isFirefox||d.isLegacyEdge?"bottom":"ideographic"},457:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CursorBlinkStateManager=void 0,n.CursorBlinkStateManager=class{constructor(u,d){this._renderCallback=u,this._coreBrowserService=d,this.isCursorVisible=!0,this._coreBrowserService.isFocused&&this._restartInterval()}get isPaused(){return!(this._blinkStartTimeout||this._blinkInterval)}dispose(){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}restartBlinkAnimation(){this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0}))))}_restartInterval(u=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout((()=>{if(this._animationTimeRestarted){const d=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,d>0)return void this._restartInterval(d)}this.isCursorVisible=!1,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0})),this._blinkInterval=this._coreBrowserService.window.setInterval((()=>{if(this._animationTimeRestarted){const d=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(d)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0}))}),600)}),u)}pause(){this.isCursorVisible=!0,this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}resume(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()}}},860:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.tryDrawCustomChar=n.powerlineDefinitions=n.boxDrawingDefinitions=n.blockElementDefinitions=void 0;const d=u(374);n.blockElementDefinitions={"▀":[{x:0,y:0,w:8,h:4}],"▁":[{x:0,y:7,w:8,h:1}],"▂":[{x:0,y:6,w:8,h:2}],"▃":[{x:0,y:5,w:8,h:3}],"▄":[{x:0,y:4,w:8,h:4}],"▅":[{x:0,y:3,w:8,h:5}],"▆":[{x:0,y:2,w:8,h:6}],"▇":[{x:0,y:1,w:8,h:7}],"█":[{x:0,y:0,w:8,h:8}],"▉":[{x:0,y:0,w:7,h:8}],"▊":[{x:0,y:0,w:6,h:8}],"▋":[{x:0,y:0,w:5,h:8}],"▌":[{x:0,y:0,w:4,h:8}],"▍":[{x:0,y:0,w:3,h:8}],"▎":[{x:0,y:0,w:2,h:8}],"▏":[{x:0,y:0,w:1,h:8}],"▐":[{x:4,y:0,w:4,h:8}],"▔":[{x:0,y:0,w:8,h:1}],"▕":[{x:7,y:0,w:1,h:8}],"▖":[{x:0,y:4,w:4,h:4}],"▗":[{x:4,y:4,w:4,h:4}],"▘":[{x:0,y:0,w:4,h:4}],"▙":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"▚":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"▛":[{x:0,y:0,w:4,h:8},{x:4,y:0,w:4,h:4}],"▜":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"▝":[{x:4,y:0,w:4,h:4}],"▞":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"▟":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"🭰":[{x:1,y:0,w:1,h:8}],"🭱":[{x:2,y:0,w:1,h:8}],"🭲":[{x:3,y:0,w:1,h:8}],"🭳":[{x:4,y:0,w:1,h:8}],"🭴":[{x:5,y:0,w:1,h:8}],"🭵":[{x:6,y:0,w:1,h:8}],"🭶":[{x:0,y:1,w:8,h:1}],"🭷":[{x:0,y:2,w:8,h:1}],"🭸":[{x:0,y:3,w:8,h:1}],"🭹":[{x:0,y:4,w:8,h:1}],"🭺":[{x:0,y:5,w:8,h:1}],"🭻":[{x:0,y:6,w:8,h:1}],"🭼":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🭽":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭾":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭿":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🮀":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮁":[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮂":[{x:0,y:0,w:8,h:2}],"🮃":[{x:0,y:0,w:8,h:3}],"🮄":[{x:0,y:0,w:8,h:5}],"🮅":[{x:0,y:0,w:8,h:6}],"🮆":[{x:0,y:0,w:8,h:7}],"🮇":[{x:6,y:0,w:2,h:8}],"🮈":[{x:5,y:0,w:3,h:8}],"🮉":[{x:3,y:0,w:5,h:8}],"🮊":[{x:2,y:0,w:6,h:8}],"🮋":[{x:1,y:0,w:7,h:8}],"🮕":[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}],"🮖":[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}],"🮗":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};const _={"░":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"▒":[[1,0],[0,0],[0,1],[0,0]],"▓":[[0,1],[1,1],[1,0],[1,1]]};n.boxDrawingDefinitions={"─":{1:"M0,.5 L1,.5"},"━":{3:"M0,.5 L1,.5"},"│":{1:"M.5,0 L.5,1"},"┃":{3:"M.5,0 L.5,1"},"┌":{1:"M0.5,1 L.5,.5 L1,.5"},"┏":{3:"M0.5,1 L.5,.5 L1,.5"},"┐":{1:"M0,.5 L.5,.5 L.5,1"},"┓":{3:"M0,.5 L.5,.5 L.5,1"},"└":{1:"M.5,0 L.5,.5 L1,.5"},"┗":{3:"M.5,0 L.5,.5 L1,.5"},"┘":{1:"M.5,0 L.5,.5 L0,.5"},"┛":{3:"M.5,0 L.5,.5 L0,.5"},"├":{1:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┣":{3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┤":{1:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┫":{3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┬":{1:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┳":{3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┴":{1:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┻":{3:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┼":{1:"M0,.5 L1,.5 M.5,0 L.5,1"},"╋":{3:"M0,.5 L1,.5 M.5,0 L.5,1"},"╴":{1:"M.5,.5 L0,.5"},"╸":{3:"M.5,.5 L0,.5"},"╵":{1:"M.5,.5 L.5,0"},"╹":{3:"M.5,.5 L.5,0"},"╶":{1:"M.5,.5 L1,.5"},"╺":{3:"M.5,.5 L1,.5"},"╷":{1:"M.5,.5 L.5,1"},"╻":{3:"M.5,.5 L.5,1"},"═":{1:(c,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"║":{1:(c,r)=>`M${.5-c},0 L${.5-c},1 M${.5+c},0 L${.5+c},1`},"╒":{1:(c,r)=>`M.5,1 L.5,${.5-r} L1,${.5-r} M.5,${.5+r} L1,${.5+r}`},"╓":{1:(c,r)=>`M${.5-c},1 L${.5-c},.5 L1,.5 M${.5+c},.5 L${.5+c},1`},"╔":{1:(c,r)=>`M1,${.5-r} L${.5-c},${.5-r} L${.5-c},1 M1,${.5+r} L${.5+c},${.5+r} L${.5+c},1`},"╕":{1:(c,r)=>`M0,${.5-r} L.5,${.5-r} L.5,1 M0,${.5+r} L.5,${.5+r}`},"╖":{1:(c,r)=>`M${.5+c},1 L${.5+c},.5 L0,.5 M${.5-c},.5 L${.5-c},1`},"╗":{1:(c,r)=>`M0,${.5+r} L${.5-c},${.5+r} L${.5-c},1 M0,${.5-r} L${.5+c},${.5-r} L${.5+c},1`},"╘":{1:(c,r)=>`M.5,0 L.5,${.5+r} L1,${.5+r} M.5,${.5-r} L1,${.5-r}`},"╙":{1:(c,r)=>`M1,.5 L${.5-c},.5 L${.5-c},0 M${.5+c},.5 L${.5+c},0`},"╚":{1:(c,r)=>`M1,${.5-r} L${.5+c},${.5-r} L${.5+c},0 M1,${.5+r} L${.5-c},${.5+r} L${.5-c},0`},"╛":{1:(c,r)=>`M0,${.5+r} L.5,${.5+r} L.5,0 M0,${.5-r} L.5,${.5-r}`},"╜":{1:(c,r)=>`M0,.5 L${.5+c},.5 L${.5+c},0 M${.5-c},.5 L${.5-c},0`},"╝":{1:(c,r)=>`M0,${.5-r} L${.5-c},${.5-r} L${.5-c},0 M0,${.5+r} L${.5+c},${.5+r} L${.5+c},0`},"╞":{1:(c,r)=>`M.5,0 L.5,1 M.5,${.5-r} L1,${.5-r} M.5,${.5+r} L1,${.5+r}`},"╟":{1:(c,r)=>`M${.5-c},0 L${.5-c},1 M${.5+c},0 L${.5+c},1 M${.5+c},.5 L1,.5`},"╠":{1:(c,r)=>`M${.5-c},0 L${.5-c},1 M1,${.5+r} L${.5+c},${.5+r} L${.5+c},1 M1,${.5-r} L${.5+c},${.5-r} L${.5+c},0`},"╡":{1:(c,r)=>`M.5,0 L.5,1 M0,${.5-r} L.5,${.5-r} M0,${.5+r} L.5,${.5+r}`},"╢":{1:(c,r)=>`M0,.5 L${.5-c},.5 M${.5-c},0 L${.5-c},1 M${.5+c},0 L${.5+c},1`},"╣":{1:(c,r)=>`M${.5+c},0 L${.5+c},1 M0,${.5+r} L${.5-c},${.5+r} L${.5-c},1 M0,${.5-r} L${.5-c},${.5-r} L${.5-c},0`},"╤":{1:(c,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r} M.5,${.5+r} L.5,1`},"╥":{1:(c,r)=>`M0,.5 L1,.5 M${.5-c},.5 L${.5-c},1 M${.5+c},.5 L${.5+c},1`},"╦":{1:(c,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L${.5-c},${.5+r} L${.5-c},1 M1,${.5+r} L${.5+c},${.5+r} L${.5+c},1`},"╧":{1:(c,r)=>`M.5,0 L.5,${.5-r} M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"╨":{1:(c,r)=>`M0,.5 L1,.5 M${.5-c},.5 L${.5-c},0 M${.5+c},.5 L${.5+c},0`},"╩":{1:(c,r)=>`M0,${.5+r} L1,${.5+r} M0,${.5-r} L${.5-c},${.5-r} L${.5-c},0 M1,${.5-r} L${.5+c},${.5-r} L${.5+c},0`},"╪":{1:(c,r)=>`M.5,0 L.5,1 M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"╫":{1:(c,r)=>`M0,.5 L1,.5 M${.5-c},0 L${.5-c},1 M${.5+c},0 L${.5+c},1`},"╬":{1:(c,r)=>`M0,${.5+r} L${.5-c},${.5+r} L${.5-c},1 M1,${.5+r} L${.5+c},${.5+r} L${.5+c},1 M0,${.5-r} L${.5-c},${.5-r} L${.5-c},0 M1,${.5-r} L${.5+c},${.5-r} L${.5+c},0`},"╱":{1:"M1,0 L0,1"},"╲":{1:"M0,0 L1,1"},"╳":{1:"M1,0 L0,1 M0,0 L1,1"},"╼":{1:"M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"╽":{1:"M.5,.5 L.5,0",3:"M.5,.5 L.5,1"},"╾":{1:"M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"╿":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┍":{1:"M.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┎":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┑":{1:"M.5,.5 L.5,1",3:"M.5,.5 L0,.5"},"┒":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┕":{1:"M.5,.5 L.5,0",3:"M.5,.5 L1,.5"},"┖":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┙":{1:"M.5,.5 L.5,0",3:"M.5,.5 L0,.5"},"┚":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,0"},"┝":{1:"M.5,0 L.5,1",3:"M.5,.5 L1,.5"},"┞":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┟":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┠":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1"},"┡":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"┢":{1:"M.5,.5 L.5,0",3:"M0.5,1 L.5,.5 L1,.5"},"┥":{1:"M.5,0 L.5,1",3:"M.5,.5 L0,.5"},"┦":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┧":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┨":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1"},"┩":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L0,.5"},"┪":{1:"M.5,.5 L.5,0",3:"M0,.5 L.5,.5 L.5,1"},"┭":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┮":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┯":{1:"M.5,.5 L.5,1",3:"M0,.5 L1,.5"},"┰":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"┱":{1:"M.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"┲":{1:"M.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"┵":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┶":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┷":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5"},"┸":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,0"},"┹":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"┺":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,.5 L1,.5"},"┽":{1:"M.5,0 L.5,1 M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┾":{1:"M.5,0 L.5,1 M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┿":{1:"M.5,0 L.5,1",3:"M0,.5 L1,.5"},"╀":{1:"M0,.5 L1,.5 M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"╁":{1:"M.5,.5 L.5,0 M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"╂":{1:"M0,.5 L1,.5",3:"M.5,0 L.5,1"},"╃":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"╄":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"╅":{1:"M.5,0 L.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"╆":{1:"M.5,0 L.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"╇":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0 M0,.5 L1,.5"},"╈":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"╉":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"╊":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"╌":{1:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"╍":{3:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"┄":{1:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┅":{3:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┈":{1:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"┉":{3:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"╎":{1:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"╏":{3:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"┆":{1:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┇":{3:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┊":{1:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"┋":{3:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"╭":{1:(c,r)=>`M.5,1 L.5,${.5+r/.15*.5} C.5,${.5+r/.15*.5},.5,.5,1,.5`},"╮":{1:(c,r)=>`M.5,1 L.5,${.5+r/.15*.5} C.5,${.5+r/.15*.5},.5,.5,0,.5`},"╯":{1:(c,r)=>`M.5,0 L.5,${.5-r/.15*.5} C.5,${.5-r/.15*.5},.5,.5,0,.5`},"╰":{1:(c,r)=>`M.5,0 L.5,${.5-r/.15*.5} C.5,${.5-r/.15*.5},.5,.5,1,.5`}},n.powerlineDefinitions={"":{d:"M0,0 L1,.5 L0,1",type:0,rightPadding:2},"":{d:"M-1,-.5 L1,.5 L-1,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1,0 L0,.5 L1,1",type:0,leftPadding:2},"":{d:"M2,-.5 L0,.5 L2,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",type:0,rightPadding:1},"":{d:"M.2,1 C.422,1,.8,.826,.78,.5 C.8,.174,0.422,0,.2,0",type:1,rightPadding:1},"":{d:"M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",type:0,leftPadding:1},"":{d:"M.8,1 C0.578,1,0.2,.826,.22,.5 C0.2,0.174,0.578,0,0.8,0",type:1,leftPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L-.5,1.5",type:0},"":{d:"M-.5,-.5 L1.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1.5,-.5 L-.5,1.5 L1.5,1.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5 L-.5,-.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L1.5,-.5",type:0}},n.powerlineDefinitions[""]=n.powerlineDefinitions[""],n.powerlineDefinitions[""]=n.powerlineDefinitions[""],n.tryDrawCustomChar=function(c,r,h,o,l,S,x,v){const y=n.blockElementDefinitions[r];if(y)return(function(R,L,D,O,$,I){for(let P=0;P<L.length;P++){const z=L[P],M=$/8,B=I/8;R.fillRect(D+z.x*M,O+z.y*B,z.w*M,z.h*B)}})(c,y,h,o,l,S),!0;const m=_[r];if(m)return(function(R,L,D,O,$,I){let P=a.get(L);P||(P=new Map,a.set(L,P));const z=R.fillStyle;if(typeof z!="string")throw new Error(`Unexpected fillStyle type "${z}"`);let M=P.get(z);if(!M){const B=L[0].length,T=L.length,k=R.canvas.ownerDocument.createElement("canvas");k.width=B,k.height=T;const G=(0,d.throwIfFalsy)(k.getContext("2d")),K=new ImageData(B,T);let ue,le,q,N;if(z.startsWith("#"))ue=parseInt(z.slice(1,3),16),le=parseInt(z.slice(3,5),16),q=parseInt(z.slice(5,7),16),N=z.length>7&&parseInt(z.slice(7,9),16)||1;else{if(!z.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${z}" when drawing pattern glyph`);[ue,le,q,N]=z.substring(5,z.length-1).split(",").map((ie=>parseFloat(ie)))}for(let ie=0;ie<T;ie++)for(let te=0;te<B;te++)K.data[4*(ie*B+te)]=ue,K.data[4*(ie*B+te)+1]=le,K.data[4*(ie*B+te)+2]=q,K.data[4*(ie*B+te)+3]=L[ie][te]*(255*N);G.putImageData(K,0,0),M=(0,d.throwIfFalsy)(R.createPattern(k,null)),P.set(z,M)}R.fillStyle=M,R.fillRect(D,O,$,I)})(c,m,h,o,l,S),!0;const C=n.boxDrawingDefinitions[r];if(C)return(function(R,L,D,O,$,I,P){R.strokeStyle=R.fillStyle;for(const[z,M]of Object.entries(L)){let B;R.beginPath(),R.lineWidth=P*Number.parseInt(z),B=typeof M=="function"?M(.15,.15/I*$):M;for(const T of B.split(" ")){const k=T[0],G=w[k];if(!G){console.error(`Could not find drawing instructions for "${k}"`);continue}const K=T.substring(1).split(",");K[0]&&K[1]&&G(R,b(K,$,I,D,O,!0,P))}R.stroke(),R.closePath()}})(c,C,h,o,l,S,v),!0;const E=n.powerlineDefinitions[r];return!!E&&((function(R,L,D,O,$,I,P,z){const M=new Path2D;M.rect(D,O,$,I),R.clip(M),R.beginPath();const B=P/12;R.lineWidth=z*B;for(const T of L.d.split(" ")){const k=T[0],G=w[k];if(!G){console.error(`Could not find drawing instructions for "${k}"`);continue}const K=T.substring(1).split(",");K[0]&&K[1]&&G(R,b(K,$,I,D,O,!1,z,(L.leftPadding??0)*(B/2),(L.rightPadding??0)*(B/2)))}L.type===1?(R.strokeStyle=R.fillStyle,R.stroke()):R.fill(),R.closePath()})(c,E,h,o,l,S,x,v),!0)};const a=new Map;function p(c,r,h=0){return Math.max(Math.min(c,r),h)}const w={C:(c,r)=>c.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5]),L:(c,r)=>c.lineTo(r[0],r[1]),M:(c,r)=>c.moveTo(r[0],r[1])};function b(c,r,h,o,l,S,x,v=0,y=0){const m=c.map((C=>parseFloat(C)||parseInt(C)));if(m.length<2)throw new Error("Too few arguments for instruction");for(let C=0;C<m.length;C+=2)m[C]*=r-v*x-y*x,S&&m[C]!==0&&(m[C]=p(Math.round(m[C]+.5)-.5,r,0)),m[C]+=o+v*x;for(let C=1;C<m.length;C+=2)m[C]*=h,S&&m[C]!==0&&(m[C]=p(Math.round(m[C]+.5)-.5,h,0)),m[C]+=l;return m}},56:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.observeDevicePixelDimensions=void 0;const d=u(859);n.observeDevicePixelDimensions=function(_,a,p){let w=new a.ResizeObserver((b=>{const c=b.find((o=>o.target===_));if(!c)return;if(!("devicePixelContentBoxSize"in c))return w==null||w.disconnect(),void(w=void 0);const r=c.devicePixelContentBoxSize[0].inlineSize,h=c.devicePixelContentBoxSize[0].blockSize;r>0&&h>0&&p(r,h)}));try{w.observe(_,{box:["device-pixel-content-box"]})}catch{w.disconnect(),w=void 0}return(0,d.toDisposable)((()=>w==null?void 0:w.disconnect()))}},374:(j,n)=>{function u(_){return 57508<=_&&_<=57558}function d(_){return _>=128512&&_<=128591||_>=127744&&_<=128511||_>=128640&&_<=128767||_>=9728&&_<=9983||_>=9984&&_<=10175||_>=65024&&_<=65039||_>=129280&&_<=129535||_>=127462&&_<=127487}Object.defineProperty(n,"__esModule",{value:!0}),n.computeNextVariantOffset=n.createRenderDimensions=n.treatGlyphAsBackgroundColor=n.allowRescaling=n.isEmoji=n.isRestrictedPowerlineGlyph=n.isPowerlineGlyph=n.throwIfFalsy=void 0,n.throwIfFalsy=function(_){if(!_)throw new Error("value must not be falsy");return _},n.isPowerlineGlyph=u,n.isRestrictedPowerlineGlyph=function(_){return 57520<=_&&_<=57527},n.isEmoji=d,n.allowRescaling=function(_,a,p,w){return a===1&&p>Math.ceil(1.5*w)&&_!==void 0&&_>255&&!d(_)&&!u(_)&&!(function(b){return 57344<=b&&b<=63743})(_)},n.treatGlyphAsBackgroundColor=function(_){return u(_)||(function(a){return 9472<=a&&a<=9631})(_)},n.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}}}},n.computeNextVariantOffset=function(_,a,p=0){return(_-(2*Math.round(a)-p))%(2*Math.round(a))}},296:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createSelectionRenderModel=void 0;class u{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(_,a,p,w=!1){if(this.selectionStart=a,this.selectionEnd=p,!a||!p||a[0]===p[0]&&a[1]===p[1])return void this.clear();const b=_.buffers.active.ydisp,c=a[1]-b,r=p[1]-b,h=Math.max(c,0),o=Math.min(r,_.rows-1);h>=_.rows||o<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=w,this.viewportStartRow=c,this.viewportEndRow=r,this.viewportCappedStartRow=h,this.viewportCappedEndRow=o,this.startCol=a[0],this.endCol=p[0])}isCellSelected(_,a,p){return!!this.hasSelection&&(p-=_.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?a>=this.startCol&&p>=this.viewportCappedStartRow&&a<this.endCol&&p<=this.viewportCappedEndRow:a<this.startCol&&p>=this.viewportCappedStartRow&&a>=this.endCol&&p<=this.viewportCappedEndRow:p>this.viewportStartRow&&p<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&p===this.viewportStartRow&&a>=this.startCol&&a<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportEndRow&&a<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportStartRow&&a>=this.startCol)}}n.createSelectionRenderModel=function(){return new u}},509:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TextureAtlas=void 0;const d=u(237),_=u(860),a=u(374),p=u(160),w=u(345),b=u(485),c=u(385),r=u(147),h=u(855),o={texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},offset:{x:0,y:0},size:{x:0,y:0},sizeClipSpace:{x:0,y:0}};let l;class S{get pages(){return this._pages}constructor(C,E,R){this._document=C,this._config=E,this._unicodeService=R,this._didWarmUp=!1,this._cacheMap=new b.FourKeyMap,this._cacheMapCombined=new b.FourKeyMap,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new r.AttributeData,this._textureSize=512,this._onAddTextureAtlasCanvas=new w.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new w.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=y(C,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,a.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}dispose(){for(const C of this.pages)C.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const C=new c.IdleTaskQueue;for(let E=33;E<126;E++)C.enqueue((()=>{if(!this._cacheMap.get(E,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT)){const R=this._drawToCache(E,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT);this._cacheMap.set(E,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT,R)}}))}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const C of this._pages)C.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(S.maxAtlasPages&&this._pages.length>=Math.max(4,S.maxAtlasPages)){const E=this._pages.filter((P=>2*P.canvas.width<=(S.maxTextureSize||4096))).sort(((P,z)=>z.canvas.width!==P.canvas.width?z.canvas.width-P.canvas.width:z.percentageUsed-P.percentageUsed));let R=-1,L=0;for(let P=0;P<E.length;P++)if(E[P].canvas.width!==L)R=P,L=E[P].canvas.width;else if(P-R==3)break;const D=E.slice(R,R+4),O=D.map((P=>P.glyphs[0].texturePage)).sort(((P,z)=>P>z?1:-1)),$=this.pages.length-D.length,I=this._mergePages(D,$);I.version++;for(let P=O.length-1;P>=0;P--)this._deletePage(O[P]);this.pages.push(I),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(I.canvas)}const C=new x(this._document,this._textureSize);return this._pages.push(C),this._activePages.push(C),this._onAddTextureAtlasCanvas.fire(C.canvas),C}_mergePages(C,E){const R=2*C[0].canvas.width,L=new x(this._document,R,C);for(const[D,O]of C.entries()){const $=D*O.canvas.width%R,I=Math.floor(D/2)*O.canvas.height;L.ctx.drawImage(O.canvas,$,I);for(const z of O.glyphs)z.texturePage=E,z.sizeClipSpace.x=z.size.x/R,z.sizeClipSpace.y=z.size.y/R,z.texturePosition.x+=$,z.texturePosition.y+=I,z.texturePositionClipSpace.x=z.texturePosition.x/R,z.texturePositionClipSpace.y=z.texturePosition.y/R;this._onRemoveTextureAtlasCanvas.fire(O.canvas);const P=this._activePages.indexOf(O);P!==-1&&this._activePages.splice(P,1)}return L}_deletePage(C){this._pages.splice(C,1);for(let E=C;E<this._pages.length;E++){const R=this._pages[E];for(const L of R.glyphs)L.texturePage--;R.version++}}getRasterizedGlyphCombinedChar(C,E,R,L,D){return this._getFromCacheMap(this._cacheMapCombined,C,E,R,L,D)}getRasterizedGlyph(C,E,R,L,D){return this._getFromCacheMap(this._cacheMap,C,E,R,L,D)}_getFromCacheMap(C,E,R,L,D,O=!1){return l=C.get(E,R,L,D),l||(l=this._drawToCache(E,R,L,D,O),C.set(E,R,L,D,l)),l}_getColorFromAnsiIndex(C){if(C>=this._config.colors.ansi.length)throw new Error("No color found for idx "+C);return this._config.colors.ansi[C]}_getBackgroundColor(C,E,R,L){if(this._config.allowTransparency)return p.NULL_COLOR;let D;switch(C){case 16777216:case 33554432:D=this._getColorFromAnsiIndex(E);break;case 50331648:const O=r.AttributeData.toColorRGB(E);D=p.channels.toColor(O[0],O[1],O[2]);break;default:D=R?p.color.opaque(this._config.colors.foreground):this._config.colors.background}return D}_getForegroundColor(C,E,R,L,D,O,$,I,P,z){const M=this._getMinimumContrastColor(C,E,R,L,D,O,$,P,I,z);if(M)return M;let B;switch(D){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&P&&O<8&&(O+=8),B=this._getColorFromAnsiIndex(O);break;case 50331648:const T=r.AttributeData.toColorRGB(O);B=p.channels.toColor(T[0],T[1],T[2]);break;default:B=$?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(B=p.color.opaque(B)),I&&(B=p.color.multiplyOpacity(B,d.DIM_OPACITY)),B}_resolveBackgroundRgba(C,E,R){switch(C){case 16777216:case 33554432:return this._getColorFromAnsiIndex(E).rgba;case 50331648:return E<<8;default:return R?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(C,E,R,L){switch(C){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&L&&E<8&&(E+=8),this._getColorFromAnsiIndex(E).rgba;case 50331648:return E<<8;default:return R?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(C,E,R,L,D,O,$,I,P,z){if(this._config.minimumContrastRatio===1||z)return;const M=this._getContrastCache(P),B=M.getColor(C,L);if(B!==void 0)return B||void 0;const T=this._resolveBackgroundRgba(E,R,$),k=this._resolveForegroundRgba(D,O,$,I),G=p.rgba.ensureContrastRatio(T,k,this._config.minimumContrastRatio/(P?2:1));if(!G)return void M.setColor(C,L,null);const K=p.channels.toColor(G>>24&255,G>>16&255,G>>8&255);return M.setColor(C,L,K),K}_getContrastCache(C){return C?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(C,E,R,L,D=!1){const O=typeof C=="number"?String.fromCharCode(C):C,$=Math.min(this._config.deviceCellWidth*Math.max(O.length,2)+4,this._textureSize);this._tmpCanvas.width<$&&(this._tmpCanvas.width=$);const I=Math.min(this._config.deviceCellHeight+8,this._textureSize);if(this._tmpCanvas.height<I&&(this._tmpCanvas.height=I),this._tmpCtx.save(),this._workAttributeData.fg=R,this._workAttributeData.bg=E,this._workAttributeData.extended.ext=L,this._workAttributeData.isInvisible())return o;const P=!!this._workAttributeData.isBold(),z=!!this._workAttributeData.isInverse(),M=!!this._workAttributeData.isDim(),B=!!this._workAttributeData.isItalic(),T=!!this._workAttributeData.isUnderline(),k=!!this._workAttributeData.isStrikethrough(),G=!!this._workAttributeData.isOverline();let K=this._workAttributeData.getFgColor(),ue=this._workAttributeData.getFgColorMode(),le=this._workAttributeData.getBgColor(),q=this._workAttributeData.getBgColorMode();if(z){const he=K;K=le,le=he;const ge=ue;ue=q,q=ge}const N=this._getBackgroundColor(q,le,z,M);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=N.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";const ie=P?this._config.fontWeightBold:this._config.fontWeight,te=B?"italic":"";this._tmpCtx.font=`${te} ${ie} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=d.TEXT_BASELINE;const ve=O.length===1&&(0,a.isPowerlineGlyph)(O.charCodeAt(0)),fe=O.length===1&&(0,a.isRestrictedPowerlineGlyph)(O.charCodeAt(0)),Me=this._getForegroundColor(E,q,le,R,ue,K,z,M,P,(0,a.treatGlyphAsBackgroundColor)(O.charCodeAt(0)));this._tmpCtx.fillStyle=Me.css;const _e=fe?0:4;let Oe=!1;this._config.customGlyphs!==!1&&(Oe=(0,_.tryDrawCustomChar)(this._tmpCtx,O,_e,_e,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let qe,we=!ve;if(qe=typeof C=="number"?this._unicodeService.wcwidth(C):this._unicodeService.getStringCellWidth(C),T){this._tmpCtx.save();const he=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),ge=he%2==1?.5:0;if(this._tmpCtx.lineWidth=he,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())we=!1,this._tmpCtx.strokeStyle=`rgb(${r.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{we=!1;let Ie=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&Ie<8&&(Ie+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(Ie).css}this._tmpCtx.beginPath();const ze=_e,Re=Math.ceil(_e+this._config.deviceCharHeight)-ge-(D?2*he:0),_t=Re+he,Qe=Re+2*he;let it=this._workAttributeData.getUnderlineVariantOffset();for(let Ie=0;Ie<qe;Ie++){this._tmpCtx.save();const Ae=ze+Ie*this._config.deviceCellWidth,Ee=ze+(Ie+1)*this._config.deviceCellWidth,xt=Ae+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(Ae,Re),this._tmpCtx.lineTo(Ee,Re),this._tmpCtx.moveTo(Ae,Qe),this._tmpCtx.lineTo(Ee,Qe);break;case 3:const tt=he<=1?Qe:Math.ceil(_e+this._config.deviceCharHeight-he/2)-ge,vt=he<=1?Re:Math.ceil(_e+this._config.deviceCharHeight+he/2)-ge,ut=new Path2D;ut.rect(Ae,Re,this._config.deviceCellWidth,Qe-Re),this._tmpCtx.clip(ut),this._tmpCtx.moveTo(Ae-this._config.deviceCellWidth/2,_t),this._tmpCtx.bezierCurveTo(Ae-this._config.deviceCellWidth/2,vt,Ae,vt,Ae,_t),this._tmpCtx.bezierCurveTo(Ae,tt,xt,tt,xt,_t),this._tmpCtx.bezierCurveTo(xt,vt,Ee,vt,Ee,_t),this._tmpCtx.bezierCurveTo(Ee,tt,Ee+this._config.deviceCellWidth/2,tt,Ee+this._config.deviceCellWidth/2,_t);break;case 4:const Zt=it===0?0:it>=he?2*he-it:he-it;it>=he||Zt===0?(this._tmpCtx.setLineDash([Math.round(he),Math.round(he)]),this._tmpCtx.moveTo(Ae+Zt,Re),this._tmpCtx.lineTo(Ee,Re)):(this._tmpCtx.setLineDash([Math.round(he),Math.round(he)]),this._tmpCtx.moveTo(Ae,Re),this._tmpCtx.lineTo(Ae+Zt,Re),this._tmpCtx.moveTo(Ae+Zt+he,Re),this._tmpCtx.lineTo(Ee,Re)),it=(0,a.computeNextVariantOffset)(Ee-Ae,he,it);break;case 5:const er=.6,tr=.3,Ft=Ee-Ae,si=Math.floor(er*Ft),ri=Math.floor(tr*Ft),Jt=Ft-si-ri;this._tmpCtx.setLineDash([si,ri,Jt]),this._tmpCtx.moveTo(Ae,Re),this._tmpCtx.lineTo(Ee,Re);break;default:this._tmpCtx.moveTo(Ae,Re),this._tmpCtx.lineTo(Ee,Re)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!Oe&&this._config.fontSize>=12&&!this._config.allowTransparency&&O!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const Ie=this._tmpCtx.measureText(O);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in Ie&&Ie.actualBoundingBoxDescent>0){this._tmpCtx.save();const Ae=new Path2D;Ae.rect(ze,Re-Math.ceil(he/2),this._config.deviceCellWidth*qe,Qe-Re+Math.ceil(he/2)),this._tmpCtx.clip(Ae),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=N.css,this._tmpCtx.strokeText(O,_e,_e+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(G){const he=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),ge=he%2==1?.5:0;this._tmpCtx.lineWidth=he,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(_e,_e+ge),this._tmpCtx.lineTo(_e+this._config.deviceCharWidth*qe,_e+ge),this._tmpCtx.stroke()}if(Oe||this._tmpCtx.fillText(O,_e,_e+this._config.deviceCharHeight),O==="_"&&!this._config.allowTransparency){let he=v(this._tmpCtx.getImageData(_e,_e,this._config.deviceCellWidth,this._config.deviceCellHeight),N,Me,we);if(he)for(let ge=1;ge<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=N.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(O,_e,_e+this._config.deviceCharHeight-ge),he=v(this._tmpCtx.getImageData(_e,_e,this._config.deviceCellWidth,this._config.deviceCellHeight),N,Me,we),he);ge++);}if(k){const he=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),ge=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=he,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(_e,_e+Math.floor(this._config.deviceCharHeight/2)-ge),this._tmpCtx.lineTo(_e+this._config.deviceCharWidth*qe,_e+Math.floor(this._config.deviceCharHeight/2)-ge),this._tmpCtx.stroke()}this._tmpCtx.restore();const ft=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let Ot;if(Ot=this._config.allowTransparency?(function(he){for(let ge=0;ge<he.data.length;ge+=4)if(he.data[ge+3]>0)return!1;return!0})(ft):v(ft,N,Me,we),Ot)return o;const Se=this._findGlyphBoundingBox(ft,this._workBoundingBox,$,fe,Oe,_e);let pe,me;for(;;){if(this._activePages.length===0){const he=this._createNewPage();pe=he,me=he.currentRow,me.height=Se.size.y;break}pe=this._activePages[this._activePages.length-1],me=pe.currentRow;for(const he of this._activePages)Se.size.y<=he.currentRow.height&&(pe=he,me=he.currentRow);for(let he=this._activePages.length-1;he>=0;he--)for(const ge of this._activePages[he].fixedRows)ge.height<=me.height&&Se.size.y<=ge.height&&(pe=this._activePages[he],me=ge);if(me.y+Se.size.y>=pe.canvas.height||me.height>Se.size.y+2){let he=!1;if(pe.currentRow.y+pe.currentRow.height+Se.size.y>=pe.canvas.height){let ge;for(const ze of this._activePages)if(ze.currentRow.y+ze.currentRow.height+Se.size.y<ze.canvas.height){ge=ze;break}if(ge)pe=ge;else if(S.maxAtlasPages&&this._pages.length>=S.maxAtlasPages&&me.y+Se.size.y<=pe.canvas.height&&me.height>=Se.size.y&&me.x+Se.size.x<=pe.canvas.width)he=!0;else{const ze=this._createNewPage();pe=ze,me=ze.currentRow,me.height=Se.size.y,he=!0}}he||(pe.currentRow.height>0&&pe.fixedRows.push(pe.currentRow),me={x:0,y:pe.currentRow.y+pe.currentRow.height,height:Se.size.y},pe.fixedRows.push(me),pe.currentRow={x:0,y:me.y+me.height,height:0})}if(me.x+Se.size.x<=pe.canvas.width)break;me===pe.currentRow?(me.x=0,me.y+=me.height,me.height=0):pe.fixedRows.splice(pe.fixedRows.indexOf(me),1)}return Se.texturePage=this._pages.indexOf(pe),Se.texturePosition.x=me.x,Se.texturePosition.y=me.y,Se.texturePositionClipSpace.x=me.x/pe.canvas.width,Se.texturePositionClipSpace.y=me.y/pe.canvas.height,Se.sizeClipSpace.x/=pe.canvas.width,Se.sizeClipSpace.y/=pe.canvas.height,me.height=Math.max(me.height,Se.size.y),me.x+=Se.size.x,pe.ctx.putImageData(ft,Se.texturePosition.x-this._workBoundingBox.left,Se.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,Se.size.x,Se.size.y),pe.addGlyph(Se),pe.version++,Se}_findGlyphBoundingBox(C,E,R,L,D,O){E.top=0;const $=L?this._config.deviceCellHeight:this._tmpCanvas.height,I=L?this._config.deviceCellWidth:R;let P=!1;for(let z=0;z<$;z++){for(let M=0;M<I;M++){const B=z*this._tmpCanvas.width*4+4*M+3;if(C.data[B]!==0){E.top=z,P=!0;break}}if(P)break}E.left=0,P=!1;for(let z=0;z<O+I;z++){for(let M=0;M<$;M++){const B=M*this._tmpCanvas.width*4+4*z+3;if(C.data[B]!==0){E.left=z,P=!0;break}}if(P)break}E.right=I,P=!1;for(let z=O+I-1;z>=O;z--){for(let M=0;M<$;M++){const B=M*this._tmpCanvas.width*4+4*z+3;if(C.data[B]!==0){E.right=z,P=!0;break}}if(P)break}E.bottom=$,P=!1;for(let z=$-1;z>=0;z--){for(let M=0;M<I;M++){const B=z*this._tmpCanvas.width*4+4*M+3;if(C.data[B]!==0){E.bottom=z,P=!0;break}}if(P)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:E.right-E.left+1,y:E.bottom-E.top+1},sizeClipSpace:{x:E.right-E.left+1,y:E.bottom-E.top+1},offset:{x:-E.left+O+(L||D?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-E.top+O+(L||D?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}n.TextureAtlas=S;class x{get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(C){this._glyphs.push(C),this._usedPixels+=C.size.x*C.size.y}constructor(C,E,R){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],R)for(const L of R)this._glyphs.push(...L.glyphs),this._usedPixels+=L._usedPixels;this.canvas=y(C,E,E),this.ctx=(0,a.throwIfFalsy)(this.canvas.getContext("2d",{alpha:!0}))}clear(){this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.currentRow.x=0,this.currentRow.y=0,this.currentRow.height=0,this.fixedRows.length=0,this.version++}}function v(m,C,E,R){const L=C.rgba>>>24,D=C.rgba>>>16&255,O=C.rgba>>>8&255,$=E.rgba>>>24,I=E.rgba>>>16&255,P=E.rgba>>>8&255,z=Math.floor((Math.abs(L-$)+Math.abs(D-I)+Math.abs(O-P))/12);let M=!0;for(let B=0;B<m.data.length;B+=4)m.data[B]===L&&m.data[B+1]===D&&m.data[B+2]===O||R&&Math.abs(m.data[B]-L)+Math.abs(m.data[B+1]-D)+Math.abs(m.data[B+2]-O)<z?m.data[B+3]=0:M=!1;return M}function y(m,C,E){const R=m.createElement("canvas");return R.width=C,R.height=E,R}},160:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.contrastRatio=n.toPaddedHex=n.rgba=n.rgb=n.css=n.color=n.channels=n.NULL_COLOR=void 0;let u=0,d=0,_=0,a=0;var p,w,b,c,r;function h(l){const S=l.toString(16);return S.length<2?"0"+S:S}function o(l,S){return l<S?(S+.05)/(l+.05):(l+.05)/(S+.05)}n.NULL_COLOR={css:"#00000000",rgba:0},(function(l){l.toCss=function(S,x,v,y){return y!==void 0?`#${h(S)}${h(x)}${h(v)}${h(y)}`:`#${h(S)}${h(x)}${h(v)}`},l.toRgba=function(S,x,v,y=255){return(S<<24|x<<16|v<<8|y)>>>0},l.toColor=function(S,x,v,y){return{css:l.toCss(S,x,v,y),rgba:l.toRgba(S,x,v,y)}}})(p||(n.channels=p={})),(function(l){function S(x,v){return a=Math.round(255*v),[u,d,_]=r.toChannels(x.rgba),{css:p.toCss(u,d,_,a),rgba:p.toRgba(u,d,_,a)}}l.blend=function(x,v){if(a=(255&v.rgba)/255,a===1)return{css:v.css,rgba:v.rgba};const y=v.rgba>>24&255,m=v.rgba>>16&255,C=v.rgba>>8&255,E=x.rgba>>24&255,R=x.rgba>>16&255,L=x.rgba>>8&255;return u=E+Math.round((y-E)*a),d=R+Math.round((m-R)*a),_=L+Math.round((C-L)*a),{css:p.toCss(u,d,_),rgba:p.toRgba(u,d,_)}},l.isOpaque=function(x){return(255&x.rgba)==255},l.ensureContrastRatio=function(x,v,y){const m=r.ensureContrastRatio(x.rgba,v.rgba,y);if(m)return p.toColor(m>>24&255,m>>16&255,m>>8&255)},l.opaque=function(x){const v=(255|x.rgba)>>>0;return[u,d,_]=r.toChannels(v),{css:p.toCss(u,d,_),rgba:v}},l.opacity=S,l.multiplyOpacity=function(x,v){return a=255&x.rgba,S(x,a*v/255)},l.toColorRGB=function(x){return[x.rgba>>24&255,x.rgba>>16&255,x.rgba>>8&255]}})(w||(n.color=w={})),(function(l){let S,x;try{const v=document.createElement("canvas");v.width=1,v.height=1;const y=v.getContext("2d",{willReadFrequently:!0});y&&(S=y,S.globalCompositeOperation="copy",x=S.createLinearGradient(0,0,1,1))}catch{}l.toColor=function(v){if(v.match(/#[\da-f]{3,8}/i))switch(v.length){case 4:return u=parseInt(v.slice(1,2).repeat(2),16),d=parseInt(v.slice(2,3).repeat(2),16),_=parseInt(v.slice(3,4).repeat(2),16),p.toColor(u,d,_);case 5:return u=parseInt(v.slice(1,2).repeat(2),16),d=parseInt(v.slice(2,3).repeat(2),16),_=parseInt(v.slice(3,4).repeat(2),16),a=parseInt(v.slice(4,5).repeat(2),16),p.toColor(u,d,_,a);case 7:return{css:v,rgba:(parseInt(v.slice(1),16)<<8|255)>>>0};case 9:return{css:v,rgba:parseInt(v.slice(1),16)>>>0}}const y=v.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(y)return u=parseInt(y[1]),d=parseInt(y[2]),_=parseInt(y[3]),a=Math.round(255*(y[5]===void 0?1:parseFloat(y[5]))),p.toColor(u,d,_,a);if(!S||!x)throw new Error("css.toColor: Unsupported css format");if(S.fillStyle=x,S.fillStyle=v,typeof S.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(S.fillRect(0,0,1,1),[u,d,_,a]=S.getImageData(0,0,1,1).data,a!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:p.toRgba(u,d,_,a),css:v}}})(b||(n.css=b={})),(function(l){function S(x,v,y){const m=x/255,C=v/255,E=y/255;return .2126*(m<=.03928?m/12.92:Math.pow((m+.055)/1.055,2.4))+.7152*(C<=.03928?C/12.92:Math.pow((C+.055)/1.055,2.4))+.0722*(E<=.03928?E/12.92:Math.pow((E+.055)/1.055,2.4))}l.relativeLuminance=function(x){return S(x>>16&255,x>>8&255,255&x)},l.relativeLuminance2=S})(c||(n.rgb=c={})),(function(l){function S(v,y,m){const C=v>>24&255,E=v>>16&255,R=v>>8&255;let L=y>>24&255,D=y>>16&255,O=y>>8&255,$=o(c.relativeLuminance2(L,D,O),c.relativeLuminance2(C,E,R));for(;$<m&&(L>0||D>0||O>0);)L-=Math.max(0,Math.ceil(.1*L)),D-=Math.max(0,Math.ceil(.1*D)),O-=Math.max(0,Math.ceil(.1*O)),$=o(c.relativeLuminance2(L,D,O),c.relativeLuminance2(C,E,R));return(L<<24|D<<16|O<<8|255)>>>0}function x(v,y,m){const C=v>>24&255,E=v>>16&255,R=v>>8&255;let L=y>>24&255,D=y>>16&255,O=y>>8&255,$=o(c.relativeLuminance2(L,D,O),c.relativeLuminance2(C,E,R));for(;$<m&&(L<255||D<255||O<255);)L=Math.min(255,L+Math.ceil(.1*(255-L))),D=Math.min(255,D+Math.ceil(.1*(255-D))),O=Math.min(255,O+Math.ceil(.1*(255-O))),$=o(c.relativeLuminance2(L,D,O),c.relativeLuminance2(C,E,R));return(L<<24|D<<16|O<<8|255)>>>0}l.blend=function(v,y){if(a=(255&y)/255,a===1)return y;const m=y>>24&255,C=y>>16&255,E=y>>8&255,R=v>>24&255,L=v>>16&255,D=v>>8&255;return u=R+Math.round((m-R)*a),d=L+Math.round((C-L)*a),_=D+Math.round((E-D)*a),p.toRgba(u,d,_)},l.ensureContrastRatio=function(v,y,m){const C=c.relativeLuminance(v>>8),E=c.relativeLuminance(y>>8);if(o(C,E)<m){if(E<C){const D=S(v,y,m),O=o(C,c.relativeLuminance(D>>8));if(O<m){const $=x(v,y,m);return O>o(C,c.relativeLuminance($>>8))?D:$}return D}const R=x(v,y,m),L=o(C,c.relativeLuminance(R>>8));if(L<m){const D=S(v,y,m);return L>o(C,c.relativeLuminance(D>>8))?R:D}return R}},l.reduceLuminance=S,l.increaseLuminance=x,l.toChannels=function(v){return[v>>24&255,v>>16&255,v>>8&255,255&v]}})(r||(n.rgba=r={})),n.toPaddedHex=h,n.contrastRatio=o},345:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.runAndSubscribe=n.forwardEvent=n.EventEmitter=void 0,n.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=u=>(this._listeners.push(u),{dispose:()=>{if(!this._disposed){for(let d=0;d<this._listeners.length;d++)if(this._listeners[d]===u)return void this._listeners.splice(d,1)}}})),this._event}fire(u,d){const _=[];for(let a=0;a<this._listeners.length;a++)_.push(this._listeners[a]);for(let a=0;a<_.length;a++)_[a].call(void 0,u,d)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},n.forwardEvent=function(u,d){return u((_=>d.fire(_)))},n.runAndSubscribe=function(u,d){return d(void 0),u((_=>d(_)))}},859:(j,n)=>{function u(d){for(const _ of d)_.dispose();d.length=0}Object.defineProperty(n,"__esModule",{value:!0}),n.getDisposeArrayDisposable=n.disposeArray=n.toDisposable=n.MutableDisposable=n.Disposable=void 0,n.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 _=this._disposables.indexOf(d);_!==-1&&this._disposables.splice(_,1)}},n.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(d){var _;this._isDisposed||d===this._value||((_=this._value)==null||_.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}},n.toDisposable=function(d){return{dispose:d}},n.disposeArray=u,n.getDisposeArrayDisposable=function(d){return{dispose:()=>u(d)}}},485:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.FourKeyMap=n.TwoKeyMap=void 0;class u{constructor(){this._data={}}set(_,a,p){this._data[_]||(this._data[_]={}),this._data[_][a]=p}get(_,a){return this._data[_]?this._data[_][a]:void 0}clear(){this._data={}}}n.TwoKeyMap=u,n.FourKeyMap=class{constructor(){this._data=new u}set(d,_,a,p,w){this._data.get(d,_)||this._data.set(d,_,new u),this._data.get(d,_).set(a,p,w)}get(d,_,a,p){var w;return(w=this._data.get(d,_))==null?void 0:w.get(a,p)}clear(){this._data.clear()}}},399:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.isChromeOS=n.isLinux=n.isWindows=n.isIphone=n.isIpad=n.isMac=n.getSafariVersion=n.isSafari=n.isLegacyEdge=n.isFirefox=n.isNode=void 0,n.isNode=typeof process<"u"&&"title"in process;const u=n.isNode?"node":navigator.userAgent,d=n.isNode?"node":navigator.platform;n.isFirefox=u.includes("Firefox"),n.isLegacyEdge=u.includes("Edge"),n.isSafari=/^((?!chrome|android).)*safari/i.test(u),n.getSafariVersion=function(){if(!n.isSafari)return 0;const _=u.match(/Version\/(\d+)/);return _===null||_.length<2?0:parseInt(_[1])},n.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(d),n.isIpad=d==="iPad",n.isIphone=d==="iPhone",n.isWindows=["Windows","Win16","Win32","WinCE"].includes(d),n.isLinux=d.indexOf("Linux")>=0,n.isChromeOS=/\bCrOS\b/.test(u)},385:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DebouncedIdleTask=n.IdleTaskQueue=n.PriorityTaskQueue=void 0;const d=u(399);class _{constructor(){this._tasks=[],this._i=0}enqueue(w){this._tasks.push(w),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(w){this._idleCallback=void 0;let b=0,c=0,r=w.timeRemaining(),h=0;for(;this._i<this._tasks.length;){if(b=Date.now(),this._tasks[this._i]()||this._i++,b=Math.max(1,Date.now()-b),c=Math.max(b,c),h=w.timeRemaining(),1.5*c>h)return r-b<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(r-b))}ms`),void this._start();r=h}this.clear()}}class a extends _{_requestCallback(w){return setTimeout((()=>w(this._createDeadline(16))))}_cancelCallback(w){clearTimeout(w)}_createDeadline(w){const b=Date.now()+w;return{timeRemaining:()=>Math.max(0,b-Date.now())}}}n.PriorityTaskQueue=a,n.IdleTaskQueue=!d.isNode&&"requestIdleCallback"in window?class extends _{_requestCallback(p){return requestIdleCallback(p)}_cancelCallback(p){cancelIdleCallback(p)}}:a,n.DebouncedIdleTask=class{constructor(){this._queue=new n.IdleTaskQueue}set(p){this._queue.clear(),this._queue.enqueue(p)}flush(){this._queue.flush()}}},147:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ExtendedAttrs=n.AttributeData=void 0;class u{constructor(){this.fg=0,this.bg=0,this.extended=new d}static toColorRGB(a){return[a>>>16&255,a>>>8&255,255&a]}static fromColorRGB(a){return(255&a[0])<<16|(255&a[1])<<8|255&a[2]}clone(){const a=new u;return a.fg=this.fg,a.bg=this.bg,a.extended=this.extended.clone(),a}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}}n.AttributeData=u;class d{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(a){this._ext=a}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(a){this._ext&=-469762049,this._ext|=a<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(a){this._ext&=-67108864,this._ext|=67108863&a}get urlId(){return this._urlId}set urlId(a){this._urlId=a}get underlineVariantOffset(){const a=(3758096384&this._ext)>>29;return a<0?4294967288^a:a}set underlineVariantOffset(a){this._ext&=536870911,this._ext|=a<<29&3758096384}constructor(a=0,p=0){this._ext=0,this._urlId=0,this._ext=a,this._urlId=p}clone(){return new d(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}n.ExtendedAttrs=d},782:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellData=void 0;const d=u(133),_=u(855),a=u(147);class p extends a.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new a.ExtendedAttrs,this.combinedData=""}static fromCharData(b){const c=new p;return c.setFromCharData(b),c}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(b){this.fg=b[_.CHAR_DATA_ATTR_INDEX],this.bg=0;let c=!1;if(b[_.CHAR_DATA_CHAR_INDEX].length>2)c=!0;else if(b[_.CHAR_DATA_CHAR_INDEX].length===2){const r=b[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=r&&r<=56319){const h=b[_.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=h&&h<=57343?this.content=1024*(r-55296)+h-56320+65536|b[_.CHAR_DATA_WIDTH_INDEX]<<22:c=!0}else c=!0}else this.content=b[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|b[_.CHAR_DATA_WIDTH_INDEX]<<22;c&&(this.combinedData=b[_.CHAR_DATA_CHAR_INDEX],this.content=2097152|b[_.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}n.CellData=p},855:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.WHITESPACE_CELL_CODE=n.WHITESPACE_CELL_WIDTH=n.WHITESPACE_CELL_CHAR=n.NULL_CELL_CODE=n.NULL_CELL_WIDTH=n.NULL_CELL_CHAR=n.CHAR_DATA_CODE_INDEX=n.CHAR_DATA_WIDTH_INDEX=n.CHAR_DATA_CHAR_INDEX=n.CHAR_DATA_ATTR_INDEX=n.DEFAULT_EXT=n.DEFAULT_ATTR=n.DEFAULT_COLOR=void 0,n.DEFAULT_COLOR=0,n.DEFAULT_ATTR=256|n.DEFAULT_COLOR<<9,n.DEFAULT_EXT=0,n.CHAR_DATA_ATTR_INDEX=0,n.CHAR_DATA_CHAR_INDEX=1,n.CHAR_DATA_WIDTH_INDEX=2,n.CHAR_DATA_CODE_INDEX=3,n.NULL_CELL_CHAR="",n.NULL_CELL_WIDTH=1,n.NULL_CELL_CODE=0,n.WHITESPACE_CELL_CHAR=" ",n.WHITESPACE_CELL_WIDTH=1,n.WHITESPACE_CELL_CODE=32},133:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Utf8ToUtf32=n.StringToUtf32=n.utf32ToString=n.stringFromCodePoint=void 0,n.stringFromCodePoint=function(u){return u>65535?(u-=65536,String.fromCharCode(55296+(u>>10))+String.fromCharCode(u%1024+56320)):String.fromCharCode(u)},n.utf32ToString=function(u,d=0,_=u.length){let a="";for(let p=d;p<_;++p){let w=u[p];w>65535?(w-=65536,a+=String.fromCharCode(55296+(w>>10))+String.fromCharCode(w%1024+56320)):a+=String.fromCharCode(w)}return a},n.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(u,d){const _=u.length;if(!_)return 0;let a=0,p=0;if(this._interim){const w=u.charCodeAt(p++);56320<=w&&w<=57343?d[a++]=1024*(this._interim-55296)+w-56320+65536:(d[a++]=this._interim,d[a++]=w),this._interim=0}for(let w=p;w<_;++w){const b=u.charCodeAt(w);if(55296<=b&&b<=56319){if(++w>=_)return this._interim=b,a;const c=u.charCodeAt(w);56320<=c&&c<=57343?d[a++]=1024*(b-55296)+c-56320+65536:(d[a++]=b,d[a++]=c)}else b!==65279&&(d[a++]=b)}return a}},n.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(u,d){const _=u.length;if(!_)return 0;let a,p,w,b,c=0,r=0,h=0;if(this.interim[0]){let S=!1,x=this.interim[0];x&=(224&x)==192?31:(240&x)==224?15:7;let v,y=0;for(;(v=63&this.interim[++y])&&y<4;)x<<=6,x|=v;const m=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,C=m-y;for(;h<C;){if(h>=_)return 0;if(v=u[h++],(192&v)!=128){h--,S=!0;break}this.interim[y++]=v,x<<=6,x|=63&v}S||(m===2?x<128?h--:d[c++]=x:m===3?x<2048||x>=55296&&x<=57343||x===65279||(d[c++]=x):x<65536||x>1114111||(d[c++]=x)),this.interim.fill(0)}const o=_-4;let l=h;for(;l<_;){for(;!(!(l<o)||128&(a=u[l])||128&(p=u[l+1])||128&(w=u[l+2])||128&(b=u[l+3]));)d[c++]=a,d[c++]=p,d[c++]=w,d[c++]=b,l+=4;if(a=u[l++],a<128)d[c++]=a;else if((224&a)==192){if(l>=_)return this.interim[0]=a,c;if(p=u[l++],(192&p)!=128){l--;continue}if(r=(31&a)<<6|63&p,r<128){l--;continue}d[c++]=r}else if((240&a)==224){if(l>=_)return this.interim[0]=a,c;if(p=u[l++],(192&p)!=128){l--;continue}if(l>=_)return this.interim[0]=a,this.interim[1]=p,c;if(w=u[l++],(192&w)!=128){l--;continue}if(r=(15&a)<<12|(63&p)<<6|63&w,r<2048||r>=55296&&r<=57343||r===65279)continue;d[c++]=r}else if((248&a)==240){if(l>=_)return this.interim[0]=a,c;if(p=u[l++],(192&p)!=128){l--;continue}if(l>=_)return this.interim[0]=a,this.interim[1]=p,c;if(w=u[l++],(192&w)!=128){l--;continue}if(l>=_)return this.interim[0]=a,this.interim[1]=p,this.interim[2]=w,c;if(b=u[l++],(192&b)!=128){l--;continue}if(r=(7&a)<<18|(63&p)<<12|(63&w)<<6|63&b,r<65536||r>1114111)continue;d[c++]=r}}return c}}},776:function(j,n,u){var d=this&&this.__decorate||function(r,h,o,l){var S,x=arguments.length,v=x<3?h:l===null?l=Object.getOwnPropertyDescriptor(h,o):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(r,h,o,l);else for(var y=r.length-1;y>=0;y--)(S=r[y])&&(v=(x<3?S(v):x>3?S(h,o,v):S(h,o))||v);return x>3&&v&&Object.defineProperty(h,o,v),v},_=this&&this.__param||function(r,h){return function(o,l){h(o,l,r)}};Object.defineProperty(n,"__esModule",{value:!0}),n.traceCall=n.setTraceLogger=n.LogService=void 0;const a=u(859),p=u(97),w={trace:p.LogLevelEnum.TRACE,debug:p.LogLevelEnum.DEBUG,info:p.LogLevelEnum.INFO,warn:p.LogLevelEnum.WARN,error:p.LogLevelEnum.ERROR,off:p.LogLevelEnum.OFF};let b,c=n.LogService=class extends a.Disposable{get logLevel(){return this._logLevel}constructor(r){super(),this._optionsService=r,this._logLevel=p.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),b=this}_updateLogLevel(){this._logLevel=w[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(r){for(let h=0;h<r.length;h++)typeof r[h]=="function"&&(r[h]=r[h]())}_log(r,h,o){this._evalLazyOptionalParams(o),r.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+h,...o)}trace(r,...h){var o;this._logLevel<=p.LogLevelEnum.TRACE&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.trace.bind(this._optionsService.options.logger))??console.log,r,h)}debug(r,...h){var o;this._logLevel<=p.LogLevelEnum.DEBUG&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.debug.bind(this._optionsService.options.logger))??console.log,r,h)}info(r,...h){var o;this._logLevel<=p.LogLevelEnum.INFO&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.info.bind(this._optionsService.options.logger))??console.info,r,h)}warn(r,...h){var o;this._logLevel<=p.LogLevelEnum.WARN&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.warn.bind(this._optionsService.options.logger))??console.warn,r,h)}error(r,...h){var o;this._logLevel<=p.LogLevelEnum.ERROR&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.error.bind(this._optionsService.options.logger))??console.error,r,h)}};n.LogService=c=d([_(0,p.IOptionsService)],c),n.setTraceLogger=function(r){b=r},n.traceCall=function(r,h,o){if(typeof o.value!="function")throw new Error("not supported");const l=o.value;o.value=function(...S){if(b.logLevel!==p.LogLevelEnum.TRACE)return l.apply(this,S);b.trace(`GlyphRenderer#${l.name}(${S.map((v=>JSON.stringify(v))).join(", ")})`);const x=l.apply(this,S);return b.trace(`GlyphRenderer#${l.name} return`,x),x}}},726:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createDecorator=n.getServiceDependencies=n.serviceRegistry=void 0;const u="di$target",d="di$dependencies";n.serviceRegistry=new Map,n.getServiceDependencies=function(_){return _[d]||[]},n.createDecorator=function(_){if(n.serviceRegistry.has(_))return n.serviceRegistry.get(_);const a=function(p,w,b){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(c,r,h){r[u]===r?r[d].push({id:c,index:h}):(r[d]=[{id:c,index:h}],r[u]=r)})(a,p,b)};return a.toString=()=>_,n.serviceRegistry.set(_,a),a}},97:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.IDecorationService=n.IUnicodeService=n.IOscLinkService=n.IOptionsService=n.ILogService=n.LogLevelEnum=n.IInstantiationService=n.ICharsetService=n.ICoreService=n.ICoreMouseService=n.IBufferService=void 0;const d=u(726);var _;n.IBufferService=(0,d.createDecorator)("BufferService"),n.ICoreMouseService=(0,d.createDecorator)("CoreMouseService"),n.ICoreService=(0,d.createDecorator)("CoreService"),n.ICharsetService=(0,d.createDecorator)("CharsetService"),n.IInstantiationService=(0,d.createDecorator)("InstantiationService"),(function(a){a[a.TRACE=0]="TRACE",a[a.DEBUG=1]="DEBUG",a[a.INFO=2]="INFO",a[a.WARN=3]="WARN",a[a.ERROR=4]="ERROR",a[a.OFF=5]="OFF"})(_||(n.LogLevelEnum=_={})),n.ILogService=(0,d.createDecorator)("LogService"),n.IOptionsService=(0,d.createDecorator)("OptionsService"),n.IOscLinkService=(0,d.createDecorator)("OscLinkService"),n.IUnicodeService=(0,d.createDecorator)("UnicodeService"),n.IDecorationService=(0,d.createDecorator)("DecorationService")}},U={};function ee(j){var n=U[j];if(n!==void 0)return n.exports;var u=U[j]={exports:{}};return X[j].call(u.exports,u,u.exports,ee),u.exports}var ae={};return(()=>{var j=ae;Object.defineProperty(j,"__esModule",{value:!0}),j.WebglAddon=void 0;const n=ee(345),u=ee(859),d=ee(399),_=ee(666),a=ee(776);class p extends u.Disposable{constructor(b){if(d.isSafari&&(0,d.getSafariVersion)()<16){const c={antialias:!1,depth:!1,preserveDrawingBuffer:!0};if(!document.createElement("canvas").getContext("webgl2",c))throw new Error("Webgl2 is only supported on Safari 16 and above")}super(),this._preserveDrawingBuffer=b,this._onChangeTextureAtlas=this.register(new n.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new n.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new n.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this.register(new n.EventEmitter),this.onContextLoss=this._onContextLoss.event}activate(b){const c=b._core;if(!b.element)return void this.register(c.onWillOpen((()=>this.activate(b))));this._terminal=b;const r=c.coreService,h=c.optionsService,o=c,l=o._renderService,S=o._characterJoinerService,x=o._charSizeService,v=o._coreBrowserService,y=o._decorationService,m=o._logService,C=o._themeService;(0,a.setTraceLogger)(m),this._renderer=this.register(new _.WebglRenderer(b,S,x,v,r,y,h,C,this._preserveDrawingBuffer)),this.register((0,n.forwardEvent)(this._renderer.onContextLoss,this._onContextLoss)),this.register((0,n.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this.register((0,n.forwardEvent)(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this.register((0,n.forwardEvent)(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),l.setRenderer(this._renderer),this.register((0,u.toDisposable)((()=>{const E=this._terminal._core._renderService;E.setRenderer(this._terminal._core._createRenderer()),E.handleResize(b.cols,b.rows)})))}get textureAtlas(){var b;return(b=this._renderer)==null?void 0:b.textureAtlas}clearTextureAtlas(){var b;(b=this._renderer)==null||b.clearTextureAtlas()}}j.WebglAddon=p})(),ae})()))})(Oo)),Oo.exports}var tg=eg(),ko={exports:{}},Xd;function ig(){return Xd||(Xd=1,(function(F,V){(function(X,U){F.exports=U()})(self,(()=>(()=>{var X={903:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BaseRenderLayer=void 0;const d=u(274),_=u(627),a=u(237),p=u(860),w=u(374),b=u(296),c=u(345),r=u(859),h=u(399),o=u(855);class l extends r.Disposable{get canvas(){return this._canvas}get cacheCanvas(){var v;return(v=this._charAtlas)==null?void 0:v.pages[0].canvas}constructor(v,y,m,C,E,R,L,D,O,$){super(),this._terminal=v,this._container=y,this._alpha=E,this._themeService=R,this._bufferService=L,this._optionsService=D,this._decorationService=O,this._coreBrowserService=$,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._selectionModel=(0,b.createSelectionRenderModel)(),this._bitmapGenerator=[],this._charAtlasDisposable=this.register(new r.MutableDisposable),this._onAddTextureAtlasCanvas=this.register(new c.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._cellColorResolver=new d.CellColorResolver(this._terminal,this._optionsService,this._selectionModel,this._decorationService,this._coreBrowserService,this._themeService),this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add(`xterm-${m}-layer`),this._canvas.style.zIndex=C.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this._refreshCharAtlas(this._themeService.colors),this.register(this._themeService.onChangeColors((I=>{this._refreshCharAtlas(I),this.reset(),this.handleSelectionChanged(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode)}))),this.register((0,r.toDisposable)((()=>{this._canvas.remove()})))}_initCanvas(){this._ctx=(0,w.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(){}handleFocus(){}handleCursorMove(){}handleGridChanged(v,y){}handleSelectionChanged(v,y,m=!1){this._selectionModel.update(this._terminal._core,v,y,m)}_setTransparency(v){if(v===this._alpha)return;const y=this._canvas;this._alpha=v,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,y),this._refreshCharAtlas(this._themeService.colors),this.handleGridChanged(0,this._bufferService.rows-1)}_refreshCharAtlas(v){if(!(this._deviceCharWidth<=0&&this._deviceCharHeight<=0)){this._charAtlas=(0,_.acquireTextureAtlas)(this._terminal,this._optionsService.rawOptions,v,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlasDisposable.value=(0,c.forwardEvent)(this._charAtlas.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),this._charAtlas.warmUp();for(let y=0;y<this._charAtlas.pages.length;y++)this._bitmapGenerator[y]=new S(this._charAtlas.pages[y].canvas)}}resize(v){this._deviceCellWidth=v.device.cell.width,this._deviceCellHeight=v.device.cell.height,this._deviceCharWidth=v.device.char.width,this._deviceCharHeight=v.device.char.height,this._deviceCharLeft=v.device.char.left,this._deviceCharTop=v.device.char.top,this._canvas.width=v.device.canvas.width,this._canvas.height=v.device.canvas.height,this._canvas.style.width=`${v.css.canvas.width}px`,this._canvas.style.height=`${v.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(this._themeService.colors)}clearTextureAtlas(){var v;(v=this._charAtlas)==null||v.clearTexture()}_fillCells(v,y,m,C){this._ctx.fillRect(v*this._deviceCellWidth,y*this._deviceCellHeight,m*this._deviceCellWidth,C*this._deviceCellHeight)}_fillMiddleLineAtCells(v,y,m=1){const C=Math.ceil(.5*this._deviceCellHeight);this._ctx.fillRect(v*this._deviceCellWidth,(y+1)*this._deviceCellHeight-C-this._coreBrowserService.dpr,m*this._deviceCellWidth,this._coreBrowserService.dpr)}_fillBottomLineAtCells(v,y,m=1,C=0){this._ctx.fillRect(v*this._deviceCellWidth,(y+1)*this._deviceCellHeight+C-this._coreBrowserService.dpr-1,m*this._deviceCellWidth,this._coreBrowserService.dpr)}_curlyUnderlineAtCell(v,y,m=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const C=this._coreBrowserService.dpr;this._ctx.lineWidth=C;for(let E=0;E<m;E++){const R=(v+E)*this._deviceCellWidth,L=(v+E+.5)*this._deviceCellWidth,D=(v+E+1)*this._deviceCellWidth,O=(y+1)*this._deviceCellHeight-C-1,$=O-C,I=O+C;this._ctx.moveTo(R,O),this._ctx.bezierCurveTo(R,$,L,$,L,O),this._ctx.bezierCurveTo(L,I,D,I,D,O)}this._ctx.stroke(),this._ctx.restore()}_dottedUnderlineAtCell(v,y,m=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const C=this._coreBrowserService.dpr;this._ctx.lineWidth=C,this._ctx.setLineDash([2*C,C]);const E=v*this._deviceCellWidth,R=(y+1)*this._deviceCellHeight-C-1;this._ctx.moveTo(E,R);for(let L=0;L<m;L++){const D=(v+m+L)*this._deviceCellWidth;this._ctx.lineTo(D,R)}this._ctx.stroke(),this._ctx.closePath(),this._ctx.restore()}_dashedUnderlineAtCell(v,y,m=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const C=this._coreBrowserService.dpr;this._ctx.lineWidth=C,this._ctx.setLineDash([4*C,3*C]);const E=v*this._deviceCellWidth,R=(v+m)*this._deviceCellWidth,L=(y+1)*this._deviceCellHeight-C-1;this._ctx.moveTo(E,L),this._ctx.lineTo(R,L),this._ctx.stroke(),this._ctx.closePath(),this._ctx.restore()}_fillLeftLineAtCell(v,y,m){this._ctx.fillRect(v*this._deviceCellWidth,y*this._deviceCellHeight,this._coreBrowserService.dpr*m,this._deviceCellHeight)}_strokeRectAtCell(v,y,m,C){const E=this._coreBrowserService.dpr;this._ctx.lineWidth=E,this._ctx.strokeRect(v*this._deviceCellWidth+E/2,y*this._deviceCellHeight+E/2,m*this._deviceCellWidth-E,C*this._deviceCellHeight-E)}_clearAll(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))}_clearCells(v,y,m,C){this._alpha?this._ctx.clearRect(v*this._deviceCellWidth,y*this._deviceCellHeight,m*this._deviceCellWidth,C*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(v*this._deviceCellWidth,y*this._deviceCellHeight,m*this._deviceCellWidth,C*this._deviceCellHeight))}_fillCharTrueColor(v,y,m){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline=a.TEXT_BASELINE,this._clipRow(m);let C=!1;this._optionsService.rawOptions.customGlyphs!==!1&&(C=(0,p.tryDrawCustomChar)(this._ctx,v.getChars(),y*this._deviceCellWidth,m*this._deviceCellHeight,this._deviceCellWidth,this._deviceCellHeight,this._optionsService.rawOptions.fontSize,this._coreBrowserService.dpr)),C||this._ctx.fillText(v.getChars(),y*this._deviceCellWidth+this._deviceCharLeft,m*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_drawChars(v,y,m){var O,$,I,P;const C=v.getChars(),E=v.getCode(),R=v.getWidth();if(this._cellColorResolver.resolve(v,y,this._bufferService.buffer.ydisp+m,this._deviceCellWidth),!this._charAtlas)return;let L;if(L=C&&C.length>1?this._charAtlas.getRasterizedGlyphCombinedChar(C,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,!0):this._charAtlas.getRasterizedGlyph(v.getCode()||o.WHITESPACE_CELL_CODE,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,!0),!L.size.x||!L.size.y)return;this._ctx.save(),this._clipRow(m),this._bitmapGenerator[L.texturePage]&&this._charAtlas.pages[L.texturePage].canvas!==this._bitmapGenerator[L.texturePage].canvas&&(($=(O=this._bitmapGenerator[L.texturePage])==null?void 0:O.bitmap)==null||$.close(),delete this._bitmapGenerator[L.texturePage]),this._charAtlas.pages[L.texturePage].version!==((I=this._bitmapGenerator[L.texturePage])==null?void 0:I.version)&&(this._bitmapGenerator[L.texturePage]||(this._bitmapGenerator[L.texturePage]=new S(this._charAtlas.pages[L.texturePage].canvas)),this._bitmapGenerator[L.texturePage].refresh(),this._bitmapGenerator[L.texturePage].version=this._charAtlas.pages[L.texturePage].version);let D=L.size.x;this._optionsService.rawOptions.rescaleOverlappingGlyphs&&(0,w.allowRescaling)(E,R,L.size.x,this._deviceCellWidth)&&(D=this._deviceCellWidth-1),this._ctx.drawImage(((P=this._bitmapGenerator[L.texturePage])==null?void 0:P.bitmap)||this._charAtlas.pages[L.texturePage].canvas,L.texturePosition.x,L.texturePosition.y,L.size.x,L.size.y,y*this._deviceCellWidth+this._deviceCharLeft-L.offset.x,m*this._deviceCellHeight+this._deviceCharTop-L.offset.y,D,L.size.y),this._ctx.restore()}_clipRow(v){this._ctx.beginPath(),this._ctx.rect(0,v*this._deviceCellHeight,this._bufferService.cols*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(v,y){return`${y?"italic":""} ${v?this._optionsService.rawOptions.fontWeightBold:this._optionsService.rawOptions.fontWeight} ${this._optionsService.rawOptions.fontSize*this._coreBrowserService.dpr}px ${this._optionsService.rawOptions.fontFamily}`}}n.BaseRenderLayer=l;class S{get bitmap(){return this._bitmap}constructor(v){this.canvas=v,this._state=0,this._commitTimeout=void 0,this._bitmap=void 0,this.version=-1}refresh(){var v;(v=this._bitmap)==null||v.close(),this._bitmap=void 0,h.isSafari||(this._commitTimeout===void 0&&(this._commitTimeout=window.setTimeout((()=>this._generate()),100)),this._state===1&&(this._state=2))}_generate(){var v;this._state===0&&((v=this._bitmap)==null||v.close(),this._bitmap=void 0,this._state=1,window.createImageBitmap(this.canvas).then((y=>{this._state===2?this.refresh():this._bitmap=y,this._state=0})),this._commitTimeout&&(this._commitTimeout=void 0))}}},949:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CanvasRenderer=void 0;const d=u(627),_=u(56),a=u(374),p=u(345),w=u(859),b=u(873),c=u(43),r=u(630),h=u(744);class o extends w.Disposable{constructor(S,x,v,y,m,C,E,R,L,D,O){super(),this._terminal=S,this._screenElement=x,this._bufferService=y,this._charSizeService=m,this._optionsService=C,this._coreBrowserService=L,this._themeService=O,this._observerDisposable=this.register(new w.MutableDisposable),this._onRequestRedraw=this.register(new p.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onChangeTextureAtlas=this.register(new p.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new p.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event;const $=this._optionsService.rawOptions.allowTransparency;this._renderLayers=[new h.TextRenderLayer(this._terminal,this._screenElement,0,$,this._bufferService,this._optionsService,E,D,this._coreBrowserService,O),new r.SelectionRenderLayer(this._terminal,this._screenElement,1,this._bufferService,this._coreBrowserService,D,this._optionsService,O),new c.LinkRenderLayer(this._terminal,this._screenElement,2,v,this._bufferService,this._optionsService,D,this._coreBrowserService,O),new b.CursorRenderLayer(this._terminal,this._screenElement,3,this._onRequestRedraw,this._bufferService,this._optionsService,R,this._coreBrowserService,D,O)];for(const I of this._renderLayers)(0,p.forwardEvent)(I.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas);this.dimensions=(0,a.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._observerDisposable.value=(0,_.observeDevicePixelDimensions)(this._renderLayers[0].canvas,this._coreBrowserService.window,((I,P)=>this._setCanvasDevicePixelDimensions(I,P))),this.register(this._coreBrowserService.onWindowChange((I=>{this._observerDisposable.value=(0,_.observeDevicePixelDimensions)(this._renderLayers[0].canvas,I,((P,z)=>this._setCanvasDevicePixelDimensions(P,z)))}))),this.register((0,w.toDisposable)((()=>{for(const I of this._renderLayers)I.dispose();(0,d.removeTerminalFromCache)(this._terminal)})))}get textureAtlas(){return this._renderLayers[0].cacheCanvas}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._bufferService.cols,this._bufferService.rows))}handleResize(S,x){this._updateDimensions();for(const v of this._renderLayers)v.resize(this.dimensions);this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}handleCharSizeChanged(){this.handleResize(this._bufferService.cols,this._bufferService.rows)}handleBlur(){this._runOperation((S=>S.handleBlur()))}handleFocus(){this._runOperation((S=>S.handleFocus()))}handleSelectionChanged(S,x,v=!1){this._runOperation((y=>y.handleSelectionChanged(S,x,v))),this._themeService.colors.selectionForeground&&this._onRequestRedraw.fire({start:0,end:this._bufferService.rows-1})}handleCursorMove(){this._runOperation((S=>S.handleCursorMove()))}clear(){this._runOperation((S=>S.reset()))}_runOperation(S){for(const x of this._renderLayers)S(x)}renderRows(S,x){for(const v of this._renderLayers)v.handleGridChanged(S,x)}clearTextureAtlas(){for(const S of this._renderLayers)S.clearTextureAtlas()}_updateDimensions(){if(!this._charSizeService.hasValidSize)return;const S=this._coreBrowserService.dpr;this.dimensions.device.char.width=Math.floor(this._charSizeService.width*S),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*S),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=this._optionsService.rawOptions.lineHeight===1?0:Math.round((this.dimensions.device.cell.height-this.dimensions.device.char.height)/2),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.char.left=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.device.canvas.height=this._bufferService.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._bufferService.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/S),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/S),this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows,this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols}_setCanvasDevicePixelDimensions(S,x){this.dimensions.device.canvas.height=x,this.dimensions.device.canvas.width=S;for(const v of this._renderLayers)v.resize(this.dimensions);this._requestRedrawViewport()}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._bufferService.rows-1})}}n.CanvasRenderer=o},873:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CursorRenderLayer=void 0;const d=u(457),_=u(859),a=u(399),p=u(782),w=u(903);class b extends w.BaseRenderLayer{constructor(r,h,o,l,S,x,v,y,m,C){super(r,h,"cursor",o,!0,C,S,x,m,y),this._onRequestRedraw=l,this._coreService=v,this._cursorBlinkStateManager=this.register(new _.MutableDisposable),this._cell=new p.CellData,this._state={x:0,y:0,isFocused:!1,style:"",width:0},this._cursorRenderers={bar:this._renderBarCursor.bind(this),block:this._renderBlockCursor.bind(this),underline:this._renderUnderlineCursor.bind(this),outline:this._renderOutlineCursor.bind(this)},this.register(x.onOptionChange((()=>this._handleOptionsChanged()))),this._handleOptionsChanged()}resize(r){super.resize(r),this._state={x:0,y:0,isFocused:!1,style:"",width:0}}reset(){var r;this._clearCursor(),(r=this._cursorBlinkStateManager.value)==null||r.restartBlinkAnimation(),this._handleOptionsChanged()}handleBlur(){var r;(r=this._cursorBlinkStateManager.value)==null||r.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}handleFocus(){var r;(r=this._cursorBlinkStateManager.value)==null||r.resume(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}_handleOptionsChanged(){this._optionsService.rawOptions.cursorBlink?this._cursorBlinkStateManager.value||(this._cursorBlinkStateManager.value=new d.CursorBlinkStateManager((()=>this._render(!0)),this._coreBrowserService)):this._cursorBlinkStateManager.clear(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}handleCursorMove(){var r;(r=this._cursorBlinkStateManager.value)==null||r.restartBlinkAnimation()}handleGridChanged(r,h){!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isPaused?this._render(!1):this._cursorBlinkStateManager.value.restartBlinkAnimation()}_render(r){if(!this._coreService.isCursorInitialized||this._coreService.isCursorHidden)return void this._clearCursor();const h=this._bufferService.buffer.ybase+this._bufferService.buffer.y,o=h-this._bufferService.buffer.ydisp;if(o<0||o>=this._bufferService.rows)return void this._clearCursor();const l=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(h).loadCell(l,this._cell),this._cell.content!==void 0){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css;const S=this._optionsService.rawOptions.cursorStyle,x=this._optionsService.rawOptions.cursorInactiveStyle;return x&&x!=="none"&&this._cursorRenderers[x](l,o,this._cell),this._ctx.restore(),this._state.x=l,this._state.y=o,this._state.isFocused=!1,this._state.style=S,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible){if(this._state){if(this._state.x===l&&this._state.y===o&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===this._optionsService.rawOptions.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[this._optionsService.rawOptions.cursorStyle||"block"](l,o,this._cell),this._ctx.restore(),this._state.x=l,this._state.y=o,this._state.isFocused=!1,this._state.style=this._optionsService.rawOptions.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}_clearCursor(){this._state&&(a.isFirefox||this._coreBrowserService.dpr<1?this._clearAll():this._clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:0,y:0,isFocused:!1,style:"",width:0})}_renderBarCursor(r,h,o){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillLeftLineAtCell(r,h,this._optionsService.rawOptions.cursorWidth),this._ctx.restore()}_renderBlockCursor(r,h,o){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillCells(r,h,o.getWidth(),1),this._ctx.fillStyle=this._themeService.colors.cursorAccent.css,this._fillCharTrueColor(o,r,h),this._ctx.restore()}_renderUnderlineCursor(r,h,o){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillBottomLineAtCells(r,h),this._ctx.restore()}_renderOutlineCursor(r,h,o){this._ctx.save(),this._ctx.strokeStyle=this._themeService.colors.cursor.css,this._strokeRectAtCell(r,h,o.getWidth(),1),this._ctx.restore()}}n.CursorRenderLayer=b},574:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.GridCache=void 0,n.GridCache=class{constructor(){this.cache=[]}resize(u,d){for(let _=0;_<u;_++){this.cache.length<=_&&this.cache.push([]);for(let a=this.cache[_].length;a<d;a++)this.cache[_].push(void 0);this.cache[_].length=d}this.cache.length=u}clear(){for(let u=0;u<this.cache.length;u++)for(let d=0;d<this.cache[u].length;d++)this.cache[u][d]=void 0}}},43:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.LinkRenderLayer=void 0;const d=u(197),_=u(237),a=u(903);class p extends a.BaseRenderLayer{constructor(b,c,r,h,o,l,S,x,v){super(b,c,"link",r,!0,v,o,l,S,x),this.register(h.onShowLinkUnderline((y=>this._handleShowLinkUnderline(y)))),this.register(h.onHideLinkUnderline((y=>this._handleHideLinkUnderline(y))))}resize(b){super.resize(b),this._state=void 0}reset(){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);const b=this._state.y2-this._state.y1-1;b>0&&this._clearCells(0,this._state.y1+1,this._state.cols,b),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(b){if(b.fg===_.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._themeService.colors.background.css:b.fg&&(0,d.is256Color)(b.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[b.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,b.y1===b.y2)this._fillBottomLineAtCells(b.x1,b.y1,b.x2-b.x1);else{this._fillBottomLineAtCells(b.x1,b.y1,b.cols-b.x1);for(let c=b.y1+1;c<b.y2;c++)this._fillBottomLineAtCells(0,c,b.cols);this._fillBottomLineAtCells(0,b.y2,b.x2)}this._state=b}_handleHideLinkUnderline(b){this._clearCurrentLink()}}n.LinkRenderLayer=p},630:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.SelectionRenderLayer=void 0;const d=u(903);class _ extends d.BaseRenderLayer{constructor(p,w,b,c,r,h,o,l){super(p,w,"selection",b,!0,l,c,o,h,r),this._clearState()}_clearState(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}}resize(p){super.resize(p),this._selectionModel.selectionStart&&this._selectionModel.selectionEnd&&(this._clearState(),this._redrawSelection(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode))}reset(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())}handleBlur(){this.reset(),this._redrawSelection(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode)}handleFocus(){this.reset(),this._redrawSelection(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode)}handleSelectionChanged(p,w,b){super.handleSelectionChanged(p,w,b),this._redrawSelection(p,w,b)}_redrawSelection(p,w,b){if(!this._didStateChange(p,w,b,this._bufferService.buffer.ydisp))return;if(this._clearAll(),!p||!w)return void this._clearState();const c=p[1]-this._bufferService.buffer.ydisp,r=w[1]-this._bufferService.buffer.ydisp,h=Math.max(c,0),o=Math.min(r,this._bufferService.rows-1);if(h>=this._bufferService.rows||o<0)this._state.ydisp=this._bufferService.buffer.ydisp;else{if(this._ctx.fillStyle=(this._coreBrowserService.isFocused?this._themeService.colors.selectionBackgroundTransparent:this._themeService.colors.selectionInactiveBackgroundTransparent).css,b){const l=p[0],S=w[0]-l,x=o-h+1;this._fillCells(l,h,S,x)}else{const l=c===h?p[0]:0,S=h===r?w[0]:this._bufferService.cols;this._fillCells(l,h,S-l,1);const x=Math.max(o-h-1,0);if(this._fillCells(0,h+1,this._bufferService.cols,x),h!==o){const v=r===o?w[0]:this._bufferService.cols;this._fillCells(0,o,v,1)}}this._state.start=[p[0],p[1]],this._state.end=[w[0],w[1]],this._state.columnSelectMode=b,this._state.ydisp=this._bufferService.buffer.ydisp}}_didStateChange(p,w,b,c){return!this._areCoordinatesEqual(p,this._state.start)||!this._areCoordinatesEqual(w,this._state.end)||b!==this._state.columnSelectMode||c!==this._state.ydisp}_areCoordinatesEqual(p,w){return!(!p||!w)&&p[0]===w[0]&&p[1]===w[1]}}n.SelectionRenderLayer=_},744:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TextRenderLayer=void 0;const d=u(577),_=u(147),a=u(782),p=u(855),w=u(903),b=u(574);class c extends w.BaseRenderLayer{constructor(h,o,l,S,x,v,y,m,C,E){super(h,o,"text",l,S,E,x,v,m,C),this._characterJoinerService=y,this._characterWidth=0,this._characterFont="",this._characterOverlapCache={},this._workCell=new a.CellData,this._state=new b.GridCache,this.register(v.onSpecificOptionChange("allowTransparency",(R=>this._setTransparency(R))))}resize(h){super.resize(h);const o=this._getFont(!1,!1);this._characterWidth===h.device.char.width&&this._characterFont===o||(this._characterWidth=h.device.char.width,this._characterFont=o,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)}reset(){this._state.clear(),this._clearAll()}_forEachCell(h,o,l){for(let S=h;S<=o;S++){const x=S+this._bufferService.buffer.ydisp,v=this._bufferService.buffer.lines.get(x),y=this._characterJoinerService.getJoinedCharacters(x);for(let m=0;m<this._bufferService.cols;m++){v.loadCell(m,this._workCell);let C=this._workCell,E=!1,R=m;if(C.getWidth()!==0){if(y.length>0&&m===y[0][0]){E=!0;const L=y.shift();C=new d.JoinedCellData(this._workCell,v.translateToString(!0,L[0],L[1]),L[1]-L[0]),R=L[1]-1}!E&&this._isOverlapping(C)&&R<v.length-1&&v.getCodePoint(R+1)===p.NULL_CELL_CODE&&(C.content&=-12582913,C.content|=8388608),l(C,m,S),m=R}}}}_drawBackground(h,o){const l=this._ctx,S=this._bufferService.cols;let x=0,v=0,y=null;l.save(),this._forEachCell(h,o,((m,C,E)=>{let R=null;m.isInverse()?R=m.isFgDefault()?this._themeService.colors.foreground.css:m.isFgRGB()?`rgb(${_.AttributeData.toColorRGB(m.getFgColor()).join(",")})`:this._themeService.colors.ansi[m.getFgColor()].css:m.isBgRGB()?R=`rgb(${_.AttributeData.toColorRGB(m.getBgColor()).join(",")})`:m.isBgPalette()&&(R=this._themeService.colors.ansi[m.getBgColor()].css);let L=!1;this._decorationService.forEachDecorationAtCell(C,this._bufferService.buffer.ydisp+E,void 0,(D=>{D.options.layer!=="top"&&L||(D.backgroundColorRGB&&(R=D.backgroundColorRGB.css),L=D.options.layer==="top")})),y===null&&(x=C,v=E),E!==v?(l.fillStyle=y||"",this._fillCells(x,v,S-x,1),x=C,v=E):y!==R&&(l.fillStyle=y||"",this._fillCells(x,v,C-x,1),x=C,v=E),y=R})),y!==null&&(l.fillStyle=y,this._fillCells(x,v,S-x,1)),l.restore()}_drawForeground(h,o){this._forEachCell(h,o,((l,S,x)=>this._drawChars(l,S,x)))}handleGridChanged(h,o){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,h,this._bufferService.cols,o-h+1),this._drawBackground(h,o),this._drawForeground(h,o))}_isOverlapping(h){if(h.getWidth()!==1||h.getCode()<256)return!1;const o=h.getChars();if(this._characterOverlapCache.hasOwnProperty(o))return this._characterOverlapCache[o];this._ctx.save(),this._ctx.font=this._characterFont;const l=Math.floor(this._ctx.measureText(o).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[o]=l,l}}n.TextRenderLayer=c},274:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellColorResolver=void 0;const d=u(855),_=u(160),a=u(374);let p,w=0,b=0,c=!1,r=!1,h=!1,o=0;n.CellColorResolver=class{constructor(l,S,x,v,y,m){this._terminal=l,this._optionService=S,this._selectionRenderModel=x,this._decorationService=v,this._coreBrowserService=y,this._themeService=m,this.result={fg:0,bg:0,ext:0}}resolve(l,S,x,v){if(this.result.bg=l.bg,this.result.fg=l.fg,this.result.ext=268435456&l.bg?l.extended.ext:0,b=0,w=0,r=!1,c=!1,h=!1,p=this._themeService.colors,o=0,l.getCode()!==d.NULL_CELL_CODE&&l.extended.underlineStyle===4){const y=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));o=S*v%(2*Math.round(y))}if(this._decorationService.forEachDecorationAtCell(S,x,"bottom",(y=>{y.backgroundColorRGB&&(b=y.backgroundColorRGB.rgba>>8&16777215,r=!0),y.foregroundColorRGB&&(w=y.foregroundColorRGB.rgba>>8&16777215,c=!0)})),h=this._selectionRenderModel.isCellSelected(this._terminal,S,x),h){if(67108864&this.result.fg||(50331648&this.result.bg)!=0){if(67108864&this.result.fg)switch(50331648&this.result.fg){case 16777216:case 33554432:b=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:b=(16777215&this.result.fg)<<8|255;break;default:b=this._themeService.colors.foreground.rgba}else switch(50331648&this.result.bg){case 16777216:case 33554432:b=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:b=(16777215&this.result.bg)<<8|255}b=_.rgba.blend(b,4294967040&(this._coreBrowserService.isFocused?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else b=(this._coreBrowserService.isFocused?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(r=!0,p.selectionForeground&&(w=p.selectionForeground.rgba>>8&16777215,c=!0),(0,a.treatGlyphAsBackgroundColor)(l.getCode())){if(67108864&this.result.fg&&(50331648&this.result.bg)==0)w=(this._coreBrowserService.isFocused?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(67108864&this.result.fg)switch(50331648&this.result.bg){case 16777216:case 33554432:w=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:w=(16777215&this.result.bg)<<8|255}else switch(50331648&this.result.fg){case 16777216:case 33554432:w=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:w=(16777215&this.result.fg)<<8|255;break;default:w=this._themeService.colors.foreground.rgba}w=_.rgba.blend(w,4294967040&(this._coreBrowserService.isFocused?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}c=!0}}this._decorationService.forEachDecorationAtCell(S,x,"top",(y=>{y.backgroundColorRGB&&(b=y.backgroundColorRGB.rgba>>8&16777215,r=!0),y.foregroundColorRGB&&(w=y.foregroundColorRGB.rgba>>8&16777215,c=!0)})),r&&(b=h?-16777216&l.bg&-134217729|b|50331648:-16777216&l.bg|b|50331648),c&&(w=-16777216&l.fg&-67108865|w|50331648),67108864&this.result.fg&&(r&&!c&&(w=(50331648&this.result.bg)==0?-134217728&this.result.fg|16777215&p.background.rgba>>8|50331648:-134217728&this.result.fg|67108863&this.result.bg,c=!0),!r&&c&&(b=(50331648&this.result.fg)==0?-67108864&this.result.bg|16777215&p.foreground.rgba>>8|50331648:-67108864&this.result.bg|67108863&this.result.fg,r=!0)),p=void 0,this.result.bg=r?b:this.result.bg,this.result.fg=c?w:this.result.fg,this.result.ext&=536870911,this.result.ext|=o<<29&3758096384}}},627:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.removeTerminalFromCache=n.acquireTextureAtlas=void 0;const d=u(509),_=u(197),a=[];n.acquireTextureAtlas=function(p,w,b,c,r,h,o,l){const S=(0,_.generateConfig)(c,r,h,o,w,b,l);for(let y=0;y<a.length;y++){const m=a[y],C=m.ownedBy.indexOf(p);if(C>=0){if((0,_.configEquals)(m.config,S))return m.atlas;m.ownedBy.length===1?(m.atlas.dispose(),a.splice(y,1)):m.ownedBy.splice(C,1);break}}for(let y=0;y<a.length;y++){const m=a[y];if((0,_.configEquals)(m.config,S))return m.ownedBy.push(p),m.atlas}const x=p._core,v={atlas:new d.TextureAtlas(document,S,x.unicodeService),config:S,ownedBy:[p]};return a.push(v),v.atlas},n.removeTerminalFromCache=function(p){for(let w=0;w<a.length;w++){const b=a[w].ownedBy.indexOf(p);if(b!==-1){a[w].ownedBy.length===1?(a[w].atlas.dispose(),a.splice(w,1)):a[w].ownedBy.splice(b,1);break}}}},197:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.is256Color=n.configEquals=n.generateConfig=void 0;const d=u(160);n.generateConfig=function(_,a,p,w,b,c,r){const h={foreground:c.foreground,background:c.background,cursor:d.NULL_COLOR,cursorAccent:d.NULL_COLOR,selectionForeground:d.NULL_COLOR,selectionBackgroundTransparent:d.NULL_COLOR,selectionBackgroundOpaque:d.NULL_COLOR,selectionInactiveBackgroundTransparent:d.NULL_COLOR,selectionInactiveBackgroundOpaque:d.NULL_COLOR,ansi:c.ansi.slice(),contrastCache:c.contrastCache,halfContrastCache:c.halfContrastCache};return{customGlyphs:b.customGlyphs,devicePixelRatio:r,letterSpacing:b.letterSpacing,lineHeight:b.lineHeight,deviceCellWidth:_,deviceCellHeight:a,deviceCharWidth:p,deviceCharHeight:w,fontFamily:b.fontFamily,fontSize:b.fontSize,fontWeight:b.fontWeight,fontWeightBold:b.fontWeightBold,allowTransparency:b.allowTransparency,drawBoldTextInBrightColors:b.drawBoldTextInBrightColors,minimumContrastRatio:b.minimumContrastRatio,colors:h}},n.configEquals=function(_,a){for(let p=0;p<_.colors.ansi.length;p++)if(_.colors.ansi[p].rgba!==a.colors.ansi[p].rgba)return!1;return _.devicePixelRatio===a.devicePixelRatio&&_.customGlyphs===a.customGlyphs&&_.lineHeight===a.lineHeight&&_.letterSpacing===a.letterSpacing&&_.fontFamily===a.fontFamily&&_.fontSize===a.fontSize&&_.fontWeight===a.fontWeight&&_.fontWeightBold===a.fontWeightBold&&_.allowTransparency===a.allowTransparency&&_.deviceCharWidth===a.deviceCharWidth&&_.deviceCharHeight===a.deviceCharHeight&&_.drawBoldTextInBrightColors===a.drawBoldTextInBrightColors&&_.minimumContrastRatio===a.minimumContrastRatio&&_.colors.foreground.rgba===a.colors.foreground.rgba&&_.colors.background.rgba===a.colors.background.rgba},n.is256Color=function(_){return(50331648&_)==16777216||(50331648&_)==33554432}},237:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TEXT_BASELINE=n.DIM_OPACITY=n.INVERTED_DEFAULT_COLOR=void 0;const d=u(399);n.INVERTED_DEFAULT_COLOR=257,n.DIM_OPACITY=.5,n.TEXT_BASELINE=d.isFirefox||d.isLegacyEdge?"bottom":"ideographic"},457:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CursorBlinkStateManager=void 0,n.CursorBlinkStateManager=class{constructor(u,d){this._renderCallback=u,this._coreBrowserService=d,this.isCursorVisible=!0,this._coreBrowserService.isFocused&&this._restartInterval()}get isPaused(){return!(this._blinkStartTimeout||this._blinkInterval)}dispose(){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}restartBlinkAnimation(){this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0}))))}_restartInterval(u=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout((()=>{if(this._animationTimeRestarted){const d=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,d>0)return void this._restartInterval(d)}this.isCursorVisible=!1,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0})),this._blinkInterval=this._coreBrowserService.window.setInterval((()=>{if(this._animationTimeRestarted){const d=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(d)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0}))}),600)}),u)}pause(){this.isCursorVisible=!0,this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}resume(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()}}},860:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.tryDrawCustomChar=n.powerlineDefinitions=n.boxDrawingDefinitions=n.blockElementDefinitions=void 0;const d=u(374);n.blockElementDefinitions={"▀":[{x:0,y:0,w:8,h:4}],"▁":[{x:0,y:7,w:8,h:1}],"▂":[{x:0,y:6,w:8,h:2}],"▃":[{x:0,y:5,w:8,h:3}],"▄":[{x:0,y:4,w:8,h:4}],"▅":[{x:0,y:3,w:8,h:5}],"▆":[{x:0,y:2,w:8,h:6}],"▇":[{x:0,y:1,w:8,h:7}],"█":[{x:0,y:0,w:8,h:8}],"▉":[{x:0,y:0,w:7,h:8}],"▊":[{x:0,y:0,w:6,h:8}],"▋":[{x:0,y:0,w:5,h:8}],"▌":[{x:0,y:0,w:4,h:8}],"▍":[{x:0,y:0,w:3,h:8}],"▎":[{x:0,y:0,w:2,h:8}],"▏":[{x:0,y:0,w:1,h:8}],"▐":[{x:4,y:0,w:4,h:8}],"▔":[{x:0,y:0,w:8,h:1}],"▕":[{x:7,y:0,w:1,h:8}],"▖":[{x:0,y:4,w:4,h:4}],"▗":[{x:4,y:4,w:4,h:4}],"▘":[{x:0,y:0,w:4,h:4}],"▙":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"▚":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"▛":[{x:0,y:0,w:4,h:8},{x:4,y:0,w:4,h:4}],"▜":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"▝":[{x:4,y:0,w:4,h:4}],"▞":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"▟":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"🭰":[{x:1,y:0,w:1,h:8}],"🭱":[{x:2,y:0,w:1,h:8}],"🭲":[{x:3,y:0,w:1,h:8}],"🭳":[{x:4,y:0,w:1,h:8}],"🭴":[{x:5,y:0,w:1,h:8}],"🭵":[{x:6,y:0,w:1,h:8}],"🭶":[{x:0,y:1,w:8,h:1}],"🭷":[{x:0,y:2,w:8,h:1}],"🭸":[{x:0,y:3,w:8,h:1}],"🭹":[{x:0,y:4,w:8,h:1}],"🭺":[{x:0,y:5,w:8,h:1}],"🭻":[{x:0,y:6,w:8,h:1}],"🭼":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🭽":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭾":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭿":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🮀":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮁":[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮂":[{x:0,y:0,w:8,h:2}],"🮃":[{x:0,y:0,w:8,h:3}],"🮄":[{x:0,y:0,w:8,h:5}],"🮅":[{x:0,y:0,w:8,h:6}],"🮆":[{x:0,y:0,w:8,h:7}],"🮇":[{x:6,y:0,w:2,h:8}],"🮈":[{x:5,y:0,w:3,h:8}],"🮉":[{x:3,y:0,w:5,h:8}],"🮊":[{x:2,y:0,w:6,h:8}],"🮋":[{x:1,y:0,w:7,h:8}],"🮕":[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}],"🮖":[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}],"🮗":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};const _={"░":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"▒":[[1,0],[0,0],[0,1],[0,0]],"▓":[[0,1],[1,1],[1,0],[1,1]]};n.boxDrawingDefinitions={"─":{1:"M0,.5 L1,.5"},"━":{3:"M0,.5 L1,.5"},"│":{1:"M.5,0 L.5,1"},"┃":{3:"M.5,0 L.5,1"},"┌":{1:"M0.5,1 L.5,.5 L1,.5"},"┏":{3:"M0.5,1 L.5,.5 L1,.5"},"┐":{1:"M0,.5 L.5,.5 L.5,1"},"┓":{3:"M0,.5 L.5,.5 L.5,1"},"└":{1:"M.5,0 L.5,.5 L1,.5"},"┗":{3:"M.5,0 L.5,.5 L1,.5"},"┘":{1:"M.5,0 L.5,.5 L0,.5"},"┛":{3:"M.5,0 L.5,.5 L0,.5"},"├":{1:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┣":{3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┤":{1:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┫":{3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┬":{1:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┳":{3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┴":{1:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┻":{3:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┼":{1:"M0,.5 L1,.5 M.5,0 L.5,1"},"╋":{3:"M0,.5 L1,.5 M.5,0 L.5,1"},"╴":{1:"M.5,.5 L0,.5"},"╸":{3:"M.5,.5 L0,.5"},"╵":{1:"M.5,.5 L.5,0"},"╹":{3:"M.5,.5 L.5,0"},"╶":{1:"M.5,.5 L1,.5"},"╺":{3:"M.5,.5 L1,.5"},"╷":{1:"M.5,.5 L.5,1"},"╻":{3:"M.5,.5 L.5,1"},"═":{1:(c,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"║":{1:(c,r)=>`M${.5-c},0 L${.5-c},1 M${.5+c},0 L${.5+c},1`},"╒":{1:(c,r)=>`M.5,1 L.5,${.5-r} L1,${.5-r} M.5,${.5+r} L1,${.5+r}`},"╓":{1:(c,r)=>`M${.5-c},1 L${.5-c},.5 L1,.5 M${.5+c},.5 L${.5+c},1`},"╔":{1:(c,r)=>`M1,${.5-r} L${.5-c},${.5-r} L${.5-c},1 M1,${.5+r} L${.5+c},${.5+r} L${.5+c},1`},"╕":{1:(c,r)=>`M0,${.5-r} L.5,${.5-r} L.5,1 M0,${.5+r} L.5,${.5+r}`},"╖":{1:(c,r)=>`M${.5+c},1 L${.5+c},.5 L0,.5 M${.5-c},.5 L${.5-c},1`},"╗":{1:(c,r)=>`M0,${.5+r} L${.5-c},${.5+r} L${.5-c},1 M0,${.5-r} L${.5+c},${.5-r} L${.5+c},1`},"╘":{1:(c,r)=>`M.5,0 L.5,${.5+r} L1,${.5+r} M.5,${.5-r} L1,${.5-r}`},"╙":{1:(c,r)=>`M1,.5 L${.5-c},.5 L${.5-c},0 M${.5+c},.5 L${.5+c},0`},"╚":{1:(c,r)=>`M1,${.5-r} L${.5+c},${.5-r} L${.5+c},0 M1,${.5+r} L${.5-c},${.5+r} L${.5-c},0`},"╛":{1:(c,r)=>`M0,${.5+r} L.5,${.5+r} L.5,0 M0,${.5-r} L.5,${.5-r}`},"╜":{1:(c,r)=>`M0,.5 L${.5+c},.5 L${.5+c},0 M${.5-c},.5 L${.5-c},0`},"╝":{1:(c,r)=>`M0,${.5-r} L${.5-c},${.5-r} L${.5-c},0 M0,${.5+r} L${.5+c},${.5+r} L${.5+c},0`},"╞":{1:(c,r)=>`M.5,0 L.5,1 M.5,${.5-r} L1,${.5-r} M.5,${.5+r} L1,${.5+r}`},"╟":{1:(c,r)=>`M${.5-c},0 L${.5-c},1 M${.5+c},0 L${.5+c},1 M${.5+c},.5 L1,.5`},"╠":{1:(c,r)=>`M${.5-c},0 L${.5-c},1 M1,${.5+r} L${.5+c},${.5+r} L${.5+c},1 M1,${.5-r} L${.5+c},${.5-r} L${.5+c},0`},"╡":{1:(c,r)=>`M.5,0 L.5,1 M0,${.5-r} L.5,${.5-r} M0,${.5+r} L.5,${.5+r}`},"╢":{1:(c,r)=>`M0,.5 L${.5-c},.5 M${.5-c},0 L${.5-c},1 M${.5+c},0 L${.5+c},1`},"╣":{1:(c,r)=>`M${.5+c},0 L${.5+c},1 M0,${.5+r} L${.5-c},${.5+r} L${.5-c},1 M0,${.5-r} L${.5-c},${.5-r} L${.5-c},0`},"╤":{1:(c,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r} M.5,${.5+r} L.5,1`},"╥":{1:(c,r)=>`M0,.5 L1,.5 M${.5-c},.5 L${.5-c},1 M${.5+c},.5 L${.5+c},1`},"╦":{1:(c,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L${.5-c},${.5+r} L${.5-c},1 M1,${.5+r} L${.5+c},${.5+r} L${.5+c},1`},"╧":{1:(c,r)=>`M.5,0 L.5,${.5-r} M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"╨":{1:(c,r)=>`M0,.5 L1,.5 M${.5-c},.5 L${.5-c},0 M${.5+c},.5 L${.5+c},0`},"╩":{1:(c,r)=>`M0,${.5+r} L1,${.5+r} M0,${.5-r} L${.5-c},${.5-r} L${.5-c},0 M1,${.5-r} L${.5+c},${.5-r} L${.5+c},0`},"╪":{1:(c,r)=>`M.5,0 L.5,1 M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"╫":{1:(c,r)=>`M0,.5 L1,.5 M${.5-c},0 L${.5-c},1 M${.5+c},0 L${.5+c},1`},"╬":{1:(c,r)=>`M0,${.5+r} L${.5-c},${.5+r} L${.5-c},1 M1,${.5+r} L${.5+c},${.5+r} L${.5+c},1 M0,${.5-r} L${.5-c},${.5-r} L${.5-c},0 M1,${.5-r} L${.5+c},${.5-r} L${.5+c},0`},"╱":{1:"M1,0 L0,1"},"╲":{1:"M0,0 L1,1"},"╳":{1:"M1,0 L0,1 M0,0 L1,1"},"╼":{1:"M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"╽":{1:"M.5,.5 L.5,0",3:"M.5,.5 L.5,1"},"╾":{1:"M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"╿":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┍":{1:"M.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┎":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┑":{1:"M.5,.5 L.5,1",3:"M.5,.5 L0,.5"},"┒":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┕":{1:"M.5,.5 L.5,0",3:"M.5,.5 L1,.5"},"┖":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┙":{1:"M.5,.5 L.5,0",3:"M.5,.5 L0,.5"},"┚":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,0"},"┝":{1:"M.5,0 L.5,1",3:"M.5,.5 L1,.5"},"┞":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┟":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┠":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1"},"┡":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"┢":{1:"M.5,.5 L.5,0",3:"M0.5,1 L.5,.5 L1,.5"},"┥":{1:"M.5,0 L.5,1",3:"M.5,.5 L0,.5"},"┦":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┧":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┨":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1"},"┩":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L0,.5"},"┪":{1:"M.5,.5 L.5,0",3:"M0,.5 L.5,.5 L.5,1"},"┭":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┮":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┯":{1:"M.5,.5 L.5,1",3:"M0,.5 L1,.5"},"┰":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"┱":{1:"M.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"┲":{1:"M.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"┵":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┶":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┷":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5"},"┸":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,0"},"┹":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"┺":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,.5 L1,.5"},"┽":{1:"M.5,0 L.5,1 M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┾":{1:"M.5,0 L.5,1 M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┿":{1:"M.5,0 L.5,1",3:"M0,.5 L1,.5"},"╀":{1:"M0,.5 L1,.5 M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"╁":{1:"M.5,.5 L.5,0 M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"╂":{1:"M0,.5 L1,.5",3:"M.5,0 L.5,1"},"╃":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"╄":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"╅":{1:"M.5,0 L.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"╆":{1:"M.5,0 L.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"╇":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0 M0,.5 L1,.5"},"╈":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"╉":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"╊":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"╌":{1:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"╍":{3:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"┄":{1:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┅":{3:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┈":{1:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"┉":{3:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"╎":{1:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"╏":{3:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"┆":{1:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┇":{3:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┊":{1:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"┋":{3:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"╭":{1:(c,r)=>`M.5,1 L.5,${.5+r/.15*.5} C.5,${.5+r/.15*.5},.5,.5,1,.5`},"╮":{1:(c,r)=>`M.5,1 L.5,${.5+r/.15*.5} C.5,${.5+r/.15*.5},.5,.5,0,.5`},"╯":{1:(c,r)=>`M.5,0 L.5,${.5-r/.15*.5} C.5,${.5-r/.15*.5},.5,.5,0,.5`},"╰":{1:(c,r)=>`M.5,0 L.5,${.5-r/.15*.5} C.5,${.5-r/.15*.5},.5,.5,1,.5`}},n.powerlineDefinitions={"":{d:"M0,0 L1,.5 L0,1",type:0,rightPadding:2},"":{d:"M-1,-.5 L1,.5 L-1,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1,0 L0,.5 L1,1",type:0,leftPadding:2},"":{d:"M2,-.5 L0,.5 L2,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",type:0,rightPadding:1},"":{d:"M.2,1 C.422,1,.8,.826,.78,.5 C.8,.174,0.422,0,.2,0",type:1,rightPadding:1},"":{d:"M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",type:0,leftPadding:1},"":{d:"M.8,1 C0.578,1,0.2,.826,.22,.5 C0.2,0.174,0.578,0,0.8,0",type:1,leftPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L-.5,1.5",type:0},"":{d:"M-.5,-.5 L1.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1.5,-.5 L-.5,1.5 L1.5,1.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5 L-.5,-.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L1.5,-.5",type:0}},n.powerlineDefinitions[""]=n.powerlineDefinitions[""],n.powerlineDefinitions[""]=n.powerlineDefinitions[""],n.tryDrawCustomChar=function(c,r,h,o,l,S,x,v){const y=n.blockElementDefinitions[r];if(y)return(function(R,L,D,O,$,I){for(let P=0;P<L.length;P++){const z=L[P],M=$/8,B=I/8;R.fillRect(D+z.x*M,O+z.y*B,z.w*M,z.h*B)}})(c,y,h,o,l,S),!0;const m=_[r];if(m)return(function(R,L,D,O,$,I){let P=a.get(L);P||(P=new Map,a.set(L,P));const z=R.fillStyle;if(typeof z!="string")throw new Error(`Unexpected fillStyle type "${z}"`);let M=P.get(z);if(!M){const B=L[0].length,T=L.length,k=R.canvas.ownerDocument.createElement("canvas");k.width=B,k.height=T;const G=(0,d.throwIfFalsy)(k.getContext("2d")),K=new ImageData(B,T);let ue,le,q,N;if(z.startsWith("#"))ue=parseInt(z.slice(1,3),16),le=parseInt(z.slice(3,5),16),q=parseInt(z.slice(5,7),16),N=z.length>7&&parseInt(z.slice(7,9),16)||1;else{if(!z.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${z}" when drawing pattern glyph`);[ue,le,q,N]=z.substring(5,z.length-1).split(",").map((ie=>parseFloat(ie)))}for(let ie=0;ie<T;ie++)for(let te=0;te<B;te++)K.data[4*(ie*B+te)]=ue,K.data[4*(ie*B+te)+1]=le,K.data[4*(ie*B+te)+2]=q,K.data[4*(ie*B+te)+3]=L[ie][te]*(255*N);G.putImageData(K,0,0),M=(0,d.throwIfFalsy)(R.createPattern(k,null)),P.set(z,M)}R.fillStyle=M,R.fillRect(D,O,$,I)})(c,m,h,o,l,S),!0;const C=n.boxDrawingDefinitions[r];if(C)return(function(R,L,D,O,$,I,P){R.strokeStyle=R.fillStyle;for(const[z,M]of Object.entries(L)){let B;R.beginPath(),R.lineWidth=P*Number.parseInt(z),B=typeof M=="function"?M(.15,.15/I*$):M;for(const T of B.split(" ")){const k=T[0],G=w[k];if(!G){console.error(`Could not find drawing instructions for "${k}"`);continue}const K=T.substring(1).split(",");K[0]&&K[1]&&G(R,b(K,$,I,D,O,!0,P))}R.stroke(),R.closePath()}})(c,C,h,o,l,S,v),!0;const E=n.powerlineDefinitions[r];return!!E&&((function(R,L,D,O,$,I,P,z){const M=new Path2D;M.rect(D,O,$,I),R.clip(M),R.beginPath();const B=P/12;R.lineWidth=z*B;for(const T of L.d.split(" ")){const k=T[0],G=w[k];if(!G){console.error(`Could not find drawing instructions for "${k}"`);continue}const K=T.substring(1).split(",");K[0]&&K[1]&&G(R,b(K,$,I,D,O,!1,z,(L.leftPadding??0)*(B/2),(L.rightPadding??0)*(B/2)))}L.type===1?(R.strokeStyle=R.fillStyle,R.stroke()):R.fill(),R.closePath()})(c,E,h,o,l,S,x,v),!0)};const a=new Map;function p(c,r,h=0){return Math.max(Math.min(c,r),h)}const w={C:(c,r)=>c.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5]),L:(c,r)=>c.lineTo(r[0],r[1]),M:(c,r)=>c.moveTo(r[0],r[1])};function b(c,r,h,o,l,S,x,v=0,y=0){const m=c.map((C=>parseFloat(C)||parseInt(C)));if(m.length<2)throw new Error("Too few arguments for instruction");for(let C=0;C<m.length;C+=2)m[C]*=r-v*x-y*x,S&&m[C]!==0&&(m[C]=p(Math.round(m[C]+.5)-.5,r,0)),m[C]+=o+v*x;for(let C=1;C<m.length;C+=2)m[C]*=h,S&&m[C]!==0&&(m[C]=p(Math.round(m[C]+.5)-.5,h,0)),m[C]+=l;return m}},56:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.observeDevicePixelDimensions=void 0;const d=u(859);n.observeDevicePixelDimensions=function(_,a,p){let w=new a.ResizeObserver((b=>{const c=b.find((o=>o.target===_));if(!c)return;if(!("devicePixelContentBoxSize"in c))return w==null||w.disconnect(),void(w=void 0);const r=c.devicePixelContentBoxSize[0].inlineSize,h=c.devicePixelContentBoxSize[0].blockSize;r>0&&h>0&&p(r,h)}));try{w.observe(_,{box:["device-pixel-content-box"]})}catch{w.disconnect(),w=void 0}return(0,d.toDisposable)((()=>w==null?void 0:w.disconnect()))}},374:(j,n)=>{function u(_){return 57508<=_&&_<=57558}function d(_){return _>=128512&&_<=128591||_>=127744&&_<=128511||_>=128640&&_<=128767||_>=9728&&_<=9983||_>=9984&&_<=10175||_>=65024&&_<=65039||_>=129280&&_<=129535||_>=127462&&_<=127487}Object.defineProperty(n,"__esModule",{value:!0}),n.computeNextVariantOffset=n.createRenderDimensions=n.treatGlyphAsBackgroundColor=n.allowRescaling=n.isEmoji=n.isRestrictedPowerlineGlyph=n.isPowerlineGlyph=n.throwIfFalsy=void 0,n.throwIfFalsy=function(_){if(!_)throw new Error("value must not be falsy");return _},n.isPowerlineGlyph=u,n.isRestrictedPowerlineGlyph=function(_){return 57520<=_&&_<=57527},n.isEmoji=d,n.allowRescaling=function(_,a,p,w){return a===1&&p>Math.ceil(1.5*w)&&_!==void 0&&_>255&&!d(_)&&!u(_)&&!(function(b){return 57344<=b&&b<=63743})(_)},n.treatGlyphAsBackgroundColor=function(_){return u(_)||(function(a){return 9472<=a&&a<=9631})(_)},n.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}}}},n.computeNextVariantOffset=function(_,a,p=0){return(_-(2*Math.round(a)-p))%(2*Math.round(a))}},296:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createSelectionRenderModel=void 0;class u{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(_,a,p,w=!1){if(this.selectionStart=a,this.selectionEnd=p,!a||!p||a[0]===p[0]&&a[1]===p[1])return void this.clear();const b=_.buffers.active.ydisp,c=a[1]-b,r=p[1]-b,h=Math.max(c,0),o=Math.min(r,_.rows-1);h>=_.rows||o<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=w,this.viewportStartRow=c,this.viewportEndRow=r,this.viewportCappedStartRow=h,this.viewportCappedEndRow=o,this.startCol=a[0],this.endCol=p[0])}isCellSelected(_,a,p){return!!this.hasSelection&&(p-=_.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?a>=this.startCol&&p>=this.viewportCappedStartRow&&a<this.endCol&&p<=this.viewportCappedEndRow:a<this.startCol&&p>=this.viewportCappedStartRow&&a>=this.endCol&&p<=this.viewportCappedEndRow:p>this.viewportStartRow&&p<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&p===this.viewportStartRow&&a>=this.startCol&&a<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportEndRow&&a<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportStartRow&&a>=this.startCol)}}n.createSelectionRenderModel=function(){return new u}},509:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TextureAtlas=void 0;const d=u(237),_=u(860),a=u(374),p=u(160),w=u(345),b=u(485),c=u(385),r=u(147),h=u(855),o={texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},offset:{x:0,y:0},size:{x:0,y:0},sizeClipSpace:{x:0,y:0}};let l;class S{get pages(){return this._pages}constructor(C,E,R){this._document=C,this._config=E,this._unicodeService=R,this._didWarmUp=!1,this._cacheMap=new b.FourKeyMap,this._cacheMapCombined=new b.FourKeyMap,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new r.AttributeData,this._textureSize=512,this._onAddTextureAtlasCanvas=new w.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new w.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=y(C,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,a.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}dispose(){for(const C of this.pages)C.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const C=new c.IdleTaskQueue;for(let E=33;E<126;E++)C.enqueue((()=>{if(!this._cacheMap.get(E,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT)){const R=this._drawToCache(E,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT);this._cacheMap.set(E,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT,R)}}))}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const C of this._pages)C.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(S.maxAtlasPages&&this._pages.length>=Math.max(4,S.maxAtlasPages)){const E=this._pages.filter((P=>2*P.canvas.width<=(S.maxTextureSize||4096))).sort(((P,z)=>z.canvas.width!==P.canvas.width?z.canvas.width-P.canvas.width:z.percentageUsed-P.percentageUsed));let R=-1,L=0;for(let P=0;P<E.length;P++)if(E[P].canvas.width!==L)R=P,L=E[P].canvas.width;else if(P-R==3)break;const D=E.slice(R,R+4),O=D.map((P=>P.glyphs[0].texturePage)).sort(((P,z)=>P>z?1:-1)),$=this.pages.length-D.length,I=this._mergePages(D,$);I.version++;for(let P=O.length-1;P>=0;P--)this._deletePage(O[P]);this.pages.push(I),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(I.canvas)}const C=new x(this._document,this._textureSize);return this._pages.push(C),this._activePages.push(C),this._onAddTextureAtlasCanvas.fire(C.canvas),C}_mergePages(C,E){const R=2*C[0].canvas.width,L=new x(this._document,R,C);for(const[D,O]of C.entries()){const $=D*O.canvas.width%R,I=Math.floor(D/2)*O.canvas.height;L.ctx.drawImage(O.canvas,$,I);for(const z of O.glyphs)z.texturePage=E,z.sizeClipSpace.x=z.size.x/R,z.sizeClipSpace.y=z.size.y/R,z.texturePosition.x+=$,z.texturePosition.y+=I,z.texturePositionClipSpace.x=z.texturePosition.x/R,z.texturePositionClipSpace.y=z.texturePosition.y/R;this._onRemoveTextureAtlasCanvas.fire(O.canvas);const P=this._activePages.indexOf(O);P!==-1&&this._activePages.splice(P,1)}return L}_deletePage(C){this._pages.splice(C,1);for(let E=C;E<this._pages.length;E++){const R=this._pages[E];for(const L of R.glyphs)L.texturePage--;R.version++}}getRasterizedGlyphCombinedChar(C,E,R,L,D){return this._getFromCacheMap(this._cacheMapCombined,C,E,R,L,D)}getRasterizedGlyph(C,E,R,L,D){return this._getFromCacheMap(this._cacheMap,C,E,R,L,D)}_getFromCacheMap(C,E,R,L,D,O=!1){return l=C.get(E,R,L,D),l||(l=this._drawToCache(E,R,L,D,O),C.set(E,R,L,D,l)),l}_getColorFromAnsiIndex(C){if(C>=this._config.colors.ansi.length)throw new Error("No color found for idx "+C);return this._config.colors.ansi[C]}_getBackgroundColor(C,E,R,L){if(this._config.allowTransparency)return p.NULL_COLOR;let D;switch(C){case 16777216:case 33554432:D=this._getColorFromAnsiIndex(E);break;case 50331648:const O=r.AttributeData.toColorRGB(E);D=p.channels.toColor(O[0],O[1],O[2]);break;default:D=R?p.color.opaque(this._config.colors.foreground):this._config.colors.background}return D}_getForegroundColor(C,E,R,L,D,O,$,I,P,z){const M=this._getMinimumContrastColor(C,E,R,L,D,O,$,P,I,z);if(M)return M;let B;switch(D){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&P&&O<8&&(O+=8),B=this._getColorFromAnsiIndex(O);break;case 50331648:const T=r.AttributeData.toColorRGB(O);B=p.channels.toColor(T[0],T[1],T[2]);break;default:B=$?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(B=p.color.opaque(B)),I&&(B=p.color.multiplyOpacity(B,d.DIM_OPACITY)),B}_resolveBackgroundRgba(C,E,R){switch(C){case 16777216:case 33554432:return this._getColorFromAnsiIndex(E).rgba;case 50331648:return E<<8;default:return R?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(C,E,R,L){switch(C){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&L&&E<8&&(E+=8),this._getColorFromAnsiIndex(E).rgba;case 50331648:return E<<8;default:return R?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(C,E,R,L,D,O,$,I,P,z){if(this._config.minimumContrastRatio===1||z)return;const M=this._getContrastCache(P),B=M.getColor(C,L);if(B!==void 0)return B||void 0;const T=this._resolveBackgroundRgba(E,R,$),k=this._resolveForegroundRgba(D,O,$,I),G=p.rgba.ensureContrastRatio(T,k,this._config.minimumContrastRatio/(P?2:1));if(!G)return void M.setColor(C,L,null);const K=p.channels.toColor(G>>24&255,G>>16&255,G>>8&255);return M.setColor(C,L,K),K}_getContrastCache(C){return C?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(C,E,R,L,D=!1){const O=typeof C=="number"?String.fromCharCode(C):C,$=Math.min(this._config.deviceCellWidth*Math.max(O.length,2)+4,this._textureSize);this._tmpCanvas.width<$&&(this._tmpCanvas.width=$);const I=Math.min(this._config.deviceCellHeight+8,this._textureSize);if(this._tmpCanvas.height<I&&(this._tmpCanvas.height=I),this._tmpCtx.save(),this._workAttributeData.fg=R,this._workAttributeData.bg=E,this._workAttributeData.extended.ext=L,this._workAttributeData.isInvisible())return o;const P=!!this._workAttributeData.isBold(),z=!!this._workAttributeData.isInverse(),M=!!this._workAttributeData.isDim(),B=!!this._workAttributeData.isItalic(),T=!!this._workAttributeData.isUnderline(),k=!!this._workAttributeData.isStrikethrough(),G=!!this._workAttributeData.isOverline();let K=this._workAttributeData.getFgColor(),ue=this._workAttributeData.getFgColorMode(),le=this._workAttributeData.getBgColor(),q=this._workAttributeData.getBgColorMode();if(z){const he=K;K=le,le=he;const ge=ue;ue=q,q=ge}const N=this._getBackgroundColor(q,le,z,M);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=N.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";const ie=P?this._config.fontWeightBold:this._config.fontWeight,te=B?"italic":"";this._tmpCtx.font=`${te} ${ie} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=d.TEXT_BASELINE;const ve=O.length===1&&(0,a.isPowerlineGlyph)(O.charCodeAt(0)),fe=O.length===1&&(0,a.isRestrictedPowerlineGlyph)(O.charCodeAt(0)),Me=this._getForegroundColor(E,q,le,R,ue,K,z,M,P,(0,a.treatGlyphAsBackgroundColor)(O.charCodeAt(0)));this._tmpCtx.fillStyle=Me.css;const _e=fe?0:4;let Oe=!1;this._config.customGlyphs!==!1&&(Oe=(0,_.tryDrawCustomChar)(this._tmpCtx,O,_e,_e,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let qe,we=!ve;if(qe=typeof C=="number"?this._unicodeService.wcwidth(C):this._unicodeService.getStringCellWidth(C),T){this._tmpCtx.save();const he=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),ge=he%2==1?.5:0;if(this._tmpCtx.lineWidth=he,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())we=!1,this._tmpCtx.strokeStyle=`rgb(${r.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{we=!1;let Ie=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&Ie<8&&(Ie+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(Ie).css}this._tmpCtx.beginPath();const ze=_e,Re=Math.ceil(_e+this._config.deviceCharHeight)-ge-(D?2*he:0),_t=Re+he,Qe=Re+2*he;let it=this._workAttributeData.getUnderlineVariantOffset();for(let Ie=0;Ie<qe;Ie++){this._tmpCtx.save();const Ae=ze+Ie*this._config.deviceCellWidth,Ee=ze+(Ie+1)*this._config.deviceCellWidth,xt=Ae+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(Ae,Re),this._tmpCtx.lineTo(Ee,Re),this._tmpCtx.moveTo(Ae,Qe),this._tmpCtx.lineTo(Ee,Qe);break;case 3:const tt=he<=1?Qe:Math.ceil(_e+this._config.deviceCharHeight-he/2)-ge,vt=he<=1?Re:Math.ceil(_e+this._config.deviceCharHeight+he/2)-ge,ut=new Path2D;ut.rect(Ae,Re,this._config.deviceCellWidth,Qe-Re),this._tmpCtx.clip(ut),this._tmpCtx.moveTo(Ae-this._config.deviceCellWidth/2,_t),this._tmpCtx.bezierCurveTo(Ae-this._config.deviceCellWidth/2,vt,Ae,vt,Ae,_t),this._tmpCtx.bezierCurveTo(Ae,tt,xt,tt,xt,_t),this._tmpCtx.bezierCurveTo(xt,vt,Ee,vt,Ee,_t),this._tmpCtx.bezierCurveTo(Ee,tt,Ee+this._config.deviceCellWidth/2,tt,Ee+this._config.deviceCellWidth/2,_t);break;case 4:const Zt=it===0?0:it>=he?2*he-it:he-it;it>=he||Zt===0?(this._tmpCtx.setLineDash([Math.round(he),Math.round(he)]),this._tmpCtx.moveTo(Ae+Zt,Re),this._tmpCtx.lineTo(Ee,Re)):(this._tmpCtx.setLineDash([Math.round(he),Math.round(he)]),this._tmpCtx.moveTo(Ae,Re),this._tmpCtx.lineTo(Ae+Zt,Re),this._tmpCtx.moveTo(Ae+Zt+he,Re),this._tmpCtx.lineTo(Ee,Re)),it=(0,a.computeNextVariantOffset)(Ee-Ae,he,it);break;case 5:const er=.6,tr=.3,Ft=Ee-Ae,si=Math.floor(er*Ft),ri=Math.floor(tr*Ft),Jt=Ft-si-ri;this._tmpCtx.setLineDash([si,ri,Jt]),this._tmpCtx.moveTo(Ae,Re),this._tmpCtx.lineTo(Ee,Re);break;default:this._tmpCtx.moveTo(Ae,Re),this._tmpCtx.lineTo(Ee,Re)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!Oe&&this._config.fontSize>=12&&!this._config.allowTransparency&&O!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const Ie=this._tmpCtx.measureText(O);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in Ie&&Ie.actualBoundingBoxDescent>0){this._tmpCtx.save();const Ae=new Path2D;Ae.rect(ze,Re-Math.ceil(he/2),this._config.deviceCellWidth*qe,Qe-Re+Math.ceil(he/2)),this._tmpCtx.clip(Ae),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=N.css,this._tmpCtx.strokeText(O,_e,_e+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(G){const he=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),ge=he%2==1?.5:0;this._tmpCtx.lineWidth=he,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(_e,_e+ge),this._tmpCtx.lineTo(_e+this._config.deviceCharWidth*qe,_e+ge),this._tmpCtx.stroke()}if(Oe||this._tmpCtx.fillText(O,_e,_e+this._config.deviceCharHeight),O==="_"&&!this._config.allowTransparency){let he=v(this._tmpCtx.getImageData(_e,_e,this._config.deviceCellWidth,this._config.deviceCellHeight),N,Me,we);if(he)for(let ge=1;ge<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=N.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(O,_e,_e+this._config.deviceCharHeight-ge),he=v(this._tmpCtx.getImageData(_e,_e,this._config.deviceCellWidth,this._config.deviceCellHeight),N,Me,we),he);ge++);}if(k){const he=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),ge=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=he,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(_e,_e+Math.floor(this._config.deviceCharHeight/2)-ge),this._tmpCtx.lineTo(_e+this._config.deviceCharWidth*qe,_e+Math.floor(this._config.deviceCharHeight/2)-ge),this._tmpCtx.stroke()}this._tmpCtx.restore();const ft=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let Ot;if(Ot=this._config.allowTransparency?(function(he){for(let ge=0;ge<he.data.length;ge+=4)if(he.data[ge+3]>0)return!1;return!0})(ft):v(ft,N,Me,we),Ot)return o;const Se=this._findGlyphBoundingBox(ft,this._workBoundingBox,$,fe,Oe,_e);let pe,me;for(;;){if(this._activePages.length===0){const he=this._createNewPage();pe=he,me=he.currentRow,me.height=Se.size.y;break}pe=this._activePages[this._activePages.length-1],me=pe.currentRow;for(const he of this._activePages)Se.size.y<=he.currentRow.height&&(pe=he,me=he.currentRow);for(let he=this._activePages.length-1;he>=0;he--)for(const ge of this._activePages[he].fixedRows)ge.height<=me.height&&Se.size.y<=ge.height&&(pe=this._activePages[he],me=ge);if(me.y+Se.size.y>=pe.canvas.height||me.height>Se.size.y+2){let he=!1;if(pe.currentRow.y+pe.currentRow.height+Se.size.y>=pe.canvas.height){let ge;for(const ze of this._activePages)if(ze.currentRow.y+ze.currentRow.height+Se.size.y<ze.canvas.height){ge=ze;break}if(ge)pe=ge;else if(S.maxAtlasPages&&this._pages.length>=S.maxAtlasPages&&me.y+Se.size.y<=pe.canvas.height&&me.height>=Se.size.y&&me.x+Se.size.x<=pe.canvas.width)he=!0;else{const ze=this._createNewPage();pe=ze,me=ze.currentRow,me.height=Se.size.y,he=!0}}he||(pe.currentRow.height>0&&pe.fixedRows.push(pe.currentRow),me={x:0,y:pe.currentRow.y+pe.currentRow.height,height:Se.size.y},pe.fixedRows.push(me),pe.currentRow={x:0,y:me.y+me.height,height:0})}if(me.x+Se.size.x<=pe.canvas.width)break;me===pe.currentRow?(me.x=0,me.y+=me.height,me.height=0):pe.fixedRows.splice(pe.fixedRows.indexOf(me),1)}return Se.texturePage=this._pages.indexOf(pe),Se.texturePosition.x=me.x,Se.texturePosition.y=me.y,Se.texturePositionClipSpace.x=me.x/pe.canvas.width,Se.texturePositionClipSpace.y=me.y/pe.canvas.height,Se.sizeClipSpace.x/=pe.canvas.width,Se.sizeClipSpace.y/=pe.canvas.height,me.height=Math.max(me.height,Se.size.y),me.x+=Se.size.x,pe.ctx.putImageData(ft,Se.texturePosition.x-this._workBoundingBox.left,Se.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,Se.size.x,Se.size.y),pe.addGlyph(Se),pe.version++,Se}_findGlyphBoundingBox(C,E,R,L,D,O){E.top=0;const $=L?this._config.deviceCellHeight:this._tmpCanvas.height,I=L?this._config.deviceCellWidth:R;let P=!1;for(let z=0;z<$;z++){for(let M=0;M<I;M++){const B=z*this._tmpCanvas.width*4+4*M+3;if(C.data[B]!==0){E.top=z,P=!0;break}}if(P)break}E.left=0,P=!1;for(let z=0;z<O+I;z++){for(let M=0;M<$;M++){const B=M*this._tmpCanvas.width*4+4*z+3;if(C.data[B]!==0){E.left=z,P=!0;break}}if(P)break}E.right=I,P=!1;for(let z=O+I-1;z>=O;z--){for(let M=0;M<$;M++){const B=M*this._tmpCanvas.width*4+4*z+3;if(C.data[B]!==0){E.right=z,P=!0;break}}if(P)break}E.bottom=$,P=!1;for(let z=$-1;z>=0;z--){for(let M=0;M<I;M++){const B=z*this._tmpCanvas.width*4+4*M+3;if(C.data[B]!==0){E.bottom=z,P=!0;break}}if(P)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:E.right-E.left+1,y:E.bottom-E.top+1},sizeClipSpace:{x:E.right-E.left+1,y:E.bottom-E.top+1},offset:{x:-E.left+O+(L||D?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-E.top+O+(L||D?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}n.TextureAtlas=S;class x{get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(C){this._glyphs.push(C),this._usedPixels+=C.size.x*C.size.y}constructor(C,E,R){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],R)for(const L of R)this._glyphs.push(...L.glyphs),this._usedPixels+=L._usedPixels;this.canvas=y(C,E,E),this.ctx=(0,a.throwIfFalsy)(this.canvas.getContext("2d",{alpha:!0}))}clear(){this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.currentRow.x=0,this.currentRow.y=0,this.currentRow.height=0,this.fixedRows.length=0,this.version++}}function v(m,C,E,R){const L=C.rgba>>>24,D=C.rgba>>>16&255,O=C.rgba>>>8&255,$=E.rgba>>>24,I=E.rgba>>>16&255,P=E.rgba>>>8&255,z=Math.floor((Math.abs(L-$)+Math.abs(D-I)+Math.abs(O-P))/12);let M=!0;for(let B=0;B<m.data.length;B+=4)m.data[B]===L&&m.data[B+1]===D&&m.data[B+2]===O||R&&Math.abs(m.data[B]-L)+Math.abs(m.data[B+1]-D)+Math.abs(m.data[B+2]-O)<z?m.data[B+3]=0:M=!1;return M}function y(m,C,E){const R=m.createElement("canvas");return R.width=C,R.height=E,R}},577:function(j,n,u){var d=this&&this.__decorate||function(h,o,l,S){var x,v=arguments.length,y=v<3?o:S===null?S=Object.getOwnPropertyDescriptor(o,l):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(h,o,l,S);else for(var m=h.length-1;m>=0;m--)(x=h[m])&&(y=(v<3?x(y):v>3?x(o,l,y):x(o,l))||y);return v>3&&y&&Object.defineProperty(o,l,y),y},_=this&&this.__param||function(h,o){return function(l,S){o(l,S,h)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CharacterJoinerService=n.JoinedCellData=void 0;const a=u(147),p=u(855),w=u(782),b=u(97);class c extends a.AttributeData{constructor(o,l,S){super(),this.content=0,this.combinedData="",this.fg=o.fg,this.bg=o.bg,this.combinedData=l,this._width=S}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(o){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}n.JoinedCellData=c;let r=n.CharacterJoinerService=class af{constructor(o){this._bufferService=o,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new w.CellData}register(o){const l={id:this._nextCharacterJoinerId++,handler:o};return this._characterJoiners.push(l),l.id}deregister(o){for(let l=0;l<this._characterJoiners.length;l++)if(this._characterJoiners[l].id===o)return this._characterJoiners.splice(l,1),!0;return!1}getJoinedCharacters(o){if(this._characterJoiners.length===0)return[];const l=this._bufferService.buffer.lines.get(o);if(!l||l.length===0)return[];const S=[],x=l.translateToString(!0);let v=0,y=0,m=0,C=l.getFg(0),E=l.getBg(0);for(let R=0;R<l.getTrimmedLength();R++)if(l.loadCell(R,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==C||this._workCell.bg!==E){if(R-v>1){const L=this._getJoinedRanges(x,m,y,l,v);for(let D=0;D<L.length;D++)S.push(L[D])}v=R,m=y,C=this._workCell.fg,E=this._workCell.bg}y+=this._workCell.getChars().length||p.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-v>1){const R=this._getJoinedRanges(x,m,y,l,v);for(let L=0;L<R.length;L++)S.push(R[L])}return S}_getJoinedRanges(o,l,S,x,v){const y=o.substring(l,S);let m=[];try{m=this._characterJoiners[0].handler(y)}catch(C){console.error(C)}for(let C=1;C<this._characterJoiners.length;C++)try{const E=this._characterJoiners[C].handler(y);for(let R=0;R<E.length;R++)af._mergeRanges(m,E[R])}catch(E){console.error(E)}return this._stringRangesToCellRanges(m,x,v),m}_stringRangesToCellRanges(o,l,S){let x=0,v=!1,y=0,m=o[x];if(m){for(let C=S;C<this._bufferService.cols;C++){const E=l.getWidth(C),R=l.getString(C).length||p.WHITESPACE_CELL_CHAR.length;if(E!==0){if(!v&&m[0]<=y&&(m[0]=C,v=!0),m[1]<=y){if(m[1]=C,m=o[++x],!m)break;m[0]<=y?(m[0]=C,v=!0):v=!1}y+=R}}m&&(m[1]=this._bufferService.cols)}}static _mergeRanges(o,l){let S=!1;for(let x=0;x<o.length;x++){const v=o[x];if(S){if(l[1]<=v[0])return o[x-1][1]=l[1],o;if(l[1]<=v[1])return o[x-1][1]=Math.max(l[1],v[1]),o.splice(x,1),o;o.splice(x,1),x--}else{if(l[1]<=v[0])return o.splice(x,0,l),o;if(l[1]<=v[1])return v[0]=Math.min(l[0],v[0]),o;l[0]<v[1]&&(v[0]=Math.min(l[0],v[0]),S=!0)}}return S?o[o.length-1][1]=l[1]:o.push(l),o}};n.CharacterJoinerService=r=d([_(0,b.IBufferService)],r)},160:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.contrastRatio=n.toPaddedHex=n.rgba=n.rgb=n.css=n.color=n.channels=n.NULL_COLOR=void 0;let u=0,d=0,_=0,a=0;var p,w,b,c,r;function h(l){const S=l.toString(16);return S.length<2?"0"+S:S}function o(l,S){return l<S?(S+.05)/(l+.05):(l+.05)/(S+.05)}n.NULL_COLOR={css:"#00000000",rgba:0},(function(l){l.toCss=function(S,x,v,y){return y!==void 0?`#${h(S)}${h(x)}${h(v)}${h(y)}`:`#${h(S)}${h(x)}${h(v)}`},l.toRgba=function(S,x,v,y=255){return(S<<24|x<<16|v<<8|y)>>>0},l.toColor=function(S,x,v,y){return{css:l.toCss(S,x,v,y),rgba:l.toRgba(S,x,v,y)}}})(p||(n.channels=p={})),(function(l){function S(x,v){return a=Math.round(255*v),[u,d,_]=r.toChannels(x.rgba),{css:p.toCss(u,d,_,a),rgba:p.toRgba(u,d,_,a)}}l.blend=function(x,v){if(a=(255&v.rgba)/255,a===1)return{css:v.css,rgba:v.rgba};const y=v.rgba>>24&255,m=v.rgba>>16&255,C=v.rgba>>8&255,E=x.rgba>>24&255,R=x.rgba>>16&255,L=x.rgba>>8&255;return u=E+Math.round((y-E)*a),d=R+Math.round((m-R)*a),_=L+Math.round((C-L)*a),{css:p.toCss(u,d,_),rgba:p.toRgba(u,d,_)}},l.isOpaque=function(x){return(255&x.rgba)==255},l.ensureContrastRatio=function(x,v,y){const m=r.ensureContrastRatio(x.rgba,v.rgba,y);if(m)return p.toColor(m>>24&255,m>>16&255,m>>8&255)},l.opaque=function(x){const v=(255|x.rgba)>>>0;return[u,d,_]=r.toChannels(v),{css:p.toCss(u,d,_),rgba:v}},l.opacity=S,l.multiplyOpacity=function(x,v){return a=255&x.rgba,S(x,a*v/255)},l.toColorRGB=function(x){return[x.rgba>>24&255,x.rgba>>16&255,x.rgba>>8&255]}})(w||(n.color=w={})),(function(l){let S,x;try{const v=document.createElement("canvas");v.width=1,v.height=1;const y=v.getContext("2d",{willReadFrequently:!0});y&&(S=y,S.globalCompositeOperation="copy",x=S.createLinearGradient(0,0,1,1))}catch{}l.toColor=function(v){if(v.match(/#[\da-f]{3,8}/i))switch(v.length){case 4:return u=parseInt(v.slice(1,2).repeat(2),16),d=parseInt(v.slice(2,3).repeat(2),16),_=parseInt(v.slice(3,4).repeat(2),16),p.toColor(u,d,_);case 5:return u=parseInt(v.slice(1,2).repeat(2),16),d=parseInt(v.slice(2,3).repeat(2),16),_=parseInt(v.slice(3,4).repeat(2),16),a=parseInt(v.slice(4,5).repeat(2),16),p.toColor(u,d,_,a);case 7:return{css:v,rgba:(parseInt(v.slice(1),16)<<8|255)>>>0};case 9:return{css:v,rgba:parseInt(v.slice(1),16)>>>0}}const y=v.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(y)return u=parseInt(y[1]),d=parseInt(y[2]),_=parseInt(y[3]),a=Math.round(255*(y[5]===void 0?1:parseFloat(y[5]))),p.toColor(u,d,_,a);if(!S||!x)throw new Error("css.toColor: Unsupported css format");if(S.fillStyle=x,S.fillStyle=v,typeof S.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(S.fillRect(0,0,1,1),[u,d,_,a]=S.getImageData(0,0,1,1).data,a!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:p.toRgba(u,d,_,a),css:v}}})(b||(n.css=b={})),(function(l){function S(x,v,y){const m=x/255,C=v/255,E=y/255;return .2126*(m<=.03928?m/12.92:Math.pow((m+.055)/1.055,2.4))+.7152*(C<=.03928?C/12.92:Math.pow((C+.055)/1.055,2.4))+.0722*(E<=.03928?E/12.92:Math.pow((E+.055)/1.055,2.4))}l.relativeLuminance=function(x){return S(x>>16&255,x>>8&255,255&x)},l.relativeLuminance2=S})(c||(n.rgb=c={})),(function(l){function S(v,y,m){const C=v>>24&255,E=v>>16&255,R=v>>8&255;let L=y>>24&255,D=y>>16&255,O=y>>8&255,$=o(c.relativeLuminance2(L,D,O),c.relativeLuminance2(C,E,R));for(;$<m&&(L>0||D>0||O>0);)L-=Math.max(0,Math.ceil(.1*L)),D-=Math.max(0,Math.ceil(.1*D)),O-=Math.max(0,Math.ceil(.1*O)),$=o(c.relativeLuminance2(L,D,O),c.relativeLuminance2(C,E,R));return(L<<24|D<<16|O<<8|255)>>>0}function x(v,y,m){const C=v>>24&255,E=v>>16&255,R=v>>8&255;let L=y>>24&255,D=y>>16&255,O=y>>8&255,$=o(c.relativeLuminance2(L,D,O),c.relativeLuminance2(C,E,R));for(;$<m&&(L<255||D<255||O<255);)L=Math.min(255,L+Math.ceil(.1*(255-L))),D=Math.min(255,D+Math.ceil(.1*(255-D))),O=Math.min(255,O+Math.ceil(.1*(255-O))),$=o(c.relativeLuminance2(L,D,O),c.relativeLuminance2(C,E,R));return(L<<24|D<<16|O<<8|255)>>>0}l.blend=function(v,y){if(a=(255&y)/255,a===1)return y;const m=y>>24&255,C=y>>16&255,E=y>>8&255,R=v>>24&255,L=v>>16&255,D=v>>8&255;return u=R+Math.round((m-R)*a),d=L+Math.round((C-L)*a),_=D+Math.round((E-D)*a),p.toRgba(u,d,_)},l.ensureContrastRatio=function(v,y,m){const C=c.relativeLuminance(v>>8),E=c.relativeLuminance(y>>8);if(o(C,E)<m){if(E<C){const D=S(v,y,m),O=o(C,c.relativeLuminance(D>>8));if(O<m){const $=x(v,y,m);return O>o(C,c.relativeLuminance($>>8))?D:$}return D}const R=x(v,y,m),L=o(C,c.relativeLuminance(R>>8));if(L<m){const D=S(v,y,m);return L>o(C,c.relativeLuminance(D>>8))?R:D}return R}},l.reduceLuminance=S,l.increaseLuminance=x,l.toChannels=function(v){return[v>>24&255,v>>16&255,v>>8&255,255&v]}})(r||(n.rgba=r={})),n.toPaddedHex=h,n.contrastRatio=o},345:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.runAndSubscribe=n.forwardEvent=n.EventEmitter=void 0,n.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=u=>(this._listeners.push(u),{dispose:()=>{if(!this._disposed){for(let d=0;d<this._listeners.length;d++)if(this._listeners[d]===u)return void this._listeners.splice(d,1)}}})),this._event}fire(u,d){const _=[];for(let a=0;a<this._listeners.length;a++)_.push(this._listeners[a]);for(let a=0;a<_.length;a++)_[a].call(void 0,u,d)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},n.forwardEvent=function(u,d){return u((_=>d.fire(_)))},n.runAndSubscribe=function(u,d){return d(void 0),u((_=>d(_)))}},859:(j,n)=>{function u(d){for(const _ of d)_.dispose();d.length=0}Object.defineProperty(n,"__esModule",{value:!0}),n.getDisposeArrayDisposable=n.disposeArray=n.toDisposable=n.MutableDisposable=n.Disposable=void 0,n.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 _=this._disposables.indexOf(d);_!==-1&&this._disposables.splice(_,1)}},n.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(d){var _;this._isDisposed||d===this._value||((_=this._value)==null||_.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}},n.toDisposable=function(d){return{dispose:d}},n.disposeArray=u,n.getDisposeArrayDisposable=function(d){return{dispose:()=>u(d)}}},485:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.FourKeyMap=n.TwoKeyMap=void 0;class u{constructor(){this._data={}}set(_,a,p){this._data[_]||(this._data[_]={}),this._data[_][a]=p}get(_,a){return this._data[_]?this._data[_][a]:void 0}clear(){this._data={}}}n.TwoKeyMap=u,n.FourKeyMap=class{constructor(){this._data=new u}set(d,_,a,p,w){this._data.get(d,_)||this._data.set(d,_,new u),this._data.get(d,_).set(a,p,w)}get(d,_,a,p){var w;return(w=this._data.get(d,_))==null?void 0:w.get(a,p)}clear(){this._data.clear()}}},399:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.isChromeOS=n.isLinux=n.isWindows=n.isIphone=n.isIpad=n.isMac=n.getSafariVersion=n.isSafari=n.isLegacyEdge=n.isFirefox=n.isNode=void 0,n.isNode=typeof process<"u"&&"title"in process;const u=n.isNode?"node":navigator.userAgent,d=n.isNode?"node":navigator.platform;n.isFirefox=u.includes("Firefox"),n.isLegacyEdge=u.includes("Edge"),n.isSafari=/^((?!chrome|android).)*safari/i.test(u),n.getSafariVersion=function(){if(!n.isSafari)return 0;const _=u.match(/Version\/(\d+)/);return _===null||_.length<2?0:parseInt(_[1])},n.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(d),n.isIpad=d==="iPad",n.isIphone=d==="iPhone",n.isWindows=["Windows","Win16","Win32","WinCE"].includes(d),n.isLinux=d.indexOf("Linux")>=0,n.isChromeOS=/\bCrOS\b/.test(u)},385:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DebouncedIdleTask=n.IdleTaskQueue=n.PriorityTaskQueue=void 0;const d=u(399);class _{constructor(){this._tasks=[],this._i=0}enqueue(w){this._tasks.push(w),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(w){this._idleCallback=void 0;let b=0,c=0,r=w.timeRemaining(),h=0;for(;this._i<this._tasks.length;){if(b=Date.now(),this._tasks[this._i]()||this._i++,b=Math.max(1,Date.now()-b),c=Math.max(b,c),h=w.timeRemaining(),1.5*c>h)return r-b<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(r-b))}ms`),void this._start();r=h}this.clear()}}class a extends _{_requestCallback(w){return setTimeout((()=>w(this._createDeadline(16))))}_cancelCallback(w){clearTimeout(w)}_createDeadline(w){const b=Date.now()+w;return{timeRemaining:()=>Math.max(0,b-Date.now())}}}n.PriorityTaskQueue=a,n.IdleTaskQueue=!d.isNode&&"requestIdleCallback"in window?class extends _{_requestCallback(p){return requestIdleCallback(p)}_cancelCallback(p){cancelIdleCallback(p)}}:a,n.DebouncedIdleTask=class{constructor(){this._queue=new n.IdleTaskQueue}set(p){this._queue.clear(),this._queue.enqueue(p)}flush(){this._queue.flush()}}},147:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ExtendedAttrs=n.AttributeData=void 0;class u{constructor(){this.fg=0,this.bg=0,this.extended=new d}static toColorRGB(a){return[a>>>16&255,a>>>8&255,255&a]}static fromColorRGB(a){return(255&a[0])<<16|(255&a[1])<<8|255&a[2]}clone(){const a=new u;return a.fg=this.fg,a.bg=this.bg,a.extended=this.extended.clone(),a}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}}n.AttributeData=u;class d{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(a){this._ext=a}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(a){this._ext&=-469762049,this._ext|=a<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(a){this._ext&=-67108864,this._ext|=67108863&a}get urlId(){return this._urlId}set urlId(a){this._urlId=a}get underlineVariantOffset(){const a=(3758096384&this._ext)>>29;return a<0?4294967288^a:a}set underlineVariantOffset(a){this._ext&=536870911,this._ext|=a<<29&3758096384}constructor(a=0,p=0){this._ext=0,this._urlId=0,this._ext=a,this._urlId=p}clone(){return new d(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}n.ExtendedAttrs=d},782:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellData=void 0;const d=u(133),_=u(855),a=u(147);class p extends a.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new a.ExtendedAttrs,this.combinedData=""}static fromCharData(b){const c=new p;return c.setFromCharData(b),c}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(b){this.fg=b[_.CHAR_DATA_ATTR_INDEX],this.bg=0;let c=!1;if(b[_.CHAR_DATA_CHAR_INDEX].length>2)c=!0;else if(b[_.CHAR_DATA_CHAR_INDEX].length===2){const r=b[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=r&&r<=56319){const h=b[_.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=h&&h<=57343?this.content=1024*(r-55296)+h-56320+65536|b[_.CHAR_DATA_WIDTH_INDEX]<<22:c=!0}else c=!0}else this.content=b[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|b[_.CHAR_DATA_WIDTH_INDEX]<<22;c&&(this.combinedData=b[_.CHAR_DATA_CHAR_INDEX],this.content=2097152|b[_.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}n.CellData=p},855:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.WHITESPACE_CELL_CODE=n.WHITESPACE_CELL_WIDTH=n.WHITESPACE_CELL_CHAR=n.NULL_CELL_CODE=n.NULL_CELL_WIDTH=n.NULL_CELL_CHAR=n.CHAR_DATA_CODE_INDEX=n.CHAR_DATA_WIDTH_INDEX=n.CHAR_DATA_CHAR_INDEX=n.CHAR_DATA_ATTR_INDEX=n.DEFAULT_EXT=n.DEFAULT_ATTR=n.DEFAULT_COLOR=void 0,n.DEFAULT_COLOR=0,n.DEFAULT_ATTR=256|n.DEFAULT_COLOR<<9,n.DEFAULT_EXT=0,n.CHAR_DATA_ATTR_INDEX=0,n.CHAR_DATA_CHAR_INDEX=1,n.CHAR_DATA_WIDTH_INDEX=2,n.CHAR_DATA_CODE_INDEX=3,n.NULL_CELL_CHAR="",n.NULL_CELL_WIDTH=1,n.NULL_CELL_CODE=0,n.WHITESPACE_CELL_CHAR=" ",n.WHITESPACE_CELL_WIDTH=1,n.WHITESPACE_CELL_CODE=32},133:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Utf8ToUtf32=n.StringToUtf32=n.utf32ToString=n.stringFromCodePoint=void 0,n.stringFromCodePoint=function(u){return u>65535?(u-=65536,String.fromCharCode(55296+(u>>10))+String.fromCharCode(u%1024+56320)):String.fromCharCode(u)},n.utf32ToString=function(u,d=0,_=u.length){let a="";for(let p=d;p<_;++p){let w=u[p];w>65535?(w-=65536,a+=String.fromCharCode(55296+(w>>10))+String.fromCharCode(w%1024+56320)):a+=String.fromCharCode(w)}return a},n.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(u,d){const _=u.length;if(!_)return 0;let a=0,p=0;if(this._interim){const w=u.charCodeAt(p++);56320<=w&&w<=57343?d[a++]=1024*(this._interim-55296)+w-56320+65536:(d[a++]=this._interim,d[a++]=w),this._interim=0}for(let w=p;w<_;++w){const b=u.charCodeAt(w);if(55296<=b&&b<=56319){if(++w>=_)return this._interim=b,a;const c=u.charCodeAt(w);56320<=c&&c<=57343?d[a++]=1024*(b-55296)+c-56320+65536:(d[a++]=b,d[a++]=c)}else b!==65279&&(d[a++]=b)}return a}},n.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(u,d){const _=u.length;if(!_)return 0;let a,p,w,b,c=0,r=0,h=0;if(this.interim[0]){let S=!1,x=this.interim[0];x&=(224&x)==192?31:(240&x)==224?15:7;let v,y=0;for(;(v=63&this.interim[++y])&&y<4;)x<<=6,x|=v;const m=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,C=m-y;for(;h<C;){if(h>=_)return 0;if(v=u[h++],(192&v)!=128){h--,S=!0;break}this.interim[y++]=v,x<<=6,x|=63&v}S||(m===2?x<128?h--:d[c++]=x:m===3?x<2048||x>=55296&&x<=57343||x===65279||(d[c++]=x):x<65536||x>1114111||(d[c++]=x)),this.interim.fill(0)}const o=_-4;let l=h;for(;l<_;){for(;!(!(l<o)||128&(a=u[l])||128&(p=u[l+1])||128&(w=u[l+2])||128&(b=u[l+3]));)d[c++]=a,d[c++]=p,d[c++]=w,d[c++]=b,l+=4;if(a=u[l++],a<128)d[c++]=a;else if((224&a)==192){if(l>=_)return this.interim[0]=a,c;if(p=u[l++],(192&p)!=128){l--;continue}if(r=(31&a)<<6|63&p,r<128){l--;continue}d[c++]=r}else if((240&a)==224){if(l>=_)return this.interim[0]=a,c;if(p=u[l++],(192&p)!=128){l--;continue}if(l>=_)return this.interim[0]=a,this.interim[1]=p,c;if(w=u[l++],(192&w)!=128){l--;continue}if(r=(15&a)<<12|(63&p)<<6|63&w,r<2048||r>=55296&&r<=57343||r===65279)continue;d[c++]=r}else if((248&a)==240){if(l>=_)return this.interim[0]=a,c;if(p=u[l++],(192&p)!=128){l--;continue}if(l>=_)return this.interim[0]=a,this.interim[1]=p,c;if(w=u[l++],(192&w)!=128){l--;continue}if(l>=_)return this.interim[0]=a,this.interim[1]=p,this.interim[2]=w,c;if(b=u[l++],(192&b)!=128){l--;continue}if(r=(7&a)<<18|(63&p)<<12|(63&w)<<6|63&b,r<65536||r>1114111)continue;d[c++]=r}}return c}}},776:function(j,n,u){var d=this&&this.__decorate||function(r,h,o,l){var S,x=arguments.length,v=x<3?h:l===null?l=Object.getOwnPropertyDescriptor(h,o):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(r,h,o,l);else for(var y=r.length-1;y>=0;y--)(S=r[y])&&(v=(x<3?S(v):x>3?S(h,o,v):S(h,o))||v);return x>3&&v&&Object.defineProperty(h,o,v),v},_=this&&this.__param||function(r,h){return function(o,l){h(o,l,r)}};Object.defineProperty(n,"__esModule",{value:!0}),n.traceCall=n.setTraceLogger=n.LogService=void 0;const a=u(859),p=u(97),w={trace:p.LogLevelEnum.TRACE,debug:p.LogLevelEnum.DEBUG,info:p.LogLevelEnum.INFO,warn:p.LogLevelEnum.WARN,error:p.LogLevelEnum.ERROR,off:p.LogLevelEnum.OFF};let b,c=n.LogService=class extends a.Disposable{get logLevel(){return this._logLevel}constructor(r){super(),this._optionsService=r,this._logLevel=p.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),b=this}_updateLogLevel(){this._logLevel=w[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(r){for(let h=0;h<r.length;h++)typeof r[h]=="function"&&(r[h]=r[h]())}_log(r,h,o){this._evalLazyOptionalParams(o),r.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+h,...o)}trace(r,...h){var o;this._logLevel<=p.LogLevelEnum.TRACE&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.trace.bind(this._optionsService.options.logger))??console.log,r,h)}debug(r,...h){var o;this._logLevel<=p.LogLevelEnum.DEBUG&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.debug.bind(this._optionsService.options.logger))??console.log,r,h)}info(r,...h){var o;this._logLevel<=p.LogLevelEnum.INFO&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.info.bind(this._optionsService.options.logger))??console.info,r,h)}warn(r,...h){var o;this._logLevel<=p.LogLevelEnum.WARN&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.warn.bind(this._optionsService.options.logger))??console.warn,r,h)}error(r,...h){var o;this._logLevel<=p.LogLevelEnum.ERROR&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.error.bind(this._optionsService.options.logger))??console.error,r,h)}};n.LogService=c=d([_(0,p.IOptionsService)],c),n.setTraceLogger=function(r){b=r},n.traceCall=function(r,h,o){if(typeof o.value!="function")throw new Error("not supported");const l=o.value;o.value=function(...S){if(b.logLevel!==p.LogLevelEnum.TRACE)return l.apply(this,S);b.trace(`GlyphRenderer#${l.name}(${S.map((v=>JSON.stringify(v))).join(", ")})`);const x=l.apply(this,S);return b.trace(`GlyphRenderer#${l.name} return`,x),x}}},726:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createDecorator=n.getServiceDependencies=n.serviceRegistry=void 0;const u="di$target",d="di$dependencies";n.serviceRegistry=new Map,n.getServiceDependencies=function(_){return _[d]||[]},n.createDecorator=function(_){if(n.serviceRegistry.has(_))return n.serviceRegistry.get(_);const a=function(p,w,b){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(c,r,h){r[u]===r?r[d].push({id:c,index:h}):(r[d]=[{id:c,index:h}],r[u]=r)})(a,p,b)};return a.toString=()=>_,n.serviceRegistry.set(_,a),a}},97:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.IDecorationService=n.IUnicodeService=n.IOscLinkService=n.IOptionsService=n.ILogService=n.LogLevelEnum=n.IInstantiationService=n.ICharsetService=n.ICoreService=n.ICoreMouseService=n.IBufferService=void 0;const d=u(726);var _;n.IBufferService=(0,d.createDecorator)("BufferService"),n.ICoreMouseService=(0,d.createDecorator)("CoreMouseService"),n.ICoreService=(0,d.createDecorator)("CoreService"),n.ICharsetService=(0,d.createDecorator)("CharsetService"),n.IInstantiationService=(0,d.createDecorator)("InstantiationService"),(function(a){a[a.TRACE=0]="TRACE",a[a.DEBUG=1]="DEBUG",a[a.INFO=2]="INFO",a[a.WARN=3]="WARN",a[a.ERROR=4]="ERROR",a[a.OFF=5]="OFF"})(_||(n.LogLevelEnum=_={})),n.ILogService=(0,d.createDecorator)("LogService"),n.IOptionsService=(0,d.createDecorator)("OptionsService"),n.IOscLinkService=(0,d.createDecorator)("OscLinkService"),n.IUnicodeService=(0,d.createDecorator)("UnicodeService"),n.IDecorationService=(0,d.createDecorator)("DecorationService")}},U={};function ee(j){var n=U[j];if(n!==void 0)return n.exports;var u=U[j]={exports:{}};return X[j].call(u.exports,u,u.exports,ee),u.exports}var ae={};return(()=>{var j=ae;Object.defineProperty(j,"__esModule",{value:!0}),j.CanvasAddon=void 0;const n=ee(345),u=ee(859),d=ee(776),_=ee(949);class a extends u.Disposable{constructor(){super(...arguments),this._onChangeTextureAtlas=this.register(new n.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new n.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event}get textureAtlas(){var w;return(w=this._renderer)==null?void 0:w.textureAtlas}activate(w){const b=w._core;if(!w.element)return void this.register(b.onWillOpen((()=>this.activate(w))));this._terminal=w;const c=b.coreService,r=b.optionsService,h=b.screenElement,o=b.linkifier,l=b,S=l._bufferService,x=l._renderService,v=l._characterJoinerService,y=l._charSizeService,m=l._coreBrowserService,C=l._decorationService,E=l._logService,R=l._themeService;(0,d.setTraceLogger)(E),this._renderer=new _.CanvasRenderer(w,h,o,S,y,r,v,c,m,C,R),this.register((0,n.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this.register((0,n.forwardEvent)(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),x.setRenderer(this._renderer),x.handleResize(S.cols,S.rows),this.register((0,u.toDisposable)((()=>{var L;x.setRenderer(this._terminal._core._createRenderer()),x.handleResize(w.cols,w.rows),(L=this._renderer)==null||L.dispose(),this._renderer=void 0})))}clearTextureAtlas(){var w;(w=this._renderer)==null||w.clearTextureAtlas()}}j.CanvasAddon=a})(),ae})()))})(ko)),ko.exports}var sg=ig();/**
|
|
115
|
+
* Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
|
|
116
|
+
* @license MIT
|
|
117
|
+
*
|
|
118
|
+
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
|
119
|
+
* @license MIT
|
|
120
|
+
*
|
|
121
|
+
* Originally forked from (with the author's permission):
|
|
122
|
+
* Fabrice Bellard's javascript vt100 for jslinux:
|
|
123
|
+
* http://bellard.org/jslinux/
|
|
124
|
+
* Copyright (c) 2011 Fabrice Bellard
|
|
125
|
+
*/var rg=class{constructor(F,V,X,U={}){this._terminal=F,this._regex=V,this._handler=X,this._options=U}provideLinks(F,V){let X=ag.computeLink(F,this._regex,this._terminal,this._handler);V(this._addCallbacks(X))}_addCallbacks(F){return F.map(V=>(V.leave=this._options.leave,V.hover=(X,U)=>{if(this._options.hover){let{range:ee}=V;this._options.hover(X,U,ee)}},V))}};function ng(F){try{let V=new URL(F),X=V.password&&V.username?`${V.protocol}//${V.username}:${V.password}@${V.host}`:V.username?`${V.protocol}//${V.username}@${V.host}`:`${V.protocol}//${V.host}`;return F.toLocaleLowerCase().startsWith(X.toLocaleLowerCase())}catch{return!1}}var ag=class ha{static computeLink(V,X,U,ee){let ae=new RegExp(X.source,(X.flags||"")+"g"),[j,n]=ha._getWindowedLineStrings(V-1,U),u=j.join(""),d,_=[];for(;d=ae.exec(u);){let a=d[0];if(!ng(a))continue;let[p,w]=ha._mapStrIdx(U,n,0,d.index),[b,c]=ha._mapStrIdx(U,p,w,a.length);if(p===-1||w===-1||b===-1||c===-1)continue;let r={start:{x:w+1,y:p+1},end:{x:c,y:b+1}};_.push({range:r,text:a,activate:ee})}return _}static _getWindowedLineStrings(V,X){let U,ee=V,ae=V,j=0,n="",u=[];if(U=X.buffer.active.getLine(V)){let d=U.translateToString(!0);if(U.isWrapped&&d[0]!==" "){for(j=0;(U=X.buffer.active.getLine(--ee))&&j<2048&&(n=U.translateToString(!0),j+=n.length,u.push(n),!(!U.isWrapped||n.indexOf(" ")!==-1)););u.reverse()}for(u.push(d),j=0;(U=X.buffer.active.getLine(++ae))&&U.isWrapped&&j<2048&&(n=U.translateToString(!0),j+=n.length,u.push(n),n.indexOf(" ")===-1););}return[u,ee]}static _mapStrIdx(V,X,U,ee){let ae=V.buffer.active,j=ae.getNullCell(),n=U;for(;ee;){let u=ae.getLine(X);if(!u)return[-1,-1];for(let d=n;d<u.length;++d){u.getCell(d,j);let _=j.getChars();if(j.getWidth()&&(ee-=_.length||1,d===u.length-1&&_==="")){let a=ae.getLine(X+1);a&&a.isWrapped&&(a.getCell(0,j),j.getWidth()===2&&(ee+=1))}if(ee<0)return[X,d]}X++,n=0}return[X,n]}},lg=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function og(F,V){let X=window.open();if(X){try{X.opener=null}catch{}X.location.href=V}else console.warn("Opening link blocked as opener could not be cleared")}var cg=class{constructor(F=og,V={}){this._handler=F,this._options=V}activate(F){this._terminal=F;let V=this._options,X=V.urlRegex||lg;this._linkProvider=this._terminal.registerLinkProvider(new rg(this._terminal,X,this._handler,V))}dispose(){var F;(F=this._linkProvider)==null||F.dispose()}};const ua=new RegExp("(?<![a-zA-Z]:\\/\\/)(?:^|[\\s\"'`(\\[{])([./]?[\\w./-]+\\.[a-zA-Z]{1,10})(?::(\\d+)(?::(\\d+))?|\\((\\d+),(\\d+)\\))?","g");function lf(F){return!(!/\.[a-zA-Z]{1,10}(?::\d+(?::\d+)?|\(\d+,\d+\))?$/.test(F)||/^https?:\/\//i.test(F)||/^[a-z0-9-]+\.(com|org|net|io|dev|app|co)$/i.test(F))}const hg=typeof navigator<"u"&&navigator.platform.toUpperCase().includes("MAC");class ug{constructor(V,X,U,ee){this.terminal=V,this.onFileOpen=X,this.terminalId=U,this.decorationManager=ee}provideLinks(V,X){const U=this.terminal.buffer.active.getLine(V-1);if(!U){X(void 0);return}const ee=U.translateToString(),ae=new RegExp(ua.source,ua.flags),j=[];let n;for(;(n=ae.exec(ee))!==null;){const u=n[1];if(!u||!lf(u))continue;const d=n[2]?parseInt(n[2],10):n[4]?parseInt(n[4],10):void 0,_=n[3]?parseInt(n[3],10):n[5]?parseInt(n[5],10):void 0,a=n[0],p=a.indexOf(u),w=n.index+p,b=n.index+a.length,c=w,r=V-1;j.push({range:{start:{x:w+1,y:V},end:{x:b,y:V}},text:a.substring(p),decorations:{pointerCursor:!0,underline:!0},activate:(h,o)=>{(hg?!h.metaKey:!h.ctrlKey)||this.onFileOpen(u,d,_,this.terminalId)},hover:()=>{var h;(h=this.decorationManager)==null||h.highlightAt(r,c)},leave:()=>{var h;(h=this.decorationManager)==null||h.unhighlightAll()}})}X(j.length>0?j:void 0)}}class dg{constructor(V){ca(this,"disposables",[]);ca(this,"entries",[]);ca(this,"lastScannedLine",-1);this.terminal=V,this.disposables.push(V.onWriteParsed(()=>this.scanNewLines()))}highlightAt(V,X){for(const U of this.entries)U.marker.line===V&&U.x===X&&U.element&&U.element.classList.add("file-path-decoration-hover")}unhighlightAll(){var V;for(const X of this.entries)(V=X.element)==null||V.classList.remove("file-path-decoration-hover")}scanNewLines(){const V=this.terminal.buffer.active,X=V.baseY+V.cursorY;for(let U=this.lastScannedLine+1;U<=X;U++)this.decorateLine(U);this.lastScannedLine=X}decorateLine(V){const X=this.terminal.buffer.active,U=X.getLine(V);if(!U)return;const ee=U.translateToString(),ae=new RegExp(ua.source,ua.flags);let j;for(;(j=ae.exec(ee))!==null;){const n=j[1];if(!n||!lf(n))continue;const u=j[0],d=u.indexOf(n),_=j.index+d,a=u.length-d,p=X.baseY+X.cursorY,w=V-p,b=this.terminal.registerMarker(w);if(!b||b.line===-1)continue;const c={marker:b,x:_},r=this.terminal.registerDecoration({marker:b,x:_,width:a});r&&(r.onRender(h=>{h.classList.add("file-path-decoration"),c.element=h}),this.disposables.push(r)),this.entries.push(c),this.disposables.push(b)}}dispose(){for(const V of this.disposables)V.dispose();this.disposables=[],this.entries=[],this.lastScannedLine=-1}}const fg=1;function Vd(F,V){if(!F||F.readyState!==WebSocket.OPEN)return;const X=new TextEncoder().encode(V),U=new Uint8Array(1+X.length);U[0]=fg,U.set(X,1),F.send(U.buffer)}function _g({wsRef:F,modifierRef:V}){const[X,U]=be.useState(null);be.useEffect(()=>(V.current.clearCallback=()=>U(null),()=>{V.current.clearCallback=null}),[V]);const ee=be.useCallback(u=>{u.preventDefault(),Vd(F.current,"\x1B")},[F]),ae=be.useCallback(u=>{u.preventDefault(),Vd(F.current," ")},[F]),j=be.useCallback(u=>{u.preventDefault();const d=X==="ctrl"?null:"ctrl";U(d),V.current.ctrl=d==="ctrl",V.current.cmd=!1},[X,V]),n=be.useCallback(u=>{u.preventDefault();const d=X==="cmd"?null:"cmd";U(d),V.current.cmd=d==="cmd",V.current.ctrl=!1},[X,V]);return re.jsxs("div",{className:"virtual-keyboard",role:"toolbar","aria-label":"Virtual modifier keys",children:[re.jsx("button",{className:"virtual-key",onPointerDown:ee,tabIndex:-1,children:"Esc"}),re.jsx("button",{className:"virtual-key",onPointerDown:ae,tabIndex:-1,children:"Tab"}),re.jsx("button",{className:`virtual-key virtual-key-modifier${X==="ctrl"?" virtual-key-active":""}`,onPointerDown:j,tabIndex:-1,"aria-pressed":X==="ctrl",children:"Ctrl"}),re.jsx("button",{className:`virtual-key virtual-key-modifier${X==="cmd"?" virtual-key-active":""}`,onPointerDown:n,tabIndex:-1,"aria-pressed":X==="cmd",children:"Cmd"})]})}const vg=0,of=1,cf=["image/png","image/jpeg","image/gif","image/webp","image/bmp"];async function gg(F){var X;if(!((X=navigator.clipboard)!=null&&X.read))return!1;let V=!1;try{const U=await navigator.clipboard.read();for(const ee of U){const ae=ee.types.find(j=>cf.includes(j));if(ae){V=!0;const j=await ee.getType(ae);F.write(`\r
|
|
126
|
+
\x1B[90m[Uploading image...]\x1B[0m`);const{path:n}=await tf(j);return F.write("\r\x1B[2K"),F.paste(n),!0}}}catch{if(V)return F.write(`\r\x1B[2K\x1B[31m[Image upload failed]\x1B[0m\r
|
|
127
|
+
`),!0}return!1}async function pg(F){var V;if(!await gg(F))try{const X=await((V=navigator.clipboard)==null?void 0:V.readText());X&&F.paste(X)}catch{}}function mg(F,V){var U;const X=(U=F.clipboardData)==null?void 0:U.items;if(X){for(const ee of Array.from(X))if(cf.includes(ee.type)){const ae=ee.getAsFile();if(!ae)continue;F.preventDefault(),V.write(`\r
|
|
128
|
+
\x1B[90m[Uploading image...]\x1B[0m`),tf(ae).then(({path:j})=>{V.write("\r\x1B[2K"),V.paste(j)}).catch(()=>{V.write(`\r\x1B[2K\x1B[31m[Image upload failed]\x1B[0m\r
|
|
129
|
+
`)});return}}}function Yd({wsPath:F,onFileOpen:V,persistent:X}){const U=be.useRef(null),ee=be.useRef(null),ae=be.useRef(null),j=be.useRef(null),n=be.useRef({ctrl:!1,cmd:!1,clearCallback:null}),u=sf(`(max-width: ${Zd}px)`);return be.useEffect(()=>{if(!U.current)return;const d=new Qv.Terminal({cursorBlink:!0,fontSize:13,lineHeight:1,fontFamily:'Menlo, Monaco, "Courier New", monospace',customGlyphs:!0,scrollback:5e4,theme:{background:"#1a1a1a",foreground:"#e0e0e0",cursor:"#ffffff"},allowProposedApi:!0});ee.current=d;const _=new Jv.FitAddon;j.current=_,d.loadAddon(_),d.open(U.current);const a=()=>{try{d.loadAddon(new sg.CanvasAddon)}catch{}};try{const z=new tg.WebglAddon;z.onContextLoss(()=>{z.dispose(),a()}),d.loadAddon(z)}catch{a()}const p=new cg((z,M)=>{z.preventDefault(),window.open(M,"_blank")});d.loadAddon(p);const w=F.split("/").pop();let b=null,c=null;if(V){c=new dg(d);const z=new ug(d,(M,B,T,k)=>{V(M,B,T,k)},w,c);b=d.registerLinkProvider(z)}const r=navigator.platform.toUpperCase().includes("MAC");d.attachCustomKeyEventHandler(z=>{if(z.type!=="keydown")return!0;if(z.key==="Enter"&&z.shiftKey)return z.preventDefault(),d.paste(`\\
|
|
130
|
+
`),!1;if(!(r?z.metaKey:z.ctrlKey&&z.shiftKey))return!0;if(z.key==="c"||z.key==="C"){const B=d.getSelection();return B?(z.preventDefault(),navigator.clipboard.writeText(B).catch(()=>{}),!1):!0}return z.key==="v"||z.key==="V"?(z.preventDefault(),pg(d),!1):!0});const h=z=>mg(z,d);U.current.addEventListener("paste",h);let o=null;const l=()=>{o&&clearTimeout(o),o=setTimeout(()=>{o=null,_.fit()},150)};_.fit();const S=setTimeout(l,300),v=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}${F}`,y=new WebSocket(v);y.binaryType="arraybuffer",ae.current=y;let m="",C=!0,E=null;const R=z=>(z=z.replace(/\x1b\[[\?>][\d;]*c/g,""),z=z.replace(/\[[\?>][\d;]*c/g,""),z),L=()=>{if(C=!1,E=null,m){const z=R(m);z&&d.write(z,()=>{d.scrollToBottom()}),m=""}l(),setTimeout(()=>{y.readyState===WebSocket.OPEN&&Ho(y,"resize",{cols:d.cols,rows:d.rows}),d.scrollToBottom()},350)};y.onopen=()=>{Ho(y,"resize",{cols:d.cols,rows:d.rows})},y.onmessage=z=>{const M=new Uint8Array(z.data);if(M.length===0)return;const B=M[0],T=M.subarray(1);if(B===of){const k=new TextDecoder().decode(T);if(C)m+=k,E||(E=setTimeout(L,500));else{const G=R(k);G&&d.write(G)}}},y.onclose=()=>{d.write(`\r
|
|
131
|
+
\x1B[90m[Terminal disconnected]\x1B[0m\r
|
|
132
|
+
`)},y.onerror=()=>{d.write(`\r
|
|
133
|
+
\x1B[31m[WebSocket error]\x1B[0m\r
|
|
134
|
+
`)};const D=/Android|iPhone|iPad|iPod/i.test(navigator.userAgent);let O="",$=0;d.onData(z=>{var B,T,k,G,K,ue;if(y.readyState!==WebSocket.OPEN)return;if(D){const le=Date.now();if(z===O&&le-$<150)return;O=z,$=le}if(C){const le=z.replace(/\x1b\[[\?>][\d;]*c/g,"").replace(/\x1b\[\d+;\d+R/g,"").replace(/\x1b\[\?[\d;]*\$y/g,"");if(!le)return;z=le}const M=n.current;if((M.ctrl||M.cmd)&&z.length===1){const le=z.charCodeAt(0);if(M.ctrl)le>=97&&le<=122?z=String.fromCharCode(le-96):le>=65&&le<=90&&(z=String.fromCharCode(le-64)),M.ctrl=!1,M.cmd=!1,(B=M.clearCallback)==null||B.call(M);else if(M.cmd){const q=z.toLowerCase();if(q==="v"){(T=navigator.clipboard)==null||T.readText().then(N=>{N&&d.paste(N)}).catch(()=>{}),M.ctrl=!1,M.cmd=!1,(k=M.clearCallback)==null||k.call(M);return}if(q==="c"){const N=d.getSelection();N&&((G=navigator.clipboard)==null||G.writeText(N).catch(()=>{})),M.ctrl=!1,M.cmd=!1,(K=M.clearCallback)==null||K.call(M);return}M.ctrl=!1,M.cmd=!1,(ue=M.clearCallback)==null||ue.call(M)}}Sg(y,z)}),d.onResize(({cols:z,rows:M})=>{y.readyState===WebSocket.OPEN&&Ho(y,"resize",{cols:z,rows:M})});const I=new ResizeObserver(l);I.observe(U.current);const P=()=>{document.hidden||l()};return document.addEventListener("visibilitychange",P),()=>{var z;clearTimeout(S),o&&clearTimeout(o),E&&clearTimeout(E),c==null||c.dispose(),b==null||b.dispose(),(z=U.current)==null||z.removeEventListener("paste",h),I.disconnect(),document.removeEventListener("visibilitychange",P),y.close(),d.dispose(),ee.current=null,ae.current=null,j.current=null}},[F]),re.jsxs("div",{style:{width:"100%",height:"100%",display:"flex",flexDirection:"column"},children:[X===!1&&re.jsx("div",{style:{backgroundColor:"#3a2a00",color:"#ffcc00",padding:"4px 12px",fontSize:"12px",flexShrink:0},children:"Session persistence unavailable — this terminal will not survive a restart"}),re.jsx("div",{ref:U,className:"terminal-container",style:{width:"100%",flex:1,backgroundColor:"#1a1a1a"}}),u&&re.jsx(_g,{wsRef:ae,modifierRef:n})]})}function Sg(F,V){const X=new TextEncoder().encode(V),U=new Uint8Array(1+X.length);U[0]=of,U.set(X,1),F.send(U.buffer)}function Ho(F,V,X){const U=JSON.stringify({type:V,payload:X}),ee=new TextEncoder().encode(U),ae=new Uint8Array(1+ee.length);ae[0]=vg,ae.set(ee,1),F.send(ae.buffer)}const Cg=5e3;function yg(){const[F,V]=be.useState(null),[X,U]=be.useState(null),ee=be.useCallback(async()=>{try{const j=await Iv();V(j),U(null)}catch(j){U(j instanceof Error?j.message:"Failed to fetch overview")}},[]);be.useEffect(()=>{ee();const j=setInterval(ee,Cg);return()=>clearInterval(j)},[ee]);const ae=be.useCallback(async()=>{await Pv(),await ee()},[ee]);return{data:F,error:X,refresh:ae}}function bg({name:F,status:V}){const X=F.replace(/-/g," ");return re.jsxs("span",{className:`gate-badge gate-${V}`,children:[X,": ",V]})}function wg({builder:F,onOpen:V}){const X=Object.entries(F.gates).filter(([,ae])=>ae==="pending"||ae==="approved"),U=F.issueNumber?`#${F.issueNumber}`:F.id,ee=F.issueTitle||F.id;return re.jsxs("div",{className:"builder-card",children:[re.jsxs("div",{className:"builder-card-header",children:[re.jsx("div",{className:"builder-card-id",children:U}),re.jsx("span",{className:`builder-mode-badge mode-${F.mode}`,children:F.mode}),V&&re.jsx("button",{className:"builder-open-btn",onClick:()=>V(F),children:"Open"})]}),re.jsx("div",{className:"builder-card-title",children:ee}),F.mode==="strict"&&F.phase&&re.jsxs("div",{className:"builder-card-phase",children:["Phase: ",F.phase]}),F.mode==="soft"&&re.jsx("div",{className:"builder-card-phase soft",children:"running"}),X.length>0&&re.jsx("div",{className:"builder-card-gates",children:X.map(([ae,j])=>re.jsx(bg,{name:ae,status:j},ae))})]})}const Kd={APPROVED:{label:"Approved",className:"review-approved"},CHANGES_REQUESTED:{label:"Changes",className:"review-changes"},REVIEW_REQUIRED:{label:"Review needed",className:"review-pending"}};function xg({prs:F}){return F.length===0?re.jsx("p",{className:"work-empty",children:"No open pull requests"}):re.jsx("div",{className:"pr-list",children:F.map(V=>{const X=Kd[V.reviewStatus]??Kd.REVIEW_REQUIRED;return re.jsxs("div",{className:"pr-item",children:[re.jsxs("div",{className:"pr-item-header",children:[re.jsxs("span",{className:"pr-number",children:["#",V.number]}),re.jsx("span",{className:`review-badge ${X.className}`,children:X.label})]}),re.jsx("div",{className:"pr-item-title",children:V.title}),V.linkedIssue&&re.jsxs("div",{className:"pr-linked-issue",children:["Linked: Issue #",V.linkedIssue]})]},V.number)})})}function Eg(F){const V=Date.now()-new Date(F).getTime(),X=Math.floor(V/(1e3*60*60*24));if(X===0)return"today";if(X===1)return"1 day ago";if(X<30)return`${X} days ago`;const U=Math.floor(X/30);return U===1?"1 month ago":`${U} months ago`}function Lg({items:F}){if(F.length===0)return re.jsx("p",{className:"work-empty",children:"No open issues"});const V=F.filter(ee=>!ee.hasBuilder),X=V.filter(ee=>ee.hasSpec),U=V.filter(ee=>!ee.hasSpec);return re.jsxs("div",{className:"backlog-list",children:[X.length>0&&re.jsxs("div",{className:"backlog-group",children:[re.jsxs("h4",{className:"backlog-group-title",children:["Ready to Start (",X.length,")"]}),X.map(ee=>re.jsx(Qd,{item:ee},ee.number))]}),U.length>0&&re.jsxs("div",{className:"backlog-group",children:[re.jsxs("h4",{className:"backlog-group-title",children:["Backlog (",U.length,")"]}),U.map(ee=>re.jsx(Qd,{item:ee},ee.number))]})]})}function Qd({item:F}){return re.jsxs("div",{className:"backlog-item",children:[re.jsxs("div",{className:"backlog-item-header",children:[re.jsxs("span",{className:"backlog-number",children:["#",F.number]}),re.jsx("span",{className:`type-badge type-${F.type}`,children:F.type}),re.jsx("span",{className:`priority-badge priority-${F.priority}`,children:F.priority})]}),re.jsx("div",{className:"backlog-item-title",children:F.title}),re.jsx("div",{className:"backlog-item-meta",children:Eg(F.createdAt)})]})}function Mg(F,V){const X=F.replace(/^\//,"");return V.staged.some(U=>X.endsWith(U)||U.endsWith(X))?{indicator:"A",className:"git-staged"}:V.modified.some(U=>X.endsWith(U)||U.endsWith(X))?{indicator:"M",className:"git-modified"}:V.untracked.some(U=>X.endsWith(U)||U.endsWith(X))?{indicator:"?",className:"git-untracked"}:null}function hf({entry:F,expanded:V,gitStatus:X,onToggle:U,onOpen:ee,depth:ae=0}){var d;const j=F.type==="directory",n=V.has(F.path),u=j?null:Mg(F.path,X);return re.jsxs(re.Fragment,{children:[re.jsxs("div",{className:`file-node ${j?"directory":"file"}`,style:{paddingLeft:`${ae*16+8}px`},onClick:()=>j?U(F.path):ee(F.path),role:"treeitem","aria-expanded":j?n:void 0,tabIndex:0,onKeyDown:_=>{(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),j?U(F.path):ee(F.path))},children:[re.jsx("span",{className:"file-icon",children:j?n?"📂":"📁":"📄"}),re.jsx("span",{className:"file-name",children:F.name}),u&&re.jsx("span",{className:`git-indicator ${u.className}`,children:u.indicator})]}),j&&n&&((d=F.children)==null?void 0:d.map(_=>re.jsx(hf,{entry:_,expanded:V,gitStatus:X,onToggle:U,onOpen:ee,depth:ae+1},_.path)))]})}function uf(F,V=[]){for(const X of F)X.type==="file"&&V.push(X),X.children&&uf(X.children,V);return V}function Ag({onRefresh:F}){const[V,X]=be.useState([]),[U,ee]=be.useState(new Set),[ae,j]=be.useState(null),[n,u]=be.useState(!1),[d,_]=be.useState({modified:[],staged:[],untracked:[]}),[a,p]=be.useState([]),[w,b]=be.useState(""),[c,r]=be.useState(!1),h=be.useRef(null),o=be.useCallback(async()=>{try{const L=await $v();X(L),j(null),u(!0)}catch(L){j(L.message)}},[]),l=be.useCallback(async()=>{try{const L=await qv();_(L)}catch(L){console.error("Failed to load git status:",L)}},[]),S=be.useCallback(async()=>{try{const L=await Wv();p(L)}catch(L){console.error("Failed to load recent files:",L)}},[]);be.useEffect(()=>{n||(o(),l(),S())},[n,o,l,S]),be.useEffect(()=>{const L=setInterval(()=>{o(),l()},5e3);return()=>clearInterval(L)},[o,l]);const x=L=>{ee(D=>{const O=new Set(D);return O.has(L)?O.delete(L):O.add(L),O})},v=async L=>{try{await ef(L),F(),S()}catch(D){console.error("Failed to open file:",D)}},y=be.useMemo(()=>uf(V),[V]),m=be.useMemo(()=>{if(!w.trim())return[];const L=w.toLowerCase();return y.filter(D=>D.name.toLowerCase().includes(L)||D.path.toLowerCase().includes(L)).slice(0,10)},[y,w]),C=L=>{b(L.target.value),r(!0)},E=L=>{L.key==="Escape"?(r(!1),b("")):L.key==="Enter"&&m.length>0&&(v(m[0].path),b(""),r(!1))},R=L=>{v(L),b(""),r(!1)};return ae?re.jsxs("div",{className:"file-tree-error",children:["Error: ",ae]}):n?re.jsxs("div",{className:"file-tree-container",children:[re.jsxs("div",{className:"file-search",children:[re.jsx("input",{ref:h,type:"text",className:"file-search-input",placeholder:"Search files...",value:w,onChange:C,onKeyDown:E,onFocus:()=>r(!0),onBlur:()=>setTimeout(()=>r(!1),200)}),c&&m.length>0&&re.jsx("div",{className:"file-search-suggestions",children:m.map(L=>re.jsxs("div",{className:"file-search-suggestion",onMouseDown:()=>R(L.path),children:[re.jsx("span",{className:"suggestion-name",children:L.name}),re.jsx("span",{className:"suggestion-path",children:L.path})]},L.path))})]}),a.length>0&&re.jsxs("div",{className:"file-tree-section",children:[re.jsx("div",{className:"file-tree-section-header",children:"Recent"}),a.map(L=>re.jsxs("div",{className:"file-node file recent-file",style:{paddingLeft:"8px"},onClick:()=>v(L.path),role:"treeitem",tabIndex:0,onKeyDown:D=>{(D.key==="Enter"||D.key===" ")&&(D.preventDefault(),v(L.path))},children:[re.jsx("span",{className:"file-icon",children:"🕐"}),re.jsx("span",{className:"file-name",children:L.name}),re.jsx("span",{className:"file-path-hint",children:L.relativePath})]},L.id))]}),re.jsxs("div",{className:"file-tree-section",children:[re.jsx("div",{className:"file-tree-section-header",children:"Files"}),re.jsx("div",{className:"file-tree",role:"tree","aria-label":"Project files",children:V.map(L=>re.jsx(hf,{entry:L,expanded:U,gitStatus:d,onToggle:x,onOpen:v},L.path))})]})]}):re.jsx("div",{className:"file-tree-loading",children:"Loading files..."})}function Rg({state:F,onRefresh:V,onSelectTab:X}){var _,a,p,w,b;const{data:U,error:ee,refresh:ae}=yg(),[j,n]=be.useState(!1),u=be.useCallback(async()=>{try{await Fv(),V()}catch(c){console.error("Failed to create shell:",c)}},[V]),d=be.useCallback(c=>{var h;const r=(h=F==null?void 0:F.builders)==null?void 0:h.find(o=>{var l,S,x,v;return c.issueNumber?((l=o.name)==null?void 0:l.includes(String(c.issueNumber)))||((S=o.id)==null?void 0:S.includes(String(c.issueNumber))):((x=o.id)==null?void 0:x.includes(c.id))||((v=o.name)==null?void 0:v.includes(c.id))});r&&(X==null||X(r.id))},[F==null?void 0:F.builders,X]);return F?re.jsxs("div",{className:`work-view ${j?"file-panel-open":""}`,children:[re.jsxs("div",{className:"work-content",children:[re.jsxs("div",{className:"work-header",children:[re.jsx("h2",{className:"work-title",children:"Work"}),re.jsxs("div",{className:"work-actions",children:[re.jsx("button",{className:"work-btn",onClick:u,children:"+ Shell"}),re.jsx("button",{className:"work-btn work-btn-secondary",onClick:ae,children:"Refresh"})]})]}),ee&&re.jsxs("div",{className:"work-error",children:["Failed to load overview: ",ee]}),re.jsxs("section",{className:"work-section",children:[re.jsxs("h3",{className:"work-section-title",children:["Active Builders",re.jsx("span",{className:"work-section-count",children:((_=U==null?void 0:U.builders)==null?void 0:_.length)??0})]}),U!=null&&U.builders&&U.builders.length>0?re.jsx("div",{className:"builder-grid",children:U.builders.map(c=>re.jsx(wg,{builder:c,onOpen:d},c.id))}):re.jsx("p",{className:"work-empty",children:"No active builders"})]}),re.jsxs("section",{className:"work-section",children:[re.jsxs("h3",{className:"work-section-title",children:["Pending PRs",re.jsx("span",{className:"work-section-count",children:((a=U==null?void 0:U.pendingPRs)==null?void 0:a.length)??0})]}),(p=U==null?void 0:U.errors)!=null&&p.prs?re.jsx("p",{className:"work-unavailable",children:U.errors.prs}):re.jsx(xg,{prs:(U==null?void 0:U.pendingPRs)??[]})]}),re.jsxs("section",{className:"work-section",children:[re.jsxs("h3",{className:"work-section-title",children:["Backlog & Open Bugs",re.jsx("span",{className:"work-section-count",children:((w=U==null?void 0:U.backlog)==null?void 0:w.length)??0})]}),(b=U==null?void 0:U.errors)!=null&&b.issues?re.jsx("p",{className:"work-unavailable",children:U.errors.issues}):re.jsx(Lg,{items:(U==null?void 0:U.backlog)??[]})]})]}),re.jsxs("div",{className:`work-file-panel ${j?"expanded":"collapsed"}`,children:[re.jsxs("div",{className:"work-file-panel-header",children:[re.jsx("span",{className:"work-file-panel-toggle",onClick:()=>n(!j),children:j?"▼":"▲"}),re.jsx("span",{className:"work-file-panel-label",onClick:()=>n(!j),children:"Files"}),!j&&re.jsx("input",{className:"work-file-panel-search",type:"text",placeholder:"Search files...",onFocus:()=>n(!0)})]}),j&&re.jsx("div",{className:"work-file-panel-content",children:re.jsx(Ag,{onRefresh:V})})]})]}):re.jsx("div",{className:"work-view",children:re.jsx("p",{className:"work-loading",children:"Loading..."})})}function Dg({tabs:F,activeTabId:V,onSelectTab:X,onRefresh:U,children:ee}){return re.jsxs("div",{className:"mobile-layout",children:[re.jsx(rf,{tabs:F,activeTabId:V,onSelectTab:X,onRefresh:U}),re.jsx("div",{className:"mobile-content",children:ee})]})}function Tg({tabId:F,initialLine:V}){let U=`${Jd()}api/annotate/${F}/`;return V&&(U+=`?line=${V}`),re.jsx("div",{className:"file-viewer",style:{width:"100%",height:"100%"},children:re.jsx("iframe",{src:U,style:{width:"100%",height:"100%",border:"none"},title:"File Annotator"})})}function Bg(){var h,o,l,S;const{state:F,refresh:V}=Gv(),{tabs:X,activeTab:U,activeTabId:ee,selectTab:ae}=Vv(F),j=sf(`(max-width: ${Zd}px)`),[n,u]=be.useState(new Set),d=be.useRef(new Map),_=be.useCallback(async(x,v,y,m)=>{try{const C=await ef(x,v,m);v&&v>0&&d.current.set(C.id,v),V()}catch(C){console.error("Failed to open file:",C)}},[V]);be.useEffect(()=>{F!=null&&F.workspaceName?document.title=`${F.workspaceName} Agent Farm`:document.title="Agent Farm"},[F==null?void 0:F.workspaceName]);const[a]=be.useState(()=>new URLSearchParams(window.location.search).get("fullscreen")==="1");be.useEffect(()=>{if(!U)return;(U.type==="architect"||U.type==="builder"||U.type==="shell")&&u(v=>{if(v.has(U.id))return v;const y=new Set(v);return y.add(U.id),y})},[U==null?void 0:U.id,U==null?void 0:U.type]);const p=x=>{const v=$d(x);return v?re.jsx(Yd,{wsPath:v,onFileOpen:_,persistent:x.persistent}):re.jsx("div",{className:"no-terminal",children:"No terminal session"})},w=x=>{if(!x.annotationId||!F)return re.jsx("div",{className:"no-terminal",children:"No file viewer"});if(!F.annotations.find(m=>m.id===x.annotationId))return re.jsx("div",{className:"no-terminal",children:"Annotation not found"});const y=d.current.get(x.annotationId);return y!==void 0&&d.current.delete(x.annotationId),re.jsx(Tg,{tabId:x.annotationId,initialLine:y??x.initialLine})},b=x=>{const v=X.filter(y=>x.includes(y.type)&&n.has(y.id));return re.jsxs(re.Fragment,{children:[v.map(y=>{const m=$d(y);return re.jsx("div",{className:"terminal-tab-pane",style:{display:ee===y.id?void 0:"none"},children:m?re.jsx(Yd,{wsPath:m,onFileOpen:_,persistent:y.persistent}):re.jsx("div",{className:"no-terminal",children:"No terminal session"})},y.id)}),(U==null?void 0:U.type)==="work"&&re.jsx(Rg,{state:F,onRefresh:V,onSelectTab:ae}),(U==null?void 0:U.type)==="file"&&w(U)]})};if(a)return U&&(U.type==="architect"||U.type==="builder"||U.type==="shell")?re.jsx("div",{className:"fullscreen-terminal",children:p(U)}):re.jsx("div",{className:"fullscreen-terminal"});if(j)return re.jsx("div",{className:"mobile-wrapper",children:re.jsx(Dg,{tabs:X,activeTabId:ee,onSelectTab:ae,onRefresh:V,children:b(["architect","builder","shell"])})});const c=X.find(x=>x.type==="architect"),r=c?p(c):re.jsx("div",{className:"no-architect",children:"No architect terminal"});return re.jsxs("div",{className:"app",children:[re.jsxs("header",{className:"app-header",children:[re.jsx("h1",{className:"app-title",children:"Agent Farm"}),re.jsx("div",{className:"header-meta",children:re.jsxs("span",{className:"builder-count",children:[((h=F==null?void 0:F.builders)==null?void 0:h.length)??0," builder(s)"]})})]}),re.jsx("div",{className:"app-body",children:re.jsx(Yv,{left:r,right:re.jsxs("div",{className:"right-panel",children:[re.jsx(rf,{tabs:X.filter(x=>x.type!=="architect"),activeTabId:ee,onSelectTab:ae,onRefresh:V}),re.jsx("div",{className:"tab-content",role:"tabpanel",children:b(["builder","shell"])})]})})}),re.jsxs("footer",{className:"status-bar",children:[re.jsxs("span",{children:[((o=F==null?void 0:F.builders)==null?void 0:o.length)??0," builders"]}),re.jsxs("span",{children:[((l=F==null?void 0:F.utils)==null?void 0:l.length)??0," shells"]}),re.jsxs("span",{children:[((S=F==null?void 0:F.annotations)==null?void 0:S.length)??0," files"]})]})]})}zv.createRoot(document.getElementById("root")).render(re.jsx(be.StrictMode,{children:re.jsx(Bg,{})}));
|
|
135
|
+
//# sourceMappingURL=index-B-s8BA2l.js.map
|