diff --git a/Agent.md b/Agent.md index df0657c4..d3685cc6 100644 --- a/Agent.md +++ b/Agent.md @@ -85,7 +85,7 @@ Usage: say "tool loop" for the whole process, "round N" for a single LLM request - Streaming chat with delta rendering (16ms batching), markdown on done (marked + DOMPurify + local highlight.js subset), tool call status cards (2000-char truncation + expand) - Session list/switch/new/delete + right-click rename (context menu, #423) synced with daemon; own-stream busy lock (G65); broadcast streams from other clients tagged "来自其他客户端" - Disconnect/reconnect: red status dot, auto daemon respawn (stale-port detection), session resume, input bar restored on disconnect (no 30s fake-timeout) - - Unit tests `npm test` (247: 45 daemon_client + 19 conn-manager + 22 app-commands + 121 renderer smoke + 16 i18n + 7 integration + 3 commands + 5 build-config + 7 gui-state + 2 tool-group); RESPONSE_TYPES mirror daemon protocol verified against `daemon.py` + - Unit tests `npm test` (249: 45 daemon_client + 19 conn-manager + 22 app-commands + 122 renderer smoke + 16 i18n + 7 integration + 3 commands + 6 build-config + 7 gui-state + 2 tool-group); RESPONSE_TYPES mirror daemon protocol verified against `daemon.py` - **Scheduled tasks** — Task generalization + CRUD (rant 2026-08-12T18:23:15, #709/#710/#711) - Task handler generalized: `TaskHandler` (renamed from `EvolutionHandler`), repo-configured self-heal for any project, template lookup builtin → `~/.emrg/task-templates/.md` → fallback - Daemon commands: `task_create/update/delete` + `task_template_create/list/update/delete` (tasks stored in `~/.emrg/tasks.yml`, custom type templates in `~/.emrg/task-templates/`) @@ -119,7 +119,7 @@ pkill -f "emrg.server"; rm -f ~/.emrg/emrgd.port; python -m emrg ``` Python: `uv run pytest tests/ -v` (825) — import check: `uv run python -c "from emrg.client.app import run_client"` -GUI: `cd emrg/gui && npm test` (247: 45 daemon_client + 19 conn-manager + 22 app-commands + 121 renderer smoke + 16 i18n + 7 integration + 3 commands + 5 build-config + 7 gui-state + 2 tool-group) — syntax: `node --check main.js preload.js daemon_client.js renderer/js/*.js` +GUI: `cd emrg/gui && npm test` (249: 45 daemon_client + 19 conn-manager + 22 app-commands + 122 renderer smoke + 16 i18n + 7 integration + 3 commands + 6 build-config + 7 gui-state + 2 tool-group) — syntax: `node --check main.js preload.js daemon_client.js renderer/js/*.js` CI: `uv run pytest` (ubuntu + **windows-2025 matrix** — Windows pytest 回归在 PR CI 即失败,v0.2.29 教训 #725) + GUI tests + **actionlint workflow lint** (`rhysd/actionlint@v1.7.12` gate, #444 — workflow 解析错误在 PR CI 即失败,如 `if:` secrets 上下文) Re-trigger: `scripts/re-trigger-ci.sh [branch]` (workflow_dispatch, #527 — 替代空 commit 重触发:Actions outage 会整段丢弃 push 事件,dispatch 走 API 路径不受影响) diff --git a/emrg/gui/package-lock.json b/emrg/gui/package-lock.json index e9f81c76..2de3ca92 100644 --- a/emrg/gui/package-lock.json +++ b/emrg/gui/package-lock.json @@ -16,7 +16,8 @@ }, "devDependencies": { "electron": "^31.3.0", - "electron-builder": "^24.13.3" + "electron-builder": "^24.13.3", + "monaco-editor": "^0.56.0" } }, "node_modules/@develar/schema-utils": { @@ -689,6 +690,7 @@ "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -843,7 +845,6 @@ "integrity": "sha512-+25nxyyznAXF7Nef3y0EbBeqmGZgeN/BxHX29Rs39djAfaFalmQ89SE6CWyDCHzGL0yt/ycBtNOmGTW0FyGWNw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "archiver-utils": "^2.1.0", "async": "^3.2.4", @@ -863,7 +864,6 @@ "integrity": "sha512-bEL/yUb/fNNiNTuUz979Z0Yg5L+LzLxGJz8x79lYmR54fmTIb6ob/hNQgkQnIUDWIFjZVQwl9Xs356I6BAMHfw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "glob": "^7.1.4", "graceful-fs": "^4.2.0", @@ -886,7 +886,6 @@ "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -902,8 +901,7 @@ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/archiver-utils/node_modules/string_decoder": { "version": "1.1.1", @@ -911,7 +909,6 @@ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "safe-buffer": "~5.1.0" } @@ -1013,7 +1010,6 @@ "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "buffer": "^5.5.0", "inherits": "^2.0.4", @@ -1386,7 +1382,6 @@ "integrity": "sha512-D3uMHtGc/fcO1Gt1/L7i1e33VOvD4A9hfQLP+6ewd+BvG/gQ84Yh4oftEhAdjSMgBgwGL+jsppT7JYNpo6MHHg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "buffer-crc32": "^0.2.13", "crc32-stream": "^4.0.2", @@ -1487,7 +1482,6 @@ "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", "dev": true, "license": "Apache-2.0", - "peer": true, "bin": { "crc32": "bin/crc32.njs" }, @@ -1501,7 +1495,6 @@ "integrity": "sha512-NT7w2JVU7DFroFdYkeq8cywxrgjPHWkdX1wjpRQXPX5Asews3tA+Ght6lddQO5Mkumffp3X7GEqku3epj2toIw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "crc-32": "^1.2.0", "readable-stream": "^3.4.0" @@ -1679,6 +1672,7 @@ "integrity": "sha512-rcJUkMfnJpfCboZoOOPf4L29TRtEieHNOeAbYPWPxlaBw/Z1RKrRA86dOI9rwaI4tQSc/RD82zTNHprfUHXsoQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "app-builder-lib": "24.13.3", "builder-util": "24.13.1", @@ -1872,7 +1866,6 @@ "integrity": "sha512-oHkV0iogWfyK+ah9ZIvMDpei1m9ZRpdXcvde1wTpra2U8AFDNNpqJdnin5z+PM1GbQ5BoaKCWas2HSjtR0HwMg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "app-builder-lib": "24.13.3", "archiver": "^5.3.1", @@ -1886,7 +1879,6 @@ "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", @@ -1902,7 +1894,6 @@ "integrity": "sha512-zwOTdL3rFQ/lRdBnntKVOX6k5cKJwEc1HdilT71BWEu7J41gXIB2MRp+vxduPSwZJPWBxEzv4yH1wYLJGUHX4Q==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "universalify": "^2.0.0" }, @@ -1916,7 +1907,6 @@ "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">= 10.0.0" } @@ -2233,8 +2223,7 @@ "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/fs-extra": { "version": "8.1.0", @@ -2739,8 +2728,7 @@ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/isbinaryfile": { "version": "5.0.7", @@ -2887,7 +2875,6 @@ "integrity": "sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "readable-stream": "^2.0.5" }, @@ -2901,7 +2888,6 @@ "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -2917,8 +2903,7 @@ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/lazystream/node_modules/string_decoder": { "version": "1.1.1", @@ -2926,7 +2911,6 @@ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "safe-buffer": "~5.1.0" } @@ -2943,40 +2927,35 @@ "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", "integrity": "sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/lodash.difference": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.difference/-/lodash.difference-4.5.0.tgz", "integrity": "sha512-dS2j+W26TQ7taQBGN8Lbbq04ssV3emRw4NY58WErlTO29pIqS0HmoT5aJ9+TUQ1N3G+JOZSji4eugsWwGp9yPA==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/lodash.flatten": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", "integrity": "sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/lodash.isplainobject": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/lodash.union": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/lodash.union/-/lodash.union-4.6.0.tgz", "integrity": "sha512-c4pB2CdGrGdjMKYLA+XiRDO7Y0PRQbm/Gzg8qMj+QH+pFVAoTp5sBpO0odL3FjoPCGjK96p6qsP+yQoiLoOBcw==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/lowercase-keys": { "version": "2.0.0", @@ -3156,6 +3135,40 @@ "node": ">=10" } }, + "node_modules/monaco-editor": { + "version": "0.56.0", + "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.56.0.tgz", + "integrity": "sha512-sXboRm3BeBeLm938eaiyLMe0OxzfXIlZvbv4ir/jVgQy1zDhWjgmny0WoN45fuDKhCCQsYMbBJrv/A6jd8aCUg==", + "dev": true, + "license": "MIT", + "dependencies": { + "dompurify": "3.4.8", + "marked": "14.0.0" + } + }, + "node_modules/monaco-editor/node_modules/dompurify": { + "version": "3.4.8", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.8.tgz", + "integrity": "sha512-yb1cEmaOum7wFvOCSQxyfgVlv5D47Rc30iZWoMpbDIWTnJ6grDDQyu2KFJzB2k7u0pMuJcQ1zphH//fFnw2tjQ==", + "dev": true, + "license": "(MPL-2.0 OR Apache-2.0)", + "optionalDependencies": { + "@types/trusted-types": "^2.0.7" + } + }, + "node_modules/monaco-editor/node_modules/marked": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-14.0.0.tgz", + "integrity": "sha512-uIj4+faQ+MgHgwUW1l2PsPglZLOLOT1uErt06dAPtx2kjteLAkbsd/0FiYg/MGS+i7ZKLb7w2WClxHkzOOuryQ==", + "dev": true, + "license": "MIT", + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 18" + } + }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -3177,7 +3190,6 @@ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=0.10.0" } @@ -3311,8 +3323,7 @@ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/progress": { "version": "2.0.3", @@ -3396,7 +3407,6 @@ "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -3412,7 +3422,6 @@ "integrity": "sha512-v05I2k7xN8zXvPD9N+z/uhXPaj0sUFCe2rcWZIpBsqxfP7xXFQ0tipAd/wjj1YxWyWtUS5IDJpOG82JKt2EAVA==", "dev": true, "license": "Apache-2.0", - "peer": true, "dependencies": { "minimatch": "^5.1.0" } @@ -3495,8 +3504,7 @@ "url": "https://feross.org/support" } ], - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/safer-buffer": { "version": "2.1.2", @@ -3707,7 +3715,6 @@ "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "safe-buffer": "~5.2.0" } @@ -3821,7 +3828,6 @@ "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "bl": "^4.0.3", "end-of-stream": "^1.4.1", @@ -3979,8 +3985,7 @@ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/verror": { "version": "1.10.1", @@ -4152,7 +4157,6 @@ "integrity": "sha512-9qv4rlDiopXg4E69k+vMHjNN63YFMe9sZMrdlvKnCjlCRWeCBswPPMPUfx+ipsAWq1LXHe70RcbaHdJJpS6hyQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "archiver-utils": "^3.0.4", "compress-commons": "^4.1.2", @@ -4168,7 +4172,6 @@ "integrity": "sha512-KVgf4XQVrTjhyWmx6cte4RxonPLR9onExufI1jhvw/MQ4BB6IsZD5gT8Lq+u/+pRkWna/6JoHpiQioaqFP5Rzw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "glob": "^7.2.3", "graceful-fs": "^4.2.0", diff --git a/emrg/gui/package.json b/emrg/gui/package.json index 0f7768cc..79f9d886 100644 --- a/emrg/gui/package.json +++ b/emrg/gui/package.json @@ -19,7 +19,8 @@ }, "devDependencies": { "electron": "^31.3.0", - "electron-builder": "^24.13.3" + "electron-builder": "^24.13.3", + "monaco-editor": "^0.56.0" }, "build": { "appId": "com.emrg.gui", diff --git a/emrg/gui/renderer/css/components.css b/emrg/gui/renderer/css/components.css index 1c552104..6a07c363 100644 --- a/emrg/gui/renderer/css/components.css +++ b/emrg/gui/renderer/css/components.css @@ -954,6 +954,21 @@ dialog::backdrop { font-size: var(--fs-secondary); } +/* rant 09:17:45:提示词编辑器 Monaco 挂载容器(长提示词 300px 起步) */ +.monaco-host { + width: 100%; + min-height: 300px; + margin-top: 2px; + border: 1px solid var(--border); + border-radius: 8px; + overflow: hidden; + background: var(--bg-1); +} +.task-form .hidden, +.monaco-host.hidden { + display: none; +} + .theme-options { display: flex; gap: var(--sp-2); diff --git a/emrg/gui/renderer/index.html b/emrg/gui/renderer/index.html index 94702db7..6d62b6e2 100644 --- a/emrg/gui/renderer/index.html +++ b/emrg/gui/renderer/index.html @@ -10,6 +10,7 @@ +
@@ -115,7 +116,7 @@

任务管理

"),!0)}layoutLine(e,t,i){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(i),this._domNode.setLineHeight(i))}}class AU extends BI{constructor(e){super(e);const i=this._context.configuration.options.get(165);this._contentWidth=i.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(e){const i=this._context.configuration.options.get(165);return this._contentWidth=i.contentWidth,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollWidthChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e),this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth))}}class OU extends BI{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(165);this._contentLeft=i.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),Ot(this.domNode,t.get(59))}onConfigurationChanged(e){const t=this._context.configuration.options;Ot(this.domNode,t.get(59));const i=t.get(165);return this._contentLeft=i.contentLeft,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollHeightChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e);const t=Math.min(e.scrollHeight,1e6);this.domNode.setHeight(t),this.domNode.setWidth(this._contentLeft)}}class um{constructor(e){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=e}emitKeyDown(e){this.onKeyDown?.(e)}emitKeyUp(e){this.onKeyUp?.(e)}emitContextMenu(e){this.onContextMenu?.(this._convertViewToModelMouseEvent(e))}emitMouseMove(e){this.onMouseMove?.(this._convertViewToModelMouseEvent(e))}emitMouseLeave(e){this.onMouseLeave?.(this._convertViewToModelMouseEvent(e))}emitMouseDown(e){this.onMouseDown?.(this._convertViewToModelMouseEvent(e))}emitMouseUp(e){this.onMouseUp?.(this._convertViewToModelMouseEvent(e))}emitMouseDrag(e){this.onMouseDrag?.(this._convertViewToModelMouseEvent(e))}emitMouseDrop(e){this.onMouseDrop?.(this._convertViewToModelMouseEvent(e))}emitMouseDropCanceled(){this.onMouseDropCanceled?.()}emitMouseWheel(e){this.onMouseWheel?.(e)}_convertViewToModelMouseEvent(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}_convertViewToModelMouseTarget(e){return um.convertViewToModelMouseTarget(e,this._coordinatesConverter)}static convertViewToModelMouseTarget(e,t){const i={...e};return i.position&&(i.position=t.convertViewPositionToModelPosition(i.position)),i.range&&(i.range=t.convertViewRangeToModelRange(i.range)),(i.type===5||i.type===8)&&(i.detail=this.convertViewToModelViewZoneData(i.detail,t)),i}static convertViewToModelViewZoneData(e,t){return{viewZoneId:e.viewZoneId,positionBefore:e.positionBefore?t.convertViewPositionToModelPosition(e.positionBefore):e.positionBefore,positionAfter:e.positionAfter?t.convertViewPositionToModelPosition(e.positionAfter):e.positionAfter,position:t.convertViewPositionToModelPosition(e.position),afterLineNumber:t.convertViewPositionToModelPosition(new l.Position(e.afterLineNumber,1)).lineNumber}}}class PU extends gi{constructor(e){super(e),this.blocks=[],this.contentWidth=-1,this.contentLeft=0,this.domNode=we(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("blockDecorations-container"),this.update()}update(){let e=!1;const i=this._context.configuration.options.get(165),n=i.contentWidth-i.verticalScrollbarWidth;this.contentWidth!==n&&(this.contentWidth=n,e=!0);const s=i.contentLeft;return this.contentLeft!==s&&(this.contentLeft=s,e=!0),e}onConfigurationChanged(e){return this.update()}onScrollChanged(e){return e.scrollTopChanged||e.scrollLeftChanged}onDecorationsChanged(e){return!0}onZonesChanged(e){return!0}prepareRender(e){}render(e){let t=0;const i=e.getDecorationsInViewport();for(const n of i){if(!n.options.blockClassName)continue;let s=this.blocks[t];s||(s=this.blocks[t]=we(document.createElement("div")),this.domNode.appendChild(s));let r,a;n.options.blockIsAfterEnd?(r=e.getVerticalOffsetAfterLineNumber(n.range.endLineNumber,!1),a=e.getVerticalOffsetAfterLineNumber(n.range.endLineNumber,!0)):(r=e.getVerticalOffsetForLineNumber(n.range.startLineNumber,!0),a=n.range.isEmpty()&&!n.options.blockDoesNotCollapse?e.getVerticalOffsetForLineNumber(n.range.startLineNumber,!1):e.getVerticalOffsetAfterLineNumber(n.range.endLineNumber,!0));const[c,h,d,u]=n.options.blockPadding??[0,0,0,0];s.setClassName("blockDecorations-block "+n.options.blockClassName),s.setLeft(this.contentLeft-u),s.setWidth(this.contentWidth+u+h),s.setTop(r-e.scrollTop-c),s.setHeight(a-r+c+d),t++}for(let n=t;n0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(e,t,i,n){const s=e.top,r=s,a=e.top+e.height,c=n.viewportHeight-a,h=s-i,d=r>=i,u=a,f=c>=i;let g=e.left;return g+t>n.scrollLeft+n.viewportWidth&&(g=n.scrollLeft+n.viewportWidth-t),gc){const f=u-(c-n);u-=f,i-=f}if(u=p,C=u+i<=f.height-b;return this._fixedOverflowWidgets?{fitsAbove:v,aboveTop:Math.max(d,p),fitsBelow:C,belowTop:u,left:m}:{fitsAbove:v,aboveTop:s,fitsBelow:C,belowTop:r,left:g}}_prepareRenderWidgetAtExactPositionOverflowing(e){return new Vd(e.top,e.left+this._contentLeft)}_getAnchorsCoordinates(e){const t=s(this._primaryAnchor.viewPosition,this._affinity),i=this._secondaryAnchor.viewPosition?.lineNumber===this._primaryAnchor.viewPosition?.lineNumber?this._secondaryAnchor.viewPosition:null,n=s(i,this._affinity);return{primary:t,secondary:n};function s(r,a){if(!r)return null;const c=e.visibleRangeForPosition(r);if(!c)return null;const h=r.column===1&&a===3?0:c.left,d=e.getVerticalOffsetForLineNumber(r.lineNumber)-e.scrollTop,u=e.getLineHeightForLineNumber(r.lineNumber);return new zI(d,h,u)}}_reduceAnchorCoordinates(e,t,i){if(!t)return e;const n=this._context.configuration.options.get(59);let s=t.left;return se.endLineNumber||this.domNode.setMaxWidth(this._maxWidth)}prepareRender(e){this._renderData=this._prepareRenderWidget(e)}render(e){if(!this._renderData||this._renderData.kind==="offViewport"){this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this._renderData?.kind==="offViewport"&&this._renderData.preserveFocus?this.domNode.setTop(-1e3):this.domNode.setVisibility("hidden")),typeof this._actual.afterRender=="function"&&Vv(this._actual.afterRender,this._actual,null,null);return}this.allowEditorOverflow?(this.domNode.setTop(this._renderData.coordinate.top),this.domNode.setLeft(this._renderData.coordinate.left)):(this.domNode.setTop(this._renderData.coordinate.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),typeof this._actual.afterRender=="function"&&Vv(this._actual.afterRender,this._actual,this._renderData.position,this._renderData.coordinate)}}class zd{constructor(e,t){this.modelPosition=e,this.viewPosition=t}}class Vd{constructor(e,t){this.top=e,this.left=t,this._coordinateBrand=void 0}}class zI{constructor(e,t,i){this.top=e,this.left=t,this.height=i,this._anchorCoordinateBrand=void 0}}function Vv(o,e,...t){try{return o.call(e,...t)}catch{return null}}class hr extends ma{}const _i=le("themeService");function La(o){return{id:o}}function Uv(o){switch(o){case Sn.DARK:return cc.VS_DARK;case Sn.HIGH_CONTRAST_DARK:return cc.HC_BLACK;case Sn.HIGH_CONTRAST_LIGHT:return cc.HC_LIGHT;default:return cc.VS}}const VI={ThemingContribution:"base.contributions.theming"};class BU extends l.Disposable{constructor(){super(),this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=this._register(new l.Emitter)}onColorThemeChange(e){return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),l.toDisposable(()=>{const t=this.themingParticipants.indexOf(e);this.themingParticipants.splice(t,1)})}getThemingParticipants(){return this.themingParticipants}}const UI=new BU;St.add(VI.ThemingContribution,UI);function vs(o){return UI.onColorThemeChange(o)}class zU extends l.Disposable{constructor(e){super(),this.themeService=e,this.theme=e.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(t=>this.onThemeChange(t)))}onThemeChange(e){this.theme=e,this.updateStyles()}updateStyles(){}}const $v=E("editor.lineHighlightBackground",null,l.localize(641,"Background color for the highlight of line at the cursor position.")),VU=E("editor.inactiveLineHighlightBackground",$v,l.localize(642,"Background color for the highlight of line at the cursor position when the editor is not focused.")),$I=E("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hcDark:"#f38518",hcLight:pe},l.localize(643,"Background color for the border around the line at the cursor position."));E("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hcDark:null,hcLight:null},l.localize(644,"Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations."),!0),E("editor.rangeHighlightBorder",{dark:null,light:null,hcDark:ot,hcLight:ot},l.localize(645,"Background color of the border around highlighted ranges.")),E("editor.symbolHighlightBackground",{dark:Cs,light:Cs,hcDark:null,hcLight:null},l.localize(646,"Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations."),!0),E("editor.symbolHighlightBorder",{dark:null,light:null,hcDark:ot,hcLight:ot},l.localize(647,"Background color of the border around highlighted symbols."));const fm=E("editorCursor.foreground",{dark:"#AEAFAD",light:l.Color.black,hcDark:l.Color.white,hcLight:"#0F4A85"},l.localize(648,"Color of the editor cursor.")),Kv=E("editorCursor.background",null,l.localize(649,"The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),KI=E("editorMultiCursor.primary.foreground",fm,l.localize(650,"Color of the primary editor cursor when multiple cursors are present.")),UU=E("editorMultiCursor.primary.background",Kv,l.localize(651,"The background color of the primary editor cursor when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.")),GI=E("editorMultiCursor.secondary.foreground",fm,l.localize(652,"Color of secondary editor cursors when multiple cursors are present.")),$U=E("editorMultiCursor.secondary.background",Kv,l.localize(653,"The background color of secondary editor cursors when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.")),Gv=E("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hcDark:"#e3e4e229",hcLight:"#CCCCCC"},l.localize(654,"Color of whitespace characters in the editor.")),KU=E("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hcDark:l.Color.white,hcLight:"#292929"},l.localize(655,"Color of editor line numbers.")),GU=E("editorIndentGuide.background",Gv,l.localize(656,"Color of the editor indentation guides."),!1,l.localize(657,"'editorIndentGuide.background' is deprecated. Use 'editorIndentGuide.background1' instead.")),jU=E("editorIndentGuide.activeBackground",Gv,l.localize(658,"Color of the active editor indentation guides."),!1,l.localize(659,"'editorIndentGuide.activeBackground' is deprecated. Use 'editorIndentGuide.activeBackground1' instead.")),Ud=E("editorIndentGuide.background1",GU,l.localize(660,"Color of the editor indentation guides (1).")),qU=E("editorIndentGuide.background2","#00000000",l.localize(661,"Color of the editor indentation guides (2).")),YU=E("editorIndentGuide.background3","#00000000",l.localize(662,"Color of the editor indentation guides (3).")),ZU=E("editorIndentGuide.background4","#00000000",l.localize(663,"Color of the editor indentation guides (4).")),QU=E("editorIndentGuide.background5","#00000000",l.localize(664,"Color of the editor indentation guides (5).")),XU=E("editorIndentGuide.background6","#00000000",l.localize(665,"Color of the editor indentation guides (6).")),$d=E("editorIndentGuide.activeBackground1",jU,l.localize(666,"Color of the active editor indentation guides (1).")),JU=E("editorIndentGuide.activeBackground2","#00000000",l.localize(667,"Color of the active editor indentation guides (2).")),WU=E("editorIndentGuide.activeBackground3","#00000000",l.localize(668,"Color of the active editor indentation guides (3).")),HU=E("editorIndentGuide.activeBackground4","#00000000",l.localize(669,"Color of the active editor indentation guides (4).")),e$=E("editorIndentGuide.activeBackground5","#00000000",l.localize(670,"Color of the active editor indentation guides (5).")),t$=E("editorIndentGuide.activeBackground6","#00000000",l.localize(671,"Color of the active editor indentation guides (6).")),i$=E("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hcDark:ot,hcLight:ot},l.localize(672,"Color of editor active line number"),!1,l.localize(673,"Id is deprecated. Use 'editorLineNumber.activeForeground' instead."));E("editorLineNumber.activeForeground",i$,l.localize(674,"Color of editor active line number"));const n$=E("editorLineNumber.dimmedForeground",null,l.localize(675,"Color of the final editor line when editor.renderFinalNewline is set to dimmed.")),s$=E("editorRuler.foreground",{dark:"#5A5A5A",light:l.Color.lightgrey,hcDark:l.Color.white,hcLight:"#292929"},l.localize(676,"Color of the editor rulers."));E("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hcDark:"#999999",hcLight:"#292929"},l.localize(677,"Foreground color of editor CodeLens")),E("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hcDark:"#0064001a",hcLight:"#0000"},l.localize(678,"Background color behind matching brackets")),E("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hcDark:pe,hcLight:pe},l.localize(679,"Color for matching brackets boxes"));const o$=E("editorBracketMatch.foreground",null,l.localize(680,"Foreground color for matching brackets")),r$=E("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hcDark:"#7f7f7f4d",hcLight:"#666666"},l.localize(681,"Color of the overview ruler border.")),a$=E("editorOverviewRuler.background",null,l.localize(682,"Background color of the editor overview ruler."));E("editorGutter.background",vn,l.localize(683,"Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),E("editorUnnecessaryCode.border",{dark:null,light:null,hcDark:l.Color.fromHex("#fff").transparent(.8),hcLight:pe},l.localize(684,"Border color of unnecessary (unused) source code in the editor."));const l$=E("editorUnnecessaryCode.opacity",{dark:l.Color.fromHex("#000a"),light:l.Color.fromHex("#0007"),hcDark:null,hcLight:null},l.localize(685,`Opacity of unnecessary (unused) source code in the editor. For example, "#000000c0" will render the code with 75% opacity. For high contrast themes, use the 'editorUnnecessaryCode.border' theme color to underline unnecessary code instead of fading it out.`));E("editorGhostText.border",{dark:null,light:null,hcDark:l.Color.fromHex("#fff").transparent(.8),hcLight:l.Color.fromHex("#292929").transparent(.8)},l.localize(686,"Border color of ghost text in the editor."));const c$=E("editorGhostText.foreground",{dark:l.Color.fromHex("#ffffff56"),light:l.Color.fromHex("#0007"),hcDark:null,hcLight:null},l.localize(687,"Foreground color of the ghost text in the editor."));E("editorGhostText.background",null,l.localize(688,"Background color of the ghost text in the editor."));const h$=new l.Color(new l.RGBA(0,122,204,.6)),d$=E("editorOverviewRuler.rangeHighlightForeground",h$,l.localize(689,"Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),u$=E("editorOverviewRuler.errorForeground",{dark:new l.Color(new l.RGBA(255,18,18,.7)),light:new l.Color(new l.RGBA(255,18,18,.7)),hcDark:new l.Color(new l.RGBA(255,50,50,1)),hcLight:"#B5200D"},l.localize(690,"Overview ruler marker color for errors.")),f$=E("editorOverviewRuler.warningForeground",{dark:ho,light:ho,hcDark:Ed,hcLight:Ed},l.localize(691,"Overview ruler marker color for warnings.")),g$=E("editorOverviewRuler.infoForeground",{dark:nr,light:nr,hcDark:Id,hcLight:Id},l.localize(692,"Overview ruler marker color for infos.")),jI=E("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hcDark:"#FFD700",hcLight:"#0431FAFF"},l.localize(693,"Foreground color of brackets (1). Requires enabling bracket pair colorization.")),qI=E("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hcDark:"#DA70D6",hcLight:"#319331FF"},l.localize(694,"Foreground color of brackets (2). Requires enabling bracket pair colorization.")),YI=E("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hcDark:"#87CEFA",hcLight:"#7B3814FF"},l.localize(695,"Foreground color of brackets (3). Requires enabling bracket pair colorization.")),ZI=E("editorBracketHighlight.foreground4","#00000000",l.localize(696,"Foreground color of brackets (4). Requires enabling bracket pair colorization.")),QI=E("editorBracketHighlight.foreground5","#00000000",l.localize(697,"Foreground color of brackets (5). Requires enabling bracket pair colorization.")),XI=E("editorBracketHighlight.foreground6","#00000000",l.localize(698,"Foreground color of brackets (6). Requires enabling bracket pair colorization.")),m$=E("editorBracketHighlight.unexpectedBracket.foreground",{dark:new l.Color(new l.RGBA(255,18,18,.8)),light:new l.Color(new l.RGBA(255,18,18,.8)),hcDark:new l.Color(new l.RGBA(255,50,50,1)),hcLight:"#B5200D"},l.localize(699,"Foreground color of unexpected brackets.")),p$=E("editorBracketPairGuide.background1","#00000000",l.localize(700,"Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.")),_$=E("editorBracketPairGuide.background2","#00000000",l.localize(701,"Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.")),b$=E("editorBracketPairGuide.background3","#00000000",l.localize(702,"Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.")),C$=E("editorBracketPairGuide.background4","#00000000",l.localize(703,"Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.")),v$=E("editorBracketPairGuide.background5","#00000000",l.localize(704,"Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.")),w$=E("editorBracketPairGuide.background6","#00000000",l.localize(705,"Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.")),S$=E("editorBracketPairGuide.activeBackground1","#00000000",l.localize(706,"Background color of active bracket pair guides (1). Requires enabling bracket pair guides.")),y$=E("editorBracketPairGuide.activeBackground2","#00000000",l.localize(707,"Background color of active bracket pair guides (2). Requires enabling bracket pair guides.")),L$=E("editorBracketPairGuide.activeBackground3","#00000000",l.localize(708,"Background color of active bracket pair guides (3). Requires enabling bracket pair guides.")),D$=E("editorBracketPairGuide.activeBackground4","#00000000",l.localize(709,"Background color of active bracket pair guides (4). Requires enabling bracket pair guides.")),x$=E("editorBracketPairGuide.activeBackground5","#00000000",l.localize(710,"Background color of active bracket pair guides (5). Requires enabling bracket pair guides.")),E$=E("editorBracketPairGuide.activeBackground6","#00000000",l.localize(711,"Background color of active bracket pair guides (6). Requires enabling bracket pair guides."));E("editorUnicodeHighlight.border",ho,l.localize(712,"Border color used to highlight unicode characters.")),E("editorUnicodeHighlight.background",SV,l.localize(713,"Background color used to highlight unicode characters.")),vs((o,e)=>{const t=o.getColor(vn),i=o.getColor($v),n=i&&!i.isTransparent()?i:t;n&&e.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${n}; }`)});class JI extends hr{constructor(e){super(),this._context=e;const t=this._context.configuration.options,i=t.get(165);this._renderLineHighlight=t.get(110),this._renderLineHighlightOnlyWhenFocus=t.get(111),this._wordWrap=i.isViewportWrapping,this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new l.Selection(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let e=!1;const t=new Set;for(const s of this._selections)t.add(s.positionLineNumber);const i=Array.from(t);i.sort((s,r)=>s-r),l.equals(this._cursorLineNumbers,i)||(this._cursorLineNumbers=i,e=!0);const n=this._selections.every(s=>s.isEmpty());return this._selectionIsEmpty!==n&&(this._selectionIsEmpty=n,e=!0),e}onThemeChanged(e){return this._readFromSelections()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(165);return this._renderLineHighlight=t.get(110),this._renderLineHighlightOnlyWhenFocus=t.get(111),this._wordWrap=i.isViewportWrapping,this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,!0}onCursorStateChanged(e){return this._selections=e.selections,this._readFromSelections()}onFlushed(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollWidthChanged||e.scrollTopChanged}onZonesChanged(e){return!0}onFocusChanged(e){return this._renderLineHighlightOnlyWhenFocus?(this._focused=e.isFocused,!0):!1}prepareRender(e){if(!this._shouldRenderThis()){this._renderData=null;return}const t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=[];for(let r=t;r<=i;r++){const a=r-t;n[a]=""}if(this._wordWrap){const r=this._renderOne(e,!1);for(const a of this._cursorLineNumbers){const c=this._context.viewModel.coordinatesConverter,h=c.convertViewPositionToModelPosition(new l.Position(a,1)).lineNumber,d=c.convertModelPositionToViewPosition(new l.Position(h,1)).lineNumber,u=c.convertModelPositionToViewPosition(new l.Position(h,this._context.viewModel.model.getLineMaxColumn(h))).lineNumber,f=Math.max(d,t),g=Math.min(u,i);for(let m=f;m<=g;m++){const p=m-t;n[p]=r}}}const s=this._renderOne(e,!0);for(const r of this._cursorLineNumbers){if(ri)continue;const a=r-t;n[a]=s}this._renderData=n}render(e,t){if(!this._renderData)return"";const i=t-e;return i>=this._renderData.length?"":this._renderData[i]}_shouldRenderInMargin(){return(this._renderLineHighlight==="gutter"||this._renderLineHighlight==="all")&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderInContent(){return(this._renderLineHighlight==="line"||this._renderLineHighlight==="all")&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}class I$ extends JI{_renderOne(e,t){return`
`}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}}class T$ extends JI{_renderOne(e,t){return`
`}_shouldRenderThis(){return!0}_shouldRenderOther(){return this._shouldRenderInContent()}}vs((o,e)=>{const t=o.getColor($v),i=o.getColor(VU);if(t&&(e.addRule(`.monaco-editor.focused .view-overlays .current-line { background-color: ${t}; }`),e.addRule(`.monaco-editor.focused .margin-view-overlays .current-line-margin { background-color: ${t}; border: none; }`)),i&&(e.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${i}; }`),e.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${i}; border: none; }`)),!t||t.isTransparent()||o.defines($I)){const n=o.getColor($I);n&&(e.addRule(`.monaco-editor .view-overlays .current-line-exact { border: 2px solid ${n}; }`),e.addRule(`.monaco-editor .margin-view-overlays .current-line-exact-margin { border: 2px solid ${n}; }`),pa(o.type)&&(e.addRule(".monaco-editor .view-overlays .current-line-exact { border-width: 1px; }"),e.addRule(".monaco-editor .margin-view-overlays .current-line-exact-margin { border-width: 1px; }")))}});class N$ extends hr{constructor(e){super(),this._context=e;const t=this._context.configuration.options;this._typicalHalfwidthCharacterWidth=t.get(59).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._typicalHalfwidthCharacterWidth=t.get(59).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}prepareRender(e){const t=e.getDecorationsInViewport();let i=[],n=0;for(let c=0,h=t.length;c{if(c.options.zIndexh.options.zIndex)return 1;const d=c.options.className,u=h.options.className;return du?1:l.Range.compareRangesUsingStarts(c.range,h.range)});const s=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber,a=[];for(let c=s;c<=r;c++){const h=c-s;a[h]=""}this._renderWholeLineDecorations(e,i,a),this._renderNormalDecorations(e,i,a),this._renderResult=a}_renderWholeLineDecorations(e,t,i){const n=e.visibleRange.startLineNumber,s=e.visibleRange.endLineNumber;for(let r=0,a=t.length;r
',d=Math.max(c.range.startLineNumber,n),u=Math.min(c.range.endLineNumber,s);for(let f=d;f<=u;f++){const g=f-n;i[g]+=h}}}_renderNormalDecorations(e,t,i){const n=e.visibleRange.startLineNumber;let s=null,r=!1,a=null,c=!1;for(let h=0,d=t.length;h';a[f]+=v}}}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}class R$ extends gi{constructor(e,t,i,n){super(e);const s=this._context.configuration.options,r=s.get(117),a=s.get(83),c=s.get(49),h=s.get(120),d=s.get(158),u={listenOnDomNode:i.domNode,className:"editor-scrollable "+Uv(e.theme.type),useShadows:!1,lazyRender:!0,vertical:r.vertical,horizontal:r.horizontal,verticalHasArrows:r.verticalHasArrows,horizontalHasArrows:r.horizontalHasArrows,verticalScrollbarSize:r.verticalScrollbarSize,verticalSliderSize:r.verticalSliderSize,horizontalScrollbarSize:r.horizontalScrollbarSize,horizontalSliderSize:r.horizontalSliderSize,handleMouseWheel:r.handleMouseWheel,alwaysConsumeMouseWheel:r.alwaysConsumeMouseWheel,arrowSize:r.arrowSize,mouseWheelScrollSensitivity:a,fastScrollSensitivity:c,scrollPredominantAxis:h,scrollByPage:r.scrollByPage,inertialScroll:d};this.scrollbar=this._register(new Xg(t.domNode,u,this._context.viewLayout.getScrollable())),Jn.write(this.scrollbar.getDomNode(),6),this.scrollbarDomNode=we(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const f=(g,m,p)=>{const b={};{const v=g.scrollTop;v&&(b.scrollTop=this._context.viewLayout.getCurrentScrollTop()+v,g.scrollTop=0)}if(p){const v=g.scrollLeft;v&&(b.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+v,g.scrollLeft=0)}this._context.viewModel.viewLayout.setScrollPosition(b,1)};this._register(R(i.domNode,"scroll",g=>f(i.domNode,!0,!0))),this._register(R(t.domNode,"scroll",g=>f(t.domNode,!0,!1))),this._register(R(n.domNode,"scroll",g=>f(n.domNode,!0,!1))),this._register(R(this.scrollbarDomNode.domNode,"scroll",g=>f(this.scrollbarDomNode.domNode,!0,!1)))}_setLayout(){const e=this._context.configuration.options,t=e.get(165);this.scrollbarDomNode.setLeft(t.contentLeft),e.get(81).side==="right"?this.scrollbarDomNode.setWidth(t.contentWidth+t.minimap.minimapWidth):this.scrollbarDomNode.setWidth(t.contentWidth),this.scrollbarDomNode.setHeight(t.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarPointerDown(e){this.scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this.scrollbar.delegateScrollFromMouseWheelEvent(e)}onConfigurationChanged(e){if(e.hasChanged(117)||e.hasChanged(83)||e.hasChanged(49)){const t=this._context.configuration.options,i=t.get(117),n=t.get(83),s=t.get(49),r=t.get(120),a={vertical:i.vertical,horizontal:i.horizontal,verticalScrollbarSize:i.verticalScrollbarSize,horizontalScrollbarSize:i.horizontalScrollbarSize,scrollByPage:i.scrollByPage,handleMouseWheel:i.handleMouseWheel,mouseWheelScrollSensitivity:n,fastScrollSensitivity:s,scrollPredominantAxis:r};this.scrollbar.updateOptions(a)}return e.hasChanged(165)&&this._setLayout(),!0}onScrollChanged(e){return!0}onThemeChanged(e){return this.scrollbar.updateClassName("editor-scrollable "+Uv(this._context.theme.type)),!0}prepareRender(e){}render(e){this.scrollbar.renderNow()}}class jv{constructor(e,t,i,n,s){this.startLineNumber=e,this.endLineNumber=t,this.className=i,this.tooltip=n,this._decorationToRenderBrand=void 0,this.zIndex=s??0}}class M${constructor(e,t,i){this.className=e,this.zIndex=t,this.tooltip=i}}class A${constructor(){this.decorations=[]}add(e){this.decorations.push(e)}getDecorations(){return this.decorations}}class WI extends hr{_render(e,t,i){const n=[];for(let a=e;a<=t;a++){const c=a-e;n[c]=new A$}if(i.length===0)return n;i.sort((a,c)=>a.className===c.className?a.startLineNumber===c.startLineNumber?a.endLineNumber-c.endLineNumber:a.startLineNumber-c.startLineNumber:a.classNamen)continue;const h=Math.max(a,i),d=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new l.Position(h,0)),u=this._context.viewModel.glyphLanes.getLanesAtLine(d.lineNumber).indexOf(s.preference.lane);t.push(new k$(h,u,s.preference.zIndex,s))}}_collectSortedGlyphRenderRequests(e){const t=[];return this._collectDecorationBasedGlyphRenderRequest(e,t),this._collectWidgetBasedGlyphRenderRequest(e,t),t.sort((i,n)=>i.lineNumber===n.lineNumber?i.laneIndex===n.laneIndex?i.zIndex===n.zIndex?n.type===i.type?i.type===0&&n.type===0?i.className0;){const n=t.peek();if(!n)break;const s=t.takeWhile(a=>a.lineNumber===n.lineNumber&&a.laneIndex===n.laneIndex);if(!s||s.length===0)break;const r=s[0];if(r.type===0){const a=[];for(const c of s){if(c.zIndex!==r.zIndex||c.type!==r.type)break;(a.length===0||a[a.length-1]!==c.className)&&a.push(c.className)}i.push(r.accept(a.join(" ")))}else r.widget.renderInfo={lineNumber:r.lineNumber,laneIndex:r.laneIndex}}this._decorationGlyphsToRender=i}render(e){if(!this._glyphMargin){for(const i of Object.values(this._widgets))i.domNode.setDisplay("none");for(;this._managedDomNodes.length>0;)this._managedDomNodes.pop()?.domNode.remove();return}const t=Math.round(this._glyphMarginWidth/this._glyphMarginDecorationLaneCount);for(const i of Object.values(this._widgets))if(!i.renderInfo)i.domNode.setDisplay("none");else{const n=e.viewportData.relativeVerticalOffset[i.renderInfo.lineNumber-e.viewportData.startLineNumber],s=this._glyphMarginLeft+i.renderInfo.laneIndex*this._lineHeight;i.domNode.setDisplay("block"),i.domNode.setTop(n),i.domNode.setLeft(s),i.domNode.setWidth(t),i.domNode.setHeight(this._lineHeight)}for(let i=0;ithis._decorationGlyphsToRender.length;)this._managedDomNodes.pop()?.domNode.remove()}}class P${constructor(e,t,i,n){this.lineNumber=e,this.laneIndex=t,this.zIndex=i,this.className=n,this.type=0}accept(e){return new F$(this.lineNumber,this.laneIndex,e)}}class k${constructor(e,t,i,n){this.lineNumber=e,this.laneIndex=t,this.zIndex=i,this.widget=n,this.type=1}}class F${constructor(e,t,i){this.lineNumber=e,this.laneIndex=t,this.combinedClassName=i}}class HI extends l.Disposable{constructor(){super(...arguments),this._isDisposed=!1}dispose(){super.dispose(),this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw new Error("TextModelPart is disposed!")}}function eT(o,e){let t=0,i=0;const n=o.length;for(;in)throw new l.BugIndicatingError("Illegal value for lineNumber");const s=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,r=!!(s&&s.offSide);let a=-2,c=-1,h=-2,d=-1;const u=x=>{if(a!==-1&&(a===-2||a>x-1)){a=-1,c=-1;for(let I=x-2;I>=0;I--){const T=this._computeIndentLevel(I);if(T>=0){a=I,c=T;break}}}if(h===-2){h=-1,d=-1;for(let I=x;I=0){h=I,d=T;break}}}};let f=-2,g=-1,m=-2,p=-1;const b=x=>{if(f===-2){f=-1,g=-1;for(let I=x-2;I>=0;I--){const T=this._computeIndentLevel(I);if(T>=0){f=I,g=T;break}}}if(m!==-1&&(m===-2||m=0){m=I,p=T;break}}}};let v=0,C=!0,w=0,S=!0,L=0,D=0;for(let x=0;C||S;x++){const I=e-x,T=e+x;x>1&&(I<1||I1&&(T>n||T>i)&&(S=!1),x>5e4&&(C=!1,S=!1);let M=-1;if(C&&I>=1){const P=this._computeIndentLevel(I-1);P>=0?(h=I-1,d=P,M=Math.ceil(P/this.textModel.getOptions().indentSize)):(u(I),M=this._getIndentLevelForWhitespaceLine(r,c,d))}let O=-1;if(S&&T<=n){const P=this._computeIndentLevel(T-1);P>=0?(f=T-1,g=P,O=Math.ceil(P/this.textModel.getOptions().indentSize)):(b(T),O=this._getIndentLevelForWhitespaceLine(r,g,p))}if(x===0){D=M;continue}if(x===1){if(T<=n&&O>=0&&D+1===O){C=!1,v=T,w=T,L=O;continue}if(I>=1&&M>=0&&M-1===D){S=!1,v=I,w=I,L=M;continue}if(v=e,w=e,L=D,L===0)return{startLineNumber:v,endLineNumber:w,indent:L}}C&&(M>=L?v=I:C=!1),S&&(O>=L?w=T:S=!1)}return{startLineNumber:v,endLineNumber:w,indent:L}}getLinesBracketGuides(e,t,i,n){const s=[];for(let u=e;u<=t;u++)s.push([]);const r=!0,a=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new l.Range(e,1,t,this.textModel.getLineMaxColumn(t))).toArray();let c;if(i&&a.length>0){const u=(e<=i.lineNumber&&i.lineNumber<=t?a:this.textModel.bracketPairs.getBracketPairsInRange(l.Range.fromPositions(i)).toArray()).filter(f=>l.Range.strictContainsPosition(f.range,i));c=l.findLast(u,f=>r)?.range}const h=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,d=new tT;for(const u of a){if(!u.closingBracketRange)continue;const f=c&&u.range.equalsRange(c);if(!f&&!n.includeInactive)continue;const g=d.getInlineClassName(u.nestingLevel,u.nestingLevelOfEqualBracketType,h)+(n.highlightActive&&f?" "+d.activeClassName:""),m=u.openingBracketRange.getStartPosition(),p=u.closingBracketRange.getStartPosition(),b=n.horizontalGuides===Da.Enabled||n.horizontalGuides===Da.EnabledForActive&&f;if(u.range.startLineNumber===u.range.endLineNumber){b&&s[u.range.startLineNumber-e].push(new xa(-1,u.openingBracketRange.getEndPosition().column,g,new Kd(!1,p.column),-1,-1));continue}const v=this.getVisibleColumnFromPosition(p),C=this.getVisibleColumnFromPosition(u.openingBracketRange.getStartPosition()),w=Math.min(C,v,u.minVisibleColumnIndentation+1);let S=!1;l.firstNonWhitespaceIndex(this.textModel.getLineContent(u.closingBracketRange.startLineNumber))=e&&C>w&&s[m.lineNumber-e].push(new xa(w,-1,g,new Kd(!1,m.column),-1,-1)),p.lineNumber<=t&&v>w&&s[p.lineNumber-e].push(new xa(w,-1,g,new Kd(!S,p.column),-1,-1)))}for(const u of s)u.sort((f,g)=>f.visibleColumn-g.visibleColumn);return s}getVisibleColumnFromPosition(e){return Xe.visibleColumnFromColumn(this.textModel.getLineContent(e.lineNumber),e.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(e,t){this.assertNotDisposed();const i=this.textModel.getLineCount();if(e<1||e>i)throw new Error("Illegal value for startLineNumber");if(t<1||t>i)throw new Error("Illegal value for endLineNumber");const n=this.textModel.getOptions(),s=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,r=!!(s&&s.offSide),a=new Array(t-e+1);let c=-2,h=-1,d=-2,u=-1;for(let f=e;f<=t;f++){const g=f-e,m=this._computeIndentLevel(f-1);if(m>=0){c=f-1,h=m,a[g]=Math.ceil(m/n.indentSize);continue}if(c===-2){c=-1,h=-1;for(let p=f-2;p>=0;p--){const b=this._computeIndentLevel(p);if(b>=0){c=p,h=b;break}}}if(d!==-1&&(d===-2||d=0){d=p,u=b;break}}}a[g]=this._getIndentLevelForWhitespaceLine(r,h,u)}return a}_getIndentLevelForWhitespaceLine(e,t,i){const n=this.textModel.getOptions();return t===-1||i===-1?0:tn||this._maxIndentLeft>0&&m>this._maxIndentLeft)break;const p=g.horizontalLine?g.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",b=g.horizontalLine?(e.visibleRangeForPosition(new l.Position(c,g.horizontalLine.endColumn))?.left??m+this._spaceWidth)-m:this._spaceWidth;u+=`
`}a[h]=u}this._renderResult=a}getGuidesByLine(e,t,i){const n=this._bracketPairGuideOptions.bracketPairs!==!1?this._context.viewModel.getBracketGuidesInRangeByLine(e,t,i,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:this._bracketPairGuideOptions.bracketPairsHorizontal===!0?Da.Enabled:this._bracketPairGuideOptions.bracketPairsHorizontal==="active"?Da.EnabledForActive:Da.Disabled,includeInactive:this._bracketPairGuideOptions.bracketPairs===!0}):null,s=this._bracketPairGuideOptions.indentation?this._context.viewModel.getLinesIndentGuides(e,t):null;let r=0,a=0,c=0;if(this._bracketPairGuideOptions.highlightActiveIndentation!==!1&&i){const u=this._context.viewModel.getActiveIndentGuide(i.lineNumber,e,t);r=u.startLineNumber,a=u.endLineNumber,c=u.indent}const{indentSize:h}=this._context.viewModel.model.getOptions(),d=[];for(let u=e;u<=t;u++){const f=new Array;d.push(f);const g=n?n[u-e]:[],m=new l.ArrayQueue(g),p=s?s[u-e]:0;for(let b=1;b<=p;b++){const v=(b-1)*h+1,C=(this._bracketPairGuideOptions.highlightActiveIndentation==="always"||g.length===0)&&r<=u&&u<=a&&b===c;f.push(...m.takeWhile(S=>S.visibleColumn!0)||[])}return d}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}function wc(o){if(!(o&&o.isTransparent()))return o}vs((o,e)=>{const t=[{bracketColor:jI,guideColor:p$,guideColorActive:S$},{bracketColor:qI,guideColor:_$,guideColorActive:y$},{bracketColor:YI,guideColor:b$,guideColorActive:L$},{bracketColor:ZI,guideColor:C$,guideColorActive:D$},{bracketColor:QI,guideColor:v$,guideColorActive:x$},{bracketColor:XI,guideColor:w$,guideColorActive:E$}],i=new tT,n=[{indentColor:Ud,indentColorActive:$d},{indentColor:qU,indentColorActive:JU},{indentColor:YU,indentColorActive:WU},{indentColor:ZU,indentColorActive:HU},{indentColor:QU,indentColorActive:e$},{indentColor:XU,indentColorActive:t$}],s=t.map(a=>{const c=o.getColor(a.bracketColor),h=o.getColor(a.guideColor),d=o.getColor(a.guideColorActive),u=wc(wc(h)??c?.transparent(.3)),f=wc(wc(d)??c);if(!(!u||!f))return{guideColor:u,guideColorActive:f}}).filter(l.isDefined),r=n.map(a=>{const c=o.getColor(a.indentColor),h=o.getColor(a.indentColorActive),d=wc(c),u=wc(h);if(!(!d||!u))return{indentColor:d,indentColorActive:u}}).filter(l.isDefined);if(s.length>0){for(let a=0;a<30;a++){const c=s[a%s.length];e.addRule(`.monaco-editor .${i.getInlineClassNameOfLevel(a).replace(/ /g,".")} { --guide-color: ${c.guideColor}; --guide-color-active: ${c.guideColorActive}; }`)}e.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),e.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),e.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),e.addRule(`.monaco-editor .vertical.${i.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),e.addRule(`.monaco-editor .horizontal-top.${i.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),e.addRule(`.monaco-editor .horizontal-bottom.${i.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}if(r.length>0){for(let a=0;a<30;a++){const c=r[a%r.length];e.addRule(`.monaco-editor .lines-content .core-guide-indent.lvl-${a} { --indent-color: ${c.indentColor}; --indent-color-active: ${c.indentColorActive}; }`)}e.addRule(".monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 var(--indent-color) inset; }"),e.addRule(".monaco-editor .lines-content .core-guide-indent.indent-active { box-shadow: 1px 0 0 0 var(--indent-color-active) inset; }")}});const eb=class eb extends hr{constructor(e){super(),this._context=e,this._readConfig(),this._lastCursorModelPosition=new l.Position(1,1),this._renderResult=null,this._activeModelLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const e=this._context.configuration.options;this._lineHeight=e.get(75);const t=e.get(76);this._renderLineNumbers=t.renderType,this._renderCustomLineNumbers=t.renderFn,this._renderFinalNewline=e.get(109);const i=e.get(165);this._lineNumbersLeft=i.lineNumbersLeft,this._lineNumbersWidth=i.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return this._readConfig(),!0}onCursorStateChanged(e){const t=e.selections[0].getPosition();this._lastCursorModelPosition=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(t);let i=!1;return this._activeModelLineNumber!==this._lastCursorModelPosition.lineNumber&&(this._activeModelLineNumber=this._lastCursorModelPosition.lineNumber,i=!0),(this._renderLineNumbers===2||this._renderLineNumbers===3)&&(i=!0),i}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onDecorationsChanged(e){return e.affectsLineNumber}_getLineRenderLineNumber(e){const t=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new l.Position(e,1));if(t.column!==1)return"";const i=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(i);if(this._renderLineNumbers===2){const n=Math.abs(this._lastCursorModelPosition.lineNumber-i);return n===0?''+i+"":String(n)}if(this._renderLineNumbers===3){if(this._lastCursorModelPosition.lineNumber===i||i%10===0)return String(i);const n=this._context.viewModel.getLineCount();return i===n?String(i):""}return String(i)}prepareRender(e){if(this._renderLineNumbers===0){this._renderResult=null;return}const t=l.isLinux?this._lineHeight%2===0?" lh-even":" lh-odd":"",i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,s=this._context.viewModel.getDecorationsInViewport(e.visibleRange).filter(h=>!!h.options.lineNumberClassName);s.sort((h,d)=>l.Range.compareRangesUsingEnds(h.range,d.range));let r=0;const a=this._context.viewModel.getLineCount(),c=[];for(let h=i;h<=n;h++){const d=h-i,u=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new l.Position(h,1)).lineNumber;let f=this._getLineRenderLineNumber(h),g="";for(;r${f}`}this._renderResult=c}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}};eb.CLASS_NAME="line-numbers";let gm=eb;vs((o,e)=>{const t=o.getColor(KU),i=o.getColor(n$);i?e.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${i}; }`):t&&e.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${t.transparent(.4)}; }`)});const Sc="monaco-mouse-cursor-text";class qv{get didDomLayout(){return this._didDomLayout}readClientRect(){if(!this._clientRectRead){this._clientRectRead=!0;const e=this._domNode.getBoundingClientRect();this.markDidDomLayout(),this._clientRectDeltaLeft=e.left;const t=this._domNode.offsetWidth;this._clientRectScale=t>0?e.width/t:1}}get clientRectDeltaLeft(){return this._clientRectRead||this.readClientRect(),this._clientRectDeltaLeft}get clientRectScale(){return this._clientRectRead||this.readClientRect(),this._clientRectScale}constructor(e,t){this._domNode=e,this.endNode=t,this._didDomLayout=!1,this._clientRectDeltaLeft=0,this._clientRectScale=1,this._clientRectRead=!1}markDidDomLayout(){this._didDomLayout=!0}}class mm{constructor(e,t){this.themeType=t;const i=e.options,n=i.get(59);this.renderWhitespace=i.get(113),this.experimentalWhitespaceRendering=i.get(47),this.renderControlCharacters=i.get(108),this.spaceWidth=n.spaceWidth,this.middotWidth=n.middotWidth,this.wsmiddotWidth=n.wsmiddotWidth,this.useMonospaceOptimizations=n.isMonospace&&!i.get(40),this.canUseHalfwidthRightwardsArrow=n.canUseHalfwidthRightwardsArrow,this.lineHeight=i.get(75),this.stopRenderingLineAfter=i.get(133),this.fontLigatures=i.get(60),this.verticalScrollbarSize=i.get(117).verticalScrollbarSize,this.useGpu=i.get(46)==="on"}equals(e){return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.experimentalWhitespaceRendering===e.experimentalWhitespaceRendering&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures&&this.verticalScrollbarSize===e.verticalScrollbarSize&&this.useGpu===e.useGpu}}class V${constructor(){this._currentVisibleRange=new l.Range(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}}class U${constructor(e,t,i,n,s,r,a){this.minimalReveal=e,this.lineNumber=t,this.startColumn=i,this.endColumn=n,this.startScrollTop=s,this.stopScrollTop=r,this.scrollType=a,this.type="range",this.minLineNumber=t,this.maxLineNumber=t}}class $${constructor(e,t,i,n,s){this.minimalReveal=e,this.selections=t,this.startScrollTop=i,this.stopScrollTop=n,this.scrollType=s,this.type="selections";let r=t[0].startLineNumber,a=t[0].endLineNumber;for(let c=1,h=t.length;cnew fo(t,this._viewLineOptions)}),this.domNode=this._visibleLines.domNode,Jn.write(this.domNode,8),this.domNode.setClassName(`view-lines ${Sc}`),Ot(this.domNode,r),this._maxLineWidth=0,this._asyncUpdateLineWidths=new l.RunOnceScheduler(()=>{this._updateLineWidthsSlow()},200),this._asyncCheckMonospaceFontAssumptions=new l.RunOnceScheduler(()=>{this._checkMonospaceFontAssumptions()},2e3),this._lastRenderedData=new V$,this._horizontalRevealRequest=null,this._stickyScrollEnabled=s.get(131).enabled,this._maxNumberStickyLines=s.get(131).maxLineCount}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(166)&&(this._maxLineWidth=0);const t=this._context.configuration.options,i=t.get(59),n=t.get(166);return this._lineHeight=t.get(75),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._isViewportWrapping=n.isViewportWrapping,this._revealHorizontalRightPadding=t.get(114),this._cursorSurroundingLines=t.get(35),this._cursorSurroundingLinesStyle=t.get(36),this._canUseLayerHinting=!t.get(39),this._stickyScrollEnabled=t.get(131).enabled,this._maxNumberStickyLines=t.get(131).maxLineCount,Ot(this.domNode,i),this._onOptionsMaybeChanged(),e.hasChanged(165)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const e=this._context.configuration,t=new mm(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let s=i;s<=n;s++)this._visibleLines.getVisibleLine(s).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=!1;for(let s=t;s<=i;s++)n=this._visibleLines.getVisibleLine(s).onSelectionChanged()||n;return n}onDecorationsChanged(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let n=t;n<=i;n++)this._visibleLines.getVisibleLine(n).onDecorationsChanged();return!0}onFlushed(e){const t=this._visibleLines.onFlushed(e,this._viewLineOptions.useGpu);return this._maxLineWidth=0,t}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onRevealRangeRequest(e){const t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.source,e.minimalReveal,e.range,e.selections,e.verticalType);if(t===-1)return!1;let i=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range&&e.range.startLineNumber!==e.range.endLineNumber?i={scrollTop:i.scrollTop,scrollLeft:0}:e.range?this._horizontalRevealRequest=new U$(e.minimalReveal,e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType):e.selections&&e.selections.length>0&&(this._horizontalRevealRequest=new $$(e.minimalReveal,e.selections,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;const s=Math.abs(this._context.viewLayout.getCurrentScrollTop()-i.scrollTop)<=this._lineHeight?1:e.scrollType;return this._context.viewModel.viewLayout.setScrollPosition(i,s),!0}onScrollChanged(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){const t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),i=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTopi)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||e.scrollTopChanged||e.scrollLeftChanged}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(e)}onThemeChanged(e){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(e,t){const i=this._getViewLineDomNode(e);if(i===null)return null;const n=this._getLineNumberFor(i);if(n===-1||n<1||n>this._context.viewModel.getLineCount())return null;if(this._context.viewModel.getLineMaxColumn(n)===1)return new l.Position(n,1);const s=this._visibleLines.getStartLineNumber(),r=this._visibleLines.getEndLineNumber();if(nr)return null;let a=this._visibleLines.getVisibleLine(n).getColumnOfNodeOffset(e,t);const c=this._context.viewModel.getLineMinColumn(n);return ai)return-1;const n=new qv(this.domNode.domNode,this._textRangeRestingSpot),s=this._visibleLines.getVisibleLine(e).getWidth(n);return this._updateLineWidthsSlowIfDomDidLayout(n),s}resetLineWidthCaches(){const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let i=e;i<=t;i++)this._visibleLines.getVisibleLine(i).resetCachedWidth()}linesVisibleRangesForRange(e,t){const i=e.endLineNumber,n=l.Range.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!n)return null;const s=[];let r=0;const a=new qv(this.domNode.domNode,this._textRangeRestingSpot);let c=0;t&&(c=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new l.Position(n.startLineNumber,1)).lineNumber);const h=this._visibleLines.getStartLineNumber(),d=this._visibleLines.getEndLineNumber();for(let u=n.startLineNumber;u<=n.endLineNumber;u++){if(ud)continue;const f=u===n.startLineNumber?n.startColumn:1,g=u!==i,m=g?this._context.viewModel.getLineMaxColumn(u):n.endColumn,b=this._visibleLines.getVisibleLine(u).getVisibleRangesForRange(u,f,m,a);if(b){if(t&&uthis._visibleLines.getEndLineNumber())return null;const n=new qv(this.domNode.domNode,this._textRangeRestingSpot),s=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,t,i,n);return this._updateLineWidthsSlowIfDomDidLayout(n),s}_lineIsRenderedRTL(e){return ethis._visibleLines.getEndLineNumber()?!1:this._visibleLines.getVisibleLine(e).isRenderedRTL()}visibleRangeForPosition(e){const t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new sI(t.outsideRenderedLine,t.ranges[0].left):null}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidthsSlowIfDomDidLayout(e){e.didDomLayout&&this._asyncUpdateLineWidths.isScheduled()&&(this._asyncUpdateLineWidths.cancel(),this._updateLineWidthsSlow())}_updateLineWidths(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=1,s=!0;for(let r=t;r<=i;r++){const a=this._visibleLines.getVisibleLine(r);if(e&&!a.getWidthIsFast()){s=!1;continue}n=Math.max(n,a.getWidth(null))}return s&&t===1&&i===this._context.viewModel.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(n),s}_checkMonospaceFontAssumptions(){let e=-1,t=-1;const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let s=i;s<=n;s++){const r=this._visibleLines.getVisibleLine(s);if(r.needsMonospaceFontCheck()){const a=r.getWidth(null);a>t&&(t=a,e=s)}}if(e!==-1&&!this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())for(let s=i;s<=n;s++)this._visibleLines.getVisibleLine(s).onMonospaceAssumptionsInvalidated()}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){const i=this._horizontalRevealRequest;if(e.startLineNumber<=i.minLineNumber&&i.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const n=this._computeScrollLeftToReveal(i);n&&(!this._isViewportWrapping&&!n.hasRTL&&this._ensureMaxLineWidth(n.maxHorizontalOffset),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:n.scrollLeft},i.scrollType))}}if(this._updateLineWidthsFast()?this._asyncUpdateLineWidths.cancel():this._asyncUpdateLineWidths.schedule(),l.isLinux&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let s=i;s<=n;s++)if(this._visibleLines.getVisibleLine(s).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");const t=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-t),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(e){if(this._viewLineOptions.useGpu)return;const t=Math.ceil(e);this._maxLineWidth0){let v=s[0].startLineNumber,C=s[0].endLineNumber;for(let w=1,S=s.length;wc){if(!d)return-1;b=u}else if(r===5||r===6)if(r===6&&a<=u&&f<=h)b=a;else{const v=Math.max(5*this._lineHeight,c*.2),C=u-v,w=f-c;b=Math.max(w,C)}else if(r===1||r===2)if(r===2&&a<=u&&f<=h)b=a;else{const v=(u+f)/2;b=Math.max(0,v-c/2)}else b=this._computeMinimumScrolling(a,h,u,f,r===3,r===4);return b}_computeScrollLeftToReveal(e){const t=this._context.viewLayout.getCurrentViewport(),i=this._context.configuration.options.get(165),n=t.left,s=n+t.width-i.verticalScrollbarWidth;let r=1073741824,a=0,c=!1;if(e.type==="range"){c=this._lineIsRenderedRTL(e.lineNumber);const d=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!d)return null;for(const u of d.ranges)r=Math.min(r,Math.round(u.left)),a=Math.max(a,Math.round(u.left+u.width))}else for(const d of e.selections){if(d.startLineNumber!==d.endLineNumber)return null;const u=this._visibleRangesForLineRange(d.startLineNumber,d.startColumn,d.endColumn);if(c||=this._lineIsRenderedRTL(d.startLineNumber),!u)return null;for(const f of u.ranges)r=Math.min(r,Math.round(f.left)),a=Math.max(a,Math.round(f.left+f.width))}return e.minimalReveal||(r=Math.max(0,r-tb.HORIZONTAL_EXTRA_PX),a+=this._revealHorizontalRightPadding),e.type==="selections"&&a-r>t.width?null:{scrollLeft:this._computeMinimumScrolling(n,s,r,a),maxHorizontalOffset:a,hasRTL:c}}_computeMinimumScrolling(e,t,i,n,s,r){e=e|0,t=t|0,i=i|0,n=n|0,s=!!s,r=!!r;const a=t-e;if(n-it)return Math.max(0,n-a)}else return i;return e}};tb.HORIZONTAL_EXTRA_PX=30;let Yv=tb;class K$ extends WI{constructor(e){super(),this._context=e;const i=this._context.configuration.options.get(165);this._decorationsLeft=i.decorationsLeft,this._decorationsWidth=i.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const i=this._context.configuration.options.get(165);return this._decorationsLeft=i.decorationsLeft,this._decorationsWidth=i.decorationsWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){const t=e.getDecorationsInViewport(),i=[];let n=0;for(let s=0,r=t.length;s',c=[];for(let h=t;h<=i;h++){const d=h-t,u=n[d].getDecorations();let f="";for(const g of u){let m='
';s[a]=h}this._renderResult=s}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}const Ar=class Ar{constructor(e,t,i,n){this._rgba8Brand=void 0,this.r=Ar._clamp(e),this.g=Ar._clamp(t),this.b=Ar._clamp(i),this.a=Ar._clamp(n)}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}static _clamp(e){return e<0?0:e>255?255:e|0}};Ar.Empty=new Ar(0,0,0,0);let ws=Ar;const ib=class ib extends l.Disposable{static getInstance(){return this._INSTANCE||(this._INSTANCE=l.markAsSingleton(new ib)),this._INSTANCE}constructor(){super(),this._onDidChange=this._register(new l.Emitter),this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(l.TokenizationRegistry.onDidChange(e=>{e.changedColorMap&&this._updateColorMap()}))}_updateColorMap(){const e=l.TokenizationRegistry.getColorMap();if(!e){this._colors=[];for(let i=0;i<=2;i++)this._colors[i]=ws.Empty;this._backgroundIsLight=!0;return}this._colors=[ws.Empty];for(let i=1;i=.5,this._onDidChange.fire(void 0)}getColor(e){(e<1||e>=this._colors.length)&&(e=2);let t=this._colors[e];return t||(l.onUnexpectedError(new l.BugIndicatingError(`Missing color for colorId ${e}`)),t=ws.Empty),t}backgroundIsLight(){return this._backgroundIsLight}};ib._INSTANCE=null;let _m=ib;const j$=(()=>{const o=[];for(let e=32;e<=126;e++)o.push(e);return o.push(65533),o})(),q$=(o,e)=>(o-=32,o<0||o>96?e<=2?(o+96)%96:95:o);class Gd{constructor(e,t){this.scale=t,this._minimapCharRendererBrand=void 0,this.charDataNormal=Gd.soften(e,12/15),this.charDataLight=Gd.soften(e,50/60)}static soften(e,t){const i=new Uint8ClampedArray(e.length);for(let n=0,s=e.length;ne.width||i+m>e.height){console.warn("bad render request outside image data");return}const p=d?this.charDataLight:this.charDataNormal,b=q$(n,h),v=e.width*4,C=a.r,w=a.g,S=a.b,L=s.r-C,D=s.g-w,x=s.b-S,I=Math.max(r,c),T=e.data;let M=b*f*g,O=i*v+t*4;for(let P=0;Pe.width||i+u>e.height){console.warn("bad render request outside image data");return}const f=e.width*4,g=.5*(s/255),m=r.r,p=r.g,b=r.b,v=n.r-m,C=n.g-p,w=n.b-b,S=m+v*g,L=p+C*g,D=b+w*g,x=Math.max(s,a),I=e.data;let T=i*f+t*4;for(let M=0;M{const e=new Uint8ClampedArray(o.length/2);for(let t=0;t>1]=iT[o[t]]<<4|iT[o[t+1]]&15;return e},sT={1:l.createSingleCallFunction(()=>nT("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")),2:l.createSingleCallFunction(()=>nT("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126"))};class jd{static create(e,t){if(this.lastCreated&&e===this.lastCreated.scale&&t===this.lastFontFamily)return this.lastCreated;let i;return sT[e]?i=new Gd(sT[e](),e):i=jd.createFromSampleData(jd.createSampleData(t).data,e),this.lastFontFamily=t,this.lastCreated=i,i}static createSampleData(e){const t=document.createElement("canvas"),i=t.getContext("2d");t.style.height="16px",t.height=16,t.width=960,t.style.width="960px",i.fillStyle="#ffffff",i.font=`bold 16px ${e}`,i.textBaseline="middle";let n=0;for(const s of j$)i.fillText(String.fromCharCode(s),n,16/2),n+=10;return i.getImageData(0,0,960,16)}static createFromSampleData(e,t){if(e.length!==61440)throw new Error("Unexpected source in MinimapCharRenderer");const n=jd._downsample(e,t);return new Gd(n,t)}static _downsampleChar(e,t,i,n,s){const r=1*s,a=2*s;let c=n,h=0;for(let d=0;d0){const h=255/c;for(let d=0;dt===1)}function lT(o,e){return cT(o,e.range,t=>t===2)}function cT(o,e,t){for(let i=e.startLineNumber;i<=e.endLineNumber;i++){const n=o.tokenization.getLineTokens(i),s=i===e.startLineNumber,r=i===e.endLineNumber;let a=s?n.findTokenIndexAtOffset(e.startColumn-1):0;for(;ae.endColumn-1);){if(!t(n.getStandardTokenType(a)))return!1;a++}}return!0}const Z$=140,Q$=2;class yc{constructor(e,t,i){const n=e.options,s=n.get(163),r=n.get(165),a=r.minimap,c=n.get(59),h=n.get(81);this.renderMinimap=a.renderMinimap,this.size=h.size,this.minimapHeightIsEditorHeight=a.minimapHeightIsEditorHeight,this.scrollBeyondLastLine=n.get(119),this.paddingTop=n.get(96).top,this.paddingBottom=n.get(96).bottom,this.showSlider=h.showSlider,this.autohide=h.autohide,this.pixelRatio=s,this.typicalHalfwidthCharacterWidth=c.typicalHalfwidthCharacterWidth,this.lineHeight=n.get(75),this.minimapLeft=a.minimapLeft,this.minimapWidth=a.minimapWidth,this.minimapHeight=r.height,this.canvasInnerWidth=a.minimapCanvasInnerWidth,this.canvasInnerHeight=a.minimapCanvasInnerHeight,this.canvasOuterWidth=a.minimapCanvasOuterWidth,this.canvasOuterHeight=a.minimapCanvasOuterHeight,this.isSampling=a.minimapIsSampling,this.editorHeight=r.height,this.fontScale=a.minimapScale,this.minimapLineHeight=a.minimapLineHeight,this.minimapCharWidth=1*this.fontScale,this.sectionHeaderFontFamily=Y$,this.sectionHeaderFontSize=h.sectionHeaderFontSize*s,this.sectionHeaderLetterSpacing=h.sectionHeaderLetterSpacing,this.sectionHeaderFontColor=yc._getSectionHeaderColor(t,i.getColor(1)),this.charRenderer=l.createSingleCallFunction(()=>jd.create(this.fontScale,c.fontFamily)),this.defaultBackgroundColor=i.getColor(2),this.backgroundColor=yc._getMinimapBackground(t,this.defaultBackgroundColor),this.foregroundAlpha=yc._getMinimapForegroundOpacity(t)}static _getMinimapBackground(e,t){const i=e.getColor(XV);return i?new ws(i.rgba.r,i.rgba.g,i.rgba.b,Math.round(255*i.rgba.a)):t}static _getMinimapForegroundOpacity(e){const t=e.getColor(JV);return t?ws._clamp(Math.round(255*t.rgba.a)):255}static _getSectionHeaderColor(e,t){const i=e.getColor(nc);return i?new ws(i.rgba.r,i.rgba.g,i.rgba.b,Math.round(255*i.rgba.a)):t}equals(e){return this.renderMinimap===e.renderMinimap&&this.size===e.size&&this.minimapHeightIsEditorHeight===e.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===e.scrollBeyondLastLine&&this.paddingTop===e.paddingTop&&this.paddingBottom===e.paddingBottom&&this.showSlider===e.showSlider&&this.autohide===e.autohide&&this.pixelRatio===e.pixelRatio&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.lineHeight===e.lineHeight&&this.minimapLeft===e.minimapLeft&&this.minimapWidth===e.minimapWidth&&this.minimapHeight===e.minimapHeight&&this.canvasInnerWidth===e.canvasInnerWidth&&this.canvasInnerHeight===e.canvasInnerHeight&&this.canvasOuterWidth===e.canvasOuterWidth&&this.canvasOuterHeight===e.canvasOuterHeight&&this.isSampling===e.isSampling&&this.editorHeight===e.editorHeight&&this.fontScale===e.fontScale&&this.minimapLineHeight===e.minimapLineHeight&&this.minimapCharWidth===e.minimapCharWidth&&this.sectionHeaderFontSize===e.sectionHeaderFontSize&&this.sectionHeaderLetterSpacing===e.sectionHeaderLetterSpacing&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(e.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(e.backgroundColor)&&this.foregroundAlpha===e.foregroundAlpha}}class qd{constructor(e,t,i,n,s,r,a,c,h){this.scrollTop=e,this.scrollHeight=t,this.sliderNeeded=i,this._computedSliderRatio=n,this.sliderTop=s,this.sliderHeight=r,this.topPaddingLineCount=a,this.startLineNumber=c,this.endLineNumber=h}getDesiredScrollTopFromDelta(e){return Math.round(this.scrollTop+e/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(e){return Math.round((e-this.sliderHeight/2)/this._computedSliderRatio)}intersectWithViewport(e){const t=Math.max(this.startLineNumber,e.startLineNumber),i=Math.min(this.endLineNumber,e.endLineNumber);return t>i?null:[t,i]}getYForLineNumber(e,t){return+(e-this.startLineNumber+this.topPaddingLineCount)*t}static create(e,t,i,n,s,r,a,c,h,d,u){const f=e.pixelRatio,g=e.minimapLineHeight,m=Math.floor(e.canvasInnerHeight/g),p=e.lineHeight;if(e.minimapHeightIsEditorHeight){let D=c*e.lineHeight+e.paddingTop+e.paddingBottom;e.scrollBeyondLastLine&&(D+=Math.max(0,s-e.lineHeight-e.paddingBottom));const x=Math.max(1,Math.floor(s*s/D)),I=Math.max(0,e.minimapHeight-x),T=I/(d-s),M=h*T,O=I>0,P=Math.floor(e.canvasInnerHeight/e.minimapLineHeight),k=Math.floor(e.paddingTop/e.lineHeight);return new qd(h,d,O,T,M,x,k,1,Math.min(a,P))}let b;if(r&&i!==a){const D=i-t+1;b=Math.floor(D*g/f)}else{const D=s/p;b=Math.floor(D*g/f)}const v=Math.floor(e.paddingTop/p);let C=Math.floor(e.paddingBottom/p);if(e.scrollBeyondLastLine){const D=s/p;C=Math.max(C,D-1)}let w;if(C>0){const D=s/p;w=(v+a+C-D-1)*g/f}else w=Math.max(0,(v+a)*g/f-b);w=Math.min(e.minimapHeight-b,w);const S=w/(d-s),L=h*S;if(m>=v+a+C){const D=w>0;return new qd(h,d,D,S,L,b,v,1,a)}else{let D;t>1?D=t+v:D=Math.max(1,h/p);let x,I=Math.max(1,Math.floor(D-L*f/g));Ih&&(I=Math.min(I,u.startLineNumber),x=Math.max(x,u.topPaddingLineCount)),u.scrollTop=e.paddingTop?O=(t-I+x+M)*g/f:O=h/e.paddingTop*(x+M)*g/f,new qd(h,d,!0,S,O,b,x,I,T)}}}const nb=class nb{constructor(e){this.dy=e}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}};nb.INVALID=new nb(-1);let bm=nb;class hT{constructor(e,t,i){this.renderedLayout=e,this._imageData=t,this._renderedLines=new kI({createLine:()=>bm.INVALID}),this._renderedLines._set(e.startLineNumber,i)}linesEquals(e){if(!this.scrollEquals(e))return!1;const i=this._renderedLines._get().lines;for(let n=0,s=i.length;n1){for(let v=0,C=n-1;v0&&this.minimapLines[i-1]>=e;)i--;let n=this.modelLineToMinimapLine(t)-1;for(;n+1t)return null}return[i+1,n+1]}decorationLineRangeToMinimapLineRange(e,t){let i=this.modelLineToMinimapLine(e),n=this.modelLineToMinimapLine(t);return e!==t&&n===i&&(n===this.minimapLines.length?i>1&&i--:n++),[i,n]}onLinesDeleted(e){const t=e.toLineNumber-e.fromLineNumber+1;let i=this.minimapLines.length,n=0;for(let s=this.minimapLines.length-1;s>=0&&!(this.minimapLines[s]=0&&!(this.minimapLines[i]0,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,viewportStartLineNumber:t,viewportEndLineNumber:i,viewportStartLineNumberVerticalOffset:e.getVerticalOffsetForLineNumber(t),scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,viewportWidth:e.viewportWidth,viewportHeight:e.viewportHeight};this._actual.render(n)}_recreateLineSampling(){this._minimapSelections=null;const e=!!this._samplingState,[t,i]=Yd.compute(this.options,this._context.viewModel.getLineCount(),this._samplingState);if(this._samplingState=t,e&&this._samplingState)for(const n of i)switch(n.type){case"deleted":this._actual.onLinesDeleted(n.deleteFromLineNumber,n.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(n.insertFromLineNumber,n.insertToLineNumber);break;case"flush":this._actual.onFlushed();break}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.viewModel.getLineCount()}getRealLineCount(){return this._context.viewModel.getLineCount()}getLineContent(e){return this._samplingState?this._context.viewModel.getLineContent(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineContent(e)}getLineMaxColumn(e){return this._samplingState?this._context.viewModel.getLineMaxColumn(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineMaxColumn(e)}getMinimapLinesRenderingData(e,t,i){if(this._samplingState){const n=[];for(let s=0,r=t-e+1;s!i.options.minimap?.sectionHeaderStyle)}getSectionHeaderDecorationsInViewport(e,t){const i=this.options.sectionHeaderFontSize/this.options.minimapLineHeight;return e=Math.floor(Math.max(1,e-i)),this._getMinimapDecorationsInViewport(e,t).filter(n=>!!n.options.minimap?.sectionHeaderStyle)}_getMinimapDecorationsInViewport(e,t){let i;if(this._samplingState){const s=this._samplingState.minimapLines[e-1],r=this._samplingState.minimapLines[t-1];i=new l.Range(s,1,r,this._context.viewModel.getLineMaxColumn(r))}else i=new l.Range(e,1,t,this._context.viewModel.getLineMaxColumn(t));const n=this._context.viewModel.getMinimapDecorationsInRange(i);if(this._samplingState){const s=[];for(const r of n){if(!r.options.minimap)continue;const a=r.range,c=this._samplingState.modelLineToMinimapLine(a.startLineNumber),h=this._samplingState.modelLineToMinimapLine(a.endLineNumber);s.push(new oT(new l.Range(c,a.startColumn,h,a.endColumn),r.options))}return s}return n}getSectionHeaderText(e,t){const i=e.options.minimap?.sectionHeaderText;if(!i)return null;const n=this._sectionHeaderCache.get(i);if(n)return n;const s=t(i);return this._sectionHeaderCache.set(i,s),s}getOptions(){return this._context.viewModel.model.getOptions()}revealLineNumber(e){this._samplingState&&(e=this._samplingState.minimapLines[e-1]),this._context.viewModel.revealRange("mouse",!1,new l.Range(e,1,e,1),1,0)}setScrollTop(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e},1)}}class Lc extends l.Disposable{constructor(e,t){super(),this._renderDecorations=!1,this._gestureInProgress=!1,this._isMouseOverMinimap=!1,this._theme=e,this._model=t,this._lastRenderData=null,this._buffers=null,this._selectionColor=this._theme.getColor(YE),this._domNode=we(document.createElement("div")),Jn.write(this._domNode,9),this._domNode.setClassName(this._getMinimapDomNodeClassName()),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._shadow=we(document.createElement("div")),this._shadow.setClassName("minimap-shadow-hidden"),this._domNode.appendChild(this._shadow),this._canvas=we(document.createElement("canvas")),this._canvas.setPosition("absolute"),this._canvas.setLeft(0),this._domNode.appendChild(this._canvas),this._decorationsCanvas=we(document.createElement("canvas")),this._decorationsCanvas.setPosition("absolute"),this._decorationsCanvas.setClassName("minimap-decorations-layer"),this._decorationsCanvas.setLeft(0),this._domNode.appendChild(this._decorationsCanvas),this._slider=we(document.createElement("div")),this._slider.setPosition("absolute"),this._slider.setClassName("minimap-slider"),this._slider.setLayerHinting(!0),this._slider.setContain("strict"),this._domNode.appendChild(this._slider),this._sliderHorizontal=we(document.createElement("div")),this._sliderHorizontal.setPosition("absolute"),this._sliderHorizontal.setClassName("minimap-slider-horizontal"),this._slider.appendChild(this._sliderHorizontal),this._applyLayout(),this._hideDelayedScheduler=this._register(new l.RunOnceScheduler(()=>this._hideImmediatelyIfMouseIsOutside(),500)),this._register(At(this._domNode.domNode,F.MOUSE_OVER,()=>{this._isMouseOverMinimap=!0})),this._register(At(this._domNode.domNode,F.MOUSE_LEAVE,()=>{this._isMouseOverMinimap=!1})),this._pointerDownListener=At(this._domNode.domNode,F.POINTER_DOWN,i=>{i.preventDefault();const n=i.pointerType==="mouse",s=i.button===0;if(this._model.options.renderMinimap!==0&&this._lastRenderData){if(this._model.options.size!=="proportional"){if(s&&this._lastRenderData){const a=Qi(this._slider.domNode),c=a.top+a.height/2;this._startSliderDragging(i,c,this._lastRenderData.renderedLayout)}return}if(s||!n){const a=this._model.options.minimapLineHeight,c=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*i.offsetY;let d=Math.floor(c/a)+this._lastRenderData.renderedLayout.startLineNumber-this._lastRenderData.renderedLayout.topPaddingLineCount;d=Math.min(d,this._model.getLineCount()),this._model.revealLineNumber(d)}}}),this._sliderPointerMoveMonitor=new xd,this._sliderPointerDownListener=At(this._slider.domNode,F.POINTER_DOWN,i=>{i.preventDefault(),i.stopPropagation(),i.button===0&&this._lastRenderData&&this._startSliderDragging(i,i.pageY,this._lastRenderData.renderedLayout)}),this._gestureDisposable=li.addTarget(this._domNode.domNode),this._sliderTouchStartListener=R(this._domNode.domNode,_.EventType$1.Start,i=>{i.preventDefault(),i.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(i))},{passive:!1}),this._sliderTouchMoveListener=R(this._domNode.domNode,_.EventType$1.Change,i=>{i.preventDefault(),i.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(i)},{passive:!1}),this._sliderTouchEndListener=At(this._domNode.domNode,_.EventType$1.End,i=>{i.preventDefault(),i.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)})}_hideSoon(){this._hideDelayedScheduler.cancel(),this._hideDelayedScheduler.schedule()}_hideImmediatelyIfMouseIsOutside(){if(this._isMouseOverMinimap){this._hideSoon();return}this._domNode.toggleClassName("active",!1)}_startSliderDragging(e,t,i){if(!e.target||!(e.target instanceof Element))return;const n=e.pageX;this._slider.toggleClassName("active",!0);const s=(r,a)=>{const c=Qi(this._domNode.domNode),h=Math.min(Math.abs(a-n),Math.abs(a-c.left),Math.abs(a-c.left-c.width));if(l.isWindows&&h>Z$){this._model.setScrollTop(i.scrollTop);return}const d=r-t;this._model.setScrollTop(i.getDesiredScrollTopFromDelta(d))};e.pageY!==t&&s(e.pageY,n),this._sliderPointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,r=>s(r.pageY,r.pageX),()=>{this._slider.toggleClassName("active",!1)})}scrollDueToTouchEvent(e){const t=this._domNode.domNode.getBoundingClientRect().top,i=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY-t);this._model.setScrollTop(i)}dispose(){this._pointerDownListener.dispose(),this._sliderPointerMoveMonitor.dispose(),this._sliderPointerDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){const e=["minimap"];return this._model.options.showSlider==="always"?e.push("slider-always"):e.push("slider-mouseover"),this._model.options.autohide==="mouseover"?e.push("minimap-autohide-mouseover"):this._model.options.autohide==="scroll"&&e.push("minimap-autohide-scroll"),e.join(" ")}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return this._buffers||this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new Zv(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(e,t){return this._lastRenderData?this._lastRenderData.onLinesChanged(e,t):!1}onLinesDeleted(e,t){return this._lastRenderData?.onLinesDeleted(e,t),!0}onLinesInserted(e,t){return this._lastRenderData?.onLinesInserted(e,t),!0}onScrollChanged(e){return this._model.options.autohide==="scroll"&&(e.scrollTopChanged||e.scrollHeightChanged)&&(this._domNode.toggleClassName("active",!0),this._hideSoon()),this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(YE),this._renderDecorations=!0,!0}onTokensChanged(e){return this._lastRenderData?this._lastRenderData.onTokensChanged(e):!1}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(e){if(this._model.options.renderMinimap===0){this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),this._sliderHorizontal.setHeight(0);return}e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const i=qd.create(this._model.options,e.viewportStartLineNumber,e.viewportEndLineNumber,e.viewportStartLineNumberVerticalOffset,e.viewportHeight,e.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(i.sliderNeeded?"block":"none"),this._slider.setTop(i.sliderTop),this._slider.setHeight(i.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(i.sliderHeight),this.renderDecorations(i),this._lastRenderData=this.renderLines(i)}renderDecorations(e){if(this._renderDecorations){this._renderDecorations=!1;const t=this._model.getSelections();t.sort(l.Range.compareRangesUsingStarts);const i=this._model.getMinimapDecorationsInViewport(e.startLineNumber,e.endLineNumber);i.sort((f,g)=>(f.options.zIndex||0)-(g.options.zIndex||0));const{canvasInnerWidth:n,canvasInnerHeight:s}=this._model.options,r=this._model.options.minimapLineHeight,a=this._model.options.minimapCharWidth,c=this._model.getOptions().tabSize,h=this._decorationsCanvas.domNode.getContext("2d");h.clearRect(0,0,n,s);const d=new dT(e.startLineNumber,e.endLineNumber,!1);this._renderSelectionLineHighlights(h,t,d,e,r),this._renderDecorationsLineHighlights(h,i,d,e,r);const u=new dT(e.startLineNumber,e.endLineNumber,null);this._renderSelectionsHighlights(h,t,u,e,r,c,a,n),this._renderDecorationsHighlights(h,i,u,e,r,c,a,n),this._renderSectionHeaders(e)}}_renderSelectionLineHighlights(e,t,i,n,s){if(!this._selectionColor||this._selectionColor.isTransparent())return;e.fillStyle=this._selectionColor.transparent(.5).toString();let r=0,a=0;for(const c of t){const h=n.intersectWithViewport(c);if(!h)continue;const[d,u]=h;for(let m=d;m<=u;m++)i.set(m,!0);const f=n.getYForLineNumber(d,s),g=n.getYForLineNumber(u,s);a>=f||(a>r&&e.fillRect(ls,r,e.canvas.width,a-r),r=f),a=g}a>r&&e.fillRect(ls,r,e.canvas.width,a-r)}_renderDecorationsLineHighlights(e,t,i,n,s){const r=new Map;for(let a=t.length-1;a>=0;a--){const c=t[a],h=c.options.minimap;if(!h||h.position!==1)continue;const d=n.intersectWithViewport(c.range);if(!d)continue;const[u,f]=d,g=h.getColor(this._theme.value);if(!g||g.isTransparent())continue;let m=r.get(g.toString());m||(m=g.transparent(.5).toString(),r.set(g.toString(),m)),e.fillStyle=m;for(let p=u;p<=f;p++){if(i.has(p))continue;i.set(p,!0);const b=n.getYForLineNumber(p,s);e.fillRect(ls,b,e.canvas.width,s)}}}_renderSelectionsHighlights(e,t,i,n,s,r,a,c){if(!(!this._selectionColor||this._selectionColor.isTransparent()))for(const h of t){const d=n.intersectWithViewport(h);if(!d)continue;const[u,f]=d;for(let g=u;g<=f;g++)this.renderDecorationOnLine(e,i,h,this._selectionColor,n,g,s,s,r,a,c)}}_renderDecorationsHighlights(e,t,i,n,s,r,a,c){for(const h of t){const d=h.options.minimap;if(!d)continue;const u=n.intersectWithViewport(h.range);if(!u)continue;const[f,g]=u,m=d.getColor(this._theme.value);if(!(!m||m.isTransparent()))for(let p=f;p<=g;p++)switch(d.position){case 1:this.renderDecorationOnLine(e,i,h.range,m,n,p,s,s,r,a,c);continue;case 2:{const b=n.getYForLineNumber(p,s);this.renderDecoration(e,m,2,b,Q$,s);continue}}}}renderDecorationOnLine(e,t,i,n,s,r,a,c,h,d,u){const f=s.getYForLineNumber(r,c);if(f+a<0||f>this._model.options.canvasInnerHeight)return;const{startLineNumber:g,endLineNumber:m}=i,p=g===r?i.startColumn:1,b=m===r?i.endColumn:this._model.getLineMaxColumn(r),v=this.getXOffsetForPosition(t,r,p,h,d,u),C=this.getXOffsetForPosition(t,r,b,h,d,u);this.renderDecoration(e,n,v,f,C-v,a)}getXOffsetForPosition(e,t,i,n,s,r){if(i===1)return ls;if((i-1)*s>=r)return r;let c=e.get(t);if(!c){const h=this._model.getLineContent(t);c=[ls];let d=ls;for(let u=1;u=r){c[u]=r;break}c[u]=m,d=m}e.set(t,c)}return i-1p.range.startLineNumber-b.range.startLineNumber);const m=Lc._fitSectionHeader.bind(null,f,r-ls);for(const p of g){const b=e.getYForLineNumber(p.range.startLineNumber,t)+i,v=b-i,C=v+2,w=this._model.getSectionHeaderText(p,m);Lc._renderSectionLabel(f,w,p.options.minimap?.sectionHeaderStyle===2,c,d,r,v,s,b,C)}}static _fitSectionHeader(e,t,i){if(!i)return i;const n="…",s=e.measureText(i).width,r=e.measureText(n).width;if(s<=t||s<=r)return i;const a=i.length,c=s/i.length,h=Math.floor((t-r)/c)-1;let d=Math.ceil(h/2);for(;d>0&&/\s/.test(i[d-1]);)--d;return i.substring(0,d)+n+i.substring(a-(h-d))}static _renderSectionLabel(e,t,i,n,s,r,a,c,h,d){t&&(e.fillStyle=n,e.fillRect(0,a,r,c),e.fillStyle=s,e.fillText(t,ls,h)),i&&(e.beginPath(),e.moveTo(0,d),e.lineTo(r,d),e.closePath(),e.stroke())}renderLines(e){const t=e.startLineNumber,i=e.endLineNumber,n=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(e)){const B=this._lastRenderData._get();return new hT(e,B.imageData,B.lines)}const s=this._getBuffer();if(!s)return null;const[r,a,c]=Lc._renderUntouchedLines(s,e.topPaddingLineCount,t,i,n,this._lastRenderData),h=this._model.getMinimapLinesRenderingData(t,i,c),d=this._model.getOptions().tabSize,u=this._model.options.defaultBackgroundColor,f=this._model.options.backgroundColor,g=this._model.options.foregroundAlpha,m=this._model.tokensColorTracker,p=m.backgroundIsLight(),b=this._model.options.renderMinimap,v=this._model.options.charRenderer(),C=this._model.options.fontScale,w=this._model.options.minimapCharWidth,L=(b===1?2:3)*C,D=n>L?Math.floor((n-L)/2):0,x=f.a/255,I=new ws(Math.round((f.r-u.r)*x+u.r),Math.round((f.g-u.g)*x+u.g),Math.round((f.b-u.b)*x+u.b),255);let T=e.topPaddingLineCount*n;const M=[];for(let B=0,G=i-t+1;B=0&&OC)return;const P=b.charCodeAt(L);if(P===9){const k=f-(L+D)%f;D+=k-1,S+=k*r}else if(P===32)S+=r;else{const k=l.isFullWidthCharacter(P)?2:1;for(let U=0;UC)return}}}}}class dT{constructor(e,t,i){this._startLineNumber=e,this._endLineNumber=t,this._defaultValue=i,this._values=[];for(let n=0,s=this._endLineNumber-this._startLineNumber+1;nthis._endLineNumber||(this._values[e-this._startLineNumber]=t)}get(e){return ethis._endLineNumber?this._defaultValue:this._values[e-this._startLineNumber]}}class J$ extends gi{constructor(e,t){super(e),this._viewDomNode=t;const n=this._context.configuration.options.get(165);this._widgets={},this._verticalScrollbarWidth=n.verticalScrollbarWidth,this._minimapWidth=n.minimap.minimapWidth,this._horizontalScrollbarHeight=n.horizontalScrollbarHeight,this._editorHeight=n.height,this._editorWidth=n.width,this._viewDomNodeRect={top:0,left:0,width:0,height:0},this._domNode=we(document.createElement("div")),Jn.write(this._domNode,4),this._domNode.setClassName("overlayWidgets"),this.overflowingOverlayWidgetsDomNode=we(document.createElement("div")),Jn.write(this.overflowingOverlayWidgetsDomNode,5),this.overflowingOverlayWidgetsDomNode.setClassName("overflowingOverlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(e){const i=this._context.configuration.options.get(165);return this._verticalScrollbarWidth=i.verticalScrollbarWidth,this._minimapWidth=i.minimap.minimapWidth,this._horizontalScrollbarHeight=i.horizontalScrollbarHeight,this._editorHeight=i.height,this._editorWidth=i.width,!0}_widgetCanOverflow(e){const i=this._context.configuration.options.get(4);return(e.allowEditorOverflow||!1)&&i}addWidget(e){const t=we(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),this._widgetCanOverflow(e)?this.overflowingOverlayWidgetsDomNode.appendChild(t):this._domNode.appendChild(t),this.setShouldRender(),this._updateMaxMinWidth()}setWidgetPosition(e,t){const i=this._widgets[e.getId()],n=t?t.preference:null,s=t?.stackOrdinal;return i.preference===n&&i.stack===s?(this._updateMaxMinWidth(),!1):(i.preference=n,i.stack=s,this.setShouldRender(),this._updateMaxMinWidth(),!0)}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const n=this._widgets[t].domNode.domNode;delete this._widgets[t],n.remove(),this.setShouldRender(),this._updateMaxMinWidth()}}_updateMaxMinWidth(){let e=0;const t=Object.keys(this._widgets);for(let i=0,n=t.length;i0);t.sort((n,s)=>(this._widgets[n].stack||0)-(this._widgets[s].stack||0));for(let n=0,s=t.length;n=3){const s=Math.floor(n/3),r=Math.floor(n/3),a=n-s-r,c=e,h=c+s,d=c+s+a;return[[0,c,h,c,d,c,h,c],[0,s,a,s+a,r,s+a+r,a+r,s+a+r]]}else if(i===2){const s=Math.floor(n/2),r=n-s,a=e,c=a+s;return[[0,a,a,a,c,a,a,a],[0,s,s,s,r,s+r,s+r,s+r]]}else{const s=e,r=n;return[[0,s,s,s,s,s,s,s],[0,r,r,r,r,r,r,r]]}}equals(e){return this.lineHeight===e.lineHeight&&this.pixelRatio===e.pixelRatio&&this.overviewRulerLanes===e.overviewRulerLanes&&this.renderBorder===e.renderBorder&&this.borderColor===e.borderColor&&this.hideCursor===e.hideCursor&&this.cursorColorSingle===e.cursorColorSingle&&this.cursorColorPrimary===e.cursorColorPrimary&&this.cursorColorSecondary===e.cursorColorSecondary&&this.themeType===e.themeType&&l.Color.equals(this.backgroundColor,e.backgroundColor)&&this.top===e.top&&this.right===e.right&&this.domWidth===e.domWidth&&this.domHeight===e.domHeight&&this.canvasWidth===e.canvasWidth&&this.canvasHeight===e.canvasHeight}}class H$ extends gi{constructor(e){super(e),this._actualShouldRender=0,this._renderedDecorations=[],this._renderedCursorPositions=[],this._domNode=we(document.createElement("canvas")),this._domNode.setClassName("decorationsOverviewRuler"),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._domNode.setAttribute("aria-hidden","true"),this._updateSettings(!1),this._tokensColorTrackerListener=l.TokenizationRegistry.onDidChange(t=>{t.changedColorMap&&this._updateSettings(!0)}),this._cursorPositions=[{position:new l.Position(1,1),color:this._settings.cursorColorSingle}]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(e){const t=new W$(this._context.configuration,this._context.theme);return this._settings&&this._settings.equals(t)?!1:(this._settings=t,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),!0)}_markRenderingIsNeeded(){return this._actualShouldRender=2,!0}_markRenderingIsMaybeNeeded(){return this._actualShouldRender=1,!0}onConfigurationChanged(e){return this._updateSettings(!1)?this._markRenderingIsNeeded():!1}onCursorStateChanged(e){this._cursorPositions=[];for(let t=0,i=e.selections.length;t1&&(n=t===0?this._settings.cursorColorPrimary:this._settings.cursorColorSecondary),this._cursorPositions.push({position:e.selections[t].getPosition(),color:n})}return this._cursorPositions.sort((t,i)=>l.Position.compare(t.position,i.position)),this._markRenderingIsMaybeNeeded()}onDecorationsChanged(e){return e.affectsOverviewRuler?this._markRenderingIsMaybeNeeded():!1}onFlushed(e){return this._markRenderingIsNeeded()}onScrollChanged(e){return e.scrollHeightChanged?this._markRenderingIsNeeded():!1}onZonesChanged(e){return this._markRenderingIsNeeded()}onThemeChanged(e){return this._updateSettings(!1)?this._markRenderingIsNeeded():!1}getDomNode(){return this._domNode.domNode}prepareRender(e){}render(e){this._render(),this._actualShouldRender=0}_render(){const e=this._settings.backgroundColor;if(this._settings.overviewRulerLanes===0){this._domNode.setBackgroundColor(e?l.Color.Format.CSS.formatHexA(e):""),this._domNode.setDisplay("none");return}const t=this._context.viewModel.getAllOverviewRulerDecorations(this._context.theme);if(t.sort(Cd.compareByRenderingProps),this._actualShouldRender===1&&!Cd.equalsArr(this._renderedDecorations,t)&&(this._actualShouldRender=2),this._actualShouldRender===1&&!l.equals(this._renderedCursorPositions,this._cursorPositions,(m,p)=>m.position.lineNumber===p.position.lineNumber&&m.color===p.color)&&(this._actualShouldRender=2),this._actualShouldRender===1)return;this._renderedDecorations=t,this._renderedCursorPositions=this._cursorPositions,this._domNode.setDisplay("block");const i=this._settings.canvasWidth,n=this._settings.canvasHeight,s=this._settings.lineHeight,r=this._context.viewLayout,a=this._context.viewLayout.getScrollHeight(),c=n/a,h=6*this._settings.pixelRatio|0,d=h/2|0,u=this._domNode.domNode.getContext("2d");e?e.isOpaque()?(u.fillStyle=l.Color.Format.CSS.formatHexA(e),u.fillRect(0,0,i,n)):(u.clearRect(0,0,i,n),u.fillStyle=l.Color.Format.CSS.formatHexA(e),u.fillRect(0,0,i,n)):u.clearRect(0,0,i,n);const f=this._settings.x,g=this._settings.w;for(const m of t){const p=m.color,b=m.data;u.fillStyle=p;let v=0,C=0,w=0;for(let S=0,L=b.length/3;Sn&&(P=n-d),T=P-d,M=P+d}T>w+1||D!==v?(S!==0&&u.fillRect(f[v],C,g[v],w-C),v=D,C=T,w=M):M>w&&(w=M)}u.fillRect(f[v],C,g[v],w-C)}if(!this._settings.hideCursor){const m=2*this._settings.pixelRatio|0,p=m/2|0,b=this._settings.x[7],v=this._settings.w[7];let C=-100,w=-100,S=null;for(let L=0,D=this._cursorPositions.length;Ln&&(T=n-p);const M=T-p,O=M+m;M>w+1||x!==S?(L!==0&&S&&u.fillRect(b,C,v,w-C),C=M,w=O):O>w&&(w=O),S=x,u.fillStyle=x}S&&u.fillRect(b,C,v,w-C)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(u.beginPath(),u.lineWidth=1,u.strokeStyle=this._settings.borderColor,u.moveTo(0,0),u.lineTo(0,n),u.moveTo(1,0),u.lineTo(i,0),u.stroke())}}class uT{constructor(e,t,i){this._colorZoneBrand=void 0,this.from=e|0,this.to=t|0,this.colorId=i|0}static compare(e,t){return e.colorId===t.colorId?e.from===t.from?e.to-t.to:e.from-t.from:e.colorId-t.colorId}}class fT{constructor(e,t,i,n){this._overviewRulerZoneBrand=void 0,this.startLineNumber=e,this.endLineNumber=t,this.heightInLines=i,this.color=n,this._colorZone=null}static compare(e,t){return e.color===t.color?e.startLineNumber===t.startLineNumber?e.heightInLines===t.heightInLines?e.endLineNumber-t.endLineNumber:e.heightInLines-t.heightInLines:e.startLineNumber-t.startLineNumber:e.colori&&(p=i-b);const v=d.color;let C=this._color2Id[v];C||(C=++this._lastAssignedId,this._color2Id[v]=C,this._id2Color[C]=v);const w=new uT(p-b,p+b,C);d.setColorZone(w),a.push(w)}return this._colorZonesInvalid=!1,a.sort(uT.compare),a}}class t4 extends ma{constructor(e,t){super(),this._context=e;const i=this._context.configuration.options;this._domNode=we(document.createElement("canvas")),this._domNode.setClassName(t),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new e4(n=>this._context.viewLayout.getVerticalOffsetForLineNumber(n)),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(i.get(75)),this._zoneManager.setPixelRatio(i.get(163)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return e.hasChanged(75)&&(this._zoneManager.setLineHeight(t.get(75)),this._render()),e.hasChanged(163)&&(this._zoneManager.setPixelRatio(t.get(163)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0}onFlushed(e){return this._render(),!0}onScrollChanged(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0}onZonesChanged(e){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);let t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,t=this._zoneManager.setDOMHeight(e.height)||t,t&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())}setZones(e){this._zoneManager.setZones(e),this._render()}_render(){if(this._zoneManager.getOuterHeight()===0)return!1;const e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),i=this._zoneManager.resolveColorZones(),n=this._zoneManager.getId2Color(),s=this._domNode.domNode.getContext("2d");return s.clearRect(0,0,e,t),i.length>0&&this._renderOneLane(s,i,n,e),!0}_renderOneLane(e,t,i,n){let s=0,r=0,a=0;for(const c of t){const h=c.colorId,d=c.from,u=c.to;h!==s?(s!==0&&e.fillRect(0,r,n,a-r),s=h,e.fillStyle=i[s],r=d,a=u):a>=d?a=Math.max(a,u):(e.fillRect(0,r,n,a-r),r=d,a=u)}e.fillRect(0,r,n,a-r)}}class i4 extends gi{constructor(e){super(e),this.domNode=we(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const t=this._context.configuration.options;this._rulers=t.get(116),this._typicalHalfwidthCharacterWidth=t.get(59).typicalHalfwidthCharacterWidth}onConfigurationChanged(e){const t=this._context.configuration.options;return this._rulers=t.get(116),this._typicalHalfwidthCharacterWidth=t.get(59).typicalHalfwidthCharacterWidth,!0}onScrollChanged(e){return e.scrollHeightChanged}prepareRender(e){}_ensureRulersCount(){const e=this._renderedRulers.length,t=this._rulers.length;if(e===t)return;if(e0;){const s=we(document.createElement("div"));s.setClassName("view-ruler"),s.setWidth("1ch"),this.domNode.appendChild(s),this._renderedRulers.push(s),n--}return}let i=e-t;for(;i>0;){const n=this._renderedRulers.pop();this.domNode.removeChild(n),i--}}render(e){this._ensureRulersCount();for(let t=0,i=this._rulers.length;t0;return this._shouldShow!==e?(this._shouldShow=e,!0):!1}getDomNode(){return this._domNode}_updateWidth(){const t=this._context.configuration.options.get(165);t.minimap.renderMinimap===0||t.minimap.minimapWidth>0&&t.minimap.minimapLeft===0?this._width=t.width:this._width=t.width-t.verticalScrollbarWidth}onConfigurationChanged(e){const i=this._context.configuration.options.get(117);return this._useShadows=i.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()}prepareRender(e){}render(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}class s4{constructor(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}}class o4{constructor(e,t){this.lineNumber=e,this.ranges=t}}function r4(o){return new s4(o)}function a4(o){return new o4(o.lineNumber,o.ranges.map(r4))}const lt=class lt extends hr{constructor(e){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=e;const t=this._context.configuration.options;this._roundedSelection=t.get(115),this._typicalHalfwidthCharacterWidth=t.get(59).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._roundedSelection=t.get(115),this._typicalHalfwidthCharacterWidth=t.get(59).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_visibleRangesHaveGaps(e){for(let t=0,i=e.length;t1)return!0;return!1}_enrichVisibleRangesWithStyle(e,t,i){const n=this._typicalHalfwidthCharacterWidth/4;let s=null,r=null;if(i&&i.length>0&&t.length>0){const a=t[0].lineNumber;if(a===e.startLineNumber)for(let h=0;!s&&h=0;h--)i[h].lineNumber===c&&(r=i[h].ranges[0]);s&&!s.startStyle&&(s=null),r&&!r.startStyle&&(r=null)}for(let a=0,c=t.length;a0){const m=t[a-1].ranges[0].left,p=t[a-1].ranges[0].left+t[a-1].ranges[0].width;Cm(d-m)m&&(f.top=1),Cm(u-p)'}_actualRenderOneSelection(e,t,i,n){if(n.length===0)return;const s=!!n[0].ranges[0].startStyle,r=n[0].lineNumber,a=n[n.length-1].lineNumber;for(let c=0,h=n.length;c1,h)}this._previousFrameVisibleRangesWithStyle=s,this._renderResult=t.map(([r,a])=>r+a)}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}};lt.SELECTION_CLASS_NAME="selected-text",lt.SELECTION_TOP_LEFT="top-left-radius",lt.SELECTION_BOTTOM_LEFT="bottom-left-radius",lt.SELECTION_TOP_RIGHT="top-right-radius",lt.SELECTION_BOTTOM_RIGHT="bottom-right-radius",lt.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",lt.ROUNDED_PIECE_WIDTH=10;let Qv=lt;vs((o,e)=>{const t=o.getColor(DV);t&&!t.isTransparent()&&e.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${t}; }`)});function Cm(o){return o<0?-o:o}class gT{constructor(e,t,i,n,s,r,a){this.top=e,this.left=t,this.paddingLeft=i,this.width=n,this.height=s,this.textContent=r,this.textContentClassName=a}}var go;(function(o){o[o.Single=0]="Single",o[o.MultiPrimary=1]="MultiPrimary",o[o.MultiSecondary=2]="MultiSecondary"})(go||(go={}));class mT{constructor(e,t){this._context=e;const i=this._context.configuration.options,n=i.get(59);this._cursorStyle=i.get(161),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(i.get(37),this._typicalHalfwidthCharacterWidth),this._lineCursorHeight=i.get(38),this._isVisible=!0,this._domNode=we(document.createElement("div")),this._domNode.setClassName(`cursor ${Sc}`),this._domNode.setHeight(this._context.viewLayout.getLineHeightForLineNumber(1)),this._domNode.setTop(0),this._domNode.setLeft(0),Ot(this._domNode,n),this._domNode.setDisplay("none"),this._position=new l.Position(1,1),this._pluralityClass="",this.setPlurality(t),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}setPlurality(e){switch(e){default:case go.Single:this._pluralityClass="";break;case go.MultiPrimary:this._pluralityClass="cursor-primary";break;case go.MultiSecondary:this._pluralityClass="cursor-secondary";break}}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(59);return this._cursorStyle=t.get(161),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(37),this._typicalHalfwidthCharacterWidth),this._lineCursorHeight=t.get(38),Ot(this._domNode,i),!0}onCursorPositionChanged(e,t){return t?this._domNode.domNode.style.transitionProperty="none":this._domNode.domNode.style.transitionProperty="",this._position=e,!0}_getGraphemeAwarePosition(){const{lineNumber:e,column:t}=this._position,i=this._context.viewModel.getLineContent(e),[n,s]=l.getCharContainingOffset(i,t-1);return[new l.Position(e,n+1),i.substring(n,s)]}_prepareRender(e){let t="",i="";const[n,s]=this._getGraphemeAwarePosition(),r=this._context.viewLayout.getLineHeightForLineNumber(n.lineNumber),a=this._lineCursorHeight===0?r:Math.min(r,this._lineCursorHeight),c=(r-a)/2;if(this._cursorStyle===vt.Line||this._cursorStyle===vt.LineThin){const p=e.visibleRangeForPosition(n);if(!p||p.outsideRenderedLine)return null;const b=j(this._domNode.domNode);let v;this._cursorStyle===vt.Line?(v=ux(b,this._lineCursorWidth>0?this._lineCursorWidth:2),v>2&&(t=s,i=this._getTokenClassName(n))):v=ux(b,1);let C=p.left,w=0;v>=2&&C>=1&&(w=1,C-=w);const S=e.getVerticalOffsetForLineNumber(n.lineNumber)-e.bigNumbersDelta+c;return new gT(S,C,w,v,a,t,i)}const h=e.linesVisibleRangesForRange(new l.Range(n.lineNumber,n.column,n.lineNumber,n.column+s.length),!1);if(!h||h.length===0)return null;const d=h[0];if(d.outsideRenderedLine||d.ranges.length===0)return null;const u=d.ranges[0],f=s===" "?this._typicalHalfwidthCharacterWidth:u.width<1?this._typicalHalfwidthCharacterWidth:u.width;this._cursorStyle===vt.Block&&(t=s,i=this._getTokenClassName(n));let g=e.getVerticalOffsetForLineNumber(n.lineNumber)-e.bigNumbersDelta,m=r;return(this._cursorStyle===vt.Underline||this._cursorStyle===vt.UnderlineThin)&&(g+=r-2,m=2),new gT(g,u.left,0,f,m,t,i)}_getTokenClassName(e){const t=this._context.viewModel.getViewLineData(e.lineNumber),i=t.tokens.findTokenIndexAtOffset(e.column-1);return t.tokens.getClassName(i)}prepareRender(e){this._renderData=this._prepareRender(e)}render(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${this._pluralityClass} ${Sc} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setPaddingLeft(this._renderData.paddingLeft),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)}}const bf=class bf extends gi{constructor(e){super(e);const t=this._context.configuration.options;this._readOnly=t.get(104),this._cursorBlinking=t.get(32),this._cursorStyle=t.get(161),this._cursorSmoothCaretAnimation=t.get(33),this._editContextEnabled=t.get(170),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new mT(this._context,go.Single),this._secondaryCursors=[],this._renderData=[],this._domNode=we(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new l.TimeoutTimer,this._cursorFlatBlinkInterval=new sC,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(e){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(e){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(e){const t=this._context.configuration.options;this._readOnly=t.get(104),this._cursorBlinking=t.get(32),this._cursorStyle=t.get(161),this._cursorSmoothCaretAnimation=t.get(33),this._editContextEnabled=t.get(170),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(let i=0,n=this._secondaryCursors.length;it.length){const s=this._secondaryCursors.length-t.length;for(let r=0;r{for(let n=0,s=e.ranges.length;n{this._isVisible?this._hide():this._show()},bf.BLINK_INTERVAL,j(this._domNode.domNode)):this._startCursorBlinkAnimation.setIfNotSet(()=>{this._blinkingEnabled=!0,this._updateDomClassName()},bf.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case vt.Line:e+=" cursor-line-style";break;case vt.Block:e+=" cursor-block-style";break;case vt.Underline:e+=" cursor-underline-style";break;case vt.LineThin:e+=" cursor-line-thin-style";break;case vt.BlockOutline:e+=" cursor-block-outline-style";break;case vt.UnderlineThin:e+=" cursor-underline-thin-style";break;default:e+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:e+=" cursor-blink";break;case 2:e+=" cursor-smooth";break;case 3:e+=" cursor-phase";break;case 4:e+=" cursor-expand";break;case 5:e+=" cursor-solid";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return(this._cursorSmoothCaretAnimation==="on"||this._cursorSmoothCaretAnimation==="explicit")&&(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,t=this._secondaryCursors.length;e{const t=[{class:".cursor",foreground:fm,background:Kv},{class:".cursor-primary",foreground:KI,background:UU},{class:".cursor-secondary",foreground:GI,background:$U}];for(const i of t){const n=o.getColor(i.foreground);if(n){let s=o.getColor(i.background);s||(s=n.opposite()),e.addRule(`.monaco-editor .cursors-layer ${i.class} { background-color: ${n}; border-color: ${n}; color: ${s}; }`),pa(o.type)&&e.addRule(`.monaco-editor .cursors-layer.has-selection ${i.class} { border-left: 1px solid ${s}; border-right: 1px solid ${s}; }`)}}});const Jv=()=>{throw new Error("Invalid change accessor")};class l4 extends gi{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(165);this._lineHeight=t.get(75),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,this.domNode=we(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=we(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){const e=this._context.viewLayout.getWhitespaces(),t=new Map;for(const n of e)t.set(n.id,n);let i=!1;return this._context.viewModel.changeWhitespace(n=>{const s=Object.keys(this._zones);for(let r=0,a=s.length;r{const n={addZone:s=>(t=!0,this._addZone(i,s)),removeZone:s=>{s&&(t=this._removeZone(i,s)||t)},layoutZone:s=>{s&&(t=this._layoutZone(i,s)||t)}};c4(e,n),n.addZone=Jv,n.removeZone=Jv,n.layoutZone=Jv}),t}_addZone(e,t){const i=this._computeWhitespaceProps(t),s={whitespaceId:e.insertWhitespace(i.afterViewLineNumber,this._getZoneOrdinal(t),i.heightInPx,i.minWidthInPx),delegate:t,isInHiddenArea:i.isInHiddenArea,isVisible:!1,domNode:we(t.domNode),marginDomNode:t.marginDomNode?we(t.marginDomNode):null};return this._safeCallOnComputedHeight(s.delegate,i.heightInPx),s.domNode.setPosition("absolute"),s.domNode.domNode.style.width="100%",s.domNode.setDisplay("none"),s.domNode.setAttribute("monaco-view-zone",s.whitespaceId),this.domNode.appendChild(s.domNode),s.marginDomNode&&(s.marginDomNode.setPosition("absolute"),s.marginDomNode.domNode.style.width="100%",s.marginDomNode.setDisplay("none"),s.marginDomNode.setAttribute("monaco-view-zone",s.whitespaceId),this.marginDomNode.appendChild(s.marginDomNode)),this._zones[s.whitespaceId]=s,this.setShouldRender(),s.whitespaceId}_removeZone(e,t){if(this._zones.hasOwnProperty(t)){const i=this._zones[t];return delete this._zones[t],e.removeWhitespace(i.whitespaceId),i.domNode.removeAttribute("monaco-visible-view-zone"),i.domNode.removeAttribute("monaco-view-zone"),i.domNode.domNode.remove(),i.marginDomNode&&(i.marginDomNode.removeAttribute("monaco-visible-view-zone"),i.marginDomNode.removeAttribute("monaco-view-zone"),i.marginDomNode.domNode.remove()),this.setShouldRender(),!0}return!1}_layoutZone(e,t){if(this._zones.hasOwnProperty(t)){const i=this._zones[t],n=this._computeWhitespaceProps(i.delegate);return i.isInHiddenArea=n.isInHiddenArea,e.changeOneWhitespace(i.whitespaceId,n.afterViewLineNumber,n.heightInPx),this._safeCallOnComputedHeight(i.delegate,n.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(e){return this._zones.hasOwnProperty(e)?!!this._zones[e].delegate.suppressMouseDown:!1}_heightInPixels(e){return typeof e.heightInPx=="number"?e.heightInPx:typeof e.heightInLines=="number"?this._lineHeight*e.heightInLines:this._lineHeight}_minWidthInPixels(e){return typeof e.minWidthInPx=="number"?e.minWidthInPx:0}_safeCallOnComputedHeight(e,t){if(typeof e.onComputedHeight=="function")try{e.onComputedHeight(t)}catch(i){l.onUnexpectedError(i)}}_safeCallOnDomNodeTop(e,t){if(typeof e.onDomNodeTop=="function")try{e.onDomNodeTop(t)}catch(i){l.onUnexpectedError(i)}}prepareRender(e){}render(e){const t=e.viewportData.whitespaceViewportData,i={};let n=!1;for(const r of t)this._zones[r.id].isInHiddenArea||(i[r.id]=r,n=!0);const s=Object.keys(this._zones);for(let r=0,a=s.length;rt)continue;const c=a.startLineNumber===t?a.startColumn:n.minColumn,h=a.endLineNumber===t?a.endColumn:n.maxColumn;c=x&&P<=I&&k===32){const B=P-1>=0?a.charCodeAt(P-1):0,G=P+1=0?a.charCodeAt(P-1):0;if(k===32&&B!==32&&B!==9)continue}if(i&&!(M&&M.start<=P&&P`):k===9?L+=`
${S?"→":"→"}
`:L+=`
${String.fromCharCode(w)}
`)}return r?(O=Math.round(O+b),``+L+""):L}_renderArrow(e,t,i){const n=t/7,s=t,r=e/2,a=i,c={x:0,y:n/2},h={x:100/125*s,y:c.y},d={x:h.x-.2*h.x,y:h.y+.2*h.x},u={x:d.x+.1*h.x,y:d.y+.1*h.x},f={x:u.x+.35*h.x,y:u.y-.35*h.x},g={x:f.x,y:-f.y},m={x:u.x,y:-u.y},p={x:d.x,y:-d.y},b={x:h.x,y:-h.y},v={x:c.x,y:-c.y};return``}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}class pT{constructor(e){const t=e.options,i=t.get(59),n=t.get(47);n==="off"?(this.renderWhitespace="none",this.renderWithSVG=!1):n==="svg"?(this.renderWhitespace=t.get(113),this.renderWithSVG=!0):(this.renderWhitespace=t.get(113),this.renderWithSVG=!1),this.spaceWidth=i.spaceWidth,this.middotWidth=i.middotWidth,this.wsmiddotWidth=i.wsmiddotWidth,this.canUseHalfwidthRightwardsArrow=i.canUseHalfwidthRightwardsArrow,this.lineHeight=t.get(75),this.stopRenderingLineAfter=t.get(133)}equals(e){return this.renderWhitespace===e.renderWhitespace&&this.renderWithSVG===e.renderWithSVG&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter}}class d4{constructor(e,t,i,n){this.selections=e,this.startLineNumber=t.startLineNumber|0,this.endLineNumber=t.endLineNumber|0,this.relativeVerticalOffset=t.relativeVerticalOffset,this.bigNumbersDelta=t.bigNumbersDelta|0,this.lineHeight=t.lineHeight|0,this.whitespaceViewportData=i,this._model=n,this.visibleRange=new l.Range(t.startLineNumber,this._model.getLineMinColumn(t.startLineNumber),t.endLineNumber,this._model.getLineMaxColumn(t.endLineNumber))}getViewLineRenderingData(e){return this._model.getViewportViewLineRenderingData(this.visibleRange,e)}getDecorationsInViewport(){return this._model.getDecorationsInViewport(this.visibleRange)}}class u4{get type(){return this._theme.type}get value(){return this._theme}constructor(e){this._theme=e}update(e){this._theme=e}getColor(e){return this._theme.getColor(e)}}class f4{constructor(e,t,i){this.configuration=e,this.theme=new u4(t),this.viewModel=i,this.viewLayout=i.viewLayout}addEventHandler(e){this.viewModel.addViewEventHandler(e)}removeEventHandler(e){this.viewModel.removeViewEventHandler(e)}}const Ea=new Float32Array([1,0,1,1,0,1,0,0,0,1,1,0]);function Ia(o){if(!o)throw new Error(`Value "${o}" cannot be null`);return o}function _T(o,e,t){let i=new e.ResizeObserver(n=>{const s=n.find(c=>c.target===o);if(!s)return;if(!("devicePixelContentBoxSize"in s)){i?.disconnect(),i=void 0;return}const r=s.devicePixelContentBoxSize[0].inlineSize,a=s.devicePixelContentBoxSize[0].blockSize;r>0&&a>0&&t(r,a)});try{i.observe(o,{box:["device-pixel-content-box"]})}catch{throw i.disconnect(),i=void 0,new l.BugIndicatingError("Could not observe device pixel dimensions")}return l.toDisposable(()=>i?.disconnect())}var g4=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s};let m4=0;class Zd extends l.Disposable{get cacheKey(){return`${this.fontFamily}_${this.fontSize}px`}constructor(e,t,i,n){super(),this.fontSize=e,this.fontFamily=t,this.devicePixelRatio=i,this._decorationStyleCache=n,this.id=m4++,this._workGlyph={source:null,boundingBox:{left:0,bottom:0,right:0,top:0},originOffset:{x:0,y:0},fontBoundingBoxAscent:0,fontBoundingBoxDescent:0},this._workGlyphConfig={chars:void 0,tokenMetadata:0,decorationStyleSetId:0},this._antiAliasing=l.isMacintosh?"greyscale":"subpixel";const s=Math.ceil(this.fontSize*i);this._canvas=new OffscreenCanvas(s*3,s*3),this._ctx=Ia(this._canvas.getContext("2d",{willReadFrequently:!0,alpha:this._antiAliasing==="greyscale"})),this._ctx.textBaseline="top",this._ctx.fillStyle="#FFFFFF",this._ctx.font=`${s}px ${this.fontFamily}`,this._textMetrics=this._ctx.measureText("A")}rasterizeGlyph(e,t,i,n){return e===""?{source:this._canvas,boundingBox:{top:0,left:0,bottom:-1,right:-1},originOffset:{x:0,y:0},fontBoundingBoxAscent:0,fontBoundingBoxDescent:0}:this._workGlyphConfig.chars===e&&this._workGlyphConfig.tokenMetadata===t&&this._workGlyphConfig.decorationStyleSetId===i?this._workGlyph:(this._workGlyphConfig.chars=e,this._workGlyphConfig.tokenMetadata=t,this._workGlyphConfig.decorationStyleSetId=i,this._rasterizeGlyph(e,t,i,n))}_rasterizeGlyph(e,t,i,n){const s=Math.ceil(this.fontSize*this.devicePixelRatio),r=s*3;this._canvas.width!==r&&(this._canvas.width=r,this._canvas.height=r),this._ctx.save();const a=(t&15)/10,c=Vi.getBackground(t),h=n[c]??n[2],d=this._decorationStyleCache.getStyleSet(i);this._antiAliasing==="subpixel"?(this._ctx.fillStyle=h,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height)):this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height);const u=new ra(200),f=Vi.getFontStyle(t);f&1&&u.appendString("italic "),d?.bold!==void 0?d.bold&&u.appendString("bold "):f&2&&u.appendString("bold "),u.appendString(`${s}px ${this.fontFamily}`),this._ctx.font=u.build();const g=s,m=s;if(d?.color!==void 0?this._ctx.fillStyle=`#${d.color.toString(16).padStart(8,"0")}`:this._ctx.fillStyle=n[Vi.getForeground(t)],d?.opacity!==void 0&&(this._ctx.globalAlpha=d.opacity),this._ctx.textBaseline="top",this._ctx.fillText(e,g+a,m),d?.strikethrough){const b=Math.round(m-this._textMetrics.alphabeticBaseline*.65),v=d?.strikethroughThickness!==void 0?Math.round(d.strikethroughThickness*this.devicePixelRatio):Math.max(1,Math.floor(s/10));d?.strikethroughColor!==void 0&&(this._ctx.fillStyle=`#${d.strikethroughColor.toString(16).padStart(8,"0")}`),this._ctx.fillRect(g,b-Math.floor(v/2),Math.ceil(this._textMetrics.width),v)}this._ctx.restore();const p=this._ctx.getImageData(0,0,this._canvas.width,this._canvas.height);if(this._antiAliasing==="subpixel"){const b=parseInt(h.substring(1,3),16),v=parseInt(h.substring(3,5),16),C=parseInt(h.substring(5,7),16);this._clearColor(p,b,v,C),this._ctx.putImageData(p,0,0)}return this._findGlyphBoundingBox(p,this._workGlyph.boundingBox),this._workGlyph.source=this._canvas,this._workGlyph.originOffset.x=this._workGlyph.boundingBox.left-g,this._workGlyph.originOffset.y=this._workGlyph.boundingBox.top-m,this._workGlyph.fontBoundingBoxAscent=this._textMetrics.fontBoundingBoxAscent,this._workGlyph.fontBoundingBoxDescent=this._textMetrics.fontBoundingBoxDescent,this._workGlyph}_clearColor(e,t,i,n){for(let s=0;s=t.left;r--){for(let a=0;a=0;r--){for(let a=0;a=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},_4=function(o,e){return function(t,i){e(t,i,o)}};let vm=class extends l.Disposable{constructor(e){super(),this._logService=e,this._tasks=[],this._i=0,this._register(l.toDisposable(()=>this.clear()))}enqueue(e){this._tasks.push(e),this._start()}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(e){this._idleCallback=void 0;let t=0,i=0,n=e.timeRemaining(),s=0;for(;this._is){n-t<-20&&this._logService.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(n-t))}ms`),this._start();return}n=s}this.clear()}};vm=p4([_4(0,ei)],vm);class b4 extends vm{_requestCallback(e){return Le().setTimeout(()=>e(this._createDeadline(16)))}_cancelCallback(e){Le().clearTimeout(e)}_createDeadline(e){const t=Date.now()+e;return{timeRemaining:()=>Math.max(0,t-Date.now())}}}class C4 extends vm{_requestCallback(e){return Le().requestIdleCallback(e)}_cancelCallback(e){Le().cancelIdleCallback(e)}}const v4="requestIdleCallback"in Le()?C4:b4;class w4{constructor(e,t){this._canvas=e,this._textureIndex=t,this._currentRow={x:0,y:0,h:0},this._allocatedGlyphs=new Set,this._nextIndex=0,this._ctx=Ia(this._canvas.getContext("2d",{willReadFrequently:!0}))}allocate(e){const t=e.boundingBox.right-e.boundingBox.left+1,i=e.boundingBox.bottom-e.boundingBox.top+1;if(t>this._canvas.width||i>this._canvas.height)throw new l.BugIndicatingError("Glyph is too large for the atlas page");if(e.boundingBox.right-e.boundingBox.left+1>this._canvas.width-this._currentRow.x&&(this._currentRow.x=0,this._currentRow.y+=this._currentRow.h,this._currentRow.h=1),this._currentRow.y+e.boundingBox.bottom-e.boundingBox.top+1>this._canvas.height)return;this._ctx.drawImage(e.source,e.boundingBox.left,e.boundingBox.top,t,i,this._currentRow.x,this._currentRow.y,t,i);const n={pageIndex:this._textureIndex,glyphIndex:this._nextIndex++,x:this._currentRow.x,y:this._currentRow.y,w:t,h:i,originOffsetX:e.originOffset.x,originOffsetY:e.originOffset.y,fontBoundingBoxAscent:e.fontBoundingBoxAscent,fontBoundingBoxDescent:e.fontBoundingBoxDescent};return this._currentRow.x+=t,this._currentRow.h=Math.max(this._currentRow.h,i),this._allocatedGlyphs.add(n),n}getUsagePreview(){const e=this._canvas.width,t=this._canvas.height,i=new OffscreenCanvas(e,t),n=Ia(i.getContext("2d"));n.fillStyle="#808080",n.fillRect(0,0,e,t);const s=new Map,r=new Map;for(const a of this._allocatedGlyphs)s.set(a.y,Math.max(s.get(a.y)??0,a.h)),r.set(a.y,Math.max(r.get(a.y)??0,a.x+a.w));for(const a of this._allocatedGlyphs)n.fillStyle="#4040FF",n.fillRect(a.x,a.y,a.w,a.h),n.fillStyle="#FF0000",n.fillRect(a.x,a.y+a.h,a.w,s.get(a.y)-a.h);for(const[a,c]of r.entries())a!==this._currentRow.y&&(n.fillStyle="#FF0000",n.fillRect(c,a,e-c,s.get(a)));return i.convertToBlob()}getStats(){const e=this._canvas.width,t=this._canvas.height;let i=0,n=0;const s=e*t,r=new Map,a=new Map;for(const c of this._allocatedGlyphs)r.set(c.y,Math.max(r.get(c.y)??0,c.h)),a.set(c.y,Math.max(a.get(c.y)??0,c.x+c.w));for(const c of this._allocatedGlyphs)i+=c.w*c.h,n+=c.w*(r.get(c.y)-c.h);for(const[c,h]of a.entries())c!==this._currentRow.y&&(n+=(e-h)*r.get(c));return[`page${this._textureIndex}:`,` Total: ${s} (${e}x${t})`,` Used: ${i} (${(i/s*100).toPrecision(2)}%)`,` Wasted: ${n} (${(n/s*100).toPrecision(2)}%)`,`Efficiency: ${(i/(i+n)*100).toPrecision(2)}%`].join(` +`)}}class S4{constructor(e,t,i){this._canvas=e,this._textureIndex=t,this._slabs=[],this._activeSlabsByDims=new l.NKeyMap,this._unusedRects=[],this._openRegionsByHeight=new Map,this._openRegionsByWidth=new Map,this._allocatedGlyphs=new Set,this._nextIndex=0,this._ctx=Ia(this._canvas.getContext("2d",{willReadFrequently:!0})),this._slabW=Math.min(i?.slabW??64<this._canvas.width||i>this._canvas.height)throw new l.BugIndicatingError("Glyph is too large for the atlas page");if(t>this._slabW||i>this._slabH){if(this._allocatedGlyphs.size>0)return;let h=this._canvas.width;for(;t=h&&(s=void 0)}let r,a;if(!s)if(t=0;d--){const u=h[d];if(u.w>=t&&u.h>=i){r=u.x,a=u.y,t=0;d--){const u=h[d];if(u.w>=t&&u.h>=i){r=u.x,a=u.y,i=this._slabsPerRow*this._slabsPerColumn)return;s={x:Math.floor(this._slabs.length%this._slabsPerRow)*this._slabW,y:Math.floor(this._slabs.length/this._slabsPerRow)*this._slabH,entryW:n.w,entryH:n.h,count:0};const d=this._slabW%s.entryW,u=this._slabH%s.entryH;d&&bT(this._openRegionsByWidth,d,{x:s.x+this._slabW-d,w:d,y:s.y,h:this._slabH-(u??0)}),u&&bT(this._openRegionsByHeight,u,{x:s.x,w:this._slabW,y:s.y+this._slabH-u,h:u}),this._slabs.push(s),this._activeSlabsByDims.set(s,n.w,n.h)}const h=Math.floor(this._slabW/s.entryW);r=s.x+Math.floor(s.count%h)*s.entryW,a=s.y+Math.floor(s.count/h)*s.entryH,s.count++}this._ctx.drawImage(e.source,e.boundingBox.left,e.boundingBox.top,t,i,r,a,t,i);const c={pageIndex:this._textureIndex,glyphIndex:this._nextIndex++,x:r,y:a,w:t,h:i,originOffsetX:e.originOffset.x,originOffsetY:e.originOffset.y,fontBoundingBoxAscent:e.fontBoundingBoxAscent,fontBoundingBoxDescent:e.fontBoundingBoxDescent};return this._allocatedGlyphs.add(c),c}getUsagePreview(){const e=this._canvas.width,t=this._canvas.height,i=new OffscreenCanvas(e,t),n=Ia(i.getContext("2d"));n.fillStyle="#808080",n.fillRect(0,0,e,t);let s=0,r=0,a=0;const c=64<c&&(f=0,g+=u.entryH),n.fillStyle="#FF0000",n.fillRect(u.x+f,u.y+g,u.entryW,u.entryH),s+=u.entryW*u.entryH,f+=u.entryW;const m=Math.floor(c/u.entryW),p=Math.floor(h/u.entryH);u.entryW*m*u.entryH*p}for(const u of this._allocatedGlyphs)r+=u.w*u.h,n.fillStyle="#4040FF",n.fillRect(u.x,u.y,u.w,u.h);const d=Array.from(this._openRegionsByWidth.values()).flat().concat(Array.from(this._openRegionsByHeight.values()).flat());for(const u of d)n.fillStyle="#FF000088",n.fillRect(u.x,u.y,u.w,u.h),a+=u.w*u.h;return n.globalAlpha=.5,n.drawImage(this._canvas,0,0),n.globalAlpha=1,i.convertToBlob()}getStats(){const e=this._canvas.width,t=this._canvas.height;let i=0,n=0,s=0,r=0,a=0;const c=e*t,h=64<h&&(p=0,b+=m.entryH),i+=m.entryW*m.entryH,p+=m.entryW;const v=Math.floor(h/m.entryW),C=Math.floor(d/m.entryH),w=m.entryW*v*m.entryH*C;s+=h*d-w}for(const m of this._allocatedGlyphs)n+=m.w*m.h;const u=Array.from(this._openRegionsByWidth.values()).flat().concat(Array.from(this._openRegionsByHeight.values()).flat());for(const m of u)a+=m.w*m.h;const f=s-a;r=i-(n-f);const g=n/(n+r+a);return[`page[${this._textureIndex}]:`,` Total: ${c}px (${e}x${t})`,` Used: ${n}px (${(n/c*100).toFixed(2)}%)`,` Wasted: ${r}px (${(r/c*100).toFixed(2)}%)`,`Restricted: ${a}px (${(a/c*100).toFixed(2)}%) (hard to allocate)`,`Efficiency: ${g===1?"100":(g*100).toFixed(2)}%`,` Slabs: ${this._slabs.length} of ${Math.floor(this._canvas.width/h)*Math.floor(this._canvas.height/d)}`].join(` +`)}}function bT(o,e,t){let i=o.get(e);i||(i=[],o.set(e,i)),i.push(t)}var y4=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},CT=function(o,e){return function(t,i){e(t,i,o)}},Wv;let Hn=(yl=class extends l.Disposable{get version(){return this._version}get usedArea(){return this._usedArea}get source(){return this._canvas}get glyphs(){return this._glyphInOrderSet.values()}constructor(e,t,i,n,s){switch(super(),this._logService=n,this._version=0,this._usedArea={left:0,top:0,right:0,bottom:0},this._glyphMap=new l.NKeyMap,this._glyphInOrderSet=new Set,this._canvas=new OffscreenCanvas(t,t),this._colorMap=s.getColorTheme().tokenColorMap,i){case"shelf":this._allocator=new w4(this._canvas,e);break;case"slab":this._allocator=new S4(this._canvas,e);break;default:this._allocator=i(this._canvas,e);break}this._register(l.toDisposable(()=>{this._canvas.width=1,this._canvas.height=1}))}getGlyph(e,t,i,n){return this._glyphMap.get(t,i,n,e.cacheKey)??this._createGlyph(e,t,i,n)}_createGlyph(e,t,i,n){if(this._glyphInOrderSet.size>=Wv.maximumGlyphCount)return;const s=e.rasterizeGlyph(t,i,n,this._colorMap),r=this._allocator.allocate(s);if(r!==void 0)return this._glyphMap.set(r,t,i,n,e.cacheKey),this._glyphInOrderSet.add(r),this._version++,this._usedArea.right=Math.max(this._usedArea.right,r.x+r.w-1),this._usedArea.bottom=Math.max(this._usedArea.bottom,r.y+r.h-1),this._logService.getLevel()===_.LogLevel.Trace&&this._logService.trace("New glyph",{chars:t,tokenMetadata:i,decorationStyleSetId:n,rasterizedGlyph:s,glyph:r}),r}getUsagePreview(){return this._allocator.getUsagePreview()}getStats(){return this._allocator.getStats()}},Wv=yl,yl.maximumGlyphCount=5e3,yl);Hn=Wv=y4([CT(3,ei),CT(4,_i)],Hn);var L4=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},vT=function(o,e){return function(t,i){e(t,i,o)}},wm;let dr=(Ll=class extends l.Disposable{get pages(){return this._pages}constructor(e,t,i,n,s){super(),this._maxTextureSize=e,this._decorationStyleCache=i,this._themeService=n,this._instantiationService=s,this._warmUpTask=this._register(new l.MutableDisposable),this._warmedUpRasterizers=new Set,this._pages=[],this._glyphPageIndex=new l.NKeyMap,this._onDidDeleteGlyphs=this._register(new l.Emitter),this.onDidDeleteGlyphs=this._onDidDeleteGlyphs.event,this._allocatorType=t?.allocatorType??"slab",this._register(l.Event.runAndSubscribe(this._themeService.onDidColorThemeChange,()=>{this._colorMap&&this.clear(),this._colorMap=this._themeService.getColorTheme().tokenColorMap}));const r=Math.max(1,Math.floor(Le().devicePixelRatio));this.pageSize=Math.min(1024*r,this._maxTextureSize),this._initFirstPage(),this._register(l.toDisposable(()=>l.dispose(this._pages)))}_initFirstPage(){const e=this._instantiationService.createInstance(Hn,0,this.pageSize,this._allocatorType);this._pages.push(e);const t=new Zd(1,"",1,this._decorationStyleCache);e.getGlyph(t,"",0,0),t.dispose()}clear(){for(const e of this._pages)e.dispose();this._pages.length=0,this._glyphPageIndex.clear(),this._warmedUpRasterizers.clear(),this._warmUpTask.clear(),this._initFirstPage(),this._onDidDeleteGlyphs.fire()}getGlyph(e,t,i,n,s){return i&=-2048,i|=Math.floor(s%1*10),this._warmedUpRasterizers.has(e.id)||(this._warmUpAtlas(e),this._warmedUpRasterizers.add(e.id)),this._tryGetGlyph(this._glyphPageIndex.get(t,i,n,e.cacheKey)??0,e,t,i,n)}_tryGetGlyph(e,t,i,n,s){return this._glyphPageIndex.set(e,i,n,s,t.cacheKey),this._pages[e].getGlyph(t,i,n,s)??(e+1=wm.maximumPageCount)throw new Error(`Attempt to create a texture atlas page past the limit ${wm.maximumPageCount}`);return this._pages.push(this._instantiationService.createInstance(Hn,this._pages.length,this.pageSize,this._allocatorType)),this._glyphPageIndex.set(this._pages.length-1,t,i,n,e.cacheKey),this._pages[this._pages.length-1].getGlyph(e,t,i,n)}getStats(){return this._pages.map(e=>e.getStats())}_warmUpAtlas(e){const t=this._colorMap;if(!t)throw new l.BugIndicatingError("Cannot warm atlas without color map");this._warmUpTask.value?.clear();const i=this._warmUpTask.value=this._instantiationService.createInstance(v4);for(let n=65;n<=90;n++)for(const s of t.keys())i.enqueue(()=>{for(let r=0;r<1;r+=.1)this.getGlyph(e,String.fromCharCode(n),s<<15&16744448,0,r)});for(let n=97;n<=122;n++)for(const s of t.keys())i.enqueue(()=>{for(let r=0;r<1;r+=.1)this.getGlyph(e,String.fromCharCode(n),s<<15&16744448,0,r)});for(let n=33;n<=126;n++)for(const s of t.keys())i.enqueue(()=>{for(let r=0;r<1;r+=.1)this.getGlyph(e,String.fromCharCode(n),s<<15&16744448,0,r)})}},wm=Ll,Ll.maximumPageCount=16,Ll);dr=wm=L4([vT(3,_i),vT(4,me)],dr);var Qd;(function(o){o[o.Ignore=0]="Ignore",o[o.Info=1]="Info",o[o.Warning=2]="Warning",o[o.Error=3]="Error"})(Qd||(Qd={})),(function(o){const e="error",t="warning",i="warn",n="info",s="ignore";function r(c){return c?l.equalsIgnoreCase(e,c)?o.Error:l.equalsIgnoreCase(t,c)||l.equalsIgnoreCase(i,c)?o.Warning:l.equalsIgnoreCase(n,c)?o.Info:o.Ignore:o.Ignore}o.fromValue=r;function a(c){switch(c){case o.Error:return e;case o.Warning:return t;case o.Info:return n;default:return s}}o.toString=a})(Qd||(Qd={}));const rt=Qd;var Hv=rt;const yn=le("notificationService");class D4{}var Mi;(function(o){async function e(n){try{if(!navigator.gpu)throw new Error("This browser does not support WebGPU");const s=await navigator.gpu.requestAdapter();if(!s)throw new Error("This browser supports WebGPU but it appears to be disabled");return ew(await s.requestDevice())}catch(s){throw n&&n(s.message),s}}o.requestDevice=e;function t(n,s,r){const a=n.createBuffer(s);return r&&n.queue.writeBuffer(a,0,l.isFunction(r)?r():r),ew(a)}o.createBuffer=t;function i(n,s){return ew(n.createTexture(s))}o.createTexture=i})(Mi||(Mi={}));function ew(o){return{object:o,dispose:()=>o.destroy()}}class x4{get dataOffset(){return this._startIndex}get dirtySize(){if(!(this._startIndex===void 0||this._endIndex===void 0))return this._endIndex-this._startIndex+1}get isDirty(){return this._startIndex!==void 0}flag(e,t=1){return this._flag(e),t>1&&this._flag(e+t-1),e}_flag(e){(this._startIndex===void 0||ethis._endIndex)&&(this._endIndex=e)}clear(){this._startIndex=void 0,this._endIndex=void 0}}function E4(o,e){return new I4(o,e)}class I4 extends l.Disposable{get entryCount(){return this._entries.size}get dirtyTracker(){return this._dirtyTracker}constructor(e,t){super(),this.propertySpecs=e,this.capacity=t,this._dirtyTracker=new x4,this._propertySpecsMap=new Map,this._entries=new l.LinkedList,this._onDidChange=this._register(new l.Emitter),this._onDidChangeBuffer=this._register(new l.Emitter),this.onDidChangeBuffer=this._onDidChangeBuffer.event,this.view=new Float32Array(t*e.length),this.buffer=this.view.buffer,this._entrySize=e.length;for(let i=0;il.dispose(this._entries)))}createEntry(e){this._entries.size===this.capacity&&(this._expandBuffer(),this._onDidChangeBuffer.fire());const t=new T4(this.view,this._propertySpecsMap,this._dirtyTracker,this._entries.size,e),i=this._entries.push(t),n=[];return n.push(l.Event.forward(t.onDidChange,this._onDidChange)),n.push(t.onWillDispose(()=>{const s=t.i;i(),this.view.set(this.view.subarray(s*this._entrySize+2,this._entries.size*this._entrySize+2),s*this._entrySize);for(const r of this._entries)r.i>s&&r.i--;this._dirtyTracker.flag(s,(this._entries.size-s)*this._entrySize),l.dispose(n)})),t}_expandBuffer(){this.capacity*=2;const e=new Float32Array(this.capacity*this._entrySize);e.set(this.view),this.view=e,this.buffer=this.view.buffer}}class T4 extends l.Disposable{constructor(e,t,i,n,s){super(),this._view=e,this._propertySpecsMap=t,this._dirtyTracker=i,this.i=n,this._onDidChange=this._register(new l.Emitter),this.onDidChange=this._onDidChange.event,this._onWillDispose=this._register(new l.Emitter),this.onWillDispose=this._onWillDispose.event;for(const r of this._propertySpecsMap.values())this._view[this.i*this._propertySpecsMap.size+r.offset]=s[r.name];this._dirtyTracker.flag(this.i*this._propertySpecsMap.size,this._propertySpecsMap.size)}dispose(){this._onWillDispose.fire(),super.dispose()}setRaw(e){if(e.length!==this._propertySpecsMap.size)throw new Error(`Data length ${e.length} does not match the number of properties in the collection (${this._propertySpecsMap.size})`);this._view.set(e,this.i*this._propertySpecsMap.size),this._dirtyTracker.flag(this.i*this._propertySpecsMap.size,this._propertySpecsMap.size)}}const N4=` + +struct Vertex { + @location(0) position: vec2f, +}; + +struct LayoutInfo { + canvasDims: vec2f, + viewportOffset: vec2f, + viewportDims: vec2f, +} + +struct ScrollOffset { + offset: vec2f, +} + +struct Shape { + position: vec2f, + size: vec2f, + color: vec4f, +}; + +struct VSOutput { + @builtin(position) position: vec4f, + @location(1) color: vec4f, +}; + +// Uniforms +@group(0) @binding(1) var layoutInfo: LayoutInfo; + +// Storage buffers +@group(0) @binding(0) var shapes: array; +@group(0) @binding(2) var scrollOffset: ScrollOffset; + +@vertex fn vs( + vert: Vertex, + @builtin(instance_index) instanceIndex: u32, + @builtin(vertex_index) vertexIndex : u32 +) -> VSOutput { + let shape = shapes[instanceIndex]; + + var vsOut: VSOutput; + vsOut.position = vec4f( + ( + // Top left corner + vec2f(-1, 1) + + // Convert pixel position to clipspace + vec2f( 2, -2) / layoutInfo.canvasDims * + // Shape position and size + (layoutInfo.viewportOffset - scrollOffset.offset + shape.position + vert.position * shape.size) + ), + 0.0, + 1.0 + ); + vsOut.color = shape.color; + return vsOut; +} + +@fragment fn fs(vsOut: VSOutput) -> @location(0) vec4f { + return vsOut.color; +} +`;class R4 extends ma{constructor(e,t,i,n,s,r){super(),this._context=e,this._contentLeft=t,this._devicePixelRatio=i,this._canvas=n,this._ctx=s,this._shapeBindBuffer=this._register(new l.MutableDisposable),this._initialized=!1,this._shapeCollection=this._register(E4([{name:"x"},{name:"y"},{name:"width"},{name:"height"},{name:"red"},{name:"green"},{name:"blue"},{name:"alpha"}],32)),this._context.addEventHandler(this),this._initWebgpu(r)}async _initWebgpu(e){if(this._device=await e,this._store.isDisposed)return;const t=navigator.gpu.getPreferredCanvasFormat();this._ctx.configure({device:this._device,format:t,alphaMode:"premultiplied"}),this._renderPassColorAttachment={view:null,loadOp:"load",storeOp:"store"},this._renderPassDescriptor={label:"Monaco rectangle renderer render pass",colorAttachments:[this._renderPassColorAttachment]};let i;{const a=new Float32Array(6),c=(h=this._canvas.width,d=this._canvas.height)=>(a[0]=h,a[1]=d,a[2]=Math.ceil(this._context.configuration.options.get(165).contentLeft*Le().devicePixelRatio),a[3]=0,a[4]=a[0]-a[2],a[5]=a[1]-a[3],a);i=this._register(Mi.createBuffer(this._device,{label:"Monaco rectangle renderer uniform buffer",size:24,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST},()=>c())).object,this._register(_T(this._canvas,Le(),(h,d)=>{this._device.queue.writeBuffer(i,0,c(h,d))}))}const n=2;this._scrollOffsetBindBuffer=this._register(Mi.createBuffer(this._device,{label:"Monaco rectangle renderer scroll offset buffer",size:n*Float32Array.BYTES_PER_ELEMENT,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST})).object,this._scrollOffsetValueBuffer=new Float32Array(n);const s=()=>Mi.createBuffer(this._device,{label:"Monaco rectangle renderer shape buffer",size:this._shapeCollection.buffer.byteLength,usage:GPUBufferUsage.STORAGE|GPUBufferUsage.COPY_DST});this._shapeBindBuffer.value=s(),this._register(l.Event.runAndSubscribe(this._shapeCollection.onDidChangeBuffer,()=>{this._shapeBindBuffer.value=s(),this._pipeline&&this._updateBindGroup(this._pipeline,i)})),this._vertexBuffer=this._register(Mi.createBuffer(this._device,{label:"Monaco rectangle renderer vertex buffer",size:Ea.byteLength,usage:GPUBufferUsage.VERTEX|GPUBufferUsage.COPY_DST},Ea)).object;const r=this._device.createShaderModule({label:"Monaco rectangle renderer shader module",code:N4});this._pipeline=this._device.createRenderPipeline({label:"Monaco rectangle renderer render pipeline",layout:"auto",vertex:{module:r,buffers:[{arrayStride:2*Float32Array.BYTES_PER_ELEMENT,attributes:[{shaderLocation:0,offset:0,format:"float32x2"}]}]},fragment:{module:r,targets:[{format:t,blend:{color:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha"},alpha:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha"}}}]}}),this._updateBindGroup(this._pipeline,i),this._initialized=!0}_updateBindGroup(e,t){this._bindGroup=this._device.createBindGroup({label:"Monaco rectangle renderer bind group",layout:e.getBindGroupLayout(0),entries:[{binding:0,resource:{buffer:this._shapeBindBuffer.value.object}},{binding:1,resource:{buffer:t}},{binding:2,resource:{buffer:this._scrollOffsetBindBuffer}}]})}register(e,t,i,n,s,r,a,c){return this._shapeCollection.createEntry({x:e,y:t,width:i,height:n,red:s,green:r,blue:a,alpha:c})}onScrollChanged(e){if(this._device){const t=Le().devicePixelRatio;this._scrollOffsetValueBuffer[0]=this._context.viewLayout.getCurrentScrollLeft()*t,this._scrollOffsetValueBuffer[1]=this._context.viewLayout.getCurrentScrollTop()*t,this._device.queue.writeBuffer(this._scrollOffsetBindBuffer,0,this._scrollOffsetValueBuffer)}return!0}_update(){if(!this._device)return;const e=this._shapeCollection;e.dirtyTracker.isDirty&&(this._device.queue.writeBuffer(this._shapeBindBuffer.value.object,0,e.buffer,e.dirtyTracker.dataOffset,e.dirtyTracker.dirtySize*e.view.BYTES_PER_ELEMENT),e.dirtyTracker.clear())}draw(e){if(!this._initialized)return;this._update();const t=this._device.createCommandEncoder({label:"Monaco rectangle renderer command encoder"});this._renderPassColorAttachment.view=this._ctx.getCurrentTexture().createView();const i=t.beginRenderPass(this._renderPassDescriptor);i.setPipeline(this._pipeline),i.setVertexBuffer(0,this._vertexBuffer),i.setBindGroup(0,this._bindGroup);const n=Math.ceil(this._contentLeft.get()*this._devicePixelRatio.get());i.setScissorRect(n,0,this._canvas.width-n,this._canvas.height),i.draw(Ea.length/2,this._shapeCollection.entryCount),i.end();const s=t.finish();this._device.queue.submit([s])}}class M4 extends l.Disposable{constructor(){super(),this._ruleCache=new Map,this._cssVariableCache=new Map,this._container=Q("div.monaco-decoration-css-rule-extractor"),this._dummyElement=Q("span"),this._container.appendChild(this._dummyElement),this._register(l.toDisposable(()=>this._container.remove()))}getStyleRules(e,t){const i=this._ruleCache.get(t);if(i)return i;this._dummyElement.className=t,e.appendChild(this._container);const n=this._getStyleRules(t);return this._ruleCache.set(t,n),e.removeChild(this._container),n}_getStyleRules(e){const t=[],n=[...od().styleSheets],s=e.split(" ").filter(r=>r.length>0);for(let r=0;r=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Sm=function(o,e){return function(t,i){e(t,i,o)}},ti;_.ViewGpuContext=(Or=class extends l.Disposable{static get decorationCssRuleExtractor(){return ti._decorationCssRuleExtractor}static get decorationStyleCache(){return ti._decorationStyleCache}static get atlas(){if(!ti._atlas)throw new l.BugIndicatingError("Cannot call ViewGpuContext.textureAtlas before device is resolved");return ti._atlas}get atlas(){return ti.atlas}constructor(e,t,i,n,s){super(),this._instantiationService=t,this._notificationService=i,this.configurationService=n,this._themeService=s,this.maxGpuCols=2e3,this.canvas=we(document.createElement("canvas")),this.canvas.setClassName("editorCanvas"),this._register(l.Event.runAndSubscribe(n.onDidChangeConfiguration,h=>{if(!h||h.affectsConfiguration("editor.scrollbar.verticalScrollbarSize")){const d=n.getValue("editor").scrollbar?.verticalScrollbarSize??14;this.canvas.domNode.style.boxSizing="border-box",this.canvas.domNode.style.paddingRight=`${d}px`}})),this.ctx=Ia(this.canvas.domNode.getContext("webgpu")),ti.device||(ti.device=Mi.requestDevice(h=>{const d=[{label:l.localize(82,"Use DOM-based rendering"),run:()=>this.configurationService.updateValue("editor.experimentalGpuAcceleration","off")}];this._notificationService.prompt(Hv.Warning,h,d)}).then(h=>(ti.deviceSync=h.object,ti._atlas||(ti._atlas=this._instantiationService.createInstance(dr,h.object.limits.maxTextureDimension2D,void 0,ti.decorationStyleCache)),h.object)));const r=W(this,Le().devicePixelRatio);this._register(R(Le(),"resize",()=>{r.set(Le().devicePixelRatio,void 0)})),this.devicePixelRatio=r,this._register(Qr(this.devicePixelRatio,()=>ti.atlas?.clear())),this._register(this._themeService.onDidColorThemeChange(()=>{ti.decorationCssRuleExtractor.clear(),ti.atlas?.clear()}));const a=W(this,{width:this.canvas.domNode.width,height:this.canvas.domNode.height});this._register(_T(this.canvas.domNode,Le(),(h,d)=>{this.canvas.domNode.width=h,this.canvas.domNode.height=d,a.set({width:h,height:d},void 0)})),this.canvasDevicePixelDimensions=a;const c=W(this,0);this._register(this.configurationService.onDidChangeConfiguration(h=>{c.set(e.configuration.options.get(165).contentLeft,void 0)})),this.contentLeft=c,this.rectangleRenderer=this._register(this._instantiationService.createInstance(R4,e,this.contentLeft,this.devicePixelRatio,this.canvas.domNode,this.ctx,ti.device))}canRender(e,t,i){const n=t.getViewLineRenderingData(i);if(n.containsRTL||n.maxColumn>this.maxGpuCols)return!1;if(n.inlineDecorations.length>0){let s=!0;for(const r of n.inlineDecorations){if(r.type!==0){s=!1;break}const a=ti._decorationCssRuleExtractor.getStyleRules(this.canvas.domNode,r.inlineClassName);if(s&&=a.every(c=>{if(c.selectorText.includes(":"))return!1;for(const h of c.style)if(!wT(h,c.style))return!1;return!0}),!s)break}return s}return!0}canRenderDetailed(e,t,i){const n=t.getViewLineRenderingData(i),s=[];if(n.containsRTL&&s.push("containsRTL"),n.maxColumn>this.maxGpuCols&&s.push("maxColumn > maxGpuCols"),n.inlineDecorations.length>0){let r=!0;const a=[],c=[],h=[];for(const d of n.inlineDecorations){if(d.type!==0){a.push(d.type),r=!1;continue}const u=ti._decorationCssRuleExtractor.getStyleRules(this.canvas.domNode,d.inlineClassName);r&&=u.every(f=>{if(f.selectorText.includes(":"))return c.push(f.selectorText),!1;for(const g of f.style)if(!wT(g,f.style))return h.push(`${g}: ${f.style[g]}`),!1;return!0})}a.length>0&&s.push(`inlineDecorations with unsupported types (${a.map(d=>`\`${d}\``).join(", ")})`),h.length>0&&s.push(`inlineDecorations with unsupported CSS rules (${h.map(d=>`\`${d}\``).join(", ")})`),c.length>0&&s.push(`inlineDecorations with unsupported CSS selectors (${c.map(d=>`\`${d}\``).join(", ")})`)}return s}},ti=Or,Or._decorationCssRuleExtractor=new M4,Or._decorationStyleCache=new A4,Or),_.ViewGpuContext=ti=O4([Sm(1,me),Sm(2,yn),Sm(3,Ge),Sm(4,_i)],_.ViewGpuContext);const P4=["color","font-weight","opacity","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-decoration-thickness"];function wT(o,e){if(!P4.includes(o))return!1;switch(o){case"text-decoration":case"text-decoration-line":return e.getPropertyValue(o)==="line-through";case"text-decoration-color":{const t=e.getPropertyValue(o);return/^var\(--[^,]+,\s*(?:initial|inherit)\)$/.test(t)?!0:l.Color.Format.CSS.parse(t)!==null}case"text-decoration-style":return e.getPropertyValue(o)==="initial";case"text-decoration-thickness":{const t=e.getPropertyValue(o);return t==="initial"||/^\d+(\.\d+)?px$/.test(t)}default:return!0}}function Xd(o,e){return o.isBasicASCII&&e.useMonospaceOptimizations?new k4(o):new F4(o)}class k4{constructor(e){this._content=e.content}getSegmentAtIndex(e){return this._content[e]}}class F4{constructor(e){this._segments=[];const t=e.content,i=l.safeIntl.Segmenter(void 0,{granularity:"grapheme"}).value,n=Array.from(i.segment(t));let s=0;for(let r=0;r layoutInfo: LayoutInfo; +@group(0) @binding(5) var atlasDims: vec2f; +@group(0) @binding(6) var scrollOffset: ScrollOffset; + +// Storage buffers +@group(0) @binding(0) var glyphInfo: array, ${dr.maximumPageCount}>; +@group(0) @binding(1) var cells: array; + +@vertex fn vs( + vert: Vertex, + @builtin(instance_index) instanceIndex: u32, + @builtin(vertex_index) vertexIndex : u32 +) -> VSOutput { + let cell = cells[instanceIndex]; + var glyph = glyphInfo[u32(cell.textureIndex)][u32(cell.glyphIndex)]; + + var vsOut: VSOutput; + // Multiple vert.position by 2,-2 to get it into clipspace which ranged from -1 to 1 + vsOut.position = vec4f( + // Make everything relative to top left instead of center + vec2f(-1, 1) + + ((vert.position * vec2f(2, -2)) / layoutInfo.canvasDims) * glyph.size + + ((cell.position * vec2f(2, -2)) / layoutInfo.canvasDims) + + ((glyph.origin * vec2f(2, -2)) / layoutInfo.canvasDims) + + (((layoutInfo.viewportOffset - scrollOffset.offset * vec2(1, -1)) * 2) / layoutInfo.canvasDims), + 0.0, + 1.0 + ); + + vsOut.layerIndex = cell.textureIndex; + // Textures are flipped from natural direction on the y-axis, so flip it back + vsOut.texcoord = vert.position; + vsOut.texcoord = ( + // Glyph offset (0-1) + (glyph.position / atlasDims) + + // Glyph coordinate (0-1) + (vsOut.texcoord * (glyph.size / atlasDims)) + ); + + return vsOut; +} + +@group(0) @binding(2) var ourSampler: sampler; +@group(0) @binding(3) var ourTexture: texture_2d_array; + +@fragment fn fs(vsOut: VSOutput) -> @location(0) vec4f { + return textureSample(ourTexture, ourSampler, vsOut.texcoord, u32(vsOut.layerIndex)); +} +`,Xs=class Xs extends ST{get bindGroupEntries(){return[{binding:1,resource:{buffer:this._cellBindBuffer}},{binding:6,resource:{buffer:this._scrollOffsetBindBuffer}}]}constructor(e,t,i,n){super(e,t,i,n),this.type="viewport",this.wgsl=yT,this._cellBindBufferLineCapacity=63,this._activeDoubleBufferIndex=0,this._visibleObjectCount=0,this._lastViewportLineCount=0,this._scrollInitialized=!1,this._onDidChangeBindGroupEntries=this._register(new l.Emitter),this.onDidChangeBindGroupEntries=this._onDidChangeBindGroupEntries.event,this._rebuildCellBuffer(this._cellBindBufferLineCapacity);const s=2;this._scrollOffsetBindBuffer=this._register(Mi.createBuffer(this._device,{label:"Monaco scroll offset buffer",size:s*Float32Array.BYTES_PER_ELEMENT,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST})).object,this._scrollOffsetValueBuffer=new Float32Array(s)}_rebuildCellBuffer(e){this._cellBindBuffer?.destroy();const t=(Math.floor(e/32)+1)*32,i=t*Xs.maxSupportedColumns*6*Float32Array.BYTES_PER_ELEMENT;this._cellBindBuffer=this._register(Mi.createBuffer(this._device,{label:"Monaco full file cell buffer",size:i,usage:GPUBufferUsage.STORAGE|GPUBufferUsage.COPY_DST})).object,this._cellValueBuffers=[new ArrayBuffer(i),new ArrayBuffer(i)],this._cellBindBufferLineCapacity=t,this._lastViewportLineCount=0,this._onDidChangeBindGroupEntries.fire()}onConfigurationChanged(e){return!0}onDecorationsChanged(e){return!0}onTokensChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onLinesChanged(e){return!0}onScrollChanged(e){if(this._store.isDisposed)return!1;const t=Le().devicePixelRatio;return this._scrollOffsetValueBuffer[0]=(e?.scrollLeft??this._context.viewLayout.getCurrentScrollLeft())*t,this._scrollOffsetValueBuffer[1]=(e?.scrollTop??this._context.viewLayout.getCurrentScrollTop())*t,this._device.queue.writeBuffer(this._scrollOffsetBindBuffer,0,this._scrollOffsetValueBuffer),!0}onThemeChanged(e){return!0}onLineMappingChanged(e){return!0}onZonesChanged(e){return!0}reset(){for(const e of[0,1]){const t=new Float32Array(this._cellValueBuffers[e]);t.fill(0,0,t.length),this._device.queue.writeBuffer(this._cellBindBuffer,0,t.buffer,0,t.byteLength)}this._lastViewportLineCount=0}update(e,t){let i="",n,s=0,r=0,a=0,c=0,h=0,d=0,u,f=0,g=0,m=0,p=0,b,v,C,w,S,L,D,x,I=0,T=0,M;const O=Le().devicePixelRatio;let P;this._scrollInitialized||(this.onScrollChanged(),this._scrollInitialized=!0),this._cellBindBufferLineCapacityXs.maxSupportedColumns);a++){if(n=P.getSegmentAtIndex(a),n===void 0)continue;i=n,D.isBasicASCII&&t.useMonospaceOptimizations||(s=this.glyphRasterizer.getTextMetrics(i).width),v=void 0,b=void 0,C=void 0,w=void 0,S=void 0,L=void 0;for(x of D.inlineDecorations){if(rx.range.endLineNumber||r===x.range.startLineNumber&&a=x.range.endColumn-1)continue;const ee=_.ViewGpuContext.decorationCssRuleExtractor.getStyleRules(this._viewGpuContext.canvas.domNode,x.inlineClassName);for(const Ee of ee)for(const Rt of Ee.style){const We=Ee.styleMap.get(Rt)?.toString()??"";switch(Rt){case"color":{const Ke=l.Color.Format.CSS.parse(We);if(!Ke)throw new l.BugIndicatingError("Invalid color format "+We);v=Ke.toNumber32Bit();break}case"font-weight":{B4(We)>=400?b=!0:b=!1;break}case"opacity":{C=z4(We);break}case"text-decoration":case"text-decoration-line":{We==="line-through"&&(w=!0);break}case"text-decoration-thickness":{const Ke=We.match(/^(\d+(?:\.\d+)?)px$/);Ke&&(S=parseFloat(Ke[1]));break}case"text-decoration-color":{let Ke=We;const Mt=We.match(/^var\((--[^,]+),\s*(?:initial|inherit)\)$/);Mt&&(Ke=_.ViewGpuContext.decorationCssRuleExtractor.resolveCssVariable(this._viewGpuContext.canvas.domNode,Mt[1]));const Ce=l.Color.Format.CSS.parse(Ke);Ce&&(L=Ce.toNumber32Bit());break}case"text-decoration-style":break;default:throw new l.BugIndicatingError("Unexpected inline decoration style")}}}if(i===" "||i===" "){if(f=((r-1)*Xs.maxSupportedColumns+a)*6,k.fill(0,f,f+6),i===" "){const ee=a+d;d=Xe.nextRenderTabStop(a+d,D.tabSize),c+=s*(d-ee),d-=a+1}else c+=s;continue}const Y=_.ViewGpuContext.decorationStyleCache.getOrCreateEntry(v,b,C,w,S,L);u=this._viewGpuContext.atlas.getGlyph(this.glyphRasterizer,i,p,Y,c),h=Math.round(e.relativeVerticalOffset[r-e.startLineNumber]*O+Math.floor((e.lineHeight*O-(u.fontBoundingBoxAscent+u.fontBoundingBoxDescent))/2)+u.fontBoundingBoxAscent),f=((r-e.startLineNumber)*Xs.maxSupportedColumns+a)*6,k[f+0]=Math.floor(c),k[f+1]=h,k[f+4]=u.glyphIndex,k[f+5]=u.pageIndex,c+=s}g=m}I=((r-e.startLineNumber)*Xs.maxSupportedColumns+m)*6,T=(r-e.startLineNumber)*Xs.maxSupportedColumns*6,k.fill(0,I,T)}const B=(e.endLineNumber-e.startLineNumber+1)*U,G=e.endLineNumber-e.startLineNumber+1;if(this._device.queue.writeBuffer(this._cellBindBuffer,0,k.buffer,0,B*Float32Array.BYTES_PER_ELEMENT),G=e&&i.delete(n)}}_invalidateLineRange(e,t){for(let i=e;i<=t;i++)this._upToDateLines[0].delete(i),this._upToDateLines[1].delete(i)}reset(){this._invalidateAllLines();for(const e of[0,1]){const t=new Float32Array(this._cellValueBuffers[e]);t.fill(0,0,t.length),this._device.queue.writeBuffer(this._cellBindBuffer,0,t.buffer,0,t.byteLength)}this._finalRenderedLine=0}update(e,t){let i="",n,s=0,r=0,a=0,c=0,h=0,d=0,u,f=0,g=0,m=0,p=0,b,v,C,w,S,L,D,x,I=0,T=0,M;const O=Le().devicePixelRatio;let P;this._scrollInitialized||(this.onScrollChanged(),this._scrollInitialized=!0);const k=new Float32Array(this._cellValueBuffers[this._activeDoubleBufferIndex]),U=Xt.maxSupportedColumns*6,B=this._upToDateLines[this._activeDoubleBufferIndex];let G=3e3,X=0;const re=this._queuedBufferUpdates[this._activeDoubleBufferIndex];for(;re.length;){const ee=re.shift();switch(ee.type){case 2:case 8:case 17:{k.fill(0),G=1,X=Math.max(X,this._finalRenderedLine),this._finalRenderedLine=0;break}case 10:{const Ee=(ee.fromLineNumber-1)*Xt.maxSupportedColumns*6,Rt=ee.toLineNumber*Xt.maxSupportedColumns*6,We=(this._finalRenderedLine-(ee.toLineNumber-ee.fromLineNumber+1))*Xt.maxSupportedColumns*6;k.set(k.subarray(Rt),Ee),k.fill(0,We),G=Math.min(G,ee.fromLineNumber),X=Math.max(X,this._finalRenderedLine),this._finalRenderedLine-=ee.toLineNumber-ee.fromLineNumber+1;break}}}for(r=e.startLineNumber;r<=e.endLineNumber;r++){if(!this._viewGpuContext.canRender(t,e,r)){I=(r-1)*Xt.maxSupportedColumns*6,T=r*Xt.maxSupportedColumns*6,k.fill(0,I,T),G=Math.min(G,r),X=Math.max(X,r);continue}if(!B.has(r)){G=Math.min(G,r),X=Math.max(X,r),D=e.getViewLineRenderingData(r),d=0,P=Xd(D,t),s=t.spaceWidth*O,c=(D.minColumn-1)*s,M=D.tokens,g=D.minColumn-1,m=0;for(let ee=0,Ee=M.getCount();eeXt.maxSupportedColumns);a++){if(n=P.getSegmentAtIndex(a),n===void 0)continue;i=n,D.isBasicASCII&&t.useMonospaceOptimizations||(s=this.glyphRasterizer.getTextMetrics(i).width),v=void 0,b=void 0,C=void 0,w=void 0,S=void 0,L=void 0;for(x of D.inlineDecorations){if(rx.range.endLineNumber||r===x.range.startLineNumber&&a=x.range.endColumn-1)continue;const We=_.ViewGpuContext.decorationCssRuleExtractor.getStyleRules(this._viewGpuContext.canvas.domNode,x.inlineClassName);for(const Ke of We)for(const Mt of Ke.style){const Ce=Ke.styleMap.get(Mt)?.toString()??"";switch(Mt){case"color":{const Jt=l.Color.Format.CSS.parse(Ce);if(!Jt)throw new l.BugIndicatingError("Invalid color format "+Ce);v=Jt.toNumber32Bit();break}case"font-weight":{V4(Ce)>=400?b=!0:b=!1;break}case"opacity":{C=U4(Ce);break}case"text-decoration":case"text-decoration-line":{Ce==="line-through"&&(w=!0);break}case"text-decoration-thickness":{const Jt=Ce.match(/^(\d+(?:\.\d+)?)px$/);Jt&&(S=parseFloat(Jt[1]));break}case"text-decoration-color":{let Jt=Ce;const Me=Ce.match(/^var\((--[^,]+),\s*(?:initial|inherit)\)$/);Me&&(Jt=_.ViewGpuContext.decorationCssRuleExtractor.resolveCssVariable(this._viewGpuContext.canvas.domNode,Me[1]));const Rn=l.Color.Format.CSS.parse(Jt);Rn&&(L=Rn.toNumber32Bit());break}case"text-decoration-style":break;default:throw new l.BugIndicatingError("Unexpected inline decoration style")}}}if(i===" "||i===" "){if(f=((r-1)*Xt.maxSupportedColumns+a)*6,k.fill(0,f,f+6),i===" "){const We=a+d;d=Xe.nextRenderTabStop(a+d,D.tabSize),c+=s*(d-We),d-=a+1}else c+=s;continue}const Rt=_.ViewGpuContext.decorationStyleCache.getOrCreateEntry(v,b,C,w,S,L);u=this._viewGpuContext.atlas.getGlyph(this.glyphRasterizer,i,p,Rt,c),h=Math.round(e.relativeVerticalOffset[r-e.startLineNumber]*O+Math.floor((e.lineHeight*O-(u.fontBoundingBoxAscent+u.fontBoundingBoxDescent))/2)+u.fontBoundingBoxAscent),f=((r-1)*Xt.maxSupportedColumns+a)*6,k[f+0]=Math.floor(c),k[f+1]=h,k[f+4]=u.glyphIndex,k[f+5]=u.pageIndex,c+=s}g=m}I=((r-1)*Xt.maxSupportedColumns+m)*6,T=r*Xt.maxSupportedColumns*6,k.fill(0,I,T),B.add(r)}}const Y=(e.endLineNumber-e.startLineNumber+1)*U;return G=Math.min(G,Xt.maxSupportedLines),X=Math.min(X,Xt.maxSupportedLines),G<=X&&this._device.queue.writeBuffer(this._cellBindBuffer,(G-1)*U*Float32Array.BYTES_PER_ELEMENT,k.buffer,(G-1)*U*Float32Array.BYTES_PER_ELEMENT,(X-G+1)*U*Float32Array.BYTES_PER_ELEMENT),this._finalRenderedLine=Math.max(this._finalRenderedLine,X),this._activeDoubleBufferIndex=this._activeDoubleBufferIndex?0:1,this._visibleObjectCount=Y,Y}draw(e,t){if(this._visibleObjectCount<=0)throw new l.BugIndicatingError("Attempt to draw 0 objects");e.draw(Ea.length/2,this._visibleObjectCount,void 0,(t.startLineNumber-1)*Xt.maxSupportedColumns)}_queueBufferUpdate(e){this._queuedBufferUpdates[0].push(e),this._queuedBufferUpdates[1].push(e)}};Xt.maxSupportedLines=3e3,Xt.maxSupportedColumns=200;let Ta=Xt;function V4(o){switch(o){case"lighter":case"normal":return 400;case"bolder":case"bold":return 700}return parseInt(o)}function U4(o){return o.endsWith("%")?parseFloat(o.substring(0,o.length-1))/100:o.match(/^\d+(?:\.\d*)/)?parseFloat(o):1}var $4=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},LT=function(o,e){return function(t,i){e(t,i,o)}};let iw=class extends gi{constructor(e,t,i,n){super(e),this._viewGpuContext=t,this._instantiationService=i,this._logService=n,this._maxLineWidth=0,this._atlasGpuTextureVersions=[],this._initialized=!1,this._glyphRasterizer=this._register(new l.MutableDisposable),this._renderStrategy=this._register(new l.MutableDisposable),this.canvas=this._viewGpuContext.canvas.domNode,this._register(he(s=>{this._viewGpuContext.canvasDevicePixelDimensions.read(s);const r=this._lastViewportData;r&&setTimeout(()=>{r===this._lastViewportData&&this.renderText(r)})})),this.initWebgpu()}async initWebgpu(){if(this._device=_.ViewGpuContext.deviceSync||await _.ViewGpuContext.device,this._store.isDisposed)return;const e=_.ViewGpuContext.atlas;this._register(e.onDidDeleteGlyphs(()=>{this._atlasGpuTextureVersions.length=0,this._atlasGpuTextureVersions[0]=0,this._atlasGpuTextureVersions[1]=0,this._renderStrategy.value.reset()}));const t=navigator.gpu.getPreferredCanvasFormat();this._viewGpuContext.ctx.configure({device:this._device,format:t,alphaMode:"premultiplied"}),this._renderPassColorAttachment={view:null,loadOp:"load",storeOp:"store"},this._renderPassDescriptor={label:"Monaco render pass",colorAttachments:[this._renderPassColorAttachment]};let i;{const c=new Float32Array(6),h=(d=this.canvas.width,u=this.canvas.height)=>(c[0]=d,c[1]=u,c[2]=Math.ceil(this._context.configuration.options.get(165).contentLeft*Le().devicePixelRatio),c[3]=0,c[4]=c[0]-c[2],c[5]=c[1]-c[3],c);i=this._register(Mi.createBuffer(this._device,{label:"Monaco uniform buffer",size:24,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST},()=>h())).object,this._register(Qr(this._viewGpuContext.canvasDevicePixelDimensions,({width:d,height:u})=>{this._device.queue.writeBuffer(i,0,h(d,u))})),this._register(Qr(this._viewGpuContext.contentLeft,()=>{this._device.queue.writeBuffer(i,0,h())}))}let n;n=this._register(Mi.createBuffer(this._device,{label:"Monaco atlas info uniform buffer",size:8,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST},()=>{const c=new Float32Array(2);return c[0]=e.pageSize,c[1]=e.pageSize,c})).object;const s=this._context.configuration.options.get(58),r=this._context.configuration.options.get(61);this._glyphRasterizer.value=this._register(new Zd(r,s,this._viewGpuContext.devicePixelRatio.get(),_.ViewGpuContext.decorationStyleCache)),this._register(Qr(this._viewGpuContext.devicePixelRatio,()=>{this._refreshGlyphRasterizer()})),this._renderStrategy.value=this._instantiationService.createInstance(Ta,this._context,this._viewGpuContext,this._device,this._glyphRasterizer),this._glyphStorageBuffer=this._register(Mi.createBuffer(this._device,{label:"Monaco glyph storage buffer",size:dr.maximumPageCount*(Hn.maximumGlyphCount*24),usage:GPUBufferUsage.STORAGE|GPUBufferUsage.COPY_DST})).object,this._atlasGpuTextureVersions[0]=0,this._atlasGpuTextureVersions[1]=0,this._atlasGpuTexture=this._register(Mi.createTexture(this._device,{label:"Monaco atlas texture",format:"rgba8unorm",size:{width:e.pageSize,height:e.pageSize,depthOrArrayLayers:dr.maximumPageCount},dimension:"2d",usage:GPUTextureUsage.TEXTURE_BINDING|GPUTextureUsage.COPY_DST|GPUTextureUsage.RENDER_ATTACHMENT})).object,this._updateAtlasStorageBufferAndTexture(),this._vertexBuffer=this._register(Mi.createBuffer(this._device,{label:"Monaco vertex buffer",size:Ea.byteLength,usage:GPUBufferUsage.VERTEX|GPUBufferUsage.COPY_DST},Ea)).object;const a=this._device.createShaderModule({label:"Monaco shader module",code:this._renderStrategy.value.wgsl});if(this._pipeline=this._device.createRenderPipeline({label:"Monaco render pipeline",layout:"auto",vertex:{module:a,buffers:[{arrayStride:2*Float32Array.BYTES_PER_ELEMENT,attributes:[{shaderLocation:0,offset:0,format:"float32x2"}]}]},fragment:{module:a,targets:[{format:t,blend:{color:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha"},alpha:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha"}}}]}}),this._rebuildBindGroup=()=>{this._bindGroup=this._device.createBindGroup({label:"Monaco bind group",layout:this._pipeline.getBindGroupLayout(0),entries:[{binding:0,resource:{buffer:this._glyphStorageBuffer}},{binding:2,resource:this._device.createSampler({label:"Monaco atlas sampler",magFilter:"nearest",minFilter:"nearest"})},{binding:3,resource:this._atlasGpuTexture.createView()},{binding:4,resource:{buffer:i}},{binding:5,resource:{buffer:n}},...this._renderStrategy.value.bindGroupEntries]})},this._rebuildBindGroup(),this._initialized=!0,this._initViewportData){for(const c of this._initViewportData)this.renderText(c);this._initViewportData=void 0}}_refreshRenderStrategy(e){if(this._renderStrategy.value?.type==="viewport"||e.endLineNumberthis._rebuildBindGroup?.())),this._rebuildBindGroup?.()}_viewportMaxColumn(e){let t=0,i;for(let n=e.startLineNumber;n<=e.endLineNumber;n++)i=e.getViewLineRenderingData(n),t=Math.max(t,i.maxColumn);return t}_updateAtlasStorageBufferAndTexture(){for(const[e,t]of _.ViewGpuContext.atlas.pages.entries()){if(e>=dr.maximumPageCount){console.log(`Attempt to upload atlas page [${e}], only ${dr.maximumPageCount} are supported currently`);continue}if(t.version===this._atlasGpuTextureVersions[e])continue;this._logService.trace("Updating atlas page[",e,"] from version ",this._atlasGpuTextureVersions[e]," to version ",t.version);const i=6*Hn.maximumGlyphCount,n=new Float32Array(i);let s=0;for(const r of t.glyphs)n[s+0]=r.x,n[s+0+1]=r.y,n[s+2]=r.w,n[s+2+1]=r.h,n[s+4]=r.originOffsetX,n[s+4+1]=r.originOffsetY,s+=6;if(s/6>Hn.maximumGlyphCount)throw new Error(`Attempting to write more glyphs (${s/6}) than the GPUBuffer can hold (${Hn.maximumGlyphCount})`);this._device.queue.writeBuffer(this._glyphStorageBuffer,e*6*Hn.maximumGlyphCount*Float32Array.BYTES_PER_ELEMENT,n,0,6*Hn.maximumGlyphCount),t.usedArea.right-t.usedArea.left>0&&t.usedArea.bottom-t.usedArea.top>0&&this._device.queue.copyExternalImageToTexture({source:t.source},{texture:this._atlasGpuTexture,origin:{x:t.usedArea.left,y:t.usedArea.top,z:e}},{width:t.usedArea.right-t.usedArea.left+1,height:t.usedArea.bottom-t.usedArea.top+1}),this._atlasGpuTextureVersions[e]=t.version}}prepareRender(e){throw new l.BugIndicatingError("Should not be called")}render(e){throw new l.BugIndicatingError("Should not be called")}onConfigurationChanged(e){return this._refreshGlyphRasterizer(),this._maxLineWidth=0,!0}onCursorStateChanged(e){return!0}onDecorationsChanged(e){return!0}onFlushed(e){return this._maxLineWidth=0,!0}onLinesChanged(e){return!0}onLinesDeleted(e){return this._maxLineWidth=0,!0}onLinesInserted(e){return!0}onLineMappingChanged(e){return!0}onRevealRangeRequest(e){return!0}onScrollChanged(e){return!0}onThemeChanged(e){return!0}onZonesChanged(e){return!0}_refreshGlyphRasterizer(){const e=this._glyphRasterizer.value;if(!e)return;const t=this._context.configuration.options.get(58),i=this._context.configuration.options.get(61),n=this._viewGpuContext.devicePixelRatio.get();(e.fontFamily!==t||e.fontSize!==i||e.devicePixelRatio!==n)&&(this._glyphRasterizer.value=new Zd(i,t,n,_.ViewGpuContext.decorationStyleCache))}renderText(e){if(this._initialized)return this._refreshRenderStrategy(e),this._renderText(e);this._initViewportData=this._initViewportData??[],this._initViewportData.push(e)}_renderText(e){this._viewGpuContext.rectangleRenderer.draw(e);const t=new mm(this._context.configuration,this._context.theme.type);this._renderStrategy.value.update(e,t),this._updateAtlasStorageBufferAndTexture();const i=this._device.createCommandEncoder({label:"Monaco command encoder"});this._renderPassColorAttachment.view=this._viewGpuContext.ctx.getCurrentTexture().createView({label:"Monaco canvas texture view"});const n=i.beginRenderPass(this._renderPassDescriptor);n.setPipeline(this._pipeline),n.setVertexBuffer(0,this._vertexBuffer);const s=Math.ceil(this._viewGpuContext.contentLeft.get()*this._viewGpuContext.devicePixelRatio.get());n.setScissorRect(s,0,this.canvas.width-s,this.canvas.height),n.setBindGroup(0,this._bindGroup),this._renderStrategy.value.draw(n,e),n.end();const r=i.finish();this._device.queue.submit([r]),this._lastViewportData=e,this._lastViewLineOptions=t,this._updateMaxLineWidth(e,t)}_updateMaxLineWidth(e,t){const i=Le().devicePixelRatio;let n=0;for(let r=e.startLineNumber;r<=e.endLineNumber;r++){if(!this._viewGpuContext.canRender(t,e,r))continue;const a=e.getViewLineRenderingData(r),c=this._computeLineWidth(a,t,i);n=Math.max(n,c)}const s=Math.ceil(n);s>this._maxLineWidth&&(this._maxLineWidth=s,this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth))}_computeLineWidth(e,t,i){const n=e.content;let s;e.isBasicASCII&&t.useMonospaceOptimizations||(s=Xd(e,t));let r=0,a=0;for(let c=0;cr)continue;const f=u===n.startLineNumber?n.startColumn:1,g=u!==i,m=g?this._context.viewModel.getLineMaxColumn(u):n.endColumn,p=this._visibleRangesForLineRange(u,f,m);if(p){if(t&&un.endLineNumber)return null;const r=n.getViewLineRenderingData(e),a=r.content;let c;r.isBasicASCII&&s.useMonospaceOptimizations||(c=Xd(r,s));let h="",d=0,u=0;for(let p=0;p500){const w=e.modifyPosition(d.getEndPosition(),-500);d=l.Range.fromPositions(w,d.getEndPosition())}const u=e.getValueInRange(d,1),f=e.getLineCount(),g=e.getLineMaxColumn(f);let m=h.intersectRanges(new l.Range(t.endLineNumber,t.endColumn,f,g));if(n&&e.getValueLengthInRange(m,1)>500){const w=e.modifyPosition(m.getStartPosition(),500);m=l.Range.fromPositions(m.getStartPosition(),w)}const p=e.getValueInRange(m,1);let b;if(r===c||r+1===c)b=e.getValueInRange(t,1);else{const w=a.intersectRanges(t),S=h.intersectRanges(t);b=e.getValueInRange(w,1)+"…"+e.getValueInRange(S,1)}n&&b.length>2*500&&(b=b.substring(0,500)+"…"+b.substring(b.length-500,b.length));let v,C;return t.getDirection()===0?(v=u.length,C=u.length+b.length):(C=u.length,v=u.length+b.length),{value:u+b+p,selection:t,selectionStart:v,selectionEnd:C,startPositionWithinEditor:d.getStartPosition(),newlineCountBeforeSelection:d.endLineNumber-d.startLineNumber}}}function nw(o,e){if(o.get(2)===1){const i=e.lookupKeybinding("editor.action.toggleScreenReaderAccessibilityMode")?.getAriaLabel(),n=e.lookupKeybinding("workbench.action.showCommands")?.getAriaLabel(),s=e.lookupKeybinding("workbench.action.openGlobalKeybindings")?.getAriaLabel(),r=l.localize(65,"The editor is not accessible at this time.");return i?l.localize(66,"{0} To enable screen reader optimized mode, use {1}",r,i):n?l.localize(67,"{0} To enable screen reader optimized mode, open the quick pick with {1} and run the command Toggle Screen Reader Accessibility Mode, which is currently not triggerable via keyboard.",r,n):s?l.localize(68,"{0} Please assign a keybinding for the command Toggle Screen Reader Accessibility Mode by accessing the keybindings editor with {1} and run it.",r,s):r}return o.get(8)}function ET(o){let e=0,t=-1;do{if(t=o.indexOf(` +`,t+1),t===-1)break;e++}while(!0);return e}class G4{constructor(){this._textAreaEditContextMapping=new Map}register(e,t){return this._textAreaEditContextMapping.set(e,t),{dispose:()=>{this._textAreaEditContextMapping.delete(e)}}}}const j4=new G4;var q4=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},IT=function(o,e){return function(t,i){e(t,i,o)}};class Y4{constructor(e,t,i,n,s){this._context=e,this.modelLineNumber=t,this.distanceToModelLineStart=i,this.widthOfHiddenLineTextBefore=n,this.distanceToModelLineEnd=s,this._visibleTextAreaBrand=void 0,this.startPosition=null,this.endPosition=null,this.visibleTextareaStart=null,this.visibleTextareaEnd=null,this._previousPresentation=null}prepareRender(e){const t=new l.Position(this.modelLineNumber,this.distanceToModelLineStart+1),i=new l.Position(this.modelLineNumber,this._context.viewModel.model.getLineMaxColumn(this.modelLineNumber)-this.distanceToModelLineEnd);this.startPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(t),this.endPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(i),this.startPosition.lineNumber===this.endPosition.lineNumber?(this.visibleTextareaStart=e.visibleRangeForPosition(this.startPosition),this.visibleTextareaEnd=e.visibleRangeForPosition(this.endPosition)):(this.visibleTextareaStart=null,this.visibleTextareaEnd=null)}definePresentation(e){return this._previousPresentation||(e?this._previousPresentation=e:this._previousPresentation={foreground:1,italic:!1,bold:!1,underline:!1,strikethrough:!1}),this._previousPresentation}}const sw=di;let ow=class extends DT{constructor(e,t,i,n,s,r,a){super(t),this._keybindingService=r,this._instantiationService=a,this._primaryCursorPosition=new l.Position(1,1),this._primaryCursorVisibleRange=null,this._viewController=n,this._visibleRangeProvider=s,this._scrollLeft=0,this._scrollTop=0;const c=this._context.configuration.options,h=c.get(165);this._setAccessibilityOptions(c),this._contentLeft=h.contentLeft,this._contentWidth=h.contentWidth,this._contentHeight=h.height,this._fontInfo=c.get(59),this._emptySelectionClipboard=c.get(45),this._visibleTextArea=null,this._selections=[new l.Selection(1,1,1,1)],this._modelSelections=[new l.Selection(1,1,1,1)],this._lastRenderPosition=null,this.textArea=we(document.createElement("textarea")),Jn.write(this.textArea,7),this.textArea.setClassName(`inputarea ${Sc}`),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:d}=this._context.viewModel.model.getOptions();this.textArea.domNode.style.tabSize=`${d*this._fontInfo.spaceWidth}px`,this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("autocomplete","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",nw(c,this._keybindingService)),this.textArea.setAttribute("aria-required",c.get(9)?"true":"false"),this.textArea.setAttribute("tabindex",String(c.get(140))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",l.localize(69,"editor")),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-autocomplete",c.get(104)?"none":"both"),this._ensureReadOnlyAttribute(),this.textAreaCover=we(document.createElement("div")),this.textAreaCover.setPosition("absolute"),i.appendChild(this.textArea),i.appendChild(this.textAreaCover);const u=new xT,f={context:this._context,getScreenReaderContent:()=>{if(this._accessibilitySupport===1){const p=this._selections[0];if(l.isMacintosh&&p.isEmpty()){const v=p.getStartPosition();let C=this._getWordBeforePosition(v);if(C.length===0&&(C=this._getCharacterBeforePosition(v)),C.length>0)return new ci(C,C.length,C.length,l.Range.fromPositions(v),0)}if(l.isMacintosh&&!p.isEmpty()&&this._context.viewModel.getValueLengthInRange(p,0)<500){const v=this._context.viewModel.getValueInRange(p,0);return new ci(v,0,v.length,p,0)}if($r&&!p.isEmpty()){const v="vscode-placeholder";return new ci(v,0,v.length,null,void 0)}return ci.EMPTY}if(kD){const p=this._selections[0];if(p.isEmpty()){const b=p.getStartPosition(),[v,C]=this._getAndroidWordAtPosition(b);if(v.length>0)return new ci(v,C,C,l.Range.fromPositions(b),0)}return ci.EMPTY}const m=u.fromEditorSelection(this._context.viewModel,this._selections[0],this._accessibilityPageSize,this._accessibilitySupport===0);return ci.fromScreenReaderContentState(m)},deduceModelPosition:(m,p,b)=>this._context.viewModel.deduceModelPositionRelativeToViewPosition(m,p,b)},g=this._register(new Q3(this.textArea.domNode));this._textAreaInput=this._register(this._instantiationService.createInstance(Dv,f,g,l.OS,{isAndroid:kD,isChrome:jh,isFirefox:di,isSafari:$r})),this._register(this._textAreaInput.onWillCopy(m=>this._onWillCopy.fire(m))),this._register(this._textAreaInput.onWillCut(m=>this._onWillCut.fire(m))),this._register(this._textAreaInput.onWillPaste(m=>this._onWillPaste.fire(m))),this._register(this._textAreaInput.onKeyDown(m=>{this._viewController.emitKeyDown(m)})),this._register(this._textAreaInput.onKeyUp(m=>{this._viewController.emitKeyUp(m)})),this._register(this._textAreaInput.onPaste(m=>{let p=!1,b=null,v=null;m.metadata&&(p=this._emptySelectionClipboard&&!!m.metadata.isFromEmptySelection,b=typeof m.metadata.multicursorText<"u"?m.metadata.multicursorText:null,v=m.metadata.mode),this._viewController.paste(m.text,p,b,v)})),this._register(this._textAreaInput.onCut(()=>{this._viewController.cut()})),this._register(this._textAreaInput.onType(m=>{m.replacePrevCharCnt||m.replaceNextCharCnt||m.positionDelta?this._viewController.compositionType(m.text,m.replacePrevCharCnt,m.replaceNextCharCnt,m.positionDelta):this._viewController.type(m.text)})),this._register(this._textAreaInput.onSelectionChangeRequest(m=>{this._viewController.setSelection(m)})),this._register(this._textAreaInput.onCompositionStart(m=>{const p=this.textArea.domNode,b=this._modelSelections[0],{distanceToModelLineStart:v,widthOfHiddenTextBefore:C}=(()=>{const S=p.value.substring(0,Math.min(p.selectionStart,p.selectionEnd)),L=S.lastIndexOf(` +`),D=S.substring(L+1),x=D.lastIndexOf(" "),I=D.length-x-1,T=b.getStartPosition(),M=Math.min(T.column-1,I),O=T.column-1-M,P=D.substring(0,D.length-M),{tabSize:k}=this._context.viewModel.model.getOptions(),U=Z4(this.textArea.domNode.ownerDocument,P,this._fontInfo,k);return{distanceToModelLineStart:O,widthOfHiddenTextBefore:U}})(),{distanceToModelLineEnd:w}=(()=>{const S=p.value.substring(Math.max(p.selectionStart,p.selectionEnd)),L=S.indexOf(` +`),D=L===-1?S:S.substring(0,L),x=D.indexOf(" "),I=x===-1?D.length:D.length-x-1,T=b.getEndPosition(),M=Math.min(this._context.viewModel.model.getLineMaxColumn(T.lineNumber)-T.column,I);return{distanceToModelLineEnd:this._context.viewModel.model.getLineMaxColumn(T.lineNumber)-T.column-M}})();this._context.viewModel.revealRange("keyboard",!0,l.Range.fromPositions(this._selections[0].getStartPosition()),0,1),this._visibleTextArea=new Y4(this._context,b.startLineNumber,v,C,w),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render(),this.textArea.setClassName(`inputarea ${Sc} ime-input`),this._viewController.compositionStart(),this._context.viewModel.onCompositionStart()})),this._register(this._textAreaInput.onCompositionUpdate(m=>{this._visibleTextArea&&(this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render())})),this._register(this._textAreaInput.onCompositionEnd(()=>{this._visibleTextArea=null,this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._render(),this.textArea.setClassName(`inputarea ${Sc}`),this._viewController.compositionEnd(),this._context.viewModel.onCompositionEnd()})),this._register(this._textAreaInput.onFocus(()=>{this._context.viewModel.setHasFocus(!0)})),this._register(this._textAreaInput.onBlur(()=>{this._context.viewModel.setHasFocus(!1)})),this._register(Ss.onDidChange(()=>{this._ensureReadOnlyAttribute()})),this._register(j4.register(e,this))}get domNode(){return this.textArea}writeScreenReaderContent(e){this._textAreaInput.writeNativeTextAreaContent(e)}dispose(){super.dispose(),this.textArea.domNode.remove(),this.textAreaCover.domNode.remove()}_getAndroidWordAtPosition(e){const t='`~!@#$%^&*()-=+[{]}\\|;:",.<>/?',i=this._context.viewModel.getLineContent(e.lineNumber),n=l.getMapForWordSeparators(t,[]);let s=!0,r=e.column,a=!0,c=e.column,h=0;for(;h<50&&(s||a);){if(s&&r<=1&&(s=!1),s){const d=i.charCodeAt(r-2);n.get(d)!==0?s=!1:r--}if(a&&c>i.length&&(a=!1),a){const d=i.charCodeAt(c-1);n.get(d)!==0?a=!1:c++}h++}return[i.substring(r-1,c-1),e.column-r]}_getWordBeforePosition(e){const t=this._context.viewModel.getLineContent(e.lineNumber),i=l.getMapForWordSeparators(this._context.configuration.options.get(148),[]);let n=e.column,s=0;for(;n>1;){const r=t.charCodeAt(n-2);if(i.get(r)!==0||s>50)return t.substring(n-1,e.column-1);s++,n--}return t.substring(0,e.column-1)}_getCharacterBeforePosition(e){if(e.column>1){const i=this._context.viewModel.getLineContent(e.lineNumber).charAt(e.column-2);if(!l.isHighSurrogate(i.charCodeAt(0)))return i}return""}_setAccessibilityOptions(e){this._accessibilitySupport=e.get(2);const t=e.get(3);this._accessibilitySupport===2&&t===Fi.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=t;const n=e.get(165).wrappingColumn;if(n!==-1&&this._accessibilitySupport!==1){const s=e.get(59);this._textAreaWrapping=!0,this._textAreaWidth=Math.round(n*s.typicalHalfwidthCharacterWidth)}else this._textAreaWrapping=!1,this._textAreaWidth=sw?0:1}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(165);this._setAccessibilityOptions(t),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._contentHeight=i.height,this._fontInfo=t.get(59),this._emptySelectionClipboard=t.get(45),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:n}=this._context.viewModel.model.getOptions();return this.textArea.domNode.style.tabSize=`${n*this._fontInfo.spaceWidth}px`,this.textArea.setAttribute("aria-label",nw(t,this._keybindingService)),this.textArea.setAttribute("aria-required",t.get(9)?"true":"false"),this.textArea.setAttribute("tabindex",String(t.get(140))),(e.hasChanged(41)||e.hasChanged(104))&&this._ensureReadOnlyAttribute(),e.hasChanged(2)&&this._textAreaInput.writeNativeTextAreaContent("strategy changed"),!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),this._modelSelections=e.modelSelections.slice(0),this._textAreaInput.writeNativeTextAreaContent("selection changed"),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0}onZonesChanged(e){return!0}isFocused(){return this._textAreaInput.isFocused()}focus(){this._textAreaInput.focusTextArea()}refreshFocusState(){this._textAreaInput.refreshFocusState()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(e){e.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",e.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),e.role&&this.textArea.setAttribute("role",e.role)}_ensureReadOnlyAttribute(){const e=this._context.configuration.options;!Ss.enabled||e.get(41)&&e.get(104)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")}prepareRender(e){this._primaryCursorPosition=new l.Position(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition),this._visibleTextArea?.prepareRender(e)}render(e){this._textAreaInput.writeNativeTextAreaContent("render"),this._render()}_render(){if(this._visibleTextArea){const i=this._visibleTextArea.visibleTextareaStart,n=this._visibleTextArea.visibleTextareaEnd,s=this._visibleTextArea.startPosition,r=this._visibleTextArea.endPosition;if(s&&r&&i&&n&&n.left>=this._scrollLeft&&i.left<=this._scrollLeft+this._contentWidth){const a=this._context.viewLayout.getVerticalOffsetForLineNumber(this._primaryCursorPosition.lineNumber)-this._scrollTop,c=ET(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));let h=this._visibleTextArea.widthOfHiddenLineTextBefore,d=this._contentLeft+i.left-this._scrollLeft,u=n.left-i.left+1;if(dthis._contentWidth&&(u=this._contentWidth);const f=this._context.viewLayout.getLineHeightForLineNumber(s.lineNumber),g=this._context.viewModel.getFontSizeAtPosition(this._primaryCursorPosition),m=this._context.viewModel.getViewLineData(s.lineNumber),p=m.tokens.findTokenIndexAtOffset(s.column-1),b=m.tokens.findTokenIndexAtOffset(r.column-1),v=p===b,C=this._visibleTextArea.definePresentation(v?m.tokens.getPresentation(p):null);this.textArea.domNode.scrollTop=c*f,this.textArea.domNode.scrollLeft=h,this._doRender({lastRenderPosition:null,top:a,left:d,width:u,height:f,useCover:!1,color:(l.TokenizationRegistry.getColorMap()||[])[C.foreground],italic:C.italic,bold:C.bold,underline:C.underline,strikethrough:C.strikethrough,fontSize:g})}return}if(!this._primaryCursorVisibleRange){this._renderAtTopLeft();return}const e=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(ethis._contentLeft+this._contentWidth){this._renderAtTopLeft();return}const t=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;if(t<0||t>this._contentHeight){this._renderAtTopLeft();return}if(l.isMacintosh||this._accessibilitySupport===2){const i=this._primaryCursorPosition.lineNumber,n=this._context.viewLayout.getLineHeightForLineNumber(i);this._doRender({lastRenderPosition:this._primaryCursorPosition,top:t,left:this._textAreaWrapping?this._contentLeft:e,width:this._textAreaWidth,height:n,useCover:!1}),this.textArea.domNode.scrollLeft=this._primaryCursorVisibleRange.left;const s=this._textAreaInput.textAreaState.newlineCountBeforeSelection??ET(this.textArea.domNode.value.substring(0,this.textArea.domNode.selectionStart));this.textArea.domNode.scrollTop=s*n;return}this._doRender({lastRenderPosition:this._primaryCursorPosition,top:t,left:this._textAreaWrapping?this._contentLeft:e,width:this._textAreaWidth,height:sw?0:1,useCover:!1})}_renderAtTopLeft(){this._doRender({lastRenderPosition:null,top:0,left:0,width:this._textAreaWidth,height:sw?0:1,useCover:!0})}_doRender(e){this._lastRenderPosition=e.lastRenderPosition;const t=this.textArea,i=this.textAreaCover;Ot(t,this._fontInfo),t.setTop(e.top),t.setLeft(e.left),t.setWidth(e.width),t.setHeight(e.height),t.setLineHeight(e.height),t.setFontSize(e.fontSize??this._fontInfo.fontSize),t.setColor(e.color?l.Color.Format.CSS.formatHex(e.color):""),t.setFontStyle(e.italic?"italic":""),e.bold&&t.setFontWeight("bold"),t.setTextDecoration(`${e.underline?" underline":""}${e.strikethrough?" line-through":""}`),i.setTop(e.useCover?e.top:0),i.setLeft(e.useCover?e.left:0),i.setWidth(e.useCover?e.width:0),i.setHeight(e.useCover?e.height:0);const n=this._context.configuration.options;n.get(66)?i.setClassName("monaco-editor-background textAreaCover "+pm.OUTER_CLASS_NAME):n.get(76).renderType!==0?i.setClassName("monaco-editor-background textAreaCover "+gm.CLASS_NAME):i.setClassName("monaco-editor-background textAreaCover")}};ow=q4([IT(5,xt),IT(6,me)],ow);function Z4(o,e,t,i){if(e.length===0)return 0;const n=o.createElement("div");n.style.position="absolute",n.style.top="-50000px",n.style.width="50000px";const s=o.createElement("span");Ot(s,t),s.style.whiteSpace="pre",s.style.tabSize=`${i*t.spaceWidth}px`,s.append(e),n.appendChild(s),o.body.appendChild(n);const r=s.offsetWidth;return n.remove(),r}var Q4=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},X4=function(o,e){return function(t,i){e(t,i,o)}};let rw=class extends l.Disposable{constructor(e,t,i){super(),this._domNode=t,this._onFocusChange=i,this._isFocused=!1,this._isPaused=!1,this._register(R(this._domNode,"focus",()=>{e.trace("NativeEditContext.focus"),!this._isPaused&&this.refreshFocusState()})),this._register(R(this._domNode,"blur",()=>{e.trace("NativeEditContext.blur"),!this._isPaused&&this._handleFocusedChanged(!1)}))}pause(){this._isPaused=!0}resume(){this._isPaused=!1,this.refreshFocusState()}_handleFocusedChanged(e){this._isFocused!==e&&(this._isFocused=e,this._onFocusChange(this._isFocused))}focus(){this._domNode.focus(),this.refreshFocusState()}refreshFocusState(){const e=qo(this._domNode),t=e?e.activeElement:wt(),i=this._domNode===t;this._handleFocusedChanged(i)}get isFocused(){return this._isFocused}};rw=Q4([X4(0,ei)],rw);function Jd(o,e,t,i){return o.addEventListener(e,t,i),{dispose(){o.removeEventListener(e,t)}}}var J4=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},W4=function(o,e){return function(t,i){e(t,i,o)}};const H4=lo("richScreenReaderContent",{createHTML:o=>o}),aw="data-line-number";let lw=class extends l.Disposable{constructor(e,t,i,n){super(),this._domNode=e,this._context=t,this._viewController=i,this._accessibilityService=n,this._selectionChangeListener=this._register(new l.MutableDisposable),this._accessibilityPageSize=1,this._ignoreSelectionChangeTime=0,this._state=Wd.NULL,this._strategy=new i5,this._renderedLines=new Map,this._renderedSelection=new l.Selection(1,1,1,1),this.onConfigurationChanged(this._context.configuration.options)}updateScreenReaderContent(e){const t=Le().document.activeElement;if(!t||t!==this._domNode.domNode)return;if(this._accessibilityService.isScreenReaderOptimized()){const n=this._getScreenReaderContentLineIntervals(e);this._state.equals(n)||(this._state=n,this._renderedLines=this._renderScreenReaderContent(n)),this._renderedSelection.equalsSelection(e)||(this._renderedSelection=e,this._setSelectionOnScreenReaderContent(this._context,this._renderedLines,e))}else this._state=Wd.NULL,this._setIgnoreSelectionChangeTime("setValue"),this._domNode.domNode.textContent=""}updateScrollTop(e){const t=this._state.intervals;if(!t.length)return;const i=this._context.viewModel.viewLayout,n=t[0].startLine,s=i.getVerticalOffsetForLineNumber(n),r=i.getVerticalOffsetForLineNumber(e.positionLineNumber);this._domNode.domNode.scrollTop=r-s}onFocusChange(e){e?this._selectionChangeListener.value=this._setSelectionChangeListener():this._selectionChangeListener.value=void 0}onConfigurationChanged(e){this._accessibilityPageSize=e.get(3)}onWillCut(){this._setIgnoreSelectionChangeTime("onCut")}onWillPaste(){this._setIgnoreSelectionChangeTime("onWillPaste")}_setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}_setSelectionChangeListener(){let e=0;return R(this._domNode.domNode.ownerDocument,"selectionchange",()=>{if(!(Le().document.activeElement===this._domNode.domNode)||!this._accessibilityService.isScreenReaderOptimized()||!Ss.enabled)return;const s=Date.now(),r=s-e;if(e=s,r<5)return;const a=s-this._ignoreSelectionChangeTime;if(this._ignoreSelectionChangeTime=0,a<100)return;const c=this._getEditorSelectionFromDomRange();c&&this._viewController.setSelection(c)})}_renderScreenReaderContent(e){const t=[],i=new Map;for(const n of e.intervals)for(let s=n.startLine;s<=n.endLine;s++){const r=this._renderLine(s);i.set(s,r),t.push(r.domNode)}return this._setIgnoreSelectionChangeTime("setValue"),this._domNode.domNode.replaceChildren(...t),i}_renderLine(e){const t=this._context.viewModel,i=t.getViewLineRenderingData(e),n=this._context.configuration.options,s=n.get(59),r=n.get(133),a=n.get(108),c=n.get(60),h=n.get(40),d=Ji.filter(i.inlineDecorations,e,i.minColumn,i.maxColumn),u=s.isMonospace&&!h,f=c!==io.OFF;let g;n.get(47)==="off"?g=n.get(113):g="none";const p=new Wo(u,s.canUseHalfwidthRightwardsArrow,i.content,i.continuesWithWrappedLine,i.isBasicASCII,i.containsRTL,i.minColumn-1,i.tokens,d,i.tabSize,i.startVisibleColumn,s.spaceWidth,s.middotWidth,s.wsmiddotWidth,r,g,a,f,null,null,0,!0),b=new ra(1e4),v=bd(p,b),C=b.build(),w=H4?.createHTML(C)??C,S=t.viewLayout.getLineHeightForLineNumber(e)+"px",L=document.createElement("div");return L.innerHTML=w,L.style.lineHeight=S,L.style.height=S,L.setAttribute(aw,e.toString()),new e5(L,v.characterMapping)}_setSelectionOnScreenReaderContent(e,t,i){const s=Le().document.getSelection();if(!s)return;const r=i.startLineNumber,a=i.endLineNumber,c=t.get(r),h=t.get(a);if(!c||!h)return;const d=e.viewModel,u=d.model,f=d.coordinatesConverter,g=new l.Range(r,1,r,i.selectionStartColumn),m=f.convertViewRangeToModelRange(g),p=u.getCharacterCountInRange(m),b=new l.Range(a,1,a,i.positionColumn),v=f.convertViewRangeToModelRange(b),C=u.getCharacterCountInRange(v),w=c.characterMapping.getDomPosition(p),S=h.characterMapping.getDomPosition(C),L=c.domNode.firstChild,D=h.domNode.firstChild,x=L.childNodes,I=D.childNodes,T=x.item(w.partIndex),M=I.item(S.partIndex);!T.firstChild||!M.firstChild||(this._setIgnoreSelectionChangeTime("setRange"),s.setBaseAndExtent(T.firstChild,i.startColumn===1?0:w.charIndex+1,M.firstChild,i.endColumn===1?0:S.charIndex+1))}_getScreenReaderContentLineIntervals(e){return this._strategy.fromEditorSelection(this._context.viewModel,e,this._accessibilityPageSize)}_getEditorSelectionFromDomRange(){if(!this._renderedLines)return;const e=Le().document.getSelection();if(!e||e.rangeCount===0)return;const i=e.getRangeAt(0),n=i.startContainer,s=i.endContainer,r=n.parentElement,a=s.parentElement;if(!r||!Ve(r)||!a||!Ve(a))return;const c=r.parentElement?.parentElement,h=a.parentElement?.parentElement;if(!c||!h)return;const d=c.getAttribute(aw),u=h.getAttribute(aw);if(!d||!u)return;const f=parseInt(d),g=parseInt(u),m=this._renderedLines.get(f)?.characterMapping,p=this._renderedLines.get(g)?.characterMapping;if(!m||!p)return;const b=dc(m,r,i.startOffset),v=dc(p,a,i.endOffset);return e.direction==="forward"?new l.Selection(f,b,g,v):new l.Selection(g,v,f,b)}};lw=J4([W4(3,Ui)],lw);class e5{constructor(e,t){this.domNode=e,this.characterMapping=t}}class t5{constructor(e,t){this.startLine=e,this.endLine=t}}class Wd{constructor(e,t){this.intervals=t;let i="";for(const n of t)for(let s=n.startLine;s<=n.endLine;s++)i+=e.getLineContent(s)+` +`;this.value=i}equals(e){return this.value===e.value}static get NULL(){const e={getLineContent:()=>"",getLineCount:()=>1,getLineMaxColumn:()=>1,getValueInRange:()=>"",getValueLengthInRange:()=>0,modifyPosition:(t,i)=>t};return new Wd(e,[])}}class i5{constructor(){}_getPageOfLine(e,t){return Math.floor((e-1)/t)}_getRangeForPage(e,t,i){const n=t*i,s=n+1,r=Math.min(n+i,e.getLineCount());return new t5(s,r)}fromEditorSelection(e,t,i){const n=this._getPageOfLine(t.startLineNumber,i),s=this._getRangeForPage(e,n,i),r=this._getPageOfLine(t.endLineNumber,i),a=this._getRangeForPage(e,r,i),c=[{startLine:s.startLine,endLine:s.endLine}];return n+1=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},s5=function(o,e){return function(t,i){e(t,i,o)}};let cw=class extends l.Disposable{constructor(e,t,i,n){super(),this._domNode=e,this._context=t,this._viewController=i,this._accessibilityService=n,this._selectionChangeListener=this._register(new l.MutableDisposable),this._accessibilityPageSize=1,this._ignoreSelectionChangeTime=0,this._strategy=new xT,this.onConfigurationChanged(this._context.configuration.options)}updateScreenReaderContent(e){const t=this._domNode.domNode,i=Le().document.activeElement;if(!i||i!==t)return;if(this._accessibilityService.isScreenReaderOptimized()){this._state=this._getScreenReaderContentState(e),t.textContent!==this._state.value&&(this._setIgnoreSelectionChangeTime("setValue"),t.textContent=this._state.value);const s=Le().document.getSelection();if(!s)return;const r=this._getScreenReaderRange(this._state.selectionStart,this._state.selectionEnd);if(!r)return;this._setIgnoreSelectionChangeTime("setRange"),s.setBaseAndExtent(r.anchorNode,r.anchorOffset,r.focusNode,r.focusOffset)}else this._state=void 0,this._setIgnoreSelectionChangeTime("setValue"),this._domNode.domNode.textContent=""}updateScrollTop(e){if(!this._state)return;const t=this._context.viewModel.viewLayout,i=this._state.startPositionWithinEditor.lineNumber,n=t.getVerticalOffsetForLineNumber(i),s=t.getVerticalOffsetForLineNumber(e.positionLineNumber);this._domNode.domNode.scrollTop=s-n}onFocusChange(e){e?this._selectionChangeListener.value=this._setSelectionChangeListener():this._selectionChangeListener.value=void 0}onConfigurationChanged(e){this._accessibilityPageSize=e.get(3)}onWillCut(){this._setIgnoreSelectionChangeTime("onCut")}onWillPaste(){this._setIgnoreSelectionChangeTime("onWillPaste")}_setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}_setSelectionChangeListener(){let e=0;return R(this._domNode.domNode.ownerDocument,"selectionchange",()=>{const t=this._accessibilityService.isScreenReaderOptimized();if(!this._state||!t||!Ss.enabled||!(Le().document.activeElement===this._domNode.domNode))return;const s=Le().document.getSelection();if(!s||s.rangeCount===0)return;const a=s.getRangeAt(0),c=Date.now(),h=c-e;if(e=c,h<5)return;const d=c-this._ignoreSelectionChangeTime;this._ignoreSelectionChangeTime=0,!(d<100)&&this._viewController.setSelection(this._getEditorSelectionFromDomRange(this._context,this._state,s.direction,a))})}_getScreenReaderContentState(e){const t=this._strategy.fromEditorSelection(this._context.viewModel,e,this._accessibilityPageSize,this._accessibilityService.getAccessibilitySupport()===0),i=this._context.viewModel.model.getPositionAt(1/0);let n=t.value;return i.column===1&&e.getEndPosition().equals(i)&&(n+=` +`),t.value=n,t}_getScreenReaderRange(e,t){const i=this._domNode.domNode.firstChild;if(!i)return;const n=new globalThis.Range;return n.setStart(i,e),n.setEnd(i,t),{anchorNode:i,anchorOffset:e,focusNode:i,focusOffset:t}}_getEditorSelectionFromDomRange(e,t,i,n){const s=e.viewModel,r=s.model,c=s.coordinatesConverter.convertViewPositionToModelPosition(t.startPositionWithinEditor),h=r.getOffsetAt(c);let d=n.startOffset+h,u=n.endOffset+h;if(r.getEndOfLineSequence()===1){const v=t.value,C=new l.PositionOffsetTransformer(v),w=C.getPosition(n.startOffset),S=C.getPosition(n.endOffset);d+=w.lineNumber-1,u+=S.lineNumber-1}const g=r.getPositionAt(d),m=r.getPositionAt(u),p=i==="forward"?g:m,b=i==="forward"?m:g;return l.Selection.fromPositions(p,b)}};cw=n5([s5(3,Ui)],cw);var o5=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},TT=function(o,e){return function(t,i){e(t,i,o)}};let hw=class extends l.Disposable{constructor(e,t,i,n,s){super(),this._domNode=e,this._context=t,this._viewController=i,this._keybindingService=n,this._accessibilityService=s,this._contentLeft=1,this._contentWidth=1,this._contentHeight=1,this._divWidth=1,this._primarySelection=new l.Selection(1,1,1,1),this._primaryCursorVisibleRange=null,this._state=this._register(new l.MutableDisposable),this._instantiateScreenReaderContent(),this._updateConfigurationSettings(),this._updateDomAttributes()}onWillPaste(){this._state.value?.onWillPaste()}onWillCut(){this._state.value?.onWillCut()}handleFocusChange(e){this._state.value?.onFocusChange(e),this.writeScreenReaderContent()}onConfigurationChanged(e){this._instantiateScreenReaderContent(),this._updateConfigurationSettings(),this._updateDomAttributes(),e.hasChanged(2)&&this.writeScreenReaderContent()}_instantiateScreenReaderContent(){const e=this._context.configuration.options.get(107);this._renderRichContent!==e&&(this._renderRichContent=e,this._state.value=this._createScreenReaderContent(e))}_createScreenReaderContent(e){return e?new lw(this._domNode,this._context,this._viewController,this._accessibilityService):new cw(this._domNode,this._context,this._viewController,this._accessibilityService)}_updateConfigurationSettings(){const e=this._context.configuration.options,t=e.get(165),i=t.wrappingColumn;this._contentLeft=t.contentLeft,this._contentWidth=t.contentWidth,this._contentHeight=t.height,this._fontInfo=e.get(59),this._divWidth=Math.round(i*this._fontInfo.typicalHalfwidthCharacterWidth),this._state.value?.onConfigurationChanged(e)}_updateDomAttributes(){const e=this._context.configuration.options;this._domNode.domNode.setAttribute("role","textbox"),this._domNode.domNode.setAttribute("aria-required",e.get(9)?"true":"false"),this._domNode.domNode.setAttribute("aria-multiline","true"),this._domNode.domNode.setAttribute("aria-autocomplete",e.get(104)?"none":"both"),this._domNode.domNode.setAttribute("aria-roledescription",l.localize(64,"editor")),this._domNode.domNode.setAttribute("aria-label",nw(e,this._keybindingService));const t=this._context.viewModel.model.getOptions().tabSize,i=e.get(59).spaceWidth;this._domNode.domNode.style.tabSize=`${t*i}px`;const n=e.get(154),s=n==="inherit"?e.get(153):n,r=s==="inherit"?e.get(149):s;this._domNode.domNode.style.textWrap=r==="off"?"nowrap":"wrap"}onCursorStateChanged(e){this._primarySelection=e.selections[0]??new l.Selection(1,1,1,1)}prepareRender(e){this.writeScreenReaderContent(),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primarySelection.getPosition())}render(e){if(!this._primaryCursorVisibleRange){this._renderAtTopLeft();return}const t=this._context.viewLayout.getCurrentScrollLeft(),i=this._contentLeft+this._primaryCursorVisibleRange.left-t;if(ithis._contentLeft+this._contentWidth){this._renderAtTopLeft();return}const n=this._context.viewLayout.getCurrentScrollTop(),s=this._primarySelection.positionLineNumber,r=this._context.viewLayout.getVerticalOffsetForLineNumber(s)-n;if(r<0||r>this._contentHeight){this._renderAtTopLeft();return}const a=this._context.viewLayout.getLineHeightForLineNumber(s);this._doRender(r,this._contentLeft,this._divWidth,a),this._state.value?.updateScrollTop(this._primarySelection)}_renderAtTopLeft(){this._doRender(0,0,this._contentWidth,1)}_doRender(e,t,i,n){Ot(this._domNode,this._fontInfo),this._domNode.setTop(e),this._domNode.setLeft(t),this._domNode.setWidth(i),this._domNode.setHeight(n),this._domNode.setLineHeight(n)}setAriaOptions(e){e.activeDescendant?(this._domNode.setAttribute("aria-haspopup","true"),this._domNode.setAttribute("aria-autocomplete","list"),this._domNode.setAttribute("aria-activedescendant",e.activeDescendant)):(this._domNode.setAttribute("aria-haspopup","false"),this._domNode.setAttribute("aria-autocomplete","both"),this._domNode.removeAttribute("aria-activedescendant")),e.role&&this._domNode.setAttribute("role",e.role)}writeScreenReaderContent(){this._state.value?.updateScreenReaderContent(this._primarySelection)}};hw=o5([TT(3,xt),TT(4,Ui)],hw);var dw;(function(o){function e(t,i){return new t.EditContext(i)}o.create=e})(dw||(dw={}));class r5{constructor(){this._nativeEditContextMapping=new Map}register(e,t){return this._nativeEditContextMapping.set(e,t),{dispose:()=>{this._nativeEditContextMapping.delete(e)}}}get(e){return this._nativeEditContextMapping.get(e)}}const NT=new r5;var a5=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},RT=function(o,e){return function(t,i){e(t,i,o)}},Hd;(function(o){o.NONE="edit-context-composition-none",o.SECONDARY="edit-context-composition-secondary",o.PRIMARY="edit-context-composition-primary"})(Hd||(Hd={}));let ym=class extends DT{constructor(e,t,i,n,s,r,a){super(t),this._viewController=n,this._visibleRangeProvider=s,this.logService=a,this._previousEditContextSelection=new l.OffsetRange(0,0),this._previousEditContextText="",this._editContextPrimarySelection=new l.Selection(1,1,1,1),this._parentBounds=null,this._decorations=[],this._primarySelection=new l.Selection(1,1,1,1),this._targetWindowId=-1,this._scrollTop=0,this._scrollLeft=0,this._linesVisibleRanges=null,this.domNode=new Hf(document.createElement("div")),this.domNode.setClassName("native-edit-context"),this._imeTextArea=new Hf(document.createElement("textarea")),this._imeTextArea.setClassName("ime-text-area"),this._imeTextArea.setAttribute("readonly","true"),this._imeTextArea.setAttribute("tabindex","-1"),this._imeTextArea.setAttribute("aria-hidden","true"),this.domNode.setAttribute("autocorrect","off"),this.domNode.setAttribute("autocapitalize","off"),this.domNode.setAttribute("autocomplete","off"),this.domNode.setAttribute("spellcheck","false"),this._updateDomAttributes(),i.appendChild(this.domNode),i.appendChild(this._imeTextArea),this._parent=i.domNode,this._focusTracker=this._register(new rw(a,this.domNode.domNode,u=>{a.trace("NativeEditContext#handleFocusChange : ",u),this._screenReaderSupport.handleFocusChange(u),this._context.viewModel.setHasFocus(u)}));const c=j(this.domNode.domNode);this._editContext=dw.create(c),this.setEditContextOnDomNode(),this._screenReaderSupport=this._register(r.createInstance(hw,this.domNode,t,this._viewController)),this._register(R(this.domNode.domNode,"copy",u=>{this.logService.trace("NativeEditContext#copy"),em.electronBugWorkaroundCopyEventHasFired=!0;const f=tm(u,!1,this._context,this.logService,di);this._onWillCopy.fire(f),!f.isHandled&&f.ensureClipboardGetsEditorData()})),this._register(R(this.domNode.domNode,"cut",u=>{this.logService.trace("NativeEditContext#cut");const f=tm(u,!0,this._context,this.logService,di);this._onWillCut.fire(f),!f.isHandled&&(this._screenReaderSupport.onWillCut(),f.ensureClipboardGetsEditorData(),this.logService.trace("NativeEditContext#cut (before viewController.cut)"),this._viewController.cut())})),this._register(R(this.domNode.domNode,"selectionchange",()=>{_n.onSelectionChange()})),this._register(R(this.domNode.domNode,"keyup",u=>this._onKeyUp(u))),this._register(R(this.domNode.domNode,"keydown",async u=>this._onKeyDown(u))),this._register(R(this._imeTextArea.domNode,"keyup",u=>this._onKeyUp(u))),this._register(R(this._imeTextArea.domNode,"keydown",async u=>this._onKeyDown(u))),this._register(R(this.domNode.domNode,"beforeinput",async u=>{_n.onBeforeInput(),(u.inputType==="insertParagraph"||u.inputType==="insertLineBreak")&&this._onType(this._viewController,{text:` +`,replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0})})),this._register(R(this.domNode.domNode,"paste",u=>{this.logService.trace("NativeEditContext#paste");const f=LI(u);if(this._onWillPaste.fire(f),f.isHandled){u.preventDefault();return}if(u.preventDefault(),!u.clipboardData||(this.logService.trace("NativeEditContext#paste with id : ",f.metadata?.id," with text.length: ",f.text.length),!f.text))return;let g=!1,m=null,p=null;f.metadata&&(g=this._context.configuration.options.get(45)&&!!f.metadata.isFromEmptySelection,m=typeof f.metadata.multicursorText<"u"?f.metadata.multicursorText:null,p=f.metadata.mode),this.logService.trace("NativeEditContext#paste (before viewController.paste)"),this._viewController.paste(f.text,g,m,p)})),this._register(Jd(this._editContext,"textformatupdate",u=>this._handleTextFormatUpdate(u))),this._register(Jd(this._editContext,"characterboundsupdate",u=>this._updateCharacterBounds(u)));let h;this._register(Jd(this._editContext,"textupdate",u=>{_n.onInput();const f=u.text;if(f.length===1){const g=f.charCodeAt(0);if(l.isHighSurrogate(g)){h=f;return}if(l.isLowSurrogate(g)&&h){const m={text:h+f,selectionEnd:u.selectionEnd,selectionStart:u.selectionStart,updateRangeStart:u.updateRangeStart-1,updateRangeEnd:u.updateRangeEnd-1};h=void 0,this._emitTypeEvent(this._viewController,m);return}}this._emitTypeEvent(this._viewController,u)})),this._register(Jd(this._editContext,"compositionstart",u=>{this._updateEditContext(),this._viewController.compositionStart(),this._context.viewModel.onCompositionStart()})),this._register(Jd(this._editContext,"compositionend",u=>{this._updateEditContext(),this._viewController.compositionEnd(),this._context.viewModel.onCompositionEnd()}));let d=!1;this._register(Ss.onDidChange(()=>{Ss.enabled&&d&&(this._focusTracker.resume(),this.domNode.focus(),d=!1),!Ss.enabled&&this.isFocused()&&(this._focusTracker.pause(),this._imeTextArea.focus(),d=!0)})),this._register(NT.register(e,this)),this._register(t.viewModel.model.onDidChangeContent(u=>{let f=!1;for(const g of u.changes)if(g.range.startLineNumber<=this._editContextPrimarySelection.endLineNumber&&g.range.endLineNumber>=this._editContextPrimarySelection.startLineNumber){f=!0;break}f&&this._updateEditContext()}))}dispose(){this.domNode.domNode.editContext=void 0,this.domNode.domNode.blur(),this.domNode.domNode.remove(),this._imeTextArea.domNode.remove(),super.dispose()}setAriaOptions(e){this._screenReaderSupport.setAriaOptions(e)}getLastRenderData(){return this._primarySelection.getPosition()}onBeforeRender(e){this._parentBounds=this._parent.getBoundingClientRect()}prepareRender(e){this._screenReaderSupport.prepareRender(e),this._updateSelectionAndControlBoundsData(e)}render(e){this._screenReaderSupport.render(e),this._updateSelectionAndControlBounds()}onCursorStateChanged(e){return this._primarySelection=e.modelSelections[0]??new l.Selection(1,1,1,1),this._screenReaderSupport.onCursorStateChanged(e),this._updateEditContext(),!0}onConfigurationChanged(e){return this._screenReaderSupport.onConfigurationChanged(e),this._updateDomAttributes(),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0}onZonesChanged(e){return!0}handleWillPaste(){this.logService.trace("NativeEditContext#handleWillPaste"),this._prepareScreenReaderForPaste()}_prepareScreenReaderForPaste(){this._screenReaderSupport.onWillPaste()}handleWillCopy(){this.logService.trace("NativeEditContext#handleWillCopy"),this.logService.trace("NativeEditContext#isFocused : ",this.domNode.domNode===wt())}writeScreenReaderContent(){this._screenReaderSupport.writeScreenReaderContent()}isFocused(){return this._focusTracker.isFocused}focus(){this._focusTracker.focus(),this.refreshFocusState()}refreshFocusState(){this._focusTracker.refreshFocusState()}setEditContextOnDomNode(){const e=j(this.domNode.domNode),t=td(e);this._targetWindowId!==t&&(this.domNode.domNode.editContext=this._editContext,this._targetWindowId=t)}_onKeyUp(e){_n.onKeyUp(),this._viewController.emitKeyUp(new Be(e))}_onKeyDown(e){_n.onKeyDown();const t=new Be(e);t.keyCode===114&&t.stopPropagation(),this._viewController.emitKeyDown(t)}_updateDomAttributes(){const e=this._context.configuration.options;this.domNode.domNode.setAttribute("tabindex",String(e.get(140)))}_updateEditContext(){const e=this._getNewEditContextState();if(!e)return;const t=e.text??" ";t!==this._previousEditContextText&&(this._editContext.updateText(0,this._previousEditContextText.length,t),this._previousEditContextText=t),(e.selectionStartOffset!==this._previousEditContextSelection.start||e.selectionEndOffset!==this._previousEditContextSelection.endExclusive)&&this._editContext.updateSelection(e.selectionStartOffset,e.selectionEndOffset),this._editContextPrimarySelection=e.editContextPrimarySelection,this._previousEditContextSelection=new l.OffsetRange(e.selectionStartOffset,e.selectionEndOffset)}_emitTypeEvent(e,t){if(!this._editContext)return;const i=this._previousEditContextSelection.endExclusive,n=this._previousEditContextSelection.start;this._previousEditContextSelection=new l.OffsetRange(t.selectionStart,t.selectionEnd);let s=0,r=0;t.updateRangeEnd>i&&(s=t.updateRangeEnd-i),t.updateRangeStartt.updateRangeEnd&&(a+=this._editContext.text.substring(t.updateRangeEnd,i));let c=0;t.selectionStart===t.selectionEnd&&n===i&&(c=t.selectionStart-(t.updateRangeStart+t.text.length));const h={text:a,replacePrevCharCnt:r,replaceNextCharCnt:s,positionDelta:c};this._onType(e,h)}_onType(e,t){t.replacePrevCharCnt||t.replaceNextCharCnt||t.positionDelta?e.compositionType(t.text,t.replacePrevCharCnt,t.replaceNextCharCnt,t.positionDelta):e.type(t.text)}_getNewEditContextState(){const e=this._primarySelection,t=this._context.viewModel.model;if(!t.isValidRange(e))return;const i=e.startLineNumber,n=e.endLineNumber,s=t.getLineMaxColumn(n),r=new l.Range(i,1,n,s),a=t.getValueInRange(r,0),c=e.startColumn-1,h=a.length+e.endColumn-s;return{text:a,selectionStartOffset:c,selectionEndOffset:h,editContextPrimarySelection:e}}_editContextStartPosition(){return new l.Position(this._editContextPrimarySelection.startLineNumber,1)}_handleTextFormatUpdate(e){if(!this._editContext)return;const t=e.getTextFormats(),i=this._editContextStartPosition(),n=[];t.forEach(s=>{const r=this._context.viewModel.model,a=r.getOffsetAt(i),c=r.getPositionAt(a+s.rangeStart),h=r.getPositionAt(a+s.rangeEnd),d=l.Range.fromPositions(c,h),u=s.underlineThickness.toLowerCase();let f=Hd.NONE;switch(u){case"thin":f=Hd.SECONDARY;break;case"thick":f=Hd.PRIMARY;break}n.push({range:d,options:{description:"textFormatDecoration",inlineClassName:f}})}),this._decorations=this._context.viewModel.model.deltaDecorations(this._decorations,n)}_updateSelectionAndControlBoundsData(e){const t=this._context.viewModel.coordinatesConverter.convertModelRangeToViewRange(this._primarySelection);if(this._primarySelection.isEmpty()){const i=e.visibleRangeForPosition(t.getStartPosition());this._linesVisibleRanges=i}else this._linesVisibleRanges=null}_updateSelectionAndControlBounds(){const t=this._context.configuration.options.get(165).contentLeft,i=this._context.viewModel.coordinatesConverter.convertModelRangeToViewRange(this._primarySelection),n=this._context.viewLayout.getVerticalOffsetForLineNumber(i.startLineNumber),s=this._context.viewLayout.getVerticalOffsetAfterLineNumber(i.endLineNumber),r=this._parentBounds,a=r.top+n-this._scrollTop,c=s-n;let h=r.left+t-this._scrollLeft,d;this._primarySelection.isEmpty()?(this._linesVisibleRanges&&(h+=this._linesVisibleRanges.left),d=0):d=r.width-t;const u=new DOMRect(h,a,d,c);this._editContext.updateSelectionBounds(u),this._editContext.updateControlBounds(u)}_updateCharacterBounds(e){const t=this._context.configuration.options,i=t.get(59).typicalHalfwidthCharacterWidth,n=t.get(165).contentLeft,s=this._parentBounds,r=[],a=new l.PositionOffsetTransformer(this._editContext.text);for(let c=e.rangeStart;c0)for(const D of p[0].ranges){w=D.left,S=D.width;break}const L=this._context.viewLayout.getLineHeightForLineNumber(b);r.push(new DOMRect(s.left+n+w-this._scrollLeft,C,S,L))}this._editContext.updateCharacterBounds(e.rangeStart,r)}};ym=a5([RT(5,me),RT(6,ei)],ym);class l5 extends gi{constructor(e,t){super(e),this._viewGpuContext=t,this._gpuShapes=[],this._register(he(i=>this._updateEntries(i)))}onConfigurationChanged(e){return this._updateEntries(void 0),!0}prepareRender(e){}render(e){}_updateEntries(e){const t=this._context.configuration.options,i=t.get(116),n=t.get(59).typicalHalfwidthCharacterWidth,s=this._viewGpuContext.devicePixelRatio.read(e);for(let r=0,a=i.length;ri.length;)this._gpuShapes.splice(-1,1)[0].dispose()}}const sb=class sb extends hr{constructor(e,t){super(),this._viewGpuContext=t,this._context=e,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return!0}onCursorStateChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onDecorationsChanged(e){return!0}prepareRender(e){const t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=e.viewportData,s=new mm(this._context.configuration,this._context.theme.type),r=[];for(let a=t;a<=i;a++){const c=a-t,h=this._viewGpuContext.canRenderDetailed(s,n,a);r[c]=h.length?`
`:""}this._renderResult=r}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}};sb.CLASS_NAME="gpu-mark";let uw=sb;const Na=le("userInteractionService");var c5=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},MT=function(o,e){return function(t,i){e(t,i,o)}};let fw=class extends ma{constructor(e,t,i,n,s,r,a,c,h,d){super(),this._instantiationService=h,this._userInteractionService=d,this._editContextClipboardListeners=new l.DisposableStore,this._onWillCopy=this._register(new l.Emitter),this.onWillCopy=this._onWillCopy.event,this._onWillCut=this._register(new l.Emitter),this.onWillCut=this._onWillCut.event,this._onWillPaste=this._register(new l.Emitter),this.onWillPaste=this._onWillPaste.event,this._shouldRecomputeGlyphMarginLanes=!1,this._ownerID=t,this._widgetFocusTracker=this._register(new h5(e,c,this._userInteractionService)),this._register(this._widgetFocusTracker.onChange(()=>{this._context.viewModel.setHasWidgetFocus(this._widgetFocusTracker.hasFocus())})),this._selections=[new l.Selection(1,1,1,1)],this._renderAnimationFrame=null,this._overflowGuardContainer=we(document.createElement("div")),Jn.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._viewController=new dm(n,r,a,i),this._context=new f4(n,s,r),this._context.addEventHandler(this),this._viewParts=[],this._editContextEnabled=this._context.configuration.options.get(170),this._accessibilitySupport=this._context.configuration.options.get(2),this._editContext=this._instantiateEditContext(),this._connectEditContextClipboardEvents(),this._viewParts.push(this._editContext),this._linesContent=we(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=we(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._context.configuration.options.get(46)==="on"&&(this._viewGpuContext=this._instantiationService.createInstance(_.ViewGpuContext,this._context)),this._scrollbar=new R$(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new Yv(this._context,this._viewGpuContext,this._linesContent),this._viewGpuContext&&(this._viewLinesGpu=this._instantiationService.createInstance(iw,this._context,this._viewGpuContext)),this._viewZones=new l4(this._context),this._viewParts.push(this._viewZones);const u=new H$(this._context);this._viewParts.push(u);const f=new n4(this._context);this._viewParts.push(f);const g=new AU(this._context);this._viewParts.push(g),g.addDynamicOverlay(new I$(this._context)),g.addDynamicOverlay(new Qv(this._context)),g.addDynamicOverlay(new z$(this._context)),g.addDynamicOverlay(new N$(this._context)),g.addDynamicOverlay(new h4(this._context));const m=new OU(this._context);this._viewParts.push(m),m.addDynamicOverlay(new T$(this._context)),m.addDynamicOverlay(new G$(this._context)),m.addDynamicOverlay(new K$(this._context)),m.addDynamicOverlay(new gm(this._context)),this._viewGpuContext&&m.addDynamicOverlay(new uw(this._context,this._viewGpuContext)),this._glyphMarginWidgets=new O$(this._context),this._viewParts.push(this._glyphMarginWidgets);const p=new pm(this._context);p.getDomNode().appendChild(this._viewZones.marginDomNode),p.getDomNode().appendChild(m.getDomNode()),p.getDomNode().appendChild(this._glyphMarginWidgets.domNode),this._viewParts.push(p),this._contentWidgets=new kU(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new Xv(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new J$(this._context,this.domNode),this._viewParts.push(this._overlayWidgets);const b=this._viewGpuContext?new l5(this._context,this._viewGpuContext):new i4(this._context);this._viewParts.push(b);const v=new PU(this._context);this._viewParts.push(v);const C=new X$(this._context);if(this._viewParts.push(C),u){const w=this._scrollbar.getOverviewRulerLayoutInfo();w.parent.insertBefore(u.getDomNode(),w.insertBefore)}this._linesContent.appendChild(g.getDomNode()),"domNode"in b&&this._linesContent.appendChild(b.domNode),this._linesContent.appendChild(this._viewZones.domNode),this._linesContent.appendChild(this._viewLines.getDomNode()),this._linesContent.appendChild(this._contentWidgets.domNode),this._linesContent.appendChild(this._viewCursors.getDomNode()),this._overflowGuardContainer.appendChild(p.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._viewGpuContext&&this._overflowGuardContainer.appendChild(this._viewGpuContext.canvas),this._overflowGuardContainer.appendChild(f.getDomNode()),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(C.getDomNode()),this._overflowGuardContainer.appendChild(v.domNode),this.domNode.appendChild(this._overflowGuardContainer),c?(c.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode),c.appendChild(this._overlayWidgets.overflowingOverlayWidgetsDomNode.domNode)):(this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this.domNode.appendChild(this._overlayWidgets.overflowingOverlayWidgetsDomNode)),this._applyLayout(),this._pointerHandler=this._register(new W3(this._context,this._viewController,this._createPointerHandlerHelper()))}_instantiateEditContext(){return this._context.configuration.options.get(170)?this._instantiationService.createInstance(ym,this._ownerID,this._context,this._overflowGuardContainer,this._viewController,this._createTextAreaHandlerHelper()):this._instantiationService.createInstance(ow,this._ownerID,this._context,this._overflowGuardContainer,this._viewController,this._createTextAreaHandlerHelper())}_updateEditContext(){const e=this._context.configuration.options.get(170),t=this._context.configuration.options.get(2);if(this._editContextEnabled===e&&this._accessibilitySupport===t)return;this._editContextEnabled=e,this._accessibilitySupport=t;const i=this._editContext.isFocused(),n=this._viewParts.indexOf(this._editContext);this._editContext.dispose(),this._editContext=this._instantiateEditContext(),this._connectEditContextClipboardEvents(),i&&this._editContext.focus(),n!==-1&&this._viewParts.splice(n,1,this._editContext)}_connectEditContextClipboardEvents(){this._editContextClipboardListeners.clear(),this._editContextClipboardListeners.add(this._editContext.onWillCopy(e=>this._onWillCopy.fire(e))),this._editContextClipboardListeners.add(this._editContext.onWillCut(e=>this._onWillCut.fire(e))),this._editContextClipboardListeners.add(this._editContext.onWillPaste(e=>this._onWillPaste.fire(e)))}_computeGlyphMarginLanes(){const e=this._context.viewModel.model,t=this._context.viewModel.glyphLanes;let i=[],n=0;i=i.concat(e.getAllMarginDecorations().map(s=>{const r=s.options.glyphMargin?.position??l.GlyphMarginLane.Center;return n=Math.max(n,s.range.endLineNumber),{range:s.range,lane:r,persist:s.options.glyphMargin?.persistLane}})),i=i.concat(this._glyphMarginWidgets.getWidgets().map(s=>{const r=e.validateRange(s.preference.range);return n=Math.max(n,r.endLineNumber),{range:r,lane:s.preference.lane}})),i.sort((s,r)=>l.Range.compareRangesUsingStarts(s.range,r.range)),t.reset(n);for(const s of i)t.push(s.lane,s.range,s.persist);return t}_createPointerHandlerHelper(){return{viewDomNode:this.domNode.domNode,linesContentDomNode:this._linesContent.domNode,viewLinesDomNode:this._viewLines.getDomNode().domNode,viewLinesGpu:this._viewLinesGpu,focusTextArea:()=>{this.focus()},dispatchTextAreaEvent:e=>{this._editContext.domNode.domNode.dispatchEvent(e)},getLastRenderData:()=>{const e=this._viewCursors.getLastRenderData()||[],t=this._editContext.getLastRenderData();return new m3(e,t)},renderNow:()=>{this.render(!0,!1)},shouldSuppressMouseDownOnViewZone:e=>this._viewZones.shouldSuppressMouseDownOnViewZone(e),shouldSuppressMouseDownOnWidget:e=>this._contentWidgets.shouldSuppressMouseDownOnWidget(e),getPositionFromDOMInfo:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(e,t)),visibleRangeForPosition:(e,t)=>{this._flushAccumulatedAndRenderNow();const i=new l.Position(e,t);return this._viewLines.visibleRangeForPosition(i)??this._viewLinesGpu?.visibleRangeForPosition(i)??null},getLineWidth:e=>{if(this._flushAccumulatedAndRenderNow(),this._viewLinesGpu){const t=this._viewLinesGpu.getLineWidth(e);if(t!==void 0)return t}return this._viewLines.getLineWidth(e)}}}_createTextAreaHandlerHelper(){return{visibleRangeForPosition:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(e)),linesVisibleRangesForRange:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.linesVisibleRangesForRange(e,t))}}_applyLayout(){const t=this._context.configuration.options.get(165);this.domNode.setWidth(t.width),this.domNode.setHeight(t.height),this._overflowGuardContainer.setWidth(t.width),this._overflowGuardContainer.setHeight(t.height),this._linesContent.setWidth(16777216),this._linesContent.setHeight(16777216)}_getEditorClassName(){const e=this._editContext.isFocused()?" focused":"";return this._context.configuration.options.get(162)+" "+Uv(this._context.theme.type)+e}handleEvents(e){super.handleEvents(e),this._scheduleRender()}onConfigurationChanged(e){return this.domNode.setClassName(this._getEditorClassName()),this._updateEditContext(),this._applyLayout(),!1}onCursorStateChanged(e){return this._selections=e.selections,!1}onDecorationsChanged(e){return e.affectsGlyphMargin&&(this._shouldRecomputeGlyphMarginLanes=!0),!1}onFocusChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(e){return this._context.theme.update(e.theme),this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){this._renderAnimationFrame!==null&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this._editContextClipboardListeners.dispose(),this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(),this._overlayWidgets.overflowingOverlayWidgetsDomNode.domNode.remove(),this._context.removeEventHandler(this),this._viewGpuContext?.dispose(),this._viewLines.dispose(),this._viewLinesGpu?.dispose();for(const e of this._viewParts)e.dispose();super.dispose()}_scheduleRender(){if(this._store.isDisposed)throw new l.BugIndicatingError;if(this._renderAnimationFrame===null){this._editContext instanceof ym&&this._editContext.setEditContextOnDomNode();const e=this._createCoordinatedRendering();this._renderAnimationFrame=gw.INSTANCE.scheduleCoordinatedRendering({window:j(this.domNode?.domNode),prepareRenderText:()=>{if(this._store.isDisposed)throw new l.BugIndicatingError;try{return e.prepareRenderText()}finally{this._renderAnimationFrame=null}},renderText:t=>{if(this._store.isDisposed)throw new l.BugIndicatingError;return e.renderText(t)},prepareRender:(t,i)=>{if(this._store.isDisposed)throw new l.BugIndicatingError;return e.prepareRender(t,i)},render:(t,i)=>{if(this._store.isDisposed)throw new l.BugIndicatingError;return e.render(t,i)}})}}_flushAccumulatedAndRenderNow(){const e=this._createCoordinatedRendering(),t=ur(()=>e.prepareRenderText());if(!t)return;const i=ur(()=>e.renderText(t));if(!i)return;const[n,s]=i;ur(()=>e.prepareRender(n,s)),ur(()=>e.render(n,s))}_getViewPartsToRender(){const e=[];let t=0;for(const i of this._viewParts)i.shouldRender()&&(e[t++]=i);return e}_createCoordinatedRendering(){return{prepareRenderText:()=>{if(this._shouldRecomputeGlyphMarginLanes){this._shouldRecomputeGlyphMarginLanes=!1;const s=this._computeGlyphMarginLanes();this._context.configuration.setGlyphMarginDecorationLaneCount(s.requiredLanes)}if(_n.onRenderStart(),!this.domNode.domNode.isConnected)return null;const e=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&e.length===0)return null;const i=this._context.viewLayout.getLinesViewportData();this._context.viewModel.setViewport(i.startLineNumber,i.endLineNumber,i.centeredLineNumber);const n=new d4(this._selections,i,this._context.viewLayout.getWhitespaceViewportData(),this._context.viewModel);for(const s of this._viewParts)s.shouldRender()&&s.onBeforeRender(n);return n},renderText:e=>(this._viewLines.shouldRender()&&(this._viewLines.renderText(e),this._viewLines.onDidRender()),this._viewLinesGpu?.shouldRender()&&(this._viewLinesGpu.renderText(e),this._viewLinesGpu.onDidRender()),[this._getViewPartsToRender(),new h3(this._context.viewLayout,e,this._viewLines,this._viewLinesGpu)]),prepareRender:(e,t)=>{for(const i of e)i.prepareRender(t)},render:(e,t)=>{for(const i of e)i.render(t),i.onDidRender()}}}delegateVerticalScrollbarPointerDown(e){this._scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this._scrollbar.delegateScrollFromMouseWheelEvent(e)}restoreState(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft},1),this._context.viewModel.visibleLinesStabilized()}getOffsetForColumn(e,t){const i=this._context.viewModel.model.validatePosition({lineNumber:e,column:t}),n=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(i);this._flushAccumulatedAndRenderNow();const s=this._viewLines.visibleRangeForPosition(new l.Position(n.lineNumber,n.column));return s?s.left:-1}getLineWidth(e){const t=this._context.viewModel.model,i=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(new l.Position(e,t.getLineMaxColumn(e))).lineNumber;return this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(i)}resetLineWidthCaches(){this._viewLines.resetLineWidthCaches()}getTargetAtClientPoint(e,t){const i=this._pointerHandler.getTargetAtClientPoint(e,t);return i?um.convertViewToModelMouseTarget(i,this._context.viewModel.coordinatesConverter):null}createOverviewRuler(e){return new t4(this._context,e)}change(e){this._viewZones.changeViewZones(e),this._scheduleRender()}render(e,t){if(t){this._viewLines.forceShouldRender();for(const i of this._viewParts)i.forceShouldRender()}e?this._flushAccumulatedAndRenderNow():this._scheduleRender()}writeScreenReaderContent(e){this._editContext.writeScreenReaderContent(e)}focus(){this._editContext.focus()}isFocused(){return this._editContext.isFocused()}isWidgetFocused(){return this._widgetFocusTracker.hasFocus()}setAriaOptions(e){this._editContext.setAriaOptions(e)}addContentWidget(e){this._contentWidgets.addWidget(e.widget),this.layoutContentWidget(e),this._scheduleRender()}layoutContentWidget(e){this._contentWidgets.setWidgetPosition(e.widget,e.position?.position??null,e.position?.secondaryPosition??null,e.position?.preference??null,e.position?.positionAffinity??null),this._contentWidgets.shouldRender()&&this._scheduleRender()}removeContentWidget(e){this._contentWidgets.removeWidget(e.widget),this._scheduleRender()}addOverlayWidget(e){this._overlayWidgets.addWidget(e.widget),this.layoutOverlayWidget(e),this._scheduleRender()}layoutOverlayWidget(e){this._overlayWidgets.setWidgetPosition(e.widget,e.position)&&this._scheduleRender()}removeOverlayWidget(e){this._overlayWidgets.removeWidget(e.widget),this._scheduleRender()}addGlyphMarginWidget(e){this._glyphMarginWidgets.addWidget(e.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}layoutGlyphMarginWidget(e){const t=e.position;this._glyphMarginWidgets.setWidgetPosition(e.widget,t)&&(this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender())}removeGlyphMarginWidget(e){this._glyphMarginWidgets.removeWidget(e.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}};fw=c5([MT(8,me),MT(9,Na)],fw);function ur(o){try{return o()}catch(e){return l.onUnexpectedError(e),null}}const ob=class ob{constructor(){this._coordinatedRenderings=[],this._animationFrameRunners=new Map}scheduleCoordinatedRendering(e){return this._coordinatedRenderings.push(e),this._scheduleRender(e.window),{dispose:()=>{const t=this._coordinatedRenderings.indexOf(e);if(t!==-1&&(this._coordinatedRenderings.splice(t,1),this._coordinatedRenderings.length===0)){for(const[i,n]of this._animationFrameRunners)n.dispose();this._animationFrameRunners.clear()}}}}_scheduleRender(e){if(!this._animationFrameRunners.has(e)){const t=()=>{this._animationFrameRunners.delete(e),this._onRenderScheduled()};this._animationFrameRunners.set(e,_.runAtThisOrScheduleAtNextAnimationFrame(e,t,100))}}_onRenderScheduled(){const e=this._coordinatedRenderings.slice(0);this._coordinatedRenderings=[];const t=[];for(let n=0,s=e.length;nr.prepareRenderText())}const i=[];for(let n=0,s=e.length;nr.renderText(a))}for(let n=0,s=e.length;nr.prepareRender(c,h))}for(let n=0,s=e.length;nr.render(c,h))}}};ob.INSTANCE=new ob;let gw=ob;class h5 extends l.Disposable{constructor(e,t,i){super(),this._onChange=this._register(new l.Emitter),this.onChange=this._onChange.event,this._hadFocus=void 0,this._hasDomElementFocus=!1,this._domFocusTracker=this._register(i.createDomFocusTracker(e)),this._overflowWidgetsDomNodeHasFocus=!1,this._register(this._domFocusTracker.onDidFocus(()=>{this._hasDomElementFocus=!0,this._update()})),this._register(this._domFocusTracker.onDidBlur(()=>{this._hasDomElementFocus=!1,this._update()})),t&&(this._overflowWidgetsDomNode=this._register(i.createDomFocusTracker(t)),this._register(this._overflowWidgetsDomNode.onDidFocus(()=>{this._overflowWidgetsDomNodeHasFocus=!0,this._update()})),this._register(this._overflowWidgetsDomNode.onDidBlur(()=>{this._overflowWidgetsDomNodeHasFocus=!1,this._update()})))}_update(){const e=this._hasDomElementFocus||this._overflowWidgetsDomNodeHasFocus;this._hadFocus!==e&&(this._hadFocus=e,this._onChange.fire(void 0))}hasFocus(){return this._hadFocus??!1}}class eu{constructor(e,t,i,n,s){this.injectionOffsets=e,this.injectionOptions=t,this.breakOffsets=i,this.breakOffsetsVisibleColumn=n,this.wrappedTextIndentLength=s}getOutputLineCount(){return this.breakOffsets.length}getMinOutputOffset(e){return e>0?this.wrappedTextIndentLength:0}getLineLength(e){const t=e>0?this.breakOffsets[e-1]:0;let n=this.breakOffsets[e]-t;return e>0&&(n+=this.wrappedTextIndentLength),n}getMaxOutputOffset(e){return this.getLineLength(e)}translateToInputOffset(e,t){e>0&&(t=Math.max(0,t-this.wrappedTextIndentLength));let n=e===0?t:this.breakOffsets[e-1]+t;if(this.injectionOffsets!==null)for(let s=0;sthis.injectionOffsets[s];s++)n0?this.breakOffsets[s-1]:0,t===0)if(e<=r)n=s-1;else if(e>c)i=s+1;else break;else if(e=c)i=s+1;else break}let a=e-r;return s>0&&(a+=this.wrappedTextIndentLength),new Lm(s,a)}normalizeOutputPosition(e,t,i){if(this.injectionOffsets!==null){const n=this.outputPositionToOffsetInInputWithInjections(e,t),s=this.normalizeOffsetInInputWithInjectionsAroundInjections(n,i);if(s!==n)return this.offsetInInputWithInjectionsToOutputPosition(s,i)}if(i===0){if(e>0&&t===this.getMinOutputOffset(e))return new Lm(e-1,this.getMaxOutputOffset(e-1))}else if(i===1){const n=this.getOutputLineCount()-1;if(e0&&(t=Math.max(0,t-this.wrappedTextIndentLength)),(e>0?this.breakOffsets[e-1]:0)+t}normalizeOffsetInInputWithInjectionsAroundInjections(e,t){const i=this.getInjectedTextAtOffset(e);if(!i)return e;if(t===2){if(e===i.offsetInInputWithInjections+i.length&&AT(this.injectionOptions[i.injectedTextIndex].cursorStops))return i.offsetInInputWithInjections+i.length;{let n=i.offsetInInputWithInjections;if(OT(this.injectionOptions[i.injectedTextIndex].cursorStops))return n;let s=i.injectedTextIndex-1;for(;s>=0&&this.injectionOffsets[s]===this.injectionOffsets[i.injectedTextIndex]&&!(AT(this.injectionOptions[s].cursorStops)||(n-=this.injectionOptions[s].content.length,OT(this.injectionOptions[s].cursorStops)));)s--;return n}}else if(t===1||t===4){let n=i.offsetInInputWithInjections+i.length,s=i.injectedTextIndex;for(;s+1=0&&this.injectionOffsets[s-1]===this.injectionOffsets[s];)n-=this.injectionOptions[s-1].content.length,s--;return n}l.assertNever()}getInjectedText(e,t){const i=this.outputPositionToOffsetInInputWithInjections(e,t),n=this.getInjectedTextAtOffset(i);return n?{options:this.injectionOptions[n.injectedTextIndex]}:null}getInjectedTextAtOffset(e){const t=this.injectionOffsets,i=this.injectionOptions;if(t!==null){let n=0;for(let s=0;se)break;if(e<=c)return{injectedTextIndex:s,offsetInInputWithInjections:a,length:r};n+=r}}}}function AT(o){return o==null?!0:o===l.InjectedTextCursorStops.Right||o===l.InjectedTextCursorStops.Both}function OT(o){return o==null?!0:o===l.InjectedTextCursorStops.Left||o===l.InjectedTextCursorStops.Both}class Lm{constructor(e,t){this.outputLineIndex=e,this.outputOffset=t}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(e){return new l.Position(e+this.outputLineIndex,this.outputOffset+1)}}class d5{constructor(){this.changeType=1}}class mo{static applyInjectedText(e,t){if(!t||t.length===0)return e;let i="",n=0;for(const s of t)i+=e.substring(n,s.column-1),n=s.column-1,i+=s.options.content;return i+=e.substring(n),i}static fromDecorations(e){const t=[];for(const i of e)i.options.before&&i.options.before.content.length>0&&t.push(new mo(i.ownerId,i.range.startLineNumber,i.range.startColumn,i.options.before,0)),i.options.after&&i.options.after.content.length>0&&t.push(new mo(i.ownerId,i.range.endLineNumber,i.range.endColumn,i.options.after,1));return t.sort((i,n)=>i.lineNumber===n.lineNumber?i.column===n.column?i.order-n.order:i.column-n.column:i.lineNumber-n.lineNumber),t}constructor(e,t,i,n,s){this.ownerId=e,this.lineNumber=t,this.column=i,this.options=n,this.order=s}}class PT{constructor(e,t){this.changeType=2,this.lineNumber=e,this.lineNumberPostEdit=t}}class u5{constructor(e,t,i,n){this.ownerId=e,this.decorationId=t,this.lineNumber=i,this.lineHeightMultiplier=n}}class f5{constructor(e,t){this.ownerId=e,this.lineNumber=t}}class g5{constructor(e,t,i){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t,this.lastUntouchedLinePostEdit=i}}class m5{get toLineNumber(){return this.fromLineNumber+this.count-1}get toLineNumberPostEdit(){return this.fromLineNumberPostEdit+this.count-1}constructor(e,t,i){this.changeType=4,this.fromLineNumber=e,this.fromLineNumberPostEdit=t,this.count=i}}class p5{constructor(){this.changeType=5}}class Dc{constructor(e,t,i,n){this.changes=e,this.versionId=t,this.isUndoing=i,this.isRedoing=n,this.resultingSelection=null}containsEvent(e){for(let t=0,i=this.changes.length;to});class mw{static create(e){return new mw(new WeakRef(e))}constructor(e){this.targetWindow=e}createLineBreaksComputer(e,t,i,n,s,r,a){const c=[];return{addRequest:(h,d)=>{c.push(h)},finalize:()=>b5(l.assertReturnsDefined(this.targetWindow.deref()),e,c,t,i,n,s,r)}}}function b5(o,e,t,i,n,s,r,a){function c(T){const M=e.getLineInjectedText(T);if(M){const O=e.getLineContent(T),P=mo.applyInjectedText(O,M),k=M.map(B=>B.options),U=M.map(B=>B.column-1);return new eu(U,k,[P.length],[],0)}else return null}if(s===-1){const T=[];for(let M=0,O=t.length;Mh?(P=0,k=0):U=h-X}const B=O.substr(P),G=C5(B,k,n,U,m,f);p[T]=P,b[T]=k,v[T]=B,C[T]=G[0],w[T]=G[1]}const S=m.build(),L=_5?.createHTML(S)??S;g.innerHTML=L,g.style.position="absolute",g.style.top="10000px",a==="keepAll"?(g.style.wordBreak="keep-all",g.style.overflowWrap="anywhere"):(g.style.wordBreak="inherit",g.style.overflowWrap="break-word"),o.document.body.appendChild(g);const D=document.createRange(),x=Array.prototype.slice.call(g.children,0),I=[];for(let T=0;Tee.options),re=Y.map(ee=>ee.column-1)):(X=null,re=null),I[T]=new eu(re,X,P,G,U)}return g.remove(),I}function C5(o,e,t,i,n,s){if(s!==0){const f=String(s);n.appendString('
');const r=o.length;let a=e,c=0;const h=[],d=[];let u=0");for(let f=0;f"),h[f]=c,d[f]=a;const g=u;u=f+1"),h[o.length]=c,d[o.length]=a,n.appendString("
"),[h,d]}function v5(o,e,t,i){if(t.length<=1)return null;const n=Array.prototype.slice.call(e.children,0),s=[];try{pw(o,n,i,0,null,t.length-1,null,s)}catch(r){return console.error(r),null}return s.length===0?null:(s.push(t.length),s)}function pw(o,e,t,i,n,s,r,a){if(i===s||(n=n||_w(o,e,t[i],t[i+1]),r=r||_w(o,e,t[s],t[s+1]),Math.abs(n[0].top-r[0].top)<=.1))return;if(i+1===s){a.push(s);return}const c=i+(s-i)/2|0,h=_w(o,e,t[c],t[c+1]);pw(o,e,t,i,n,c,h,a),pw(o,e,t,c,h,s,r,a)}function _w(o,e,t,i){return o.setStart(e[t/16384|0].firstChild,t%16384),o.setEnd(e[i/16384|0].firstChild,i%16384),o.getClientRects()}class w5 extends l.Disposable{constructor(){super(),this._editor=null,this._instantiationService=null,this._instances=this._register(new l.DisposableMap),this._pending=new Map,this._finishedInstantiation=[],this._finishedInstantiation[0]=!1,this._finishedInstantiation[1]=!1,this._finishedInstantiation[2]=!1,this._finishedInstantiation[3]=!1}initialize(e,t,i){this._editor=e,this._instantiationService=i;for(const n of t){if(this._pending.has(n.id)){l.onUnexpectedError(new Error(`Cannot have two contributions with the same id ${n.id}`));continue}this._pending.set(n.id,n)}this._instantiateSome(0),this._register(nd(j(this._editor.getDomNode()),()=>{this._instantiateSome(1)})),this._register(nd(j(this._editor.getDomNode()),()=>{this._instantiateSome(2)})),this._register(nd(j(this._editor.getDomNode()),()=>{this._instantiateSome(3)},5e3))}saveViewState(){const e={};for(const[t,i]of this._instances)typeof i.saveViewState=="function"&&(e[t]=i.saveViewState());return e}restoreViewState(e){for(const[t,i]of this._instances)typeof i.restoreViewState=="function"&&i.restoreViewState(e[t])}get(e){return this._instantiateById(e),this._instances.get(e)||null}onBeforeInteractionEvent(){this._instantiateSome(2)}onAfterModelAttached(){return nd(j(this._editor?.getDomNode()),()=>{this._instantiateSome(1)},50)}_instantiateSome(e){if(this._finishedInstantiation[e])return;this._finishedInstantiation[e]=!0;const t=this._findPendingContributionsByInstantiation(e);for(const i of t)this._instantiateById(i.id)}_findPendingContributionsByInstantiation(e){const t=[];for(const[,i]of this._pending)i.instantiation===e&&t.push(i);return t}_instantiateById(e){const t=this._pending.get(e);if(t){if(this._pending.delete(e),!this._instantiationService||!this._editor)throw new Error("Cannot instantiate contributions before being initialized!");try{const i=this._instantiationService.createInstance(t.ctor,this._editor);this._instances.set(t.id,i),typeof i.restoreViewState=="function"&&t.instantiation!==0&&console.warn(`Editor contribution '${t.id}' should be eager instantiated because it uses saveViewState / restoreViewState.`)}catch(i){l.onUnexpectedError(i)}}}}class zT{constructor(e,t,i,n,s,r,a){this.id=e,this.label=t,this.alias=i,this.metadata=n,this._precondition=s,this._run=r,this._contextKeyService=a}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(e){return this.isSupported()?this._run(e):Promise.resolve(void 0)}}var VT;function S5(o,e){const t=new Map;for(const i of o){const n=e(i);let s=t.get(n);s||(s=[],t.set(n,s)),s.push(i)}return t}function y5(o,e){const t=[],i=[];for(const n of o)e.has(n)||t.push(n);for(const n of e)o.has(n)||i.push(n);return{removed:t,added:i}}function UT(o,e){const t=new Set;for(const i of e)o.has(i)&&t.add(i);return t}class $T{constructor(e,t){this.toKey=t,this._map=new Map,this[VT]="SetWithKey";for(const i of e)this.add(i)}get size(){return this._map.size}add(e){const t=this.toKey(e);return this._map.set(t,e),this}delete(e){return this._map.delete(this.toKey(e))}has(e){return this._map.has(this.toKey(e))}*entries(){for(const e of this._map.values())yield[e,e]}keys(){return this.values()}*values(){for(const e of this._map.values())yield e}clear(){this._map.clear()}forEach(e,t){this._map.forEach(i=>e.call(t,i,i,this))}[Symbol.iterator](){return this.values()}}VT=Symbol.toStringTag;const bw=le("undoRedoService");class KT{constructor(e,t){this.resource=e,this.elements=t}}const Ah=class Ah{constructor(){this.id=Ah._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}};Ah._ID=0,Ah.None=new Ah;let Cw=Ah;const Oh=class Oh{constructor(){this.id=Oh._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}};Oh._ID=0,Oh.None=new Oh;let Ma=Oh;function fr(o){let e=0,t=0,i=0,n=0;for(let s=0,r=o.length;s{const a=t[s];return a!==void 0?a:(s.match(/\$/g)||[]).length<=e&&r!==void 0&&r!==null&&r!==""}).map(([s,r])=>`${s}:${r}`).join("-")}}function Ai(o){return new GT(o,L5)}const $i={unknown(o){return Ai({source:"unknown",name:o.name})},rename:(o,e)=>Ai({source:"rename",$$$oldName:o,$$$newName:e}),chatApplyEdits(o){return Ai({source:"Chat.applyEdits",$modelId:jT(o.modelId),$extensionId:o.extensionId?.extensionId,$extensionVersion:o.extensionId?.version,$$languageId:o.languageId,$$sessionId:o.sessionId,$$requestId:o.requestId,$$mode:o.mode,$$codeBlockSuggestionId:o.codeBlockSuggestionId})},chatUndoEdits:()=>Ai({source:"Chat.undoEdits"}),chatReset:()=>Ai({source:"Chat.reset"}),inlineCompletionAccept(o){return Ai({source:"inlineCompletionAccept",$nes:o.nes,...Dm(o.providerId),$$correlationId:o.correlationId,$$requestUuid:o.requestUuid,$$languageId:o.languageId})},inlineCompletionPartialAccept(o){return Ai({source:"inlineCompletionPartialAccept",type:o.type,$nes:o.nes,...Dm(o.providerId),$$correlationId:o.correlationId,$$requestUuid:o.requestUuid,$$languageId:o.languageId})},inlineChatApplyEdit(o){return Ai({source:"inlineChat.applyEdits",$modelId:jT(o.modelId),$extensionId:o.extensionId?.extensionId,$extensionVersion:o.extensionId?.version,$$sessionId:o.sessionId,$$requestId:o.requestId,$$languageId:o.languageId})},reloadFromDisk:()=>Ai({source:"reloadFromDisk"}),cursor(o){return Ai({source:"cursor",kind:o.kind,detailedSource:o.detailedSource})},setValue:()=>Ai({source:"setValue"}),eolChange:()=>Ai({source:"eolChange"}),applyEdits:()=>Ai({source:"applyEdits"}),snippet:()=>Ai({source:"snippet"}),suggest:o=>Ai({source:"suggest",...Dm(o.providerId)}),codeAction:o=>Ai({source:"codeAction",$kind:o.kind,...Dm(o.providerId)})};function Dm(o){return o?{$extensionId:o.extensionId,$extensionVersion:o.extensionVersion,$providerId:o.providerId}:{}}function jT(o){if(o!==void 0)return o.replaceAll("/","|")}class tu{static fromText(e){const t=l.TextLength.ofText(e).lineCount,i=e.length;return new tu(t,0,i,0)}static tryCreate(e,t,i,n){if(!(e===void 0||t===void 0||i===void 0||n===void 0))return new tu(e,t,i,n)}constructor(e,t,i,n){this.linesAdded=e,this.linesRemoved=t,this.charsAdded=i,this.charsRemoved=n}}var qT;(function(o){function e(t){const i=t?t("sgt"):mI("sgt");return i}o.newId=e})(qT||(qT={}));function LH(o){return o}class YT{constructor(e,t,i,n){this.range=e,this.nestingLevel=t,this.nestingLevelOfEqualBracketType=i,this.isInvalid=n}}class D5{constructor(e,t,i,n,s,r){this.range=e,this.openingBracketRange=t,this.closingBracketRange=i,this.nestingLevel=n,this.nestingLevelOfEqualBracketType=s,this.bracketPairNode=r}get openingBracketInfo(){return this.bracketPairNode.openingBracket.bracketInfo}}class x5 extends D5{constructor(e,t,i,n,s,r,a){super(e,t,i,n,s,r),this.minVisibleColumnIndentation=a}}function E5(o,e,t,i){return o!==t?ht(t-o,i):ht(0,i-e)}const bi=0;function xm(o){return o===0}const en=2**26;function ht(o,e){return o*en+e}function Ln(o){const e=o,t=Math.floor(e/en),i=e-t*en;return new l.TextLength(t,i)}function I5(o){return Math.floor(o/en)}function T5(o){return o}function gt(o,e){let t=o+e;return e>=en&&(t=t-o%en),t}function N5(o,e){return o.reduce((t,i)=>gt(t,e(i)),bi)}function ZT(o,e){return o===e}function iu(o,e){const t=o,i=e;if(i-t<=0)return bi;const s=Math.floor(t/en),r=Math.floor(i/en),a=i-r*en;if(s===r){const c=t-s*en;return ht(0,a-c)}else return ht(r-s,a)}function xc(o,e){return o=e}function Ic(o){return ht(o.lineNumber-1,o.column-1)}function Aa(o,e){const t=o,i=Math.floor(t/en),n=t-i*en,s=e,r=Math.floor(s/en),a=s-r*en;return new l.Range(i+1,n+1,r+1,a+1)}function R5(o){const e=l.splitLines(o);return ht(e.length-1,e[e.length-1].length)}class po{static fromModelContentChanges(e){return e.map(i=>{const n=l.Range.lift(i.range);return new po(Ic(n.getStartPosition()),Ic(n.getEndPosition()),R5(i.text))}).reverse()}constructor(e,t,i){this.startOffset=e,this.endOffset=t,this.newLength=i}toString(){return`[${Ln(this.startOffset)}...${Ln(this.endOffset)}) -> ${Ln(this.newLength)}`}}class M5{constructor(e){this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=e.map(t=>vw.from(t))}getOffsetBeforeChange(e){return this.adjustNextEdit(e),this.translateCurToOld(e)}getDistanceToNextChange(e){this.adjustNextEdit(e);const t=this.edits[this.nextEditIdx],i=t?this.translateOldToCur(t.offsetObj):null;return i===null?null:iu(e,i)}translateOldToCur(e){return e.lineCount===this.deltaLineIdxInOld?ht(e.lineCount+this.deltaOldToNewLineCount,e.columnCount+this.deltaOldToNewColumnCount):ht(e.lineCount+this.deltaOldToNewLineCount,e.columnCount)}translateCurToOld(e){const t=Ln(e);return t.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?ht(t.lineCount-this.deltaOldToNewLineCount,t.columnCount-this.deltaOldToNewColumnCount):ht(t.lineCount-this.deltaOldToNewLineCount,t.columnCount)}adjustNextEdit(e){for(;this.nextEditIdx>5;if(n===0){const r=1<this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;this.line===null&&(this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));const e=this.lineIdx,t=this.lineCharOffset;let i=0;for(;;){const s=this.lineTokens,r=s.getCount();let a=null;if(this.lineTokenOffset1e3))break;if(i>1500)break}const n=E5(e,t,this.lineIdx,this.lineCharOffset);return new gr(n,0,-1,Ki.getEmpty(),new Oa(n))}}class B5{constructor(e,t){this.text=e,this._offset=bi,this.idx=0;const i=t.getRegExpStr(),n=i?new RegExp(i+`| +`,"gi"):null,s=[];let r,a=0,c=0,h=0,d=0;const u=[];for(let m=0;m<60;m++)u.push(new gr(ht(0,m),0,-1,Ki.getEmpty(),new Oa(ht(0,m))));const f=[];for(let m=0;m<60;m++)f.push(new gr(ht(1,m),0,-1,Ki.getEmpty(),new Oa(ht(1,m))));if(n)for(n.lastIndex=0;(r=n.exec(e))!==null;){const m=r.index,p=r[0];if(p===` +`)a++,c=m+1;else{if(h!==m){let b;if(d===a){const v=m-h;if(vz5(t)).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const e=this.getRegExpStr();this._regExpGlobal=e?new RegExp(e,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e.toLowerCase())}findClosingTokenText(e){for(const[t,i]of this.map)if(i.kind===2&&i.bracketIds.intersects(e))return t}get isEmpty(){return this.map.size===0}}function z5(o){let e=l.escapeRegExpCharacters(o);return/^[\w ]+/.test(o)&&(e=`\\b${e}`),/[\w ]+$/.test(o)&&(e=`${e}\\b`),e}class WT{constructor(e,t){this.denseKeyProvider=e,this.getLanguageConfiguration=t,this.languageIdToBracketTokens=new Map}didLanguageChange(e){return this.languageIdToBracketTokens.has(e)}getSingleLanguageBracketTokens(e){let t=this.languageIdToBracketTokens.get(e);return t||(t=yw.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}function V5(o){if(o.length===0)return null;if(o.length===1)return o[0];let e=0;function t(){if(e>=o.length)return null;const r=e,a=o[r].listHeight;for(e++;e=2?HT(r===0&&e===o.length?o:o.slice(r,e),!1):o[r]}let i=t(),n=t();if(!n)return i;for(let r=t();r;r=t())e1(i,n)<=e1(n,r)?(i=Lw(i,n),n=r):n=Lw(n,r);return Lw(i,n)}function HT(o,e=!1){if(o.length===0)return null;if(o.length===1)return o[0];let t=o.length;for(;t>3;){const i=t>>1;for(let n=0;n=3?o[2]:null,e)}function e1(o,e){return Math.abs(o.listHeight-e.listHeight)}function Lw(o,e){return o.listHeight===e.listHeight?ys.create23(o,e,null,!1):o.listHeight>e.listHeight?U5(o,e):$5(e,o)}function U5(o,e){o=o.toMutable();let t=o;const i=[];let n;for(;;){if(e.listHeight===t.listHeight){n=e;break}if(t.kind!==4)throw new Error("unexpected");i.push(t),t=t.makeLastElementMutable()}for(let s=i.length-1;s>=0;s--){const r=i[s];n?r.childrenLength>=3?n=ys.create23(r.unappendChild(),n,null,!1):(r.appendChildOfSameHeight(n),n=void 0):r.handleChildrenChanged()}return n?ys.create23(o,n,null,!1):o}function $5(o,e){o=o.toMutable();let t=o;const i=[];for(;e.listHeight!==t.listHeight;){if(t.kind!==4)throw new Error("unexpected");i.push(t),t=t.makeFirstElementMutable()}let n=e;for(let s=i.length-1;s>=0;s--){const r=i[s];n?r.childrenLength>=3?n=ys.create23(n,r.unprependChild(),null,!1):(r.prependChildOfSameHeight(n),n=void 0):r.handleChildrenChanged()}return n?ys.create23(n,o,null,!1):o}class K5{constructor(e){this.lastOffset=bi,this.nextNodes=[e],this.offsets=[bi],this.idxs=[]}readLongestNodeAt(e,t){if(xc(e,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=e;;){const i=ru(this.nextNodes);if(!i)return;const n=ru(this.offsets);if(xc(e,n))return;if(xc(n,e))if(gt(n,i.length)<=e)this.nextNodeAfterCurrent();else{const s=Dw(i);s!==-1?(this.nextNodes.push(i.getChild(s)),this.offsets.push(n),this.idxs.push(s)):this.nextNodeAfterCurrent()}else{if(t(i))return this.nextNodeAfterCurrent(),i;{const s=Dw(i);if(s===-1){this.nextNodeAfterCurrent();return}else this.nextNodes.push(i.getChild(s)),this.offsets.push(n),this.idxs.push(s)}}}}nextNodeAfterCurrent(){for(;;){const e=ru(this.offsets),t=ru(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),this.idxs.length===0)break;const i=ru(this.nextNodes),n=Dw(i,this.idxs[this.idxs.length-1]);if(n!==-1){this.nextNodes.push(i.getChild(n)),this.offsets.push(gt(e,t.length)),this.idxs[this.idxs.length-1]=n;break}else this.idxs.pop()}}}function Dw(o,e=-1){for(;;){if(e++,e>=o.childrenLength)return-1;if(o.getChild(e))return e}}function ru(o){return o.length>0?o[o.length-1]:void 0}function xw(o,e,t,i){return new G5(o,e,t,i).parseDocument()}class G5{constructor(e,t,i,n){if(this.tokenizer=e,this.createImmutableLists=n,this._itemsConstructed=0,this._itemsFromCache=0,i&&n)throw new Error("Not supported");this.oldNodeReader=i?new K5(i):void 0,this.positionMapper=new M5(t)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let e=this.parseList(Ki.getEmpty(),0);return e||(e=ys.getEmpty()),e}parseList(e,t){const i=[];for(;;){let s=this.tryReadChildFromCache(e);if(!s){const r=this.tokenizer.peek();if(!r||r.kind===2&&r.bracketIds.intersects(e))break;s=this.parseChild(e,t+1)}s.kind===4&&s.childrenLength===0||i.push(s)}return this.oldNodeReader?V5(i):HT(i,this.createImmutableLists)}tryReadChildFromCache(e){if(this.oldNodeReader){const t=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(t===null||!xm(t)){const i=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),n=>t!==null&&!xc(n.length,t)?!1:n.canBeReused(e));if(i)return this._itemsFromCache++,this.tokenizer.skip(i.length),i}}}parseChild(e,t){this._itemsConstructed++;const i=this.tokenizer.read();switch(i.kind){case 2:return new k5(i.bracketIds,i.length);case 0:return i.astNode;case 1:{if(t>300)return new Oa(i.length);const n=e.merge(i.bracketIds),s=this.parseList(n,t+1),r=this.tokenizer.peek();return r&&r.kind===2&&(r.bracketId===i.bracketId||r.bracketIds.intersects(i.bracketIds))?(this.tokenizer.read(),su.create(i.astNode,s,r.astNode)):su.create(i.astNode,s,null)}default:throw new Error("unexpected")}}}function Nm(o,e){if(o.length===0)return e;if(e.length===0)return o;const t=new l.ArrayQueue(t1(o)),i=t1(e);i.push({modified:!1,lengthBefore:void 0,lengthAfter:void 0});let n=t.dequeue();function s(h){if(h===void 0){const u=t.takeWhile(f=>!0)||[];return n&&u.unshift(n),u}const d=[];for(;n&&!xm(h);){const[u,f]=n.splitAt(h);d.push(u),h=iu(u.lengthAfter,h),n=f??t.dequeue()}return xm(h)||d.push(new mr(!1,h,h)),d}const r=[];function a(h,d,u){if(r.length>0&&ZT(r[r.length-1].endOffset,h)){const f=r[r.length-1];r[r.length-1]=new po(f.startOffset,d,gt(f.newLength,u))}else r.push({startOffset:h,endOffset:d,newLength:u})}let c=bi;for(const h of i){const d=s(h.lengthBefore);if(h.modified){const u=N5(d,g=>g.lengthBefore),f=gt(c,u);a(c,f,h.lengthAfter),c=f}else for(const u of d){const f=c;c=gt(c,u.lengthBefore),u.modified&&a(f,c,u.lengthAfter)}}return r}class mr{constructor(e,t,i){this.modified=e,this.lengthBefore=t,this.lengthAfter=i}splitAt(e){const t=iu(e,this.lengthAfter);return ZT(t,bi)?[this,void 0]:this.modified?[new mr(this.modified,this.lengthBefore,e),new mr(this.modified,bi,t)]:[new mr(this.modified,e,e),new mr(this.modified,t,t)]}toString(){return`${this.modified?"M":"U"}:${Ln(this.lengthBefore)} -> ${Ln(this.lengthAfter)}`}}function t1(o){const e=[];let t=bi;for(const i of o){const n=iu(t,i.startOffset);xm(n)||e.push(new mr(!1,n,n));const s=iu(i.startOffset,i.endOffset);e.push(new mr(!0,s,i.newLength)),t=i.endOffset}return e}class j5 extends l.Disposable{didLanguageChange(e){return this.brackets.didLanguageChange(e)}constructor(e,t){if(super(),this.textModel=e,this.getLanguageConfiguration=t,this.didChangeEmitter=this._register(new l.Emitter),this.denseKeyProvider=new XT,this.brackets=new WT(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,this.queuedTextEditsForInitialAstWithoutTokens=[],this.queuedTextEdits=[],e.tokenization.hasTokens)e.tokenization.backgroundTokenizationState===2?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens);else{const i=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),n=new B5(this.textModel.getValue(),i);this.initialAstWithoutTokens=xw(n,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}}handleDidChangeBackgroundTokenizationState(){if(this.textModel.tokenization.backgroundTokenizationState===2){const e=this.initialAstWithoutTokens===void 0;this.initialAstWithoutTokens=void 0,e||this.didChangeEmitter.fire()}}handleDidChangeTokens({ranges:e}){const t=e.map(i=>new po(ht(i.fromLineNumber-1,0),ht(i.toLineNumber,0),ht(i.toLineNumber-i.fromLineNumber+1,0)));this.handleEdits(t,!0),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(e){const t=po.fromModelContentChanges(e.changes);this.handleEdits(t,!1)}handleEdits(e,t){const i=Nm(this.queuedTextEdits,e);this.queuedTextEdits=i,this.initialAstWithoutTokens&&!t&&(this.queuedTextEditsForInitialAstWithoutTokens=Nm(this.queuedTextEditsForInitialAstWithoutTokens,e))}flushQueue(){this.queuedTextEdits.length>0&&(this.astWithTokens=this.parseDocumentFromTextBuffer(this.queuedTextEdits,this.astWithTokens,!1),this.queuedTextEdits=[]),this.queuedTextEditsForInitialAstWithoutTokens.length>0&&(this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(this.queuedTextEditsForInitialAstWithoutTokens,this.initialAstWithoutTokens,!1)),this.queuedTextEditsForInitialAstWithoutTokens=[])}parseDocumentFromTextBuffer(e,t,i){const n=t,s=new JT(this.textModel,this.brackets);return xw(s,e,n,i)}getBracketsInRange(e,t){this.flushQueue();const i=ht(e.startLineNumber-1,e.startColumn-1),n=ht(e.endLineNumber-1,e.endColumn-1);return new l.CallbackIterable(s=>{const r=this.initialAstWithoutTokens||this.astWithTokens;Ew(r,bi,r.length,i,n,s,0,0,new Map,t)})}getBracketPairsInRange(e,t){this.flushQueue();const i=Ic(e.getStartPosition()),n=Ic(e.getEndPosition());return new l.CallbackIterable(s=>{const r=this.initialAstWithoutTokens||this.astWithTokens,a=new q5(s,t,this.textModel);Iw(r,bi,r.length,i,n,a,0,new Map)})}getFirstBracketAfter(e){this.flushQueue();const t=this.initialAstWithoutTokens||this.astWithTokens;return n1(t,bi,t.length,Ic(e))}getFirstBracketBefore(e){this.flushQueue();const t=this.initialAstWithoutTokens||this.astWithTokens;return i1(t,bi,t.length,Ic(e))}}function i1(o,e,t,i){if(o.kind===4||o.kind===2){const n=[];for(const s of o.children)t=gt(e,s.length),n.push({nodeOffsetStart:e,nodeOffsetEnd:t}),e=t;for(let s=n.length-1;s>=0;s--){const{nodeOffsetStart:r,nodeOffsetEnd:a}=n[s];if(xc(r,i)){const c=i1(o.children[s],r,a,i);if(c)return c}}return null}else{if(o.kind===3)return null;if(o.kind===1){const n=Aa(e,t);return{bracketInfo:o.bracketInfo,range:n}}}return null}function n1(o,e,t,i){if(o.kind===4||o.kind===2){for(const n of o.children){if(t=gt(e,n.length),xc(i,t)){const s=n1(n,e,t,i);if(s)return s}e=t}return null}else{if(o.kind===3)return null;if(o.kind===1){const n=Aa(e,t);return{bracketInfo:o.bracketInfo,range:n}}}return null}function Ew(o,e,t,i,n,s,r,a,c,h,d=!1){if(r>200)return!0;e:for(;;)switch(o.kind){case 4:{const u=o.childrenLength;for(let f=0;f200)return!0;let c=!0;if(o.kind===2){let h=0;if(a){let f=a.get(o.openingBracket.text);f===void 0&&(f=0),h=f,f++,a.set(o.openingBracket.text,f)}const d=gt(e,o.openingBracket.length);let u=-1;if(s.includeMinIndentation&&(u=o.computeMinIndentation(e,s.textModel)),c=s.push(new x5(Aa(e,t),Aa(e,d),o.closingBracket?Aa(gt(d,o.child?.length||bi),t):void 0,r,h,o,u)),e=d,c&&o.child){const f=o.child;if(t=gt(e,f.length),Ec(e,n)&&nu(t,i)&&(c=Iw(f,e,t,i,n,s,r+1,a),!c))return!1}a?.set(o.openingBracket.text,h)}else{let h=e;for(const d of o.children){const u=h;if(h=gt(h,d.length),Ec(u,n)&&Ec(i,h)&&(c=Iw(d,u,h,i,n,s,r,a),!c))return!1}}return c}class Y5 extends l.Disposable{get canBuildAST(){return this.textModel.getValueLength()<=5e6}constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t,this.bracketPairsTree=this._register(new l.MutableDisposable),this.onDidChangeEmitter=this._register(new l.Emitter),this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1}handleLanguageConfigurationServiceChange(e){(!e.languageId||this.bracketPairsTree.value?.object.didLanguageChange(e.languageId))&&(this.bracketPairsTree.clear(),this.updateBracketPairsTree())}handleDidChangeOptions(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeLanguage(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeContent(e){this.bracketPairsTree.value?.object.handleContentChanged(e)}handleDidChangeBackgroundTokenizationState(){this.bracketPairsTree.value?.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(e){this.bracketPairsTree.value?.object.handleDidChangeTokens(e)}updateBracketPairsTree(){if(this.bracketsRequested&&this.canBuildAST){if(!this.bracketPairsTree.value){const e=new l.DisposableStore;this.bracketPairsTree.value=Z5(e.add(new j5(this.textModel,t=>this.languageConfigurationService.getLanguageConfiguration(t))),e),e.add(this.bracketPairsTree.value.object.onDidChange(t=>this.onDidChangeEmitter.fire(t))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire())}getBracketPairsInRange(e){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketPairsInRange(e,!1)||l.CallbackIterable.empty}getBracketPairsInRangeWithMinIndentation(e){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketPairsInRange(e,!0)||l.CallbackIterable.empty}getBracketsInRange(e,t=!1){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketsInRange(e,t)||l.CallbackIterable.empty}findMatchingBracketUp(e,t,i){const n=this.textModel.validatePosition(t),s=this.textModel.getLanguageIdAtPosition(n.lineNumber,n.column);if(this.canBuildAST){const r=this.languageConfigurationService.getLanguageConfiguration(s).bracketsNew.getClosingBracketInfo(e);if(!r)return null;const a=this.getBracketPairsInRange(l.Range.fromPositions(t,t)).findLast(c=>r.closes(c.openingBracketInfo));return a?a.openingBracketRange:null}else{const r=e.toLowerCase(),a=this.languageConfigurationService.getLanguageConfiguration(s).brackets;if(!a)return null;const c=a.textIsBracket[r];return c?Rm(this._findMatchingBracketUp(c,n,Tw(i))):null}}matchBracket(e,t){if(this.canBuildAST){const i=this.getBracketPairsInRange(l.Range.fromPositions(e,e)).filter(n=>n.closingBracketRange!==void 0&&(n.openingBracketRange.containsPosition(e)||n.closingBracketRange.containsPosition(e))).findLastMaxBy(l.compareBy(n=>n.openingBracketRange.containsPosition(e)?n.openingBracketRange:n.closingBracketRange,l.Range.compareRangesUsingStarts));return i?[i.openingBracketRange,i.closingBracketRange]:null}else{const i=Tw(t);return this._matchBracket(this.textModel.validatePosition(e),i)}}_establishBracketSearchOffsets(e,t,i,n){const s=t.getCount(),r=t.getLanguageId(n);let a=Math.max(0,e.column-1-i.maxBracketLength);for(let h=n-1;h>=0;h--){const d=t.getEndOffset(h);if(d<=a)break;if(fs(t.getStandardTokenType(h))||t.getLanguageId(h)!==r){a=d;break}}let c=Math.min(t.getLineContent().length,e.column-1+i.maxBracketLength);for(let h=n+1;h=c)break;if(fs(t.getStandardTokenType(h))||t.getLanguageId(h)!==r){c=d;break}}return{searchStartOffset:a,searchEndOffset:c}}_matchBracket(e,t){const i=e.lineNumber,n=this.textModel.tokenization.getLineTokens(i),s=this.textModel.getLineContent(i),r=n.findTokenIndexAtOffset(e.column-1);if(r<0)return null;const a=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId(r)).brackets;if(a&&!fs(n.getStandardTokenType(r))){let{searchStartOffset:c,searchEndOffset:h}=this._establishBracketSearchOffsets(e,n,a,r),d=null;for(;;){const u=Pn.findNextBracketInRange(a.forwardRegex,i,s,c,h);if(!u)break;if(u.startColumn<=e.column&&e.column<=u.endColumn){const f=s.substring(u.startColumn-1,u.endColumn-1).toLowerCase(),g=this._matchFoundBracket(u,a.textIsBracket[f],a.textIsOpenBracket[f],t);if(g){if(g instanceof _o)return null;d=g}}c=u.endColumn-1}if(d)return d}if(r>0&&n.getStartOffset(r)===e.column-1){const c=r-1,h=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId(c)).brackets;if(h&&!fs(n.getStandardTokenType(c))){const{searchStartOffset:d,searchEndOffset:u}=this._establishBracketSearchOffsets(e,n,h,c),f=Pn.findPrevBracketInRange(h.reversedRegex,i,s,d,u);if(f&&f.startColumn<=e.column&&e.column<=f.endColumn){const g=s.substring(f.startColumn-1,f.endColumn-1).toLowerCase(),m=this._matchFoundBracket(f,h.textIsBracket[g],h.textIsOpenBracket[g],t);if(m)return m instanceof _o?null:m}}}return null}_matchFoundBracket(e,t,i,n){if(!t)return null;const s=i?this._findMatchingBracketDown(t,e.getEndPosition(),n):this._findMatchingBracketUp(t,e.getStartPosition(),n);return s?s instanceof _o?s:[e,s]:null}_findMatchingBracketUp(e,t,i){const n=e.languageId,s=e.reversedRegex;let r=-1,a=0;const c=(h,d,u,f)=>{for(;;){if(i&&++a%100===0&&!i())return _o.INSTANCE;const g=Pn.findPrevBracketInRange(s,h,d,u,f);if(!g)break;const m=d.substring(g.startColumn-1,g.endColumn-1).toLowerCase();if(e.isOpen(m)?r++:e.isClose(m)&&r--,r===0)return g;f=g.startColumn-1}return null};for(let h=t.lineNumber;h>=1;h--){const d=this.textModel.tokenization.getLineTokens(h),u=d.getCount(),f=this.textModel.getLineContent(h);let g=u-1,m=f.length,p=f.length;h===t.lineNumber&&(g=d.findTokenIndexAtOffset(t.column-1),m=t.column-1,p=t.column-1);let b=!0;for(;g>=0;g--){const v=d.getLanguageId(g)===n&&!fs(d.getStandardTokenType(g));if(v)b?m=d.getStartOffset(g):(m=d.getStartOffset(g),p=d.getEndOffset(g));else if(b&&m!==p){const C=c(h,f,m,p);if(C)return C}b=v}if(b&&m!==p){const v=c(h,f,m,p);if(v)return v}}return null}_findMatchingBracketDown(e,t,i){const n=e.languageId,s=e.forwardRegex;let r=1,a=0;const c=(d,u,f,g)=>{for(;;){if(i&&++a%100===0&&!i())return _o.INSTANCE;const m=Pn.findNextBracketInRange(s,d,u,f,g);if(!m)break;const p=u.substring(m.startColumn-1,m.endColumn-1).toLowerCase();if(e.isOpen(p)?r++:e.isClose(p)&&r--,r===0)return m;f=m.endColumn-1}return null},h=this.textModel.getLineCount();for(let d=t.lineNumber;d<=h;d++){const u=this.textModel.tokenization.getLineTokens(d),f=u.getCount(),g=this.textModel.getLineContent(d);let m=0,p=0,b=0;d===t.lineNumber&&(m=u.findTokenIndexAtOffset(t.column-1),p=t.column-1,b=t.column-1);let v=!0;for(;m=1;r--){const a=this.textModel.tokenization.getLineTokens(r),c=a.getCount(),h=this.textModel.getLineContent(r);let d=c-1,u=h.length,f=h.length;if(r===t.lineNumber){d=a.findTokenIndexAtOffset(t.column-1),u=t.column-1,f=t.column-1;const m=a.getLanguageId(d);i!==m&&(i=m,n=this.languageConfigurationService.getLanguageConfiguration(i).brackets,s=this.languageConfigurationService.getLanguageConfiguration(i).bracketsNew)}let g=!0;for(;d>=0;d--){const m=a.getLanguageId(d);if(i!==m){if(n&&s&&g&&u!==f){const b=Pn.findPrevBracketInRange(n.reversedRegex,r,h,u,f);if(b)return this._toFoundBracket(s,b);g=!1}i=m,n=this.languageConfigurationService.getLanguageConfiguration(i).brackets,s=this.languageConfigurationService.getLanguageConfiguration(i).bracketsNew}const p=!!n&&!fs(a.getStandardTokenType(d));if(p)g?u=a.getStartOffset(d):(u=a.getStartOffset(d),f=a.getEndOffset(d));else if(s&&n&&g&&u!==f){const b=Pn.findPrevBracketInRange(n.reversedRegex,r,h,u,f);if(b)return this._toFoundBracket(s,b)}g=p}if(s&&n&&g&&u!==f){const m=Pn.findPrevBracketInRange(n.reversedRegex,r,h,u,f);if(m)return this._toFoundBracket(s,m)}}return null}findNextBracket(e){const t=this.textModel.validatePosition(e);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getFirstBracketAfter(t)||null;const i=this.textModel.getLineCount();let n=null,s=null,r=null;for(let a=t.lineNumber;a<=i;a++){const c=this.textModel.tokenization.getLineTokens(a),h=c.getCount(),d=this.textModel.getLineContent(a);let u=0,f=0,g=0;if(a===t.lineNumber){u=c.findTokenIndexAtOffset(t.column-1),f=t.column-1,g=t.column-1;const p=c.getLanguageId(u);n!==p&&(n=p,s=this.languageConfigurationService.getLanguageConfiguration(n).brackets,r=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew)}let m=!0;for(;up.closingBracketRange!==void 0&&p.range.strictContainsRange(g));return m?[m.openingBracketRange,m.closingBracketRange]:null}const n=Tw(t),s=this.textModel.getLineCount(),r=new Map;let a=[];const c=(g,m)=>{if(!r.has(g)){const p=[];for(let b=0,v=m?m.brackets.length:0;b{for(;;){if(n&&++h%100===0&&!n())return _o.INSTANCE;const C=Pn.findNextBracketInRange(g.forwardRegex,m,p,b,v);if(!C)break;const w=p.substring(C.startColumn-1,C.endColumn-1).toLowerCase(),S=g.textIsBracket[w];if(S&&(S.isOpen(w)?a[S.index]++:S.isClose(w)&&a[S.index]--,a[S.index]===-1))return this._matchFoundBracket(C,S,!1,n);b=C.endColumn-1}return null};let u=null,f=null;for(let g=i.lineNumber;g<=s;g++){const m=this.textModel.tokenization.getLineTokens(g),p=m.getCount(),b=this.textModel.getLineContent(g);let v=0,C=0,w=0;if(g===i.lineNumber){v=m.findTokenIndexAtOffset(i.column-1),C=i.column-1,w=i.column-1;const L=m.getLanguageId(v);u!==L&&(u=L,f=this.languageConfigurationService.getLanguageConfiguration(u).brackets,c(u,f))}let S=!0;for(;ve?.dispose()}}function Tw(o){if(typeof o>"u")return()=>!0;{const e=Date.now();return()=>Date.now()-e<=o}}const rb=class rb{constructor(){this._searchCanceledBrand=void 0}};rb.INSTANCE=new rb;let _o=rb;function Rm(o){return o instanceof _o?null:o}class Q5 extends l.Disposable{constructor(e){super(),this.textModel=e,this.colorProvider=new s1,this.onDidChangeEmitter=this._register(new l.Emitter),this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=e.getOptions().bracketPairColorizationOptions,this._register(e.bracketPairs.onDidChange(t=>{this.onDidChangeEmitter.fire()}))}handleDidChangeOptions(e){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(e,t,i,n,s){return s?[]:t===void 0?[]:this.colorizationOptions.enabled?this.textModel.bracketPairs.getBracketsInRange(e,!0).map(a=>({id:`bracket${a.range.toString()}-${a.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(a,this.colorizationOptions.independentColorPoolPerBracketType)},ownerId:0,range:a.range})).toArray():[]}getAllDecorations(e,t,i){return e===void 0?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new l.Range(1,1,this.textModel.getLineCount(),1),e,t,i):[]}}class s1{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(e,t){return e.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(t?e.nestingLevelOfEqualBracketType:e.nestingLevel)}getInlineClassNameOfLevel(e){return`bracket-highlighting-${e%30}`}}vs((o,e)=>{const t=[jI,qI,YI,ZI,QI,XI],i=new s1;e.addRule(`.monaco-editor .${i.unexpectedClosingBracketClassName} { color: ${o.getColor(m$)}; }`);const n=t.map(s=>o.getColor(s)).filter(s=>!!s).filter(s=>!s.isTransparent());for(let s=0;s<30;s++){const r=n[s%n.length];e.addRule(`.monaco-editor .${i.getInlineClassNameOfLevel(s)} { color: ${r}; }`)}});function Mm(o){return o.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}class Gt{get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}constructor(e,t,i,n){this.oldPosition=e,this.oldText=t,this.newPosition=i,this.newText=n}toString(){return this.oldText.length===0?`(insert@${this.oldPosition} "${Mm(this.newText)}")`:this.newText.length===0?`(delete@${this.oldPosition} "${Mm(this.oldText)}")`:`(replace@${this.oldPosition} "${Mm(this.oldText)}" with "${Mm(this.newText)}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,t,i){const n=t.length;l.writeUInt32BE(e,n,i),i+=4;for(let s=0;s0&&(this.changes=X5(this.changes,t)),this.afterEOL=i,this.afterVersionId=n,this.afterCursorState=s}static _writeSelectionsSize(e){return 4+16*(e?e.length:0)}static _writeSelections(e,t,i){if(l.writeUInt32BE(e,t?t.length:0,i),i+=4,t)for(const n of t)l.writeUInt32BE(e,n.selectionStartLineNumber,i),i+=4,l.writeUInt32BE(e,n.selectionStartColumn,i),i+=4,l.writeUInt32BE(e,n.positionLineNumber,i),i+=4,l.writeUInt32BE(e,n.positionColumn,i),i+=4;return i}static _readSelections(e,t,i){const n=l.readUInt32BE(e,t);t+=4;for(let s=0;st.toString()).join(", ")}matchesResource(e){return(l.URI.isUri(this.model)?this.model:this.model.uri).toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof Et}append(e,t,i,n,s){this._data instanceof Et&&this._data.append(e,t,i,n,s)}close(){this._data instanceof Et&&(this._data=this._data.serialize())}open(){this._data instanceof Et||(this._data=Et.deserialize(this._data))}undo(){if(l.URI.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof Et&&(this._data=this._data.serialize());const e=Et.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(l.URI.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof Et&&(this._data=this._data.serialize());const e=Et.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof Et&&(this._data=this._data.serialize()),this._data.byteLength+168}}class J5{get resources(){return this._editStackElementsArr.map(e=>e.resource)}constructor(e,t,i){this.label=e,this.code=t,this.type=1,this._isOpen=!0,this._editStackElementsArr=i.slice(0),this._editStackElementsMap=new Map;for(const n of this._editStackElementsArr){const s=Tc(n.resource);this._editStackElementsMap.set(s,n)}this._delegate=null}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){const t=Tc(e);return this._editStackElementsMap.has(t)}setModel(e){const t=Tc(l.URI.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;const t=Tc(e.uri);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).canAppend(e):!1}append(e,t,i,n,s){const r=Tc(e.uri);this._editStackElementsMap.get(r).append(e,t,i,n,s)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const e of this._editStackElementsArr)e.undo()}redo(){for(const e of this._editStackElementsArr)e.redo()}heapSize(e){const t=Tc(e);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).heapSize():0}split(){return this._editStackElementsArr}toString(){const e=[];for(const t of this._editStackElementsArr)e.push(`${dg(t.resource)}: ${t}`);return`{${e.join(", ")}}`}}function Nw(o){return o.getEOL()===` +`?0:1}function bo(o){return o?o instanceof o1||o instanceof J5:!1}class Rw{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);bo(e)&&e.close()}popStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);bo(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e,t){const i=this._undoRedoService.getLastElement(this._model.uri);if(bo(i)&&i.canAppend(this._model))return i;const n=new o1(l.localize(820,"Typing"),"undoredo.textBufferEdit",this._model,e);return this._undoRedoService.pushElement(n,t),n}pushEOL(e){const t=this._getOrCreateEditStackElement(null,void 0);this._model.setEOL(e),t.append(this._model,[],Nw(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,i,n,s=$i.unknown({name:"pushEditOperation"})){const r=this._getOrCreateEditStackElement(e,n),a=this._model.applyEdits(t,!0,s),c=Rw._computeCursorState(i,a),h=a.map((d,u)=>({index:u,textChange:d.textChange}));return h.sort((d,u)=>d.textChange.oldPosition===u.textChange.oldPosition?d.index-u.index:d.textChange.oldPosition-u.textChange.oldPosition),r.append(this._model,h.map(d=>d.textChange),Nw(this._model),this._model.getAlternativeVersionId(),c),c}static _computeCursorState(e,t){try{return e?e(t):null}catch(i){return l.onUnexpectedError(i),null}}}class W5{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function H5(o,e,t,i,n){n.spacesDiff=0,n.looksLikeAlignment=!1;let s;for(s=0;s0&&a>0||c>0&&h>0)return;const d=Math.abs(a-h),u=Math.abs(r-c);if(d===0){n.spacesDiff=u,u>0&&0<=c-1&&c-10?n++:S>1&&s++,H5(r,a,b,w,u),u.looksLikeAlignment&&!(t&&e===u.spacesDiff)))continue;const D=u.spacesDiff;D<=h&&d[D]++,r=b,a=w}let f=t;n!==s&&(f=n{const b=d[p];b>m&&(m=b,g=p)}),g===4&&d[4]>0&&d[2]>0&&d[2]>=d[4]*2/3&&(g=2)}return{insertSpaces:f,tabSize:g}}function Oi(o){return(o.metadata&1)>>>0}function qe(o,e){o.metadata=o.metadata&254|e<<0}function jt(o){return(o.metadata&2)>>>1===1}function Ue(o,e){o.metadata=o.metadata&253|(e?1:0)<<1}function a1(o){return(o.metadata&4)>>>2===1}function l1(o,e){o.metadata=o.metadata&251|(e?1:0)<<2}function c1(o){return(o.metadata&64)>>>6===1}function h1(o,e){o.metadata=o.metadata&191|(e?1:0)<<6}function d1(o){return(o.metadata&128)>>>7===1}function u1(o,e){o.metadata=o.metadata&127|(e?1:0)<<7}function eK(o){return(o.metadata&24)>>>3}function f1(o,e){o.metadata=o.metadata&231|e<<3}function tK(o){return(o.metadata&32)>>>5===1}function g1(o,e){o.metadata=o.metadata&223|(e?1:0)<<5}class m1{constructor(e,t,i){this.metadata=0,this.parent=this,this.left=this,this.right=this,qe(this,1),this.start=t,this.end=i,this.delta=0,this.maxEnd=i,this.id=e,this.ownerId=0,this.options=null,l1(this,!1),h1(this,!1),f1(this,1),g1(this,!1),u1(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=null,Ue(this,!1)}reset(e,t,i,n){this.start=t,this.end=i,this.maxEnd=i,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=n}setOptions(e){this.options=e;const t=this.options.className;l1(this,t==="squiggly-error"||t==="squiggly-warning"||t==="squiggly-info"),h1(this,this.options.glyphMarginClassName!==null),f1(this,this.options.stickiness),g1(this,this.options.collapseOnReplaceEdit),u1(this,this.options.affectsFont??!1)}setCachedOffsets(e,t,i){this.cachedVersionId!==i&&(this.range=null),this.cachedVersionId=i,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t}detach(){this.parent=null,this.left=null,this.right=null}}const ue=new m1(null,0,0);ue.parent=ue,ue.left=ue,ue.right=ue,qe(ue,0);class Mw{constructor(){this.root=ue,this.requestNormalizeDelta=!1}intervalSearch(e,t,i,n,s,r,a){return this.root===ue?[]:cK(this,e,t,i,n,s,r,a)}search(e,t,i,n,s){return this.root===ue?[]:lK(this,e,t,i,n,s)}collectNodesFromOwner(e){return rK(this,e)}collectNodesPostOrder(){return aK(this)}insert(e){p1(this,e),this._normalizeDeltaIfNecessary()}delete(e){_1(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,t){const i=e;let n=0;for(;e!==this.root;)e===e.parent.right&&(n+=e.parent.delta),e=e.parent;const s=i.start+n,r=i.end+n;i.setCachedOffsets(s,r,t)}acceptReplace(e,t,i,n){const s=sK(this,e,e+t);for(let r=0,a=s.length;rt||i===1?!1:i===2?!0:e}function nK(o,e,t,i,n){const s=eK(o),r=s===0||s===2,a=s===1||s===2,c=t-e,h=i,d=Math.min(c,h),u=o.start;let f=!1;const g=o.end;let m=!1;e<=u&&g<=t&&tK(o)&&(o.start=e,f=!0,o.end=e,m=!0);{const b=n?1:c>0?2:0;!f&&Nc(u,r,e,b)&&(f=!0),!m&&Nc(g,a,e,b)&&(m=!0)}if(d>0&&!n){const b=c>h?2:0;!f&&Nc(u,r,e+d,b)&&(f=!0),!m&&Nc(g,a,e+d,b)&&(m=!0)}{const b=n?1:0;!f&&Nc(u,r,t,b)&&(o.start=e+h,f=!0),!m&&Nc(g,a,t,b)&&(o.end=e+h,m=!0)}const p=h-c;f||(o.start=Math.max(0,u+p)),m||(o.end=Math.max(0,g+p)),o.start>o.end&&(o.end=o.start)}function sK(o,e,t){let i=o.root,n=0,s=0,r=0,a=0;const c=[];let h=0;for(;i!==ue;){if(jt(i)){Ue(i.left,!1),Ue(i.right,!1),i===i.parent.right&&(n-=i.parent.delta),i=i.parent;continue}if(!jt(i.left)){if(s=n+i.maxEnd,st){Ue(i,!0);continue}if(a=n+i.end,a>=e&&(i.setCachedOffsets(r,a,0),c[h++]=i),Ue(i,!0),i.right!==ue&&!jt(i.right)){n+=i.delta,i=i.right;continue}}return Ue(o.root,!1),c}function oK(o,e,t,i){let n=o.root,s=0,r=0,a=0;const c=i-(t-e);for(;n!==ue;){if(jt(n)){Ue(n.left,!1),Ue(n.right,!1),n===n.parent.right&&(s-=n.parent.delta),pr(n),n=n.parent;continue}if(!jt(n.left)){if(r=s+n.maxEnd,rt){n.start+=c,n.end+=c,n.delta+=c,(n.delta<-1073741824||n.delta>1073741824)&&(o.requestNormalizeDelta=!0),Ue(n,!0);continue}if(Ue(n,!0),n.right!==ue&&!jt(n.right)){s+=n.delta,n=n.right;continue}}Ue(o.root,!1)}function rK(o,e){let t=o.root;const i=[];let n=0;for(;t!==ue;){if(jt(t)){Ue(t.left,!1),Ue(t.right,!1),t=t.parent;continue}if(t.left!==ue&&!jt(t.left)){t=t.left;continue}if(t.ownerId===e&&(i[n++]=t),Ue(t,!0),t.right!==ue&&!jt(t.right)){t=t.right;continue}}return Ue(o.root,!1),i}function aK(o){let e=o.root;const t=[];let i=0;for(;e!==ue;){if(jt(e)){Ue(e.left,!1),Ue(e.right,!1),e=e.parent;continue}if(e.left!==ue&&!jt(e.left)){e=e.left;continue}if(e.right!==ue&&!jt(e.right)){e=e.right;continue}t[i++]=e,Ue(e,!0)}return Ue(o.root,!1),t}function lK(o,e,t,i,n,s){let r=o.root,a=0,c=0,h=0;const d=[];let u=0;for(;r!==ue;){if(jt(r)){Ue(r.left,!1),Ue(r.right,!1),r===r.parent.right&&(a-=r.parent.delta),r=r.parent;continue}if(r.left!==ue&&!jt(r.left)){r=r.left;continue}c=a+r.start,h=a+r.end,r.setCachedOffsets(c,h,n);let f=!0;if(e&&r.ownerId&&r.ownerId!==e&&(f=!1),t&&a1(r)&&(f=!1),i&&d1(r)&&(f=!1),s&&!c1(r)&&(f=!1),f&&(d[u++]=r),Ue(r,!0),r.right!==ue&&!jt(r.right)){a+=r.delta,r=r.right;continue}}return Ue(o.root,!1),d}function cK(o,e,t,i,n,s,r,a){let c=o.root,h=0,d=0,u=0,f=0;const g=[];let m=0;for(;c!==ue;){if(jt(c)){Ue(c.left,!1),Ue(c.right,!1),c===c.parent.right&&(h-=c.parent.delta),c=c.parent;continue}if(!jt(c.left)){if(d=h+c.maxEnd,dt){Ue(c,!0);continue}if(f=h+c.end,f>=e){c.setCachedOffsets(u,f,r);let p=!0;i&&c.ownerId&&c.ownerId!==i&&(p=!1),n&&a1(c)&&(p=!1),s&&d1(c)&&(p=!1),a&&!c1(c)&&(p=!1),p&&(g[m++]=c)}if(Ue(c,!0),c.right!==ue&&!jt(c.right)){h+=c.delta,c=c.right;continue}}return Ue(o.root,!1),g}function p1(o,e){if(o.root===ue)return e.parent=ue,e.left=ue,e.right=ue,qe(e,0),o.root=e,o.root;hK(o,e),_r(e.parent);let t=e;for(;t!==o.root&&Oi(t.parent)===1;)if(t.parent===t.parent.parent.left){const i=t.parent.parent.right;Oi(i)===1?(qe(t.parent,0),qe(i,0),qe(t.parent.parent,1),t=t.parent.parent):(t===t.parent.right&&(t=t.parent,au(o,t)),qe(t.parent,0),qe(t.parent.parent,1),lu(o,t.parent.parent))}else{const i=t.parent.parent.left;Oi(i)===1?(qe(t.parent,0),qe(i,0),qe(t.parent.parent,1),t=t.parent.parent):(t===t.parent.left&&(t=t.parent,lu(o,t)),qe(t.parent,0),qe(t.parent.parent,1),au(o,t.parent.parent))}return qe(o.root,0),e}function hK(o,e){let t=0,i=o.root;const n=e.start,s=e.end;for(;;)if(uK(n,s,i.start+t,i.end+t)<0)if(i.left===ue){e.start-=t,e.end-=t,e.maxEnd-=t,i.left=e;break}else i=i.left;else if(i.right===ue){e.start-=t+i.delta,e.end-=t+i.delta,e.maxEnd-=t+i.delta,i.right=e;break}else t+=i.delta,i=i.right;e.parent=i,e.left=ue,e.right=ue,qe(e,1)}function _1(o,e){let t,i;if(e.left===ue?(t=e.right,i=e,t.delta+=e.delta,(t.delta<-1073741824||t.delta>1073741824)&&(o.requestNormalizeDelta=!0),t.start+=e.delta,t.end+=e.delta):e.right===ue?(t=e.left,i=e):(i=dK(e.right),t=i.right,t.start+=i.delta,t.end+=i.delta,t.delta+=i.delta,(t.delta<-1073741824||t.delta>1073741824)&&(o.requestNormalizeDelta=!0),i.start+=e.delta,i.end+=e.delta,i.delta=e.delta,(i.delta<-1073741824||i.delta>1073741824)&&(o.requestNormalizeDelta=!0)),i===o.root){o.root=t,qe(t,0),e.detach(),Aw(),pr(t),o.root.parent=ue;return}const n=Oi(i)===1;if(i===i.parent.left?i.parent.left=t:i.parent.right=t,i===e?t.parent=i.parent:(i.parent===e?t.parent=i:t.parent=i.parent,i.left=e.left,i.right=e.right,i.parent=e.parent,qe(i,Oi(e)),e===o.root?o.root=i:e===e.parent.left?e.parent.left=i:e.parent.right=i,i.left!==ue&&(i.left.parent=i),i.right!==ue&&(i.right.parent=i)),e.detach(),n){_r(t.parent),i!==e&&(_r(i),_r(i.parent)),Aw();return}_r(t),_r(t.parent),i!==e&&(_r(i),_r(i.parent));let s;for(;t!==o.root&&Oi(t)===0;)t===t.parent.left?(s=t.parent.right,Oi(s)===1&&(qe(s,0),qe(t.parent,1),au(o,t.parent),s=t.parent.right),Oi(s.left)===0&&Oi(s.right)===0?(qe(s,1),t=t.parent):(Oi(s.right)===0&&(qe(s.left,0),qe(s,1),lu(o,s),s=t.parent.right),qe(s,Oi(t.parent)),qe(t.parent,0),qe(s.right,0),au(o,t.parent),t=o.root)):(s=t.parent.left,Oi(s)===1&&(qe(s,0),qe(t.parent,1),lu(o,t.parent),s=t.parent.left),Oi(s.left)===0&&Oi(s.right)===0?(qe(s,1),t=t.parent):(Oi(s.left)===0&&(qe(s.right,0),qe(s,1),au(o,s),s=t.parent.left),qe(s,Oi(t.parent)),qe(t.parent,0),qe(s.left,0),lu(o,t.parent),t=o.root));qe(t,0),Aw()}function dK(o){for(;o.left!==ue;)o=o.left;return o}function Aw(){ue.parent=ue,ue.delta=0,ue.start=0,ue.end=0}function au(o,e){const t=e.right;t.delta+=e.delta,(t.delta<-1073741824||t.delta>1073741824)&&(o.requestNormalizeDelta=!0),t.start+=e.delta,t.end+=e.delta,e.right=t.left,t.left!==ue&&(t.left.parent=e),t.parent=e.parent,e.parent===ue?o.root=t:e===e.parent.left?e.parent.left=t:e.parent.right=t,t.left=e,e.parent=t,pr(e),pr(t)}function lu(o,e){const t=e.left;e.delta-=t.delta,(e.delta<-1073741824||e.delta>1073741824)&&(o.requestNormalizeDelta=!0),e.start-=t.delta,e.end-=t.delta,e.left=t.right,t.right!==ue&&(t.right.parent=e),t.parent=e.parent,e.parent===ue?o.root=t:e===e.parent.right?e.parent.right=t:e.parent.left=t,t.right=e,e.parent=t,pr(e),pr(t)}function b1(o){let e=o.end;if(o.left!==ue){const t=o.left.maxEnd;t>e&&(e=t)}if(o.right!==ue){const t=o.right.maxEnd+o.delta;t>e&&(e=t)}return e}function pr(o){o.maxEnd=b1(o)}function _r(o){for(;o!==ue;){const e=b1(o);if(o.maxEnd===e)return;o.maxEnd=e,o=o.parent}}function uK(o,e,t,i){return o===t?e-i:o-t}class Ow{constructor(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==ie)return Pw(this.right);let e=this;for(;e.parent!==ie&&e.parent.left!==e;)e=e.parent;return e.parent===ie?ie:e.parent}prev(){if(this.left!==ie)return C1(this.left);let e=this;for(;e.parent!==ie&&e.parent.right!==e;)e=e.parent;return e.parent===ie?ie:e.parent}detach(){this.parent=null,this.left=null,this.right=null}}const ie=new Ow(null,0);ie.parent=ie,ie.left=ie,ie.right=ie,ie.color=0;function Pw(o){for(;o.left!==ie;)o=o.left;return o}function C1(o){for(;o.right!==ie;)o=o.right;return o}function kw(o){return o===ie?0:o.size_left+o.piece.length+kw(o.right)}function Fw(o){return o===ie?0:o.lf_left+o.piece.lineFeedCnt+Fw(o.right)}function Bw(){ie.parent=ie}function cu(o,e){const t=e.right;t.size_left+=e.size_left+(e.piece?e.piece.length:0),t.lf_left+=e.lf_left+(e.piece?e.piece.lineFeedCnt:0),e.right=t.left,t.left!==ie&&(t.left.parent=e),t.parent=e.parent,e.parent===ie?o.root=t:e.parent.left===e?e.parent.left=t:e.parent.right=t,t.left=e,e.parent=t}function hu(o,e){const t=e.left;e.left=t.right,t.right!==ie&&(t.right.parent=e),t.parent=e.parent,e.size_left-=t.size_left+(t.piece?t.piece.length:0),e.lf_left-=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),e.parent===ie?o.root=t:e===e.parent.right?e.parent.right=t:e.parent.left=t,t.right=e,e.parent=t}function Am(o,e){let t,i;if(e.left===ie?(i=e,t=i.right):e.right===ie?(i=e,t=i.left):(i=Pw(e.right),t=i.right),i===o.root){o.root=t,t.color=0,e.detach(),Bw(),o.root.parent=ie;return}const n=i.color===1;if(i===i.parent.left?i.parent.left=t:i.parent.right=t,i===e?(t.parent=i.parent,du(o,t)):(i.parent===e?t.parent=i:t.parent=i.parent,du(o,t),i.left=e.left,i.right=e.right,i.parent=e.parent,i.color=e.color,e===o.root?o.root=i:e===e.parent.left?e.parent.left=i:e.parent.right=i,i.left!==ie&&(i.left.parent=i),i.right!==ie&&(i.right.parent=i),i.size_left=e.size_left,i.lf_left=e.lf_left,du(o,i)),e.detach(),t.parent.left===t){const r=kw(t),a=Fw(t);if(r!==t.parent.size_left||a!==t.parent.lf_left){const c=r-t.parent.size_left,h=a-t.parent.lf_left;t.parent.size_left=r,t.parent.lf_left=a,Co(o,t.parent,c,h)}}if(du(o,t.parent),n){Bw();return}let s;for(;t!==o.root&&t.color===0;)t===t.parent.left?(s=t.parent.right,s.color===1&&(s.color=0,t.parent.color=1,cu(o,t.parent),s=t.parent.right),s.left.color===0&&s.right.color===0?(s.color=1,t=t.parent):(s.right.color===0&&(s.left.color=0,s.color=1,hu(o,s),s=t.parent.right),s.color=t.parent.color,t.parent.color=0,s.right.color=0,cu(o,t.parent),t=o.root)):(s=t.parent.left,s.color===1&&(s.color=0,t.parent.color=1,hu(o,t.parent),s=t.parent.left),s.left.color===0&&s.right.color===0?(s.color=1,t=t.parent):(s.left.color===0&&(s.right.color=0,s.color=1,cu(o,s),s=t.parent.left),s.color=t.parent.color,t.parent.color=0,s.left.color=0,hu(o,t.parent),t=o.root));t.color=0,Bw()}function v1(o,e){for(du(o,e);e!==o.root&&e.parent.color===1;)if(e.parent===e.parent.parent.left){const t=e.parent.parent.right;t.color===1?(e.parent.color=0,t.color=0,e.parent.parent.color=1,e=e.parent.parent):(e===e.parent.right&&(e=e.parent,cu(o,e)),e.parent.color=0,e.parent.parent.color=1,hu(o,e.parent.parent))}else{const t=e.parent.parent.left;t.color===1?(e.parent.color=0,t.color=0,e.parent.parent.color=1,e=e.parent.parent):(e===e.parent.left&&(e=e.parent,hu(o,e)),e.parent.color=0,e.parent.parent.color=1,cu(o,e.parent.parent))}o.root.color=0}function Co(o,e,t,i){for(;e!==o.root&&e!==ie;)e.parent.left===e&&(e.parent.size_left+=t,e.parent.lf_left+=i),e=e.parent}function du(o,e){let t=0,i=0;if(e!==o.root){for(;e!==o.root&&e===e.parent.right;)e=e.parent;if(e!==o.root)for(e=e.parent,t=kw(e.left)-e.size_left,i=Fw(e.left)-e.lf_left,e.size_left+=t,e.lf_left+=i;e!==o.root&&(t!==0||i!==0);)e.parent.left===e&&(e.parent.size_left+=t,e.parent.lf_left+=i),e=e.parent}}const vo=65535;function w1(o){let e;return o[o.length-1]<65536?e=new Uint16Array(o.length):e=new Uint32Array(o.length),e.set(o,0),e}class fK{constructor(e,t,i,n,s){this.lineStarts=e,this.cr=t,this.lf=i,this.crlf=n,this.isBasicASCII=s}}function wo(o,e=!0){const t=[0];let i=1;for(let n=0,s=o.length;n126)&&(r=!1)}const a=new fK(w1(o),i,n,s,r);return o.length=0,a}class Gi{constructor(e,t,i,n,s){this.bufferIndex=e,this.start=t,this.end=i,this.lineFeedCnt=n,this.length=s}}class Pa{constructor(e,t){this.buffer=e,this.lineStarts=t}}class mK{constructor(e,t){this._pieces=[],this._tree=e,this._BOM=t,this._index=0,e.root!==ie&&e.iterate(e.root,i=>(i!==ie&&this._pieces.push(i.piece),!0))}read(){return this._pieces.length===0?this._index===0?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:this._index===0?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class pK{constructor(e){this._limit=e,this._cache=[]}get(e){for(let t=this._cache.length-1;t>=0;t--){const i=this._cache[t];if(i.nodeStartOffset<=e&&i.nodeStartOffset+i.node.piece.length>=e)return i}return null}get2(e){for(let t=this._cache.length-1;t>=0;t--){const i=this._cache[t];if(i.nodeStartLineNumber&&i.nodeStartLineNumber=e)return i}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let t=!1;const i=this._cache;for(let n=0;n=e){i[n]=null,t=!0;continue}}if(t){const n=[];for(const s of i)s!==null&&n.push(s);this._cache=n}}}class _K{constructor(e,t,i){this.create(e,t,i)}create(e,t,i){this._buffers=[new Pa("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=ie,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=i;let n=null;for(let s=0,r=e.length;s0){e[s].lineStarts||(e[s].lineStarts=wo(e[s].buffer));const a=new Gi(s+1,{line:0,column:0},{line:e[s].lineStarts.length-1,column:e[s].buffer.length-e[s].lineStarts[e[s].lineStarts.length-1]},e[s].lineStarts.length-1,e[s].buffer.length);this._buffers.push(e[s]),n=this.rbInsertRight(n,a)}this._searchCache=new pK(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){const t=vo,i=t-Math.floor(t/3),n=i*2;let s="",r=0;const a=[];if(this.iterate(this.root,c=>{const h=this.getNodeContent(c),d=h.length;if(r<=i||r+d0){const c=s.replace(/\r\n|\r|\n/g,e);a.push(new Pa(c,wo(c)))}this.create(a,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new mK(this,e)}getOffsetAt(e,t){let i=0,n=this.root;for(;n!==ie;)if(n.left!==ie&&n.lf_left+1>=e)n=n.left;else if(n.lf_left+n.piece.lineFeedCnt+1>=e){i+=n.size_left;const s=this.getAccumulatedValue(n,e-n.lf_left-2);return i+=s+t-1}else e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right;return i}getPositionAt(e){e=Math.floor(e),e=Math.max(0,e);let t=this.root,i=0;const n=e;for(;t!==ie;)if(t.size_left!==0&&t.size_left>=e)t=t.left;else if(t.size_left+t.piece.length>=e){const s=this.getIndexOf(t,e-t.size_left);if(i+=t.lf_left+s.index,s.index===0){const r=this.getOffsetAt(i+1,1),a=n-r;return new l.Position(i+1,a+1)}return new l.Position(i+1,s.remainder+1)}else if(e-=t.size_left+t.piece.length,i+=t.lf_left+t.piece.lineFeedCnt,t.right===ie){const s=this.getOffsetAt(i+1,1),r=n-e-s;return new l.Position(i+1,r+1)}else t=t.right;return new l.Position(1,1)}getValueInRange(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";const i=this.nodeAt2(e.startLineNumber,e.startColumn),n=this.nodeAt2(e.endLineNumber,e.endColumn),s=this.getValueInRange2(i,n);return t?t!==this._EOL||!this._EOLNormalized?s.replace(/\r\n|\r|\n/g,t):t===this.getEOL()&&this._EOLNormalized?s:s.replace(/\r\n|\r|\n/g,t):s}getValueInRange2(e,t){if(e.node===t.node){const a=e.node,c=this._buffers[a.piece.bufferIndex].buffer,h=this.offsetInBuffer(a.piece.bufferIndex,a.piece.start);return c.substring(h+e.remainder,h+t.remainder)}let i=e.node;const n=this._buffers[i.piece.bufferIndex].buffer,s=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);let r=n.substring(s+e.remainder,s+i.piece.length);for(i=i.next();i!==ie;){const a=this._buffers[i.piece.bufferIndex].buffer,c=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(i===t.node){r+=a.substring(c,c+t.remainder);break}else r+=a.substr(c,i.piece.length);i=i.next()}return r}getLinesContent(){const e=[];let t=0,i="",n=!1;return this.iterate(this.root,s=>{if(s===ie)return!0;const r=s.piece;let a=r.length;if(a===0)return!0;const c=this._buffers[r.bufferIndex].buffer,h=this._buffers[r.bufferIndex].lineStarts,d=r.start.line,u=r.end.line;let f=h[d]+r.start.column;if(n&&(c.charCodeAt(f)===10&&(f++,a--),e[t++]=i,i="",n=!1,a===0))return!0;if(d===u)return!this._EOLNormalized&&c.charCodeAt(f+a-1)===13?(n=!0,i+=c.substr(f,a-1)):i+=c.substr(f,a),!0;i+=this._EOLNormalized?c.substring(f,Math.max(f,h[d+1]-this._EOLLength)):c.substring(f,h[d+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=i;for(let g=d+1;gS+m,t.reset(0)):(C=f.buffer,w=S=>S,t.reset(m));do if(b=t.next(C),b){if(w(b.index)>=p)return d;this.positionInBuffer(e,w(b.index)-g,v);const S=this.getLineFeedCnt(e.piece.bufferIndex,s,v),L=v.line===s.line?v.column-s.column+n:v.column+1,D=L+b[0].length;if(u[d++]=l.createFindMatch(new l.Range(i+S,L,i+S,D),b,c),w(b.index)+b[0].length>=p||d>=h)return d}while(b);return d}findMatchesLineByLine(e,t,i,n){const s=[];let r=0;const a=new l.Searcher(t.wordSeparators,t.regex);let c=this.nodeAt2(e.startLineNumber,e.startColumn);if(c===null)return[];const h=this.nodeAt2(e.endLineNumber,e.endColumn);if(h===null)return[];let d=this.positionInBuffer(c.node,c.remainder);const u=this.positionInBuffer(h.node,h.remainder);if(c.node===h.node)return this.findMatchesInNode(c.node,a,e.startLineNumber,e.startColumn,d,u,t,i,n,r,s),s;let f=e.startLineNumber,g=c.node;for(;g!==h.node;){const p=this.getLineFeedCnt(g.piece.bufferIndex,d,g.piece.end);if(p>=1){const v=this._buffers[g.piece.bufferIndex].lineStarts,C=this.offsetInBuffer(g.piece.bufferIndex,g.piece.start),w=v[d.line+p],S=f===e.startLineNumber?e.startColumn:1;if(r=this.findMatchesInNode(g,a,f,S,d,this.positionInBuffer(g,w-C),t,i,n,r,s),r>=n)return s;f+=p}const b=f===e.startLineNumber?e.startColumn-1:0;if(f===e.endLineNumber){const v=this.getLineContent(f).substring(b,e.endColumn-1);return r=this._findMatchesInLine(t,a,v,e.endLineNumber,b,r,s,i,n),s}if(r=this._findMatchesInLine(t,a,this.getLineContent(f).substr(b),f,b,r,s,i,n),r>=n)return s;f++,c=this.nodeAt2(f,1),g=c.node,d=this.positionInBuffer(c.node,c.remainder)}if(f===e.endLineNumber){const p=f===e.startLineNumber?e.startColumn-1:0,b=this.getLineContent(f).substring(p,e.endColumn-1);return r=this._findMatchesInLine(t,a,b,e.endLineNumber,p,r,s,i,n),s}const m=f===e.startLineNumber?e.startColumn:1;return r=this.findMatchesInNode(h.node,a,f,m,d,u,t,i,n,r,s),s}_findMatchesInLine(e,t,i,n,s,r,a,c,h){const d=e.wordSeparators;if(!c&&e.simpleSearch){const f=e.simpleSearch,g=f.length,m=i.length;let p=-g;for(;(p=i.indexOf(f,p+g))!==-1;)if((!d||l.isValidMatch(d,i,m,p,g))&&(a[r++]=new l.FindMatch(new l.Range(n,p+1+s,n,p+1+g+s),null),r>=h))return r;return r}let u;t.reset(0);do if(u=t.next(i),u&&(a[r++]=l.createFindMatch(new l.Range(n,u.index+1+s,n,u.index+1+u[0].length+s),u,c),r>=h))return r;while(u);return r}insert(e,t,i=!1){if(this._EOLNormalized=this._EOLNormalized&&i,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==ie){const{node:n,remainder:s,nodeStartOffset:r}=this.nodeAt(e),a=n.piece,c=a.bufferIndex,h=this.positionInBuffer(n,s);if(n.piece.bufferIndex===0&&a.end.line===this._lastChangeBufferPos.line&&a.end.column===this._lastChangeBufferPos.column&&r+a.length===e&&t.lengthe){const d=[];let u=new Gi(a.bufferIndex,h,a.end,this.getLineFeedCnt(a.bufferIndex,h,a.end),this.offsetInBuffer(c,a.end)-this.offsetInBuffer(c,h));if(this.shouldCheckCRLF()&&this.endWithCR(t)&&this.nodeCharCodeAt(n,s)===10){const p={line:u.start.line+1,column:0};u=new Gi(u.bufferIndex,p,u.end,this.getLineFeedCnt(u.bufferIndex,p,u.end),u.length-1),t+=` +`}if(this.shouldCheckCRLF()&&this.startWithLF(t))if(this.nodeCharCodeAt(n,s-1)===13){const p=this.positionInBuffer(n,s-1);this.deleteNodeTail(n,p),t="\r"+t,n.piece.length===0&&d.push(n)}else this.deleteNodeTail(n,h);else this.deleteNodeTail(n,h);const f=this.createNewPieces(t);u.length>0&&this.rbInsertRight(n,u);let g=n;for(let m=0;m=0;r--)s=this.rbInsertLeft(s,n[r]);this.validateCRLFWithPrevNode(s),this.deleteNodes(i)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+=` +`);const i=this.createNewPieces(e),n=this.rbInsertRight(t,i[0]);let s=n;for(let r=1;r=f)h=u+1;else break;return i?(i.line=u,i.column=c-g,null):{line:u,column:c-g}}getLineFeedCnt(e,t,i){if(i.column===0)return i.line-t.line;const n=this._buffers[e].lineStarts;if(i.line===n.length-1)return i.line-t.line;const s=n[i.line+1],r=n[i.line]+i.column;if(s>r+1)return i.line-t.line;const a=r-1;return this._buffers[e].buffer.charCodeAt(a)===13?i.line-t.line+1:i.line-t.line}offsetInBuffer(e,t){return this._buffers[e].lineStarts[t.line]+t.column}deleteNodes(e){for(let t=0;tvo){const d=[];for(;e.length>vo;){const f=e.charCodeAt(vo-1);let g;f===13||f>=55296&&f<=56319?(g=e.substring(0,vo-1),e=e.substring(vo-1)):(g=e.substring(0,vo),e=e.substring(vo));const m=wo(g);d.push(new Gi(this._buffers.length,{line:0,column:0},{line:m.length-1,column:g.length-m[m.length-1]},m.length-1,g.length)),this._buffers.push(new Pa(g,m))}const u=wo(e);return d.push(new Gi(this._buffers.length,{line:0,column:0},{line:u.length-1,column:e.length-u[u.length-1]},u.length-1,e.length)),this._buffers.push(new Pa(e,u)),d}let t=this._buffers[0].buffer.length;const i=wo(e,!1);let n=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===t&&t!==0&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},n=this._lastChangeBufferPos;for(let d=0;d=e-1)i=i.left;else if(i.lf_left+i.piece.lineFeedCnt>e-1){const c=this.getAccumulatedValue(i,e-i.lf_left-2),h=this.getAccumulatedValue(i,e-i.lf_left-1),d=this._buffers[i.piece.bufferIndex].buffer,u=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return r+=i.size_left,this._searchCache.set({node:i,nodeStartOffset:r,nodeStartLineNumber:a-(e-1-i.lf_left)}),d.substring(u+c,u+h-t)}else if(i.lf_left+i.piece.lineFeedCnt===e-1){const c=this.getAccumulatedValue(i,e-i.lf_left-2),h=this._buffers[i.piece.bufferIndex].buffer,d=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n=h.substring(d+c,d+i.piece.length);break}else e-=i.lf_left+i.piece.lineFeedCnt,r+=i.size_left+i.piece.length,i=i.right}for(i=i.next();i!==ie;){const r=this._buffers[i.piece.bufferIndex].buffer;if(i.piece.lineFeedCnt>0){const a=this.getAccumulatedValue(i,0),c=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n+=r.substring(c,c+a-t),n}else{const a=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n+=r.substr(a,i.piece.length)}i=i.next()}return n}computeBufferMetadata(){let e=this.root,t=1,i=0;for(;e!==ie;)t+=e.lf_left+e.piece.lineFeedCnt,i+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=i,this._searchCache.validate(this._length)}getIndexOf(e,t){const i=e.piece,n=this.positionInBuffer(e,t),s=n.line-i.start.line;if(this.offsetInBuffer(i.bufferIndex,i.end)-this.offsetInBuffer(i.bufferIndex,i.start)===t){const r=this.getLineFeedCnt(e.piece.bufferIndex,i.start,n);if(r!==s)return{index:r,remainder:0}}return{index:s,remainder:n.column}}getAccumulatedValue(e,t){if(t<0)return 0;const i=e.piece,n=this._buffers[i.bufferIndex].lineStarts,s=i.start.line+t+1;return s>i.end.line?n[i.end.line]+i.end.column-n[i.start.line]-i.start.column:n[s]-n[i.start.line]-i.start.column}deleteNodeTail(e,t){const i=e.piece,n=i.lineFeedCnt,s=this.offsetInBuffer(i.bufferIndex,i.end),r=t,a=this.offsetInBuffer(i.bufferIndex,r),c=this.getLineFeedCnt(i.bufferIndex,i.start,r),h=c-n,d=a-s,u=i.length+d;e.piece=new Gi(i.bufferIndex,i.start,r,c,u),Co(this,e,d,h)}deleteNodeHead(e,t){const i=e.piece,n=i.lineFeedCnt,s=this.offsetInBuffer(i.bufferIndex,i.start),r=t,a=this.getLineFeedCnt(i.bufferIndex,r,i.end),c=this.offsetInBuffer(i.bufferIndex,r),h=a-n,d=s-c,u=i.length+d;e.piece=new Gi(i.bufferIndex,r,i.end,a,u),Co(this,e,d,h)}shrinkNode(e,t,i){const n=e.piece,s=n.start,r=n.end,a=n.length,c=n.lineFeedCnt,h=t,d=this.getLineFeedCnt(n.bufferIndex,n.start,h),u=this.offsetInBuffer(n.bufferIndex,t)-this.offsetInBuffer(n.bufferIndex,s);e.piece=new Gi(n.bufferIndex,n.start,h,d,u),Co(this,e,u-a,d-c);const f=new Gi(n.bufferIndex,i,r,this.getLineFeedCnt(n.bufferIndex,i,r),this.offsetInBuffer(n.bufferIndex,r)-this.offsetInBuffer(n.bufferIndex,i)),g=this.rbInsertRight(e,f);this.validateCRLFWithPrevNode(g)}appendToNode(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+=` +`);const i=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),n=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;const s=wo(t,!1);for(let g=0;ge)t=t.left;else if(t.size_left+t.piece.length>=e){n+=t.size_left;const s={node:t,remainder:e-t.size_left,nodeStartOffset:n};return this._searchCache.set(s),s}else e-=t.size_left+t.piece.length,n+=t.size_left+t.piece.length,t=t.right;return null}nodeAt2(e,t){let i=this.root,n=0;for(;i!==ie;)if(i.left!==ie&&i.lf_left>=e-1)i=i.left;else if(i.lf_left+i.piece.lineFeedCnt>e-1){const s=this.getAccumulatedValue(i,e-i.lf_left-2),r=this.getAccumulatedValue(i,e-i.lf_left-1);return n+=i.size_left,{node:i,remainder:Math.min(s+t-1,r),nodeStartOffset:n}}else if(i.lf_left+i.piece.lineFeedCnt===e-1){const s=this.getAccumulatedValue(i,e-i.lf_left-2);if(s+t-1<=i.piece.length)return{node:i,remainder:s+t-1,nodeStartOffset:n};t-=i.piece.length-s;break}else e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right;for(i=i.next();i!==ie;){if(i.piece.lineFeedCnt>0){const s=this.getAccumulatedValue(i,0),r=this.offsetOfNode(i);return{node:i,remainder:Math.min(t-1,s),nodeStartOffset:r}}else if(i.piece.length>=t-1){const s=this.offsetOfNode(i);return{node:i,remainder:t-1,nodeStartOffset:s}}else t-=i.piece.length;i=i.next()}return null}nodeCharCodeAt(e,t){if(e.piece.lineFeedCnt<1)return-1;const i=this._buffers[e.piece.bufferIndex],n=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return i.buffer.charCodeAt(n)}offsetOfNode(e){if(!e)return 0;let t=e.size_left;for(;e!==this.root;)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t}shouldCheckCRLF(){return!(this._EOLNormalized&&this._EOL===` +`)}startWithLF(e){if(typeof e=="string")return e.charCodeAt(0)===10;if(e===ie||e.piece.lineFeedCnt===0)return!1;const t=e.piece,i=this._buffers[t.bufferIndex].lineStarts,n=t.start.line,s=i[n]+t.start.column;return n===i.length-1||i[n+1]>s+1?!1:this._buffers[t.bufferIndex].buffer.charCodeAt(s)===10}endWithCR(e){return typeof e=="string"?e.charCodeAt(e.length-1)===13:e===ie||e.piece.lineFeedCnt===0?!1:this.nodeCharCodeAt(e,e.piece.length-1)===13}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){const t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){const t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}}fixCRLF(e,t){const i=[],n=this._buffers[e.piece.bufferIndex].lineStarts;let s;e.piece.end.column===0?s={line:e.piece.end.line-1,column:n[e.piece.end.line]-n[e.piece.end.line-1]-1}:s={line:e.piece.end.line,column:e.piece.end.column-1};const r=e.piece.length-1,a=e.piece.lineFeedCnt-1;e.piece=new Gi(e.piece.bufferIndex,e.piece.start,s,a,r),Co(this,e,-1,-1),e.piece.length===0&&i.push(e);const c={line:t.piece.start.line+1,column:0},h=t.piece.length-1,d=this.getLineFeedCnt(t.piece.bufferIndex,c,t.piece.end);t.piece=new Gi(t.piece.bufferIndex,c,t.piece.end,d,h),Co(this,t,-1,-1),t.piece.length===0&&i.push(t);const u=this.createNewPieces(`\r +`);this.rbInsertRight(e,u[0]);for(let f=0;fb.sortIndex-v.sortIndex)}this._mightContainRTL=n,this._mightContainUnusualLineTerminators=s,this._mightContainNonBasicASCII=r;const g=this._doApplyEdits(c);let m=null;if(t&&u.length>0){u.sort((p,b)=>b.lineNumber-p.lineNumber),m=[];for(let p=0,b=u.length;p0&&u[p-1].lineNumber===v)continue;const C=u[p].oldContent,w=this.getLineContent(v);w.length===0||w===C||l.firstNonWhitespaceIndex(w)!==-1||m.push(v)}}return this._onDidChangeContent.fire(),new l.ApplyEditsResult(f,g,m)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let t=!1;const i=e[0].range,n=e[e.length-1].range,s=new l.Range(i.startLineNumber,i.startColumn,n.endLineNumber,n.endColumn);let r=i.startLineNumber,a=i.startColumn;const c=[];for(let g=0,m=e.length;g0&&c.push(p.text),r=b.endLineNumber,a=b.endColumn}const h=c.join(""),[d,u,f]=fr(h);return{sortIndex:0,identifier:e[0].identifier,range:s,rangeOffset:this.getOffsetAt(s.startLineNumber,s.startColumn),rangeLength:this.getValueLengthInRange(s,0),text:h,eolCount:d,firstLineLength:u,lastLineLength:f,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(Rc._sortOpsDescending);const t=[];for(let i=0;i0){const f=c.eolCount+1;f===1?u=new l.Range(h,d,h,d+c.firstLineLength):u=new l.Range(h,d,h+f-1,c.lastLineLength+1)}else u=new l.Range(h,d,h,d);i=u.endLineNumber,n=u.endColumn,t.push(u),s=c}return t}static _sortOpsAscending(e,t){const i=l.Range.compareRangesUsingEnds(e.range,t.range);return i===0?e.sortIndex-t.sortIndex:i}static _sortOpsDescending(e,t){const i=l.Range.compareRangesUsingEnds(e.range,t.range);return i===0?t.sortIndex-e.sortIndex:-i}}class bK{constructor(e,t,i,n,s,r,a,c,h){this._chunks=e,this._bom=t,this._cr=i,this._lf=n,this._crlf=s,this._containsRTL=r,this._containsUnusualLineTerminators=a,this._isBasicASCII=c,this._normalizeEOL=h}_getEOL(e){const t=this._cr+this._lf+this._crlf,i=this._cr+this._crlf;return t===0?e===1?` +`:`\r +`:i>t/2?`\r +`:` +`}create(e){const t=this._getEOL(e),i=this._chunks;if(this._normalizeEOL&&(t===`\r +`&&(this._cr>0||this._lf>0)||t===` +`&&(this._cr>0||this._crlf>0)))for(let s=0,r=i.length;s=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}_acceptChunk1(e,t){!t&&e.length===0||(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){const t=gK(this._tmpLineStarts,e);this.chunks.push(new Pa(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,t.isBasicASCII||(this.isBasicASCII=!1,this.containsRTL||(this.containsRTL=l.containsRTL(e)),this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=l.containsUnusualLineTerminators(e)))}finish(e=!0){return this._finish(),new bK(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(this.chunks.length===0&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;const e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);const t=wo(e.buffer);e.lineStarts=t,this._previousChar===13&&this.cr++}}}class CK{constructor(){this._onDidChangeVisibleRanges=new l.Emitter,this.onDidChangeVisibleRanges=this._onDidChangeVisibleRanges.event,this._views=new Set,this._viewsChanged=qr(this),this.visibleLineRanges=fn({owner:this,equalsFn:Zh(Qb())},e=>(this._viewsChanged.read(e),l.LineRange.joinMany([...this._views].map(i=>i.state.read(e)?.visibleLineRanges??[]))))}attachView(){const e=new wK(t=>{this._onDidChangeVisibleRanges.fire({view:e,state:t})});return this._views.add(e),this._viewsChanged.trigger(void 0),e}detachView(e){this._views.delete(e),this._onDidChangeVisibleRanges.fire({view:e,state:void 0}),this._viewsChanged.trigger(void 0)}dispose(){this._onDidChangeVisibleRanges.dispose()}}class vK{constructor(e,t){this.visibleLineRanges=e,this.stabilized=t}equals(e){return this===e?!0:!(!l.equals(this.visibleLineRanges,e.visibleLineRanges,(t,i)=>t.equals(i))||this.stabilized!==e.stabilized)}}class wK{get state(){return this._state}constructor(e){this.handleStateChange=e,this._state=Wh({owner:this,equalsFn:Gr((t,i)=>t.equals(i))},void 0)}setVisibleLines(e,t){const i=e.map(s=>new l.LineRange(s.startLineNumber,s.endLineNumber+1)),n=new vK(i,t);this._state.set(n,void 0,void 0),this.handleStateChange(n)}}class SK extends l.Disposable{get lineRanges(){return this._lineRanges}constructor(e){super(),this._refreshTokens=e,this.runner=this._register(new l.RunOnceScheduler(()=>this.update(),50)),this._computedLineRanges=[],this._lineRanges=[]}update(){l.equals(this._computedLineRanges,this._lineRanges,(e,t)=>e.equals(t))||(this._computedLineRanges=this._lineRanges,this._refreshTokens())}handleStateChange(e){this._lineRanges=e.visibleLineRanges,e.stabilized?(this.runner.cancel(),this.update()):this.runner.schedule()}}class y1 extends l.Disposable{get backgroundTokenizationState(){return this._backgroundTokenizationState}constructor(e,t){super(),this._languageIdCodec=e,this._textModel=t,this._onDidChangeTokens=this._register(new l.Emitter),this.onDidChangeTokens=this._onDidChangeTokens.event,this._onDidChangeFontTokens=this._register(new l.Emitter),this.onDidChangeFontTokens=this._onDidChangeFontTokens.event}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}}class uu{static toKey(e){return`${e.ownerId};${e.decorationId};${e.lineNumber}`}constructor(e,t,i,n){this.ownerId=e,this.decorationId=t,this.lineNumber=i,this.lineHeight=n}}class fu{static toKey(e){return`${e.ownerId};${e.decorationId};${e.lineNumber}`}constructor(e,t,i){this.ownerId=e,this.decorationId=t,this.lineNumber=i}}class yK{constructor(e,t,i,n,s){this._parsedThemeRuleBrand=void 0,this.token=e,this.index=t,this.fontStyle=i,this.foreground=n,this.background=s}}function LK(o){if(!o||!Array.isArray(o))return[];const e=[];let t=0;for(let i=0,n=o.length;i{const f=NK(d.token,u.token);return f!==0?f:d.index-u.index});let t=0,i="000000",n="ffffff";for(;o.length>=1&&o[0].token==="";){const d=o.shift();d.fontStyle!==-1&&(t=d.fontStyle),d.foreground!==null&&(i=d.foreground),d.background!==null&&(n=d.background)}const s=new EK;for(const d of e)s.getId(d);const r=s.getId(i),a=s.getId(n),c=new zw(t,r,a),h=new Vw(c);for(let d=0,u=o.length;d"u"){const n=this._match(t),s=TK(t);i=(n.metadata|s<<8)>>>0,this._cache.set(t,i)}return(i|e<<0)>>>0}}const IK=/\b(comment|string|regex|regexp)\b/;function TK(o){const e=o.match(IK);if(!e)return 0;switch(e[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"regexp":return 3}throw new Error("Unexpected match for standard token type!")}function NK(o,e){return oe?1:0}class zw{constructor(e,t,i){this._themeTrieElementRuleBrand=void 0,this._fontStyle=e,this._foreground=t,this._background=i,this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}clone(){return new zw(this._fontStyle,this._foreground,this._background)}acceptOverwrite(e,t,i){e!==-1&&(this._fontStyle=e),t!==0&&(this._foreground=t),i!==0&&(this._background=i),this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}}class Vw{constructor(e){this._themeTrieElementBrand=void 0,this._mainRule=e,this._children=new Map}match(e){if(e==="")return this._mainRule;const t=e.indexOf(".");let i,n;t===-1?(i=e,n=""):(i=e.substring(0,t),n=e.substring(t+1));const s=this._children.get(i);return typeof s<"u"?s.match(n):this._mainRule}insert(e,t,i,n){if(e===""){this._mainRule.acceptOverwrite(t,i,n);return}const s=e.indexOf(".");let r,a;s===-1?(r=e,a=""):(r=e.substring(0,s),a=e.substring(s+1));let c=this._children.get(r);typeof c>"u"&&(c=new Vw(this._mainRule.clone()),this._children.set(r,c)),c.insert(a,t,i,n)}}function RK(o){const e=[];for(let t=1,i=o.length;tthis._annotations[n].range.start-e);let i;if(t>=0){i=t;const n=this._annotations[i]?.range;n&&n.endExclusive===e&&i--}else{const n=this._annotations[-(t+2)]?.range;n&&e>=n.start&&ethis._annotations[n].range.endExclusive-e);let i;if(t>=0){i=t+1;const n=this._annotations[i]?.range;n&&n.start===e&&i++}else{const n=this._annotations[-(t+1)]?.range;n&&e>=n.start&&e<=n.endExclusive?i=-t:i=-(t+1)}return i}applyEdit(e){const t=this._annotations.slice(),i=[],n=[];let s=0;for(const r of e.replacements){for(;;){const c=t[0];if(!c)break;const h=c.range;if(h.endExclusive>=r.replaceRange.start)break;t.shift();const d={range:h.delta(s),annotation:c.annotation};d.range.isEmpty?n.push(d):i.push(d)}const a=[];for(;;){const c=t[0];if(!c||!c.range.intersectsOrTouches(r.replaceRange))break;t.shift(),a.push(c)}for(let c=a.length-1;c>=0;c--){const h=a[c];let d=h.range;const u=c===0&&r.replaceRange.endExclusive>d.start&&r.replaceRange.start0&&(d=d.delta(-g)),!u&&g>=0&&(d=d.delta(r.newText.length)),d=d.delta(-(r.newText.length-r.replaceRange.length)),t.unshift({annotation:h.annotation,range:d})}s+=r.newText.length-r.replaceRange.length}for(;;){const r=t[0];if(!r)break;t.shift();const a={annotation:r.annotation,range:r.range.delta(s)};a.range.isEmpty?n.push(a):i.push(a)}return this._annotations=i,n}}class Uw{static create(e){return new Uw(e)}constructor(e){this._annotations=e}get annotations(){return this._annotations}}function x1(o){const e=o.map(i=>new l.StringReplacement(l.OffsetRange.ofStartAndLength(i.rangeOffset,i.rangeLength),i.text));return e.reverse(),new l.StringEdit(e)}const Cf=class Cf extends l.Disposable{constructor(e,t){super(),this.textModel=e,this.tokenizationTextModelPart=t,this._onDidChangeLineHeight=this._register(new l.Emitter),this.onDidChangeLineHeight=this._onDidChangeLineHeight.event,this._onDidChangeFont=this._register(new l.Emitter),this.onDidChangeFont=this._onDidChangeFont.event,this._fontAnnotatedString=new OK,this._register(this.tokenizationTextModelPart.onDidChangeFontTokens(i=>{const n=new Set,s=[],r=new Set,a=new Set;for(const c of i.changes.annotations){const d=this.textModel.getPositionAt(c.range.start).lineNumber;let u;if(c.annotation===void 0)u={range:c.range,annotation:void 0};else{const f=`tokenization-font-decoration-${Cf.DECORATION_COUNT}`,g={fontToken:c.annotation,decorationId:f};u={range:c.range,annotation:g},Cf.DECORATION_COUNT++,c.annotation.lineHeightMultiplier&&r.add(new uu(0,f,d,c.annotation.lineHeightMultiplier)),a.add(new fu(0,f,d))}if(s.push(u),!n.has(d)){const f=this.textModel.getOffsetAt(new l.Position(d,1)),g=this.textModel.getOffsetAt(new l.Position(d,this.textModel.getLineMaxColumn(d))),m=new l.OffsetRange(f,g),p=this._fontAnnotatedString.getAnnotationsIntersecting(m);for(const b of p){const v=b.annotation.decorationId;r.add(new uu(0,v,d,null)),a.add(new fu(0,v,d))}n.add(d)}}this._fontAnnotatedString.setAnnotations(Uw.create(s)),this._onDidChangeLineHeight.fire(r),this._onDidChangeFont.fire(a)}))}handleDidChangeContent(e){const t=x1(e.changes),i=this._fontAnnotatedString.applyEdit(t);if(i.length===0)return;const n=new Set,s=new Set;for(const r of i){const c=this.textModel.getPositionAt(r.range.start).lineNumber,h=r.annotation.decorationId;n.add(new uu(0,h,c,null)),s.add(new fu(0,h,c))}this._onDidChangeLineHeight.fire(n),this._onDidChangeFont.fire(s)}getDecorationsInRange(e,t,i,n,s){const r=this.textModel.getOffsetAt(e.getStartPosition()),a=this.textModel.getOffsetAt(e.getEndPosition()),c=this._fontAnnotatedString.getAnnotationsIntersecting(new l.OffsetRange(r,a)),h=[];for(const d of c){const u=d.annotation,f=!!(u.fontToken.fontFamily||u.fontToken.fontSizeMultiplier);if(!(f&&n)){const g=this.textModel.getPositionAt(d.range.start),m=this.textModel.getPositionAt(d.range.endExclusive),p=l.Range.fromPositions(g,m),b=d.annotation,v=MK(b.fontToken.fontFamily??"",b.fontToken.fontSizeMultiplier??0),C=b.decorationId;h.push({id:C,options:{description:"FontOptionDecoration",inlineClassName:v,lineHeight:b.fontToken.lineHeightMultiplier,affectsFont:f},ownerId:0,range:p})}}return h}getAllDecorations(e,t){return this.getDecorationsInRange(new l.Range(1,1,this.textModel.getLineCount(),this.textModel.getLineMaxColumn(this.textModel.getLineCount())),e,t)}};Cf.DECORATION_COUNT=0;let $w=Cf;function PK(o,e){const t=o.gotoNextSibling(),i=e.gotoNextSibling();if(t!==i)throw new Error("Trees are out of sync");return t&&i}function E1(o,e){const t=o.gotoParent(),i=e.gotoParent();if(t!==i)throw new Error("Trees are out of sync");return t&&i}function kK(o,e,t){const i=o.gotoFirstChild(),n=e.gotoFirstChild();if(i!==n)throw new Error("Trees are out of sync");if(t===0)return i&&n;for(let s=1;s<=t;s++){const r=o.gotoNextSibling(),a=e.gotoNextSibling();if(r!==a)throw new Error("Trees are out of sync");if(!r||!a)return!1}return i&&n}function I1(o,e){do{if(o.currentNode.nextSibling)return PK(o,e);o.currentNode.parent&&E1(o,e)}while(o.currentNode.nextSibling||o.currentNode.parent);return!1}function FK(o,e){const t=e.walk();t.resetTo(o);const i=o.currentNode;do if(t.currentNode.previousSibling&&t.currentNode.endIndex-t.currentNode.startIndex!==0)t.gotoPreviousSibling();else{for(;!t.currentNode.previousSibling&&t.currentNode.parent;)t.gotoParent();t.gotoPreviousSibling()}while(t.currentNode.endIndex>i.startIndex&&(t.currentNode.parent||t.currentNode.previousSibling)&&t.currentNode.id!==i.id);if(t.currentNode.id!==i.id&&t.currentNode.endIndex<=i.startIndex)return t.currentNode}var BK=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},T1=function(o,e){return function(t,i){e(t,i,o)}};let Kw=class extends l.Disposable{constructor(e,t,i,n,s,r,a){super(),this.languageId=e,this._ranges=t,this._parser=i,this._parserClass=n,this.textModel=s,this._logService=r,this._telemetryService=a,this._tree=W(this,void 0),this.tree=this._tree,this._treeLastParsedVersion=W(this,-1),this.treeLastParsedVersion=this._treeLastParsedVersion,this._onDidChangeContentQueue=new l.TaskQueue,this._tree=W(this,void 0),this.tree=this._tree,this._register(l.toDisposable(()=>{this._tree.get()?.delete(),this._lastFullyParsed?.delete(),this._lastFullyParsedWithEdits?.delete(),this._parser.delete()})),this.handleContentChange(void 0,this._ranges)}handleContentChange(e,t){const i=this.textModel.getVersionId();let n=[];t&&(n=this._setRanges(t)),e&&this._applyEdits(e.changes),this._onDidChangeContentQueue.clearPending(),this._onDidChangeContentQueue.schedule(async()=>{if(this._store.isDisposed)return;const s=this._lastFullyParsed;let r;this._lastFullyParsedWithEdits&&this._lastFullyParsed&&(r=this._findChangedNodes(this._lastFullyParsedWithEdits,this._lastFullyParsed));const a=await this._parseAndUpdateTree(i);if(a){let c;r?s&&r&&(c=this._findTreeChanges(a,r,n)):this._ranges&&(c=this._ranges.map(d=>({newRange:new l.Range(d.startPosition.row+1,d.startPosition.column+1,d.endPosition.row+1,d.endPosition.column+1),oldRangeLength:d.endIndex-d.startIndex,newRangeStartOffset:d.startIndex,newRangeEndOffset:d.endIndex}))),c||(c=[{newRange:this.textModel.getFullModelRange(),newRangeStartOffset:0,newRangeEndOffset:this.textModel.getValueLength()}]);const h=this._tree.get();nt(d=>{this._tree.set(a,d,{ranges:c,versionId:i}),this._treeLastParsedVersion.set(i,d)}),h?.delete()}})}_applyEdits(e){for(const t of e){const i=l.TextLength.ofRange(l.Range.lift(t.range)),n=l.TextLength.ofText(t.text),s=t.text.length===0?n:i.add(n),r={startIndex:t.rangeOffset,oldEndIndex:t.rangeOffset+t.rangeLength,newEndIndex:t.rangeOffset+t.text.length,startPosition:{row:t.range.startLineNumber-1,column:t.range.startColumn-1},oldEndPosition:{row:t.range.endLineNumber-1,column:t.range.endColumn-1},newEndPosition:{row:t.range.startLineNumber+s.lineCount-1,column:s.lineCount?s.columnCount:t.range.endColumn+s.columnCount}};this._tree.get()?.edit(r),this._lastFullyParsedWithEdits?.edit(r)}}_findChangedNodes(e,t){if(this._ranges&&this._ranges.every(a=>a.startPosition.row!==e.rootNode.startPosition.row)||e.rootNode.startPosition.row!==0)return[];const i=e.walk(),n=t.walk(),s=[];let r=!0;do if(i.currentNode.hasChanges){const a=i.currentNode.children,c=[],h=a.filter((d,u)=>d?.hasChanges||n.currentNode.children.length<=u?(c.push(u),!0):!1);if(h.length===0||i.currentNode.hasError!==n.currentNode.hasError){for(;i.currentNode.parent&&r&&!i.currentNode.isNamed;)r=E1(i,n);const d=i.currentNode,u=FK(i,e)??d;s.push({startIndex:u.startIndex,endIndex:d.endIndex,startPosition:u.startPosition,endPosition:d.endPosition}),r=I1(i,n)}else h.length>=1&&(r=kK(i,n,c[0]))}else r=I1(i,n);while(r);return i.delete(),n.delete(),s}_findTreeChanges(e,t,i){let n=0;const s=[];for(let r=0;r0&&a.startIndex>=s[s.length-1].newRangeStartOffset&&a.endIndex<=s[s.length-1].newRangeEndOffset)continue;const c=e.walk(),h=()=>c.startIndexa.endIndex;for(;h();){let p=c.gotoFirstChild(),b=!1;for(;p;)if(h()&&c.currentNode.isNamed){b=!0;break}else p=c.gotoNextSibling();if(!b){c.gotoParent();break}if(c.currentNode.childCount===0)break}const d=c.currentNode.startPosition,u=c.currentNode.endPosition,f=c.currentNode.startIndex,g=c.currentNode.endIndex,m={newRange:new l.Range(d.row+1,d.column+1,u.row+1,u.column+1),newRangeStartOffset:f,newRangeEndOffset:g};nm.newRangeEndOffset&&(m.newRange=m.newRange.setEndPosition(i[n].endPosition.row+1,i[n].endPosition.column+1),m.newRangeEndOffset=i[n].endIndex),n++):n0&&s[s.length-1].newRangeEndOffset>=m.newRangeStartOffset?(s[s.length-1].newRange=l.Range.fromPositions(s[s.length-1].newRange.getStartPosition(),m.newRange.getEndPosition()),s[s.length-1].newRangeEndOffset=m.newRangeEndOffset):s.push(m)}return this._constrainRanges(s)}_constrainRanges(e){if(!this._ranges)return e;const t=[];let i=0,n=0;for(;ir.endIndex)n++;else{const a=Math.max(s.newRangeStartOffset,r.startIndex),c=Math.min(s.newRangeEndOffset,r.endIndex),h=s.newRange.intersectRanges(new l.Range(r.startPosition.row+1,r.startPosition.column+1,r.endPosition.row+1,r.endPosition.column+1));t.push({newRange:h,newRangeEndOffset:c,newRangeStartOffset:a}),cthis._parseCallback(c),this._tree.get(),{progressCallback:r,includedRanges:this._ranges}),t+=performance.now()-a,i++,await new Promise(c=>l.setTimeout0(c))}while(!this._store.isDisposed&&!s&&n===this.textModel.getVersionId());return this._sendParseTimeTelemetry(e,t,i),s&&n===this.textModel.getVersionId()?s:void 0}_parseCallback(e){try{return this.textModel.getTextBuffer().getNearestChunk(e)}catch(t){this._logService.debug("Error getting chunk for tree-sitter parsing",t)}}_setRanges(e){const t=[];if(this._ranges)for(const i of e){let n=!1;for(let s=0;s50?(o=i,!0):!1}}function VK(o,e){return o.startPosition.row===e.startPosition.row&&o.startPosition.column===e.startPosition.column&&o.endPosition.row===e.endPosition.row&&o.endPosition.column===e.endPosition.column&&o.startIndex===e.startIndex&&o.endIndex===e.endIndex}function N1(o,e){return o.startIndex<=e.startIndex&&o.endIndex>=e.startIndex||e.startIndex<=o.startIndex&&e.endIndex>=o.startIndex}class UK{constructor(e){this._default=e,this._store=[]}get(e){return e=this._store.length;)this._store[this._store.length]=this._default;this._store[e]=t}replace(e,t,i){if(e>=this._store.length)return;if(t===0){this.insert(e,i);return}else if(i===0){this.delete(e,t);return}const n=this._store.slice(0,e),s=this._store.slice(e+t),r=$K(i,this._default);this._store=n.concat(r,s)}delete(e,t){t===0||e>=this._store.length||this._store.splice(e,t)}insert(e,t){if(t===0||e>=this._store.length)return;const i=[];for(let n=0;n0){const i=this._tokens[this._tokens.length-1];if(i.endLineNumber+1===e){i.appendLineTokens(t);return}}this._tokens.push(new KK(e,[t]))}finalize(){return this._tokens}}class GK{constructor(e,t){this.tokenizationSupport=t,this.initialState=this.tokenizationSupport.getInitialState(),this.store=new jw(e)}getStartState(e){return this.store.getStartState(e,this.initialState)}getFirstInvalidLine(){return this.store.getFirstInvalidLine(this.initialState)}}class jK extends GK{constructor(e,t,i,n){super(e,t),this._textModel=i,this._languageIdCodec=n}updateTokensUntilLine(e,t){const i=this._textModel.getLanguageId();for(;;){const n=this.getFirstInvalidLine();if(!n||n.lineNumber>t)break;const s=this._textModel.getLineContent(n.lineNumber),r=gu(this._languageIdCodec,i,this.tokenizationSupport,s,!0,n.startState);e.add(n.lineNumber,r.tokens),this.store.setEndState(n.lineNumber,r.endState)}}getTokenTypeIfInsertingCharacter(e,t){const i=this.getStartState(e.lineNumber);if(!i)return 0;const n=this._textModel.getLanguageId(),s=this._textModel.getLineContent(e.lineNumber),r=s.substring(0,e.column-1)+t+s.substring(e.column-1),a=gu(this._languageIdCodec,n,this.tokenizationSupport,r,!0,i),c=new _t(a.tokens,r,this._languageIdCodec);if(c.getCount()===0)return 0;const h=c.findTokenIndexAtOffset(e.column-1);return c.getStandardTokenType(h)}tokenizeLinesAt(e,t){const i=this.getStartState(e);if(!i)return null;const n=this._textModel.getLanguageId(),s=[];let r=i;for(const a of t){const c=gu(this._languageIdCodec,n,this.tokenizationSupport,a,!0,r);s.push(new _t(c.tokens,a,this._languageIdCodec)),r=c.endState}return s}hasAccurateTokensForLine(e){const t=this.store.getFirstInvalidEndStateLineNumberOrMax();return e1&&r>=1;r--){const a=o.getLineFirstNonWhitespaceColumn(r);if(a!==0&&a0&&i>0&&(i--,t--),this._lineEndStates.replace(e.startLineNumber,i,t)}}class YK{constructor(){this._ranges=[]}get min(){return this._ranges.length===0?null:this._ranges[0].start}delete(e){const t=this._ranges.findIndex(i=>i.contains(e));if(t!==-1){const i=this._ranges[t];i.start===e?i.endExclusive===e+1?this._ranges.splice(t,1):this._ranges[t]=new l.OffsetRange(e+1,i.endExclusive):i.endExclusive===e+1?this._ranges[t]=new l.OffsetRange(i.start,e):this._ranges.splice(t,1,new l.OffsetRange(i.start,e),new l.OffsetRange(e+1,i.endExclusive))}}addRange(e){l.OffsetRange.addRange(e,this._ranges)}addRangeAndResize(e,t){let i=0;for(;!(i>=this._ranges.length||e.start<=this._ranges[i].endExclusive);)i++;let n=i;for(;!(n>=this._ranges.length||e.endExclusivee.toString()).join(" + ")}}function gu(o,e,t,i,n,s){let r=null;if(t)try{r=t.tokenizeEncoded(i,n,s.clone())}catch(a){l.onUnexpectedError(a)}return r||(r=Lg(o.encodeLanguageId(e),s)),_t.convertToEndOffset(r.tokens,i.length),r}class ZK{constructor(e,t){this._tokenizerWithStateStore=e,this._backgroundTokenStore=t,this._isDisposed=!1,this._isScheduled=!1}dispose(){this._isDisposed=!0}handleChanges(){this._beginBackgroundTokenization()}_beginBackgroundTokenization(){this._isScheduled||!this._tokenizerWithStateStore._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._isScheduled=!0,l.runWhenGlobalIdle(e=>{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(e)}))}_backgroundTokenizeWithDeadline(e){const t=Date.now()+e.timeRemaining(),i=()=>{this._isDisposed||!this._tokenizerWithStateStore._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._backgroundTokenizeForAtLeast1ms(),Date.now()1||this._tokenizeOneInvalidLine(t)>=e)break;while(this._hasLinesToTokenize());this._backgroundTokenStore.setTokens(t.finalize()),this.checkFinished()}_hasLinesToTokenize(){return this._tokenizerWithStateStore?!this._tokenizerWithStateStore.store.allStatesValid():!1}_tokenizeOneInvalidLine(e){const t=this._tokenizerWithStateStore?.getFirstInvalidLine();return t?(this._tokenizerWithStateStore.updateTokensUntilLine(e,t.lineNumber),t.lineNumber):this._tokenizerWithStateStore._textModel.getLineCount()+1}checkFinished(){this._isDisposed||this._tokenizerWithStateStore.store.allStatesValid()&&this._backgroundTokenStore.backgroundTokenizationFinished()}requestTokens(e,t){this._tokenizerWithStateStore.store.invalidateEndStateRange(new l.LineRange(e,t))}}class ka{get children(){return this._children}get length(){return this._length}constructor(e){this.height=e,this._children=[],this._length=0}static create(e,t){const i=new ka(e.height+1);return i.appendChild(e),i.appendChild(t),i}canAppendChild(){return this._children.length<3}appendChild(e){if(!this.canAppendChild())throw new Error("Cannot insert more than 3 children in a ListNode");this._children.push(e),this._length+=e.length,this._updateParentLength(e.length),Ci(e)||(e.parent=this)}_updateParentLength(e){let t=this.parent;for(;t;)t._length+=e,t=t.parent}unappendChild(){const e=this._children.pop();return this._length-=e.length,this._updateParentLength(-e.length),e}prependChild(e){if(this._children.length>=3)throw new Error("Cannot prepend more than 3 children in a ListNode");this._children.unshift(e),this._length+=e.length,this._updateParentLength(e.length),Ci(e)||(e.parent=this)}unprependChild(){const e=this._children.shift();return this._length-=e.length,this._updateParentLength(-e.length),e}lastChild(){return this._children[this._children.length-1]}dispose(){this._children.splice(0,this._children.length)}}var tn;(function(o){o[o.None=0]="None",o[o.ViewportGuess=1]="ViewportGuess",o[o.EditGuess=2]="EditGuess",o[o.Accurate=3]="Accurate"})(tn||(tn={}));function Ci(o){return o.token!==void 0}function M1(o,e){let t=o;const i=[];let n;for(;;){if(e.height===t.height){n=e;break}if(Ci(t))throw new Error("unexpected");i.push(t),t=t.lastChild()}for(let s=i.length-1;s>=0;s--){const r=i[s];n&&(r.children.length>=3?n=ka.create(r.unappendChild(),n):(r.appendChild(n),n=void 0))}if(n){const s=new ka(n.height+1);return s.appendChild(o),s.appendChild(n),s}else return o}function QK(o,e){let t=o;const i=[];for(;e.height!==t.height;){if(Ci(t))throw new Error("unexpected");i.push(t),t=t.children[0]}let n=e;for(let s=i.length-1;s>=0;s--){const r=i[s];n&&(r.children.length>=3?n=ka.create(n,r.unprependChild()):(r.prependChild(n),n=void 0))}return n?ka.create(n,o):o}function XK(o,e){return o.height===e.height?ka.create(o,e):o.height>e.height?M1(o,e):QK(e,o)}class JK{constructor(e){this._textModel=e,this._root=this.createEmptyRoot()}createEmptyRoot(){return{length:this._textModel.getValueLength(),token:0,height:0,tokenQuality:tn.None}}buildStore(e,t){this._root=this.createFromUpdates(e,t)}createFromUpdates(e,t){if(e.length===0)return this.createEmptyRoot();let i={length:e[0].length,token:e[0].token,height:0,tokenQuality:t};for(let n=1;n0;){const u=c.pop(),f=u.offset;if(f=s){Ci(u.node)||(u.node.parent=void 0),a.push(u.node);continue}else if(Ci(u.node)&&f+u.node.length>s){a.push({length:f+u.node.length-s,token:u.node.token,height:0,tokenQuality:u.node.tokenQuality});continue}if(!Ci(u.node)){let g=f+u.node.length;for(let m=u.node.children.length-1;m>=0;m--)g-=u.node.children[m].length,c.push({node:u.node.children[m],offset:g})}}}let h;i.length>0?h=r.concat(this.createFromUpdates(i,n),a):h=r.concat(a);let d=h[0];for(let u=1;u0;){const{node:s,offset:r}=n.pop();if(!(r+s.length<=e||r>=t)){if(i(s,r))return;if(!Ci(s)){let c=r+s.length;for(let h=s.children.length-1;h>=0;h--)c-=s.children[h].length,n.push({node:s.children[h],offset:c})}}}}getTokenAt(e){let t;return this.traverseInOrderInRange(e,this._root.length,(i,n)=>Ci(i)?(t={token:i.token,startOffsetInclusive:n,length:i.length},!0):!1),t}getTokensInRange(e,t){const i=[];return this.traverseInOrderInRange(e,t,(n,s)=>{if(Ci(n)){let r=n.length,a=s;st?(a=e,r=t-e):st&&(r-=s+n.length-t),i.push({token:n.token,startOffsetInclusive:a,length:r})}return!1}),i}markForRefresh(e,t){this.traverseInOrderInRange(e,t,i=>(Ci(i)&&(i.tokenQuality=tn.None),!1))}rangeHasTokens(e,t,i){let n=!0;return this.traverseInOrderInRange(e,t,s=>(Ci(s)&&s.tokenQuality(Ci(n)&&n.tokenQuality!==tn.Accurate&&(i=!0),!1)),i}getNeedsRefresh(){const e=[];return this.traverseInOrderInRange(0,this._textModel.getValueLength(),(t,i)=>(Ci(t)&&t.tokenQuality!==tn.Accurate&&(e.length>0&&e[e.length-1].endOffset===i?e[e.length-1].endOffset+=t.length:e.push({startOffset:i,endOffset:i+t.length})),!1)),e}dispose(){const e=[[this._root,!1]];for(;e.length>0;){const[t,i]=e.pop();if(!Ci(t))if(i)t.dispose(),t.parent=void 0;else{e.push([t,!0]);for(let n=t.children.length-1;n>=0;n--)e.push([t.children[n],!1])}}this._root=void 0}}const WK=le("treeSitterThemeService");var HK=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},e6=function(o,e){return function(t,i){e(t,i,o)}};let qw=class extends l.Disposable{get _textModel(){return this._tree.textModel}constructor(e,t,i,n,s){super(),this._tree=e,this._highlightingQueries=t,this._languageIdCodec=i,this._visibleLineRanges=n,this._treeSitterThemeService=s,this._onDidChangeTokens=this._register(new l.Emitter),this.onDidChangeTokens=this._onDidChangeTokens.event,this._onDidCompleteBackgroundTokenization=this._register(new l.Emitter),this.onDidChangeBackgroundTokenization=this._onDidCompleteBackgroundTokenization.event,this._encodedLanguageId=this._languageIdCodec.encodeLanguageId(this._tree.languageId),this._register(Qr(this._treeSitterThemeService.onChange,()=>{this._updateTheme()})),this._tokenStore=this._register(new JK(this._textModel)),this._accurateVersion=this._textModel.getVersionId(),this._guessVersion=this._textModel.getVersionId(),this._tokenStore.buildStore(this._createEmptyTokens(),tn.None),this._register(he(r=>{const a=this._visibleLineRanges.read(r);this._parseAndTokenizeViewPort(a)})),this._register(Gl({owner:this,changeTracker:Wk({tree:this._tree.tree})},(r,a)=>{const c=a.changes.at(0)?.change;if(a.changes.length>1)throw new l.BugIndicatingError("The tree changed twice in one transaction. This is currently not supported and should not happen.");if(!c)a.tree&&this._firstTreeUpdate(this._tree.treeLastParsedVersion.read(r));else{if(this.hasTokens())for(const h of c.ranges)this._markForRefresh(h.newRange);this.hasTokens()?this._handleTreeUpdate(c.ranges,c.versionId):this._firstTreeUpdate(c.versionId)}}))}handleContentChanged(e){this._guessVersion=e.versionId;for(const t of e.changes)if(t.text.length>t.rangeLength){const i=t.rangeOffset>0?t.rangeOffset-1:t.rangeOffset,n=this._tokenStore.getTokenAt(i);let s;n?(s={startOffsetInclusive:n.startOffsetInclusive,length:n.length+t.text.length-t.rangeLength,token:n.token},this._tokenStore.markForRefresh(i,t.rangeOffset+(t.text.length>t.rangeLength?t.text.length:t.rangeLength))):s={startOffsetInclusive:i,length:t.text.length,token:0},this._tokenStore.update(n?.length??0,[s],tn.EditGuess)}else if(t.text.length0?n.newTokens[n.newTokens.length-1]:void 0;let r;s&&this._guessVersion>=e?r=s.startOffsetInclusive+s.length-n.newTokens[0].startOffsetInclusive:n.oldRangeLength?r=n.oldRangeLength:r=0,this._tokenStore.update(r,n.newTokens,i)}}_markForRefresh(e){this._tokenStore.markForRefresh(this._textModel.getOffsetAt(e.getStartPosition()),this._textModel.getOffsetAt(e.getEndPosition()))}_getNeedsRefresh(){const e=this._tokenStore.getNeedsRefresh();return e?e.map(t=>({range:l.Range.fromPositions(this._textModel.getPositionAt(t.startOffset),this._textModel.getPositionAt(t.endOffset)),startOffset:t.startOffset,endOffset:t.endOffset})):[]}_parseAndTokenizeViewPort(e){const t=e.map(i=>i.toInclusiveRange()).filter(l.isDefined);for(const i of t){const n=this._textModel.getOffsetAt(i.getStartPosition()),s=this._textModel.getOffsetAt(i.getEndPosition()),r=this._textModel.getVersionId();if(this._rangeHasTokens(i,tn.ViewportGuess))continue;const a=this._textModel.getValueInRange(i),c=this._forceParseAndTokenizeContent(i,n,s,a,!0);if(!c||this._rangeHasTokens(i,tn.ViewportGuess)||c.length===0)continue;const h=c[c.length-1],d=h.startOffsetInclusive+h.length-c[0].startOffsetInclusive;this._updateTokensInStore(r,[{newTokens:c,oldRangeLength:d}],tn.ViewportGuess),this._onDidChangeTokens.fire({changes:{semanticTokensApplied:!1,ranges:[{fromLineNumber:i.startLineNumber,toLineNumber:i.endLineNumber}]}})}}_guessTokensForLinesContent(e,t){if(t.length===0)return;const i=t.join(this._textModel.getEOL()),n=new l.Range(1,1,e+t.length,t[t.length-1].length+1),s=this._textModel.getOffsetAt({lineNumber:e,column:1}),r=this._forceParseAndTokenizeContent(n,s,s+i.length,i,!1);if(!r)return;const a=new Array(t.length);let c=0,h=0,d=0;for(let u=0;u{const n=i.toInclusiveRange();if(!n)return;const s=this._textModel.getOffsetAt(n.getStartPosition()),r=this._textModel.getOffsetAt(n.getEndPosition());return{newRange:n,newRangeEndOffset:r,newRangeStartOffset:s}}).filter(l.isDefined);return this._handleTreeUpdate(t,e)}_handleTreeUpdate(e,t){const i=[];for(let r=0;r1e3){const c=e[r].newRange.endLineNumber;let h=e[r].newRange.startLineNumber,d=e[r].newRange.startColumn,u=h+1e3;do{const f=new l.Position(h,d),g=u===e[r].newRange.endLineNumber?e[r].newRange.endColumn:this._textModel.getLineMaxColumn(u),m=new l.Position(u,g),p=l.Range.fromPositions(f,m);i.push({range:p,startOffset:this._textModel.getOffsetAt(p.getStartPosition()),endOffset:this._textModel.getOffsetAt(p.getEndPosition())}),h=u+1,d=1,uc?u=c:u=u+1e3}while(u<=c)}else if(r===0||i[r-1].endOffsetthis._getCaptures(r.range));return this._updateTreeForRanges(i,t,s).then(()=>{!this._textModel.isDisposed()&&this._tree.treeLastParsedVersion.get()===this._textModel.getVersionId()&&this._refreshNeedsRefresh(t)})}async _updateTreeForRanges(e,t,i){let n;for(let s=0;sl.setTimeout0(h))}this._onDidCompleteBackgroundTokenization.fire()}_refreshNeedsRefresh(e){const t=this._getNeedsRefresh();if(t.length===0)return;const i=new Array(t.length);for(let n=0;n({name:i.name,text:i.node.text,node:{startIndex:i.node.startIndex,endIndex:i.node.endIndex,startPosition:{lineNumber:i.node.startPosition.row+1,column:i.node.startPosition.column+1},endPosition:{lineNumber:i.node.endPosition.row+1,column:i.node.endPosition.column+1}},encodedLanguageId:this._encodedLanguageId})):[]}captureAtRangeWithInjections(e){const t=this.captureAtRange(e);for(let i=0;ie.startLineNumber&&se.startLineNumber&&re.endColumn?e.endColumn:c:r>e.endLineNumber?e.endColumn:c,g=new l.Range(h,u,d,f),m=this._getInjectionCaptures(n,g);m&&m.length>0&&(t.splice(i+1,0,...m),i+=m.length)}return t}tokenizeEncoded(e){const t=this._tokenizeEncoded(e);if(!t)return;const i=this._rangeTokensAsUpdates(this._textModel.getOffsetAt({lineNumber:e,column:1}),t.result);t.versionId===this._textModel.getVersionId()&&this._updateTokensInStore(t.versionId,[{newTokens:i,oldRangeLength:this._textModel.getLineLength(e)}],tn.Accurate)}_getCaptures(e){return this.captureAtRangeWithInjections(e)}_tokenize(e,t,i){const n=this._getCaptures(e),s=this._tokenizeCapturesWithMetadata(n,t,i);if(s)return{...s,versionId:this._tree.treeLastParsedVersion.get()}}_createTokensFromCaptures(e,t,i){const n=this._tree.tree.get(),s=l.StopWatch.create(),r=i-t,a=this._languageIdCodec.encodeLanguageId(this._tree.languageId),c=t6[this._tree.languageId]||"source";if(e.length===0)return n?(s.stop(),{endOffsets:[{endOffset:r,scopes:[],encodedLanguageId:a}],captureTime:s.elapsed()}):void 0;const h=Array(e.length);h.fill({endOffset:0,scopes:[c],encodedLanguageId:a});let d=0;const u=()=>{h.push({endOffset:0,scopes:[c],encodedLanguageId:a})},f=(p,b)=>p.name.includes("punctuation")&&p.text?Array.from(p.text.matchAll(i6)).map(v=>b+v.index):void 0,g=(p,b,v,C)=>{if(C!==void 0){const w=h[C].scopes;let S=h[C].bracket;if((C>0?h[C-1].endOffset:0)!==b){let D;if(S&&S.length>0){D=[];const x=[];for(let I=0;Iv&&x.push(T)}D.length===0&&(D=void 0),x.length===0?S=void 0:S=x}h.splice(C,0,{endOffset:b,scopes:[...w],bracket:D,encodedLanguageId:p.encodedLanguageId}),C++,u(),d++}h.splice(C,0,{endOffset:v,scopes:[...w,p.name],bracket:f(p,b),encodedLanguageId:p.encodedLanguageId}),h[d].bracket=S}else h[d]={endOffset:v,scopes:[c,p.name],bracket:f(p,b),encodedLanguageId:p.encodedLanguageId};d++};for(let p=0;p0?S=h[d-1].endOffset:S=C-t-1;const D=w-L;if(S>=0&&S=w){let x=d-1,I=h[x].endOffset,T=x>=2?h[x-1].endOffset:0;do{if(T+L===I){if(T===D){h[x].scopes.push(b.name);const M=h[x].bracket;h[x].bracket=M&&M.length>0?M:f(b,D)}}else if(T<=D){g(b,D,w,x);break}x--,T=x>=1?h[x-1].endOffset:0,I=x>=0?h[x].endOffset:0}while(I>D)}else g(b,D,w)}h[d-1].endOffset0&&(u(),h[d]={endOffset:r,scopes:h[d].scopes,encodedLanguageId:this._encodedLanguageId},d++);for(let p=0;p0,void 0)}const a=n.elapsed();return{endOffsetsAndMetadata:r,captureTime:s.captureTime,metadataTime:a}}_tokenizeEncoded(e){const t=this._textModel.getOffsetAt({lineNumber:e,column:1}),i=this._textModel.getLineCount(),n=e+1<=i?this._textModel.getOffsetAt({lineNumber:e+1,column:1}):this._textModel.getValueLength(),s=n-t,r=this._tokenize(new l.Range(e,1,e,s+1),t,n);if(r)return{result:r.endOffsetsAndMetadata,captureTime:r.captureTime,metadataTime:r.metadataTime,versionId:r.versionId}}_endOffsetTokensToUint32Array(e){const t=new Uint32Array(e.length*2);for(let i=0;i\(\)]/g,Yw=le("treeSitterLibraryService");var n6=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},A1=function(o,e){return function(t,i){e(t,i,o)}};let Zw=class extends y1{constructor(e,t,i,n,s,r){super(t,i),this._languageIdObs=e,this._treeSitterLibraryService=s,this._instantiationService=r,this._backgroundTokenizationState=1,this._onDidChangeBackgroundTokenizationState=this._register(new l.Emitter),this.onDidChangeBackgroundTokenizationState=this._onDidChangeBackgroundTokenizationState.event;const a=new eC(this._treeSitterLibraryService.getParserClass()),c=Z(this,h=>a.promiseResult?.read(h)?.getDataOrThrow());this._tree=Z(this,h=>{const d=c.read(h);if(!d)return;const u=this._languageIdObs.read(h),f=this._treeSitterLibraryService.getLanguage(u,!1,h);if(!f)return;const g=new d;if(h.store.add(l.toDisposable(()=>{g.delete()})),g.setLanguage(f),this._treeSitterLibraryService.getInjectionQueries(u,h)!==void 0)return h.store.add(this._instantiationService.createInstance(Kw,u,void 0,g,d,this._textModel))}),this._tokenizationImpl=Z(this,h=>{const d=this._tree.read(h);if(!d)return;const u=this._treeSitterLibraryService.getHighlightingQueries(d.languageId,h);if(u)return h.store.add(this._instantiationService.createInstance(qw,d,u,this._languageIdCodec,n))}),this._register(he(h=>{const d=this._tokenizationImpl.read(h);d&&(h.store.add(d.onDidChangeTokens(u=>{this._onDidChangeTokens.fire(u.changes)})),h.store.add(d.onDidChangeBackgroundTokenization(u=>{this._backgroundTokenizationState=2,this._onDidChangeBackgroundTokenizationState.fire()})))}))}getLineTokens(e){const t=this._tokenizationImpl.get();if(!t){const i=this._textModel.getLineContent(e);return _t.createEmpty(i,this._languageIdCodec)}return t.getLineTokens(e)}todo_resetTokenization(e=!0){e&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}handleDidChangeAttached(){}handleDidChangeContent(e){e.isFlush?this.todo_resetTokenization(!1):this._tokenizationImpl.get()?.handleContentChanged(e),this._tree.get()?.handleContentChange(e)}forceTokenization(e){const t=this._tokenizationImpl.get();t&&(t.hasAccurateTokensForLine(e)||t.tokenizeEncoded(e))}hasAccurateTokensForLine(e){const t=this._tokenizationImpl.get();return t?t.hasAccurateTokensForLine(e):!1}isCheapToTokenize(e){return!0}getTokenTypeIfInsertingCharacter(e,t,i){return 0}tokenizeLinesAt(e,t){const i=this._tokenizationImpl.get();return i?i.tokenizeLinesAt(e,t):null}get hasTokens(){const e=this._tokenizationImpl.get();return e?e.hasTokens():!1}};Zw=n6([A1(4,Yw),A1(5,me)],Zw);class Qw{constructor(e){this._pieces=[],this._isComplete=!1,this._languageIdCodec=e}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return this._pieces.length===0}set(e,t,i=void 0){if(this._pieces=e||[],this._isComplete=t,i)for(const n of this._pieces)n.reportIfInvalid(i)}setPartial(e,t){let i=e;if(t.length>0){const s=t[0].getRange(),r=t[t.length-1].getRange();if(!s||!r)return e;i=e.plusRange(s).plusRange(r)}let n=null;for(let s=0,r=this._pieces.length;si.endLineNumber){n=n||{index:s};break}if(a.removeTokens(i),a.isEmpty()){this._pieces.splice(s,1),s--,r--;continue}if(a.endLineNumberi.endLineNumber){n=n||{index:s};continue}const[c,h]=a.split(i);if(c.isEmpty()){n=n||{index:s};continue}h.isEmpty()||(this._pieces.splice(s,1,c,h),s++,r++,n=n||{index:s})}return n=n||{index:this._pieces.length},t.length>0&&(this._pieces=l.arrayInsert(this._pieces,n.index,t)),i}isComplete(){return this._isComplete}addSparseTokens(e,t){if(t.getTextLength()===0)return t;const i=this._pieces;if(i.length===0)return t;const n=Qw._findFirstPieceWithLine(i,e),s=i[n].getLineTokens(e);if(!s)return t;const r=t.getCount(),a=s.getCount();let c=0;const h=[];let d=0,u=0;const f=(g,m)=>{g<=u||(u=g,h[d++]=g,h[d++]=m)};for(let g=0;g>>0,C=~v>>>0;for(;ct)n=s-1;else{for(;s>i&&e[s-1].startLineNumber<=t&&t<=e[s-1].endLineNumber;)s--;return s}}return i}acceptEdit(e,t,i,n,s){for(let r=0;r>>1;if(t===0&&n[n.length-2]===i)return So;const r=_t.findIndexInTokensArray(n,t),a=r>0?n[r-1<<1]:0,c=n[r<<1];if(id&&(n[h++]=m,n[h++]=n[(g<<1)+1],d=m)}if(h===n.length)return e;const f=new Uint32Array(h);return f.set(n.subarray(0,h),0),f.buffer}static append(e,t){if(t===So)return e;if(e===So)return t;if(e===null)return e;if(t===null)return null;const i=yo(e),n=yo(t),s=n.length>>>1,r=new Uint32Array(i.length+n.length);r.set(i,0);let a=i.length;const c=i[i.length-2];for(let h=0;h>>1;let r=_t.findIndexInTokensArray(n,t);r>0&&n[r-1<<1]===t&&r--;for(let a=r;a0}getTokens(e,t,i){let n=null;if(t1&&(s=Vi.getLanguageId(n[1])!==e),!s)return So}if(!n||n.length===0){const s=new Uint32Array(2);return s[0]=t,s[1]=O1(e),s.buffer}return n[n.length-2]=t,n.byteOffset===0&&n.byteLength===n.buffer.byteLength?n.buffer:n}_ensureLine(e){for(;e>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(e,t){t!==0&&(e+t>this._len&&(t=this._len-e),this._lineTokens.splice(e,t),this._len-=t)}_insertLines(e,t){if(t===0)return;const i=[];for(let n=0;n=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;this._lineTokens[t]=Ds.delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1);return}this._lineTokens[t]=Ds.deleteEnding(this._lineTokens[t],e.startColumn-1);const i=e.endLineNumber-1;let n=null;i=this._len)){if(t===0){this._lineTokens[n]=Ds.insert(this._lineTokens[n],e.column-1,i);return}this._lineTokens[n]=Ds.deleteEnding(this._lineTokens[n],e.column-1),this._lineTokens[n]=Ds.insert(this._lineTokens[n],e.column-1,i),this._insertLines(e.lineNumber,t)}}setMultilineTokens(e,t){if(e.length===0)return{changes:[]};const i=[];for(let n=0,s=e.length;n>>0}class s6 extends y1{constructor(e,t,i,n){super(e,t),this.getLanguageId=i,this._tokenizer=null,this._backgroundTokenizationState=1,this._onDidChangeBackgroundTokenizationState=this._register(new l.Emitter),this.onDidChangeBackgroundTokenizationState=this._onDidChangeBackgroundTokenizationState.event,this._defaultBackgroundTokenizer=null,this._backgroundTokenizer=this._register(new l.MutableDisposable),this._tokens=new mu(this._languageIdCodec),this._debugBackgroundTokenizer=this._register(new l.MutableDisposable),this._attachedViewStates=this._register(new l.DisposableMap),this._register(l.TokenizationRegistry.onDidChange(s=>{const r=this.getLanguageId();s.changedLanguages.indexOf(r)!==-1&&this.todo_resetTokenization()})),this.todo_resetTokenization(),this._register(n.onDidChangeVisibleRanges(({view:s,state:r})=>{if(r){let a=this._attachedViewStates.get(s);a||(a=new SK(()=>this.refreshRanges(a.lineRanges)),this._attachedViewStates.set(s,a)),a.handleStateChange(r)}else this._attachedViewStates.deleteAndDispose(s)}))}todo_resetTokenization(e=!0){this._tokens.flush(),this._debugBackgroundTokens?.flush(),this._debugBackgroundStates&&(this._debugBackgroundStates=new jw(this._textModel.getLineCount())),e&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]});const t=()=>{if(this._textModel.isTooLargeForTokenization())return[null,null];const s=l.TokenizationRegistry.get(this.getLanguageId());if(!s)return[null,null];let r;try{r=s.getInitialState()}catch(a){return l.onUnexpectedError(a),[null,null]}return[s,r]},[i,n]=t();if(i&&n?this._tokenizer=new jK(this._textModel.getLineCount(),i,this._textModel,this._languageIdCodec):this._tokenizer=null,this._backgroundTokenizer.clear(),this._defaultBackgroundTokenizer=null,this._tokenizer){const s={setTokens:r=>{this.setTokens(r)},setFontInfo:r=>{this.setFontInfo(r)},backgroundTokenizationFinished:()=>{if(this._backgroundTokenizationState===2)return;const r=2;this._backgroundTokenizationState=r,this._onDidChangeBackgroundTokenizationState.fire()},setEndState:(r,a)=>{if(!this._tokenizer)return;const c=this._tokenizer.store.getFirstInvalidEndStateLineNumber();c!==null&&r>=c&&this._tokenizer?.store.setEndState(r,a)}};i&&i.createBackgroundTokenizer&&!i.backgroundTokenizerShouldOnlyVerifyTokens&&(this._backgroundTokenizer.value=i.createBackgroundTokenizer(this._textModel,s)),!this._backgroundTokenizer.value&&!this._textModel.isTooLargeForTokenization()&&(this._backgroundTokenizer.value=this._defaultBackgroundTokenizer=new ZK(this._tokenizer,s),this._defaultBackgroundTokenizer.handleChanges()),i?.backgroundTokenizerShouldOnlyVerifyTokens&&i.createBackgroundTokenizer?(this._debugBackgroundTokens=new mu(this._languageIdCodec),this._debugBackgroundStates=new jw(this._textModel.getLineCount()),this._debugBackgroundTokenizer.clear(),this._debugBackgroundTokenizer.value=i.createBackgroundTokenizer(this._textModel,{setTokens:r=>{this._debugBackgroundTokens?.setMultilineTokens(r,this._textModel)},setFontInfo:r=>{this.setFontInfo(r)},backgroundTokenizationFinished(){},setEndState:(r,a)=>{this._debugBackgroundStates?.setEndState(r,a)}})):(this._debugBackgroundTokens=void 0,this._debugBackgroundStates=void 0,this._debugBackgroundTokenizer.value=void 0)}this.refreshAllVisibleLineTokens()}handleDidChangeAttached(){this._defaultBackgroundTokenizer?.handleChanges()}handleDidChangeContent(e){if(e.isFlush)this.todo_resetTokenization(!1);else if(!e.isEolChange){for(const t of e.changes){const[i,n]=fr(t.text);this._tokens.acceptEdit(t.range,i,n),this._debugBackgroundTokens?.acceptEdit(t.range,i,n)}this._debugBackgroundStates?.acceptChanges(e.changes),this._tokenizer&&this._tokenizer.store.acceptChanges(e.changes),this._defaultBackgroundTokenizer?.handleChanges()}}setTokens(e){const{changes:t}=this._tokens.setMultilineTokens(e,this._textModel);return t.length>0&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:t}),{changes:t}}setFontInfo(e){this._onDidChangeFontTokens.fire({changes:e})}refreshAllVisibleLineTokens(){const e=l.LineRange.joinMany([...this._attachedViewStates].map(([t,i])=>i.lineRanges));this.refreshRanges(e)}refreshRanges(e){for(const t of e)this.refreshRange(t.startLineNumber,t.endLineNumberExclusive-1)}refreshRange(e,t){if(!this._tokenizer)return;e=Math.max(1,Math.min(this._textModel.getLineCount(),e)),t=Math.min(this._textModel.getLineCount(),t);const i=new Gw,{heuristicTokens:n}=this._tokenizer.tokenizeHeuristically(i,e,t),s=this.setTokens(i.finalize());if(n)for(const r of s.changes)this._backgroundTokenizer.value?.requestTokens(r.fromLineNumber,r.toLineNumber+1);this._defaultBackgroundTokenizer?.checkFinished()}forceTokenization(e){const t=new Gw;this._tokenizer?.updateTokensUntilLine(t,e),this.setTokens(t.finalize()),this._defaultBackgroundTokenizer?.checkFinished()}hasAccurateTokensForLine(e){return this._tokenizer?this._tokenizer.hasAccurateTokensForLine(e):!0}isCheapToTokenize(e){return this._tokenizer?this._tokenizer.isCheapToTokenize(e):!0}getLineTokens(e){const t=this._textModel.getLineContent(e),i=this._tokens.getTokens(this._textModel.getLanguageId(),e-1,t);if(this._debugBackgroundTokens&&this._debugBackgroundStates&&this._tokenizer&&this._debugBackgroundStates.getFirstInvalidEndStateLineNumberOrMax()>e&&this._tokenizer.store.getFirstInvalidEndStateLineNumberOrMax()>e){const n=this._debugBackgroundTokens.getTokens(this._textModel.getLanguageId(),e-1,t);!i.equals(n)&&this._debugBackgroundTokenizer.value?.reportMismatchingTokens&&this._debugBackgroundTokenizer.value.reportMismatchingTokens(e)}return i}getTokenTypeIfInsertingCharacter(e,t,i){if(!this._tokenizer)return 0;const n=this._textModel.validatePosition(new l.Position(e,t));return this.forceTokenization(n.lineNumber),this._tokenizer.getTokenTypeIfInsertingCharacter(n,i)}tokenizeLinesAt(e,t){return this._tokenizer?(this.forceTokenization(e),this._tokenizer.tokenizeLinesAt(e,t)):null}get hasTokens(){return this._tokens.hasTokens}}var o6=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Om=function(o,e){return function(t,i){e(t,i,o)}},Pm;let Xw=Pm=class extends HI{constructor(e,t,i,n,s,r,a,c){super(),this._textModel=e,this._bracketPairsTextModelPart=t,this._languageId=i,this._attachedViews=n,this._languageService=s,this._languageConfigurationService=r,this._instantiationService=a,this._treeSitterLibraryService=c,this._onDidChangeFontTokens=this._register(new l.Emitter),this.onDidChangeFontTokens=this._onDidChangeFontTokens.event,this._languageIdObs=W(this,this._languageId),this._useTreeSitter=Z(this,d=>{const u=this._languageIdObs.read(d);return this._treeSitterLibraryService.supportsLanguage(u,d)}),this.tokens=Z(this,d=>{let u;return this._useTreeSitter.read(d)?u=d.store.add(this._instantiationService.createInstance(Zw,this._languageIdObs,this._languageService.languageIdCodec,this._textModel,this._attachedViews.visibleLineRanges)):u=d.store.add(new s6(this._languageService.languageIdCodec,this._textModel,()=>this._languageId,this._attachedViews)),d.store.add(u.onDidChangeTokens(f=>{this._emitModelTokensChangedEvent(f)})),d.store.add(u.onDidChangeFontTokens(f=>{this._textModel._isDisposing()||this._onDidChangeFontTokens.fire(f)})),d.store.add(u.onDidChangeBackgroundTokenizationState(f=>{this._bracketPairsTextModelPart.handleDidChangeBackgroundTokenizationState()})),u});let h=!1;this.tokens.recomputeInitiallyAndOnChange(this._store,d=>{h&&d.todo_resetTokenization(),h=!0}),this._semanticTokens=new Qw(this._languageService.languageIdCodec),this._onDidChangeLanguage=this._register(new l.Emitter),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new l.Emitter),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new l.Emitter),this.onDidChangeTokens=this._onDidChangeTokens.event,this._onDidChangeFontTokens=this._register(new l.Emitter),this.onDidChangeFontTokens=this._onDidChangeFontTokens.event}handleLanguageConfigurationServiceChange(e){e.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})}handleDidChangeContent(e){if(e.isFlush)this._semanticTokens.flush();else if(!e.isEolChange)for(const t of e.changes){const[i,n,s]=fr(t.text);this._semanticTokens.acceptEdit(t.range,i,n,s,t.text.length>0?t.text.charCodeAt(0):0)}this.tokens.get().handleDidChangeContent(e)}handleDidChangeAttached(){this.tokens.get().handleDidChangeAttached()}getLineTokens(e){this.validateLineNumber(e);const t=this.tokens.get().getLineTokens(e);return this._semanticTokens.addSparseTokens(e,t)}_emitModelTokensChangedEvent(e){this._textModel._isDisposing()||(this._bracketPairsTextModelPart.handleDidChangeTokens(e),this._onDidChangeTokens.fire(e))}validateLineNumber(e){if(e<1||e>this._textModel.getLineCount())throw new l.BugIndicatingError("Illegal value for lineNumber")}get hasTokens(){return this.tokens.get().hasTokens}resetTokenization(){this.tokens.get().todo_resetTokenization()}get backgroundTokenizationState(){return this.tokens.get().backgroundTokenizationState}forceTokenization(e){this.validateLineNumber(e),this.tokens.get().forceTokenization(e)}hasAccurateTokensForLine(e){return this.validateLineNumber(e),this.tokens.get().hasAccurateTokensForLine(e)}isCheapToTokenize(e){return this.validateLineNumber(e),this.tokens.get().isCheapToTokenize(e)}tokenizeIfCheap(e){this.validateLineNumber(e),this.tokens.get().tokenizeIfCheap(e)}getTokenTypeIfInsertingCharacter(e,t,i){return this.tokens.get().getTokenTypeIfInsertingCharacter(e,t,i)}tokenizeLinesAt(e,t){return this.tokens.get().tokenizeLinesAt(e,t)}setSemanticTokens(e,t){this._semanticTokens.set(e,t,this._textModel),this._emitModelTokensChangedEvent({semanticTokensApplied:e!==null,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(e,t){if(this.hasCompleteSemanticTokens())return;const i=this._textModel.validateRange(this._semanticTokens.setPartial(e,t));this._emitModelTokensChangedEvent({semanticTokensApplied:!0,ranges:[{fromLineNumber:i.startLineNumber,toLineNumber:i.endLineNumber}]})}getWordAtPosition(e){this.assertNotDisposed();const t=this._textModel.validatePosition(e),i=this._textModel.getLineContent(t.lineNumber),n=this.getLineTokens(t.lineNumber),s=n.findTokenIndexAtOffset(t.column-1),[r,a]=Pm._findLanguageBoundaries(n,s),c=l.getWordAtText(t.column,this.getLanguageConfiguration(n.getLanguageId(s)).getWordDefinition(),i.substring(r,a),r);if(c&&c.startColumn<=e.column&&e.column<=c.endColumn)return c;if(s>0&&r===t.column-1){const[h,d]=Pm._findLanguageBoundaries(n,s-1),u=l.getWordAtText(t.column,this.getLanguageConfiguration(n.getLanguageId(s-1)).getWordDefinition(),i.substring(h,d),h);if(u&&u.startColumn<=e.column&&e.column<=u.endColumn)return u}return null}getLanguageConfiguration(e){return this._languageConfigurationService.getLanguageConfiguration(e)}static _findLanguageBoundaries(e,t){const i=e.getLanguageId(t);let n=0;for(let r=t;r>=0&&e.getLanguageId(r)===i;r--)n=e.getStartOffset(r);let s=e.getLineContent().length;for(let r=t,a=e.getCount();r=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},km=function(o,e){return function(t,i){e(t,i,o)}},Fa;function a6(o){const e=new S1;return e.acceptChunk(o),e.finish()}function l6(o){const e=new S1;let t;for(;typeof(t=o.read())=="string";)e.acceptChunk(t);return e.finish()}function P1(o,e){let t;return typeof o=="string"?t=a6(o):l.isITextSnapshot(o)?t=l6(o):t=o,t.create(e)}let Fm=0;const c6=999,h6=1e4,d6=300;class u6{constructor(e){this._source=e,this._eos=!1}read(){if(this._eos)return null;const e=[];let t=0,i=0;do{const n=this._source.read();if(n===null)return this._eos=!0,t===0?null:e.join("");if(n.length>0&&(e[t++]=n,i+=n.length),i>=64*1024)return e.join("")}while(!0)}}const pu=()=>{throw new Error("Invalid change accessor")};_.TextModel=(os=class extends l.Disposable{static resolveOptions(e,t){if(t.detectIndentation){const i=r1(e,t.tabSize,t.insertSpaces);return new l.TextModelResolvedOptions({tabSize:i.tabSize,indentSize:"tabSize",insertSpaces:i.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}return new l.TextModelResolvedOptions(t)}get onDidChangeLanguage(){return this._tokenizationTextModelPart.onDidChangeLanguage}get onDidChangeLanguageConfiguration(){return this._tokenizationTextModelPart.onDidChangeLanguageConfiguration}get onDidChangeTokens(){return this._tokenizationTextModelPart.onDidChangeTokens}get onDidChangeOptions(){return this._onDidChangeOptions.event}get onDidChangeAttached(){return this._onDidChangeAttached.event}get onDidChangeLineHeight(){return this._onDidChangeLineHeight.event}get onDidChangeFont(){return this._onDidChangeFont.event}onDidChangeContent(e){return this._eventEmitter.event(t=>e(t.contentChangedEvent))}_isDisposing(){return this.__isDisposing}get tokenization(){return this._tokenizationTextModelPart}get bracketPairs(){return this._bracketPairs}get guides(){return this._guidesTextModelPart}constructor(e,t,i,n=null,s,r,a,c){super(),this._undoRedoService=s,this._languageService=r,this._languageConfigurationService=a,this.instantiationService=c,this._onWillDispose=this._register(new l.Emitter),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new b6((m,p,b)=>this.handleBeforeFireDecorationsChangedEvent(m,p,b))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeOptions=this._register(new l.Emitter),this._onDidChangeAttached=this._register(new l.Emitter),this._onDidChangeLineHeight=this._register(new l.Emitter),this._onDidChangeFont=this._register(new l.Emitter),this._eventEmitter=this._register(new C6),this._languageSelectionListener=this._register(new l.MutableDisposable),this._deltaDecorationCallCnt=0,this._attachedViews=this._register(new CK),this._viewModels=new Set,Fm++,this.id="$model"+Fm,this.isForSimpleWidget=i.isForSimpleWidget,typeof n>"u"||n===null?this._associatedResource=l.URI.parse("inmemory://model/"+Fm):this._associatedResource=n,this._attachedEditorCount=0;const{textBuffer:h,disposable:d}=P1(e,i.defaultEOL);this._buffer=h,this._bufferDisposable=d;const u=this._buffer.getLineCount(),f=this._buffer.getValueLengthInRange(new l.Range(1,1,u,this._buffer.getLineLength(u)+1),0);i.largeFileOptimizations?(this._isTooLargeForTokenization=f>Fa.LARGE_FILE_SIZE_THRESHOLD||u>Fa.LARGE_FILE_LINE_COUNT_THRESHOLD,this._isTooLargeForHeapOperation=f>Fa.LARGE_FILE_HEAP_OPERATION_THRESHOLD):(this._isTooLargeForTokenization=!1,this._isTooLargeForHeapOperation=!1),this._options=Fa.resolveOptions(this._buffer,i);const g=typeof t=="string"?t:t.languageId;typeof t!="string"&&(this._languageSelectionListener.value=t.onDidChange(()=>this._setLanguage(t.languageId))),this._bracketPairs=this._register(new Y5(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new B$(this,this._languageConfigurationService)),this._decorationProvider=this._register(new Q5(this)),this._tokenizationTextModelPart=this.instantiationService.createInstance(Xw,this,this._bracketPairs,g,this._attachedViews),this._fontTokenDecorationsProvider=this._register(new $w(this,this._tokenizationTextModelPart)),this._isTooLargeForSyncing=f>Fa._MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this.__isDisposing=!1,this._instanceId=l.singleLetterHash(Fm),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new F1,this._commandManager=new Rw(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._register(this._decorationProvider.onDidChange(()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()})),this._register(this._fontTokenDecorationsProvider.onDidChangeLineHeight(m=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._fireOnDidChangeLineHeight(m),this._onDidChangeDecorations.endDeferredEmit()})),this._register(this._fontTokenDecorationsProvider.onDidChangeFont(m=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._fireOnDidChangeFont(m),this._onDidChangeDecorations.endDeferredEmit()})),this._languageService.requestRichLanguageFeatures(g),this._register(this._languageConfigurationService.onDidChange(m=>{this._bracketPairs.handleLanguageConfigurationServiceChange(m),this._tokenizationTextModelPart.handleLanguageConfigurationServiceChange(m)}))}dispose(){this.__isDisposing=!0,this._onWillDispose.fire(),this._tokenizationTextModelPart.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this.__isDisposing=!1;const e=new Rc([],"",` +`,!1,!1,!0,!0);e.dispose(),this._buffer=e,this._bufferDisposable=l.Disposable.None}_assertNotDisposed(){if(this._isDisposed)throw new l.BugIndicatingError("Model is disposed!")}registerViewModel(e){this._viewModels.add(e)}unregisterViewModel(e){this._viewModels.delete(e)}getTextBuffer(){return this._assertNotDisposed(),this._buffer}_emitContentChangedEvent(e,t,i=null){if(this.__isDisposing)return;this._tokenizationTextModelPart.handleDidChangeContent(t),this._bracketPairs.handleDidChangeContent(t),this._fontTokenDecorationsProvider.handleDidChangeContent(t);const n=new Ra(e,t);i&&(n.rawContentChangedEvent.resultingSelection=i),this._onDidChangeContentOrInjectedText(n),this._eventEmitter.fire(n)}setValue(e,t=$i.setValue()){if(this._assertNotDisposed(),e==null)throw l.illegalArgument();const{textBuffer:i,disposable:n}=P1(e,this._options.defaultEOL);this._setValueFromTextBuffer(i,n,t)}_createContentChanged2(e,t,i,n,s,r,a,c,h,d){return{changes:[{range:e,rangeOffset:t,rangeLength:i,text:s}],eol:this._buffer.getEOL(),isEolChange:h,versionId:this.getVersionId(),isUndoing:r,isRedoing:a,isFlush:c,detailedReasons:[d],detailedReasonsChangeLengths:[1]}}_setValueFromTextBuffer(e,t,i){this._assertNotDisposed();const n=this.getFullModelRange(),s=this.getValueLengthInRange(n),r=this.getLineCount(),a=this.getLineMaxColumn(r);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=t,this._increaseVersionId(),this._decorations=Object.create(null),this._decorationsTree=new F1,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new Dc([new d5],this._versionId,!1,!1),this._createContentChanged2(new l.Range(1,1,r,a),0,s,new l.Position(r,a),this.getValue(),!1,!1,!0,!1,i))}setEOL(e){this._assertNotDisposed();const t=e===1?`\r +`:` +`;if(this._buffer.getEOL()===t)return;const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),s=this.getLineCount(),r=this.getLineMaxColumn(s);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new Dc([new p5],this._versionId,!1,!1),this._createContentChanged2(new l.Range(1,1,s,r),0,n,new l.Position(s,r),this.getValue(),!1,!1,!1,!0,$i.eolChange()))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder();for(let i=0,n=t.length;i0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isTooLargeForHeapOperation(){return this._isTooLargeForHeapOperation}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let e=0,t=0;const i=this._buffer.getLineCount();for(let n=1;n<=i;n++){const s=this._buffer.getLineLength(n);s>=h6?t+=s:e+=s}return t>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();const t=typeof e.tabSize<"u"?e.tabSize:this._options.tabSize,i=typeof e.indentSize<"u"?e.indentSize:this._options.originalIndentSize,n=typeof e.insertSpaces<"u"?e.insertSpaces:this._options.insertSpaces,s=typeof e.trimAutoWhitespace<"u"?e.trimAutoWhitespace:this._options.trimAutoWhitespace,r=typeof e.bracketColorizationOptions<"u"?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,a=new l.TextModelResolvedOptions({tabSize:t,indentSize:i,insertSpaces:n,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:s,bracketPairColorizationOptions:r});if(this._options.equals(a))return;const c=this._options.createChangeEvent(a);this._options=a,this._bracketPairs.handleDidChangeOptions(c),this._decorationProvider.handleDidChangeOptions(c),this._onDidChangeOptions.fire(c)}detectIndentation(e,t){this._assertNotDisposed();const i=r1(this._buffer,t,e);this.updateOptions({insertSpaces:i.insertSpaces,tabSize:i.tabSize,indentSize:i.tabSize})}normalizeIndentation(e){return this._assertNotDisposed(),xv(e,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(e=null){const t=this.findMatches(l.UNUSUAL_LINE_TERMINATORS.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(e,t.map(i=>({range:i.range,text:null})),()=>null)}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(e){this._assertNotDisposed();const t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}getPositionAt(e){this._assertNotDisposed();const t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,t=!1){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new l.BugIndicatingError("Operation would exceed heap memory limits");const i=this.getFullModelRange(),n=this.getValueInRange(i,e);return t?this._buffer.getBOM()+n:n}createSnapshot(e=!1){return new u6(this._buffer.createSnapshot(e))}getValueLength(e,t=!1){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i,e);return t?this._buffer.getBOM().length+n:n}getValueInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),t)}getValueLengthInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),t)}getCharacterCountInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),t)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new l.BugIndicatingError("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new l.BugIndicatingError("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new l.BugIndicatingError("Operation would exceed heap memory limits");return this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),this._buffer.getEOL()===` +`?0:1}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new l.BugIndicatingError("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new l.BugIndicatingError("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new l.BugIndicatingError("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){const t=this._buffer.getLineCount(),i=e.startLineNumber,n=e.startColumn;let s=Math.floor(typeof i=="number"&&!isNaN(i)?i:1),r=Math.floor(typeof n=="number"&&!isNaN(n)?n:1);if(s<1)s=1,r=1;else if(s>t)s=t,r=this.getLineMaxColumn(s);else if(r<=1)r=1;else{const u=this.getLineMaxColumn(s);r>=u&&(r=u)}const a=e.endLineNumber,c=e.endColumn;let h=Math.floor(typeof a=="number"&&!isNaN(a)?a:1),d=Math.floor(typeof c=="number"&&!isNaN(c)?c:1);if(h<1)h=1,d=1;else if(h>t)h=t,d=this.getLineMaxColumn(h);else if(d<=1)d=1;else{const u=this.getLineMaxColumn(h);d>=u&&(d=u)}return i===s&&n===r&&a===h&&c===d&&e instanceof l.Range&&!(e instanceof l.Selection)?e:new l.Range(s,r,h,d)}_isValidPosition(e,t,i){if(typeof e!="number"||typeof t!="number"||isNaN(e)||isNaN(t)||e<1||t<1||(e|0)!==e||(t|0)!==t)return!1;const n=this._buffer.getLineCount();if(e>n)return!1;if(t===1)return!0;const s=this.getLineMaxColumn(e);if(t>s)return!1;if(i===1){const r=this._buffer.getLineCharCode(e,t-2);if(l.isHighSurrogate(r))return!1}return!0}_validatePosition(e,t,i){const n=Math.floor(typeof e=="number"&&!isNaN(e)?e:1),s=Math.floor(typeof t=="number"&&!isNaN(t)?t:1),r=this._buffer.getLineCount();if(n<1)return new l.Position(1,1);if(n>r)return new l.Position(r,this.getLineMaxColumn(r));if(s<=1)return new l.Position(n,1);const a=this.getLineMaxColumn(n);if(s>=a)return new l.Position(n,a);if(i===1){const c=this._buffer.getLineCharCode(n,s-2);if(l.isHighSurrogate(c))return new l.Position(n,s-1)}return new l.Position(n,s)}validatePosition(e){return this._assertNotDisposed(),e instanceof l.Position&&this._isValidPosition(e.lineNumber,e.column,1)?e:this._validatePosition(e.lineNumber,e.column,1)}isValidRange(e){return this._isValidRange(e,1)}_isValidRange(e,t){const i=e.startLineNumber,n=e.startColumn,s=e.endLineNumber,r=e.endColumn;if(!this._isValidPosition(i,n,0)||!this._isValidPosition(s,r,0))return!1;if(t===1){const a=n>1?this._buffer.getLineCharCode(i,n-2):0,c=r>1&&r<=this._buffer.getLineLength(s)?this._buffer.getLineCharCode(s,r-2):0,h=l.isHighSurrogate(a),d=l.isHighSurrogate(c);return!h&&!d}return!0}validateRange(e){if(this._assertNotDisposed(),e instanceof l.Range&&!(e instanceof l.Selection)&&this._isValidRange(e,1))return e;const i=this._validatePosition(e.startLineNumber,e.startColumn,0),n=this._validatePosition(e.endLineNumber,e.endColumn,0),s=i.lineNumber,r=i.column,a=n.lineNumber,c=n.column;{const h=r>1?this._buffer.getLineCharCode(s,r-2):0,d=c>1&&c<=this._buffer.getLineLength(a)?this._buffer.getLineCharCode(a,c-2):0,u=l.isHighSurrogate(h),f=l.isHighSurrogate(d);return!u&&!f?new l.Range(s,r,a,c):s===a&&r===c?new l.Range(s,r-1,a,c-1):u&&f?new l.Range(s,r-1,a,c+1):u?new l.Range(s,r-1,a,c):new l.Range(s,r,a,c+1)}}modifyPosition(e,t){this._assertNotDisposed();const i=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,i)))}getFullModelRange(){this._assertNotDisposed();const e=this.getLineCount();return new l.Range(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,t,i,n){return this._buffer.findMatchesLineByLine(e,t,i,n)}findMatches(e,t,i,n,s,r,a=c6){this._assertNotDisposed();let c=null;t!==null&&typeof t!="boolean"&&(Array.isArray(t)||(t=[t]),t.every(u=>l.Range.isIRange(u))&&(c=t.map(u=>this.validateRange(u)))),c===null&&(c=[this.getFullModelRange()]),c=c.sort((u,f)=>u.startLineNumber-f.startLineNumber||u.startColumn-f.startColumn);const h=[];h.push(c.reduce((u,f)=>l.Range.areIntersecting(u,f)?u.plusRange(f):(h.push(u),f)));let d;if(!i&&e.indexOf(` +`)<0){const f=new l.SearchParams(e,i,n,s).parseSearchRequest();if(!f)return[];d=g=>this.findMatchesLineByLine(g,f,r,a)}else d=u=>l.TextModelSearch.findMatches(this,new l.SearchParams(e,i,n,s),u,r,a);return h.map(d).reduce((u,f)=>u.concat(f),[])}findNextMatch(e,t,i,n,s,r){this._assertNotDisposed();const a=this.validatePosition(t);if(!i&&e.indexOf(` +`)<0){const h=new l.SearchParams(e,i,n,s).parseSearchRequest();if(!h)return null;const d=this.getLineCount();let u=new l.Range(a.lineNumber,a.column,d,this.getLineMaxColumn(d)),f=this.findMatchesLineByLine(u,h,r,1);return l.TextModelSearch.findNextMatch(this,new l.SearchParams(e,i,n,s),a,r),f.length>0||(u=new l.Range(1,1,a.lineNumber,this.getLineMaxColumn(a.lineNumber)),f=this.findMatchesLineByLine(u,h,r,1),f.length>0)?f[0]:null}return l.TextModelSearch.findNextMatch(this,new l.SearchParams(e,i,n,s),a,r)}findPreviousMatch(e,t,i,n,s,r){this._assertNotDisposed();const a=this.validatePosition(t);return l.TextModelSearch.findPreviousMatch(this,new l.SearchParams(e,i,n,s),a,r)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(e){if((this.getEOL()===` +`?0:1)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){if(e instanceof l.ValidAnnotatedEditOperation)return e;const t=this.validateRange(e.range);let i=e.text;if(i){const n=i.length>0&&i.charCodeAt(i.length-1)===13;this.getEOL()===`\r +`&&n&&t.endColumn===this.getLineMaxColumn(t.endLineNumber)&&(i=i.substring(0,i.length-1))}return new l.ValidAnnotatedEditOperation(e.identifier||null,t,i,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}_validateEditOperations(e){const t=[];for(let i=0,n=e.length;i({range:i.range,text:i.text})),null)}pushEditOperations(e,t,i,n,s){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(e,this._validateEditOperations(t),i,n,s)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_pushEditOperations(e,t,i,n,s){if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){const r=t.map(c=>({range:this.validateRange(c.range),text:c.text}));let a=!0;if(e)for(let c=0,h=e.length;cd.endLineNumber,b=d.startLineNumber>m.endLineNumber;if(!p&&!b){u=!0;break}}if(!u){a=!1;break}}if(a)for(let c=0,h=this._trimAutoWhitespaceLines.length;cp.endLineNumber)&&!(d===p.startLineNumber&&p.startColumn===u&&p.isEmpty()&&b&&b.length>0&&b.charAt(0)===` +`)&&!(d===p.startLineNumber&&p.startColumn===1&&p.isEmpty()&&b&&b.length>0&&b.charAt(b.length-1)===` +`)){f=!1;break}}if(f){const g=new l.Range(d,1,d,u);t.push(new l.ValidAnnotatedEditOperation(null,g,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,i,n,s)}_applyUndo(e,t,i,n){const s=e.map(r=>{const a=this.getPositionAt(r.newPosition),c=this.getPositionAt(r.newEnd);return{range:new l.Range(a.lineNumber,a.column,c.lineNumber,c.column),text:r.oldText}});this._applyUndoRedoEdits(s,t,!0,!1,i,n)}_applyRedo(e,t,i,n){const s=e.map(r=>{const a=this.getPositionAt(r.oldPosition),c=this.getPositionAt(r.oldEnd);return{range:new l.Range(a.lineNumber,a.column,c.lineNumber,c.column),text:r.newText}});this._applyUndoRedoEdits(s,t,!1,!0,i,n)}_applyUndoRedoEdits(e,t,i,n,s,r){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=i,this._isRedoing=n;const a=this._validateEditOperations(e);this._doApplyEdits(a,!1,$i.applyEdits(),r),this.setEOL(t),this._overwriteAlternativeVersionId(s)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(r),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,t,i){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const n=this._validateEditOperations(e);return this._doApplyEdits(n,t??!1,i??$i.applyEdits())}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,t,i,n=null){const s=this._buffer.getLineCount(),r=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),a=this._buffer.getLineCount(),c=r.changes;if(this._trimAutoWhitespaceLines=r.trimAutoWhitespaceLineNumbers,c.length!==0){for(let u=0,f=c.length;u=0;D--){const x=p+D,I=L+D;h.push(new PT(x,I))}if(w0){const s=Array.from(e).map(r=>new PT(r,r));this._onDidChangeContentOrInjectedText(new kT(s))}this._fireOnDidChangeLineHeight(t),this._fireOnDidChangeFont(i)}_fireOnDidChangeLineHeight(e){if(e&&e.size>0){const i=Array.from(e).map(n=>new u5(n.ownerId,n.decorationId,n.lineNumber,n.lineHeight));this._onDidChangeLineHeight.fire(new FT(i))}}_fireOnDidChangeFont(e){if(e&&e.size>0){const i=Array.from(e).map(n=>new f5(n.ownerId,n.lineNumber));this._onDidChangeFont.fire(new BT(i))}}_onDidChangeContentOrInjectedText(e){for(const t of this._viewModels)try{t.onDidChangeContentOrInjectedText(e)}catch(i){l.onUnexpectedError(i)}for(const t of this._viewModels)try{t.emitContentChangeEvent(e)}catch(i){l.onUnexpectedError(i)}}changeDecorations(e,t=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,t){const i={addDecoration:(s,r)=>this._deltaDecorationsImpl(e,[],[{range:s,options:r}])[0],changeDecoration:(s,r)=>{this._changeDecorationImpl(e,s,r)},changeDecorationOptions:(s,r)=>{this._changeDecorationOptionsImpl(e,s,V1(r))},removeDecoration:s=>{this._deltaDecorationsImpl(e,[s],[])},deltaDecorations:(s,r)=>s.length===0&&r.length===0?[]:this._deltaDecorationsImpl(e,s,r)};let n=null;try{n=t(i)}catch(s){l.onUnexpectedError(s)}return i.addDecoration=pu,i.changeDecoration=pu,i.changeDecorationOptions=pu,i.removeDecoration=pu,i.deltaDecorations=pu,n}deltaDecorations(e,t,i=0){if(this._assertNotDisposed(),e||(e=[]),e.length===0&&t.length===0)return[];try{return this._deltaDecorationCallCnt++,this._deltaDecorationCallCnt>1&&(console.warn("Invoking deltaDecorations recursively could lead to leaking decorations."),l.onUnexpectedError(new Error("Invoking deltaDecorations recursively could lead to leaking decorations."))),this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(i,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit(),this._deltaDecorationCallCnt--}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,t,i){const n=e?this._decorations[e]:null;if(!n)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:z1[i]}],!0)[0]:null;if(!t)return this._decorationsTree.delete(n),delete this._decorations[n.id],null;const s=this._validateRangeRelaxedNoAllocations(t),r=this._buffer.getOffsetAt(s.startLineNumber,s.startColumn),a=this._buffer.getOffsetAt(s.endLineNumber,s.endColumn);return this._decorationsTree.delete(n),n.reset(this.getVersionId(),r,a,s),n.setOptions(z1[i]),this._decorationsTree.insert(n),n.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;const t=this._decorationsTree.collectNodesFromOwner(e);for(let i=0,n=t.length;ithis.getLineCount()?[]:this.getLinesDecorations(e,e,t,i,n)}getLinesDecorations(e,t,i=0,n=!1,s=!1,r=!1){const a=this.getLineCount(),c=Math.min(a,Math.max(1,e)),h=Math.min(a,Math.max(1,t)),d=this.getLineMaxColumn(h),u=new l.Range(c,1,h,d),f=this._getDecorationsInRange(u,i,n,s,r);return l.pushMany(f,this._decorationProvider.getDecorationsInRange(u,i,n,s)),l.pushMany(f,this._fontTokenDecorationsProvider.getDecorationsInRange(u,i,n,s)),f}getDecorationsInRange(e,t=0,i=!1,n=!1,s=!1,r=!1){const a=this.validateRange(e),c=this._getDecorationsInRange(a,t,i,n,r);return l.pushMany(c,this._decorationProvider.getDecorationsInRange(a,t,i,n,s)),l.pushMany(c,this._fontTokenDecorationsProvider.getDecorationsInRange(a,t,i,n,s)),c}getOverviewRulerDecorations(e=0,t=!1,i=!1){return this._decorationsTree.getAll(this,e,t,i,!0,!1)}getInjectedTextDecorations(e=0){return this._decorationsTree.getAllInjectedText(this,e)}getCustomLineHeightsDecorations(e=0){const t=this._decorationsTree.getAllCustomLineHeights(this,e);return l.pushMany(t,this._fontTokenDecorationsProvider.getAllDecorations(e)),t}getCustomLineHeightsDecorationsInRange(e,t=0){const i=this._decorationsTree.getCustomLineHeightsInInterval(this,this.getOffsetAt(e.getStartPosition()),this.getOffsetAt(e.getEndPosition()),t);return l.pushMany(i,this._fontTokenDecorationsProvider.getDecorationsInRange(e,t)),i}getLineInjectedText(e,t=0){const i=this._buffer.getOffsetAt(e,1),n=i+this._buffer.getLineLength(e),s=this._decorationsTree.getInjectedTextInInterval(this,i,n,t);return mo.fromDecorations(s).filter(r=>r.lineNumber===e)}getFontDecorationsInRange(e,t=0){const i=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),n=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getFontDecorationsInInterval(this,i,n,t)}getAllDecorations(e=0,t=!1,i=!1){let n=this._decorationsTree.getAll(this,e,t,i,!1,!1);return n=n.concat(this._decorationProvider.getAllDecorations(e,t)),n=n.concat(this._fontTokenDecorationsProvider.getAllDecorations(e,t)),n}getAllMarginDecorations(e=0){return this._decorationsTree.getAll(this,e,!1,!1,!1,!0)}_getDecorationsInRange(e,t,i,n,s){const r=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),a=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getAllInInterval(this,r,a,t,i,n,s)}getRangeAt(e,t){return this._buffer.getRangeAt(e,t-e)}_changeDecorationImpl(e,t,i){const n=this._decorations[t];if(!n)return;if(n.options.after){const c=this.getDecorationRange(t);this._onDidChangeDecorations.recordLineAffectedByInjectedText(c.endLineNumber)}if(n.options.before){const c=this.getDecorationRange(t);this._onDidChangeDecorations.recordLineAffectedByInjectedText(c.startLineNumber)}if(n.options.lineHeight!==null){const c=this.getDecorationRange(t);this._onDidChangeDecorations.recordLineAffectedByLineHeightChange(e,t,c.startLineNumber,null)}if(n.options.affectsFont){const c=this.getDecorationRange(t);this._onDidChangeDecorations.recordLineAffectedByFontChange(e,n.id,c.startLineNumber)}const s=this._validateRangeRelaxedNoAllocations(i),r=this._buffer.getOffsetAt(s.startLineNumber,s.startColumn),a=this._buffer.getOffsetAt(s.endLineNumber,s.endColumn);this._decorationsTree.delete(n),n.reset(this.getVersionId(),r,a,s),this._decorationsTree.insert(n),this._onDidChangeDecorations.checkAffectedAndFire(n.options),n.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(s.endLineNumber),n.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(s.startLineNumber),n.options.lineHeight!==null&&this._onDidChangeDecorations.recordLineAffectedByLineHeightChange(e,t,s.startLineNumber,n.options.lineHeight),n.options.affectsFont&&this._onDidChangeDecorations.recordLineAffectedByFontChange(e,n.id,s.startLineNumber)}_changeDecorationOptionsImpl(e,t,i){const n=this._decorations[t];if(!n)return;const s=!!(n.options.overviewRuler&&n.options.overviewRuler.color),r=!!(i.overviewRuler&&i.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(n.options),this._onDidChangeDecorations.checkAffectedAndFire(i),n.options.after||i.after){const h=this._decorationsTree.getNodeRange(this,n);this._onDidChangeDecorations.recordLineAffectedByInjectedText(h.endLineNumber)}if(n.options.before||i.before){const h=this._decorationsTree.getNodeRange(this,n);this._onDidChangeDecorations.recordLineAffectedByInjectedText(h.startLineNumber)}if(n.options.lineHeight!==null||i.lineHeight!==null){const h=this._decorationsTree.getNodeRange(this,n);this._onDidChangeDecorations.recordLineAffectedByLineHeightChange(e,t,h.startLineNumber,i.lineHeight)}if(n.options.affectsFont||i.affectsFont){const h=this._decorationsTree.getNodeRange(this,n);this._onDidChangeDecorations.recordLineAffectedByFontChange(e,t,h.startLineNumber)}const a=s!==r,c=g6(i)!==Bm(n);a||c?(this._decorationsTree.delete(n),n.setOptions(i),this._decorationsTree.insert(n)):n.setOptions(i)}_deltaDecorationsImpl(e,t,i,n=!1){const s=this.getVersionId(),r=t.length;let a=0;const c=i.length;let h=0;this._onDidChangeDecorations.beginDeferredEmit();try{const d=new Array(c);for(;athis._setLanguage(e.languageId,t)),this._setLanguage(e.languageId,t))}_setLanguage(e,t){this.tokenization.setLanguageId(e,t),this._languageService.requestRichLanguageFeatures(e)}getLanguageIdAtPosition(e,t){return this.tokenization.getLanguageIdAtPosition(e,t)}getWordAtPosition(e){return this._tokenizationTextModelPart.getWordAtPosition(e)}getWordUntilPosition(e){return this._tokenizationTextModelPart.getWordUntilPosition(e)}normalizePosition(e,t){return e}getLineIndentColumn(e){return k1(this.getLineContent(e))+1}toString(){return`TextModel(${this.uri.toString()})`}},Fa=os,os._MODEL_SYNC_LIMIT=50*1024*1024,os.LARGE_FILE_SIZE_THRESHOLD=20*1024*1024,os.LARGE_FILE_LINE_COUNT_THRESHOLD=300*1e3,os.LARGE_FILE_HEAP_OPERATION_THRESHOLD=256*1024*1024,os.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:zt.tabSize,indentSize:zt.indentSize,insertSpaces:zt.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:zt.trimAutoWhitespace,largeFileOptimizations:zt.largeFileOptimizations,bracketPairColorizationOptions:zt.bracketPairColorizationOptions},os),_.TextModel=Fa=r6([km(4,bw),km(5,yt),km(6,ms),km(7,me)],_.TextModel);function f6(o,e,t){let i;if(t){const n=[];for(let s=0;s{n.push({offset:r,text:c.substring(e[s].content),tokenMetadata:h.metadata})}):n.push({offset:r,text:e[s].content,tokenMetadata:_t.defaultTokenMetadata})}i=o.withInserted(n)}else i=o;return i}function k1(o){let e=0;for(const t of o)if(t===" "||t===" ")e++;else break;return e}function Jw(o){return!!(o.options.overviewRuler&&o.options.overviewRuler.color)}function g6(o){return!!o.after||!!o.before}function Bm(o){return!!o.options.after||!!o.options.before}class F1{constructor(){this._decorationsTree0=new Mw,this._decorationsTree1=new Mw,this._injectedTextDecorationsTree=new Mw}ensureAllNodesHaveRanges(e){this.getAll(e,0,!1,!1,!1,!1)}_ensureNodesHaveRanges(e,t){for(const i of t)i.range===null&&(i.range=e.getRangeAt(i.cachedAbsoluteStart,i.cachedAbsoluteEnd));return t}getAllInInterval(e,t,i,n,s,r,a){const c=e.getVersionId(),h=this._intervalSearch(t,i,n,s,r,c,a);return this._ensureNodesHaveRanges(e,h)}_intervalSearch(e,t,i,n,s,r,a){const c=this._decorationsTree0.intervalSearch(e,t,i,n,s,r,a),h=this._decorationsTree1.intervalSearch(e,t,i,n,s,r,a),d=this._injectedTextDecorationsTree.intervalSearch(e,t,i,n,s,r,a);return c.concat(h).concat(d)}getInjectedTextInInterval(e,t,i,n){const s=e.getVersionId(),r=this._injectedTextDecorationsTree.intervalSearch(t,i,n,!1,!1,s,!1);return this._ensureNodesHaveRanges(e,r).filter(a=>a.options.showIfCollapsed||!a.range.isEmpty())}getFontDecorationsInInterval(e,t,i,n){const s=e.getVersionId(),r=this._decorationsTree0.intervalSearch(t,i,n,!1,!1,s,!1);return this._ensureNodesHaveRanges(e,r).filter(a=>a.options.affectsFont)}getAllInjectedText(e,t){const i=e.getVersionId(),n=this._injectedTextDecorationsTree.search(t,!1,!1,i,!1);return this._ensureNodesHaveRanges(e,n).filter(s=>s.options.showIfCollapsed||!s.range.isEmpty())}getAllCustomLineHeights(e,t){const i=e.getVersionId(),n=this._search(t,!1,!1,!1,i,!1);return this._ensureNodesHaveRanges(e,n).filter(s=>typeof s.options.lineHeight=="number")}getCustomLineHeightsInInterval(e,t,i,n){const s=e.getVersionId(),r=this._intervalSearch(t,i,n,!1,!1,s,!1);return this._ensureNodesHaveRanges(e,r).filter(a=>typeof a.options.lineHeight=="number")}getAll(e,t,i,n,s,r){const a=e.getVersionId(),c=this._search(t,i,n,s,a,r);return this._ensureNodesHaveRanges(e,c)}_search(e,t,i,n,s,r){if(n)return this._decorationsTree1.search(e,t,i,s,r);{const a=this._decorationsTree0.search(e,t,i,s,r),c=this._decorationsTree1.search(e,t,i,s,r),h=this._injectedTextDecorationsTree.search(e,t,i,s,r);return a.concat(c).concat(h)}}collectNodesFromOwner(e){const t=this._decorationsTree0.collectNodesFromOwner(e),i=this._decorationsTree1.collectNodesFromOwner(e),n=this._injectedTextDecorationsTree.collectNodesFromOwner(e);return t.concat(i).concat(n)}collectNodesPostOrder(){const e=this._decorationsTree0.collectNodesPostOrder(),t=this._decorationsTree1.collectNodesPostOrder(),i=this._injectedTextDecorationsTree.collectNodesPostOrder();return e.concat(t).concat(i)}insert(e){Bm(e)?this._injectedTextDecorationsTree.insert(e):Jw(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)}delete(e){Bm(e)?this._injectedTextDecorationsTree.delete(e):Jw(e)?this._decorationsTree1.delete(e):this._decorationsTree0.delete(e)}getNodeRange(e,t){const i=e.getVersionId();return t.cachedVersionId!==i&&this._resolveNode(t,i),t.range===null&&(t.range=e.getRangeAt(t.cachedAbsoluteStart,t.cachedAbsoluteEnd)),t.range}_resolveNode(e,t){Bm(e)?this._injectedTextDecorationsTree.resolveNode(e,t):Jw(e)?this._decorationsTree1.resolveNode(e,t):this._decorationsTree0.resolveNode(e,t)}acceptReplace(e,t,i,n){this._decorationsTree0.acceptReplace(e,t,i,n),this._decorationsTree1.acceptReplace(e,t,i,n),this._injectedTextDecorationsTree.acceptReplace(e,t,i,n)}}function xs(o){return o.replace(/[^a-z0-9\-_]/gi," ")}class B1{constructor(e){this.color=e.color||"",this.darkColor=e.darkColor||""}}class m6 extends B1{constructor(e){super(e),this._resolvedColor=null,this.position=typeof e.position=="number"?e.position:l.OverviewRulerLane.Center}getColor(e){return this._resolvedColor||(rr(e.type)&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(e,t){if(typeof e=="string")return e;const i=e?t.getColor(e.id):null;return i?i.toString():""}}class p6{constructor(e){this.position=e?.position??l.GlyphMarginLane.Center,this.persistLane=e?.persistLane}}class _6 extends B1{constructor(e){super(e),this.position=e.position,this.sectionHeaderStyle=e.sectionHeaderStyle??null,this.sectionHeaderText=e.sectionHeaderText??null}getColor(e){return this._resolvedColor||(rr(e.type)&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(e,t){return typeof e=="string"?l.Color.fromHex(e):t.getColor(e.id)}}class Mc{static from(e){return e instanceof Mc?e:new Mc(e)}constructor(e){this.content=e.content||"",this.tokens=e.tokens??null,this.inlineClassName=e.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.attachedData=e.attachedData||null,this.cursorStops=e.cursorStops||null}}class Ct{static register(e){return new Ct(e)}static createDynamic(e){return new Ct(e)}constructor(e){this.description=e.description,this.blockClassName=e.blockClassName?xs(e.blockClassName):null,this.blockDoesNotCollapse=e.blockDoesNotCollapse??null,this.blockIsAfterEnd=e.blockIsAfterEnd??null,this.blockPadding=e.blockPadding??null,this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?xs(e.className):null,this.shouldFillLineOnLineBreak=e.shouldFillLineOnLineBreak??null,this.hoverMessage=e.hoverMessage||null,this.glyphMarginHoverMessage=e.glyphMarginHoverMessage||null,this.lineNumberHoverMessage=e.lineNumberHoverMessage||null,this.isWholeLine=e.isWholeLine||!1,this.lineHeight=e.lineHeight?Math.min(e.lineHeight,d6):null,this.fontSize=e.fontSize||null,this.affectsFont=!!e.fontSize||!!e.fontFamily||!!e.fontWeight||!!e.fontStyle,this.showIfCollapsed=e.showIfCollapsed||!1,this.collapseOnReplaceEdit=e.collapseOnReplaceEdit||!1,this.overviewRuler=e.overviewRuler?new m6(e.overviewRuler):null,this.minimap=e.minimap?new _6(e.minimap):null,this.glyphMargin=e.glyphMarginClassName?new p6(e.glyphMargin):null,this.glyphMarginClassName=e.glyphMarginClassName?xs(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?xs(e.linesDecorationsClassName):null,this.lineNumberClassName=e.lineNumberClassName?xs(e.lineNumberClassName):null,this.linesDecorationsTooltip=e.linesDecorationsTooltip?l.htmlAttributeEncodeValue(e.linesDecorationsTooltip):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?xs(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?xs(e.marginClassName):null,this.inlineClassName=e.inlineClassName?xs(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?xs(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?xs(e.afterContentClassName):null,this.after=e.after?Mc.from(e.after):null,this.before=e.before?Mc.from(e.before):null,this.hideInCommentTokens=e.hideInCommentTokens??!1,this.hideInStringTokens=e.hideInStringTokens??!1,this.textDirection=e.textDirection??null}}Ct.EMPTY=Ct.register({description:"empty"});const z1=[Ct.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),Ct.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),Ct.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),Ct.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function V1(o){return o instanceof Ct?o:Ct.createDynamic(o)}class b6 extends l.Disposable{constructor(e){super(),this.handleBeforeFire=e,this._actual=this._register(new l.Emitter),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._affectedLineHeights=null,this._affectedFontLines=null,this._deferredCnt=0,this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._affectsLineNumber=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){this._deferredCnt--,this._deferredCnt===0&&(this._shouldFireDeferred&&this.doFire(),this._affectedInjectedTextLines?.clear(),this._affectedInjectedTextLines=null,this._affectedLineHeights?.clear(),this._affectedLineHeights=null,this._affectedFontLines?.clear(),this._affectedFontLines=null)}recordLineAffectedByInjectedText(e){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(e)}recordLineAffectedByLineHeightChange(e,t,i,n){this._affectedLineHeights||(this._affectedLineHeights=new $T([],uu.toKey)),this._affectedLineHeights.add(new uu(e,t,i,n))}recordLineAffectedByFontChange(e,t,i){this._affectedFontLines||(this._affectedFontLines=new $T([],fu.toKey)),this._affectedFontLines.add(new fu(e,t,i))}checkAffectedAndFire(e){this._affectsMinimap||=!!e.minimap?.position,this._affectsOverviewRuler||=!!e.overviewRuler?.color,this._affectsGlyphMargin||=!!e.glyphMarginClassName,this._affectsLineNumber||=!!e.lineNumberClassName,this.tryFire()}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._affectsGlyphMargin=!0,this.tryFire()}tryFire(){this._deferredCnt===0?this.doFire():this._shouldFireDeferred=!0}doFire(){this.handleBeforeFire(this._affectedInjectedTextLines,this._affectedLineHeights,this._affectedFontLines);const e={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler,affectsGlyphMargin:this._affectsGlyphMargin,affectsLineNumber:this._affectsLineNumber};this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._actual.fire(e)}}class C6 extends l.Disposable{constructor(){super(),this._emitter=this._register(new l.Emitter),this.event=this._emitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(e=null){if(this._deferredCnt--,this._deferredCnt===0&&this._deferredEvent!==null){this._deferredEvent.rawContentChangedEvent.resultingSelection=e;const t=this._deferredEvent;this._deferredEvent=null,this._emitter.fire(t)}}fire(e){if(this._deferredCnt>0){this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e;return}this._emitter.fire(e)}}class Ww{static create(e){return new Ww(e.get(151),e.get(150))}constructor(e,t){this.classifier=new v6(e,t)}createLineBreaksComputer(e,t,i,n,s,r,a){const c=[],h=[];return{addRequest:(d,u)=>{c.push(d),h.push(u)},finalize:()=>{const d=t.typicalFullwidthCharacterWidth/t.typicalHalfwidthCharacterWidth,u=[];for(let f=0,g=c.length;f=0&&e<256?this._asciiMap[e]:e>=12352&&e<=12543||e>=13312&&e<=19903||e>=19968&&e<=40959?3:this._map.get(e)||this._defaultValue}}let Hw=[],eS=[];function w6(o,e,t,i,n,s,r,a){if(n===-1)return null;const c=t.length;if(c<=1)return null;const h=a==="keepAll",d=e.breakOffsets,u=e.breakOffsetsVisibleColumn,f=$1(t,i,n,s,r),g=n-f,m=Hw,p=eS;let b=0,v=0,C=0,w=n;const S=d.length;let L=0;if(L>=0){let D=Math.abs(u[L]-w);for(;L+1=D)break;D=x,L++}}for(;LD&&(D=v,x=C);let I=0,T=0,M=0,O=0;if(x<=w){let k=x,U=D===0?0:t.charCodeAt(D-1),B=D===0?0:o.get(U),G=!0;for(let X=D;Xv&&tS(U,B,Y,ee,h)&&(I=re,T=k),k+=Ee,k>w){re>v?(M=re,O=k-Ee):(M=X+1,O=k),k-T>g&&(I=0),G=!1;break}U=Y,B=ee}if(G){b>0&&(m[b]=d[d.length-1],p[b]=u[d.length-1],b++);break}}if(I===0){let k=x,U=t.charCodeAt(D),B=o.get(U),G=!1;for(let X=D-1;X>=v;X--){const re=X+1,Y=t.charCodeAt(X);if(Y===9){G=!0;break}let ee,Ee;if(l.isLowSurrogate(Y)?(X--,ee=0,Ee=2):(ee=o.get(Y),Ee=l.isFullWidthCharacter(Y)?s:1),k<=w){if(M===0&&(M=re,O=k),k<=w-g)break;if(tS(Y,ee,U,B,h)){I=re,T=k;break}}k-=Ee,U=Y,B=ee}if(I!==0){const X=g-(O-T);if(X<=i){const re=t.charCodeAt(M);let Y;l.isHighSurrogate(re)?Y=2:Y=_u(re,O,i,s),X-Y<0&&(I=0)}}if(G){L--;continue}}if(I===0&&(I=M,T=O),I<=v){const k=t.charCodeAt(v);l.isHighSurrogate(k)?(I=v+2,T=C+2):(I=v+1,T=C+_u(k,C,i,s))}for(v=I,m[b]=I,C=T,p[b]=T,b++,w=T+g;L<0||L=P)break;P=k,L++}}return b===0?null:(m.length=b,p.length=b,Hw=e.breakOffsets,eS=e.breakOffsetsVisibleColumn,e.breakOffsets=m,e.breakOffsetsVisibleColumn=p,e.wrappedTextIndentLength=f,e)}function S6(o,e,t,i,n,s,r,a,c){const h=mo.applyInjectedText(e,t);let d,u;if(t&&t.length>0?(d=t.map(M=>M.options),u=t.map(M=>M.column-1)):(d=null,u=null),n===-1)return d?new eu(u,d,[h.length],[],0):null;const f=h.length;if(f<=1)return d?new eu(u,d,[h.length],[],0):null;const g=a==="keepAll",m=$1(h,i,n,s,r),p=n-m,b=[],v=[];let C=0,w=0,S=0,L=n,D=h.charCodeAt(0),x=o.get(D),I=_u(D,0,i,s),T=1;l.isHighSurrogate(D)&&(I+=1,D=h.charCodeAt(1),x=o.get(D),T++);for(let M=T;ML||B)&&((w===0||I-S>p)&&(w=O,S=I-U),b[C]=w,v[C]=S,C++,L=S+p,w=0),D=P,x=k}return C===0&&(!t||t.length===0)?null:(b[C]=f,v[C]=I,new eu(u,d,b,v,m))}function _u(o,e,t,i){return o===9?t-e%t:l.isFullWidthCharacter(o)||o<32?i:1}function U1(o,e){return e-o%e}function y6(o,e){if(e>=2&&o.charAt(e-1)==="n"){let t=0;for(let i=e-2;i>=0;i--)if(o.charAt(i)==="\\")t++;else return t%2===1}return!1}function tS(o,e,t,i,n){return t!==32&&(e===2&&i!==2||e!==1&&i===1||!n&&e===3&&i!==2||!n&&i===3&&e!==1)}function $1(o,e,t,i,n){let s=0;if(n!==0){const r=l.firstNonWhitespaceIndex(o);if(r!==-1){for(let c=0;ct&&(s=0)}}return s}class zm{constructor(e){this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new Pt(new l.Range(1,1,1,1),0,0,new l.Position(1,1),0),new Pt(new l.Range(1,1,1,1),0,0,new l.Position(1,1),0))}dispose(e){this._removeTrackedRange(e)}startTrackingSelection(e){this._trackSelection=!0,this._updateTrackedRange(e)}stopTrackingSelection(e){this._trackSelection=!1,this._removeTrackedRange(e)}_updateTrackedRange(e){this._trackSelection&&(this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))}_removeTrackedRange(e){this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new ge(this.modelState,this.viewState)}readSelectionFromMarkers(e){const t=e.model._getTrackedRange(this._selTrackedRange);return this.modelState.selection.isEmpty()&&!t.isEmpty()?l.Selection.fromRange(t.collapseToEnd(),this.modelState.selection.getDirection()):l.Selection.fromRange(t,this.modelState.selection.getDirection())}ensureValidState(e){this._setState(e,this.modelState,this.viewState)}setState(e,t,i){this._setState(e,t,i)}static _validatePositionWithCache(e,t,i,n){return t.equals(i)?n:e.normalizePosition(t,2)}static _validateViewState(e,t){const i=t.position,n=t.selectionStart.getStartPosition(),s=t.selectionStart.getEndPosition(),r=e.normalizePosition(i,2),a=this._validatePositionWithCache(e,n,i,r),c=this._validatePositionWithCache(e,s,n,a);return i.equals(r)&&n.equals(a)&&s.equals(c)?t:new Pt(l.Range.fromPositions(a,c),t.selectionStartKind,t.selectionStartLeftoverVisibleColumns+n.column-a.column,r,t.leftoverVisibleColumns+i.column-r.column)}_setState(e,t,i){if(i&&(i=zm._validateViewState(e.viewModel,i)),t){const n=e.model.validateRange(t.selectionStart),s=t.selectionStart.equalsRange(n)?t.selectionStartLeftoverVisibleColumns:0,r=e.model.validatePosition(t.position),a=t.position.equals(r)?t.leftoverVisibleColumns:0;t=new Pt(n,t.selectionStartKind,s,r,a)}else{if(!i)return;const n=e.model.validateRange(e.coordinatesConverter.convertViewRangeToModelRange(i.selectionStart)),s=e.model.validatePosition(e.coordinatesConverter.convertViewPositionToModelPosition(i.position));t=new Pt(n,i.selectionStartKind,i.selectionStartLeftoverVisibleColumns,s,i.leftoverVisibleColumns)}if(i){const n=e.coordinatesConverter.validateViewRange(i.selectionStart,t.selectionStart),s=e.coordinatesConverter.validateViewPosition(i.position,t.position);i=new Pt(n,t.selectionStartKind,t.selectionStartLeftoverVisibleColumns,s,t.leftoverVisibleColumns)}else{const n=e.coordinatesConverter.convertModelPositionToViewPosition(new l.Position(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),s=e.coordinatesConverter.convertModelPositionToViewPosition(new l.Position(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),r=new l.Range(n.lineNumber,n.column,s.lineNumber,s.column),a=e.coordinatesConverter.convertModelPositionToViewPosition(t.position);i=new Pt(r,t.selectionStartKind,t.selectionStartLeftoverVisibleColumns,a,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=i,this._updateTrackedRange(e)}}class K1{constructor(e){this.context=e,this.cursors=[new zm(e)],this.lastAddedCursorIndex=0}dispose(){for(const e of this.cursors)e.dispose(this.context)}startTrackingSelections(){for(const e of this.cursors)e.startTrackingSelection(this.context)}stopTrackingSelections(){for(const e of this.cursors)e.stopTrackingSelection(this.context)}updateContext(e){this.context=e}ensureValidState(){for(const e of this.cursors)e.ensureValidState(this.context)}readSelectionFromMarkers(){return this.cursors.map(e=>e.readSelectionFromMarkers(this.context))}getAll(){return this.cursors.map(e=>e.asCursorState())}getViewPositions(){return this.cursors.map(e=>e.viewState.position)}getTopMostViewPosition(){return l.findFirstMin(this.cursors,l.compareBy(e=>e.viewState.position,l.Position.compare)).viewState.position}getBottomMostViewPosition(){return l.findLastMax(this.cursors,l.compareBy(e=>e.viewState.position,l.Position.compare)).viewState.position}getSelections(){return this.cursors.map(e=>e.modelState.selection)}getViewSelections(){return this.cursors.map(e=>e.viewState.selection)}setSelections(e){this.setStates(ge.fromModelSelections(e))}getPrimaryCursor(){return this.cursors[0].asCursorState()}setStates(e){e!==null&&(this.cursors[0].setState(this.context,e[0].modelState,e[0].viewState),this._setSecondaryStates(e.slice(1)))}_setSecondaryStates(e){const t=this.cursors.length-1,i=e.length;if(ti){const n=t-i;for(let s=0;s=e+1&&this.lastAddedCursorIndex--,this.cursors[e+1].dispose(this.context),this.cursors.splice(e+1,1)}normalize(){if(this.cursors.length===1)return;const e=this.cursors.slice(0),t=[];for(let i=0,n=e.length;ii.selection,l.Range.compareRangesUsingStarts));for(let i=0;iu&&p.index--;e.splice(u,1),t.splice(d,1),this._removeSecondaryCursor(u-1),i--}}}}class G1{constructor(e,t,i,n){this._cursorContextBrand=void 0,this.model=e,this.viewModel=t,this.coordinatesConverter=i,this.cursorConfig=n}}class L6{constructor(){this.type=0}}class D6{constructor(){this.type=1}}class x6{constructor(e){this.type=2,this._source=e}hasChanged(e){return this._source.hasChanged(e)}}class E6{constructor(e,t,i){this.selections=e,this.modelSelections=t,this.reason=i,this.type=3}}class Ba{constructor(e){this.type=4,e?(this.affectsMinimap=e.affectsMinimap,this.affectsOverviewRuler=e.affectsOverviewRuler,this.affectsGlyphMargin=e.affectsGlyphMargin,this.affectsLineNumber=e.affectsLineNumber):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0,this.affectsGlyphMargin=!0,this.affectsLineNumber=!0)}}class Vm{constructor(){this.type=5}}class I6{constructor(e){this.type=6,this.isFocused=e}}class T6{constructor(){this.type=7}}class Um{constructor(){this.type=8}}class j1{constructor(e,t){this.fromLineNumber=e,this.count=t,this.type=9}}class iS{constructor(e,t){this.type=10,this.fromLineNumber=e,this.toLineNumber=t}}class nS{constructor(e,t){this.type=11,this.fromLineNumber=e,this.toLineNumber=t}}class bu{constructor(e,t,i,n,s,r,a){this.source=e,this.minimalReveal=t,this.range=i,this.selections=n,this.verticalType=s,this.revealHorizontal=r,this.scrollType=a,this.type=12}}class N6{constructor(e){this.type=13,this.scrollWidth=e.scrollWidth,this.scrollLeft=e.scrollLeft,this.scrollHeight=e.scrollHeight,this.scrollTop=e.scrollTop,this.scrollWidthChanged=e.scrollWidthChanged,this.scrollLeftChanged=e.scrollLeftChanged,this.scrollHeightChanged=e.scrollHeightChanged,this.scrollTopChanged=e.scrollTopChanged}}class R6{constructor(e){this.theme=e,this.type=14}}class M6{constructor(e){this.type=15,this.ranges=e}}class A6{constructor(){this.type=16}}let O6=class{constructor(){this.type=17}};class P6 extends l.Disposable{constructor(){super(),this._onEvent=this._register(new l.Emitter),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(e){this._addOutgoingEvent(e),this._emitOutgoingEvents()}_addOutgoingEvent(e){for(let t=0,i=this._outgoingEvents.length;t0;){if(this._collector||this._isConsumingViewEventQueue)return;const e=this._outgoingEvents.shift();e.isNoOp()||this._onEvent.fire(e)}}addViewEventHandler(e){for(let t=0,i=this._eventHandlers.length;t0&&this._emitMany(t)}this._emitOutgoingEvents()}emitSingleViewEvent(e){try{this.beginEmitViewEvents().emitViewEvent(e)}finally{this.endEmitViewEvents()}}_emitMany(e){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(e):this._viewEventQueue=e,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){const e=this._viewEventQueue;this._viewEventQueue=null;const t=this._eventHandlers.slice(0);for(const i of t)i.handleEvents(e)}}}class k6{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(e){this.viewEvents.push(e)}emitOutgoingEvent(e){this.outgoingEvents.push(e)}}class sS{constructor(e,t,i,n){this.kind=0,this._oldContentWidth=e,this._oldContentHeight=t,this.contentWidth=i,this.contentHeight=n,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}attemptToMerge(e){return e.kind!==this.kind?null:new sS(this._oldContentWidth,this._oldContentHeight,e.contentWidth,e.contentHeight)}}class $m{constructor(e,t){this.kind=1,this.oldHasFocus=e,this.hasFocus=t}isNoOp(){return this.oldHasFocus===this.hasFocus}attemptToMerge(e){return e.kind!==this.kind?null:new $m(this.oldHasFocus,e.hasFocus)}}class F6{constructor(e,t){this.kind=2,this.oldHasFocus=e,this.hasFocus=t}isNoOp(){return this.oldHasFocus===this.hasFocus}attemptToMerge(e){return e.kind!==this.kind?null:new $m(this.oldHasFocus,e.hasFocus)}}class oS{constructor(e,t,i,n,s,r,a,c){this.kind=3,this._oldScrollWidth=e,this._oldScrollLeft=t,this._oldScrollHeight=i,this._oldScrollTop=n,this.scrollWidth=s,this.scrollLeft=r,this.scrollHeight=a,this.scrollTop=c,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}isNoOp(){return!this.scrollWidthChanged&&!this.scrollLeftChanged&&!this.scrollHeightChanged&&!this.scrollTopChanged}attemptToMerge(e){return e.kind!==this.kind?null:new oS(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop)}}class B6{constructor(){this.kind=4}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class z6{constructor(){this.kind=5}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class Km{constructor(e,t,i,n,s,r,a){this.kind=7,this.oldSelections=e,this.selections=t,this.oldModelVersionId=i,this.modelVersionId=n,this.source=s,this.reason=r,this.reachedMaxCursorCount=a}static _selectionsAreEqual(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;const i=e.length,n=t.length;if(i!==n)return!1;for(let s=0;s0){const e=this._cursors.getSelections();for(let t=0;tr&&(n=n.slice(0,r),s=!0);const a=Cu.from(this._model,this);return this._cursors.setStates(n),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,t,i,a,s)}setCursorColumnSelectData(e){this._columnSelectData=e}revealAll(e,t,i,n,s,r){const a=this._cursors.getViewPositions();let c=null,h=null;a.length>1?h=this._cursors.getViewSelections():c=l.Range.fromPositions(a[0],a[0]),e.emitViewEvent(new bu(t,i,c,h,n,s,r))}revealPrimary(e,t,i,n,s,r){const c=[this._cursors.getPrimaryCursor().viewState.selection];e.emitViewEvent(new bu(t,i,null,c,n,s,r))}saveState(){const e=[],t=this._cursors.getSelections();for(let i=0,n=t.length;i0){const s=ge.fromModelSelections(i.resultingSelection);this.setStates(e,"modelChange",i.isUndoing?5:i.isRedoing?6:2,s)&&this.revealAll(e,"modelChange",!1,0,!0,0)}else{const s=this._cursors.readSelectionFromMarkers();this.setStates(e,"modelChange",2,ge.fromModelSelections(s))}}}getSelection(){return this._cursors.getPrimaryCursor().modelState.selection}getTopMostViewPosition(){return this._cursors.getTopMostViewPosition()}getBottomMostViewPosition(){return this._cursors.getBottomMostViewPosition()}getCursorColumnSelectData(){if(this._columnSelectData)return this._columnSelectData;const e=this._cursors.getPrimaryCursor(),t=e.viewState.selectionStart.getStartPosition(),i=e.viewState.position;return{isReal:!1,fromViewLineNumber:t.lineNumber,fromViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,t),toViewLineNumber:i.lineNumber,toViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,i)}}getSelections(){return this._cursors.getSelections()}setSelections(e,t,i,n){this.setStates(e,t,n,ge.fromModelSelections(i))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(e){this._prevEditOperationType=e}_pushAutoClosedAction(e,t){const i=[],n=[];for(let a=0,c=e.length;a0&&this._pushAutoClosedAction(n,s),this._prevEditOperationType=e.type}e.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(e){(!e||e.length===0)&&(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()}_emitStateChangedIfNecessary(e,t,i,n,s){const r=Cu.from(this._model,this);if(r.equals(n))return!1;const a=this._cursors.getSelections(),c=this._cursors.getViewSelections();if(e.emitViewEvent(new E6(c,a,i)),!n||n.cursorState.length!==r.cursorState.length||r.cursorState.some((h,d)=>!h.modelState.equals(n.cursorState[d].modelState))){const h=n?n.cursorState.map(u=>u.modelState.selection):null,d=n?n.modelVersionId:0;e.emitOutgoingEvent(new Km(h,a,d,r.modelVersionId,t||"keyboard",i,s))}return!0}_findAutoClosingPairs(e){if(!e.length)return null;const t=[];for(let i=0,n=e.length;i=0)return null;const r=s.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!r)return null;const a=r[1],c=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(a);if(!c||c.length!==1)return null;const h=c[0].open,d=s.text.length-r[2].length-1,u=s.text.lastIndexOf(h,d-1);if(u===-1)return null;t.push([u,d])}return t}executeEdits(e,t,i,n,s){let r=null;t==="snippet"&&(r=this._findAutoClosingPairs(i)),r&&(i[0]._isTracked=!0);const a=[],c=[],h=this._model.pushEditOperations(this.getSelections(),i,d=>{if(r)for(let f=0,g=r.length;f0&&this._pushAutoClosedAction(a,c)}_executeEdit(e,t,i,n=0){if(this.context.cursorConfig.readOnly)return;const s=Cu.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(r){l.onUnexpectedError(r)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,i,n,s,!1)&&this.revealAll(t,i,!1,0,!0,0)}getAutoClosedCharacters(){return q1.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(e){this._compositionState=new vu(this._model,this.getSelections())}endComposition(e,t){const i=$i.cursor({kind:"compositionEnd",detailedSource:t}),n=this._compositionState?this._compositionState.deduceOutcome(this._model,this.getSelections()):null;this._compositionState=null,this._executeEdit(()=>{t==="keyboard"&&this._executeEditOperation(cr.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,n,this.getSelections(),this.getAutoClosedCharacters()),i)},e,t)}type(e,t,i){const n=$i.cursor({kind:"type",detailedSource:i});this._executeEdit(()=>{if(i==="keyboard"){const s=t.length;let r=0;for(;r{const d=h.getPosition();return new l.Selection(d.lineNumber,d.column+s,d.lineNumber,d.column+s)});this.setSelections(e,r,c,0)}return}this._executeEdit(()=>{this._executeEditOperation(cr.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t,i,n,s),a)},e,r)}paste(e,t,i,n,s){const r=$i.cursor({kind:"paste",detailedSource:s});this._executeEdit(()=>{this._executeEditOperation(cr.paste(this.context.cursorConfig,this._model,this.getSelections(),t,i,n||[]),r)},e,s,4)}cut(e,t){const i=$i.cursor({kind:"cut",detailedSource:t});this._executeEdit(()=>{this._executeEditOperation(va.cut(this.context.cursorConfig,this._model,this.getSelections()),i)},e,t)}executeCommand(e,t,i){const n=$i.cursor({kind:"executeCommand",detailedSource:i});this._executeEdit(()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new pi(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}),n)},e,i)}executeCommands(e,t,i){const n=$i.cursor({kind:"executeCommands",detailedSource:i});this._executeEdit(()=>{this._executeEditOperation(new pi(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}),n)},e,i)}}class Cu{static from(e,t){return new Cu(e.getVersionId(),t.getCursorStates())}constructor(e,t){this.modelVersionId=e,this.cursorState=t}equals(e){if(!e||this.modelVersionId!==e.modelVersionId||this.cursorState.length!==e.cursorState.length)return!1;for(let t=0,i=this.cursorState.length;t=t.length||!t[i].strictContainsRange(e[i]))return!1;return!0}}class X6{static executeCommands(e,t,i,n=$i.unknown({name:"executeCommands"})){const s={model:e,selectionsBefore:t,trackedRanges:[],trackedRangesDirection:[]},r=this._innerExecuteCommands(s,i,n);for(let a=0,c=s.trackedRanges.length;a0&&(a[0]._isTracked=!0);let c=e.model.pushEditOperations(e.selectionsBefore,a,d=>{const u=[];for(let m=0;mm.identifier.minor-p.identifier.minor,g=[];for(let m=0;m0?(u[m].sort(f),g[m]=t[m].computeCursorState(e.model,{getInverseEditOperations:()=>u[m],getTrackedSelection:p=>{const b=parseInt(p,10),v=e.model._getTrackedRange(e.trackedRanges[b]);return e.trackedRangesDirection[b]===0?new l.Selection(v.startLineNumber,v.startColumn,v.endLineNumber,v.endColumn):new l.Selection(v.endLineNumber,v.endColumn,v.startLineNumber,v.startColumn)}})):g[m]=e.selectionsBefore[m];return g},void 0,i);c||(c=e.selectionsBefore);const h=[];for(const d in r)r.hasOwnProperty(d)&&h.push(parseInt(d,10));h.sort((d,u)=>u-d);for(const d of h)c.splice(d,1);return c}static _arrayIsEmpty(e){for(let t=0,i=e.length;t{l.Range.isEmpty(u)&&f===""||n.push({identifier:{major:t,minor:s++},range:u,text:f,forceMoveMarkers:g,isAutoWhitespaceEdit:i.insertsAutoWhitespace})};let a=!1;const d={addEditOperation:r,addTrackedEditOperation:(u,f,g)=>{a=!0,r(u,f,g)},trackSelection:(u,f)=>{const g=l.Selection.liftSelection(u);let m;if(g.isEmpty())if(typeof f=="boolean")f?m=2:m=3;else{const v=e.model.getLineMaxColumn(g.startLineNumber);g.startColumn===v?m=2:m=3}else m=1;const p=e.trackedRanges.length,b=e.model._setTrackedRange(null,g,m);return e.trackedRanges[p]=b,e.trackedRangesDirection[p]=g.getDirection(),p.toString()}};try{i.getEditOperations(e.model,d)}catch(u){return l.onUnexpectedError(u),{operations:[],hadTrackedEditOperation:!1}}return{operations:n,hadTrackedEditOperation:a}}static _getLoserCursorMap(e){e=e.slice(0),e.sort((i,n)=>-l.Range.compareRangesUsingEnds(i.range,n.range));const t={};for(let i=1;is.identifier.major?r=n.identifier.major:r=s.identifier.major,t[r.toString()]=!0;for(let a=0;a0&&i--}}return t}}class J6{constructor(e,t,i,n){this.text=e,this.lineNumber=t,this.startSelectionOffset=i,this.endSelectionOffset=n}}class vu{static _capture(e,t){const i=[];for(const n of t){if(n.startLineNumber!==n.endLineNumber)return null;const s=n.startLineNumber;i.push(new J6(e.getLineContent(s),s,n.startColumn-1,n.endColumn-1))}return i}constructor(e,t){this._original=vu._capture(e,t)}deduceOutcome(e,t){if(!this._original)return null;const i=vu._capture(e,t);if(!i||this._original.length!==i.length)return null;const n=[];for(let s=0,r=this._original.length;sHl,tokenizeEncoded:(o,e,t)=>Lg(0,t)};async function W6(o,e,t){if(!t)return Z1(e,o.languageIdCodec,Y1);const i=await l.TokenizationRegistry.getOrCreate(t);return Z1(e,o.languageIdCodec,i||Y1)}function H6(o,e,t,i,n,s,r){let a="
",c=0,h=0,d=!0;for(let u=0,f=e.getCount();u0;)r&&d?(m+=" ",d=!1):(m+=" ",d=!0),w--;break}case 60:m+="<",d=!1;break;case 62:m+=">",d=!1;break;case 38:m+="&",d=!1;break;case 0:m+="�",d=!1;break;case 65279:case 8232:case 8233:case 133:m+="�",d=!1;break;case 13:m+="​",d=!1;break;case 32:r&&d?(m+=" ",d=!1):(m+=" ",d=!0);break;default:m+=String.fromCharCode(p),d=!1}}if(!(g<=i)&&(a+=`${m}`,g>n||c>=n||i>=n))break}return a+="
",a}function Z1(o,e,t){let i='
';const n=l.splitLines(o);let s=t.getInitialState();for(let r=0,a=n.length;r0&&(i+="
");const h=t.tokenizeEncoded(c,!0,s);_t.convertToEndOffset(h.tokens,c.length);const u=new _t(h.tokens,c,e).inflate();let f=0;for(let g=0,m=u.getCount();g${l.escape(c.substring(f,b))}`,f=b}s=h.endState}return i+="
",i}class e8{constructor(e,t,i,n,s){this.decorationId=e,this.index=t,this.lineNumber=i,this.specialHeight=n,this.prefixSum=s,this.maximumSpecialHeight=n,this.deleted=!1}}class Q1{constructor(e,t){this._decorationIDToCustomLine=new jm,this._orderedCustomLines=[],this._pendingChanges=[],this._invalidIndex=1/0,this._hasPending=!1,this._defaultLineHeight=e;for(const i of t)this.insertOrChangeCustomLineHeight(i.decorationId,i.startLineNumber,i.endLineNumber,i.lineHeight)}set defaultLineHeight(e){this._defaultLineHeight=e}get defaultLineHeight(){return this._defaultLineHeight}removeCustomLineHeight(e){this._pendingChanges.push({kind:1,decorationId:e}),this._hasPending=!0}insertOrChangeCustomLineHeight(e,t,i,n){this._pendingChanges.push({kind:0,decorationId:e,startLineNumber:t,endLineNumber:i,lineHeight:n}),this._hasPending=!0}heightForLineNumber(e){this._commit();const t=this._binarySearchOverOrderedCustomLinesArray(e);return t>=0?this._orderedCustomLines[t].maximumSpecialHeight:this._defaultLineHeight}getAccumulatedLineHeightsIncludingLineNumber(e){this._commit();const t=this._binarySearchOverOrderedCustomLinesArray(e);if(t>=0)return this._orderedCustomLines[t].prefixSum+this._orderedCustomLines[t].maximumSpecialHeight;if(t===-1)return this._defaultLineHeight*e;const i=-(t+1),n=this._orderedCustomLines[i-1];return n.prefixSum+n.maximumSpecialHeight+this._defaultLineHeight*(e-n.lineNumber)}onLinesDeleted(e,t){this._pendingChanges.push({kind:2,fromLineNumber:e,toLineNumber:t}),this._hasPending=!0}onLinesInserted(e,t){this._pendingChanges.push({kind:3,fromLineNumber:e,toLineNumber:t}),this._hasPending=!0}_commit(){if(!this._hasPending)return;const e=this._pendingChanges;this._pendingChanges=[],this._hasPending=!1;const t=[],i=new jm;for(const n of e)switch(n.kind){case 1:this._doRemoveCustomLineHeight(n.decorationId,i);break;case 0:this._doInsertOrChangeCustomLineHeight(n.decorationId,n.startLineNumber,n.endLineNumber,n.lineHeight,t,i);break;case 2:this._flushStagedDecorationChanges(t,i),this._doLinesDeleted(n.fromLineNumber,n.toLineNumber);break;case 3:this._flushStagedDecorationChanges(t,i),this._doLinesInserted(n.fromLineNumber,n.toLineNumber,t,i);break}this._flushStagedDecorationChanges(t,i)}_doRemoveCustomLineHeight(e,t){const i=this._decorationIDToCustomLine.get(e);if(i){this._decorationIDToCustomLine.delete(e);for(const s of i)s.deleted=!0,this._invalidIndex=Math.min(this._invalidIndex,s.index)}const n=t.get(e);if(n){t.delete(e);for(const s of n)s.deleted=!0}}_doInsertOrChangeCustomLineHeight(e,t,i,n,s,r){this._doRemoveCustomLineHeight(e,r);for(let a=t;a<=i;a++){const c=new e8(e,-1,a,n,0);s.push(c),r.add(e,c)}}_flushStagedDecorationChanges(e,t){if(e.length===0&&this._invalidIndex===1/0)return;for(const a of e){if(a.deleted)continue;const c=this._binarySearchOverOrderedCustomLinesArray(a.lineNumber),h=c>=0?c:-(c+1);this._orderedCustomLines.splice(h,0,a),this._invalidIndex=Math.min(this._invalidIndex,h)}if(e.length=0,t.clear(),this._invalidIndex===1/0)return;const i=new jm,n=[];for(let a=0;a0?n[this._invalidIndex-1]:void 0;for(let a=this._invalidIndex;a=0){r=s;for(let u=s-1;u>=0&&this._orderedCustomLines[u].lineNumber===e;u--)r--}else r=s===-(n+1)&&s!==-1?n-1:-(s+1);const a=this._binarySearchOverOrderedCustomLinesArray(t);let c;if(a>=0){c=a;for(let u=a+1;ur,d=c===r&&this._orderedCustomLines[r]&&this._orderedCustomLines[r].lineNumber>=e&&this._orderedCustomLines[r].lineNumber<=t;if(h||d){let u=0;for(let D=r;D<=c;D++)u=Math.max(u,this._orderedCustomLines[D].maximumSpecialHeight);let f=0;if(r>0){const D=this._orderedCustomLines[r-1];f=D.prefixSum+D.maximumSpecialHeight+this._defaultLineHeight*(e-D.lineNumber-1)}else f=e>0?(e-1)*this._defaultLineHeight:0;const g=this._orderedCustomLines[r],m=this._orderedCustomLines[c],p=this._orderedCustomLines[c+1],b=p&&p.lineNumber===t+1?p.maximumSpecialHeight:this._defaultLineHeight,v=m.prefixSum+m.maximumSpecialHeight-g.prefixSum+this._defaultLineHeight*(t-m.lineNumber)+this._defaultLineHeight*(g.lineNumber-e)+b-u,C=new Set,w=[],S=new jm;let L=0;for(let D=0;D=r&&D<=c){const I=x.decorationId;C.has(I)?L++:(x.index-=L,x.lineNumber=e,x.prefixSum=f,x.maximumSpecialHeight=u,w.push(x),S.add(x.decorationId,x))}else D>c&&(x.index-=L,x.lineNumber-=i,x.prefixSum-=v,w.push(x),S.add(x.decorationId,x));C.add(x.decorationId)}this._orderedCustomLines=w,this._decorationIDToCustomLine=S}else{const u=i*this._defaultLineHeight;for(let f=c;ft&&(g.lineNumber-=i,g.prefixSum-=u)}}}_doLinesInserted(e,t,i,n){const s=t-e+1,r=this._binarySearchOverOrderedCustomLinesArray(e);let a;if(r>=0){a=r;for(let g=r-1;g>=0&&this._orderedCustomLines[g].lineNumber===e;g--)a--}else a=-(r+1);const c=[],h=new Set;for(let g=a;g=0;g--)this._orderedCustomLines[g].lineNumber===e-1&&d.add(this._orderedCustomLines[g].decorationId);const u=UT(d,h),f=s*this._defaultLineHeight;for(let g=a;g0){for(const g of u){const m=this._decorationIDToCustomLine.get(g);if(m){const p=m.reduce((C,w)=>Math.min(C,w.lineNumber),e),b=m.reduce((C,w)=>Math.max(C,w.lineNumber),e),v=m.reduce((C,w)=>Math.max(C,w.specialHeight),0);c.push({decorationId:g,startLineNumber:p,endLineNumber:b,lineHeight:v})}}for(const g of c)this._doInsertOrChangeCustomLineHeight(g.decorationId,g.startLineNumber,g.endLineNumber,g.lineHeight,i,n)}}_binarySearchOverOrderedCustomLinesArray(e){return l.binarySearch2(this._orderedCustomLines.length,t=>{const i=this._orderedCustomLines[t];return i.lineNumber===e?0:i.lineNumber{const r=t.convertModelRangeToViewRange(s.range);return new Gm(s.id,r.startLineNumber,r.endLineNumber,s.options.lineHeight?s.options.lineHeight*n:0)})}}class jm{constructor(){this._map=new Map}add(e,t){const i=this._map.get(e);i?i.push(t):this._map.set(e,[t])}get(e){return this._map.get(e)}delete(e){this._map.delete(e)}clear(){this._map.clear()}}class t8{constructor(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}insert(e){this._hasPending=!0,this._inserts.push(e)}change(e){this._hasPending=!0,this._changes.push(e)}remove(e){this._hasPending=!0,this._removes.push(e)}commit(e){if(!this._hasPending)return;const t=this._inserts,i=this._changes,n=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],e._commitPendingChanges(t,i,n)}}class i8{constructor(e,t,i,n,s){this.id=e,this.afterLineNumber=t,this.ordinal=i,this.height=n,this.minWidth=s,this.prefixSum=0}}let n8=(Pr=class{constructor(e,t,i,n,s){this._instanceId=l.singleLetterHash(++Pr.INSTANCE_COUNT),this._pendingChanges=new t8,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=e,this._paddingTop=i,this._paddingBottom=n,this._lineHeightsManager=new Q1(t,s)}static findInsertionIndex(e,t,i){let n=0,s=e.length;for(;n>>1;t===e[r].afterLineNumber?i{t=!0,this._lineHeightsManager.insertOrChangeCustomLineHeight(n,s,r,a)},removeCustomLineHeight:n=>{t=!0,this._lineHeightsManager.removeCustomLineHeight(n)}}),t}changeWhitespace(e){let t=!1;try{e({insertWhitespace:(n,s,r,a)=>{t=!0,n=n|0,s=s|0,r=r|0,a=a|0;const c=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new i8(c,n,s,r,a)),c},changeOneWhitespace:(n,s,r)=>{t=!0,s=s|0,r=r|0,this._pendingChanges.change({id:n,newAfterLineNumber:s,newHeight:r})},removeWhitespace:n=>{t=!0,this._pendingChanges.remove({id:n})}})}finally{this._pendingChanges.commit(this)}return t}_commitPendingChanges(e,t,i){if((e.length>0||i.length>0)&&(this._minWidth=-1),e.length+t.length+i.length<=1){for(const c of e)this._insertWhitespace(c);for(const c of t)this._changeOneWhitespace(c.id,c.newAfterLineNumber,c.newHeight);for(const c of i){const h=this._findWhitespaceIndex(c.id);h!==-1&&this._removeWhitespace(h)}return}const n=new Set;for(const c of i)n.add(c.id);const s=new Map;for(const c of t)s.set(c.id,c);const r=c=>{const h=[];for(const d of c)if(!n.has(d.id)){if(s.has(d.id)){const u=s.get(d.id);d.afterLineNumber=u.newAfterLineNumber,d.height=u.newHeight}h.push(d)}return h},a=r(this._arr).concat(r(e));a.sort((c,h)=>c.afterLineNumber===h.afterLineNumber?c.ordinal-h.ordinal:c.afterLineNumber-h.afterLineNumber),this._arr=a,this._prefixSumValidIndex=-1}_insertWhitespace(e){const t=Pr.findInsertionIndex(this._arr,e.afterLineNumber,e.ordinal);this._arr.splice(t,0,e),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,t-1)}_findWhitespaceIndex(e){const t=this._arr;for(let i=0,n=t.length;it&&(this._arr[i].afterLineNumber-=t-e+1)}this._lineHeightsManager.onLinesDeleted(e,t)}onLinesInserted(e,t){e=e|0,t=t|0,this._lineCount+=t-e+1;for(let i=0,n=this._arr.length;i=t.length||t[a+1].afterLineNumber>=e)return a;i=a+1|0}else n=a-1|0}return-1}_findFirstWhitespaceAfterLineNumber(e){e=e|0;const i=this._findLastWhitespaceBeforeLineNumber(e)+1;return i1?i=this._lineHeightsManager.getAccumulatedLineHeightsIncludingLineNumber(e-1):i=0;const n=this.getWhitespaceAccumulatedHeightBeforeLineNumber(e-(t?1:0));return i+n+this._paddingTop}getLineHeightForLineNumber(e){return this._lineHeightsManager.heightForLineNumber(e)}getVerticalOffsetAfterLineNumber(e,t=!1){e=e|0;const i=this._lineHeightsManager.getAccumulatedLineHeightsIncludingLineNumber(e),n=this.getWhitespaceAccumulatedHeightBeforeLineNumber(e+(t?1:0));return i+n+this._paddingTop}getWhitespaceMinWidth(){if(this._minWidth===-1){let e=0;for(let t=0,i=this._arr.length;tt}isInTopPadding(e){return this._paddingTop===0?!1:e=t-this._paddingBottom}getLineNumberAtOrAfterVerticalOffset(e){if(e=e|0,e<0)return 1;const t=this._lineCount|0;let i=1,n=t;for(;i=a+r)i=s+1;else{if(e>=a)return s;n=s}}return i>t?t:i}getLinesViewportData(e,t){e=e|0,t=t|0;const i=this.getLineNumberAtOrAfterVerticalOffset(e)|0,n=this.getVerticalOffsetForLineNumber(i)|0;let s=this._lineCount|0,r=this.getFirstWhitespaceIndexAfterLineNumber(i)|0;const a=this.getWhitespacesCount()|0;let c,h;r===-1?(r=a,h=s+1,c=0):(h=this.getAfterLineNumberForWhitespaceIndex(r)|0,c=this.getHeightForWhitespaceIndex(r)|0);let d=n,u=d;const f=5e5;let g=0;n>=f&&(g=Math.floor(n/f)*f,g=Math.floor(g/this._lineHeightsManager.defaultLineHeight)*this._lineHeightsManager.defaultLineHeight,u-=g);const m=[],p=e+(t-e)/2;let b=-1;for(let S=i;S<=s;S++){const L=this.getLineHeightForLineNumber(S);if(b===-1){const D=d,x=d+L;(D<=p&&pp)&&(b=S)}for(d+=L,m[S-i]=u,u+=L;h===S;)u+=c,d+=c,r++,r>=a?h=s+1:(h=this.getAfterLineNumberForWhitespaceIndex(r)|0,c=this.getHeightForWhitespaceIndex(r)|0);if(d>=t){s=S;break}}b===-1&&(b=s);const v=this.getVerticalOffsetForLineNumber(s)|0;let C=i,w=s;if(Ct&&w--}return{bigNumbersDelta:g,startLineNumber:i,endLineNumber:s,relativeVerticalOffset:m,centeredLineNumber:b,completelyVisibleStartLineNumber:C,completelyVisibleEndLineNumber:w,lineHeight:this._lineHeightsManager.defaultLineHeight}}getVerticalOffsetForWhitespaceIndex(e){e=e|0;const t=this.getAfterLineNumberForWhitespaceIndex(e);let i;t>=1?i=this._lineHeightsManager.getAccumulatedLineHeightsIncludingLineNumber(t):i=0;let n;return e>0?n=this.getWhitespacesAccumulatedHeight(e-1):n=0,i+n+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(e){e=e|0;let t=0,i=this.getWhitespacesCount()-1;if(i<0)return-1;const n=this.getVerticalOffsetForWhitespaceIndex(i),s=this.getHeightForWhitespaceIndex(i);if(e>=n+s)return-1;for(;t=a+c)t=r+1;else{if(e>=a)return r;i=r}}return t}getWhitespaceAtVerticalOffset(e){e=e|0;const t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0||t>=this.getWhitespacesCount())return null;const i=this.getVerticalOffsetForWhitespaceIndex(t);if(i>e)return null;const n=this.getHeightForWhitespaceIndex(t),s=this.getIdForWhitespaceIndex(t),r=this.getAfterLineNumberForWhitespaceIndex(t);return{id:s,afterLineNumber:r,verticalOffset:i,height:n}}getWhitespaceViewportData(e,t){e=e|0,t=t|0;const i=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),n=this.getWhitespacesCount()-1;if(i<0)return[];const s=[];for(let r=i;r<=n;r++){const a=this.getVerticalOffsetForWhitespaceIndex(r),c=this.getHeightForWhitespaceIndex(r);if(a>=t)break;s.push({id:this.getIdForWhitespaceIndex(r),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(r),verticalOffset:a,height:c})}return s}getWhitespaces(){return this._arr.slice(0)}getWhitespacesCount(){return this._arr.length}getIdForWhitespaceIndex(e){return e=e|0,this._arr[e].id}getAfterLineNumberForWhitespaceIndex(e){return e=e|0,this._arr[e].afterLineNumber}getHeightForWhitespaceIndex(e){return e=e|0,this._arr[e].height}},Pr.INSTANCE_COUNT=0,Pr);const s8=125;class wu{constructor(e,t,i,n){e=e|0,t=t|0,i=i|0,n=n|0,e<0&&(e=0),t<0&&(t=0),i<0&&(i=0),n<0&&(n=0),this.width=e,this.contentWidth=t,this.scrollWidth=Math.max(e,t),this.height=i,this.contentHeight=n,this.scrollHeight=Math.max(i,n)}equals(e){return this.width===e.width&&this.contentWidth===e.contentWidth&&this.height===e.height&&this.contentHeight===e.contentHeight}}class o8 extends l.Disposable{constructor(e,t){super(),this._onDidContentSizeChange=this._register(new l.Emitter),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new wu(0,0,0,0),this._scrollable=this._register(new mc({forceIntegerValues:!0,smoothScrollDuration:e,scheduleAtNextAnimationFrame:t})),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(e){this._scrollable.setSmoothScrollDuration(e)}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}getScrollDimensions(){return this._dimensions}setScrollDimensions(e){if(this._dimensions.equals(e))return;const t=this._dimensions;this._dimensions=e,this._scrollable.setScrollDimensions({width:e.width,scrollWidth:e.scrollWidth,height:e.height,scrollHeight:e.scrollHeight},!0);const i=t.contentWidth!==e.contentWidth,n=t.contentHeight!==e.contentHeight;(i||n)&&this._onDidContentSizeChange.fire(new sS(t.contentWidth,t.contentHeight,e.contentWidth,e.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(e){this._scrollable.setScrollPositionNow(e)}setScrollPositionSmooth(e){this._scrollable.setScrollPositionSmooth(e)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}}class r8 extends l.Disposable{constructor(e,t,i,n){super(),this._configuration=e;const s=this._configuration.options,r=s.get(165),a=s.get(96);this._linesLayout=new n8(t,s.get(75),a.top,a.bottom,i),this._maxLineWidth=0,this._overlayWidgetsMinWidth=0,this._scrollable=this._register(new o8(0,n)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new wu(r.contentWidth,0,r.height,0)),this.onDidScroll=this._scrollable.onDidScroll,this.onDidContentSizeChange=this._scrollable.onDidContentSizeChange,this._updateHeight()}getScrollable(){return this._scrollable.getScrollable()}onHeightMaybeChanged(){this._updateHeight()}_configureSmoothScrollDuration(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(130)?s8:0)}onConfigurationChanged(e){const t=this._configuration.options;if(e.hasChanged(75)&&this._linesLayout.setDefaultLineHeight(t.get(75)),e.hasChanged(96)){const i=t.get(96);this._linesLayout.setPadding(i.top,i.bottom)}if(e.hasChanged(165)){const i=t.get(165),n=i.contentWidth,s=i.height,r=this._scrollable.getScrollDimensions(),a=r.contentWidth;this._scrollable.setScrollDimensions(new wu(n,r.contentWidth,s,this._getContentHeight(n,s,a)))}else this._updateHeight();e.hasChanged(130)&&this._configureSmoothScrollDuration()}onFlushed(e,t){this._linesLayout.onFlushed(e,t)}onLinesDeleted(e,t){this._linesLayout.onLinesDeleted(e,t)}onLinesInserted(e,t){this._linesLayout.onLinesInserted(e,t)}_getHorizontalScrollbarHeight(e,t){const n=this._configuration.options.get(117);return n.horizontal===2||e>=t?0:n.horizontalScrollbarSize}_getContentHeight(e,t,i){const n=this._configuration.options;let s=this._linesLayout.getLinesTotalHeight();return n.get(119)?s+=Math.max(0,t-n.get(75)-n.get(96).bottom):n.get(117).ignoreHorizontalScrollbarInContentHeight||(s+=this._getHorizontalScrollbarHeight(e,i)),s}_updateHeight(){const e=this._scrollable.getScrollDimensions(),t=e.width,i=e.height,n=e.contentWidth;this._scrollable.setScrollDimensions(new wu(t,e.contentWidth,i,this._getContentHeight(t,i,n)))}getCurrentViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new mE(t.scrollTop,t.scrollLeft,e.width,e.height)}getFutureViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new mE(t.scrollTop,t.scrollLeft,e.width,e.height)}_computeContentWidth(){const e=this._configuration.options,t=this._maxLineWidth,i=e.get(166),n=e.get(59),s=e.get(165);if(i.isViewportWrapping){const r=e.get(81);return t>s.contentWidth+n.typicalHalfwidthCharacterWidth&&r.enabled&&r.side==="right"?t+s.verticalScrollbarWidth:t}else{const r=e.get(118)*n.typicalHalfwidthCharacterWidth,a=this._linesLayout.getWhitespaceMinWidth();return Math.max(t+r+s.verticalScrollbarWidth,a,this._overlayWidgetsMinWidth)}}setMaxLineWidth(e){this._maxLineWidth=e,this._updateContentWidth()}setOverlayWidgetsMinWidth(e){this._overlayWidgetsMinWidth=e,this._updateContentWidth()}_updateContentWidth(){const e=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new wu(e.width,this._computeContentWidth(),e.height,e.contentHeight)),this._updateHeight()}saveState(){const e=this._scrollable.getFutureScrollPosition(),t=e.scrollTop,i=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t),n=this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(i);return{scrollTop:t,scrollTopWithoutViewZones:t-n,scrollLeft:e.scrollLeft}}changeWhitespace(e){const t=this._linesLayout.changeWhitespace(e);return t&&this.onHeightMaybeChanged(),t}changeSpecialLineHeights(e){const t=this._linesLayout.changeLineHeights(e);return t&&this.onHeightMaybeChanged(),t}getVerticalOffsetForLineNumber(e,t=!1){return this._linesLayout.getVerticalOffsetForLineNumber(e,t)}getVerticalOffsetAfterLineNumber(e,t=!1){return this._linesLayout.getVerticalOffsetAfterLineNumber(e,t)}getLineHeightForLineNumber(e){return this._linesLayout.getLineHeightForLineNumber(e)}isAfterLines(e){return this._linesLayout.isAfterLines(e)}isInTopPadding(e){return this._linesLayout.isInTopPadding(e)}isInBottomPadding(e){return this._linesLayout.isInBottomPadding(e)}getLineNumberAtVerticalOffset(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)}getWhitespaceAtVerticalOffset(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)}getLinesViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)}getLinesViewportDataAtScrollTop(e){const t=this._scrollable.getScrollDimensions();return e+t.height>t.scrollHeight&&(e=t.scrollHeight-t.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+t.height)}getWhitespaceViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)}getWhitespaces(){return this._linesLayout.getWhitespaces()}getContentWidth(){return this._scrollable.getScrollDimensions().contentWidth}getScrollWidth(){return this._scrollable.getScrollDimensions().scrollWidth}getContentHeight(){return this._scrollable.getScrollDimensions().contentHeight}getScrollHeight(){return this._scrollable.getScrollDimensions().scrollHeight}getCurrentScrollLeft(){return this._scrollable.getCurrentScrollPosition().scrollLeft}getCurrentScrollTop(){return this._scrollable.getCurrentScrollPosition().scrollTop}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}setScrollPosition(e,t){t===1?this._scrollable.setScrollPositionNow(e):this._scrollable.setScrollPositionSmooth(e)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}deltaScrollNow(e,t){const i=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:i.scrollLeft+e,scrollTop:i.scrollTop+t})}}class Ac{constructor(e,t,i){this.range=e,this.inlineClassName=t,this.type=i}}class a8{constructor(e,t,i){this.context=e,this.model=t,this.coordinatesConverter=i,this._decorationsCache=Object.create(null)}getInlineDecorations(e){const t=new l.Range(e,1,e,this.model.getLineMaxColumn(e)),i=this.coordinatesConverter.convertModelRangeToViewRange(t);return this.getDecorations(i,!1,!1).inlineDecorations}getDecorations(e,t,i){const n=this.context.getModelDecorations(e,t,i),s=e.startLineNumber,r=e.endLineNumber,a=[];let c=0;const h=[],d=[];for(let u=s;u<=r;u++)h[u-s]=[],d[u-s]=!1;for(let u=0,f=n.length;u0?a[c-1]:0,u=a[c];for(;su)break;if(d0?b:0,C=v+Math.max(g-d,0),w=v+Math.min(m-d,u-d);if(C!==w){const S=this.context.getBaseViewLineNumber(e)+c,L=new l.Range(S,C+1,S,w+1),D=p.inlineClassNameAffectsLetterSpacing?3:0;h.push(new Ac(L,p.inlineClassName,D))}}}if(m<=u)n+=f,s++;else break}}return i}}class c8{constructor(e,t,i,n,s){this.editorId=e,this.configuration=i,this._linesCollection=n;const r={getModelDecorations:(a,c,h)=>this._linesCollection.getDecorationsInRange(a,this.editorId,Pf(this.configuration.options),kf(this.configuration.options),c,h)};this._inlineDecorationsComputer=new a8(r,t,s),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}dispose(){this._inlineDecorationsComputer.reset(),this._clearCachedModelDecorationsResolver()}reset(){this._inlineDecorationsComputer.reset(),this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._inlineDecorationsComputer.onModelDecorationsChanged(),this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._inlineDecorationsComputer.onLineMappingChanged(),this._clearCachedModelDecorationsResolver()}getMinimapDecorationsInRange(e){return this._inlineDecorationsComputer.getDecorations(e,!0,!1).decorations}getDecorationsViewportData(e){let t=this._cachedModelDecorationsResolver!==null;return t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange),t||(this._cachedModelDecorationsResolver=this._inlineDecorationsComputer.getDecorations(e,!1,!1),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver}getDecorationsOnLine(e,t=!1,i=!1){const n=new l.Range(e,this._linesCollection.getViewLineMinColumn(e),e,this._linesCollection.getViewLineMaxColumn(e));return this._inlineDecorationsComputer.getDecorations(n,t,i)}}function rS(o,e){return o===null?e?qm.INSTANCE:Ym.INSTANCE:new h8(o,e)}class h8{constructor(e,t){this._projectionData=e,this._isVisible=t}isVisible(){return this._isVisible}setVisible(e){return this._isVisible=e,this}getProjectionData(){return this._projectionData}getViewLineCount(){return this._isVisible?this._projectionData.getOutputLineCount():0}getViewLineContent(e,t,i){this._assertVisible();const n=i>0?this._projectionData.breakOffsets[i-1]:0,s=this._projectionData.breakOffsets[i];let r;if(this._projectionData.injectionOffsets!==null){const a=this._projectionData.injectionOffsets.map((h,d)=>new mo(0,0,h+1,this._projectionData.injectionOptions[d],0));r=mo.applyInjectedText(e.getLineContent(t),a).substring(n,s)}else r=e.getValueInRange({startLineNumber:t,startColumn:n+1,endLineNumber:t,endColumn:s+1});return i>0&&(r=X1(this._projectionData.wrappedTextIndentLength)+r),r}getViewLineLength(e,t,i){return this._assertVisible(),this._projectionData.getLineLength(i)}getViewLineMinColumn(e,t,i){return this._assertVisible(),this._projectionData.getMinOutputOffset(i)+1}getViewLineMaxColumn(e,t,i){return this._assertVisible(),this._projectionData.getMaxOutputOffset(i)+1}getViewLineData(e,t,i,n){const s=new Array;return this.getViewLinesData(e,t,i,1,n,0,[!0],s),s[0]}getViewLinesData(e,t,i,n,s,r,a,c){this._assertVisible();const h=this._projectionData,d=h.injectionOffsets,u=h.injectionOptions,f={getInjectionOptions:()=>u,getInjectionOffsets:()=>d,getBreakOffsets:()=>h.breakOffsets,getWrappedTextIndentLength:()=>h.wrappedTextIndentLength,getBaseViewLineNumber:()=>s},m=new l8(f).getInlineDecorations(t),p=e.tokenization.getLineTokens(t),b=f6(p,u,d);for(let v=i;v0?n.wrappedTextIndentLength:0,r=i>0?n.breakOffsets[i-1]:0,a=n.breakOffsets[i],c=e.sliceAndInflate(r,a,s);let h=c.getLineContent();i>0&&(h=X1(n.wrappedTextIndentLength)+h);const d=this._projectionData.getMinOutputOffset(i)+1,u=h.length+1,f=i+1=aS.length)for(let e=1;e<=o;e++)aS[e]=d8(e);return aS[o]}function d8(o){return new Array(o+1).join(" ")}class u8{constructor(e){this._model=e}_validPosition(e){return this._model.validatePosition(e)}_validRange(e){return this._model.validateRange(e)}convertViewPositionToModelPosition(e){return this._validPosition(e)}convertViewRangeToModelRange(e){return this._validRange(e)}validateViewPosition(e,t){return this._validPosition(t)}validateViewRange(e,t){return this._validRange(t)}convertModelPositionToViewPosition(e){return this._validPosition(e)}convertModelRangeToViewRange(e){return this._validRange(e)}modelPositionIsVisible(e){const t=this._model.getLineCount();return!(e.lineNumber<1||e.lineNumber>t)}getModelLineViewLineCount(e){return 1}getViewLineNumberOfModelPosition(e,t){return e}}class f8{constructor(e,t,i,n,s,r,a,c,h,d,u){this._editorId=e,this.model=t,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=i,this._monospaceLineBreaksComputerFactory=n,this.fontInfo=s,this.tabSize=r,this.wrappingStrategy=a,this.wrappingColumn=c,this.wrappingIndent=h,this.wordBreak=d,this.wrapOnEscapedLineFeeds=u,this._constructLines(!0,null)}dispose(){this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[])}createCoordinatesConverter(){return new m8(this)}_constructLines(e,t){this.modelLineProjections=[],e&&(this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[]));const n=this.model.getLinesContent().length,s=this.createLineBreaksComputer();for(let g=0;gthis.model.getDecorationRange(g)).sort(l.Range.compareRangesUsingStarts);let h=1,d=0,u=-1,f=u+1=h&&m<=d,b=rS(r[g],!p);a[g]=b.getViewLineCount(),this.modelLineProjections[g]=b}this._validModelVersionId=this.model.getVersionId(),this.projectedModelLineLineCounts=new l.ConstantTimePrefixSumComputer(a),this._ensureAtLeastOneVisibleLine()}getHiddenAreas(){return this.hiddenAreasDecorationIds.map(e=>this.model.getDecorationRange(e))}setHiddenAreas(e){const t=e.map(f=>this.model.validateRange(f)),i=g8(t),n=this.hiddenAreasDecorationIds.map(f=>this.model.getDecorationRange(f)).sort(l.Range.compareRangesUsingStarts);if(i.length===n.length){let f=!1;for(let g=0;g({range:f,options:Ct.EMPTY}));this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,s);const r=i;let a=1,c=0,h=-1,d=h+1=a&&g<=c?this.modelLineProjections[f].isVisible()&&(this.modelLineProjections[f]=this.modelLineProjections[f].setVisible(!1),m=!0):(u=!0,this.modelLineProjections[f].isVisible()||(this.modelLineProjections[f]=this.modelLineProjections[f].setVisible(!0),m=!0)),m){const p=this.modelLineProjections[f].getViewLineCount();this.projectedModelLineLineCounts.setValue(f,p)}}return u||this.setHiddenAreas([]),!0}modelPositionIsVisible(e,t){return e<1||e>this.modelLineProjections.length?!1:this.modelLineProjections[e-1].isVisible()}getModelLineViewLineCount(e){return e<1||e>this.modelLineProjections.length?1:this.modelLineProjections[e-1].getViewLineCount()}setTabSize(e){return this.tabSize===e?!1:(this.tabSize=e,this._constructLines(!1,null),!0)}setWrappingSettings(e,t,i,n,s){const r=this.fontInfo.equals(e),a=this.wrappingStrategy===t,c=this.wrappingColumn===i,h=this.wrappingIndent===n,d=this.wordBreak===s;if(r&&a&&c&&h&&d)return!1;const u=r&&a&&!c&&h&&d;this.fontInfo=e,this.wrappingStrategy=t,this.wrappingColumn=i,this.wrappingIndent=n,this.wordBreak=s;let f=null;if(u){f=[];for(let g=0,m=this.modelLineProjections.length;gthis.model.getLineContent(n),getLineInjectedText:n=>this.model.getLineInjectedText(n,this._editorId)};return t.createLineBreaksComputer(i,this.fontInfo,this.tabSize,this.wrappingColumn,this.wrappingIndent,this.wordBreak,this.wrapOnEscapedLineFeeds)}onModelFlushed(){this._constructLines(!0,null)}onModelLinesDeleted(e,t,i){if(!e||e<=this._validModelVersionId)return null;const n=t===1?1:this.projectedModelLineLineCounts.getPrefixSum(t-1)+1,s=this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections.splice(t-1,i-t+1),this.projectedModelLineLineCounts.removeValues(t-1,i-t+1),new iS(n,s)}onModelLinesInserted(e,t,i,n){if(!e||e<=this._validModelVersionId)return null;const s=t>2&&!this.modelLineProjections[t-2].isVisible(),r=t===1?1:this.projectedModelLineLineCounts.getPrefixSum(t-1)+1;let a=0;const c=[],h=[];for(let d=0,u=n.length;dc?(d=this.projectedModelLineLineCounts.getPrefixSum(t-1)+1,u=d+c-1,m=u+1,p=m+(s-c)-1,h=!0):s0&&(this.modelLineProjections[0]=this.modelLineProjections[0].setVisible(!0),this.projectedModelLineLineCounts.setValue(0,this.modelLineProjections[0].getViewLineCount()))}getViewLineCount(){return this.projectedModelLineLineCounts.getTotalSum()}_toValidViewLineNumber(e){if(e<1)return 1;const t=this.getViewLineCount();return e>t?t:e|0}getActiveIndentGuide(e,t,i){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),i=this._toValidViewLineNumber(i);const n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),s=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),r=this.convertViewPositionToModelPosition(i,this.getViewLineMinColumn(i)),a=this.model.guides.getActiveIndentGuide(n.lineNumber,s.lineNumber,r.lineNumber),c=this.convertModelPositionToViewPosition(a.startLineNumber,1),h=this.convertModelPositionToViewPosition(a.endLineNumber,this.model.getLineMaxColumn(a.endLineNumber));return{startLineNumber:c.lineNumber,endLineNumber:h.lineNumber,indent:a.indent}}getViewLineInfo(e){e=this._toValidViewLineNumber(e);const t=this.projectedModelLineLineCounts.getIndexOf(e-1),i=t.index,n=t.remainder;return new J1(i+1,n)}getMinColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getMaxColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(e){const t=this.modelLineProjections[e.modelLineNumber-1],i=t.getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),n=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,i);return new l.Position(e.modelLineNumber,n)}getModelEndPositionOfViewLine(e){const t=this.modelLineProjections[e.modelLineNumber-1],i=t.getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),n=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,i);return new l.Position(e.modelLineNumber,n)}getViewLineInfosGroupedByModelRanges(e,t){const i=this.getViewLineInfo(e),n=this.getViewLineInfo(t),s=new Array;let r=this.getModelStartPositionOfViewLine(i),a=new Array;for(let c=i.modelLineNumber;c<=n.modelLineNumber;c++){const h=this.modelLineProjections[c-1];if(h.isVisible()){const d=c===i.modelLineNumber?i.modelLineWrappedLineIdx:0,u=c===n.modelLineNumber?n.modelLineWrappedLineIdx+1:h.getViewLineCount();for(let f=d;f{if(g.forWrappedLinesAfterColumn!==-1&&this.modelLineProjections[d.modelLineNumber-1].getViewPositionOfModelPosition(0,g.forWrappedLinesAfterColumn).lineNumber>=d.modelLineWrappedLineIdx||g.forWrappedLinesBeforeOrAtColumn!==-1&&this.modelLineProjections[d.modelLineNumber-1].getViewPositionOfModelPosition(0,g.forWrappedLinesBeforeOrAtColumn).lineNumberd.modelLineWrappedLineIdx)return}const p=this.convertModelPositionToViewPosition(d.modelLineNumber,g.horizontalLine.endColumn),b=this.modelLineProjections[d.modelLineNumber-1].getViewPositionOfModelPosition(0,g.horizontalLine.endColumn);return b.lineNumber===d.modelLineWrappedLineIdx?new xa(g.visibleColumn,m,g.className,new Kd(g.horizontalLine.top,p.column),-1,-1):b.lineNumber!!g))}}return r}getViewLinesIndentGuides(e,t){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);const i=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),n=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t));let s=[];const r=[],a=[],c=i.lineNumber-1,h=n.lineNumber-1;let d=null;for(let m=c;m<=h;m++){const p=this.modelLineProjections[m];if(p.isVisible()){const b=p.getViewLineNumberOfModelPosition(0,m===c?i.column:1),v=p.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(m+1)),C=v-b+1;let w=0;C>1&&p.getViewLineMinColumn(this.model,m+1,v)===1&&(w=b===0?1:2),r.push(C),a.push(w),d===null&&(d=new l.Position(m+1,0))}else d!==null&&(s=s.concat(this.model.guides.getLinesIndentGuides(d.lineNumber,m)),d=null)}d!==null&&(s=s.concat(this.model.guides.getLinesIndentGuides(d.lineNumber,n.lineNumber)),d=null);const u=t-e+1,f=new Array(u);let g=0;for(let m=0,p=s.length;mt&&(m=!0,g=t-s+1);const p=this.projectedModelLineLineCounts.getPrefixSum(h)+1;if(u.getViewLinesData(this.model,h+1,f,g,p,s-e,i,c),s+=g,m)break}return c}validateViewPosition(e,t,i){e=this._toValidViewLineNumber(e);const n=this.projectedModelLineLineCounts.getIndexOf(e-1),s=n.index,r=n.remainder,a=this.modelLineProjections[s],c=a.getViewLineMinColumn(this.model,s+1,r),h=a.getViewLineMaxColumn(this.model,s+1,r);th&&(t=h);const d=a.getModelColumnOfViewPosition(r,t);return this.model.validatePosition(new l.Position(s+1,d)).equals(i)?new l.Position(e,t):this.convertModelPositionToViewPosition(i.lineNumber,i.column)}validateViewRange(e,t){const i=this.validateViewPosition(e.startLineNumber,e.startColumn,t.getStartPosition()),n=this.validateViewPosition(e.endLineNumber,e.endColumn,t.getEndPosition());return new l.Range(i.lineNumber,i.column,n.lineNumber,n.column)}convertViewPositionToModelPosition(e,t){const i=this.getViewLineInfo(e),n=this.modelLineProjections[i.modelLineNumber-1].getModelColumnOfViewPosition(i.modelLineWrappedLineIdx,t);return this.model.validatePosition(new l.Position(i.modelLineNumber,n))}convertViewRangeToModelRange(e){const t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),i=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new l.Range(t.lineNumber,t.column,i.lineNumber,i.column)}convertModelPositionToViewPosition(e,t,i=2,n=!1,s=!1){const r=this.model.validatePosition(new l.Position(e,t)),a=r.lineNumber,c=r.column;let h=a-1,d=!1;if(s)for(;h0&&!this.modelLineProjections[h].isVisible();)h--,d=!0;if(h===0&&!this.modelLineProjections[h].isVisible())return new l.Position(n?0:1,1);const u=1+this.projectedModelLineLineCounts.getPrefixSum(h);let f;return d?s?f=this.modelLineProjections[h].getViewPositionOfModelPosition(u,1,i):f=this.modelLineProjections[h].getViewPositionOfModelPosition(u,this.model.getLineMaxColumn(h+1),i):f=this.modelLineProjections[a-1].getViewPositionOfModelPosition(u,c,i),f}convertModelRangeToViewRange(e,t=0){if(e.isEmpty()){const i=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,t);return l.Range.fromPositions(i)}else{const i=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,1),n=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn,0);return new l.Range(i.lineNumber,i.column,n.lineNumber,n.column)}}getViewLineNumberOfModelPosition(e,t){let i=e-1;if(this.modelLineProjections[i].isVisible()){const s=1+this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections[i].getViewLineNumberOfModelPosition(s,t)}for(;i>0&&!this.modelLineProjections[i].isVisible();)i--;if(i===0&&!this.modelLineProjections[i].isVisible())return 1;const n=1+this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections[i].getViewLineNumberOfModelPosition(n,this.model.getLineMaxColumn(i+1))}getDecorationsInRange(e,t,i,n,s,r){const a=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),c=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(c.lineNumber-a.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new l.Range(a.lineNumber,1,c.lineNumber,c.column),t,i,n,s,r);let h=[];const d=a.lineNumber-1,u=c.lineNumber-1;let f=null;for(let b=d;b<=u;b++)if(this.modelLineProjections[b].isVisible())f===null&&(f=new l.Position(b+1,b===d?a.column:1));else if(f!==null){const C=this.model.getLineMaxColumn(b);h=h.concat(this.model.getDecorationsInRange(new l.Range(f.lineNumber,f.column,b,C),t,i,n,s)),f=null}f!==null&&(h=h.concat(this.model.getDecorationsInRange(new l.Range(f.lineNumber,f.column,c.lineNumber,c.column),t,i,n,s)),f=null),h.sort((b,v)=>{const C=l.Range.compareRangesUsingStarts(b.range,v.range);return C===0?b.idv.id?1:0:C});const g=[];let m=0,p=null;for(const b of h){const v=b.id;p!==v&&(p=v,g[m++]=b)}return g}getInjectedTextAt(e){const t=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[t.modelLineNumber-1].getInjectedTextAt(t.modelLineWrappedLineIdx,e.column)}normalizePosition(e,t){const i=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[i.modelLineNumber-1].normalizePosition(i.modelLineWrappedLineIdx,e,t)}getLineIndentColumn(e){const t=this.getViewLineInfo(e);return t.modelLineWrappedLineIdx===0?this.model.getLineIndentColumn(t.modelLineNumber):0}}function g8(o){if(o.length===0)return[];const e=o.slice();e.sort(l.Range.compareRangesUsingStarts);const t=[];let i=e[0].startLineNumber,n=e[0].endLineNumber;for(let s=1,r=e.length;sn+1?(t.push(new l.Range(i,1,n,1)),i=a.startLineNumber,n=a.endLineNumber):a.endLineNumber>n&&(n=a.endLineNumber)}return t.push(new l.Range(i,1,n,1)),t}class J1{constructor(e,t){this.modelLineNumber=e,this.modelLineWrappedLineIdx=t}}class W1{constructor(e,t){this.modelRange=e,this.viewLines=t}}class m8{constructor(e){this._lines=e}convertViewPositionToModelPosition(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column)}convertViewRangeToModelRange(e){return this._lines.convertViewRangeToModelRange(e)}validateViewPosition(e,t){return this._lines.validateViewPosition(e.lineNumber,e.column,t)}validateViewRange(e,t){return this._lines.validateViewRange(e,t)}convertModelPositionToViewPosition(e,t,i,n){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column,t,i,n)}convertModelRangeToViewRange(e,t){return this._lines.convertModelRangeToViewRange(e,t)}modelPositionIsVisible(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column)}getModelLineViewLineCount(e){return this._lines.getModelLineViewLineCount(e)}getViewLineNumberOfModelPosition(e,t){return this._lines.getViewLineNumberOfModelPosition(e,t)}}class p8{constructor(e){this.model=e}dispose(){}createCoordinatesConverter(){return new u8(this.model)}getHiddenAreas(){return[]}setHiddenAreas(e){return!1}setTabSize(e){return!1}setWrappingSettings(e,t,i,n){return!1}createLineBreaksComputer(){const e=[];return{addRequest:(t,i)=>{e.push(null)},finalize:()=>e}}onModelFlushed(){}onModelLinesDeleted(e,t,i){return new iS(t,i)}onModelLinesInserted(e,t,i,n){return new nS(t,i)}onModelLineChanged(e,t,i){return[!1,new j1(t,1),null,null]}acceptVersionId(e){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(e,t,i){return{startLineNumber:e,endLineNumber:e,indent:0}}getViewLinesBracketGuides(e,t,i){return new Array(t-e+1).fill([])}getViewLinesIndentGuides(e,t){const i=t-e+1,n=new Array(i);for(let s=0;s>>3]|=1<>>3]&1<>>3]&1<this._updateConfigurationViewLineCountNow(),0)),this._hasFocus=!1,this._viewportStart=lS.create(this.model),this.glyphLanes=new _8(0),this.model.isTooLargeForTokenization())this._lines=new p8(this.model);else{const u=this._configuration.options,f=u.get(59),g=u.get(156),m=u.get(166),p=u.get(155),b=u.get(146),v=u.get(160);this._lines=new f8(this._editorId,this.model,n,s,f,this.model.getOptions().tabSize,g,m.wrappingColumn,p,b,v)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new Q6(i,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new r8(this._configuration,this.getLineCount(),this._getCustomLineHeights(),r)),this._register(this.viewLayout.onDidScroll(u=>{u.scrollTopChanged&&this._handleVisibleLinesChanged(),u.scrollTopChanged&&this._viewportStart.invalidate(),this._eventDispatcher.emitSingleViewEvent(new N6(u)),this._eventDispatcher.emitOutgoingEvent(new oS(u.oldScrollWidth,u.oldScrollLeft,u.oldScrollHeight,u.oldScrollTop,u.scrollWidth,u.scrollLeft,u.scrollHeight,u.scrollTop))})),this._register(this.viewLayout.onDidContentSizeChange(u=>{this._eventDispatcher.emitOutgoingEvent(u)})),this._decorations=new c8(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast(u=>{try{const f=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(f,u)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(_m.getInstance().onDidChange(()=>{this._eventDispatcher.emitSingleViewEvent(new A6)})),this._register(this._themeService.onDidColorThemeChange(u=>{this._invalidateDecorationsColorCache(),this._eventDispatcher.emitSingleViewEvent(new R6(u))})),this._updateConfigurationViewLineCountNow(),this.model.registerViewModel(this)}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this._viewportStart.dispose(),this._eventDispatcher.dispose(),this.model.unregisterViewModel(this)}getEditorOption(e){return this._configuration.options.get(e)}createLineBreaksComputer(e){return this._lines.createLineBreaksComputer(e)}addViewEventHandler(e){this._eventDispatcher.addViewEventHandler(e)}removeViewEventHandler(e){this._eventDispatcher.removeViewEventHandler(e)}_getCustomLineHeights(){if(!this._configuration.options.get(5))return[];const t=this.model.getCustomLineHeightsDecorations(this._editorId);return Gm.fromDecorations(t,this.coordinatesConverter,this._configuration)}_getCustomLineHeightsForLines(e,t){if(!this._configuration.options.get(5))return[];const n=new l.Range(e,1,t,this.model.getLineMaxColumn(t)),s=this.model.getCustomLineHeightsDecorationsInRange(n,this._editorId);return Gm.fromDecorations(s,this.coordinatesConverter,this._configuration)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}getModelVisibleRanges(){const e=this.viewLayout.getLinesViewportData(),t=new l.Range(e.startLineNumber,this.getLineMinColumn(e.startLineNumber),e.endLineNumber,this.getLineMaxColumn(e.endLineNumber));return this._toModelVisibleRanges(t)}visibleLinesStabilized(){const e=this.getModelVisibleRanges();this._attachedView.setVisibleLines(e,!0)}_handleVisibleLinesChanged(){const e=this.getModelVisibleRanges();this._attachedView.setVisibleLines(e,!1)}setHasFocus(e){this._hasFocus=e,this._cursor.setHasFocus(e),this._eventDispatcher.emitSingleViewEvent(new I6(e)),this._eventDispatcher.emitOutgoingEvent(new $m(!e,e))}setHasWidgetFocus(e){this._eventDispatcher.emitOutgoingEvent(new F6(!e,e))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new L6)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new D6)}_captureStableViewport(){if(this._viewportStart.isValid&&this.viewLayout.getCurrentScrollTop()>0){const e=new l.Position(this._viewportStart.viewLineNumber,this.getLineMinColumn(this._viewportStart.viewLineNumber)),t=this.coordinatesConverter.convertViewPositionToModelPosition(e);return new eN(t,this._viewportStart.startLineDelta)}return new eN(null,0)}_onConfigurationChanged(e,t){const i=this._captureStableViewport(),n=this._configuration.options,s=n.get(59),r=n.get(156),a=n.get(166),c=n.get(155),h=n.get(146);this._lines.setWrappingSettings(s,r,a.wrappingColumn,c,h)&&(e.emitViewEvent(new Vm),e.emitViewEvent(new Um),e.emitViewEvent(new Ba(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount(),this._getCustomLineHeights()),this._updateConfigurationViewLineCount.schedule()),t.hasChanged(104)&&(this._decorations.reset(),e.emitViewEvent(new Ba(null))),t.hasChanged(112)&&(this._decorations.reset(),e.emitViewEvent(new Ba(null))),e.emitViewEvent(new x6(t)),this.viewLayout.onConfigurationChanged(t),i.recoverViewportStart(this.coordinatesConverter,this.viewLayout),bc.shouldRecreate(t)&&(this.cursorConfig=new bc(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig))}onDidChangeContentOrInjectedText(e){try{const i=this._eventDispatcher.beginEmitViewEvents();let n=!1,s=!1;const r=e instanceof Ra?e.rawContentChangedEvent.changes:e.changes,a=e instanceof Ra?e.rawContentChangedEvent.versionId:null,c=this._lines.createLineBreaksComputer();for(const f of r)switch(f.changeType){case 4:{for(let g=0;g0&&this.viewLayout.changeSpecialLineHeights(f=>{for(const g of u){const m=this._getCustomLineHeightsForLines(g.fromLineNumber,g.toLineNumber);for(const p of m)f.insertOrChangeCustomLineHeight(p.decorationId,p.startLineNumber,p.endLineNumber,p.lineHeight)}}),this.viewLayout.onHeightMaybeChanged(),!n&&s&&(i.emitViewEvent(new Um),i.emitViewEvent(new Ba(null)),this._cursor.onLineMappingChanged(i),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}const t=this._viewportStart.isValid;if(this._viewportStart.invalidate(),this._configuration.setModelLineCount(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&t){const i=this.model._getTrackedRange(this._viewportStart.modelTrackedRange);if(i){const n=this.coordinatesConverter.convertModelPositionToViewPosition(i.getStartPosition()),s=this.viewLayout.getVerticalOffsetForLineNumber(n.lineNumber);this.viewLayout.setScrollPosition({scrollTop:s+this._viewportStart.startLineDelta},1)}}this._handleVisibleLinesChanged()}emitContentChangeEvent(e){this._emitViewEvent(t=>{e instanceof Ra&&t.emitOutgoingEvent(new G6(e.contentChangedEvent)),this._cursor.onModelContentChanged(t,e)})}_registerModelEvents(){this._configuration.options.get(5)&&this._register(this.model.onDidChangeLineHeight(i=>{const n=i.changes.filter(s=>s.ownerId===this._editorId||s.ownerId===0);if(this.viewLayout.changeSpecialLineHeights(s=>{for(const r of n){const{decorationId:a,lineNumber:c,lineHeightMultiplier:h}=r,d=this.coordinatesConverter.convertModelRangeToViewRange(new l.Range(c,1,c,this.model.getLineMaxColumn(c)));h!==null?s.insertOrChangeCustomLineHeight(a,d.startLineNumber,d.endLineNumber,h*this._configuration.options.get(75)):s.removeCustomLineHeight(a)}}),n.length>0){const s=new FT(n);this._eventDispatcher.emitOutgoingEvent(new Y6(s))}})),this._configuration.options.get(172)&&this._register(this.model.onDidChangeFont(i=>{const n=i.changes.filter(s=>s.ownerId===this._editorId||s.ownerId===0);if(n.length>0){const s=new BT(n);this._eventDispatcher.emitOutgoingEvent(new Z6(s))}})),this._register(this.model.onDidChangeTokens(i=>{const n=[];for(let s=0,r=i.ranges.length;s{this._eventDispatcher.emitSingleViewEvent(new T6),this.cursorConfig=new bc(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new K6(i))})),this._register(this.model.onDidChangeLanguage(i=>{this.cursorConfig=new bc(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new $6(i))})),this._register(this.model.onDidChangeOptions(i=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const n=this._eventDispatcher.beginEmitViewEvents();n.emitViewEvent(new Vm),n.emitViewEvent(new Um),n.emitViewEvent(new Ba(null)),this._cursor.onLineMappingChanged(n),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount(),this._getCustomLineHeights())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new bc(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new j6(i))})),this._register(this.model.onDidChangeDecorations(i=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new Ba(i)),this._eventDispatcher.emitOutgoingEvent(new U6(i))}))}getFontSizeAtPosition(e){if(!this._configuration.options.get(172))return null;const i=this.model.getFontDecorationsInRange(l.Range.fromPositions(e),this._editorId);let n=this._configuration.options.get(59).fontSize+"px";for(const s of i)if(s.options.fontSize){n=s.options.fontSize;break}return n}setHiddenAreas(e,t,i){this.hiddenAreasModel.setHiddenAreas(t,e);const n=this.hiddenAreasModel.getMergedRanges();if(n===this.previousHiddenAreas&&!i)return;this.previousHiddenAreas=n;const s=this._captureStableViewport();let r=!1;try{const a=this._eventDispatcher.beginEmitViewEvents();r=this._lines.setHiddenAreas(n),r&&(a.emitViewEvent(new Vm),a.emitViewEvent(new Um),a.emitViewEvent(new Ba(null)),this._cursor.onLineMappingChanged(a),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount(),this._getCustomLineHeights()),this.viewLayout.onHeightMaybeChanged());const c=s.viewportStartModelPosition?.lineNumber;c&&n.some(d=>d.startLineNumber<=c&&c<=d.endLineNumber)||s.recoverViewportStart(this.coordinatesConverter,this.viewLayout)}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),r&&this._eventDispatcher.emitOutgoingEvent(new z6)}getVisibleRangesPlusViewportAboveBelow(){const e=this._configuration.options.get(165),t=this._configuration.options.get(75),i=Math.max(20,Math.round(e.height/t)),n=this.viewLayout.getLinesViewportData(),s=Math.max(1,n.completelyVisibleStartLineNumber-i),r=Math.min(this.getLineCount(),n.completelyVisibleEndLineNumber+i);return this._toModelVisibleRanges(new l.Range(s,this.getLineMinColumn(s),r,this.getLineMaxColumn(r)))}getVisibleRanges(){const e=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(e)}getHiddenAreas(){return this._lines.getHiddenAreas()}_toModelVisibleRanges(e){const t=this.coordinatesConverter.convertViewRangeToModelRange(e),i=this._lines.getHiddenAreas();if(i.length===0)return[t];const n=[];let s=0,r=t.startLineNumber,a=t.startColumn;const c=t.endLineNumber,h=t.endColumn;for(let d=0,u=i.length;dc||(rr?e:new l.Range(s,this.getLineMinColumn(s),r,this.getLineMaxColumn(r))}saveState(){const e=this.viewLayout.saveState(),t=e.scrollTop,i=this.viewLayout.getLineNumberAtVerticalOffset(t),n=this.coordinatesConverter.convertViewPositionToModelPosition(new l.Position(i,this.getLineMinColumn(i))),s=this.viewLayout.getVerticalOffsetForLineNumber(i)-t;return{scrollLeft:e.scrollLeft,firstPosition:n,firstPositionDeltaTop:s}}reduceRestoreState(e){if(typeof e.firstPosition>"u")return this._reduceRestoreStateCompatibility(e);const t=this.model.validatePosition(e.firstPosition),i=this.coordinatesConverter.convertModelPositionToViewPosition(t),n=this.viewLayout.getVerticalOffsetForLineNumber(i.lineNumber)-e.firstPositionDeltaTop;return{scrollLeft:e.scrollLeft,scrollTop:n}}_reduceRestoreStateCompatibility(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTopWithoutViewZones}}getTabSize(){return this.model.getOptions().tabSize}getLineCount(){return this._lines.getViewLineCount()}setViewport(e,t,i){this._viewportStart.update(this,e)}getActiveIndentGuide(e,t,i){return this._lines.getActiveIndentGuide(e,t,i)}getLinesIndentGuides(e,t){return this._lines.getViewLinesIndentGuides(e,t)}getBracketGuidesInRangeByLine(e,t,i,n){return this._lines.getViewLinesBracketGuides(e,t,i,n)}getLineContent(e){return this._lines.getViewLineContent(e)}getLineLength(e){return this._lines.getViewLineLength(e)}getLineMinColumn(e){return this._lines.getViewLineMinColumn(e)}getLineMaxColumn(e){return this._lines.getViewLineMaxColumn(e)}getLineFirstNonWhitespaceColumn(e){const t=l.firstNonWhitespaceIndex(this.getLineContent(e));return t===-1?0:t+1}getLineLastNonWhitespaceColumn(e){const t=l.lastNonWhitespaceIndex(this.getLineContent(e));return t===-1?0:t+2}getMinimapDecorationsInRange(e){return this._decorations.getMinimapDecorationsInRange(e)}getDecorationsInViewport(e){return this._decorations.getDecorationsViewportData(e).decorations}getInjectedTextAt(e){return this._lines.getInjectedTextAt(e)}_getTextDirection(e,t){let i=0;for(const n of t){const s=n.range;if(s.startLineNumber>e||s.endLineNumber0?l.TextDirection.RTL:l.TextDirection.LTR}getTextDirection(e){const t=this._decorations.getDecorationsOnLine(e);return this._getTextDirection(e,t.decorations)}getViewportViewLineRenderingData(e,t){const i=this._decorations.getDecorationsViewportData(e),n=t-e.startLineNumber,s=i.inlineDecorations[n],r=i.hasVariableFonts[n];return this._getViewLineRenderingData(t,s,r,i.decorations)}getViewLineRenderingData(e){const t=this._decorations.getDecorationsOnLine(e);return this._getViewLineRenderingData(e,t.inlineDecorations[0],t.hasVariableFonts[0],t.decorations)}_getViewLineRenderingData(e,t,i,n){const s=this.model.mightContainRTL(),r=this.model.mightContainNonBasicASCII(),a=this.getTabSize(),c=this._lines.getViewLineData(e);return c.inlineDecorations&&(t=[...t,...c.inlineDecorations]),new Wi(c.minColumn,c.maxColumn,c.content,c.continuesWithWrappedLine,s,r,c.tokens,t,a,c.startVisibleColumn,this._getTextDirection(e,n),i)}getViewLineData(e){return this._lines.getViewLineData(e)}getMinimapLinesRenderingData(e,t,i){const n=this._lines.getViewLinesData(e,t,i);return new Oz(this.getTabSize(),n)}getAllOverviewRulerDecorations(e){const t=this.model.getOverviewRulerDecorations(this._editorId,Pf(this._configuration.options),kf(this._configuration.options)),i=new C8;for(const n of t){const s=n.options,r=s.overviewRuler;if(!r)continue;const a=r.position;if(a===0)continue;const c=r.getColor(e.value),h=this.coordinatesConverter.getViewLineNumberOfModelPosition(n.range.startLineNumber,n.range.startColumn),d=this.coordinatesConverter.getViewLineNumberOfModelPosition(n.range.endLineNumber,n.range.endColumn);i.accept(c,s.zIndex,h,d,a)}return i.asArray}_invalidateDecorationsColorCache(){const e=this.model.getOverviewRulerDecorations();for(const t of e)t.options.overviewRuler?.invalidateCachedColor(),t.options.minimap?.invalidateCachedColor()}getValueInRange(e,t){const i=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueInRange(i,t)}getValueLengthInRange(e,t){const i=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueLengthInRange(i,t)}modifyPosition(e,t){const i=this.coordinatesConverter.convertViewPositionToModelPosition(e),n=this.model.modifyPosition(i,t);return this.coordinatesConverter.convertModelPositionToViewPosition(n)}deduceModelPositionRelativeToViewPosition(e,t,i){const n=this.coordinatesConverter.convertViewPositionToModelPosition(e);this.model.getEOL().length===2&&(t<0?t-=i:t+=i);const r=this.model.getOffsetAt(n)+t;return this.model.getPositionAt(r)}getPlainTextToCopy(e,t,i){const n=i?`\r +`:this.model.getEOL();e=e.slice(0),e.sort(l.Range.compareRangesUsingStarts);let s=!1,r=!1;for(const d of e)d.isEmpty()?s=!0:r=!0;if(!r&&!t)return{sourceRanges:[],sourceText:""};const a=[],c=[],h=(d,u="")=>{a.push(d),c.push(this.model.getValueInRange(d,i?2:0)+u)};if(s&&t){let d=0;for(const u of e){const f=u.startLineNumber;u.isEmpty()?f!==d&&h(new l.Range(f,this.model.getLineMinColumn(f),f,this.model.getLineMaxColumn(f)),n):h(u),d=f}}else for(const d of e)d.isEmpty()||h(d);return{sourceRanges:a,sourceText:c.length===1?c[0]:c}}getRichTextToCopy(e,t){const i=this.model.getLanguageId();if(i===pn||e.length!==1)return null;let n=e[0];if(n.isEmpty()){if(!t)return null;const d=n.startLineNumber;n=new l.Range(d,this.model.getLineMinColumn(d),d,this.model.getLineMaxColumn(d))}const s=this._configuration.options.get(59),r=this._getColorMap(),c=/[:;\\\/<>]/.test(s.fontFamily)||s.fontFamily===Zi.fontFamily;let h;return c?h=Zi.fontFamily:(h=s.fontFamily,h=h.replace(/"/g,"'"),/[,']/.test(h)||/[+ ]/.test(h)&&(h=`'${h}'`),h=`${h}, ${Zi.fontFamily}`),{mode:i,html:`
`+this._getHTMLToCopy(n,r)+"
"}}_getHTMLToCopy(e,t){const i=e.startLineNumber,n=e.startColumn,s=e.endLineNumber,r=e.endColumn,a=this.getTabSize();let c="";for(let h=i;h<=s;h++){const d=this.model.tokenization.getLineTokens(h),u=d.getLineContent(),f=h===i?n-1:0,g=h===s?r-1:u.length;u===""?c+="
":c+=H6(u,d.inflate(),t,f,g,a,l.isWindows)}return c}_getColorMap(){const e=l.TokenizationRegistry.getColorMap(),t=["#000000"];if(e)for(let i=1,n=e.length;ithis._cursor.setStates(n,e,t,i))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(e){this._cursor.setCursorColumnSelectData(e)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(e){this._cursor.setPrevEditOperationType(e)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(e,t,i=0){this._withViewEventsCollector(n=>this._cursor.setSelections(n,e,t,i))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(e){this._withViewEventsCollector(t=>this._cursor.restoreState(t,e))}_executeCursorEdit(e){if(this._cursor.context.cursorConfig.readOnly){this._eventDispatcher.emitOutgoingEvent(new V6);return}this._withViewEventsCollector(e)}executeEdits(e,t,i,n){this._executeCursorEdit(s=>this._cursor.executeEdits(s,e,t,i,n))}startComposition(){this._executeCursorEdit(e=>this._cursor.startComposition(e))}endComposition(e){this._executeCursorEdit(t=>this._cursor.endComposition(t,e))}type(e,t){this._executeCursorEdit(i=>this._cursor.type(i,e,t))}compositionType(e,t,i,n,s){this._executeCursorEdit(r=>this._cursor.compositionType(r,e,t,i,n,s))}paste(e,t,i,n){this._executeCursorEdit(s=>this._cursor.paste(s,e,t,i,n))}cut(e){this._executeCursorEdit(t=>this._cursor.cut(t,e))}executeCommand(e,t){this._executeCursorEdit(i=>this._cursor.executeCommand(i,e,t))}executeCommands(e,t){this._executeCursorEdit(i=>this._cursor.executeCommands(i,e,t))}revealAllCursors(e,t,i=!1){this._withViewEventsCollector(n=>this._cursor.revealAll(n,e,i,0,t,0))}revealPrimaryCursor(e,t,i=!1){this._withViewEventsCollector(n=>this._cursor.revealPrimary(n,e,i,0,t,0))}revealTopMostCursor(e){const t=this._cursor.getTopMostViewPosition(),i=new l.Range(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(n=>n.emitViewEvent(new bu(e,!1,i,null,0,!0,0)))}revealBottomMostCursor(e){const t=this._cursor.getBottomMostViewPosition(),i=new l.Range(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(n=>n.emitViewEvent(new bu(e,!1,i,null,0,!0,0)))}revealRange(e,t,i,n,s){this._withViewEventsCollector(r=>r.emitViewEvent(new bu(e,!1,i,null,n,t,s)))}changeWhitespace(e){this.viewLayout.changeWhitespace(e)&&(this._eventDispatcher.emitSingleViewEvent(new O6),this._eventDispatcher.emitOutgoingEvent(new B6))}_withViewEventsCollector(e){return this._transactionalTarget.batchChanges(()=>this._emitViewEvent(e))}_emitViewEvent(e){try{const t=this._eventDispatcher.beginEmitViewEvents();return e(t)}finally{this._eventDispatcher.endEmitViewEvents()}}batchEvents(e){this._withViewEventsCollector(()=>{e()})}normalizePosition(e,t){return this._lines.normalizePosition(e,t)}getLineIndentColumn(e){return this._lines.getLineIndentColumn(e)}};class lS{static create(e){const t=e._setTrackedRange(null,new l.Range(1,1,1,1),1);return new lS(e,1,!1,t,0)}get viewLineNumber(){return this._viewLineNumber}get isValid(){return this._isValid}get modelTrackedRange(){return this._modelTrackedRange}get startLineDelta(){return this._startLineDelta}constructor(e,t,i,n,s){this._model=e,this._viewLineNumber=t,this._isValid=i,this._modelTrackedRange=n,this._startLineDelta=s}dispose(){this._model._setTrackedRange(this._modelTrackedRange,null,1)}update(e,t){const i=e.coordinatesConverter.convertViewPositionToModelPosition(new l.Position(t,e.getLineMinColumn(t))),n=e.model._setTrackedRange(this._modelTrackedRange,new l.Range(i.lineNumber,i.column,i.lineNumber,i.column),1),s=e.viewLayout.getVerticalOffsetForLineNumber(t),r=e.viewLayout.getCurrentScrollTop();this._viewLineNumber=t,this._isValid=!0,this._modelTrackedRange=n,this._startLineDelta=r-s}invalidate(){this._isValid=!1}}class C8{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(e,t,i,n,s){const r=this._asMap[e];if(r){const a=r.data,c=a[a.length-3],h=a[a.length-1];if(c===s&&h+1>=i){n>h&&(a[a.length-1]=n);return}a.push(s,i,n)}else{const a=new Cd(e,t,[s,i,n]);this._asMap[e]=a,this.asArray.push(a)}}}class v8{constructor(){this.hiddenAreas=new Map,this.shouldRecompute=!1,this.ranges=[]}setHiddenAreas(e,t){const i=this.hiddenAreas.get(e);i&&H1(i,t)||(this.hiddenAreas.set(e,t),this.shouldRecompute=!0)}getMergedRanges(){if(!this.shouldRecompute)return this.ranges;this.shouldRecompute=!1;const e=Array.from(this.hiddenAreas.values()).reduce((t,i)=>w8(t,i),[]);return H1(this.ranges,e)?this.ranges:(this.ranges=e,this.ranges)}}function w8(o,e){const t=[];let i=0,n=0;for(;i=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Es=function(o,e){return function(t,i){e(t,i,o)}},Va;_.CodeEditorWidget=(Dl=class extends l.Disposable{get isSimpleWidget(){return this._configuration.isSimpleWidget}get contextMenuId(){return this._configuration.contextMenuId}get contextKeyService(){return this._contextKeyService}constructor(e,t,i,n,s,r,a,c,h,d,u,f,g){super(),this.languageConfigurationService=u,this._deliveryQueue=l.createEventDeliveryQueue(),this._contributions=this._register(new w5),this._onDidDispose=this._register(new l.Emitter),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new l.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new l.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new l.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new l.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new l.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeLineHeight=this._register(new l.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeLineHeight=this._onDidChangeLineHeight.event,this._onDidChangeFont=this._register(new l.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeFont=this._onDidChangeFont.event,this._onDidChangeModelTokens=this._register(new l.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelTokens=this._onDidChangeModelTokens.event,this._onDidChangeConfiguration=this._register(new l.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onWillChangeModel=this._register(new l.Emitter({deliveryQueue:this._deliveryQueue})),this.onWillChangeModel=this._onWillChangeModel.event,this._onDidChangeModel=this._register(new l.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new l.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new l.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new kt(this._contributions,this._deliveryQueue)),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new l.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new tN({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new tN({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new kt(this._contributions,this._deliveryQueue)),this.onWillType=this._onWillType.event,this._onDidType=this._register(new kt(this._contributions,this._deliveryQueue)),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new kt(this._contributions,this._deliveryQueue)),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new kt(this._contributions,this._deliveryQueue)),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new kt(this._contributions,this._deliveryQueue)),this.onDidPaste=this._onDidPaste.event,this._onWillCopy=this._register(new kt(this._contributions,this._deliveryQueue)),this.onWillCopy=this._onWillCopy.event,this._onWillCut=this._register(new kt(this._contributions,this._deliveryQueue)),this.onWillCut=this._onWillCut.event,this._onWillPaste=this._register(new kt(this._contributions,this._deliveryQueue)),this.onWillPaste=this._onWillPaste.event,this._onMouseUp=this._register(new kt(this._contributions,this._deliveryQueue)),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new kt(this._contributions,this._deliveryQueue)),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new kt(this._contributions,this._deliveryQueue)),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new kt(this._contributions,this._deliveryQueue)),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new kt(this._contributions,this._deliveryQueue)),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onDropIntoEditor=this._register(new kt(this._contributions,this._deliveryQueue)),this.onDropIntoEditor=this._onDropIntoEditor.event,this._onContextMenu=this._register(new kt(this._contributions,this._deliveryQueue)),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new kt(this._contributions,this._deliveryQueue)),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new kt(this._contributions,this._deliveryQueue)),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new kt(this._contributions,this._deliveryQueue)),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new kt(this._contributions,this._deliveryQueue)),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new kt(this._contributions,this._deliveryQueue)),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new l.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new l.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new l.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeViewZones=this._onDidChangeViewZones.event,this._onDidChangeHiddenAreas=this._register(new l.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeHiddenAreas=this._onDidChangeHiddenAreas.event,this._updateCounter=0,this._onWillTriggerEditorOperationEvent=this._register(new l.Emitter),this._onBeginUpdate=this._register(new l.Emitter),this.onBeginUpdate=this._onBeginUpdate.event,this._onEndUpdate=this._register(new l.Emitter),this.onEndUpdate=this._onEndUpdate.event,this._onBeforeExecuteEdit=this._register(new l.Emitter),this.onBeforeExecuteEdit=this._onBeforeExecuteEdit.event,this._actions=new Map,this._bannerDomNode=null,this._dropIntoEditorDecorations=this.createDecorationsCollection(),this.inComposition=!1,s.willCreateCodeEditor();const m={...t};if(this._domElement=e,this._userInteractionService=g,this._overflowWidgetsDomNode=m.overflowWidgetsDomNode,delete m.overflowWidgetsDomNode,this._id=++y8,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this._telemetryData=i.telemetryData,this._configuration=this._register(this._createConfiguration(i.isSimpleWidget||!1,i.contextMenuId??(i.isSimpleWidget?ct.SimpleEditorContext:ct.EditorContext),m,d)),this._domElement.style?.setProperty("--editor-font-size",this._configuration.options.get(61)+"px"),this._register(this._configuration.onDidChange(v=>{this._onDidChangeConfiguration.fire(v);const C=this._configuration.options;if(v.hasChanged(165)){const w=C.get(165);this._onDidLayoutChange.fire(w)}v.hasChanged(61)&&this._domElement.style.setProperty("--editor-font-size",C.get(61)+"px")})),this._contextKeyService=this._register(a.createScoped(this._domElement)),i.contextKeyValues)for(const[v,C]of Object.entries(i.contextKeyValues))this._contextKeyService.createKey(v,C);this._notificationService=h,this._codeEditorService=s,this._commandService=r,this._themeService=c,this._register(new D8(this,this._contextKeyService)),this._register(new x8(this,this._contextKeyService,f)),this._instantiationService=this._register(n.createChild(new Oc([be,this._contextKeyService]))),this._modelData=null,this._contentWidgets={},this._overlayWidgets={},this._glyphMarginWidgets={};let p;Array.isArray(i.contributions)?p=i.contributions:p=Ql.getEditorContributions(),this._contributions.initialize(this,p,this._instantiationService);for(const v of Ql.getEditorActions()){if(this._actions.has(v.id)){l.onUnexpectedError(new Error(`Cannot have two actions with the same id ${v.id}`));continue}const C=new zT(v.id,v.label,v.alias,v.metadata,v.precondition??void 0,w=>this._instantiationService.invokeFunction(S=>Promise.resolve(v.runEditorCommand(S,this,w))),this._contextKeyService);this._actions.set(C.id,C)}const b=()=>!this._configuration.options.get(104)&&this._configuration.options.get(43).enabled;this._register(new MF(this._domElement,{onDragOver:v=>{if(!b())return;const C=this.getTargetAtClientPoint(v.clientX,v.clientY);C?.position&&this.showDropIndicatorAt(C.position)},onDrop:async v=>{if(!b()||(this.removeDropIndicator(),!v.dataTransfer))return;const C=this.getTargetAtClientPoint(v.clientX,v.clientY);C?.position&&this._onDropIntoEditor.fire({position:C.position,event:v})},onDragLeave:()=>{this.removeDropIndicator()},onDragEnd:()=>{this.removeDropIndicator()}})),this._codeEditorService.addCodeEditor(this)}writeScreenReaderContent(e){this._modelData?.view.writeScreenReaderContent(e)}_createConfiguration(e,t,i,n){return new GC(e,t,i,this._domElement,n)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return _d.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._actions.clear(),this._contentWidgets={},this._overlayWidgets={},this._removeDecorationTypes(),this._postDetachModelCleanup(this._detachModel()),this._onDidDispose.fire(),super.dispose()}invokeWithinContext(e){return this._instantiationService.invokeFunction(e)}updateOptions(e){this._configuration.updateOptions(e||{})}getOptions(){return this._configuration.options}getOption(e){return this._configuration.options.get(e)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(e){return this._modelData?Ne.getWordAtPosition(this._modelData.model,this._configuration.options.get(148),this._configuration.options.get(147),e):null}getValue(e=null){if(!this._modelData)return"";const t=!!(e&&e.preserveBOM);let i=0;return e&&e.lineEnding&&e.lineEnding===` +`?i=1:e&&e.lineEnding&&e.lineEnding===`\r +`&&(i=2),this._modelData.model.getValue(i,t)}setValue(e){try{if(this._beginUpdate(),!this._modelData)return;this._modelData.model.setValue(e)}finally{this._endUpdate()}}getModel(){return this._modelData?this._modelData.model:null}setModel(e=null){try{this._beginUpdate();const t=e;if(this._modelData===null&&t===null||this._modelData&&this._modelData.model===t)return;const i={oldModelUrl:this._modelData?.model.uri||null,newModelUrl:t?.uri||null};this._onWillChangeModel.fire(i);const n=this.hasTextFocus(),s=this._detachModel();this._attachModel(t),this.hasModel()?n&&this.focus():(this._editorTextFocus.setValue(!1),this._editorWidgetFocus.setValue(!1)),this._removeDecorationTypes(),this._onDidChangeModel.fire(i),this._postDetachModelCleanup(s),this._contributionsDisposable=this._contributions.onAfterModelAttached()}finally{this._endUpdate()}}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(const e in this._decorationTypeSubtypes){const t=this._decorationTypeSubtypes[e];for(const i in t)this._removeDecorationType(e+"-"+i)}this._decorationTypeSubtypes={}}}getVisibleRanges(){return this._modelData?this._modelData.viewModel.getVisibleRanges():[]}getVisibleRangesPlusViewportAboveBelow(){return this._modelData?this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow():[]}getWhitespaces(){return this._modelData?this._modelData.viewModel.viewLayout.getWhitespaces():[]}static _getVerticalOffsetAfterPosition(e,t,i,n){const s=e.model.validatePosition({lineNumber:t,column:i}),r=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(s);return e.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(r.lineNumber,n)}getTopForLineNumber(e,t=!1){return this._modelData?Va._getVerticalOffsetForPosition(this._modelData,e,1,t):-1}getTopForPosition(e,t){return this._modelData?Va._getVerticalOffsetForPosition(this._modelData,e,t,!1):-1}static _getVerticalOffsetForPosition(e,t,i,n=!1){const s=e.model.validatePosition({lineNumber:t,column:i}),r=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(s);return e.viewModel.viewLayout.getVerticalOffsetForLineNumber(r.lineNumber,n)}getBottomForLineNumber(e,t=!1){return this._modelData?Va._getVerticalOffsetAfterPosition(this._modelData,e,Number.MAX_SAFE_INTEGER,t):-1}getLineHeightForPosition(e){if(!this._modelData)return-1;const t=this._modelData.viewModel,i=t.coordinatesConverter,n=l.Position.lift(e);if(i.modelPositionIsVisible(n)){const s=i.convertModelPositionToViewPosition(n);return t.viewLayout.getLineHeightForLineNumber(s.lineNumber)}return 0}setHiddenAreas(e,t,i){this._modelData?.viewModel.setHiddenAreas(e.map(n=>l.Range.lift(n)),t,i)}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;const t=this._modelData.model.validatePosition(e),i=this._modelData.model.getOptions().tabSize;return Xe.visibleColumnFromColumn(this._modelData.model.getLineContent(t.lineNumber),t.column,i)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(e,t="api"){if(this._modelData){if(!l.Position.isIPosition(e))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(t,[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}}_sendRevealRange(e,t,i,n){if(!this._modelData)return;if(!l.Range.isIRange(e))throw new Error("Invalid arguments");const s=this._modelData.model.validateRange(e),r=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(s);this._modelData.viewModel.revealRange("api",i,r,t,n)}revealAllCursors(e,t){this._modelData&&this._modelData.viewModel.revealAllCursors("api",e,t)}revealLine(e,t=0){this._revealLine(e,0,t)}revealLineInCenter(e,t=0){this._revealLine(e,1,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._revealLine(e,2,t)}revealLineNearTop(e,t=0){this._revealLine(e,5,t)}_revealLine(e,t,i){if(typeof e!="number")throw new Error("Invalid arguments");this._sendRevealRange(new l.Range(e,1,e,1),t,!1,i)}revealPosition(e,t=0){this._revealPosition(e,0,!0,t)}revealPositionInCenter(e,t=0){this._revealPosition(e,1,!0,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._revealPosition(e,2,!0,t)}revealPositionNearTop(e,t=0){this._revealPosition(e,5,!0,t)}_revealPosition(e,t,i,n){if(!l.Position.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new l.Range(e.lineNumber,e.column,e.lineNumber,e.column),t,i,n)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(e,t="api"){const i=l.Selection.isISelection(e),n=l.Range.isIRange(e);if(!i&&!n)throw new Error("Invalid arguments");if(i)this._setSelectionImpl(e,t);else if(n){const s={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(s,t)}}_setSelectionImpl(e,t){if(!this._modelData)return;const i=new l.Selection(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this._modelData.viewModel.setSelections(t,[i])}revealLines(e,t,i=0){this._revealLines(e,t,0,i)}revealLinesInCenter(e,t,i=0){this._revealLines(e,t,1,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._revealLines(e,t,2,i)}revealLinesNearTop(e,t,i=0){this._revealLines(e,t,5,i)}_revealLines(e,t,i,n){if(typeof e!="number"||typeof t!="number")throw new Error("Invalid arguments");this._sendRevealRange(new l.Range(e,1,t,1),i,!1,n)}revealRange(e,t=0,i=!1,n=!0){this._revealRange(e,i?1:0,n,t)}revealRangeInCenter(e,t=0){this._revealRange(e,1,!0,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._revealRange(e,2,!0,t)}revealRangeNearTop(e,t=0){this._revealRange(e,5,!0,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._revealRange(e,6,!0,t)}revealRangeAtTop(e,t=0){this._revealRange(e,3,!0,t)}_revealRange(e,t,i,n){if(!l.Range.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(l.Range.lift(e),t,i,n)}setSelections(e,t="api",i=0){if(this._modelData){if(!e||e.length===0)throw new Error("Invalid arguments");for(let n=0,s=e.length;n0&&this._modelData.viewModel.restoreCursorState(i):this._modelData.viewModel.restoreCursorState([i]),this._contributions.restoreViewState(t.contributionsState||{});const n=this._modelData.viewModel.reduceRestoreState(t.viewState);this._modelData.view.restoreState(n)}}handleInitialized(){this._getViewModel()?.visibleLinesStabilized()}getContribution(e){return this._contributions.get(e)}getActions(){return Array.from(this._actions.values())}getSupportedActions(){let e=this.getActions();return e=e.filter(t=>t.isSupported()),e}getAction(e){return this._actions.get(e)||null}trigger(e,t,i){i=i||{};try{switch(this._onWillTriggerEditorOperationEvent.fire({source:e,handlerId:t,payload:i}),this._beginUpdate(),t){case"compositionStart":this._startComposition();return;case"compositionEnd":this._endComposition(e);return;case"type":{const s=i;this._type(e,s.text||"");return}case"replacePreviousChar":{const s=i;this._compositionType(e,s.text||"",s.replaceCharCnt||0,0,0);return}case"compositionType":{const s=i;this._compositionType(e,s.text||"",s.replacePrevCharCnt||0,s.replaceNextCharCnt||0,s.positionDelta||0);return}case"paste":{const s=i;this._paste(e,s.text||"",s.pasteOnNewLine||!1,s.multicursorText||null,s.mode||null,s.clipboardEvent);return}case"cut":this._cut(e);return}const n=this.getAction(t);if(n){Promise.resolve(n.run(i)).then(void 0,l.onUnexpectedError);return}if(!this._modelData||this._triggerEditorCommand(e,t,i))return;this._triggerCommand(t,i)}finally{this._endUpdate()}}_triggerCommand(e,t){this._commandService.executeCommand(e,t)}_startComposition(){this._modelData&&(this.inComposition=!0,this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(e){this._modelData&&(this.inComposition=!1,this._modelData.viewModel.endComposition(e),this._onDidCompositionEnd.fire())}_type(e,t){!this._modelData||t.length===0||(e==="keyboard"&&this._onWillType.fire(t),this._modelData.viewModel.type(t,e),e==="keyboard"&&this._onDidType.fire(t))}_compositionType(e,t,i,n,s){this._modelData&&this._modelData.viewModel.compositionType(t,i,n,s,e)}_paste(e,t,i,n,s,r){if(!this._modelData)return;const a=this._modelData.viewModel,c=a.getSelection().getStartPosition();a.paste(t,i,n,e);const h=a.getSelection().getStartPosition();e==="keyboard"&&this._onDidPaste.fire({clipboardEvent:r,range:new l.Range(c.lineNumber,c.column,h.lineNumber,h.column),languageId:s})}_cut(e){this._modelData&&this._modelData.viewModel.cut(e)}_triggerEditorCommand(e,t,i){const n=Ql.getEditorCommand(t);return n?(i=i||{},l.isObject(i)&&(i.source=e),this._instantiationService.invokeFunction(s=>{Promise.resolve(n.runEditorCommand(s,this,i)).then(void 0,l.onUnexpectedError)}),!0):!1}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!this._modelData||this._configuration.options.get(104)?!1:(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!this._modelData||this._configuration.options.get(104)?!1:(this._modelData.model.popStackElement(),!0)}edit(e,t){return this.executeEdits(t,e.replacements.map(i=>({range:i.range,text:i.text})),void 0)}executeEdits(e,t,i){if(!this._modelData||this._configuration.options.get(104))return!1;let n;i?Array.isArray(i)?n=()=>i:n=i:n=()=>null;let s,r;return e instanceof GT?(r=e,s=e.metadata.source):(r=$i.unknown({name:e}),s=e),this._onBeforeExecuteEdit.fire({source:s??void 0}),this._modelData.viewModel.executeEdits(s,t,n,r),!0}executeCommand(e,t){this._modelData&&this._modelData.viewModel.executeCommand(t,e)}executeCommands(e,t){this._modelData&&this._modelData.viewModel.executeCommands(t,e)}createDecorationsCollection(e){return new E8(this,e)}changeDecorations(e){return this._modelData?this._modelData.model.changeDecorations(e,this._id):null}getLineDecorations(e){if(!this._modelData)return null;const t=this._configuration.options;return this._modelData.model.getLineDecorations(e,this._id,Pf(t),kf(t))}getDecorationsInRange(e){if(!this._modelData)return null;const t=this._configuration.options;return this._modelData.model.getDecorationsInRange(e,this._id,Pf(t),kf(t))}getFontSizeAtPosition(e){return this._modelData?this._modelData.viewModel.getFontSizeAtPosition(e):null}deltaDecorations(e,t){return this._modelData?e.length===0&&t.length===0?e:this._modelData.model.deltaDecorations(e,t,this._id):[]}removeDecorations(e){!this._modelData||e.length===0||this._modelData.model.changeDecorations(t=>{t.deltaDecorations(e,[])})}removeDecorationsByType(e){const t=this._decorationTypeKeysToIds[e];if(t&&this.changeDecorations(i=>i.deltaDecorations(t,[])),this._decorationTypeKeysToIds.hasOwnProperty(e)&&delete this._decorationTypeKeysToIds[e],this._decorationTypeSubtypes.hasOwnProperty(e)){const i=this._decorationTypeSubtypes[e];for(const n of Object.keys(i))this._removeDecorationType(e+"-"+n);delete this._decorationTypeSubtypes[e]}}getLayoutInfo(){return this._configuration.options.get(165)}createOverviewRuler(e){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.createOverviewRuler(e)}getContainerDomNode(){return this._domElement}getDomNode(){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.domNode.domNode}delegateVerticalScrollbarPointerDown(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateScrollFromMouseWheelEvent(e)}layout(e,t=!1){this._configuration.observeContainer(e),t||this.render()}focus(){!this._modelData||!this._modelData.hasRealView||this._modelData.view.focus()}hasTextFocus(){return!this._modelData||!this._modelData.hasRealView?!1:this._modelData.view.isFocused()}hasWidgetFocus(){return!this._modelData||!this._modelData.hasRealView?!1:this._modelData.view.isWidgetFocused()}addContentWidget(e){const t={widget:e,position:e.getPosition()};this._contentWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a content widget with the same id:"+e.getId()),this._contentWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(t)}layoutContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const i=this._contentWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(i)}}removeContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const i=this._contentWidgets[t];delete this._contentWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(i)}}addOverlayWidget(e){const t={widget:e,position:e.getPosition()};this._overlayWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(t)}layoutOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const i=this._overlayWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(i)}}removeOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const i=this._overlayWidgets[t];delete this._overlayWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(i)}}addGlyphMarginWidget(e){const t={widget:e,position:e.getPosition()};this._glyphMarginWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a glyph margin widget with the same id."),this._glyphMarginWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addGlyphMarginWidget(t)}layoutGlyphMarginWidget(e){const t=e.getId();if(this._glyphMarginWidgets.hasOwnProperty(t)){const i=this._glyphMarginWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutGlyphMarginWidget(i)}}removeGlyphMarginWidget(e){const t=e.getId();if(this._glyphMarginWidgets.hasOwnProperty(t)){const i=this._glyphMarginWidgets[t];delete this._glyphMarginWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeGlyphMarginWidget(i)}}changeViewZones(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.change(e)}getTargetAtClientPoint(e,t){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.getTargetAtClientPoint(e,t)}getScrolledVisiblePosition(e){if(!this._modelData||!this._modelData.hasRealView)return null;const t=this._modelData.model.validatePosition(e),n=this._configuration.options.get(165),s=Va._getVerticalOffsetForPosition(this._modelData,t.lineNumber,t.column)-this.getScrollTop(),r=this._modelData.view.getOffsetForColumn(t.lineNumber,t.column)+n.glyphMarginWidth+n.lineNumbersWidth+n.decorationsWidth-this.getScrollLeft(),a=this.getLineHeightForPosition(t);return{top:s,left:r,height:a}}getOffsetForColumn(e,t){return!this._modelData||!this._modelData.hasRealView?-1:this._modelData.view.getOffsetForColumn(e,t)}getWidthOfLine(e){return!this._modelData||!this._modelData.hasRealView?-1:this._modelData.view.getLineWidth(e)}resetLineWidthCaches(){!this._modelData||!this._modelData.hasRealView||this._modelData.view.resetLineWidthCaches()}render(e=!1){!this._modelData||!this._modelData.hasRealView||this._modelData.viewModel.batchEvents(()=>{this._modelData.view.render(!0,e)})}renderAsync(e=!1){!this._modelData||!this._modelData.hasRealView||this._modelData.viewModel.batchEvents(()=>{this._modelData.view.render(!1,e)})}setAriaOptions(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.setAriaOptions(e)}applyFontInfo(e){Ot(e,this._configuration.options.get(59))}setBanner(e,t){this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._bannerDomNode.remove(),this._bannerDomNode=e,this._configuration.setReservedHeight(e?t:0),this._bannerDomNode&&this._domElement.prepend(this._bannerDomNode)}_attachModel(e){if(!e){this._modelData=null;return}const t=[];this._domElement.setAttribute("data-mode-id",e.getLanguageId()),this._configuration.setIsDominatedByLongLines(e.isDominatedByLongLines()),this._configuration.setModelLineCount(e.getLineCount());const i=e.onBeforeAttached(),n=new b8(this._id,this._configuration,e,mw.create(j(this._domElement)),Ww.create(this._configuration.options),a=>Ti(j(this._domElement),a),this.languageConfigurationService,this._themeService,i,{batchChanges:a=>{try{return this._beginUpdate(),a()}finally{this._endUpdate()}}});t.push(e.onWillDispose(()=>this.setModel(null))),t.push(n.onEvent(a=>{switch(a.kind){case 0:this._onDidContentSizeChange.fire(a);break;case 1:this._editorTextFocus.setValue(a.hasFocus);break;case 2:this._editorWidgetFocus.setValue(a.hasFocus);break;case 3:this._onDidScrollChange.fire(a);break;case 4:this._onDidChangeViewZones.fire();break;case 5:this._onDidChangeHiddenAreas.fire();break;case 6:this._onDidAttemptReadOnlyEdit.fire();break;case 7:{if(a.reachedMaxCursorCount){const u=this.getOption(89),f=l.localize(99,"The number of cursors has been limited to {0}. Consider using [find and replace](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) for larger changes or increase the editor multi cursor limit setting.",u);this._notificationService.prompt(Hv.Warning,f,[{label:"Find and Replace",run:()=>{this._commandService.executeCommand("editor.action.startFindReplaceAction")}},{label:l.localize(100,"Increase Multi Cursor Limit"),run:()=>{this._commandService.executeCommand("workbench.action.openSettings2",{query:"editor.multiCursorLimit"})}}])}const c=[];for(let u=0,f=a.selections.length;uthis._onWillCopy.fire(c))),t.push(s.onWillCut(c=>this._onWillCut.fire(c))),t.push(s.onWillPaste(c=>this._onWillPaste.fire(c)))}this._modelData=new L8(e,n,s,r,t,i)}_createView(e){let t;this.isSimpleWidget?t={paste:(s,r,a,c)=>{this._paste("keyboard",s,r,a,c)},type:s=>{this._type("keyboard",s)},compositionType:(s,r,a,c)=>{this._compositionType("keyboard",s,r,a,c)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:t={paste:(s,r,a,c)=>{const h={text:s,pasteOnNewLine:r,multicursorText:a,mode:c};this._commandService.executeCommand("paste",h)},type:s=>{const r={text:s};this._commandService.executeCommand("type",r)},compositionType:(s,r,a,c)=>{if(a||c){const h={text:s,replacePrevCharCnt:r,replaceNextCharCnt:a,positionDelta:c};this._commandService.executeCommand("compositionType",h)}else{const h={text:s,replaceCharCnt:r};this._commandService.executeCommand("replacePreviousChar",h)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const i=new um(e.coordinatesConverter);return i.onKeyDown=s=>this._onKeyDown.fire(s),i.onKeyUp=s=>this._onKeyUp.fire(s),i.onContextMenu=s=>this._onContextMenu.fire(s),i.onMouseMove=s=>this._onMouseMove.fire(s),i.onMouseLeave=s=>this._onMouseLeave.fire(s),i.onMouseDown=s=>this._onMouseDown.fire(s),i.onMouseUp=s=>this._onMouseUp.fire(s),i.onMouseDrag=s=>this._onMouseDrag.fire(s),i.onMouseDrop=s=>this._onMouseDrop.fire(s),i.onMouseDropCanceled=s=>this._onMouseDropCanceled.fire(s),i.onMouseWheel=s=>this._onMouseWheel.fire(s),[new fw(this._domElement,this.getId(),t,this._configuration,this._themeService.getColorTheme(),e,i,this._overflowWidgetsDomNode,this._instantiationService,this._userInteractionService),!0]}_postDetachModelCleanup(e){e?.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(this._contributionsDisposable?.dispose(),this._contributionsDisposable=void 0,!this._modelData)return null;const e=this._modelData.model,t=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),t&&this._domElement.contains(t)&&t.remove(),this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._bannerDomNode.remove(),e}_removeDecorationType(e){this._codeEditorService.removeDecorationType(e)}hasModel(){return this._modelData!==null}showDropIndicatorAt(e){const t=[{range:new l.Range(e.lineNumber,e.column,e.lineNumber,e.column),options:Va.dropIntoEditorDecorationOptions}];this._dropIntoEditorDecorations.set(t),this.revealPosition(e,1)}removeDropIndicator(){this._dropIntoEditorDecorations.clear()}_beginUpdate(){this._updateCounter++,this._updateCounter===1&&this._onBeginUpdate.fire()}_endUpdate(){this._updateCounter--,this._updateCounter===0&&this._onEndUpdate.fire()}},Va=Dl,Dl.dropIntoEditorDecorationOptions=Ct.register({description:"workbench-dnd-target",className:"dnd-target"}),Dl),_.CodeEditorWidget=Va=S8([Es(3,me),Es(4,pt),Es(5,zi),Es(6,be),Es(7,_i),Es(8,yn),Es(9,Ui),Es(10,ms),Es(11,ze),Es(12,Na)],_.CodeEditorWidget);let y8=0,L8=class{constructor(e,t,i,n,s,r){this.model=e,this.viewModel=t,this.view=i,this.hasRealView=n,this.listenersToRemove=s,this.attachedView=r}dispose(){l.dispose(this.listenersToRemove),this.model.onBeforeDetached(this.attachedView),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}};class tN extends l.Disposable{constructor(e){super(),this._emitterOptions=e,this._onDidChangeToTrue=this._register(new l.Emitter(this._emitterOptions)),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new l.Emitter(this._emitterOptions)),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(e){const t=e?2:1;this._value!==t&&(this._value=t,this._value===2?this._onDidChangeToTrue.fire():this._value===1&&this._onDidChangeToFalse.fire())}}class kt extends l.Emitter{constructor(e,t){super({deliveryQueue:t}),this._contributions=e}fire(e){this._contributions.onBeforeInteractionEvent(),super.fire(e)}}class D8 extends l.Disposable{constructor(e,t){super(),this._editor=e,t.createKey("editorId",e.getId()),this._editorSimpleInput=_.EditorContextKeys.editorSimpleInput.bindTo(t),this._editorFocus=_.EditorContextKeys.focus.bindTo(t),this._textInputFocus=_.EditorContextKeys.textInputFocus.bindTo(t),this._editorTextFocus=_.EditorContextKeys.editorTextFocus.bindTo(t),this._tabMovesFocus=_.EditorContextKeys.tabMovesFocus.bindTo(t),this._editorReadonly=_.EditorContextKeys.readOnly.bindTo(t),this._inDiffEditor=_.EditorContextKeys.inDiffEditor.bindTo(t),this._editorColumnSelection=_.EditorContextKeys.columnSelection.bindTo(t),this._hasMultipleSelections=_.EditorContextKeys.hasMultipleSelections.bindTo(t),this._hasNonEmptySelection=_.EditorContextKeys.hasNonEmptySelection.bindTo(t),this._canUndo=_.EditorContextKeys.canUndo.bindTo(t),this._canRedo=_.EditorContextKeys.canRedo.bindTo(t),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromConfig())),this._register(this._editor.onDidChangeCursorSelection(()=>this._updateFromSelection())),this._register(this._editor.onDidFocusEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidFocusEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidChangeModel(()=>this._updateFromModel())),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromModel())),this._register(Dd.onDidChangeTabFocus(i=>this._tabMovesFocus.set(i))),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const e=this._editor.getOptions();this._tabMovesFocus.set(e.get(164)||Dd.getTabFocusMode()),this._editorReadonly.set(e.get(104)),this._inDiffEditor.set(e.get(70)),this._editorColumnSelection.set(e.get(28))}_updateFromSelection(){const e=this._editor.getSelections();e?(this._hasMultipleSelections.set(e.length>1),this._hasNonEmptySelection.set(e.some(t=>!t.isEmpty()))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())}_updateFromFocus(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())}_updateFromModel(){const e=this._editor.getModel();this._canUndo.set(!!(e&&e.canUndo())),this._canRedo.set(!!(e&&e.canRedo()))}}class x8 extends l.Disposable{constructor(e,t,i){super(),this._editor=e,this._contextKeyService=t,this._languageFeaturesService=i,this._langId=_.EditorContextKeys.languageId.bindTo(t),this._hasCompletionItemProvider=_.EditorContextKeys.hasCompletionItemProvider.bindTo(t),this._hasCodeActionsProvider=_.EditorContextKeys.hasCodeActionsProvider.bindTo(t),this._hasCodeLensProvider=_.EditorContextKeys.hasCodeLensProvider.bindTo(t),this._hasDefinitionProvider=_.EditorContextKeys.hasDefinitionProvider.bindTo(t),this._hasDeclarationProvider=_.EditorContextKeys.hasDeclarationProvider.bindTo(t),this._hasImplementationProvider=_.EditorContextKeys.hasImplementationProvider.bindTo(t),this._hasTypeDefinitionProvider=_.EditorContextKeys.hasTypeDefinitionProvider.bindTo(t),this._hasHoverProvider=_.EditorContextKeys.hasHoverProvider.bindTo(t),this._hasDocumentHighlightProvider=_.EditorContextKeys.hasDocumentHighlightProvider.bindTo(t),this._hasDocumentSymbolProvider=_.EditorContextKeys.hasDocumentSymbolProvider.bindTo(t),this._hasReferenceProvider=_.EditorContextKeys.hasReferenceProvider.bindTo(t),this._hasRenameProvider=_.EditorContextKeys.hasRenameProvider.bindTo(t),this._hasSignatureHelpProvider=_.EditorContextKeys.hasSignatureHelpProvider.bindTo(t),this._hasInlayHintsProvider=_.EditorContextKeys.hasInlayHintsProvider.bindTo(t),this._hasDocumentFormattingProvider=_.EditorContextKeys.hasDocumentFormattingProvider.bindTo(t),this._hasDocumentSelectionFormattingProvider=_.EditorContextKeys.hasDocumentSelectionFormattingProvider.bindTo(t),this._hasMultipleDocumentFormattingProvider=_.EditorContextKeys.hasMultipleDocumentFormattingProvider.bindTo(t),this._hasMultipleDocumentSelectionFormattingProvider=_.EditorContextKeys.hasMultipleDocumentSelectionFormattingProvider.bindTo(t),this._isInEmbeddedEditor=_.EditorContextKeys.isInEmbeddedEditor.bindTo(t);const n=()=>this._update();this._register(e.onDidChangeModel(n)),this._register(e.onDidChangeModelLanguage(n)),this._register(i.completionProvider.onDidChange(n)),this._register(i.codeActionProvider.onDidChange(n)),this._register(i.codeLensProvider.onDidChange(n)),this._register(i.definitionProvider.onDidChange(n)),this._register(i.declarationProvider.onDidChange(n)),this._register(i.implementationProvider.onDidChange(n)),this._register(i.typeDefinitionProvider.onDidChange(n)),this._register(i.hoverProvider.onDidChange(n)),this._register(i.documentHighlightProvider.onDidChange(n)),this._register(i.documentSymbolProvider.onDidChange(n)),this._register(i.referenceProvider.onDidChange(n)),this._register(i.renameProvider.onDidChange(n)),this._register(i.documentFormattingEditProvider.onDidChange(n)),this._register(i.documentRangeFormattingEditProvider.onDidChange(n)),this._register(i.signatureHelpProvider.onDidChange(n)),this._register(i.inlayHintsProvider.onDidChange(n)),n()}dispose(){super.dispose()}reset(){this._contextKeyService.bufferChangeEvents(()=>{this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasDeclarationProvider.reset(),this._hasImplementationProvider.reset(),this._hasTypeDefinitionProvider.reset(),this._hasHoverProvider.reset(),this._hasDocumentHighlightProvider.reset(),this._hasDocumentSymbolProvider.reset(),this._hasReferenceProvider.reset(),this._hasRenameProvider.reset(),this._hasDocumentFormattingProvider.reset(),this._hasDocumentSelectionFormattingProvider.reset(),this._hasSignatureHelpProvider.reset(),this._isInEmbeddedEditor.reset()})}_update(){const e=this._editor.getModel();if(!e){this.reset();return}this._contextKeyService.bufferChangeEvents(()=>{this._langId.set(e.getLanguageId()),this._hasCompletionItemProvider.set(this._languageFeaturesService.completionProvider.has(e)),this._hasCodeActionsProvider.set(this._languageFeaturesService.codeActionProvider.has(e)),this._hasCodeLensProvider.set(this._languageFeaturesService.codeLensProvider.has(e)),this._hasDefinitionProvider.set(this._languageFeaturesService.definitionProvider.has(e)),this._hasDeclarationProvider.set(this._languageFeaturesService.declarationProvider.has(e)),this._hasImplementationProvider.set(this._languageFeaturesService.implementationProvider.has(e)),this._hasTypeDefinitionProvider.set(this._languageFeaturesService.typeDefinitionProvider.has(e)),this._hasHoverProvider.set(this._languageFeaturesService.hoverProvider.has(e)),this._hasDocumentHighlightProvider.set(this._languageFeaturesService.documentHighlightProvider.has(e)),this._hasDocumentSymbolProvider.set(this._languageFeaturesService.documentSymbolProvider.has(e)),this._hasReferenceProvider.set(this._languageFeaturesService.referenceProvider.has(e)),this._hasRenameProvider.set(this._languageFeaturesService.renameProvider.has(e)),this._hasSignatureHelpProvider.set(this._languageFeaturesService.signatureHelpProvider.has(e)),this._hasInlayHintsProvider.set(this._languageFeaturesService.inlayHintsProvider.has(e)),this._hasDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.has(e)||this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasMultipleDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.all(e).length+this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._isInEmbeddedEditor.set(e.uri.scheme===l.Schemas.walkThroughSnippet||e.uri.scheme===l.Schemas.vscodeChatCodeBlock)})}}class E8{get length(){return this._decorationIds.length}constructor(e,t){this._editor=e,this._decorationIds=[],this._isChangingDecorations=!1,Array.isArray(t)&&t.length>0&&this.set(t)}onDidChange(e,t,i){return this._editor.onDidChangeModelDecorations(n=>{this._isChangingDecorations||e.call(t,n)},i)}getRange(e){return!this._editor.hasModel()||e>=this._decorationIds.length?null:this._editor.getModel().getDecorationRange(this._decorationIds[e])}getRanges(){if(!this._editor.hasModel())return[];const e=this._editor.getModel(),t=[];for(const i of this._decorationIds){const n=e.getDecorationRange(i);n&&t.push(n)}return t}has(e){return this._decorationIds.includes(e.id)}clear(){this._decorationIds.length!==0&&this.set([])}set(e){try{this._isChangingDecorations=!0,this._editor.changeDecorations(t=>{this._decorationIds=t.deltaDecorations(this._decorationIds,e)})}finally{this._isChangingDecorations=!1}return this._decorationIds}append(e){let t=[];try{this._isChangingDecorations=!0,this._editor.changeDecorations(i=>{t=i.deltaDecorations([],e),this._decorationIds=this._decorationIds.concat(t)})}finally{this._isChangingDecorations=!1}return t}}const I8=encodeURIComponent("");function Pc(o){return I8+encodeURIComponent(o.toString())+T8}const N8=encodeURIComponent('');function iN(o){return N8+encodeURIComponent(o.toString())+R8}vs((o,e)=>{const t=o.getColor(Ug);t&&(e.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${Pc(t)}") repeat-x bottom left; }`),e.addRule(`:root { --monaco-editor-error-decoration: url("data:image/svg+xml,${Pc(t)}"); }`));const i=o.getColor(ho);i&&(e.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${Pc(i)}") repeat-x bottom left; }`),e.addRule(`:root { --monaco-editor-warning-decoration: url("data:image/svg+xml,${Pc(i)}"); }`));const n=o.getColor(nr);n&&(e.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${Pc(n)}") repeat-x bottom left; }`),e.addRule(`:root { --monaco-editor-info-decoration: url("data:image/svg+xml,${Pc(n)}"); }`));const s=o.getColor(yV);s&&(e.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${iN(s)}") no-repeat bottom left; }`),e.addRule(`:root { --monaco-editor-hint-decoration: url("data:image/svg+xml,${iN(s)}"); }`));const r=o.getColor(l$);r&&(e.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${r.rgba.a}; }`),e.addRule(`:root { --monaco-editor-unnecessary-decoration-opacity: ${r.rgba.a}; }`))});var M8=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},nN=function(o,e){return function(t,i){e(t,i,o)}};const kc=le("hoverService");_.WorkbenchHoverDelegate=class extends l.Disposable{get delay(){return this.isInstantlyHovering()?0:this.hoverOptions?.dynamicDelay?e=>this.hoverOptions?.dynamicDelay?.(e)??this._delay:this._delay}constructor(e,t,i={},n,s){super(),this.placement=e,this.hoverOptions=t,this.overrideOptions=i,this.configurationService=n,this.hoverService=s,this.lastHoverHideTime=0,this.timeLimit=200,this.hoverDisposables=this._register(new l.DisposableStore),this._delay=this.configurationService.getValue("workbench.hover.delay"),this._register(this.configurationService.onDidChangeConfiguration(r=>{r.affectsConfiguration("workbench.hover.delay")&&(this._delay=this.configurationService.getValue("workbench.hover.delay"))}))}showHover(e,t){const i=typeof this.overrideOptions=="function"?this.overrideOptions(e,t):this.overrideOptions;this.hoverDisposables.clear();const n=Ve(e.target)?[e.target]:e.target.targetElements;for(const r of n)this.hoverDisposables.add(At(r,"keydown",a=>{a.equals(9)&&this.hoverService.hideHover()}));const s=Ve(e.content)?void 0:typeof e.content=="string"?e.content.toString():e.content.value;return this.hoverService.showInstantHover({...e,...i,persistence:{hideOnKeyDown:!0,...i.persistence},id:s,appearance:{...e.appearance,compact:!0,skipFadeInAnimation:this.isInstantlyHovering(),...i.appearance}},t)}isInstantlyHovering(){return!!this.hoverOptions?.instantHover&&Date.now()-this.lastHoverHideTime{i.stopPropagation(),i.preventDefault(),t(e)}))}}class aN extends l.Disposable{constructor(e,t,i){super(),this._register(R(e,F.KEY_DOWN,n=>{const s=new Be(n);i.some(r=>s.equals(r))&&(n.stopPropagation(),n.preventDefault(),t(e))}))}}function O8(o){const e=P8(o);if(e&&e.length>0)return new Uint32Array(e)}let sn=0;const br=new Uint32Array(10);function P8(o){if(sn=0,Is(o,cS,4352),sn>0||(Is(o,hS,4449),sn>0)||(Is(o,dS,4520),sn>0)||(Is(o,Ua,12593),sn))return br.subarray(0,sn);if(o>=44032&&o<=55203){const e=o-44032,t=e%588,i=Math.floor(e/588),n=Math.floor(t/28),s=t%28-1;if(i=0&&(s0)return br.subarray(0,sn)}}function Is(o,e,t){o>=t&&o>8&&(br[sn++]=o>>8&255),o>>16&&(br[sn++]=o>>16&255))}const cS=new Uint8Array([114,82,115,101,69,102,97,113,81,116,84,100,119,87,99,122,120,118,103]),hS=new Uint16Array([107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108]),dS=new Uint16Array([114,82,29810,115,30579,26483,101,102,29286,24934,29030,29798,30822,30310,26470,97,113,29809,116,84,100,119,99,122,120,118,103]),Ua=new Uint16Array([114,82,29810,115,30579,26483,101,69,102,29286,24934,29030,29798,30822,30310,26470,97,113,81,29809,116,84,100,119,87,99,122,120,118,103,107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108]);new l.LRUCache(1e4);const F8=new l.LRUCache(1e4);function B8(o){return V8(o,"NFD",F8)}const z8=/[^\u0000-\u0080]/;function V8(o,e,t){if(!o)return o;const i=t.get(o);if(i)return i;let n;return z8.test(o)?n=o.normalize(e):n=o,t.set(o,n),n}const Xm=(function(){const o=new l.LRUCache(1e4),e=/[\u0300-\u036f]/g;return function(t){const i=o.get(t);if(i)return i;const n=B8(t).replace(e,""),s=(n.length===t.length?n:t).toLowerCase();return o.set(t,s),s}})();function uS(...o){return function(e,t){for(let i=0,n=o.length;i0?[{start:0,end:e.length}]:[]:null}function U8(o,e){if(o.length>e.length)return null;const t=e.toLowerCase().indexOf(o.toLowerCase());return t===-1?null:[{start:t,end:t+o.length}]}function $8(o,e){if(o.length>e.length)return null;o=Xm(o),e=Xm(e);const t=e.indexOf(o);return t===-1?null:[{start:t,end:t+o.length}]}function cN(o,e){return o.length>e.length?null:fS(o.toLowerCase(),e.toLowerCase(),0,0)}function fS(o,e,t,i){if(t===o.length)return[];if(i===e.length)return null;if(o[t]===e[i]){let n=null;return(n=fS(o,e,t+1,i+1))?_S({start:i,end:i+1},n):null}return fS(o,e,t,i+1)}function gS(o){return 97<=o&&o<=122}function Wm(o){return 65<=o&&o<=90}function mS(o){return 48<=o&&o<=57}function hN(o){return o===32||o===9||o===10||o===13}const dN=new Set;"()[]{}<>`'\"-/;:,.?!".split("").forEach(o=>dN.add(o.charCodeAt(0)));function Hm(o){return hN(o)||dN.has(o)}function uN(o,e){return o===e||Hm(o)&&Hm(e)}const pS=new Map;function fN(o){if(pS.has(o))return pS.get(o);let e;const t=O8(o);return t&&(e=t),pS.set(o,e),e}function gN(o){return gS(o)||Wm(o)||mS(o)}function _S(o,e){return e.length===0?e=[o]:o.end===e[0].start?e[0].start=o.start:e.unshift(o),e}function mN(o,e){for(let t=e;t0&&!gN(o.charCodeAt(t-1)))return t}return o.length}function bS(o,e,t,i){if(t===o.length)return[];if(i===e.length)return null;if(o[t]!==e[i].toLowerCase())return null;{let n=null,s=i+1;for(n=bS(o,e,t+1,i+1);!n&&(s=mN(e,s)).6}function j8(o){const{upperPercent:e,lowerPercent:t,alphaPercent:i,numericPercent:n}=o;return t>.2&&e<.8&&i>.6&&n<.2}function q8(o){let e=0,t=0,i=0,n=0;for(let s=0;s60&&(e=e.substring(0,60));const t=K8(e);if(!j8(t)){if(!G8(t))return null;e=e.toLowerCase()}let i=null,n=0;for(o=o.toLowerCase();n0&&Hm(o.charCodeAt(t-1)))return t;return o.length}const Q8=uS(Jm,pN,U8),X8=uS(Jm,pN,cN),CN=new l.LRUCache(1e4);function vN(o,e,t=!1){if(typeof o!="string"||typeof e!="string")return null;let i=CN.get(o);i||(i=new RegExp(l.convertSimple2RegExpPattern(o),"i"),CN.set(o,i));const n=i.exec(e);return n?[{start:n.index,end:n.index+n[0].length}]:t?X8(o,e):Q8(o,e)}function J8(o,e){const t=Bc(o,o.toLowerCase(),0,e,e.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return t?wN(t):null}function W8(o,e,t,i,n,s){const r=Math.min(13,o.length);for(;t"u")return[];const e=[],t=o[1];for(let i=o.length-1;i>1;i--){const n=o[i]+t,s=e[e.length-1];s&&s.end===n?s.end=n+1:e.push({start:n,end:n+1})}return e}const Cr=128;function vS(){const o=[],e=[];for(let t=0;t<=Cr;t++)e[t]=0;for(let t=0;t<=Cr;t++)o.push(e.slice(0));return o}function SN(o){const e=[];for(let t=0;t<=o;t++)e[t]=0;return e}const yN=SN(2*Cr),wS=SN(2*Cr),Lo=vS(),$a=vS(),ep=vS();function tp(o,e){if(e<0||e>=o.length)return!1;const t=o.codePointAt(e);switch(t){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 62:case 40:case 41:case 91:case 93:case 123:case 125:return!0;case void 0:return!1;default:return!!l.isEmojiImprecise(t)}}function LN(o,e){if(e<0||e>=o.length)return!1;switch(o.charCodeAt(e)){case 32:case 9:return!0;default:return!1}}function ip(o,e,t){return e[o]!==t[o]}function H8(o,e,t,i,n,s,r=!1){for(;eCr?Cr:o.length,c=i.length>Cr?Cr:i.length;if(t>=a||s>=c||a-t>c-s||!H8(e,t,a,n,s,c,!0))return;eG(a,c,t,s,e,n);let h=1,d=1,u=t,f=s;const g=[!1];for(h=1,u=t;uC,T=I?$a[h][d-1]+(Lo[h][d-1]>0?-5:0):0,M=f>C+1&&Lo[h][d-1]>0,O=M?$a[h][d-2]+(Lo[h][d-2]>0?-5:0):0;if(M&&(!I||O>=T)&&(!D||O>=x))$a[h][d]=O,ep[h][d]=3,Lo[h][d]=0;else if(I&&(!D||T>=x))$a[h][d]=T,ep[h][d]=2,Lo[h][d]=0;else if(D)$a[h][d]=x,ep[h][d]=1,Lo[h][d]=Lo[h-1][d-1]+1;else throw new Error("not possible")}}if(!g[0]&&!r.firstMatchCanBeWeak)return;h--,d--;const m=[$a[h][d],s];let p=0,b=0;for(;h>=1;){let C=d;do{const w=ep[h][C];if(w===3)C=C-2;else if(w===2)C=C-1;else break}while(C>=1);p>1&&e[t+h-1]===n[s+d-1]&&!ip(C+s-1,i,n)&&p+1>Lo[h][C]&&(C=d),C===d?p++:p=1,b||(b=C),h--,d=C-1,m.push(d)}c-s===a&&r.boostFullMatch&&(m[0]+=2);const v=b-a;return m[0]-=v,m}function eG(o,e,t,i,n,s){let r=o-1,a=e-1;for(;r>=t&&a>=i;)n[r]===s[a]&&(wS[r]=a,r--),a--}function tG(o,e,t,i,n,s,r,a,c,h,d){if(e[t]!==s[r])return Number.MIN_SAFE_INTEGER;let u=1,f=!1;return r===t-i?u=o[t]===n[r]?7:5:ip(r,n,s)&&(r===0||!ip(r-1,n,s))?(u=o[t]===n[r]?7:5,f=!0):tp(s,r)&&(r===0||!tp(s,r-1))?u=5:(tp(s,r-1)||LN(s,r-1))&&(u=5,f=!0),u>1&&t===i&&(d[0]=!0),f||(f=ip(r,n,s)||tp(s,r-1)||LN(s,r-1)),t===i?r>c&&(u-=f?3:5):h?u+=f?2:0:u+=f?0:1,r+1===a&&(u-=f?3:5),u}function iG(o,e,t,i,n,s,r){return nG(o,e,t,i,n,s,!0,r)}function nG(o,e,t,i,n,s,r,a){let c=Bc(o,e,t,i,n,s,a);if(o.length>=3){const h=Math.min(7,o.length-1);for(let d=t+1;dc[0])&&(c=f))}}}return c}function sG(o,e){if(e+1>=o.length)return;const t=o[e],i=o[e+1];if(t!==i)return o.slice(0,e)+i+t+o.slice(e+2)}const oG="$(",SS=new RegExp(`\\$\\(${_.ThemeIcon.iconNameExpression}(?:${_.ThemeIcon.iconModifierExpression})?\\)`,"g"),rG=new RegExp(`(\\\\)?${SS.source}`,"g");function aG(o){return o.replace(rG,(e,t)=>t?e:`\\${e}`)}const lG=new RegExp(`\\\\${SS.source}`,"g");function cG(o){return o.replace(lG,e=>`\\${e}`)}const hG=new RegExp(`(\\s)?(\\\\)?${SS.source}(\\s)?`,"g");function sp(o){return o.indexOf(oG)===-1?o:o.replace(hG,(e,t,i,n)=>i?e:t||n||"")}function yS(o){return o?o.replace(/\$\((.*?)\)/g,(e,t)=>` ${t} `).trim():""}const LS=new RegExp(`\\$\\(${_.ThemeIcon.iconNameCharacter}+\\)`,"g");function Ka(o){LS.lastIndex=0;let e="";const t=[];let i=0;for(;;){const n=LS.lastIndex,s=LS.exec(o),r=o.substring(n,s?.index);if(r.length>0){e+=r;for(let a=0;a" ".repeat(n.length)).replace(/\>/gm,"\\>").replace(/\n/g,t===1?`\\ +`:` + +`),this}appendMarkdown(e){return this.value+=e,this}appendCodeblock(e,t){return this.value+=` +${fG(t,e)} +`,this}appendLink(e,t,i){return this.value+="[",this.value+=this._escape(t,"]"),this.value+="](",this.value+=this._escape(String(e),")"),i&&(this.value+=` "${this._escape(this._escape(i,'"'),")")}"`),this.value+=")",this}_escape(e,t){const i=new RegExp(l.escapeRegExpCharacters(t),"g");return e.replace(i,(n,s)=>e.charAt(s-1)!=="\\"?`\\${n}`:n)}}function DN(o){return Do(o)?!o.value:Array.isArray(o)?o.every(DN):!0}function Do(o){return o instanceof DS?!0:o&&typeof o=="object"?typeof o.value=="string"&&(typeof o.isTrusted=="boolean"||typeof o.isTrusted=="object"||o.isTrusted===void 0)&&(typeof o.supportThemeIcons=="boolean"||o.supportThemeIcons===void 0)&&(typeof o.supportAlertSyntax=="boolean"||o.supportAlertSyntax===void 0):!1}function dG(o,e){return o===e?!0:!o||!e?!1:o.value===e.value&&o.isTrusted===e.isTrusted&&o.supportThemeIcons===e.supportThemeIcons&&o.supportHtml===e.supportHtml&&o.supportAlertSyntax===e.supportAlertSyntax&&(o.baseUri===e.baseUri||!!o.baseUri&&!!e.baseUri&&Nx(l.URI.from(o.baseUri),l.URI.from(e.baseUri)))}function uG(o){return o.replace(/[\\`*_{}[\]()#+!~]/g,"\\$&").replace(/^([ \t]*)-/gm,"$1\\-")}function fG(o,e){const t=o.match(/^`+/gm)?.reduce((n,s)=>n.length>s.length?n:s).length??0,i=t>=3?t+1:3;return[`${"`".repeat(i)}${e}`,o,`${"`".repeat(i)}`].join(` +`)}function yu(o){return o.replace(/"/g,""")}function xS(o){return o&&o.replace(/\\([\\`*_{}[\]()#+\-.!~])/g,"$1")}function gG(o){const e=[],t=o.split("|").map(n=>n.trim());o=t[0];const i=t[1];if(i){const n=/height=(\d+)/.exec(i),s=/width=(\d+)/.exec(i),r=n?n[1]:"",a=s?s[1]:"",c=isFinite(parseInt(a)),h=isFinite(parseInt(r));c&&e.push(`width="${a}"`),h&&e.push(`height="${r}"`)}return{href:o,dimensions:e}}function mG(o,...e){return l.URI.from({scheme:l.Schemas.command,path:o,query:e.length?encodeURIComponent(JSON.stringify(e)):void 0})}class ES{constructor(e){this._prefix=e,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}const IS=new ES("id#");function TS(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Ga=TS();function xN(o){Ga=o}const EN=/[&<>"']/,pG=new RegExp(EN.source,"g"),IN=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,_G=new RegExp(IN.source,"g"),bG={"&":"&","<":"<",">":">",'"':""","'":"'"},TN=o=>bG[o];function Dn(o,e){if(e){if(EN.test(o))return o.replace(pG,TN)}else if(IN.test(o))return o.replace(_G,TN);return o}const CG=/(^|[^\[])\^/g;function at(o,e){let t=typeof o=="string"?o:o.source;e=e||"";const i={replace:(n,s)=>{let r=typeof s=="string"?s:s.source;return r=r.replace(CG,"$1"),t=t.replace(n,r),i},getRegex:()=>new RegExp(t,e)};return i}function NN(o){try{o=encodeURI(o).replace(/%25/g,"%")}catch{return null}return o}const Lu={exec:()=>null};function RN(o,e){const t=o.replace(/\|/g,(s,r,a)=>{let c=!1,h=r;for(;--h>=0&&a[h]==="\\";)c=!c;return c?"|":" |"}),i=t.split(/ \|/);let n=0;if(i[0].trim()||i.shift(),i.length>0&&!i[i.length-1].trim()&&i.pop(),e)if(i.length>e)i.splice(e);else for(;i.length{const s=n.match(/^\s+/);if(s===null)return n;const[r]=s;return r.length>=i.length?n.slice(i.length):n}).join(` +`)}class op{options;rules;lexer;constructor(e){this.options=e||Ga}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const i=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?i:Du(i,` +`)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const i=t[0],n=wG(i,t[3]||"");return{type:"code",raw:i,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let i=t[2].trim();if(/#$/.test(i)){const n=Du(i,"#");(this.options.pedantic||!n||/ $/.test(n))&&(i=n.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Du(t[0],` +`)}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let i=Du(t[0],` +`).split(` +`),n="",s="";const r=[];for(;i.length>0;){let a=!1;const c=[];let h;for(h=0;h/.test(i[h]))c.push(i[h]),a=!0;else if(!a)c.push(i[h]);else break;i=i.slice(h);const d=c.join(` +`),u=d.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,` + $1`).replace(/^ {0,3}>[ \t]?/gm,"");n=n?`${n} +${d}`:d,s=s?`${s} +${u}`:u;const f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,r,!0),this.lexer.state.top=f,i.length===0)break;const g=r[r.length-1];if(g?.type==="code")break;if(g?.type==="blockquote"){const m=g,p=m.raw+` +`+i.join(` +`),b=this.blockquote(p);r[r.length-1]=b,n=n.substring(0,n.length-m.raw.length)+b.raw,s=s.substring(0,s.length-m.text.length)+b.text;break}else if(g?.type==="list"){const m=g,p=m.raw+` +`+i.join(` +`),b=this.list(p);r[r.length-1]=b,n=n.substring(0,n.length-g.raw.length)+b.raw,s=s.substring(0,s.length-m.raw.length)+b.raw,i=p.substring(r[r.length-1].raw.length).split(` +`);continue}}return{type:"blockquote",raw:n,tokens:r,text:s}}}list(e){let t=this.rules.block.list.exec(e);if(t){let i=t[1].trim();const n=i.length>1,s={type:"list",raw:"",ordered:n,start:n?+i.slice(0,-1):"",loose:!1,items:[]};i=n?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=n?i:"[*+-]");const r=new RegExp(`^( {0,3}${i})((?:[ ][^\\n]*)?(?:\\n|$))`);let a=!1;for(;e;){let c=!1,h="",d="";if(!(t=r.exec(e))||this.rules.block.hr.test(e))break;h=t[0],e=e.substring(h.length);let u=t[2].split(` +`,1)[0].replace(/^\t+/,v=>" ".repeat(3*v.length)),f=e.split(` +`,1)[0],g=!u.trim(),m=0;if(this.options.pedantic?(m=2,d=u.trimStart()):g?m=t[1].length+1:(m=t[2].search(/[^ ]/),m=m>4?1:m,d=u.slice(m),m+=t[1].length),g&&/^ *$/.test(f)&&(h+=f+` +`,e=e.substring(f.length+1),c=!0),!c){const v=new RegExp(`^ {0,${Math.min(3,m-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),C=new RegExp(`^ {0,${Math.min(3,m-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),w=new RegExp(`^ {0,${Math.min(3,m-1)}}(?:\`\`\`|~~~)`),S=new RegExp(`^ {0,${Math.min(3,m-1)}}#`);for(;e;){const L=e.split(` +`,1)[0];if(f=L,this.options.pedantic&&(f=f.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),w.test(f)||S.test(f)||v.test(f)||C.test(e))break;if(f.search(/[^ ]/)>=m||!f.trim())d+=` +`+f.slice(m);else{if(g||u.search(/[^ ]/)>=4||w.test(u)||S.test(u)||C.test(u))break;d+=` +`+f}!g&&!f.trim()&&(g=!0),h+=L+` +`,e=e.substring(L.length+1),u=f.slice(m)}}s.loose||(a?s.loose=!0:/\n *\n *$/.test(h)&&(a=!0));let p=null,b;this.options.gfm&&(p=/^\[[ xX]\] /.exec(d),p&&(b=p[0]!=="[ ] ",d=d.replace(/^\[[ xX]\] +/,""))),s.items.push({type:"list_item",raw:h,task:!!p,checked:b,loose:!1,text:d,tokens:[]}),s.raw+=h}s.items[s.items.length-1].raw=s.items[s.items.length-1].raw.trimEnd(),s.items[s.items.length-1].text=s.items[s.items.length-1].text.trimEnd(),s.raw=s.raw.trimEnd();for(let c=0;cu.type==="space"),d=h.length>0&&h.some(u=>/\n.*\n/.test(u.raw));s.loose=d}if(s.loose)for(let c=0;c$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:i,raw:t[0],href:n,title:s}}}table(e){const t=this.rules.block.table.exec(e);if(!t||!/[:|]/.test(t[2]))return;const i=RN(t[1]),n=t[2].replace(/^\||\| *$/g,"").split("|"),s=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split(` +`):[],r={type:"table",raw:t[0],header:[],align:[],rows:[]};if(i.length===n.length){for(const a of n)/^ *-+: *$/.test(a)?r.align.push("right"):/^ *:-+: *$/.test(a)?r.align.push("center"):/^ *:-+ *$/.test(a)?r.align.push("left"):r.align.push(null);for(let a=0;a({text:c,tokens:this.lexer.inline(c),header:!1,align:r.align[h]})));return r}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const i=t[1].charAt(t[1].length-1)===` +`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:i,tokens:this.lexer.inline(i)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:Dn(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const i=t[2].trim();if(!this.options.pedantic&&/^$/.test(i))return;const r=Du(i.slice(0,-1),"\\");if((i.length-r.length)%2===0)return}else{const r=vG(t[2],"()");if(r>-1){const c=(t[0].indexOf("!")===0?5:4)+t[1].length+r;t[2]=t[2].substring(0,r),t[0]=t[0].substring(0,c).trim(),t[3]=""}}let n=t[2],s="";if(this.options.pedantic){const r=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);r&&(n=r[1],s=r[3])}else s=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^$/.test(i)?n=n.slice(1):n=n.slice(1,-1)),MN(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer)}}reflink(e,t){let i;if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){const n=(i[2]||i[1]).replace(/\s+/g," "),s=t[n.toLowerCase()];if(!s){const r=i[0].charAt(0);return{type:"text",raw:r,text:r}}return MN(i,s,i[0],this.lexer)}}emStrong(e,t,i=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(!n||n[3]&&i.match(/[\p{L}\p{N}]/u))return;if(!(n[1]||n[2]||"")||!i||this.rules.inline.punctuation.exec(i)){const r=[...n[0]].length-1;let a,c,h=r,d=0;const u=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,t=t.slice(-1*e.length+r);(n=u.exec(t))!=null;){if(a=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!a)continue;if(c=[...a].length,n[3]||n[4]){h+=c;continue}else if((n[5]||n[6])&&r%3&&!((r+c)%3)){d+=c;continue}if(h-=c,h>0)continue;c=Math.min(c,c+h+d);const f=[...n[0]][0].length,g=e.slice(0,r+n.index+f+c);if(Math.min(r,c)%2){const p=g.slice(1,-1);return{type:"em",raw:g,text:p,tokens:this.lexer.inlineTokens(p)}}const m=g.slice(2,-2);return{type:"strong",raw:g,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let i=t[2].replace(/\n/g," ");const n=/[^ ]/.test(i),s=/^ /.test(i)&&/ $/.test(i);return n&&s&&(i=i.substring(1,i.length-1)),i=Dn(i,!0),{type:"codespan",raw:t[0],text:i}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let i,n;return t[2]==="@"?(i=Dn(t[1]),n="mailto:"+i):(i=Dn(t[1]),n=i),{type:"link",raw:t[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let i,n;if(t[2]==="@")i=Dn(t[0]),n="mailto:"+i;else{let s;do s=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(s!==t[0]);i=Dn(t[0]),t[1]==="www."?n="http://"+t[0]:n=t[0]}return{type:"link",raw:t[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let i;return this.lexer.state.inRawBlock?i=t[0]:i=Dn(t[0]),{type:"text",raw:t[0],text:i}}}}const SG=/^(?: *(?:\n|$))+/,yG=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,LG=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,xu=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,DG=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,AN=/(?:[*+-]|\d{1,9}[.)])/,ON=at(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,AN).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),NS=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,xG=/^[^\n]+/,RS=/(?!\s*\])(?:\\.|[^\[\]\\])+/,EG=at(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",RS).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),IG=at(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,AN).getRegex(),rp="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",MS=/|$))/,TG=at("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",MS).replace("tag",rp).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),PN=at(NS).replace("hr",xu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",rp).getRegex(),AS={blockquote:at(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",PN).getRegex(),code:yG,def:EG,fences:LG,heading:DG,hr:xu,html:TG,lheading:ON,list:IG,newline:SG,paragraph:PN,table:Lu,text:xG},kN=at("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",xu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",rp).getRegex(),NG={...AS,table:kN,paragraph:at(NS).replace("hr",xu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",kN).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",rp).getRegex()},RG={...AS,html:at(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",MS).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Lu,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:at(NS).replace("hr",xu).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",ON).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},FN=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,MG=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,BN=/^( {2,}|\\)\n(?!\s*$)/,AG=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,kG=at(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Eu).getRegex(),FG=at("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Eu).getRegex(),BG=at("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Eu).getRegex(),zG=at(/\\([punct])/,"gu").replace(/punct/g,Eu).getRegex(),VG=at(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),UG=at(MS).replace("(?:-->|$)","-->").getRegex(),$G=at("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",UG).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ap=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,KG=at(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",ap).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),zN=at(/^!?\[(label)\]\[(ref)\]/).replace("label",ap).replace("ref",RS).getRegex(),VN=at(/^!?\[(ref)\](?:\[\])?/).replace("ref",RS).getRegex(),GG=at("reflink|nolink(?!\\()","g").replace("reflink",zN).replace("nolink",VN).getRegex(),OS={_backpedal:Lu,anyPunctuation:zG,autolink:VG,blockSkip:PG,br:BN,code:MG,del:Lu,emStrongLDelim:kG,emStrongRDelimAst:FG,emStrongRDelimUnd:BG,escape:FN,link:KG,nolink:VN,punctuation:OG,reflink:zN,reflinkSearch:GG,tag:$G,text:AG,url:Lu},jG={...OS,link:at(/^!?\[(label)\]\((.*?)\)/).replace("label",ap).getRegex(),reflink:at(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ap).getRegex()},PS={...OS,escape:at(FN).replace("])","~|])").getRegex(),url:at(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\c+" ".repeat(h.length));let n,s,r;for(;e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(a=>(n=a.call({lexer:this},e,t))?(e=e.substring(n.raw.length),t.push(n),!0):!1))){if(n=this.tokenizer.space(e)){e=e.substring(n.raw.length),n.raw.length===1&&t.length>0?t[t.length-1].raw+=` +`:t.push(n);continue}if(n=this.tokenizer.code(e)){e=e.substring(n.raw.length),s=t[t.length-1],s&&(s.type==="paragraph"||s.type==="text")?(s.raw+=` +`+n.raw,s.text+=` +`+n.text,this.inlineQueue[this.inlineQueue.length-1].src=s.text):t.push(n);continue}if(n=this.tokenizer.fences(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.heading(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.hr(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.blockquote(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.list(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.html(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.def(e)){e=e.substring(n.raw.length),s=t[t.length-1],s&&(s.type==="paragraph"||s.type==="text")?(s.raw+=` +`+n.raw,s.text+=` +`+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=s.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title});continue}if(n=this.tokenizer.table(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.lheading(e)){e=e.substring(n.raw.length),t.push(n);continue}if(r=e,this.options.extensions&&this.options.extensions.startBlock){let a=1/0;const c=e.slice(1);let h;this.options.extensions.startBlock.forEach(d=>{h=d.call({lexer:this},c),typeof h=="number"&&h>=0&&(a=Math.min(a,h))}),a<1/0&&a>=0&&(r=e.substring(0,a+1))}if(this.state.top&&(n=this.tokenizer.paragraph(r))){s=t[t.length-1],i&&s?.type==="paragraph"?(s.raw+=` +`+n.raw,s.text+=` +`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=s.text):t.push(n),i=r.length!==e.length,e=e.substring(n.raw.length);continue}if(n=this.tokenizer.text(e)){e=e.substring(n.raw.length),s=t[t.length-1],s&&s.type==="text"?(s.raw+=` +`+n.raw,s.text+=` +`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=s.text):t.push(n);continue}if(e){const a="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let i,n,s,r=e,a,c,h;if(this.tokens.links){const d=Object.keys(this.tokens.links);if(d.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)d.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)r=r.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,a.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(c||(h=""),c=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(d=>(i=d.call({lexer:this},e,t))?(e=e.substring(i.raw.length),t.push(i),!0):!1))){if(i=this.tokenizer.escape(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.tag(e)){e=e.substring(i.raw.length),n=t[t.length-1],n&&i.type==="text"&&n.type==="text"?(n.raw+=i.raw,n.text+=i.text):t.push(i);continue}if(i=this.tokenizer.link(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(i.raw.length),n=t[t.length-1],n&&i.type==="text"&&n.type==="text"?(n.raw+=i.raw,n.text+=i.text):t.push(i);continue}if(i=this.tokenizer.emStrong(e,r,h)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.codespan(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.br(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.del(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.autolink(e)){e=e.substring(i.raw.length),t.push(i);continue}if(!this.state.inLink&&(i=this.tokenizer.url(e))){e=e.substring(i.raw.length),t.push(i);continue}if(s=e,this.options.extensions&&this.options.extensions.startInline){let d=1/0;const u=e.slice(1);let f;this.options.extensions.startInline.forEach(g=>{f=g.call({lexer:this},u),typeof f=="number"&&f>=0&&(d=Math.min(d,f))}),d<1/0&&d>=0&&(s=e.substring(0,d+1))}if(i=this.tokenizer.inlineText(s)){e=e.substring(i.raw.length),i.raw.slice(-1)!=="_"&&(h=i.raw.slice(-1)),c=!0,n=t[t.length-1],n&&n.type==="text"?(n.raw+=i.raw,n.text+=i.text):t.push(i);continue}if(e){const d="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return t}}class Tu{options;parser;constructor(e){this.options=e||Ga}space(e){return""}code({text:e,lang:t,escaped:i}){const n=(t||"").match(/^\S*/)?.[0],s=e.replace(/\n$/,"")+` +`;return n?'
'+(i?s:Dn(s,!0))+`
+`:"
"+(i?s:Dn(s,!0))+`
+`}blockquote({tokens:e}){return`
+${this.parser.parse(e)}
+`}html({text:e}){return e}heading({tokens:e,depth:t}){return`${this.parser.parseInline(e)} +`}hr(e){return`
+`}list(e){const t=e.ordered,i=e.start;let n="";for(let a=0;a +`+n+" +`}listitem(e){let t="";if(e.task){const i=this.checkbox({checked:!!e.checked});e.loose?e.tokens.length>0&&e.tokens[0].type==="paragraph"?(e.tokens[0].text=i+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=i+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",raw:i+" ",text:i+" "}):t+=i+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`
  • ${t}
  • +`}checkbox({checked:e}){return"'}paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

    +`}table(e){let t="",i="";for(let s=0;s${n}`),` + +`+t+` +`+n+`
    +`}tablerow({text:e}){return` +${e} +`}tablecell(e){const t=this.parser.parseInline(e.tokens),i=e.header?"th":"td";return(e.align?`<${i} align="${e.align}">`:`<${i}>`)+t+` +`}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${e}`}br(e){return"
    "}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:i}){const n=this.parser.parseInline(i),s=NN(e);if(s===null)return n;e=s;let r='
    ",r}image({href:e,title:t,text:i}){const n=NN(e);if(n===null)return i;e=n;let s=`${i}{const a=s[r].flat(1/0);i=i.concat(this.walkTokens(a,t))}):s.tokens&&(i=i.concat(this.walkTokens(s.tokens,t)))}}return i}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(i=>{const n={...i};if(n.async=this.defaults.async||n.async||!1,i.extensions&&(i.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){const r=t.renderers[s.name];r?t.renderers[s.name]=function(...a){let c=s.renderer.apply(this,a);return c===!1&&(c=r.apply(this,a)),c}:t.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const r=t[s.level];r?r.unshift(s.tokenizer):t[s.level]=[s.tokenizer],s.start&&(s.level==="block"?t.startBlock?t.startBlock.push(s.start):t.startBlock=[s.start]:s.level==="inline"&&(t.startInline?t.startInline.push(s.start):t.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(t.childTokens[s.name]=s.childTokens)}),n.extensions=t),i.renderer){const s=this.defaults.renderer||new Tu(this.defaults);for(const r in i.renderer){if(!(r in s))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;const a=r,c=i.renderer[a],h=s[a];s[a]=(...d)=>{let u=c.apply(s,d);return u===!1&&(u=h.apply(s,d)),u||""}}n.renderer=s}if(i.tokenizer){const s=this.defaults.tokenizer||new op(this.defaults);for(const r in i.tokenizer){if(!(r in s))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;const a=r,c=i.tokenizer[a],h=s[a];s[a]=(...d)=>{let u=c.apply(s,d);return u===!1&&(u=h.apply(s,d)),u}}n.tokenizer=s}if(i.hooks){const s=this.defaults.hooks||new cp;for(const r in i.hooks){if(!(r in s))throw new Error(`hook '${r}' does not exist`);if(r==="options")continue;const a=r,c=i.hooks[a],h=s[a];cp.passThroughHooks.has(r)?s[a]=d=>{if(this.defaults.async)return Promise.resolve(c.call(s,d)).then(f=>h.call(s,f));const u=c.call(s,d);return h.call(s,u)}:s[a]=(...d)=>{let u=c.apply(s,d);return u===!1&&(u=h.apply(s,d)),u}}n.hooks=s}if(i.walkTokens){const s=this.defaults.walkTokens,r=i.walkTokens;n.walkTokens=function(a){let c=[];return c.push(r.call(this,a)),s&&(c=c.concat(s.call(this,a))),c}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Ts.lex(e,t??this.defaults)}parser(e,t){return Ns.parse(e,t??this.defaults)}parseMarkdown(e,t){return(n,s)=>{const r={...s},a={...this.defaults,...r},c=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&r.async===!1)return c(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return c(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return c(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(a.hooks&&(a.hooks.options=a),a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(n):n).then(h=>e(h,a)).then(h=>a.hooks?a.hooks.processAllTokens(h):h).then(h=>a.walkTokens?Promise.all(this.walkTokens(h,a.walkTokens)).then(()=>h):h).then(h=>t(h,a)).then(h=>a.hooks?a.hooks.postprocess(h):h).catch(c);try{a.hooks&&(n=a.hooks.preprocess(n));let h=e(n,a);a.hooks&&(h=a.hooks.processAllTokens(h)),a.walkTokens&&this.walkTokens(h,a.walkTokens);let d=t(h,a);return a.hooks&&(d=a.hooks.postprocess(d)),d}catch(h){return c(h)}}}onError(e,t){return i=>{if(i.message+=` +Please report this to https://github.com/markedjs/marked.`,e){const n="

    An error occurred:

    "+Dn(i.message+"",!0)+"
    ";return t?Promise.resolve(n):n}if(t)return Promise.reject(i);throw i}}}const ja=new UN;function it(o,e){return ja.parse(o,e)}it.options=it.setOptions=function(o){return ja.setOptions(o),it.defaults=ja.defaults,xN(it.defaults),it},it.getDefaults=TS,it.defaults=Ga,it.use=function(...o){return ja.use(...o),it.defaults=ja.defaults,xN(it.defaults),it},it.walkTokens=function(o,e){return ja.walkTokens(o,e)},it.parseInline=ja.parseInline,it.Parser=Ns,it.parser=Ns.parse,it.Renderer=Tu,it.TextRenderer=kS,it.Lexer=Ts,it.lexer=Ts.lex,it.Tokenizer=op,it.Hooks=cp,it.parse=it,it.options,it.setOptions,it.use,it.walkTokens,it.parseInline;const YG=it;Ns.parse;const Nu=Ts.lex;function ZG(o){return JSON.stringify(o,QG)}function FS(o){let e=JSON.parse(o);return e=BS(e),e}function QG(o,e){return e instanceof RegExp?{$mid:2,source:e.source,flags:e.flags}:e}function BS(o,e=0){if(!o||e>200)return o;if(typeof o=="object"){switch(o.$mid){case 1:return l.URI.revive(o);case 2:return new RegExp(o.source,o.flags);case 17:return new Date(o.source)}if(o instanceof l.VSBuffer||o instanceof Uint8Array)return o;if(Array.isArray(o))for(let t=0;to.length)&&(e=o.length);for(var t=0,i=Array(e);t2?i-2:0),s=2;s1?t-1:0),n=1;n"u"?null:qt(BigInt.prototype.toString),XN=typeof Symbol>"u"?null:qt(Symbol.prototype.toString),It=qt(Object.prototype.hasOwnProperty),Mu=qt(Object.prototype.toString),vi=qt(RegExp.prototype.test),$c=cj(TypeError);function qt(o){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n2&&arguments[2]!==void 0?arguments[2]:Ru;if(GN&&GN(o,null),!qi(e))return o;let i=e.length;for(;i--;){let n=e[i];if(typeof n=="string"){const s=t(n);s!==n&&(tj(e)||(e[i]=s),n=s)}o[n]=!0}return o}function hj(o){for(let e=0;e/g),_j=Fn(/\${[\w\W]*/g),bj=Fn(/^data-[\-\w.\u00B7-\uFFFF]+$/),Cj=Fn(/^aria-[\-\w]+$/),tR=Fn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),vj=Fn(/^(?:\w+script|data):/i),wj=Fn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Sj=Fn(/^html$/i),yj=Fn(/^[a-z][.\w]*(-[.\w]+)+$/i),Ms={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Lj=function(){return typeof window>"u"?null:window},Dj=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let i=null;const n="data-tt-policy-suffix";t&&t.hasAttribute(n)&&(i=t.getAttribute(n));const s="dompurify"+(i?"#"+i:"");try{return e.createPolicy(s,{createHTML(r){return r},createScriptURL(r){return r}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},iR=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function nR(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Lj();const e=ae=>nR(ae);if(e.version="3.4.8",e.removed=[],!o||!o.document||o.document.nodeType!==Ms.document||!o.Element)return e.isSupported=!1,e;let t=o.document;const i=t,n=i.currentScript;o.DocumentFragment;const s=o.HTMLTemplateElement,r=o.Node,a=o.Element,c=o.NodeFilter,h=o.NamedNodeMap;h===void 0&&(o.NamedNodeMap||o.MozNamedAttrMap),o.HTMLFormElement;const d=o.DOMParser,u=o.trustedTypes,f=a.prototype,g=Rs(f,"cloneNode"),m=Rs(f,"remove"),p=Rs(f,"nextSibling"),b=Rs(f,"childNodes"),v=Rs(f,"parentNode"),C=Rs(f,"shadowRoot"),w=Rs(f,"attributes"),S=r&&r.prototype?Rs(r.prototype,"nodeType"):null,L=r&&r.prototype?Rs(r.prototype,"nodeName"):null;if(typeof s=="function"){const ae=t.createElement("template");ae.content&&ae.content.ownerDocument&&(t=ae.content.ownerDocument)}let D,x="",I=0;const T=function(N){if(I>0)throw $c('The configured TRUSTED_TYPES_POLICY.createHTML must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose createHTML wraps DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.');I++;try{return D.createHTML(N)}finally{I--}},M=t,O=M.implementation,P=M.createNodeIterator,k=M.createDocumentFragment,U=M.getElementsByTagName,B=i.importNode;let G=iR();e.isSupported=typeof KN=="function"&&typeof v=="function"&&O&&O.createHTMLDocument!==void 0;const X=mj,re=pj,Y=_j,ee=bj,Ee=Cj,Rt=vj,We=wj,Ke=yj;let Mt=tR,Ce=null;const Jt=Re({},[...JN,...$S,...KS,...GS,...WN]);let Me=null;const Rn=Re({},[...HN,...jS,...eR,...hp]);let Ft=Object.seal(zc(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Tf=null,Rb=null;const zr=Object.seal(zc(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let oP=!0,gD=!0,rP=!1,aP=!0,Vr=!1,Nf=!0,Pl=!1,mD=!1,pD=!1,Fh=!1,Mb=!1,Ab=!1,lP=!0,cP=!1;const hP="user-content-";let _D=!0,Rf=!1,Bh={},Ws=null;const bD=Re({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let dP=null;const uP=Re({},["audio","video","img","source","image","track"]);let CD=null;const fP=Re({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ob="http://www.w3.org/1998/Math/MathML",Pb="http://www.w3.org/2000/svg",Hs="http://www.w3.org/1999/xhtml";let zh=Hs,vD=!1,wD=null;const fH=Re({},[Ob,Pb,Hs],US);let SD=Re({},["mi","mo","mn","ms","mtext"]),yD=Re({},["annotation-xml"]);const gH=Re({},["title","style","font","a","script"]);let Mf=null;const mH=["application/xhtml+xml","text/html"],pH="text/html";let Bt=null,Vh=null;const _H=t.createElement("form"),gP=function(N){return N instanceof RegExp||N instanceof Function},LD=function(){let N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Vh&&Vh===N)return;(!N||typeof N!="object")&&(N={}),N=Pi(N),Mf=mH.indexOf(N.PARSER_MEDIA_TYPE)===-1?pH:N.PARSER_MEDIA_TYPE,Bt=Mf==="application/xhtml+xml"?US:Ru,Ce=It(N,"ALLOWED_TAGS")&&qi(N.ALLOWED_TAGS)?Re({},N.ALLOWED_TAGS,Bt):Jt,Me=It(N,"ALLOWED_ATTR")&&qi(N.ALLOWED_ATTR)?Re({},N.ALLOWED_ATTR,Bt):Rn,wD=It(N,"ALLOWED_NAMESPACES")&&qi(N.ALLOWED_NAMESPACES)?Re({},N.ALLOWED_NAMESPACES,US):fH,CD=It(N,"ADD_URI_SAFE_ATTR")&&qi(N.ADD_URI_SAFE_ATTR)?Re(Pi(fP),N.ADD_URI_SAFE_ATTR,Bt):fP,dP=It(N,"ADD_DATA_URI_TAGS")&&qi(N.ADD_DATA_URI_TAGS)?Re(Pi(uP),N.ADD_DATA_URI_TAGS,Bt):uP,Ws=It(N,"FORBID_CONTENTS")&&qi(N.FORBID_CONTENTS)?Re({},N.FORBID_CONTENTS,Bt):bD,Tf=It(N,"FORBID_TAGS")&&qi(N.FORBID_TAGS)?Re({},N.FORBID_TAGS,Bt):Pi({}),Rb=It(N,"FORBID_ATTR")&&qi(N.FORBID_ATTR)?Re({},N.FORBID_ATTR,Bt):Pi({}),Bh=It(N,"USE_PROFILES")?N.USE_PROFILES&&typeof N.USE_PROFILES=="object"?Pi(N.USE_PROFILES):N.USE_PROFILES:!1,oP=N.ALLOW_ARIA_ATTR!==!1,gD=N.ALLOW_DATA_ATTR!==!1,rP=N.ALLOW_UNKNOWN_PROTOCOLS||!1,aP=N.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Vr=N.SAFE_FOR_TEMPLATES||!1,Nf=N.SAFE_FOR_XML!==!1,Pl=N.WHOLE_DOCUMENT||!1,Fh=N.RETURN_DOM||!1,Mb=N.RETURN_DOM_FRAGMENT||!1,Ab=N.RETURN_TRUSTED_TYPE||!1,pD=N.FORCE_BODY||!1,lP=N.SANITIZE_DOM!==!1,cP=N.SANITIZE_NAMED_PROPS||!1,_D=N.KEEP_CONTENT!==!1,Rf=N.IN_PLACE||!1,Mt=uj(N.ALLOWED_URI_REGEXP)?N.ALLOWED_URI_REGEXP:tR,zh=typeof N.NAMESPACE=="string"?N.NAMESPACE:Hs,SD=It(N,"MATHML_TEXT_INTEGRATION_POINTS")&&N.MATHML_TEXT_INTEGRATION_POINTS&&typeof N.MATHML_TEXT_INTEGRATION_POINTS=="object"?Pi(N.MATHML_TEXT_INTEGRATION_POINTS):Re({},["mi","mo","mn","ms","mtext"]),yD=It(N,"HTML_INTEGRATION_POINTS")&&N.HTML_INTEGRATION_POINTS&&typeof N.HTML_INTEGRATION_POINTS=="object"?Pi(N.HTML_INTEGRATION_POINTS):Re({},["annotation-xml"]);const V=It(N,"CUSTOM_ELEMENT_HANDLING")&&N.CUSTOM_ELEMENT_HANDLING&&typeof N.CUSTOM_ELEMENT_HANDLING=="object"?Pi(N.CUSTOM_ELEMENT_HANDLING):zc(null);if(Ft=zc(null),It(V,"tagNameCheck")&&gP(V.tagNameCheck)&&(Ft.tagNameCheck=V.tagNameCheck),It(V,"attributeNameCheck")&&gP(V.attributeNameCheck)&&(Ft.attributeNameCheck=V.attributeNameCheck),It(V,"allowCustomizedBuiltInElements")&&typeof V.allowCustomizedBuiltInElements=="boolean"&&(Ft.allowCustomizedBuiltInElements=V.allowCustomizedBuiltInElements),Vr&&(gD=!1),Mb&&(Fh=!0),Bh&&(Ce=Re({},WN),Me=zc(null),Bh.html===!0&&(Re(Ce,JN),Re(Me,HN)),Bh.svg===!0&&(Re(Ce,$S),Re(Me,jS),Re(Me,hp)),Bh.svgFilters===!0&&(Re(Ce,KS),Re(Me,jS),Re(Me,hp)),Bh.mathMl===!0&&(Re(Ce,GS),Re(Me,eR),Re(Me,hp))),zr.tagCheck=null,zr.attributeCheck=null,It(N,"ADD_TAGS")&&(typeof N.ADD_TAGS=="function"?zr.tagCheck=N.ADD_TAGS:qi(N.ADD_TAGS)&&(Ce===Jt&&(Ce=Pi(Ce)),Re(Ce,N.ADD_TAGS,Bt))),It(N,"ADD_ATTR")&&(typeof N.ADD_ATTR=="function"?zr.attributeCheck=N.ADD_ATTR:qi(N.ADD_ATTR)&&(Me===Rn&&(Me=Pi(Me)),Re(Me,N.ADD_ATTR,Bt))),It(N,"ADD_URI_SAFE_ATTR")&&qi(N.ADD_URI_SAFE_ATTR)&&Re(CD,N.ADD_URI_SAFE_ATTR,Bt),It(N,"FORBID_CONTENTS")&&qi(N.FORBID_CONTENTS)&&(Ws===bD&&(Ws=Pi(Ws)),Re(Ws,N.FORBID_CONTENTS,Bt)),It(N,"ADD_FORBID_CONTENTS")&&qi(N.ADD_FORBID_CONTENTS)&&(Ws===bD&&(Ws=Pi(Ws)),Re(Ws,N.ADD_FORBID_CONTENTS,Bt)),_D&&(Ce["#text"]=!0),Pl&&Re(Ce,["html","head","body"]),Ce.table&&(Re(Ce,["tbody"]),delete Tf.tbody),N.TRUSTED_TYPES_POLICY){if(typeof N.TRUSTED_TYPES_POLICY.createHTML!="function")throw $c('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof N.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw $c('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const te=D;D=N.TRUSTED_TYPES_POLICY;try{x=T("")}catch(He){throw D=te,He}}else D===void 0&&N.TRUSTED_TYPES_POLICY!==null&&(D=Dj(u,n)),D&&typeof x=="string"&&(x=T(""));(G.uponSanitizeElement.length>0||G.uponSanitizeAttribute.length>0)&&Ce===Jt&&(Ce=Pi(Ce)),G.uponSanitizeAttribute.length>0&&Me===Rn&&(Me=Pi(Me)),ji&&ji(N),Vh=N},mP=Re({},[...$S,...KS,...fj]),pP=Re({},[...GS,...gj]),bH=function(N){let V=v(N);(!V||!V.tagName)&&(V={namespaceURI:zh,tagName:"template"});const te=Ru(N.tagName),He=Ru(V.tagName);return wD[N.namespaceURI]?N.namespaceURI===Pb?V.namespaceURI===Hs?te==="svg":V.namespaceURI===Ob?te==="svg"&&(He==="annotation-xml"||SD[He]):!!mP[te]:N.namespaceURI===Ob?V.namespaceURI===Hs?te==="math":V.namespaceURI===Pb?te==="math"&&yD[He]:!!pP[te]:N.namespaceURI===Hs?V.namespaceURI===Pb&&!yD[He]||V.namespaceURI===Ob&&!SD[He]?!1:!pP[te]&&(gH[te]||!mP[te]):!!(Mf==="application/xhtml+xml"&&wD[N.namespaceURI]):!1},rs=function(N){Vc(e.removed,{element:N});try{v(N).removeChild(N)}catch{m(N)}},kl=function(N,V){try{Vc(e.removed,{attribute:V.getAttributeNode(N),from:V})}catch{Vc(e.removed,{attribute:null,from:V})}if(V.removeAttribute(N),N==="is")if(Fh||Mb)try{rs(V)}catch{}else try{V.setAttribute(N,"")}catch{}},_P=function(N){let V=null,te=null;if(pD)N=""+N;else{const dt=YN(N,/^[\r\n\t ]+/);te=dt&&dt[0]}Mf==="application/xhtml+xml"&&zh===Hs&&(N=''+N+"");const He=D?T(N):N;if(zh===Hs)try{V=new d().parseFromString(He,Mf)}catch{}if(!V||!V.documentElement){V=O.createDocument(zh,"template",null);try{V.documentElement.innerHTML=vD?x:He}catch{}}const ke=V.body||V.documentElement;return N&&te&&ke.insertBefore(t.createTextNode(te),ke.childNodes[0]||null),zh===Hs?U.call(V,Pl?"html":"body")[0]:Pl?V.documentElement:ke},bP=function(N){return P.call(N.ownerDocument||N,N,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},DD=function(N){var V,te;N.normalize();const He=P.call(N.ownerDocument||N,N,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null);let ke=He.nextNode();for(;ke;){let ni=ke.data;qa([X,re,Y],$n=>{ni=Uc(ni,$n," ")}),ke.data=ni,ke=He.nextNode()}const dt=(V=(te=N.querySelectorAll)===null||te===void 0?void 0:te.call(N,"template"))!==null&&V!==void 0?V:[];qa(Array.from(dt),ni=>{Uh(ni.content)&&DD(ni.content)})},kb=function(N){const V=L?L(N):null;return typeof V!="string"||Bt(V)!=="form"?!1:typeof N.nodeName!="string"||typeof N.textContent!="string"||typeof N.removeChild!="function"||N.attributes!==w(N)||typeof N.removeAttribute!="function"||typeof N.setAttribute!="function"||typeof N.namespaceURI!="string"||typeof N.insertBefore!="function"||typeof N.hasChildNodes!="function"||N.nodeType!==S(N)||N.childNodes!==b(N)},Uh=function(N){if(!S||typeof N!="object"||N===null)return!1;try{return S(N)===Ms.documentFragment}catch{return!1}},Fb=function(N){if(!S||typeof N!="object"||N===null)return!1;try{return typeof S(N)=="number"}catch{return!1}};function Ko(ae,N,V){qa(ae,te=>{te.call(e,N,V,Vh)})}const CP=function(N){let V=null;if(Ko(G.beforeSanitizeElements,N,null),kb(N))return rs(N),!0;const te=Bt(L?L(N):N.nodeName);if(Ko(G.uponSanitizeElement,N,{tagName:te,allowedTags:Ce}),Nf&&N.hasChildNodes()&&!Fb(N.firstElementChild)&&vi(/<[/\w!]/g,N.innerHTML)&&vi(/<[/\w!]/g,N.textContent)||Nf&&N.namespaceURI===Hs&&te==="style"&&Fb(N.firstElementChild)||N.nodeType===Ms.progressingInstruction||Nf&&N.nodeType===Ms.comment&&vi(/<[/\w]/g,N.data))return rs(N),!0;if(Tf[te]||!(zr.tagCheck instanceof Function&&zr.tagCheck(te))&&!Ce[te]){if(!Tf[te]&&wP(te)&&(Ft.tagNameCheck instanceof RegExp&&vi(Ft.tagNameCheck,te)||Ft.tagNameCheck instanceof Function&&Ft.tagNameCheck(te)))return!1;if(_D&&!Ws[te]){const ke=v(N),dt=b(N);if(dt&&ke){const ni=dt.length;for(let $n=ni-1;$n>=0;--$n){const as=g(dt[$n],!0);ke.insertBefore(as,p(N))}}}return rs(N),!0}return(S?S(N):N.nodeType)===Ms.element&&!bH(N)||(te==="noscript"||te==="noembed"||te==="noframes")&&vi(/<\/no(script|embed|frames)/i,N.innerHTML)?(rs(N),!0):(Vr&&N.nodeType===Ms.text&&(V=N.textContent,qa([X,re,Y],ke=>{V=Uc(V,ke," ")}),N.textContent!==V&&(Vc(e.removed,{element:N.cloneNode()}),N.textContent=V)),Ko(G.afterSanitizeElements,N,null),!1)},vP=function(N,V,te){if(Rb[V]||lP&&(V==="id"||V==="name")&&(te in t||te in _H))return!1;const He=Me[V]||zr.attributeCheck instanceof Function&&zr.attributeCheck(V,N);if(!(gD&&!Rb[V]&&vi(ee,V))){if(!(oP&&vi(Ee,V))){if(!He||Rb[V]){if(!(wP(N)&&(Ft.tagNameCheck instanceof RegExp&&vi(Ft.tagNameCheck,N)||Ft.tagNameCheck instanceof Function&&Ft.tagNameCheck(N))&&(Ft.attributeNameCheck instanceof RegExp&&vi(Ft.attributeNameCheck,V)||Ft.attributeNameCheck instanceof Function&&Ft.attributeNameCheck(V,N))||V==="is"&&Ft.allowCustomizedBuiltInElements&&(Ft.tagNameCheck instanceof RegExp&&vi(Ft.tagNameCheck,te)||Ft.tagNameCheck instanceof Function&&Ft.tagNameCheck(te))))return!1}else if(!CD[V]){if(!vi(Mt,Uc(te,We,""))){if(!((V==="src"||V==="xlink:href"||V==="href")&&N!=="script"&&ZN(te,"data:")===0&&dP[N])){if(!(rP&&!vi(Rt,Uc(te,We,"")))){if(te)return!1}}}}}}return!0},CH=Re({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),wP=function(N){return!CH[Ru(N)]&&vi(Ke,N)},SP=function(N){Ko(G.beforeSanitizeAttributes,N,null);const V=N.attributes;if(!V||kb(N))return;const te={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Me,forceKeepAttr:void 0};let He=V.length;for(;He--;){const ke=V[He],dt=ke.name,ni=ke.namespaceURI,$n=ke.value,as=Bt(dt),xD=$n;let hi=dt==="value"?xD:rj(xD);if(te.attrName=as,te.attrValue=hi,te.keepAttr=!0,te.forceKeepAttr=void 0,Ko(G.uponSanitizeAttribute,N,te),hi=te.attrValue,cP&&(as==="id"||as==="name")&&ZN(hi,hP)!==0&&(kl(dt,N),hi=hP+hi),Nf&&vi(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,hi)){kl(dt,N);continue}if(as==="attributename"&&YN(hi,"href")){kl(dt,N);continue}if(te.forceKeepAttr)continue;if(!te.keepAttr){kl(dt,N);continue}if(!aP&&vi(/\/>/i,hi)){kl(dt,N);continue}Vr&&qa([X,re,Y],LP=>{hi=Uc(hi,LP," ")});const yP=Bt(N.nodeName);if(!vP(yP,as,hi)){kl(dt,N);continue}if(D&&typeof u=="object"&&typeof u.getAttributeType=="function"&&!ni)switch(u.getAttributeType(yP,as)){case"TrustedHTML":{hi=T(hi);break}case"TrustedScriptURL":{hi=D.createScriptURL(hi);break}}if(hi!==xD)try{ni?N.setAttributeNS(ni,dt,hi):N.setAttribute(dt,hi),kb(N)?rs(N):qN(e.removed)}catch{kl(dt,N)}}Ko(G.afterSanitizeAttributes,N,null)},Bb=function(N){let V=null;const te=bP(N);for(Ko(G.beforeSanitizeShadowDOM,N,null);V=te.nextNode();)if(Ko(G.uponSanitizeShadowNode,V,null),CP(V),SP(V),Uh(V.content)&&Bb(V.content),(S?S(V):V.nodeType)===Ms.element){const ke=C?C(V):V.shadowRoot;Uh(ke)&&($h(ke),Bb(ke))}Ko(G.afterSanitizeShadowDOM,N,null)},$h=function(N){const V=S?S(N):N.nodeType;if(V===Ms.element){const ke=C?C(N):N.shadowRoot;Uh(ke)&&($h(ke),Bb(ke))}const te=b?b(N):N.childNodes;if(!te)return;const He=[];qa(te,ke=>{Vc(He,ke)});for(const ke of He)$h(ke);if(V===Ms.element){const ke=L?L(N):null;if(typeof ke=="string"&&Bt(ke)==="template"){const dt=N.content;Uh(dt)&&$h(dt)}}};return e.sanitize=function(ae){let N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},V=null,te=null,He=null,ke=null;if(vD=!ae,vD&&(ae=""),typeof ae!="string"&&!Fb(ae)&&(ae=dj(ae),typeof ae!="string"))throw $c("dirty is not a string, aborting");if(!e.isSupported)return ae;if(mD||LD(N),e.removed=[],typeof ae=="string"&&(Rf=!1),Rf){const $n=L?L(ae):ae.nodeName;if(typeof $n=="string"){const as=Bt($n);if(!Ce[as]||Tf[as])throw $c("root node is forbidden and cannot be sanitized in-place")}if(kb(ae))throw $c("root node is clobbered and cannot be sanitized in-place");$h(ae)}else if(Fb(ae))V=_P(""),te=V.ownerDocument.importNode(ae,!0),te.nodeType===Ms.element&&te.nodeName==="BODY"||te.nodeName==="HTML"?V=te:V.appendChild(te),$h(te);else{if(!Fh&&!Vr&&!Pl&&ae.indexOf("<")===-1)return D&&Ab?T(ae):ae;if(V=_P(ae),!V)return Fh?null:Ab?x:""}V&&pD&&rs(V.firstChild);const dt=bP(Rf?ae:V);for(;He=dt.nextNode();)CP(He),SP(He),Uh(He.content)&&Bb(He.content);if(Rf)return Vr&&DD(ae),ae;if(Fh){if(Vr&&DD(V),Mb)for(ke=k.call(V.ownerDocument);V.firstChild;)ke.appendChild(V.firstChild);else ke=V;return(Me.shadowroot||Me.shadowrootmode)&&(ke=B.call(i,ke,!0)),ke}let ni=Pl?V.outerHTML:V.innerHTML;return Pl&&Ce["!doctype"]&&V.ownerDocument&&V.ownerDocument.doctype&&V.ownerDocument.doctype.name&&vi(Sj,V.ownerDocument.doctype.name)&&(ni=" +`+ni),Vr&&qa([X,re,Y],$n=>{ni=Uc(ni,$n," ")}),D&&Ab?T(ni):ni},e.setConfig=function(){let ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};LD(ae),mD=!0},e.clearConfig=function(){Vh=null,mD=!1},e.isValidAttribute=function(ae,N,V){Vh||LD({});const te=Bt(ae),He=Bt(N);return vP(te,He,V)},e.addHook=function(ae,N){typeof N=="function"&&Vc(G[ae],N)},e.removeHook=function(ae,N){if(N!==void 0){const V=sj(G[ae],N);return V===-1?void 0:oj(G[ae],V,1)[0]}return qN(G[ae])},e.removeHooks=function(ae){G[ae]=[]},e.removeAllHooks=function(){G=iR()},e}var Kc=nR();const sR=Object.freeze(["a","abbr","b","bdo","blockquote","br","caption","cite","code","col","colgroup","dd","del","details","dfn","div","dl","dt","em","figcaption","figure","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","label","li","mark","ol","p","pre","q","rp","rt","ruby","s","samp","small","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","time","tr","tt","u","ul","var","video","wbr"]),oR=Object.freeze(["href","target","src","alt","title","for","name","role","tabindex","x-dispatch","required","checked","placeholder","type","start","width","height","align"]),qS="vscode-relative-path";function rR(o,e){if(e.override==="*")return!0;try{const t=new URL(o,qS+"://");return!!(e.override.includes(t.protocol.replace(/:$/,""))||e.allowRelativePaths&&t.protocol===qS+":"&&!o.trim().toLowerCase().startsWith(qS))}catch{return!1}}function xj(o,e){Kc.addHook("afterSanitizeAttributes",t=>{for(const i of["href","src"])if(t.hasAttribute(i)){const n=t.getAttribute(i);i==="href"?!n.startsWith("#")&&!rR(n,o)&&t.removeAttribute(i):rR(n,e)||t.removeAttribute(i)}})}const Ej=Object.freeze({ALLOWED_TAGS:[...sR],ALLOWED_ATTR:[...oR],ALLOW_UNKNOWN_PROTOCOLS:!0});function Ij(o,e){return aR(o,e,"trusted")}function aR(o,e,t){try{const i={...Ej};e?.allowedTags&&(e.allowedTags.override&&(i.ALLOWED_TAGS=[...e.allowedTags.override]),e.allowedTags.augment&&(i.ALLOWED_TAGS=[...i.ALLOWED_TAGS??[],...e.allowedTags.augment]));let n=[...oR];e?.allowedAttributes&&(e.allowedAttributes.override&&(n=[...e.allowedAttributes.override]),e.allowedAttributes.augment&&(n=[...n,...e.allowedAttributes.augment])),n=n.map(a=>typeof a=="string"?a.toLowerCase():{attributeName:a.attributeName.toLowerCase(),shouldKeep:a.shouldKeep});const s=new Set(n.map(a=>typeof a=="string"?a:a.attributeName)),r=new Map;for(const a of n)typeof a=="string"?r.delete(a):r.set(a.attributeName,a);return i.ALLOWED_ATTR=Array.from(s),xj({override:e?.allowedLinkProtocols?.override??[l.Schemas.http,l.Schemas.https],allowRelativePaths:e?.allowRelativeLinkPaths??!1},{override:e?.allowedMediaProtocols?.override??[l.Schemas.http,l.Schemas.https],allowRelativePaths:e?.allowRelativeMediaPaths??!1}),e?.replaceWithPlaintext&&Kc.addHook("uponSanitizeElement",Nj),r.size&&Kc.addHook("uponSanitizeAttribute",(a,c)=>{const h=r.get(c.attrName);if(h){const d=h.shouldKeep(a,c);typeof d=="string"?(c.keepAttr=!0,c.attrValue=d):c.keepAttr=d}else c.keepAttr=s.has(c.attrName)}),t==="dom"?Kc.sanitize(o,{...i,RETURN_DOM_FRAGMENT:!0}):Kc.sanitize(o,{...i,RETURN_TRUSTED_TYPE:!0})}finally{Kc.removeAllHooks()}}const Tj=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Nj=(o,e,t)=>{if(!e.allowedTags[e.tagName]&&e.tagName!=="body"){const i=lR(o);i&&(o.nodeType===Node.COMMENT_NODE?o.parentElement?.insertBefore(i,o):o.parentElement?.replaceChild(i,o))}};function lR(o){if(!o.ownerDocument)return;let e,t;if(o.nodeType===Node.COMMENT_NODE)e=``;else if(o instanceof Element){const r=o.tagName.toLowerCase(),a=Tj.includes(r),c=o.attributes.length?" "+Array.from(o.attributes).map(h=>`${h.name}="${h.value}"`).join(" "):"";e=`<${r}${c}>`,a||(t=``)}else return;const i=document.createDocumentFragment(),n=o.ownerDocument.createTextNode(e);for(i.appendChild(n);o.firstChild;)i.appendChild(o.firstChild);const s=t?o.ownerDocument.createTextNode(t):void 0;return s&&i.appendChild(s),i}function cR(o,e,t){const i=aR(e,t,"dom");oi(o,i)}const Rj=new RegExp(`(\\\\)?\\$\\((${_.ThemeIcon.iconNameExpression}(?:${_.ThemeIcon.iconModifierExpression})?)\\)`,"g");function vr(o,e){const t=new Array;let i,n=0,s=0;for(;(i=Rj.exec(o))!==null;){s=i.index||0,n{let i=[],n=[];return o&&({href:o,dimensions:i}=gG(o),n.push(`src="${yu(o)}"`)),t&&n.push(`alt="${yu(t)}"`),e&&n.push(`title="${yu(e)}"`),i.length&&(n=n.concat(i)),""},paragraph({tokens:o}){return`

    ${this.parser.parseInline(o)}

    `},link({href:o,title:e,tokens:t}){let i=this.parser.parseInline(t);if(typeof o!="string")return"";o===i&&(i=xS(i)),e=typeof e=="string"?yu(xS(e)):"",o=xS(o),!e&&o.startsWith(`${l.Schemas.file}:`)&&(e=Mj(o));const n=o.startsWith(`${l.Schemas.command}:`);return o=o.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"),`
    ${i}`}});function Aj(o){return function(e){const{tokens:t}=e,i=t[0];if(i?.type!=="paragraph")return o.call(this,e);const n=i.tokens;if(!n||n.length===0)return o.call(this,e);const s=n[0];if(s?.type!=="text")return o.call(this,e);const r=/^\s*\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]\s*?\n*/i,a=s.raw.match(r);if(!a)return o.call(this,e);s.raw=s.raw.replace(r,""),s.text=s.text.replace(r,"");const c={note:"info",tip:"light-bulb",important:"comment",warning:"alert",caution:"stop"},h=a[1],d=h.charAt(0).toUpperCase()+h.slice(1).toLowerCase(),u=h.toLowerCase(),f=Gc({id:c[u]}).outerHTML,g=this.parser.parse(t);return`

    ${f}${d}${g.substring(3)}

    +`}}function dp(o,e={},t){const i=new l.DisposableStore;let n=!1;const s=new UN(...e.markedExtensions??[]),{renderer:r,codeBlocks:a,syncCodeBlocks:c}=Pj(s,e,o),h=kj(o);let d;if(e.fillInIncompleteTokens){const m={...s.defaults,...e.markedOptions,renderer:r},p=s.lexer(h,m),b=Qj(p);d=s.parser(b,m)}else d=s.parse(h,{...e?.markedOptions,renderer:r,async:!1});o.supportThemeIcons&&(d=vr(d).map(p=>typeof p=="string"?p:p.outerHTML).join(""));const u=document.createElement("div"),f=fR(o,e.sanitizerConfig??{});cR(u,d,f),Oj(o,e,u);let g;if(t?(g=t,oi(t,...u.childNodes)):g=u,a.length>0)Promise.all(a).then(m=>{if(n)return;const p=new Map(m),b=g.querySelectorAll("div[data-code]");for(const v of b){const C=p.get(v.dataset.code??"");C&&oi(v,C)}e.asyncRenderCallback?.()});else if(c.length>0){const m=new Map(c),p=g.querySelectorAll("div[data-code]");for(const b of p){const v=m.get(b.dataset.code??"");v&&oi(b,v)}}if(e.asyncRenderCallback)for(const m of g.getElementsByTagName("img")){const p=i.add(R(m,"load",()=>{p.dispose(),e.asyncRenderCallback()}))}if(e.actionHandler){const m=p=>{const b=new Bi(j(g),p);!b.leftButton&&!b.middleButton||hR(o,e,b)};i.add(R(g,"click",m)),i.add(R(g,"auxclick",m)),i.add(R(g,"keydown",p=>{const b=new Be(p);!b.equals(10)&&!b.equals(3)||hR(o,e,b)}))}for(const m of[...g.getElementsByTagName("input")])if(m.attributes.getNamedItem("type")?.value==="checkbox")m.setAttribute("disabled","");else if(e.sanitizerConfig?.replaceWithPlaintext){const p=lR(m);p?m.parentElement?.replaceChild(p,m):m.remove()}else m.remove();return{element:g,dispose:()=>{n=!0,i.dispose()}}}function Oj(o,e,t){for(const i of t.querySelectorAll("img, audio, video, source")){const n=i.getAttribute("src");if(n){let s=n;try{o.baseUri&&(s=ZS(l.URI.from(o.baseUri),s))}catch{}if(i.setAttribute("src",dR(o,s,!0)),e.sanitizerConfig?.remoteImageIsAllowed){const r=l.URI.parse(s);r.scheme!==l.Schemas.file&&r.scheme!==l.Schemas.data&&!e.sanitizerConfig.remoteImageIsAllowed(r)&&i.replaceWith(Q("",void 0,i.outerHTML))}}}for(const i of t.querySelectorAll("a")){const n=i.getAttribute("href");if(i.setAttribute("href",""),!n||/^data:|javascript:/i.test(n)||/^command:/i.test(n)&&!o.isTrusted||/^command:(\/\/\/)?_workbench\.downloadResource/i.test(n))i.replaceWith(...i.childNodes);else{let s=dR(o,n,!1);o.baseUri&&(s=ZS(l.URI.from(o.baseUri),n)),i.dataset.href=s}}}function Pj(o,e,t){const i=new o.Renderer(e.markedOptions);i.image=YS.image,i.link=YS.link,i.paragraph=YS.paragraph,t.supportAlertSyntax&&(i.blockquote=Aj(i.blockquote));const n=[],s=[];return e.codeBlockRendererSync?i.code=({text:r,lang:a,raw:c})=>{const h=IS.nextId(),d=e.codeBlockRendererSync(uR(a),r,c);return s.push([h,d]),`
    ${l.escape(r)}
    `}:e.codeBlockRenderer&&(i.code=({text:r,lang:a})=>{const c=IS.nextId(),h=e.codeBlockRenderer(uR(a),r);return n.push(h.then(d=>[c,d])),`
    ${l.escape(r)}
    `}),t.supportHtml||(i.html=({text:r})=>e.sanitizerConfig?.replaceWithPlaintext?l.escape(r):(t.isTrusted?r.match(/^(]+>)|(<\/\s*span>)$/):void 0)?r:""),{renderer:i,codeBlocks:n,syncCodeBlocks:s}}function kj(o){let e=o.value;return e.length>1e5&&(e=`${e.substr(0,1e5)}…`),o.supportThemeIcons&&(e=cG(e)),e}function hR(o,e,t){const i=t.target.closest("a[data-href]");if(Ve(i))try{let n=i.dataset.href;n&&(o.baseUri&&(n=ZS(l.URI.from(o.baseUri),n)),e.actionHandler?.(n,o))}catch(n){l.onUnexpectedError(n)}finally{t.preventDefault(),t.stopPropagation()}}function Fj(o,e){let t;try{t=FS(decodeURIComponent(e))}catch{}return t?(t=l.cloneAndChange(t,i=>{if(o.uris&&o.uris[i])return l.URI.revive(o.uris[i])}),encodeURIComponent(JSON.stringify(t))):e}function dR(o,e,t){const i=o.uris&&o.uris[e];let n=l.URI.revive(i);return t?e.startsWith(l.Schemas.data+":")?e:(n||(n=l.URI.parse(e)),l.FileAccess.uriToBrowserUri(n).toString(!0)):!n||l.URI.parse(e).toString()===n.toString()?e:(n.query&&(n=n.with({query:Fj(o,n.query)})),n.toString())}function uR(o){if(!o)return"";const e=o.split(/[\s+|:|,|\{|\?]/,1);return e.length?e[0]:o}function ZS(o,e){return/^\w[\w\d+.-]*:/.test(e)?e:o.path.endsWith("/")?Ax(o,e).toString():Ax(Rx(o),e).toString()}function Bj(o,e,t={}){const i=fR(e,t);return Ij(o,i)}const zj=Object.freeze([...sR,"input"]),Vj=Object.freeze(["align","autoplay","alt","colspan","controls","draggable","height","href","loop","muted","playsinline","poster","rowspan","src","target","title","type","width","start","checked","disabled","value","data-code","data-href","data-severity",{attributeName:"style",shouldKeep:(o,e)=>o.tagName==="SPAN"&&e.attrName==="style"?/^(color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z0-9]+)+\));)?(background-color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z0-9]+)+\));)?(border-radius:[0-9]+px;)?$/.test(e.attrValue):!1},{attributeName:"class",shouldKeep:(o,e)=>o.tagName==="SPAN"&&e.attrName==="class"?/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(e.attrValue):!1}]);function fR(o,e){const t=o.isTrusted??!1,i=[l.Schemas.http,l.Schemas.https,l.Schemas.mailto,l.Schemas.file,l.Schemas.vscodeFileResource,l.Schemas.vscodeRemote,l.Schemas.vscodeRemoteResource,l.Schemas.vscodeNotebookCell,l.Schemas.internal];return t&&i.push(l.Schemas.command),e.allowedLinkSchemes?.augment&&i.push(...e.allowedLinkSchemes.augment),{allowedTags:{override:e.allowedTags?.override??zj},allowedAttributes:{override:e.allowedAttributes?.override??Vj},allowedLinkProtocols:{override:i},allowRelativeLinkPaths:!!o.baseUri,allowedMediaProtocols:{override:[l.Schemas.http,l.Schemas.https,l.Schemas.data,l.Schemas.file,l.Schemas.vscodeFileResource,l.Schemas.vscodeRemote,l.Schemas.vscodeRemoteResource]},allowRelativeMediaPaths:!!o.baseUri,replaceWithPlaintext:e.replaceWithPlaintext}}function Uj(o,e){if(typeof o=="string")return o;let t=o.value??"";t.length>1e5&&(t=`${t.substr(0,1e5)}…`);const i=Kj(),n=YG(t,{async:!1,renderer:i});return Bj(n,{isTrusted:!1},{}).toString().replace(/&(#\d+|[a-zA-Z]+);/g,s=>$j.get(s)??s).trim()}const $j=new Map([[""",'"'],[" "," "],["&","&"],["'","'"],["<","<"],[">",">"]]);function Kj(){const o=new Tu;return o.code=({text:e})=>l.escape(e),o.blockquote=({text:e})=>e+` +`,o.html=e=>"",o.heading=function({tokens:e}){return this.parser.parseInline(e)+` +`},o.hr=()=>"",o.list=function({items:e}){return e.map(t=>this.listitem(t)).join(` +`)+` +`},o.listitem=({text:e})=>e+` +`,o.paragraph=function({tokens:e}){return this.parser.parseInline(e)+` +`},o.table=function({header:e,rows:t}){return e.map(i=>this.tablecell(i)).join(" ")+` +`+t.map(i=>i.map(n=>this.tablecell(n)).join(" ")).join(` +`)+` +`},o.tablerow=({text:e})=>e,o.tablecell=function({tokens:e}){return this.parser.parseInline(e)},o.strong=({text:e})=>e,o.em=({text:e})=>e,o.codespan=({text:e})=>e,o.br=e=>` +`,o.del=({text:e})=>e,o.image=e=>"",o.text=({text:e})=>e,o.link=({text:e})=>e,o}function Au(o){let e="";return o.forEach(t=>{e+=t.raw}),e}function gR(o){if(o.tokens)for(let e=o.tokens.length-1;e>=0;e--){const t=o.tokens[e];if(t.type==="text"){const i=t.raw.split(` +`),n=i[i.length-1];if(n.includes("`"))return Jj(o);if(n.includes("**"))return n7(o);if(n.match(/\*\w/))return Wj(o);if(n.match(/(^|\s)__\w/))return s7(o);if(n.match(/(^|\s)_\w/))return Hj(o);if(Gj(n)||jj(n)&&o.tokens.slice(0,e).some(s=>s.type==="text"&&s.raw.match(/\[[^\]]*$/))){const s=o.tokens.slice(e+1);return s[0]?.type==="link"&&s[1]?.type==="text"&&s[1].raw.match(/^ *"[^"]*$/)||n.match(/^[^"]* +"[^"]*$/)?t7(o):e7(o)}else if(n.match(/(^|\s)\[\w*[^\]]*$/))return i7(o)}}}function Gj(o){return!!o.match(/(^|\s)\[.*\]\(\w*/)}function jj(o){return!!o.match(/^[^\[]*\]\([^\)]*$/)}function qj(o){const e=o.items[o.items.length-1],t=e.tokens?e.tokens[e.tokens.length-1]:void 0,i=h=>{const u=h.items.at(-1)?.tokens.at(-1);return u?.type==="heading"||u?.type==="list"&&i(u)};let n;if(t?.type==="text"&&!("inRawBlock"in e))n=gR(t);else if(i(o)){const h=Nu(o.raw.trim()+"  ")[0];return h.type!=="list"?void 0:h}if(!n||n.type!=="paragraph")return;const s=Au(o.items.slice(0,-1)),r=e.raw.match(/^(\s*(-|\d+\.|\*) +)/)?.[0];if(!r)return;const a=r+Au(e.tokens.slice(0,-1))+n.raw,c=Nu(s+a)[0];if(c.type==="list")return c}function Yj(o,e){if(o.raw.match(/-\s*$/))return Nu(e+"  ")}const Zj=3;function Qj(o){for(let e=0;e=0&&(o[i].type==="space"||o[i].type==="html");)i--;const n=i>=0?o[i]:void 0,s=o.slice(i+1);if(!t&&n?.type==="list"){const a=qj(n);a&&(t=[a,...s],e=i)}if(!t&&n?.type==="paragraph"){const a=gR(n);a&&(t=[a,...s],e=i)}if(t){const a=[...o.slice(0,e),...t];return a.links=o.links,a}const r=o.at(-1);if(r?.type==="heading"){const a=Yj(r,Au(o));if(a)return a}return null}function Jj(o){return wr(o,"`")}function Wj(o){return wr(o,"*")}function Hj(o){return wr(o,"_")}function e7(o){return wr(o,")",!1)}function t7(o){return wr(o,'")',!1)}function i7(o){return wr(o,"](https://microsoft.com)",!1)}function n7(o){return wr(o,"**")}function s7(o){return wr(o,"__")}function wr(o,e,t=!0){const i=Au(Array.isArray(o)?o:[o]),n=t?i.trimEnd():i;return Nu(n+e)[0]}function o7(o){const e=Au(o),t=e.split(` +`);let i,n=!1;for(let s=0;s"u"&&r.match(/^\s*\|/)){const a=r.match(/(\|[^\|]+)(?=\||$)/g);a&&(i=a.length)}else if(typeof i=="number")if(r.match(/^\s*\|/)){if(s!==t.length-1)return;n=!0}else return}if(typeof i=="number"&&i>0){const s=n?t.slice(0,-1).join(` +`):e,r=!!s.match(/\|\s*$/),a=s+(r?"":"|")+` +|${" --- |".repeat(i)}`;return Nu(a)}}const Ou=le("openerService");function r7(o,e){return o.with({fragment:`${e.startLineNumber},${e.startColumn}${e.endLineNumber?`-${e.endLineNumber}${e.endColumn?`,${e.endColumn}`:""}`:""}`})}function a7(o){let e;const t=/^L?(\d+)(?:,(\d+))?(-L?(\d+)(?:,(\d+))?)?/.exec(o.fragment);return t&&(e={startLineNumber:parseInt(t[1]),startColumn:t[2]?parseInt(t[2]):1,endLineNumber:t[4]?parseInt(t[4]):void 0,endColumn:t[4]?t[5]?parseInt(t[5]):1:void 0},o=o.with({fragment:""})),{selection:e,uri:o}}var l7=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},c7=function(o,e){return function(t,i){e(t,i,o)}};const Pu=le("markdownRendererService");let QS=class{constructor(e){this._openerService=e}render(e,t,i){const n={...t};n.actionHandler||(n.actionHandler=(r,a)=>mR(this._openerService,r,a.isTrusted)),n.codeBlockRenderer||(n.codeBlockRenderer=(r,a)=>this._defaultCodeBlockRenderer?.renderCodeBlock(r,a,n??{})??Promise.resolve(document.createElement("span")));const s=dp(e,n,i);return s.element.classList.add("rendered-markdown"),s}setDefaultCodeBlockRenderer(e){this._defaultCodeBlockRenderer=e}};QS=l7([c7(0,Ou)],QS);async function mR(o,e,t,i){try{return await o.open(e,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:h7(t),skipValidation:i})}catch(n){return l.onUnexpectedError(n),!1}}function h7(o){return o===!0?!0:o&&Array.isArray(o.enabledCommands)?o.enabledCommands:!1}fe(Pu,QS,1);var d7=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},up=function(o,e){return function(t,i){e(t,i,o)}};const As=Q;let XS=class extends Wn{get _targetWindow(){return j(this._target.targetElements[0])}get _targetDocumentElement(){return j(this._target.targetElements[0]).document.documentElement}get isDisposed(){return this._isDisposed}get isMouseIn(){return this._lockMouseTracker.isMouseIn}get domNode(){return this._hover.containerDomNode}get onDispose(){return this._onDispose.event}get onRequestLayout(){return this._onRequestLayout.event}get anchor(){return this._hoverPosition===2?0:1}get x(){return this._x}get y(){return this._y}get isLocked(){return this._isLocked}set isLocked(e){this._isLocked!==e&&(this._isLocked=e,this._hoverContainer.classList.toggle("locked",this._isLocked))}addMouseTrackingElement(e){return this._lockMouseTracker.addElement(e)}constructor(e,t,i,n,s){if(super(),this._keybindingService=t,this._configurationService=i,this._markdownRenderer=n,this._accessibilityService=s,this._messageListeners=new l.DisposableStore,this._isDisposed=!1,this._forcePosition=!1,this._x=0,this._y=0,this._isLocked=!1,this._enableFocusTraps=!1,this._addedFocusTrap=!1,this._maxHeightRatioRelativeToWindow=.5,this._onDispose=this._register(new l.Emitter),this._onRequestLayout=this._register(new l.Emitter),this._linkHandler=e.linkHandler,this._target="targetElements"in e.target?e.target:new u7(e.target),e.style)switch(e.style){case 1:{e.appearance??={},e.appearance.compact??=!0,e.appearance.showPointer??=!0;break}case 2:{e.appearance??={},e.appearance.compact??=!0;break}}this._hoverPointer=e.appearance?.showPointer?As("div.workbench-hover-pointer"):void 0,this._hover=this._register(new sN(!e.appearance?.skipFadeInAnimation)),this._hover.containerDomNode.classList.add("workbench-hover"),e.appearance?.compact&&this._hover.containerDomNode.classList.add("workbench-hover","compact"),this._hoverPointer&&this._hover.containerDomNode.classList.add("with-pointer"),e.additionalClasses&&this._hover.containerDomNode.classList.add(...e.additionalClasses),e.position?.forcePosition&&(this._forcePosition=!0),e.trapFocus&&(this._enableFocusTraps=!0);const r=e.appearance?.maxHeightRatio;r!==void 0&&r>0&&r<=1&&(this._maxHeightRatioRelativeToWindow=r),this._hoverPosition=e.position?.hoverPosition===void 0?3:l.isNumber(e.position.hoverPosition)?e.position.hoverPosition:2,this.onmousedown(this._hover.containerDomNode,f=>f.stopPropagation()),this.onkeydown(this._hover.containerDomNode,f=>{f.equals(9)&&this.dispose()}),this._register(R(this._targetWindow,"blur",()=>this.dispose()));const a=As("div.hover-row.markdown-hover"),c=As("div.hover-contents");if(typeof e.content=="string")c.textContent=e.content,c.style.whiteSpace="pre-wrap";else if(Ve(e.content)){c.appendChild(e.content),c.classList.add("html-hover-contents");const f=new ResizeObserver(()=>{this.layout(),this._onRequestLayout.fire()});f.observe(c),this._register(l.toDisposable(()=>f.disconnect()))}else{const f=e.content,{element:g}=this._register(this._markdownRenderer.render(f,{actionHandler:this._linkHandler,asyncRenderCallback:()=>{c.classList.add("code-hover-contents"),this.layout(),this._onRequestLayout.fire()}}));c.appendChild(g)}if(a.appendChild(c),this._hover.contentsDomNode.appendChild(a),e.actions&&e.actions.length>0){const f=As("div.hover-row.status-bar"),g=As("div.actions");e.actions.forEach(m=>{const p=this._keybindingService.lookupKeybinding(m.commandId),b=p?p.getLabel():null;this._register(Qm.render(g,{label:m.label,commandId:m.commandId,run:v=>{m.run(v),this.dispose()},iconClass:m.iconClass},b))}),f.appendChild(g),this._hover.containerDomNode.appendChild(f)}this._hoverContainer=As("div.workbench-hover-container"),this._hoverPointer&&this._hoverContainer.appendChild(this._hoverPointer),this._hoverContainer.appendChild(this._hover.containerDomNode);let h;if(e.actions&&e.actions.length>0?h=!1:e.persistence?.hideOnHover===void 0?h=typeof e.content=="string"||Do(e.content)&&!e.content.value.includes("](")&&!e.content.value.includes(""):h=e.persistence.hideOnHover,e.appearance?.showHoverHint){const f=As("div.hover-row.status-bar"),g=As("div.info");g.textContent=l.localize(1761,"Hold {0} key to mouse over",l.isMacintosh?"Option":"Alt"),f.appendChild(g),this._hover.containerDomNode.appendChild(f)}const d=[...this._target.targetElements];h||d.push(this._hoverContainer);const u=this._mouseTracker=this._register(new pR(d));if(this._register(u.onMouseOut(()=>{this._isLocked||this.dispose()})),h){const f=[...this._target.targetElements,this._hoverContainer];this._lockMouseTracker=this._register(new pR(f)),this._register(this._lockMouseTracker.onMouseOut(()=>{this._isLocked||this.dispose()}))}else this._lockMouseTracker=u}addFocusTrap(){if(!this._enableFocusTraps||this._addedFocusTrap)return;this._addedFocusTrap=!0;const e=this._hover.containerDomNode,t=this.findLastFocusableChild(this._hover.containerDomNode);if(t){const i=Xf(this._hoverContainer,As("div")),n=K(this._hoverContainer,As("div"));i.tabIndex=0,n.tabIndex=0,this._register(R(n,"focus",s=>{e.focus(),s.preventDefault()})),this._register(R(i,"focus",s=>{t.focus(),s.preventDefault()}))}}findLastFocusableChild(e){if(e.hasChildNodes())for(let t=0;t=0)return s}const n=this.findLastFocusableChild(i);if(n)return n}}render(e){e.appendChild(this._hoverContainer);const i=this._hoverContainer.contains(this._hoverContainer.ownerDocument.activeElement)&&oN(this._configurationService.getValue("accessibility.verbosity.hover")===!0&&this._accessibilityService.isScreenReaderOptimized(),this._keybindingService.lookupKeybinding("editor.action.accessibleView")?.getAriaLabel());i&&yd(i),this.layout(),this.addFocusTrap()}layout(){this._mouseTracker?.suppressPendingMouseOut(),this._lockMouseTracker!==this._mouseTracker&&this._lockMouseTracker?.suppressPendingMouseOut(),this._hover.containerDomNode.classList.remove("right-aligned"),this._hover.contentsDomNode.style.maxHeight="";const e=d=>{const u=ax(d),f=d.getBoundingClientRect();return{top:f.top*u,bottom:f.bottom*u,right:f.right*u,left:f.left*u}},t=this._target.targetElements.map(d=>e(d)),{top:i,right:n,bottom:s,left:r}=t[0],a=n-r,c=s-i,h={top:i,right:n,bottom:s,left:r,width:a,height:c,center:{x:r+a/2,y:i+c/2}};if(this.adjustHorizontalHoverPosition(h),this.adjustVerticalHoverPosition(h),this.adjustHoverMaxHeight(h),this._hoverContainer.style.padding="",this._hoverContainer.style.margin="",this._hoverPointer){switch(this._hoverPosition){case 1:h.left+=3,h.right+=3,this._hoverContainer.style.paddingLeft="3px",this._hoverContainer.style.marginLeft="-3px";break;case 0:h.left-=3,h.right-=3,this._hoverContainer.style.paddingRight="3px",this._hoverContainer.style.marginRight="-3px";break;case 2:h.top+=3,h.bottom+=3,this._hoverContainer.style.paddingTop="3px",this._hoverContainer.style.marginTop="-3px";break;case 3:h.top-=3,h.bottom-=3,this._hoverContainer.style.paddingBottom="3px",this._hoverContainer.style.marginBottom="-3px";break}h.center.x=h.left+a/2,h.center.y=h.top+c/2}this.computeXCordinate(h),this.computeYCordinate(h),this._hoverPointer&&(this._hoverPointer.classList.remove("top"),this._hoverPointer.classList.remove("left"),this._hoverPointer.classList.remove("right"),this._hoverPointer.classList.remove("bottom"),this.setHoverPointerPosition(h)),this._hover.onContentsChanged()}computeXCordinate(e){const t=this._hover.containerDomNode.clientWidth+2;this._target.x!==void 0?this._x=this._target.x:this._hoverPosition===1?this._x=e.right:this._hoverPosition===0?this._x=e.left-t:(this._hoverPointer?this._x=e.center.x-this._hover.containerDomNode.clientWidth/2:this._x=e.left,this._x+t>=this._targetDocumentElement.clientWidth&&(this._hover.containerDomNode.classList.add("right-aligned"),this._x=Math.max(this._targetDocumentElement.clientWidth-t-2,this._targetDocumentElement.clientLeft))),this._xthis._targetWindow.innerHeight&&(this._y=e.bottom)}adjustHorizontalHoverPosition(e){if(this._target.x!==void 0)return;const t=this._hoverPointer?3:0;if(this._forcePosition){const i=t+2;this._hoverPosition===1?this._hover.containerDomNode.style.maxWidth=`${this._targetDocumentElement.clientWidth-e.right-i}px`:this._hoverPosition===0&&(this._hover.containerDomNode.style.maxWidth=`${e.left-i}px`);return}this._hoverPosition===1?this._targetDocumentElement.clientWidth-e.right=this._hover.containerDomNode.clientWidth+t?this._hoverPosition=0:this._hoverPosition=2):this._hoverPosition===0&&(e.left=this._hover.containerDomNode.clientWidth+t?this._hoverPosition=1:this._hoverPosition=2),e.left-this._hover.containerDomNode.clientWidth-t<=this._targetDocumentElement.clientLeft&&(this._hoverPosition=1))}adjustVerticalHoverPosition(e){if(this._target.y!==void 0||this._forcePosition)return;const t=this._hoverPointer?3:0;this._hoverPosition===3?e.top-this._hover.containerDomNode.clientHeight-t<0&&(this._hoverPosition=2):this._hoverPosition===2&&e.bottom+this._hover.containerDomNode.offsetHeight+t>this._targetWindow.innerHeight&&(this._hoverPosition=3)}adjustHoverMaxHeight(e){let t=this._targetWindow.innerHeight*this._maxHeightRatioRelativeToWindow;if(this._forcePosition){const i=(this._hoverPointer?3:0)+2;this._hoverPosition===3?t=Math.min(t,e.top-i):this._hoverPosition===2&&(t=Math.min(t,this._targetWindow.innerHeight-e.bottom-i))}if(this._hover.containerDomNode.style.maxHeight=`${t}px`,this._hover.contentsDomNode.clientHeighte.height?this._hoverPointer.style.top=`${e.center.y-(this._y-t)-3}px`:this._hoverPointer.style.top=`${Math.round(t/2)-3}px`;break}case 3:case 2:{this._hoverPointer.classList.add(this._hoverPosition===3?"bottom":"top");const t=this._hover.containerDomNode.clientWidth;let i=Math.round(t/2)-3;const n=this._x+i;(ne.right)&&(i=e.center.x-this._x-3),this._hoverPointer.style.left=`${i}px`;break}}}focus(){this._hover.containerDomNode.focus()}dispose(){this._isDisposed||(this._onDispose.fire(),this._target.dispose?.(),this._hoverContainer.remove(),this._messageListeners.dispose(),super.dispose()),this._isDisposed=!0}};XS=d7([up(1,xt),up(2,Ge),up(3,Pu),up(4,Ui)],XS);class pR extends Wn{get onMouseOut(){return this._onMouseOut.event}get isMouseIn(){return this._isMouseIn}constructor(e,t=200){super(),this._elements=e,this._eventDebounceDelay=t,this._isMouseIn=!0,this._suppressNextMouseOut=!1,this._mouseTimer=this._register(new l.MutableDisposable),this._onMouseOut=this._register(new l.Emitter);for(const i of this._elements)this.onmouseover(i,()=>this._onTargetMouseOver()),this.onmouseleave(i,()=>this._onTargetMouseLeave())}_onTargetMouseOver(){this._isMouseIn=!0,this._suppressNextMouseOut=!1,this._mouseTimer.clear()}_onTargetMouseLeave(){this._isMouseIn=!1,this._mouseTimer.value=new l.TimeoutTimer(()=>this._fireIfMouseOutside(),this._eventDebounceDelay)}_fireIfMouseOutside(){!this._isMouseIn&&!this._suppressNextMouseOut&&this._onMouseOut.fire()}suppressPendingMouseOut(){this._isMouseIn||(this._suppressNextMouseOut=!0)}addElement(e){if(this._elements.includes(e))return l.Disposable.None;this._elements.push(e);const t=new l.DisposableStore;return t.add(R(e,F.MOUSE_OVER,()=>this._onTargetMouseOver())),t.add(R(e,F.MOUSE_LEAVE,()=>this._onTargetMouseLeave())),t.add(l.toDisposable(()=>{const i=this._elements.indexOf(e);i>=0&&this._elements.splice(i,1)})),t}}class u7{constructor(e){this._element=e,this.targetElements=[this._element]}dispose(){}}var ii;(function(o){function e(s,r){if(s.start>=r.end||r.start>=s.end)return{start:0,end:0};const a=Math.max(s.start,r.start),c=Math.min(s.end,r.end);return c-a<=0?{start:0,end:0}:{start:a,end:c}}o.intersect=e;function t(s){return s.end-s.start<=0}o.isEmpty=t;function i(s,r){return!t(e(s,r))}o.intersects=i;function n(s,r){const a=[],c={start:s.start,end:Math.min(r.start,s.end)},h={start:Math.max(r.end,s.start),end:s.end};return t(c)||a.push(c),t(h)||a.push(h),a}o.relativeComplement=n})(ii||(ii={}));var Sr;(function(o){o[o.AVOID=0]="AVOID",o[o.ALIGN=1]="ALIGN"})(Sr||(Sr={}));function jc(o,e,t){const i=t.mode===Sr.ALIGN?t.offset:t.offset+t.size,n=t.mode===Sr.ALIGN?t.offset+t.size:t.offset;return t.position===0?e<=o-i?{position:i,result:"ok"}:e<=n?{position:n-e,result:"flipped"}:{position:Math.max(o-e,0),result:"overlap"}:e<=n?{position:n-e,result:"ok"}:e<=o-i&&nthis.setContainer(null,1)))}setContainer(e,t){this.useFixedPosition=t!==1;const i=this.useShadowDOM;if(this.useShadowDOM=t===3,!(e===this.container&&i===this.useShadowDOM)&&(this.container&&(this.toDisposeOnSetContainer.dispose(),this.view.remove(),this.shadowRoot&&(this.shadowRoot=null,this.shadowRootHostElement?.remove(),this.shadowRootHostElement=null),this.container=null),e)){if(this.container=e,this.useShadowDOM){this.shadowRootHostElement=Q(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const s=document.createElement("style");s.textContent=g7,this.shadowRoot.appendChild(s),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(Q("slot"))}else this.container.appendChild(this.view);const n=new l.DisposableStore;Ph.BUBBLE_UP_EVENTS.forEach(s=>{n.add(At(this.container,s,r=>{this.onDOMEvent(r,!1)}))}),Ph.BUBBLE_DOWN_EVENTS.forEach(s=>{n.add(At(this.container,s,r=>{this.onDOMEvent(r,!0)},!0))}),this.toDisposeOnSetContainer=n}}show(e){this.isVisible()&&this.hide(),On(this.view),this.view.className="context-view monaco-component",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex=`${2575+(e.layer??0)}`,this.view.style.position=this.useFixedPosition?"fixed":"absolute",Jf(this.view),this.toDisposeOnClean=e.render(this.view)||l.Disposable.None,this.delegate=e,this.doLayout(),this.delegate.focus?.()}getViewElement(){return this.view}layout(){if(this.isVisible()){if(this.delegate.canRelayout===!1&&!(l.isIOS&&qh.pointerEvents)){this.hide();return}this.delegate?.layout?.(),this.doLayout()}}doLayout(){if(!this.isVisible())return;const e=JS(this.delegate.getAnchor()),t=this.container?j(this.container):Le(),i={top:t.pageYOffset,left:t.pageXOffset,width:t.innerWidth,height:t.innerHeight},n={width:jf(this.view),height:qf(this.view)},s=this.delegate.anchorPosition,r=this.delegate.anchorAlignment,a=this.delegate.anchorAxisAlignment,{top:c,left:h}=_R(i,n,e,{anchorAlignment:r,anchorPosition:s,anchorAxisAlignment:a});this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(s===0?"bottom":"top"),this.view.classList.add(r===0?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const d=Qi(this.container),u=this.container.scrollTop||0,f=this.container.scrollLeft||0;this.view.style.top=`${c-(this.useFixedPosition?Qi(this.view).top:d.top)+u}px`,this.view.style.left=`${h-(this.useFixedPosition?Qi(this.view).left:d.left)+f}px`,this.view.style.width="initial"}hide(e){const t=this.delegate;this.delegate=null,t?.onHide&&t.onHide(e);const i=this.toDisposeOnClean;this.toDisposeOnClean=l.Disposable.None,i.dispose(),Wf(this.view)}isVisible(){return!!this.delegate}onDOMEvent(e,t){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,j(e).document.activeElement):t&&!ut(e.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}};Ph.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],Ph.BUBBLE_DOWN_EVENTS=["click"];let fp=Ph;const g7=` + :host { + all: initial; /* 1st rule so subsequent properties are reset. */ + } + + .codicon[class*='codicon-'] { + font: normal normal normal 16px/1 codicon; + display: inline-block; + text-decoration: none; + text-rendering: auto; + text-align: center; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + user-select: none; + -webkit-user-select: none; + -ms-user-select: none; + } + + :host { + font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif; + } + + :host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; } + :host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; } + :host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; } + :host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; } + :host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Nanum Gothic", "AppleGothic", sans-serif; } + + :host-context(.windows) { font-family: "Segoe WPC", "Segoe UI", sans-serif; } + :host-context(.windows:lang(zh-Hans)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; } + :host-context(.windows:lang(zh-Hant)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; } + :host-context(.windows:lang(ja)) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; } + :host-context(.windows:lang(ko)) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; } + + :host-context(.linux) { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; } + :host-context(.linux:lang(zh-Hans)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; } + :host-context(.linux:lang(zh-Hant)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif; } + :host-context(.linux:lang(ja)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif; } + :host-context(.linux:lang(ko)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif; } +`,Os=le("layoutService");function bR(o){const e=o;return typeof e=="object"&&"markdown"in e&&"markdownNotSupportedFallback"in e}class m7{constructor(e,t,i){this.hoverDelegate=e,this.target=t,this.fadeInAnimation=i}async update(e,t,i){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let n;if(l.isString(e)||Ve(e)||e===void 0)n=e;else{this._cancellationTokenSource=new l.CancellationTokenSource;const s=this._cancellationTokenSource.token;let r;if(bR(e)?l.isFunction(e.markdown)?r=e.markdown(s).then(a=>a??e.markdownNotSupportedFallback):r=e.markdown??e.markdownNotSupportedFallback:r=e.element(s),r instanceof Promise?(this._hoverWidget||this.show(l.localize(1762,"Loading..."),t,i),n=await r):n=r,this.isDisposed||s.isCancellationRequested)return}this.show(n,t,i)}show(e,t,i){const n=this._hoverWidget;if(this.hasContent(e)){const s={content:e,target:this.target,actions:i?.actions,linkHandler:i?.linkHandler,trapFocus:i?.trapFocus,appearance:{showPointer:this.hoverDelegate.placement==="element",skipFadeInAnimation:!this.fadeInAnimation||!!n,showHoverHint:i?.appearance?.showHoverHint},position:{hoverPosition:2}};this._hoverWidget=this.hoverDelegate.showHover(s,t)}n?.dispose()}hasContent(e){return e?Do(e)?!!e.value:!0:!1}get isDisposed(){return this._hoverWidget?.isDisposed}dispose(){this._hoverWidget?.dispose(),this._cancellationTokenSource?.dispose(!0),this._cancellationTokenSource=void 0}}var p7=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},qc=function(o,e){return function(t,i){e(t,i,o)}};const _7=3;let WS=class extends l.Disposable{get _currentHover(){return this._hoverStack.at(-1)?.hover}get _currentHoverOptions(){return this._hoverStack.at(-1)?.options}_getContainingHoverIndex(e){const t=Ve(e)?[e]:e.targetElements;for(let i=this._hoverStack.length-1;i>=0;i--)for(const n of t)if(ut(n,this._hoverStack[i].hover.domNode))return i;return-1}constructor(e,t,i,n,s,r){super(),this._instantiationService=e,this._configurationService=t,this._keybindingService=n,this._layoutService=s,this._accessibilityService=r,this._hoverStack=[],this._currentDelayedHoverWasShown=!1,this._delayedHovers=new Map,this._managedHovers=new Map,this._register(i.onDidShowContextMenu(()=>this.hideHover())),this._register(Zn.registerCommandAndKeybindingRule({id:"workbench.action.showHover",weight:0,primary:l.KeyChord(2089,2087),handler:()=>{this._showAndFocusHoverForActiveElement()}}))}showInstantHover(e,t,i,n){const s=this._createHover(e,i);if(s)return this._showHover(s,e,t),s.hover}showDelayedHover(e,t){if(e.id===void 0&&(e.id=CR(e.content)),!this._currentDelayedHover||this._currentDelayedHoverWasShown){if(this._currentHover?.isLocked&&this._getContainingHoverIndex(e.target)<0)return;if(Yc(this._currentHoverOptions)===Yc(e))return this._currentHover;if(this._currentHover&&!this._currentHover.isDisposed&&this._currentDelayedHoverGroupId!==void 0&&this._currentDelayedHoverGroupId===t?.groupId)return this.showInstantHover({...e,appearance:{...e.appearance,skipFadeInAnimation:!0}})}else if(this._currentDelayedHover&&Yc(this._currentHoverOptions)===Yc(e))return this._currentDelayedHover;const i=this._createHover(e,void 0);if(!i){this._currentDelayedHover=void 0,this._currentDelayedHoverWasShown=!1,this._currentDelayedHoverGroupId=void 0;return}this._currentDelayedHover=i.hover,this._currentDelayedHoverWasShown=!1,this._currentDelayedHoverGroupId=t?.groupId;const n=t?.reducedDelay?this._configurationService.getValue("workbench.hover.reducedDelay"):this._configurationService.getValue("workbench.hover.delay");return l.timeout(n).then(()=>{i.hover&&!i.hover.isDisposed&&(this._currentDelayedHoverWasShown=!0,this._showHover(i,e))}),i.hover}setupDelayedHover(e,t,i){const n=s=>{const r={...typeof t=="function"?t():t,target:e};return r.style===2&&s&&(r.target=wR(e,s)),r};return this._setupDelayedHover(e,n,i)}setupDelayedHoverAtMouse(e,t,i){const n=s=>({...typeof t=="function"?t():t,target:s?wR(e,s):e});return this._setupDelayedHover(e,n,i)}_setupDelayedHover(e,t,i){const n=new l.DisposableStore;return n.add(R(e,F.MOUSE_OVER,s=>{this.showDelayedHover(t(s),{groupId:i?.groupId,reducedDelay:i?.reducedDelay})})),i?.setupKeyboardEvents&&n.add(R(e,F.KEY_DOWN,s=>{const r=new Be(s);(r.equals(10)||r.equals(3))&&this.showInstantHover(t(),!0)})),this._delayedHovers.set(e,{show:s=>{this.showInstantHover(t(),s)}}),n.add(l.toDisposable(()=>this._delayedHovers.delete(e))),n}_createHover(e,t){if(this._currentDelayedHover?.dispose(),this._currentDelayedHover=void 0,e.content==="")return;if(e.id===void 0&&(e.id=CR(e.content)),this._getContainingHoverIndex(e.target)>=0){if(this._hoverStack.length>=_7)return}else if(this._currentHover?.isLocked||Yc(this._currentHoverOptions)===Yc(e))return;this._lastHoverOptions=e;const s=e.trapFocus||this._accessibilityService.isScreenReaderOptimized(),r=wt();let a;t||s&&r&&(r.classList.contains("monaco-hover")||(a=r));const c=new l.DisposableStore,h=this._instantiationService.createInstance(XS,e);if(e.persistence?.sticky&&(h.isLocked=!0),e.position?.hoverPosition&&!l.isNumber(e.position.hoverPosition)&&(e.target={targetElements:Ve(e.target)?[e.target]:e.target.targetElements,x:e.position.hoverPosition.x+10}),h.onDispose(()=>{const d=this._hoverStack.findIndex(u=>u.hover===h);if(d>=0){const u=this._hoverStack[d];for(Zf(h.domNode)&&u.lastFocusedElementBeforeOpen&&u.lastFocusedElementBeforeOpen.focus();this._hoverStack.length>d+1;){const g=this._hoverStack.pop();g.contextView.dispose(),g.hover.dispose()}this._hoverStack.splice(d,1),u.contextView.dispose()}c.dispose()},void 0,c),!e.container){const d=Ve(e.target)?e.target:e.target.targetElements[0];e.container=this._layoutService.getContainer(j(d))}if(c.add(R(j(e.container).document,F.MOUSE_DOWN,d=>{ut(d.target,h.domNode)||this._hideHoverAndDescendants(h)})),!e.persistence?.sticky){if("targetElements"in e.target)for(const u of e.target.targetElements)c.add(R(u,F.CLICK,()=>this._hideHoverAndDescendants(h)));else c.add(R(e.target,F.CLICK,()=>this._hideHoverAndDescendants(h)));const d=wt();if(d){const u=j(d).document;c.add(R(d,F.KEY_DOWN,f=>this._keyDown(f,h,!!e.persistence?.hideOnKeyDown))),c.add(R(u,F.KEY_DOWN,f=>this._keyDown(f,h,!!e.persistence?.hideOnKeyDown))),c.add(R(d,F.KEY_UP,f=>this._keyUp(f,h))),c.add(R(u,F.KEY_UP,f=>this._keyUp(f,h)))}}if("IntersectionObserver"in Ae){const d=new IntersectionObserver(f=>this._intersectionChange(f,h),{threshold:0}),u="targetElements"in e.target?e.target.targetElements[0]:e.target;d.observe(u),c.add(l.toDisposable(()=>d.disconnect()))}return{hover:h,lastFocusedElementBeforeOpen:a,store:c}}_showHover(e,t,i){const{hover:n,lastFocusedElementBeforeOpen:s,store:r}=e,a=this._getContainingHoverIndex(t.target),c=a>=0;if(!c)this._hideAllHovers();else{for(let g=this._hoverStack.length-1;g>a;g--)this._hoverStack[g].hover.dispose();this._hoverStack.length=a+1}if(c)for(let g=0;g<=a;g++)r.add(this._hoverStack[g].hover.addMouseTrackingElement(n.domNode));const h=t.container??this._layoutService.getContainer(j(Ve(t.target)?t.target:t.target.targetElements[0])),d=new fp(h,1),u={hover:n,options:t,contextView:d,lastFocusedElementBeforeOpen:s};this._hoverStack.push(u);const f=new C7(n,i,this._hoverStack.length);if(d.show(f),r.add(n.onRequestLayout(()=>d.layout())),i||t.persistence?.sticky){const g=j(h);r.add(R(g,F.RESIZE,()=>d.layout()))}if(t.onDidHide){const g=t.onDidHide;r.add(l.toDisposable(()=>g()))}t.onDidShow?.()}_hideHoverAndDescendants(e){const t=this._hoverStack.findIndex(i=>i.hover===e);if(!(t<0)){for(let i=this._hoverStack.length-1;i>=t;i--)this._hoverStack[i].hover.dispose();this._hoverStack.length=t}}_hideAllHovers(){for(let e=this._hoverStack.length-1;e>=0;e--)this._hoverStack[e].hover.dispose();this._hoverStack.length=0}hideHover(e){this._hoverStack.length!==0&&(!e&&this._currentHover?.isLocked||this.doHideHover())}doHideHover(){const e=this._hoverStack.length;this._hoverStack[e-1]?.hover.dispose(),this._hoverStack.length=e-1}_intersectionChange(e,t){e[e.length-1].isIntersecting||t.dispose()}showAndFocusLastHover(){this._lastHoverOptions&&this.showInstantHover(this._lastHoverOptions,!0,!0)}_showAndFocusHoverForActiveElement(){let e=wt();for(;e;){const t=this._delayedHovers.get(e)??this._managedHovers.get(e);if(t){t.show(!0);return}e=e.parentElement}}_keyDown(e,t,i){if(e.key==="Alt"){for(const r of this._hoverStack)r.hover.isLocked=!0;return}const n=new Be(e);if(!(this._keybindingService.resolveKeyboardEvent(n).getSingleModifierDispatchChords().some(r=>!!r)||this._keybindingService.softDispatch(n,n.target).kind!==0)&&i&&(!this._currentHoverOptions?.trapFocus||e.key!=="Tab")){const r=this._hoverStack.find(a=>a.hover===t);this._hideHoverAndDescendants(t),r?.lastFocusedElementBeforeOpen?.focus()}}_keyUp(e,t){if(e.key==="Alt"){for(const n of this._hoverStack)n.options.persistence?.sticky||(n.hover.isLocked=!1);if(!this._hoverStack.some(n=>n.hover.isMouseIn)){const n=this._hoverStack[this._hoverStack.length-1];this._hideAllHovers(),n?.lastFocusedElementBeforeOpen?.focus()}}}setupManagedHover(e,t,i,n){if(e.showNativeHover)return b7(t,i);t.setAttribute("custom-hover","true"),t.title!==""&&(console.warn("HTML element already has a title attribute, which will conflict with the custom hover. Please remove the title attribute."),t.title="");let s,r;const a=(g,m)=>{const p=r!==void 0;g&&(r?.dispose(),r=void 0),m&&(s?.dispose(),s=void 0),p&&(e.onDidHideHover?.(),r=void 0)},c=(g,m,p,b)=>new l.TimeoutTimer(async()=>{(!r||r.isDisposed)&&(r=new m7(e,p||t,g>0),await r.update(typeof i=="function"?i():i,m,{...n,trapFocus:b}))},g),h=new l.DisposableStore;let d=!1;h.add(R(t,F.MOUSE_DOWN,()=>{d=!0,a(!0,!0)},!0)),h.add(R(t,F.MOUSE_UP,()=>{d=!1},!0)),h.add(R(t,F.MOUSE_LEAVE,g=>{d=!1,a(!1,g.fromElement===t)},!0)),h.add(R(t,F.MOUSE_OVER,g=>{if(s)return;const m=new l.DisposableStore,p={targetElements:[t],dispose:()=>{}};if(e.placement===void 0||e.placement==="mouse"){const b=v=>{p.x=v.x+10,HS(v,t)||a(!0,!0)};m.add(R(t,F.MOUSE_MOVE,b,!0))}s=m,HS(g,t)&&m.add(c(typeof e.delay=="function"?e.delay(i):e.delay,!1,p))},!0));const u=g=>{if(d||s||(r?.isDisposed&&(r=void 0),Ve(g.relatedTarget)&&g.relatedTarget.closest(".monaco-hover")||!g.relatedTarget)||!HS(g,t))return;const p={targetElements:[t],dispose:()=>{}},b=new l.DisposableStore,v=()=>a(!0,!0);b.add(R(t,F.BLUR,v,!0)),b.add(c(typeof e.delay=="function"?e.delay(i):e.delay,!1,p)),s=b};jn(t)||h.add(R(t,F.FOCUS,u,!0));const f={show:g=>{a(!1,!0),c(0,g,void 0,g)},hide:()=>{a(!0,!0)},update:async(g,m)=>{i=g,await r?.update(i,void 0,m)},dispose:()=>{this._managedHovers.delete(t),h.dispose(),a(!0,!0)}};return this._managedHovers.set(t,f),f}showManagedHover(e){const t=this._managedHovers.get(e);t&&t.show(!0)}dispose(){this._managedHovers.forEach(e=>e.dispose()),super.dispose()}};WS=p7([qc(0,me),qc(1,Ge),qc(2,nn),qc(3,xt),qc(4,Os),qc(5,Ui)],WS);function Yc(o){if(o!==void 0)return o?.id??o}function CR(o){if(!Ve(o))return typeof o=="string"?o.toString():o.value}function vR(o){const e=typeof o=="function"?o():o;if(l.isString(e))return sp(e);if(bR(e))return e.markdownNotSupportedFallback}function b7(o,e){function t(i){i?o.setAttribute("title",i):o.removeAttribute("title")}return t(vR(e)),{update:i=>t(vR(i)),show:()=>{},hide:()=>{},dispose:()=>t(void 0)}}class C7{get anchorPosition(){return this._hover.anchor}constructor(e,t=!1,i=1){this._hover=e,this._focus=t,this.layer=i}render(e){return this._hover.render(e),this._focus&&this._hover.focus(),this._hover}getAnchor(){return{x:this._hover.x,y:this._hover.y}}layout(){this._hover.layout()}}function HS(o,e){return Ve(o.target)&&v7(o.target,e)===e}function v7(o,e){for(e=e??j(o).document.body;!o.hasAttribute("custom-hover")&&o!==e;)o=o.parentElement;return o}function wR(o,e){return{targetElements:[o],x:e.x+10}}fe(kc,WS,1),vs((o,e)=>{const t=o.getColor(FE);t&&(e.addRule(`.monaco-hover.workbench-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-hover.workbench-hover hr { border-top: 1px solid ${t.transparent(.5)}; }`))});const ey=le("dialogService");var w7=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},SR=function(o,e){return function(t,i){e(t,i,o)}};function gp(o){return o.scheme===l.Schemas.file?o.fsPath:o.path}let yR=0;class mp{constructor(e,t,i,n,s,r,a){this.id=++yR,this.type=0,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabel=t,this.strResource=i,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=n,this.groupOrder=s,this.sourceId=r,this.sourceOrder=a,this.isValid=!0}setValid(e){this.isValid=e}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.isValid?" VALID":"INVALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class LR{constructor(e,t){this.resourceLabel=e,this.reason=t}}class DR{constructor(){this.elements=new Map}createMessage(){const e=[],t=[];for(const[,n]of this.elements)(n.reason===0?e:t).push(n.resourceLabel);const i=[];return e.length>0&&i.push(l.localize(2099,"The following files have been closed and modified on disk: {0}.",e.join(", "))),t.length>0&&i.push(l.localize(2100,"The following files have been modified in an incompatible way: {0}.",t.join(", "))),i.join(` +`)}get size(){return this.elements.size}has(e){return this.elements.has(e)}set(e,t){this.elements.set(e,t)}delete(e){return this.elements.delete(e)}}class S7{constructor(e,t,i,n,s,r,a){this.id=++yR,this.type=1,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabels=t,this.strResources=i,this.groupId=n,this.groupOrder=s,this.sourceId=r,this.sourceOrder=a,this.removedResources=null,this.invalidatedResources=null}canSplit(){return typeof this.actual.split=="function"}removeResource(e,t,i){this.removedResources||(this.removedResources=new DR),this.removedResources.has(t)||this.removedResources.set(t,new LR(e,i))}setValid(e,t,i){i?this.invalidatedResources&&(this.invalidatedResources.delete(t),this.invalidatedResources.size===0&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new DR),this.invalidatedResources.has(t)||this.invalidatedResources.set(t,new LR(e,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class xR{constructor(e,t){this.resourceLabel=e,this.strResource=t,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(const e of this._past)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,0);for(const e of this._future)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){const e=[];e.push(`* ${this.strResource}:`);for(let t=0;t=0;t--)e.push(` * [REDO] ${this._future[t]}`);return e.join(` +`)}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(e,t){e.type===1?e.setValid(this.resourceLabel,this.strResource,t):e.setValid(t)}setElementsValidFlag(e,t){for(const i of this._past)t(i.actual)&&this._setElementValidFlag(i,e);for(const i of this._future)t(i.actual)&&this._setElementValidFlag(i,e)}pushElement(e){for(const t of this._future)t.type===1&&t.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(e),this.versionId++}createSnapshot(e){const t=[];for(let i=0,n=this._past.length;i=0;i--)t.push(this._future[i].id);return new KT(e,t)}restoreSnapshot(e){const t=e.elements.length;let i=!0,n=0,s=-1;for(let a=0,c=this._past.length;a=t||h.id!==e.elements[n])&&(i=!1,s=a),!i&&h.type===1&&h.removeResource(this.resourceLabel,this.strResource,0)}let r=-1;for(let a=this._future.length-1;a>=0;a--,n++){const c=this._future[a];i&&(n>=t||c.id!==e.elements[n])&&(i=!1,r=a),!i&&c.type===1&&c.removeResource(this.resourceLabel,this.strResource,0)}s!==-1&&(this._past=this._past.slice(0,s)),r!==-1&&(this._future=this._future.slice(r+1)),this.versionId++}getElements(){const e=[],t=[];for(const i of this._past)e.push(i.actual);for(const i of this._future)t.push(i.actual);return{past:e,future:t}}getClosestPastElement(){return this._past.length===0?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return this._future.length===0?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(e,t){for(let i=this._past.length-1;i>=0;i--)if(this._past[i]===e){t.has(this.strResource)?this._past[i]=t.get(this.strResource):this._past.splice(i,1);break}this.versionId++}splitFutureWorkspaceElement(e,t){for(let i=this._future.length-1;i>=0;i--)if(this._future[i]===e){t.has(this.strResource)?this._future[i]=t.get(this.strResource):this._future.splice(i,1);break}this.versionId++}moveBackward(e){this._past.pop(),this._future.push(e),this.versionId++}moveForward(e){this._future.pop(),this._past.push(e),this.versionId++}}class ty{constructor(e){this.editStacks=e,this._versionIds=[];for(let t=0,i=this.editStacks.length;tt.sourceOrder)&&(t=r,i=n)}return[t,i]}canUndo(e){if(e instanceof Ma){const[,i]=this._findClosestUndoElementWithSource(e.id);return!!i}const t=this.getUriComparisonKey(e);return this._editStacks.has(t)?this._editStacks.get(t).hasPastElements():!1}_onError(e,t){l.onUnexpectedError(e);for(const i of t.strResources)this.removeElements(i);this._notificationService.error(e)}_acquireLocks(e){for(const t of e.editStacks)if(t.locked)throw new Error("Cannot acquire edit stack lock");for(const t of e.editStacks)t.locked=!0;return()=>{for(const t of e.editStacks)t.locked=!1}}_safeInvokeWithLocks(e,t,i,n,s){const r=this._acquireLocks(i);let a;try{a=t()}catch(c){return r(),n.dispose(),this._onError(c,e)}return a?a.then(()=>(r(),n.dispose(),s()),c=>(r(),n.dispose(),this._onError(c,e))):(r(),n.dispose(),s())}async _invokeWorkspacePrepare(e){if(typeof e.actual.prepareUndoRedo>"u")return l.Disposable.None;const t=e.actual.prepareUndoRedo();return typeof t>"u"?l.Disposable.None:t}_invokeResourcePrepare(e,t){if(e.actual.type!==1||typeof e.actual.prepareUndoRedo>"u")return t(l.Disposable.None);const i=e.actual.prepareUndoRedo();return i?l.isDisposable(i)?t(i):i.then(n=>t(n)):t(l.Disposable.None)}_getAffectedEditStacks(e){const t=[];for(const i of e.strResources)t.push(this._editStacks.get(i)||ER);return new ty(t)}_tryToSplitAndUndo(e,t,i,n){if(t.canSplit())return this._splitPastWorkspaceElement(t,i),this._notificationService.warn(n),new pp(this._undo(e,0,!0));for(const s of t.strResources)this.removeElements(s);return this._notificationService.warn(n),new pp}_checkWorkspaceUndo(e,t,i,n){if(t.removedResources)return this._tryToSplitAndUndo(e,t,t.removedResources,l.localize(2101,"Could not undo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(n&&t.invalidatedResources)return this._tryToSplitAndUndo(e,t,t.invalidatedResources,l.localize(2102,"Could not undo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));const s=[];for(const a of i.editStacks)a.getClosestPastElement()!==t&&s.push(a.resourceLabel);if(s.length>0)return this._tryToSplitAndUndo(e,t,null,l.localize(2103,"Could not undo '{0}' across all files because changes were made to {1}",t.label,s.join(", ")));const r=[];for(const a of i.editStacks)a.locked&&r.push(a.resourceLabel);return r.length>0?this._tryToSplitAndUndo(e,t,null,l.localize(2104,"Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,r.join(", "))):i.isValid()?null:this._tryToSplitAndUndo(e,t,null,l.localize(2105,"Could not undo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceUndo(e,t,i){const n=this._getAffectedEditStacks(t),s=this._checkWorkspaceUndo(e,t,n,!1);return s?s.returnValue:this._confirmAndExecuteWorkspaceUndo(e,t,n,i)}_isPartOfUndoGroup(e){if(!e.groupId)return!1;for(const[,t]of this._editStacks){const i=t.getClosestPastElement();if(i){if(i===e){const n=t.getSecondClosestPastElement();if(n&&n.groupId===e.groupId)return!0}if(i.groupId===e.groupId)return!0}}return!1}async _confirmAndExecuteWorkspaceUndo(e,t,i,n){if(t.canSplit()&&!this._isPartOfUndoGroup(t)){let a;(function(d){d[d.All=0]="All",d[d.This=1]="This",d[d.Cancel=2]="Cancel"})(a||(a={}));const{result:c}=await this._dialogService.prompt({type:rt.Info,message:l.localize(2106,"Would you like to undo '{0}' across all files?",t.label),buttons:[{label:l.localize(2107,"&&Undo in {0} Files",i.editStacks.length),run:()=>a.All},{label:l.localize(2108,"Undo this &&File"),run:()=>a.This}],cancelButton:{run:()=>a.Cancel}});if(c===a.Cancel)return;if(c===a.This)return this._splitPastWorkspaceElement(t,null),this._undo(e,0,!0);const h=this._checkWorkspaceUndo(e,t,i,!1);if(h)return h.returnValue;n=!0}let s;try{s=await this._invokeWorkspacePrepare(t)}catch(a){return this._onError(a,t)}const r=this._checkWorkspaceUndo(e,t,i,!0);if(r)return s.dispose(),r.returnValue;for(const a of i.editStacks)a.moveBackward(t);return this._safeInvokeWithLocks(t,()=>t.actual.undo(),i,s,()=>this._continueUndoInGroup(t.groupId,n))}_resourceUndo(e,t,i){if(!t.isValid){e.flushAllElements();return}if(e.locked){const n=l.localize(2109,"Could not undo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(n);return}return this._invokeResourcePrepare(t,n=>(e.moveBackward(t),this._safeInvokeWithLocks(t,()=>t.actual.undo(),new ty([e]),n,()=>this._continueUndoInGroup(t.groupId,i))))}_findClosestUndoElementInGroup(e){if(!e)return[null,null];let t=null,i=null;for(const[n,s]of this._editStacks){const r=s.getClosestPastElement();r&&r.groupId===e&&(!t||r.groupOrder>t.groupOrder)&&(t=r,i=n)}return[t,i]}_continueUndoInGroup(e,t){if(!e)return;const[,i]=this._findClosestUndoElementInGroup(e);if(i)return this._undo(i,0,t)}undo(e){if(e instanceof Ma){const[,t]=this._findClosestUndoElementWithSource(e.id);return t?this._undo(t,e.id,!1):void 0}return typeof e=="string"?this._undo(e,0,!1):this._undo(this.getUriComparisonKey(e),0,!1)}_undo(e,t=0,i){if(!this._editStacks.has(e))return;const n=this._editStacks.get(e),s=n.getClosestPastElement();if(!s)return;if(s.groupId){const[a,c]=this._findClosestUndoElementInGroup(s.groupId);if(s!==a&&c)return this._undo(c,t,i)}return(s.sourceId!==t||s.confirmBeforeUndo)&&!i?this._confirmAndContinueUndo(e,t,s):s.type===1?this._workspaceUndo(e,s,i):this._resourceUndo(n,s,i)}async _confirmAndContinueUndo(e,t,i){if((await this._dialogService.confirm({message:l.localize(2110,"Would you like to undo '{0}'?",i.label),primaryButton:l.localize(2111,"&&Yes"),cancelButton:l.localize(2112,"No")})).confirmed)return this._undo(e,t,!0)}_findClosestRedoElementWithSource(e){if(!e)return[null,null];let t=null,i=null;for(const[n,s]of this._editStacks){const r=s.getClosestFutureElement();r&&r.sourceId===e&&(!t||r.sourceOrder0)return this._tryToSplitAndRedo(e,t,null,l.localize(2115,"Could not redo '{0}' across all files because changes were made to {1}",t.label,s.join(", ")));const r=[];for(const a of i.editStacks)a.locked&&r.push(a.resourceLabel);return r.length>0?this._tryToSplitAndRedo(e,t,null,l.localize(2116,"Could not redo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,r.join(", "))):i.isValid()?null:this._tryToSplitAndRedo(e,t,null,l.localize(2117,"Could not redo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceRedo(e,t){const i=this._getAffectedEditStacks(t),n=this._checkWorkspaceRedo(e,t,i,!1);return n?n.returnValue:this._executeWorkspaceRedo(e,t,i)}async _executeWorkspaceRedo(e,t,i){let n;try{n=await this._invokeWorkspacePrepare(t)}catch(r){return this._onError(r,t)}const s=this._checkWorkspaceRedo(e,t,i,!0);if(s)return n.dispose(),s.returnValue;for(const r of i.editStacks)r.moveForward(t);return this._safeInvokeWithLocks(t,()=>t.actual.redo(),i,n,()=>this._continueRedoInGroup(t.groupId))}_resourceRedo(e,t){if(!t.isValid){e.flushAllElements();return}if(e.locked){const i=l.localize(2118,"Could not redo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(i);return}return this._invokeResourcePrepare(t,i=>(e.moveForward(t),this._safeInvokeWithLocks(t,()=>t.actual.redo(),new ty([e]),i,()=>this._continueRedoInGroup(t.groupId))))}_findClosestRedoElementInGroup(e){if(!e)return[null,null];let t=null,i=null;for(const[n,s]of this._editStacks){const r=s.getClosestFutureElement();r&&r.groupId===e&&(!t||r.groupOrderthis.onDidChangeItemsExternal(e)))}onDidChangeItemsExternal(e){this._onDidChangeStorage.pause();try{e.changed?.forEach((t,i)=>this.acceptExternal(i,t)),e.deleted?.forEach(t=>this.acceptExternal(t,void 0))}finally{this._onDidChangeStorage.resume()}}acceptExternal(e,t){if(this.state===Za.Closed)return;let i=!1;l.isUndefinedOrNull(t)?i=this.cache.delete(e):this.cache.get(e)!==t&&(this.cache.set(e,t),i=!0),i&&this._onDidChangeStorage.fire({key:e,external:!0})}get(e,t){const i=this.cache.get(e);return l.isUndefinedOrNull(i)?t:i}getBoolean(e,t){const i=this.get(e);return l.isUndefinedOrNull(i)?t:i==="true"}getNumber(e,t){const i=this.get(e);return l.isUndefinedOrNull(i)?t:parseInt(i,10)}async set(e,t,i=!1){if(this.state===Za.Closed)return;if(l.isUndefinedOrNull(t))return this.delete(e,i);const n=l.isObject(t)||Array.isArray(t)?ZG(t):String(t);if(this.cache.get(e)!==n)return this.cache.set(e,n),this.pendingInserts.set(e,n),this.pendingDeletes.delete(e),this._onDidChangeStorage.fire({key:e,external:i}),this.doFlush()}async delete(e,t=!1){if(!(this.state===Za.Closed||!this.cache.delete(e)))return this.pendingDeletes.has(e)||this.pendingDeletes.add(e),this.pendingInserts.delete(e),this._onDidChangeStorage.fire({key:e,external:t}),this.doFlush()}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}async flushPending(){if(!this.hasPending)return;const e={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(e).finally(()=>{if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)this.whenFlushedCallbacks.pop()?.()})}async flush(e){if(!(this.state===Za.Closed||this.pendingClose))return this.doFlush(e)}async doFlush(e){return this.options.hint===Ya.STORAGE_IN_MEMORY?this.flushPending():this.flushDelayer.trigger(()=>this.flushPending(),e)}async whenFlushed(){if(this.hasPending)return new Promise(e=>this.whenFlushedCallbacks.push(e))}};cb.DEFAULT_FLUSH_DELAY=100;let Zc=cb;class _p{constructor(){this.onDidChangeItemsExternal=l.Event.None,this.items=new Map}async updateItems(e){e.insert?.forEach((t,i)=>this.items.set(i,t)),e.delete?.forEach(t=>this.items.delete(t))}}const bp="__$__targetStorageMarker",Qa=le("storageService");_.WillSaveStateReason=void 0,(function(o){o[o.NONE=0]="NONE",o[o.SHUTDOWN=1]="SHUTDOWN"})(_.WillSaveStateReason||(_.WillSaveStateReason={}));function D7(o){const e=o.get(bp);if(e)try{return JSON.parse(e)}catch{}return Object.create(null)}const hb=class hb extends l.Disposable{constructor(e={flushInterval:hb.DEFAULT_FLUSH_INTERVAL}){super(),this._onDidChangeValue=this._register(new l.PauseableEmitter),this._onDidChangeTarget=this._register(new l.PauseableEmitter),this._onWillSaveState=this._register(new l.Emitter),this.onWillSaveState=this._onWillSaveState.event,this.runFlushWhenIdle=this._register(new l.MutableDisposable),this._workspaceKeyTargets=void 0,this._profileKeyTargets=void 0,this._applicationKeyTargets=void 0,this._applicationSharedKeyTargets=void 0,this.flushWhenIdleScheduler=this._register(new l.RunOnceScheduler(()=>this.doFlushWhenIdle(),e.flushInterval))}onDidChangeValue(e,t,i){return l.Event.filter(this._onDidChangeValue.event,n=>n.scope===e&&(t===void 0||n.key===t),i)}doFlushWhenIdle(){this.runFlushWhenIdle.value=l.runWhenGlobalIdle(()=>{this.shouldFlushWhenIdle()&&this.flush(),this.flushWhenIdleScheduler.schedule()})}shouldFlushWhenIdle(){return!0}emitDidChangeValue(e,t){const{key:i,external:n}=t;if(i===bp){switch(e){case-2:this._applicationSharedKeyTargets=void 0;break;case-1:this._applicationKeyTargets=void 0;break;case 0:this._profileKeyTargets=void 0;break;case 1:this._workspaceKeyTargets=void 0;break}this._onDidChangeTarget.fire({scope:e})}else this._onDidChangeValue.fire({scope:e,key:i,target:this.getKeyTargets(e)[i],external:n})}get(e,t,i){return this.getStorage(t)?.get(e,i)}getBoolean(e,t,i){return this.getStorage(t)?.getBoolean(e,i)}getNumber(e,t,i){return this.getStorage(t)?.getNumber(e,i)}store(e,t,i,n,s=!1){if(l.isUndefinedOrNull(t)){this.remove(e,i,s);return}this.withPausedEmitters(()=>{this.updateKeyTarget(e,i,n),this.getStorage(i)?.set(e,t,s)})}remove(e,t,i=!1){this.withPausedEmitters(()=>{this.updateKeyTarget(e,t,void 0),this.getStorage(t)?.delete(e,i)})}withPausedEmitters(e){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{e()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(e,t,i,n=!1){const s=this.getKeyTargets(t);typeof i=="number"?s[e]!==i&&(s[e]=i,this.getStorage(t)?.set(bp,JSON.stringify(s),n)):typeof s[e]=="number"&&(delete s[e],this.getStorage(t)?.set(bp,JSON.stringify(s),n))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get profileKeyTargets(){return this._profileKeyTargets||(this._profileKeyTargets=this.loadKeyTargets(0)),this._profileKeyTargets}get applicationKeyTargets(){return this._applicationKeyTargets||(this._applicationKeyTargets=this.loadKeyTargets(-1)),this._applicationKeyTargets}get applicationSharedKeyTargets(){return this._applicationSharedKeyTargets||(this._applicationSharedKeyTargets=this.loadKeyTargets(-2)),this._applicationSharedKeyTargets}getKeyTargets(e){switch(e){case-2:return this.applicationSharedKeyTargets;case-1:return this.applicationKeyTargets;case 0:return this.profileKeyTargets;default:return this.workspaceKeyTargets}}loadKeyTargets(e){const t=this.getStorage(e);return t?D7(t):Object.create(null)}async flush(e=_.WillSaveStateReason.NONE){this._onWillSaveState.fire({reason:e});const t=this.getStorage(-1),i=this.getStorage(-2),n=this.getStorage(0),s=this.getStorage(1);switch(e){case _.WillSaveStateReason.NONE:await l.Promises.settled([t?.whenFlushed()??Promise.resolve(),i?.whenFlushed()??Promise.resolve(),n?.whenFlushed()??Promise.resolve(),s?.whenFlushed()??Promise.resolve()]);break;case _.WillSaveStateReason.SHUTDOWN:await l.Promises.settled([t?.flush(0)??Promise.resolve(),i?.flush(0)??Promise.resolve(),n?.flush(0)??Promise.resolve(),s?.flush(0)??Promise.resolve()]);break}}};hb.DEFAULT_FLUSH_INTERVAL=60*1e3;let ny=hb;class x7 extends ny{constructor(){super(),this.applicationStorage=this._register(new Zc(new _p,{hint:Ya.STORAGE_IN_MEMORY})),this.applicationSharedStorage=this._register(new Zc(new _p,{hint:Ya.STORAGE_IN_MEMORY})),this.profileStorage=this._register(new Zc(new _p,{hint:Ya.STORAGE_IN_MEMORY})),this.workspaceStorage=this._register(new Zc(new _p,{hint:Ya.STORAGE_IN_MEMORY})),this._register(this.workspaceStorage.onDidChangeStorage(e=>this.emitDidChangeValue(1,e))),this._register(this.profileStorage.onDidChangeStorage(e=>this.emitDidChangeValue(0,e))),this._register(this.applicationStorage.onDidChangeStorage(e=>this.emitDidChangeValue(-1,e))),this._register(this.applicationSharedStorage.onDidChangeStorage(e=>this.emitDidChangeValue(-2,e)))}getStorage(e){switch(e){case-2:return this.applicationSharedStorage;case-1:return this.applicationStorage;case 0:return this.profileStorage;default:return this.workspaceStorage}}shouldFlushWhenIdle(){return!1}}var E7=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},IR=function(o,e){return function(t,i){e(t,i,o)}};const Cp=le("IInlineCompletionsService"),TR=new q("inlineCompletions.snoozed",!1,l.localize(83,"Whether inline completions are currently snoozed"));let sy=class extends l.Disposable{get snoozeTimeLeft(){return this._snoozeTimeEnd===void 0?0:Math.max(0,this._snoozeTimeEnd-Date.now())}constructor(e,t){super(),this._contextKeyService=e,this._telemetryService=t,this._onDidChangeIsSnoozing=this._register(new l.Emitter),this.onDidChangeIsSnoozing=this._onDidChangeIsSnoozing.event,this._snoozeTimeEnd=void 0,this._recentCompletionIds=[],this._timer=this._register(new l.TimeoutTimer);const i=TR.bindTo(this._contextKeyService);this._register(this.onDidChangeIsSnoozing(()=>i.set(this.isSnoozing())))}setSnoozeDuration(e){if(e<0)throw new l.BugIndicatingError(`Invalid snooze duration: ${e}. Duration must be non-negative.`);if(e===0){this.cancelSnooze();return}const t=this.isSnoozing(),i=this.snoozeTimeLeft;this._snoozeTimeEnd=Date.now()+e,t||this._onDidChangeIsSnoozing.fire(!0),this._timer.cancelAndSet(()=>{if(!this.isSnoozing())this._onDidChangeIsSnoozing.fire(!1);else throw new l.BugIndicatingError("Snooze timer did not fire as expected")},this.snoozeTimeLeft+1),this._reportSnooze(e-i,e)}isSnoozing(){return this.snoozeTimeLeft>0}cancelSnooze(){this.isSnoozing()&&(this._reportSnooze(-this.snoozeTimeLeft,0),this._snoozeTimeEnd=void 0,this._timer.cancel(),this._onDidChangeIsSnoozing.fire(!1))}reportNewCompletion(e){this._lastCompletionId=e,this._recentCompletionIds.unshift(e),this._recentCompletionIds.length>5&&this._recentCompletionIds.pop()}_reportSnooze(e,t){const i=Math.round(e/1e3),n=Math.round(t/1e3);this._telemetryService.publicLog2("inlineCompletions.snooze",{deltaSeconds:i,totalSeconds:n,lastCompletionId:this._lastCompletionId,recentCompletionIds:this._recentCompletionIds})}};sy=E7([IR(0,be),IR(1,Xn)],sy),fe(Cp,sy,1);const I7="editor.action.inlineSuggest.snooze",T7="editor.action.inlineSuggest.cancelSnooze",oy="inlineCompletions.lastSnoozeDuration",db=class db extends hg{constructor(){super({id:db.ID,title:l.localize2(97,"Snooze Inline Suggestions"),precondition:de.true(),f1:!0})}async run(e,...t){const i=e.get(Ps),n=e.get(Cp),s=e.get(Qa);let r;t.length>0&&typeof t[0]=="number"&&(r=t[0]*6e4),r||(r=await this.getDurationFromUser(i,s)),r&&n.setSnoozeDuration(r)}async getDurationFromUser(e,t){const i=t.getNumber(oy,0,3e5),n=[{label:l.localize(84,"1 minute"),id:"1",value:6e4},{label:l.localize(85,"5 minutes"),id:"5",value:3e5},{label:l.localize(86,"10 minutes"),id:"10",value:6e5},{label:l.localize(87,"15 minutes"),id:"15",value:9e5},{label:l.localize(88,"30 minutes"),id:"30",value:18e5},{label:l.localize(89,"60 minutes"),id:"60",value:36e5}];let s=n;if(i>0&&!n.some(a=>a.value===i)){const a=i/6e4,c={label:l.localize(90,"{0} minutes (Last used)",a),id:"last-custom",value:i,description:l.localize(91,"Last used custom duration")},h=n.findIndex(d=>d.value>i);h===-1?s=[...n,c]:s=[...n.slice(0,h),c,...n.slice(h)]}s.push({label:l.localize(92,"Custom..."),id:"custom",value:-1});const r=await e.pick(s,{placeHolder:l.localize(93,"Select snooze duration for Inline Suggestions"),activeItem:s.find(a=>a.value===i)});if(r)return r.id==="custom"?this.getCustomDurationFromUser(e,t):(t.store(oy,r.value,0,0),r.value)}async getCustomDurationFromUser(e,t){const i=await e.input({placeHolder:l.localize(94,"Duration in minutes (e.g. 90)"),prompt:l.localize(95,"Enter snooze duration in minutes"),validateInput:async n=>{const s=Number(n);if(isNaN(s)||s<=0||!Number.isFinite(s))return l.localize(96,"Please enter a positive number")}});if(i){const n=Number(i)*6e4;return t.store(oy,n,0,0),n}}};db.ID=I7;let ry=db;const ub=class ub extends hg{constructor(){super({id:ub.ID,title:l.localize2(98,"Cancel Snooze Inline Suggestions"),precondition:TR,f1:!0})}async run(e){e.get(Cp).cancelSnooze()}};ub.ID=T7;let ay=ub;function wi(o,e,t){return Math.min(Math.max(o,e),t)}class NR{constructor(){this._n=1,this._val=0}update(e){return this._val=this._val+(e-this._val)/this._n,this._n+=1,this._val}get value(){return this._val}}class N7{constructor(e){this._n=0,this._val=0,this._values=[],this._index=0,this._sum=0,this._values=new Array(e),this._values.fill(0,0,e)}update(e){const t=this._values[this._index];return this._values[this._index]=e,this._index=(this._index+1)%this._values.length,this._sum-=t,this._sum+=e,this._n=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},RR=function(o,e){return function(t,i){e(t,i,o)}};const MR=le("ILanguageFeatureDebounceService");var vp;(function(o){const e=new WeakMap;let t=0;function i(n){let s=e.get(n);return s===void 0&&(s=++t,e.set(n,s)),s}o.of=i})(vp||(vp={}));class M7{constructor(e){this._default=e}get(e){return this._default}update(e,t){return this._default}default(){return this._default}}class A7{constructor(e,t,i,n,s,r){this._logService=e,this._name=t,this._registry=i,this._default=n,this._min=s,this._max=r,this._cache=new l.LRUCache(50,.7)}_key(e){return e.id+this._registry.all(e).reduce((t,i)=>l.doHash(vp.of(i),t),0)}get(e){const t=this._key(e),i=this._cache.get(t);return i?wi(i.value,this._min,this._max):this.default()}update(e,t){const i=this._key(e);let n=this._cache.get(i);n||(n=new N7(6),this._cache.set(i,n));const s=wi(n.update(t),this._min,this._max);return l.matchesScheme(e.uri,"output")||this._logService.trace(`[DEBOUNCE: ${this._name}] for ${e.uri.toString()} is ${s}ms`),s}_overall(){const e=new NR;for(const[,t]of this._cache)e.update(t.value);return e.value}default(){const e=this._overall()|0||this._default;return wi(e,this._min,this._max)}}let cy=class{constructor(e,t){this._logService=e,this._data=new Map,this._isDev=t.isExtensionDevelopment||!t.isBuilt}for(e,t,i){const n=i?.min??50,s=i?.max??n**2,r=i?.key??void 0,a=`${vp.of(e)},${n}${r?","+r:""}`;let c=this._data.get(a);return c||(this._isDev?(this._logService.debug(`[DEBOUNCE: ${t}] is disabled in developed mode`),c=new M7(n*1.5)):c=new A7(this._logService,t,e,this._overallAverage()|0||n*1.5,n,s),this._data.set(a,c)),c}_overallAverage(){const e=new NR;for(const t of this._data.values())e.update(t.default());return e.value}};cy=R7([RR(0,ei),RR(1,ly)],cy),fe(MR,cy,1);const wp="**",AR="/",Sp="[/\\\\]",yp="[^/\\\\]",O7=/\//g;function OR(o,e){switch(o){case 0:return"";case 1:return`${yp}*?`;default:return`(?:${Sp}|${yp}+${Sp}${e?`|${Sp}${yp}+`:""})*?`}}function PR(o,e){if(!o)return[];const t=[];let i=!1,n=!1,s="";for(const r of o){switch(r){case e:if(!i&&!n){t.push(s),s="";continue}break;case"{":i=!0;break;case"}":i=!1;break;case"[":n=!0;break;case"]":n=!1;break}s+=r}return s&&t.push(s),t}function kR(o){if(!o)return"";let e="";const t=PR(o,AR);if(t.every(i=>i===wp))e=".*";else{let i=!1;t.forEach((n,s)=>{if(n===wp){if(i)return;e+=OR(2,s===t.length-1)}else{let r=!1,a="",c=!1,h="";for(const d of n){if(d!=="}"&&r){a+=d;continue}if(c&&(d!=="]"||!h)){let u;d==="-"?u=d:(d==="^"||d==="!")&&!h?u="^":d===AR?u="":u=l.escapeRegExpCharacters(d),h+=u;continue}switch(d){case"{":r=!0;continue;case"[":c=!0;continue;case"}":{const f=`(?:${PR(a,",").map(g=>kR(g)).join("|")})`;e+=f,r=!1,a="";break}case"]":{e+="["+h+"]",c=!1,h="";break}case"?":e+=yp;continue;case"*":e+=OR(1);continue;default:e+=l.escapeRegExpCharacters(d)}}sc===h,endsWith:i?l.endsWithIgnoreCase:(c,h)=>c.endsWith(h),isEqualOrParent:(c,h)=>pC(c,h,e.ignoreCase??!l.isLinux)},s=`${i?t.toLowerCase():t}_${!!e.trimForExclusions}_${i}`;let r=FR.get(s);if(r)return zR(r,o,n);let a;return P7.test(t)?r=U7(t.substring(4),t,n):(a=k7.exec(dy(t,n)))?r=$7(a[1],t,n):(e.trimForExclusions?B7:F7).test(t)?r=K7(t,n):(a=z7.exec(dy(t,n)))?r=VR(a[1].substring(1),t,!0,n):(a=V7.exec(dy(t,n)))?r=VR(a[1],t,!1,n):r=G7(t,n),FR.set(s,r),zR(r,o,n)}function zR(o,e,t){if(typeof e=="string")return o;const i=function(n,s){return t.isEqualOrParent(n,e.base)?o(l.ltrim(n.substring(e.base.length),l.sep),s):null};return i.allBasenames=o.allBasenames,i.allPaths=o.allPaths,i.basenames=o.basenames,i.patterns=o.patterns,i}function dy(o,e){return e.trimForExclusions&&o.endsWith("/**")?o.substring(0,o.length-2):o}function U7(o,e,t){return function(i,n){return typeof i=="string"&&t.endsWith(i,o)?e:null}}function $7(o,e,t){const i=`/${o}`,n=`\\${o}`,s=function(a,c){return typeof a!="string"?null:c?t.equals(c,o)?e:null:t.equals(a,o)||t.endsWith(a,i)||t.endsWith(a,n)?e:null},r=[o];return s.basenames=r,s.patterns=[e],s.allBasenames=r,s}function K7(o,e){const t=$R(o.slice(1,-1).split(",").map(a=>hy(a,e)).filter(a=>a!==ks),o),i=t.length;if(!i)return ks;if(i===1)return t[0];const n=function(a,c){for(let h=0,d=t.length;h!!a.allBasenames);s&&(n.allBasenames=s.allBasenames);const r=t.reduce((a,c)=>c.allPaths?a.concat(c.allPaths):a,[]);return r.length&&(n.allPaths=r),n}function VR(o,e,t,i){const n=l.sep===l.posix.sep,s=n?o:o.replace(O7,l.sep),r=l.sep+s,a=l.posix.sep+o;let c;return t?c=function(h,d){return typeof h=="string"&&(i.equals(h,s)||i.endsWith(h,r)||!n&&(i.equals(h,o)||i.endsWith(h,a)))?e:null}:c=function(h,d){return typeof h=="string"&&(i.equals(h,s)||!n&&i.equals(h,o))?e:null},c.allPaths=[(t?"*/":"./")+o],c}function G7(o,e){try{const t=new RegExp(`^${kR(o)}$`,e.ignoreCase?"i":void 0);return function(i){return t.lastIndex=0,typeof i=="string"&&t.test(i)?o:null}}catch{return ks}}function j7(o,e,t){return!o||typeof e!="string"?!1:UR(o,t)(e)}function UR(o,e={}){if(!o)return BR;if(typeof o=="string"||q7(o)){const t=hy(o,e);if(t===ks)return BR;const i=function(n,s){return!!t(n,s)};return t.allBasenames&&(i.allBasenames=t.allBasenames),t.allPaths&&(i.allPaths=t.allPaths),i}return Y7(o,e)}function q7(o){const e=o;return e?typeof e.base=="string"&&typeof e.pattern=="string":!1}function Y7(o,e){const t=$R(Object.getOwnPropertyNames(o).map(a=>Z7(a,o[a],e)).filter(a=>a!==ks)),i=t.length;if(!i)return ks;if(!t.some(a=>!!a.requiresSiblings)){if(i===1)return t[0];const a=function(d,u){let f;for(let g=0,m=t.length;g{for(const g of f){const m=await g;if(typeof m=="string")return m}return null})():null},c=t.find(d=>!!d.allBasenames);c&&(a.allBasenames=c.allBasenames);const h=t.reduce((d,u)=>u.allPaths?d.concat(u.allPaths):d,[]);return h.length&&(a.allPaths=h),a}const n=function(a,c,h){let d,u;for(let f=0,g=t.length;f{for(const f of u){const g=await f;if(typeof g=="string")return g}return null})():null},s=t.find(a=>!!a.allBasenames);s&&(n.allBasenames=s.allBasenames);const r=t.reduce((a,c)=>c.allPaths?a.concat(c.allPaths):a,[]);return r.length&&(n.allPaths=r),n}function Z7(o,e,t){if(e===!1)return ks;const i=hy(o,t);if(i===ks)return ks;if(typeof e=="boolean")return i;if(e){const n=e.when;if(typeof n=="string"){const s=(r,a,c,h)=>{if(!h||!i(r,a))return null;const d=n.replace("$(basename)",()=>c),u=h(d);return l.isThenable(u)?u.then(f=>f?o:null):u?o:null};return s.requiresSiblings=!0,s}}return i}function $R(o,e){const t=o.filter(a=>!!a.basenames);if(t.length<2)return o;const i=t.reduce((a,c)=>{const h=c.basenames;return h?a.concat(h):a},[]);let n;if(e){n=[];for(let a=0,c=i.length;a{const h=c.patterns;return h?a.concat(h):a},[]);const s=function(a,c){if(typeof a!="string")return null;if(!c){let d;for(d=a.length;d>0;d--){const u=a.charCodeAt(d-1);if(u===47||u===92)break}c=a.substring(d)}const h=i.indexOf(c);return h!==-1?n[h]:null};s.basenames=i,s.patterns=n,s.allBasenames=i;const r=o.filter(a=>!a.basenames);return r.push(s),r}function uy(o,e,t,i,n,s){if(Array.isArray(o)){let r=0;for(const a of o){const c=uy(a,e,t,i,n,s);if(c===10)return c;c>r&&(r=c)}return r}else{if(typeof o=="string")return i?o==="*"?5:o===t?10:0:0;if(o){const{language:r,pattern:a,scheme:c,hasAccessToAllModels:h,notebookType:d}=o;if(!i&&!h)return 0;d&&n&&(e=n);let u=0;if(c)if(c===e.scheme)u=10;else if(c==="*")u=5;else return 0;if(r)if(r===t)u=10;else if(r==="*")u=Math.max(u,5);else return 0;if(d)if(d===s)u=10;else if(d==="*"&&s!==void 0)u=Math.max(u,5);else return 0;if(a){let f;if(typeof a=="string"?f=a:f={...a,base:l.normalize(a.base)},f===e.fsPath||j7(f,e.fsPath))u=10;else return 0}return u}else return 0}}function KR(o){return typeof o=="string"?!1:Array.isArray(o)?o.every(KR):!!o.exclusive}class GR{constructor(e,t,i,n,s){this.uri=e,this.languageId=t,this.notebookUri=i,this.notebookType=n,this.recursive=s}equals(e){return this.notebookType===e.notebookType&&this.languageId===e.languageId&&this.uri.toString()===e.uri.toString()&&this.notebookUri?.toString()===e.notebookUri?.toString()&&this.recursive===e.recursive}}class Je{get onDidChange(){return this._onDidChange.event}constructor(e){this._notebookInfoResolver=e,this._clock=0,this._entries=[],this._onDidChange=new l.Emitter}register(e,t){let i={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(i),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),l.toDisposable(()=>{if(i){const n=this._entries.indexOf(i);n>=0&&(this._entries.splice(n,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),i=void 0)}})}has(e){return this.all(e).length>0}all(e){if(!e)return[];this._updateScores(e,!1);const t=[];for(const i of this._entries)i._score>0&&t.push(i.provider);return t}allNoModel(){return this._entries.map(e=>e.provider)}ordered(e,t=!1){const i=[];return this._orderedForEach(e,t,n=>i.push(n.provider)),i}orderedGroups(e){const t=[];let i,n;return this._orderedForEach(e,!1,s=>{i&&n===s._score?i.push(s.provider):(n=s._score,i=[s.provider],t.push(i))}),t}_orderedForEach(e,t,i){this._updateScores(e,t);for(const n of this._entries)n._score>0&&i(n)}_updateScores(e,t){const i=this._notebookInfoResolver?.(e.uri),n=i?new GR(e.uri,e.getLanguageId(),i.uri,i.type,t):new GR(e.uri,e.getLanguageId(),void 0,void 0,t);if(!this._lastCandidate?.equals(n)){this._lastCandidate=n;for(const s of this._entries)if(s._score=uy(s.selector,n.uri,n.languageId,l.shouldSynchronizeModel(e),n.notebookUri,n.notebookType),KR(s.selector)&&s._score>0)if(t)s._score=0;else{for(const r of this._entries)r._score=0;s._score=1e3;break}this._entries.sort(Je._compareByScoreAndTime)}}static _compareByScoreAndTime(e,t){return e._scoret._score?-1:Fu(e.selector)&&!Fu(t.selector)?1:!Fu(e.selector)&&Fu(t.selector)?-1:e._timet._time?-1:0}}function Fu(o){return typeof o=="string"?!1:Array.isArray(o)?o.some(Fu):!!o.isBuiltin}class Q7{constructor(){this.referenceProvider=new Je(this._score.bind(this)),this.renameProvider=new Je(this._score.bind(this)),this.newSymbolNamesProvider=new Je(this._score.bind(this)),this.codeActionProvider=new Je(this._score.bind(this)),this.definitionProvider=new Je(this._score.bind(this)),this.typeDefinitionProvider=new Je(this._score.bind(this)),this.declarationProvider=new Je(this._score.bind(this)),this.implementationProvider=new Je(this._score.bind(this)),this.documentSymbolProvider=new Je(this._score.bind(this)),this.inlayHintsProvider=new Je(this._score.bind(this)),this.colorProvider=new Je(this._score.bind(this)),this.codeLensProvider=new Je(this._score.bind(this)),this.documentFormattingEditProvider=new Je(this._score.bind(this)),this.documentRangeFormattingEditProvider=new Je(this._score.bind(this)),this.onTypeFormattingEditProvider=new Je(this._score.bind(this)),this.signatureHelpProvider=new Je(this._score.bind(this)),this.hoverProvider=new Je(this._score.bind(this)),this.documentHighlightProvider=new Je(this._score.bind(this)),this.multiDocumentHighlightProvider=new Je(this._score.bind(this)),this.selectionRangeProvider=new Je(this._score.bind(this)),this.foldingRangeProvider=new Je(this._score.bind(this)),this.linkProvider=new Je(this._score.bind(this)),this.inlineCompletionsProvider=new Je(this._score.bind(this)),this.completionProvider=new Je(this._score.bind(this)),this.linkedEditingRangeProvider=new Je(this._score.bind(this)),this.documentRangeSemanticTokensProvider=new Je(this._score.bind(this)),this.documentSemanticTokensProvider=new Je(this._score.bind(this)),this.documentDropEditProvider=new Je(this._score.bind(this)),this.documentPasteEditProvider=new Je(this._score.bind(this))}_score(e){return this._notebookTypeResolver?.(e)}}fe(ze,Q7,1);class X7{constructor(e=5){this.timesPerSecond=e,this._lastRun=0,this._minimumTimeBetweenRuns=1e3/e}runIfNotLimited(e){const t=Date.now();t-this._lastRun>=this._minimumTimeBetweenRuns&&(this._lastRun=t,e())}}class Bu{static create(e,t){return new Bu(e,new fy(t))}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._endLineNumber}constructor(e,t){this._startLineNumber=e,this._tokens=t,this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}toString(){return this._tokens.toString(this._startLineNumber)}_updateEndLineNumber(){this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}isEmpty(){return this._tokens.isEmpty()}getLineTokens(e){return this._startLineNumber<=e&&e<=this._endLineNumber?this._tokens.getLineTokens(e-this._startLineNumber):null}getRange(){const e=this._tokens.getRange();return e&&new l.Range(this._startLineNumber+e.startLineNumber,e.startColumn,this._startLineNumber+e.endLineNumber,e.endColumn)}removeTokens(e){const t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber;this._startLineNumber+=this._tokens.removeTokens(t,e.startColumn-1,i,e.endColumn-1),this._updateEndLineNumber()}split(e){const t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber,[n,s,r]=this._tokens.split(t,e.startColumn-1,i,e.endColumn-1);return[new Bu(this._startLineNumber,n),new Bu(this._startLineNumber+r,s)]}applyEdit(e,t){const[i,n,s]=fr(t);this.acceptEdit(e,i,n,s,t.length>0?t.charCodeAt(0):0)}acceptEdit(e,t,i,n,s){this._acceptDeleteRange(e),this._acceptInsertText(new l.Position(e.startLineNumber,e.startColumn),t,i,n,s),this._updateEndLineNumber()}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return;const t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber;if(i<0){const s=i-t;this._startLineNumber-=s;return}const n=this._tokens.getMaxDeltaLine();if(!(t>=n+1)){if(t<0&&i>=n+1){this._startLineNumber=0,this._tokens.clear();return}if(t<0){const s=-t;this._startLineNumber-=s,this._tokens.acceptDeleteRange(e.startColumn-1,0,0,i,e.endColumn-1)}else this._tokens.acceptDeleteRange(0,t,e.startColumn-1,i,e.endColumn-1)}}_acceptInsertText(e,t,i,n,s){if(t===0&&i===0)return;const r=e.lineNumber-this._startLineNumber;if(r<0){this._startLineNumber+=t;return}const a=this._tokens.getMaxDeltaLine();r>=a+1||this._tokens.acceptInsertText(r,e.column-1,t,i,n,s)}reportIfInvalid(e){this._tokens.reportIfInvalid(e,this._startLineNumber)}}const kr=class kr{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){const t=[];for(let i=0;ie)i=n-1;else{let r=n;for(;r>t&&this._getDeltaLine(r-1)===e;)r--;let a=n;for(;ae||f===e&&m>=t)&&(fe||m===e&&b>=t){if(ms?p-=s-i:p=i;else if(g===t&&m===i)if(g===n&&p>s)p-=s-i;else{d=!0;continue}else if(gs)g=t,m=i,p=m+(p-s);else{d=!0;continue}else if(g>n){if(c===0&&!d){h=a;break}g-=c}else if(g===n&&m>=s)e&&g===0&&(m+=e,p+=e),g-=c,m-=s-i,p-=s-i;else throw new Error("Not possible!");const v=4*h;r[v]=g,r[v+1]=m,r[v+2]=p,r[v+3]=b,h++}this._tokenCount=h}acceptInsertText(e,t,i,n,s,r){const a=i===0&&n===1&&(r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122),c=this._tokens,h=this._tokenCount;for(let d=0;d{console.error("Invalid Semantic Tokens Data From Extension: lineNumber < 1")}):n>e.getLineCount()?kr._rateLimiter.runIfNotLimited(()=>{console.error("Invalid Semantic Tokens Data From Extension: lineNumber > model.getLineCount()")}):this._getEndCharacter(i)>e.getLineLength(n)&&kr._rateLimiter.runIfNotLimited(()=>{console.error("Invalid Semantic Tokens Data From Extension: end character > model.getLineLength(lineNumber)")})}}};kr._rateLimiter=new X7(10/60);let fy=kr;class jR{constructor(e){this._tokens=e}getCount(){return this._tokens.length/4}getStartCharacter(e){return this._tokens[4*e+1]}getEndCharacter(e){return this._tokens[4*e+2]}getMetadata(e){return this._tokens[4*e+3]}}var J7=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},gy=function(o,e){return function(t,i){e(t,i,o)}};let my=class{constructor(e,t,i,n){this._legend=e,this._themeService=t,this._languageService=i,this._logService=n,this._hasWarnedOverlappingTokens=!1,this._hasWarnedInvalidLengthTokens=!1,this._hasWarnedInvalidEditStart=!1,this._hashTable=new py}getMetadata(e,t,i){const n=this._languageService.languageIdCodec.encodeLanguageId(i),s=this._hashTable.get(e,t,n);let r;if(s)r=s.metadata;else{let a=this._legend.tokenTypes[e];const c=[];if(a){let h=t;for(let u=0;h>0&&u>1;const d=this._themeService.getColorTheme().getTokenStyleMetadata(a,c,i);if(typeof d>"u")r=2147483647;else{if(r=0,typeof d.italic<"u"){const u=(d.italic?1:0)<<11;r|=u|1}if(typeof d.bold<"u"){const u=(d.bold?2:0)<<11;r|=u|2}if(typeof d.underline<"u"){const u=(d.underline?4:0)<<11;r|=u|4}if(typeof d.strikethrough<"u"){const u=(d.strikethrough?8:0)<<11;r|=u|8}if(d.foreground){const u=d.foreground<<15;r|=u|16}r===0&&(r=2147483647)}}else r=2147483647,a="not-in-legend";this._hashTable.add(e,t,n,r)}return r}warnOverlappingSemanticTokens(e,t){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,this._logService.warn(`Overlapping semantic tokens detected at lineNumber ${e}, column ${t}`))}warnInvalidLengthSemanticTokens(e,t){this._hasWarnedInvalidLengthTokens||(this._hasWarnedInvalidLengthTokens=!0,this._logService.warn(`Semantic token with invalid length detected at lineNumber ${e}, column ${t}`))}warnInvalidEditStart(e,t,i,n,s){this._hasWarnedInvalidEditStart||(this._hasWarnedInvalidEditStart=!0,this._logService.warn(`Invalid semantic tokens edit detected (previousResultId: ${e}, resultId: ${t}) at edit #${i}: The provided start offset ${n} is outside the previous data (length ${s}).`))}};my=J7([gy(1,_i),gy(2,yt),gy(3,ei)],my);function W7(o,e,t){const i=o.data,n=o.data.length/5|0,s=Math.max(Math.ceil(n/1024),400),r=[];let a=0,c=1,h=0;for(;ad&&i[5*C]===0;)C--;if(C-1===d){let w=u;for(;w+1D)e.warnOverlappingSemanticTokens(L,D+1);else{const O=e.getMetadata(T,M,t);O!==2147483647&&(m===0&&(m=L),f[g]=L-m,f[g+1]=D,f[g+2]=I,f[g+3]=O,g+=4,p=L,b=I)}c=L,h=D,a++}g!==f.length&&(f=f.subarray(0,g));const v=Bu.create(m,f);r.push(v)}return r}class H7{constructor(e,t,i,n){this.tokenTypeIndex=e,this.tokenModifierSet=t,this.languageId=i,this.metadata=n,this.next=null}}const Uo=class Uo{constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=Uo._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1=this._growCount){const s=this._elements;this._currentLengthIndex++,this._currentLength=Uo._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},_y=function(o,e){return function(t,i){e(t,i,o)}};let by=class extends l.Disposable{constructor(e,t,i){super(),this._themeService=e,this._logService=t,this._languageService=i,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange(()=>{this._caches=new WeakMap}))}getStyling(e){return this._caches.has(e)||this._caches.set(e,new my(e.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(e)}};by=e9([_y(0,_i),_y(1,ei),_y(2,yt)],by),fe(qR,by,1);var t9=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},i9=function(o,e){return function(t,i){e(t,i,o)}};let Cy=class extends l.Disposable{constructor(e){super(),this._themeService=e,this._onWillCreateCodeEditor=this._register(new l.Emitter),this._onCodeEditorAdd=this._register(new l.Emitter),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new l.Emitter),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onWillCreateDiffEditor=this._register(new l.Emitter),this._onDiffEditorAdd=this._register(new l.Emitter),this.onDiffEditorAdd=this._onDiffEditorAdd.event,this._onDiffEditorRemove=this._register(new l.Emitter),this.onDiffEditorRemove=this._onDiffEditorRemove.event,this._decorationOptionProviders=new Map,this._codeEditorOpenHandlers=new l.LinkedList,this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null),this._globalStyleSheet=null}willCreateCodeEditor(){this._onWillCreateCodeEditor.fire()}addCodeEditor(e){this._codeEditors[e.getId()]=e,this._onCodeEditorAdd.fire(e)}removeCodeEditor(e){delete this._codeEditors[e.getId()]&&this._onCodeEditorRemove.fire(e)}listCodeEditors(){return Object.keys(this._codeEditors).map(e=>this._codeEditors[e])}willCreateDiffEditor(){this._onWillCreateDiffEditor.fire()}addDiffEditor(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)}removeDiffEditor(e){delete this._diffEditors[e.getId()]&&this._onDiffEditorRemove.fire(e)}listDiffEditors(){return Object.keys(this._diffEditors).map(e=>this._diffEditors[e])}getFocusedCodeEditor(){let e=null;const t=this.listCodeEditors();for(const i of t){if(i.hasTextFocus())return i;i.hasWidgetFocus()&&(e=i)}return e}removeDecorationType(e){const t=this._decorationOptionProviders.get(e);t&&(t.refCount--,t.refCount<=0&&(this._decorationOptionProviders.delete(e),t.dispose(),this.listCodeEditors().forEach(i=>i.removeDecorationsByType(e))))}setModelProperty(e,t,i){const n=e.toString();let s;this._modelProperties.has(n)?s=this._modelProperties.get(n):(s=new Map,this._modelProperties.set(n,s)),s.set(t,i)}getModelProperty(e,t){const i=e.toString();if(this._modelProperties.has(i))return this._modelProperties.get(i).get(t)}async openCodeEditor(e,t,i){for(const n of this._codeEditorOpenHandlers){const s=await n(e,t,i);if(s!==null)return s}return null}registerCodeEditorOpenHandler(e){const t=this._codeEditorOpenHandlers.unshift(e);return l.toDisposable(t)}};Cy=t9([i9(0,_i)],Cy);var n9=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},YR=function(o,e){return function(t,i){e(t,i,o)}};let Lp=class extends Cy{constructor(e,t){super(t),this._register(this.onCodeEditorAdd(()=>this._checkContextKey())),this._register(this.onCodeEditorRemove(()=>this._checkContextKey())),this._editorIsOpen=e.createKey("editorIsOpen",!1),this._activeCodeEditor=null,this._register(this.registerCodeEditorOpenHandler(async(i,n,s)=>n?this.doOpenEditor(n,i):null))}_checkContextKey(){let e=!1;for(const t of this.listCodeEditors())if(!t.isSimpleWidget){e=!0;break}this._editorIsOpen.set(e)}setActiveCodeEditor(e){this._activeCodeEditor=e}getActiveCodeEditor(){return this._activeCodeEditor}doOpenEditor(e,t){if(!this.findModel(e,t.resource)){if(t.resource){const s=t.resource.scheme;if(s===l.Schemas.http||s===l.Schemas.https)return fx(t.resource.toString()),e}return null}const n=t.options?t.options.selection:null;if(n)if(typeof n.endLineNumber=="number"&&typeof n.endColumn=="number")e.setSelection(n),e.revealRangeInCenter(n,1);else{const s={lineNumber:n.startLineNumber,column:n.startColumn};e.setPosition(s),e.revealPositionInCenter(s,1)}return e}findModel(e,t){const i=e.getModel();return i&&i.uri.toString()!==t.toString()?null:i}};Lp=n9([YR(0,be),YR(1,_i)],Lp),fe(pt,Lp,0);var ZR=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},QR=function(o,e){return function(t,i){e(t,i,o)}};let Dp=class{get mainContainer(){return this._codeEditorService.listCodeEditors().at(0)?.getContainerDomNode()??Ae.document.body}get activeContainer(){return(this._codeEditorService.getFocusedCodeEditor()??this._codeEditorService.getActiveCodeEditor())?.getContainerDomNode()??this.mainContainer}get mainContainerDimension(){return Gf(this.mainContainer)}get activeContainerDimension(){return Gf(this.activeContainer)}get containers(){return l.coalesce(this._codeEditorService.listCodeEditors().map(e=>e.getContainerDomNode()))}getContainer(){return this.activeContainer}whenContainerStylesLoaded(){}focus(){this._codeEditorService.getFocusedCodeEditor()?.focus()}constructor(e){this._codeEditorService=e,this.onDidLayoutMainContainer=l.Event.None,this.onDidLayoutActiveContainer=l.Event.None,this.onDidLayoutContainer=l.Event.None,this.onDidChangeActiveContainer=l.Event.None,this.onDidAddContainer=l.Event.None,this.mainContainerOffset={top:0,quickPickTop:0},this.activeContainerOffset={top:0,quickPickTop:0}}};Dp=ZR([QR(0,pt)],Dp);let vy=class extends Dp{get mainContainer(){return this._container}constructor(e,t){super(t),this._container=e}};vy=ZR([QR(1,pt)],vy),fe(Os,Dp,1);var s9=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},wy=function(o,e){return function(t,i){e(t,i,o)}};let Sy=class extends l.Disposable{constructor(e,t,i){super(),this._contextKeyService=e,this._layoutService=t,this._configurationService=i,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=this._register(new l.Emitter),this._onDidChangeReducedMotion=this._register(new l.Emitter),this._onDidChangeReducedTransparency=this._register(new l.Emitter),this._onDidChangeLinkUnderline=this._register(new l.Emitter),this._accessibilityModeEnabledContext=yE.bindTo(this._contextKeyService);const n=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration(a=>{a.affectsConfiguration("editor.accessibilitySupport")&&(n(),this._onDidChangeScreenReaderOptimized.fire()),a.affectsConfiguration("workbench.reduceMotion")&&(this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._onDidChangeReducedMotion.fire()),a.affectsConfiguration("workbench.reduceTransparency")&&(this._configTransparencyReduced=this._configurationService.getValue("workbench.reduceTransparency"),this._onDidChangeReducedTransparency.fire())})),n(),this._register(this.onDidChangeScreenReaderOptimized(()=>n()));const s=Ae.matchMedia("(prefers-reduced-motion: reduce)");this._systemMotionReduced=s.matches,this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion");const r=Ae.matchMedia("(prefers-reduced-transparency: reduce)");this._systemTransparencyReduced=r.matches,this._configTransparencyReduced=this._configurationService.getValue("workbench.reduceTransparency"),this._linkUnderlinesEnabled=this._configurationService.getValue("accessibility.underlineLinks"),this.initReducedMotionListeners(s),this.initReducedTransparencyListeners(r),this.initLinkUnderlineListeners()}initReducedMotionListeners(e){this._register(R(e,"change",()=>{this._systemMotionReduced=e.matches,this._configMotionReduced==="auto"&&this._onDidChangeReducedMotion.fire()}));const t=()=>{const i=this.isMotionReduced();this._layoutService.mainContainer.classList.toggle("monaco-reduce-motion",i),this._layoutService.mainContainer.classList.toggle("monaco-enable-motion",!i)};t(),this._register(this.onDidChangeReducedMotion(()=>t()))}initReducedTransparencyListeners(e){this._register(R(e,"change",()=>{this._systemTransparencyReduced=e.matches,this._configTransparencyReduced==="auto"&&this._onDidChangeReducedTransparency.fire()}));const t=()=>{const i=this.isTransparencyReduced();this._layoutService.mainContainer.classList.toggle("monaco-reduce-transparency",i)};t(),this._register(this.onDidChangeReducedTransparency(()=>t()))}initLinkUnderlineListeners(){this._register(this._configurationService.onDidChangeConfiguration(t=>{if(t.affectsConfiguration("accessibility.underlineLinks")){const i=this._configurationService.getValue("accessibility.underlineLinks");this._linkUnderlinesEnabled=i,this._onDidChangeLinkUnderline.fire()}}));const e=()=>{const t=this._linkUnderlinesEnabled;this._layoutService.mainContainer.classList.toggle("underline-links",t)};e(),this._register(this.onDidChangeLinkUnderlines(()=>e()))}onDidChangeLinkUnderlines(e){return this._onDidChangeLinkUnderline.event(e)}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const e=this.getAccessibilitySupportConfigurationValue();return e==="on"||e==="auto"&&this._accessibilitySupport===2}getAccessibilitySupportConfigurationValue(){const e=this._configurationService.inspect("editor.accessibilitySupport");return e.policyValue??e.memoryValue??e.workspaceFolderValue??e.workspaceValue??e.userValue??e.applicationValue??e.defaultValue??"auto"}get onDidChangeReducedMotion(){return this._onDidChangeReducedMotion.event}isMotionReduced(){const e=this._configMotionReduced;return e==="on"||e==="auto"&&this._systemMotionReduced}get onDidChangeReducedTransparency(){return this._onDidChangeReducedTransparency.event}isTransparencyReduced(){const e=this._configTransparencyReduced;return e==="on"||e==="auto"&&this._systemTransparencyReduced}getAccessibilitySupport(){return this._accessibilitySupport}};Sy=s9([wy(0,be),wy(1,Os),wy(2,Ge)],Sy);const Xa=le("accessibilitySignalService"),ne=class ne{static register(e){return new ne(e.fileName)}constructor(e){this.fileName=e}};ne.error=ne.register({fileName:"error.mp3"}),ne.warning=ne.register({fileName:"warning.mp3"}),ne.success=ne.register({fileName:"success.mp3"}),ne.foldedArea=ne.register({fileName:"foldedAreas.mp3"}),ne.break=ne.register({fileName:"break.mp3"}),ne.quickFixes=ne.register({fileName:"quickFixes.mp3"}),ne.taskCompleted=ne.register({fileName:"taskCompleted.mp3"}),ne.taskFailed=ne.register({fileName:"taskFailed.mp3"}),ne.terminalBell=ne.register({fileName:"terminalBell.mp3"}),ne.diffLineInserted=ne.register({fileName:"diffLineInserted.mp3"}),ne.diffLineDeleted=ne.register({fileName:"diffLineDeleted.mp3"}),ne.diffLineModified=ne.register({fileName:"diffLineModified.mp3"}),ne.requestSent=ne.register({fileName:"requestSent.mp3"}),ne.responseReceived1=ne.register({fileName:"responseReceived1.mp3"}),ne.responseReceived2=ne.register({fileName:"responseReceived2.mp3"}),ne.responseReceived3=ne.register({fileName:"responseReceived3.mp3"}),ne.responseReceived4=ne.register({fileName:"responseReceived4.mp3"}),ne.clear=ne.register({fileName:"clear.mp3"}),ne.save=ne.register({fileName:"save.mp3"}),ne.format=ne.register({fileName:"format.mp3"}),ne.voiceRecordingStarted=ne.register({fileName:"voiceRecordingStarted.mp3"}),ne.voiceRecordingStopped=ne.register({fileName:"voiceRecordingStopped.mp3"}),ne.progress=ne.register({fileName:"progress.mp3"}),ne.chatEditModifiedFile=ne.register({fileName:"chatEditModifiedFile.mp3"}),ne.editsKept=ne.register({fileName:"editsKept.mp3"}),ne.editsUndone=ne.register({fileName:"editsUndone.mp3"}),ne.nextEditSuggestion=ne.register({fileName:"nextEditSuggestion.mp3"}),ne.terminalCommandSucceeded=ne.register({fileName:"terminalCommandSucceeded.mp3"}),ne.chatUserActionRequired=ne.register({fileName:"chatUserActionRequired.mp3"}),ne.codeActionTriggered=ne.register({fileName:"codeActionTriggered.mp3"}),ne.codeActionApplied=ne.register({fileName:"codeActionApplied.mp3"});let Oe=ne;class o9{constructor(e){this.randomOneOf=e}}const H=class H{constructor(e,t,i,n,s,r,a=!1){this.sound=e,this.name=t,this.legacySoundSettingsKey=i,this.settingsKey=n,this.legacyAnnouncementSettingsKey=s,this.announcementMessage=r,this.managesOwnEnablement=a}static register(e){const t=new o9("randomOneOf"in e.sound?e.sound.randomOneOf:[e.sound]),i=new H(t,e.name,e.legacySoundSettingsKey,e.settingsKey,e.legacyAnnouncementSettingsKey,e.announcementMessage,e.managesOwnEnablement);return H._signals.add(i),i}};H._signals=new Set,H.errorAtPosition=H.register({name:l.localize(1630,"Error at Position"),sound:Oe.error,announcementMessage:l.localize(1631,"Error"),settingsKey:"accessibility.signals.positionHasError",delaySettingsKey:"accessibility.signalOptions.delays.errorAtPosition"}),H.warningAtPosition=H.register({name:l.localize(1632,"Warning at Position"),sound:Oe.warning,announcementMessage:l.localize(1633,"Warning"),settingsKey:"accessibility.signals.positionHasWarning",delaySettingsKey:"accessibility.signalOptions.delays.warningAtPosition"}),H.errorOnLine=H.register({name:l.localize(1634,"Error on Line"),sound:Oe.error,legacySoundSettingsKey:"audioCues.lineHasError",legacyAnnouncementSettingsKey:"accessibility.alert.error",announcementMessage:l.localize(1635,"Error on Line"),settingsKey:"accessibility.signals.lineHasError"}),H.warningOnLine=H.register({name:l.localize(1636,"Warning on Line"),sound:Oe.warning,legacySoundSettingsKey:"audioCues.lineHasWarning",legacyAnnouncementSettingsKey:"accessibility.alert.warning",announcementMessage:l.localize(1637,"Warning on Line"),settingsKey:"accessibility.signals.lineHasWarning"}),H.foldedArea=H.register({name:l.localize(1638,"Folded Area on Line"),sound:Oe.foldedArea,legacySoundSettingsKey:"audioCues.lineHasFoldedArea",legacyAnnouncementSettingsKey:"accessibility.alert.foldedArea",announcementMessage:l.localize(1639,"Folded"),settingsKey:"accessibility.signals.lineHasFoldedArea"}),H.break=H.register({name:l.localize(1640,"Breakpoint on Line"),sound:Oe.break,legacySoundSettingsKey:"audioCues.lineHasBreakpoint",legacyAnnouncementSettingsKey:"accessibility.alert.breakpoint",announcementMessage:l.localize(1641,"Breakpoint"),settingsKey:"accessibility.signals.lineHasBreakpoint"}),H.inlineSuggestion=H.register({name:l.localize(1642,"Inline Suggestion on Line"),sound:Oe.quickFixes,legacySoundSettingsKey:"audioCues.lineHasInlineSuggestion",settingsKey:"accessibility.signals.lineHasInlineSuggestion"}),H.nextEditSuggestion=H.register({name:l.localize(1643,"Next Edit Suggestion on Line"),sound:Oe.nextEditSuggestion,legacySoundSettingsKey:"audioCues.nextEditSuggestion",settingsKey:"accessibility.signals.nextEditSuggestion",announcementMessage:l.localize(1644,"Next Edit Suggestion")}),H.terminalQuickFix=H.register({name:l.localize(1645,"Terminal Quick Fix"),sound:Oe.quickFixes,legacySoundSettingsKey:"audioCues.terminalQuickFix",legacyAnnouncementSettingsKey:"accessibility.alert.terminalQuickFix",announcementMessage:l.localize(1646,"Quick Fix"),settingsKey:"accessibility.signals.terminalQuickFix"}),H.onDebugBreak=H.register({name:l.localize(1647,"Debugger Stopped on Breakpoint"),sound:Oe.break,legacySoundSettingsKey:"audioCues.onDebugBreak",legacyAnnouncementSettingsKey:"accessibility.alert.onDebugBreak",announcementMessage:l.localize(1648,"Breakpoint"),settingsKey:"accessibility.signals.onDebugBreak"}),H.noInlayHints=H.register({name:l.localize(1649,"No Inlay Hints on Line"),sound:Oe.error,legacySoundSettingsKey:"audioCues.noInlayHints",legacyAnnouncementSettingsKey:"accessibility.alert.noInlayHints",announcementMessage:l.localize(1650,"No Inlay Hints"),settingsKey:"accessibility.signals.noInlayHints"}),H.taskCompleted=H.register({name:l.localize(1651,"Task Completed"),sound:Oe.taskCompleted,legacySoundSettingsKey:"audioCues.taskCompleted",legacyAnnouncementSettingsKey:"accessibility.alert.taskCompleted",announcementMessage:l.localize(1652,"Task Completed"),settingsKey:"accessibility.signals.taskCompleted"}),H.taskFailed=H.register({name:l.localize(1653,"Task Failed"),sound:Oe.taskFailed,legacySoundSettingsKey:"audioCues.taskFailed",legacyAnnouncementSettingsKey:"accessibility.alert.taskFailed",announcementMessage:l.localize(1654,"Task Failed"),settingsKey:"accessibility.signals.taskFailed"}),H.terminalCommandFailed=H.register({name:l.localize(1655,"Terminal Command Failed"),sound:Oe.error,legacySoundSettingsKey:"audioCues.terminalCommandFailed",legacyAnnouncementSettingsKey:"accessibility.alert.terminalCommandFailed",announcementMessage:l.localize(1656,"Command Failed"),settingsKey:"accessibility.signals.terminalCommandFailed"}),H.terminalCommandSucceeded=H.register({name:l.localize(1657,"Terminal Command Succeeded"),sound:Oe.terminalCommandSucceeded,announcementMessage:l.localize(1658,"Command Succeeded"),settingsKey:"accessibility.signals.terminalCommandSucceeded"}),H.terminalBell=H.register({name:l.localize(1659,"Terminal Bell"),sound:Oe.terminalBell,legacySoundSettingsKey:"audioCues.terminalBell",legacyAnnouncementSettingsKey:"accessibility.alert.terminalBell",announcementMessage:l.localize(1660,"Terminal Bell"),settingsKey:"accessibility.signals.terminalBell"}),H.notebookCellCompleted=H.register({name:l.localize(1661,"Notebook Cell Completed"),sound:Oe.taskCompleted,legacySoundSettingsKey:"audioCues.notebookCellCompleted",legacyAnnouncementSettingsKey:"accessibility.alert.notebookCellCompleted",announcementMessage:l.localize(1662,"Notebook Cell Completed"),settingsKey:"accessibility.signals.notebookCellCompleted"}),H.notebookCellFailed=H.register({name:l.localize(1663,"Notebook Cell Failed"),sound:Oe.taskFailed,legacySoundSettingsKey:"audioCues.notebookCellFailed",legacyAnnouncementSettingsKey:"accessibility.alert.notebookCellFailed",announcementMessage:l.localize(1664,"Notebook Cell Failed"),settingsKey:"accessibility.signals.notebookCellFailed"}),H.diffLineInserted=H.register({name:l.localize(1665,"Diff Line Inserted"),sound:Oe.diffLineInserted,legacySoundSettingsKey:"audioCues.diffLineInserted",settingsKey:"accessibility.signals.diffLineInserted"}),H.diffLineDeleted=H.register({name:l.localize(1666,"Diff Line Deleted"),sound:Oe.diffLineDeleted,legacySoundSettingsKey:"audioCues.diffLineDeleted",settingsKey:"accessibility.signals.diffLineDeleted"}),H.diffLineModified=H.register({name:l.localize(1667,"Diff Line Modified"),sound:Oe.diffLineModified,legacySoundSettingsKey:"audioCues.diffLineModified",settingsKey:"accessibility.signals.diffLineModified"}),H.chatEditModifiedFile=H.register({name:l.localize(1668,"Chat Edit Modified File"),sound:Oe.chatEditModifiedFile,announcementMessage:l.localize(1669,"File Modified from Chat Edits"),settingsKey:"accessibility.signals.chatEditModifiedFile"}),H.chatRequestSent=H.register({name:l.localize(1670,"Chat Request Sent"),sound:Oe.requestSent,legacySoundSettingsKey:"audioCues.chatRequestSent",legacyAnnouncementSettingsKey:"accessibility.alert.chatRequestSent",announcementMessage:l.localize(1671,"Chat Request Sent"),settingsKey:"accessibility.signals.chatRequestSent"}),H.chatResponseReceived=H.register({name:l.localize(1672,"Chat Response Received"),legacySoundSettingsKey:"audioCues.chatResponseReceived",sound:{randomOneOf:[Oe.responseReceived1,Oe.responseReceived2,Oe.responseReceived3,Oe.responseReceived4]},settingsKey:"accessibility.signals.chatResponseReceived"}),H.codeActionTriggered=H.register({name:l.localize(1673,"Code Action Request Triggered"),sound:Oe.codeActionTriggered,legacySoundSettingsKey:"audioCues.codeActionRequestTriggered",legacyAnnouncementSettingsKey:"accessibility.alert.codeActionRequestTriggered",announcementMessage:l.localize(1674,"Code Action Request Triggered"),settingsKey:"accessibility.signals.codeActionTriggered"}),H.codeActionApplied=H.register({name:l.localize(1675,"Code Action Applied"),legacySoundSettingsKey:"audioCues.codeActionApplied",sound:Oe.codeActionApplied,settingsKey:"accessibility.signals.codeActionApplied"}),H.progress=H.register({name:l.localize(1676,"Progress"),sound:Oe.progress,legacySoundSettingsKey:"audioCues.chatResponsePending",legacyAnnouncementSettingsKey:"accessibility.alert.progress",announcementMessage:l.localize(1677,"Progress"),settingsKey:"accessibility.signals.progress"}),H.clear=H.register({name:l.localize(1678,"Clear"),sound:Oe.clear,legacySoundSettingsKey:"audioCues.clear",legacyAnnouncementSettingsKey:"accessibility.alert.clear",announcementMessage:l.localize(1679,"Clear"),settingsKey:"accessibility.signals.clear"}),H.save=H.register({name:l.localize(1680,"Save"),sound:Oe.save,legacySoundSettingsKey:"audioCues.save",legacyAnnouncementSettingsKey:"accessibility.alert.save",announcementMessage:l.localize(1681,"Save"),settingsKey:"accessibility.signals.save"}),H.format=H.register({name:l.localize(1682,"Format"),sound:Oe.format,legacySoundSettingsKey:"audioCues.format",legacyAnnouncementSettingsKey:"accessibility.alert.format",announcementMessage:l.localize(1683,"Format"),settingsKey:"accessibility.signals.format"}),H.voiceRecordingStarted=H.register({name:l.localize(1684,"Voice Recording Started"),sound:Oe.voiceRecordingStarted,legacySoundSettingsKey:"audioCues.voiceRecordingStarted",settingsKey:"accessibility.signals.voiceRecordingStarted"}),H.voiceRecordingStopped=H.register({name:l.localize(1685,"Voice Recording Stopped"),sound:Oe.voiceRecordingStopped,legacySoundSettingsKey:"audioCues.voiceRecordingStopped",settingsKey:"accessibility.signals.voiceRecordingStopped"}),H.editsKept=H.register({name:l.localize(1686,"Edits Kept"),sound:Oe.editsKept,announcementMessage:l.localize(1687,"Edits Kept"),settingsKey:"accessibility.signals.editsKept"}),H.editsUndone=H.register({name:l.localize(1688,"Undo Edits"),sound:Oe.editsUndone,announcementMessage:l.localize(1689,"Edits Undone"),settingsKey:"accessibility.signals.editsUndone"}),H.chatUserActionRequired=H.register({name:l.localize(1690,"Chat User Action Required"),sound:Oe.chatUserActionRequired,announcementMessage:l.localize(1691,"Chat User Action Required"),settingsKey:"accessibility.signals.chatUserActionRequired"});let xn=H;var xp=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Fs=function(o,e){return function(t,i){e(t,i,o)}},Qc,zu;let yy=class extends l.Disposable{constructor(e,t,i){super(),this._commandService=e,this._keybindingService=t,this._hiddenStates=this._register(new Ly(i))}createMenu(e,t,i){return new Ep(e,this._hiddenStates,{emitEventsForSubmenuChanges:!1,eventDebounceDelay:50,...i},this._commandService,this._keybindingService,t)}getMenuActions(e,t,i){const n=new Ep(e,this._hiddenStates,{emitEventsForSubmenuChanges:!1,eventDebounceDelay:50,...i},this._commandService,this._keybindingService,t),s=n.getActions(i);return n.dispose(),s}resetHiddenStates(e){this._hiddenStates.reset(e)}};yy=xp([Fs(0,zi),Fs(1,xt),Fs(2,Qa)],yy);let Ly=(xl=class{constructor(e){this._storageService=e,this._disposables=new l.DisposableStore,this._onDidChange=new l.Emitter,this.onDidChange=this._onDidChange.event,this._ignoreChangeEvent=!1,this._hiddenByDefaultCache=new Map;try{const t=e.get(Qc._key,0,"{}");this._data=JSON.parse(t)}catch{this._data=Object.create(null)}this._disposables.add(e.onDidChangeValue(0,Qc._key,this._disposables)(()=>{if(!this._ignoreChangeEvent)try{const t=e.get(Qc._key,0,"{}");this._data=JSON.parse(t)}catch(t){console.log("FAILED to read storage after UPDATE",t)}this._onDidChange.fire()}))}dispose(){this._onDidChange.dispose(),this._disposables.dispose()}_isHiddenByDefault(e,t){return this._hiddenByDefaultCache.get(`${e.id}/${t}`)??!1}setDefaultState(e,t,i){this._hiddenByDefaultCache.set(`${e.id}/${t}`,i)}isHidden(e,t){const i=this._isHiddenByDefault(e,t),n=this._data[e.id]?.includes(t)??!1;return i?!n:n}updateHidden(e,t,i){this._isHiddenByDefault(e,t)&&(i=!i);const s=this._data[e.id];if(i)s?s.indexOf(t)<0&&s.push(t):this._data[e.id]=[t];else if(s){const r=s.indexOf(t);r>=0&&l.removeFastWithoutKeepingOrder(s,r),s.length===0&&delete this._data[e.id]}this._persist()}reset(e){if(e===void 0)this._data=Object.create(null),this._persist();else{for(const{id:t}of e)this._data[t]&&delete this._data[t];this._persist()}}_persist(){try{this._ignoreChangeEvent=!0;const e=JSON.stringify(this._data);this._storageService.store(Qc._key,e,0,0)}finally{this._ignoreChangeEvent=!1}}},Qc=xl,xl._key="menu.hiddenCommands",xl);Ly=Qc=xp([Fs(0,Qa)],Ly);class Vu{constructor(e,t){this._id=e,this._collectContextKeysForSubmenus=t,this._menuGroups=[],this._allMenuIds=new Set,this._structureContextKeys=new Set,this._preconditionContextKeys=new Set,this._toggledContextKeys=new Set,this.refresh()}get allMenuIds(){return this._allMenuIds}get structureContextKeys(){return this._structureContextKeys}get preconditionContextKeys(){return this._preconditionContextKeys}get toggledContextKeys(){return this._toggledContextKeys}refresh(){this._menuGroups.length=0,this._allMenuIds.clear(),this._structureContextKeys.clear(),this._preconditionContextKeys.clear(),this._toggledContextKeys.clear();const e=this._sort(Qn.getMenuItems(this._id));let t;for(const i of e){const n=i.group||"";(!t||t[0]!==n)&&(t=[n,[]],this._menuGroups.push(t)),t[1].push(i),this._collectContextKeysAndSubmenuIds(i)}this._allMenuIds.add(this._id)}_sort(e){return e}_collectContextKeysAndSubmenuIds(e){if(Vu._fillInKbExprKeys(e.when,this._structureContextKeys),Zl(e)){if(e.command.precondition&&Vu._fillInKbExprKeys(e.command.precondition,this._preconditionContextKeys),e.command.toggled){const t=e.command.toggled.condition||e.command.toggled;Vu._fillInKbExprKeys(t,this._toggledContextKeys)}}else this._collectContextKeysForSubmenus&&(Qn.getMenuItems(e.submenu).forEach(this._collectContextKeysAndSubmenuIds,this),this._allMenuIds.add(e.submenu))}static _fillInKbExprKeys(e,t){if(e)for(const i of e.keys())t.add(i)}}let Dy=zu=class extends Vu{constructor(e,t,i,n,s,r){super(e,i),this._hiddenStates=t,this._commandService=n,this._keybindingService=s,this._contextKeyService=r,this.refresh()}createActionGroups(e){const t=[];for(const i of this._menuGroups){const[n,s]=i;let r;for(const a of s)if(this._contextKeyService.contextMatchesRules(a.when)){const c=Zl(a);c&&this._hiddenStates.setDefaultState(this._id,a.command.id,!!a.isHiddenByDefault);const h=r9(this._id,c?a.command:a,this._hiddenStates);if(c){const d=XR(this._commandService,this._keybindingService,a.command.id,a.when);(r??=[]).push(new _.MenuItemAction(a.command,a.alt,e,h,d,this._contextKeyService,this._commandService))}else{const d=new zu(a.submenu,this._hiddenStates,this._collectContextKeysForSubmenus,this._commandService,this._keybindingService,this._contextKeyService).createActionGroups(e),u=ft.join(...d.map(f=>f[1]));u.length>0&&(r??=[]).push(new sa(a,h,u))}}r&&r.length>0&&t.push([n,r])}return t}_sort(e){return e.sort(zu._compareMenuItems)}static _compareMenuItems(e,t){const i=e.group,n=t.group;if(i!==n){if(i){if(!n)return-1}else return 1;if(i==="navigation")return-1;if(n==="navigation")return 1;const a=i.localeCompare(n);if(a!==0)return a}const s=e.order||0,r=t.order||0;return sr?1:zu._compareTitles(Zl(e)?e.command.title:e.title,Zl(t)?t.command.title:t.title)}static _compareTitles(e,t){const i=typeof e=="string"?e:e.original,n=typeof t=="string"?t:t.original;return i.localeCompare(n)}};Dy=zu=xp([Fs(3,zi),Fs(4,xt),Fs(5,be)],Dy);let Ep=class{constructor(e,t,i,n,s,r){this._disposables=new l.DisposableStore,this._menuInfo=new Dy(e,t,i.emitEventsForSubmenuChanges,n,s,r);const a=new l.RunOnceScheduler(()=>{this._menuInfo.refresh(),this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!0,isToggleChange:!0})},i.eventDebounceDelay);this._disposables.add(a),this._disposables.add(Qn.onDidChangeMenu(u=>{for(const f of this._menuInfo.allMenuIds)if(u.has(f)){a.schedule();break}}));const c=this._disposables.add(new l.DisposableStore),h=u=>{let f=!1,g=!1,m=!1;for(const p of u)if(f=f||p.isStructuralChange,g=g||p.isEnablementChange,m=m||p.isToggleChange,f&&g&&m)break;return{menu:this,isStructuralChange:f,isEnablementChange:g,isToggleChange:m}},d=()=>{c.add(r.onDidChangeContext(u=>{const f=u.affectsSome(this._menuInfo.structureContextKeys),g=u.affectsSome(this._menuInfo.preconditionContextKeys),m=u.affectsSome(this._menuInfo.toggledContextKeys);(f||g||m)&&this._onDidChange.fire({menu:this,isStructuralChange:f,isEnablementChange:g,isToggleChange:m})})),c.add(t.onDidChange(u=>{this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!1,isToggleChange:!1})}))};this._onDidChange=new l.DebounceEmitter({onWillAddFirstListener:d,onDidRemoveLastListener:c.clear.bind(c),delay:i.eventDebounceDelay,merge:h}),this.onDidChange=this._onDidChange.event}getActions(e){return this._menuInfo.createActionGroups(e)}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}};Ep=xp([Fs(3,zi),Fs(4,xt),Fs(5,be)],Ep);function r9(o,e,t){const i=aB(e)?e.submenu.id:e.id,n=typeof e.title=="string"?e.title:e.title.value,s=Yo({id:`hide/${o.id}/${i}`,label:l.localize(1703,"Hide '{0}'",n),run(){t.updateHidden(o,i,!0)}}),r=Yo({id:`toggle/${o.id}/${i}`,label:n,get checked(){return!t.isHidden(o,i)},run(){t.updateHidden(o,i,!!this.checked)}});return{hide:s,toggle:r,get isHidden(){return!r.checked}}}function XR(o,e,t,i=void 0,n=!0){return Yo({id:`configureKeybinding/${t}`,label:l.localize(1704,"Configure Keybinding"),enabled:n,run(){const r=!!!e.lookupKeybinding(t)&&i?i.serialize():void 0;o.executeCommand("workbench.action.openGlobalKeybindings",`@command:${t}`+(r?` +when:${r}`:""))}})}var a9=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},JR=function(o,e){return function(t,i){e(t,i,o)}},xy;const WR="application/vnd.code.resources";let Ey=(El=class extends l.Disposable{constructor(e,t){super(),this.layoutService=e,this.logService=t,this.mapTextToType=new Map,this.findText="",this.resources=[],this.resourcesStateHash=void 0,($r||PD)&&this.installWebKitWriteTextWorkaround(),this._register(l.Event.runAndSubscribe(id,({window:i,disposables:n})=>{n.add(R(i.document,"copy",()=>this.clearResourcesState()))},{window:Ae,disposables:this._store}))}triggerPaste(){this.logService.trace("BrowserClipboardService#triggerPaste")}installWebKitWriteTextWorkaround(){const e=()=>{const t=new l.DeferredPromise;this.webKitPendingClipboardWritePromise&&!this.webKitPendingClipboardWritePromise.isSettled&&this.webKitPendingClipboardWritePromise.cancel(),this.webKitPendingClipboardWritePromise=t,Le().navigator.clipboard.write([new ClipboardItem({"text/plain":t.p})]).catch(async i=>{(!(i instanceof Error)||i.name!=="NotAllowedError"||!t.isRejected)&&this.logService.error(i)})};this._register(l.Event.runAndSubscribe(this.layoutService.onDidAddContainer,({container:t,disposables:i})=>{i.add(R(t,"click",e)),i.add(R(t,"keydown",e))},{container:this.layoutService.mainContainer,disposables:this._store}))}async writeText(e,t){if(this.logService.trace("BrowserClipboardService#writeText called with type:",t," text.length:",e.length),this.clearResourcesState(),t){this.mapTextToType.set(t,e),this.logService.trace("BrowserClipboardService#writeText");return}if(this.webKitPendingClipboardWritePromise)return this.webKitPendingClipboardWritePromise.complete(e);try{return this.logService.trace("before navigator.clipboard.writeText"),await Le().navigator.clipboard.writeText(e)}catch(i){console.error(i)}this.fallbackWriteText(e)}fallbackWriteText(e){this.logService.trace("BrowserClipboardService#fallbackWriteText");const t=od(),i=t.activeElement,n=t.body.appendChild(Q("textarea",{"aria-hidden":!0}));n.style.height="1px",n.style.width="1px",n.style.position="absolute",n.value=e,n.focus(),n.select(),t.execCommand("copy"),Ve(i)&&i.focus(),n.remove()}async readText(e){if(this.logService.trace("BrowserClipboardService#readText called with type:",e),e){const t=this.mapTextToType.get(e)||"";return this.logService.trace("BrowserClipboardService#readText text.length:",t.length),t}try{const t=await Le().navigator.clipboard.readText();return this.logService.trace("BrowserClipboardService#readText text.length:",t.length),t}catch(t){console.error(t)}return""}async readFindText(){return this.findText}async writeFindText(e){this.findText=e}async readResources(){try{const t=await Le().navigator.clipboard.read();for(const i of t)if(i.types.includes(`web ${WR}`)){const n=await i.getType(`web ${WR}`);return JSON.parse(await n.text()).map(r=>l.URI.from(r))}}catch{}const e=await this.computeResourcesStateHash();return this.resourcesStateHash!==e&&this.clearResourcesState(),this.resources}async computeResourcesStateHash(){if(this.resources.length===0)return;const e=await this.readText();return l.hash(e.substring(0,xy.MAX_RESOURCE_STATE_SOURCE_LENGTH))}clearInternalState(){this.clearResourcesState()}clearResourcesState(){this.resources=[],this.resourcesStateHash=void 0}},xy=El,El.MAX_RESOURCE_STATE_SOURCE_LENGTH=1e3,El);Ey=xy=a9([JR(0,Os),JR(1,ei)],Ey);const Ip=le("clipboardService");function Tp(o){return Object.isFrozen(o)?o:l.deepFreeze(o)}class Tt{static createEmptyModel(e){return new Tt({},[],[],void 0,e)}constructor(e,t,i,n,s){this._contents=e,this._keys=t,this._overrides=i,this._raw=n,this.logService=s,this.overrideConfigurations=new Map}get rawConfiguration(){if(!this._rawConfiguration)if(this._raw){const e=(Array.isArray(this._raw)?this._raw:[this._raw]).map(t=>{if(t instanceof Tt)return t;const i=new l9("",this.logService);return i.parseRaw(t),i.configurationModel});this._rawConfiguration=e.reduce((t,i)=>i===t?i:t.merge(i),e[0])}else this._rawConfiguration=this;return this._rawConfiguration}get contents(){return this._contents}get overrides(){return this._overrides}get keys(){return this._keys}get raw(){if(this._raw&&!(Array.isArray(this._raw)&&this._raw.every(e=>e instanceof Tt)))return this._raw}isEmpty(){return this._keys.length===0&&Object.keys(this._contents).length===0&&this._overrides.length===0}getValue(e){return e?Qx(this.contents,e):this.contents}inspect(e,t){const i=this;return{get value(){return Tp(i.rawConfiguration.getValue(e))},get override(){return t?Tp(i.rawConfiguration.getOverrideValue(e,t)):void 0},get merged(){return Tp(t?i.rawConfiguration.override(t).getValue(e):i.rawConfiguration.getValue(e))},get overrides(){const n=[];for(const{contents:s,identifiers:r,keys:a}of i.rawConfiguration.overrides){const c=new Tt(s,a,[],void 0,i.logService).getValue(e);c!==void 0&&n.push({identifiers:r,value:c})}return n.length?Tp(n):void 0}}}getOverrideValue(e,t){const i=this.getContentsForOverrideIdentifer(t);return i?e?Qx(i,e):i:void 0}override(e){let t=this.overrideConfigurations.get(e);return t||(t=this.createOverrideConfigurationModel(e),this.overrideConfigurations.set(e,t)),t}merge(...e){const t=l.deepClone(this.contents),i=l.deepClone(this.overrides),n=[...this.keys],s=this._raw?Array.isArray(this._raw)?[...this._raw]:[this._raw]:[this];for(const r of e)if(s.push(...r._raw?Array.isArray(r._raw)?r._raw:[r._raw]:[r]),!r.isEmpty()){this.mergeContents(t,r.contents);for(const a of r.overrides){const[c]=i.filter(h=>l.equals(h.identifiers,a.identifiers));c?(this.mergeContents(c.contents,a.contents),c.keys.push(...a.keys),c.keys=l.distinct(c.keys)):i.push(l.deepClone(a))}for(const a of r.keys)n.indexOf(a)===-1&&n.push(a)}return new Tt(t,n,i,!s.length||s.every(r=>r instanceof Tt)?void 0:s,this.logService)}createOverrideConfigurationModel(e){const t=this.getContentsForOverrideIdentifer(e);if(!t||typeof t!="object"||!Object.keys(t).length)return this;const i={};for(const n of l.distinct([...Object.keys(this.contents),...Object.keys(t)])){let s=this.contents[n];const r=t[n];r&&(typeof s=="object"&&typeof r=="object"?(s=l.deepClone(s),this.mergeContents(s,r)):s=r),i[n]=s}return new Tt(i,this.keys,this.overrides,void 0,this.logService)}mergeContents(e,t){for(const i of Object.keys(t)){if(i in e&&l.isObject(e[i])&&l.isObject(t[i])){this.mergeContents(e[i],t[i]);continue}e[i]=l.deepClone(t[i])}}getContentsForOverrideIdentifer(e){let t=null,i=null;const n=s=>{s&&(i?this.mergeContents(i,s):i=l.deepClone(s))};for(const s of this.overrides)s.identifiers.length===1&&s.identifiers[0]===e?t=s.contents:s.identifiers.includes(e)&&n(s.contents);return n(t),i}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}setValue(e,t){this.updateValue(e,t,!1)}removeValue(e){const t=this.keys.indexOf(e);t!==-1&&(this.keys.splice(t,1),YB(this.contents,e),Jo.test(e)&&this.overrides.splice(this.overrides.findIndex(i=>l.equals(i.identifiers,wg(e))),1))}updateValue(e,t,i){if(Yx(this.contents,e,t,n=>this.logService.error(n)),i=i||this.keys.indexOf(e)===-1,i&&this.keys.push(e),Jo.test(e)){const n=this.contents[e],s=wg(e),r={identifiers:s,keys:Object.keys(n),contents:LC(n,c=>this.logService.error(c))},a=this.overrides.findIndex(c=>l.equals(c.identifiers,s));a!==-1?this.overrides[a]=r:this.overrides.push(r)}}}class l9{constructor(e,t){this._name=e,this.logService=t,this._raw=null,this._configurationModel=null,this._restrictedConfigurations=[]}get configurationModel(){return this._configurationModel||Tt.createEmptyModel(this.logService)}parseRaw(e,t){this._raw=e;const{contents:i,keys:n,overrides:s,restricted:r,hasExcludedProperties:a}=this.doParseRaw(e,t);this._configurationModel=new Tt(i,n,s,a?[e]:void 0,this.logService),this._restrictedConfigurations=r||[]}doParseRaw(e,t){const i=St.as(Xo.Configuration),n=i.getConfigurationProperties(),s=i.getExcludedConfigurationProperties(),r=this.filter(e,n,s,!0,t);e=r.raw;const a=LC(e,d=>this.logService.error(`Conflict in settings file ${this._name}: ${d}`)),c=Object.keys(e),h=this.toOverrides(e,d=>this.logService.error(`Conflict in settings file ${this._name}: ${d}`));return{contents:a,keys:c,overrides:h,restricted:r.restricted,hasExcludedProperties:r.hasExcludedProperties}}filter(e,t,i,n,s){let r=!1;if(!s?.scopes&&!s?.skipRestricted&&!s?.skipUnregistered&&!s?.exclude?.length)return{raw:e,restricted:[],hasExcludedProperties:r};const a={},c=[];for(const h in e)if(Jo.test(h)&&n){const d=this.filter(e[h],t,i,!1,s);a[h]=d.raw,r=r||d.hasExcludedProperties,c.push(...d.restricted)}else{const d=t[h];d?.restricted&&c.push(h),this.shouldInclude(h,d,i,s)?a[h]=e[h]:r=!0}return{raw:a,restricted:c,hasExcludedProperties:r}}shouldInclude(e,t,i,n){if(n.exclude?.includes(e))return!1;if(n.include?.includes(e))return!0;if(n.skipRestricted&&t?.restricted||n.skipUnregistered&&!t)return!1;const s=t??i[e],r=s?typeof s.scope<"u"?s.scope:4:void 0;return r===void 0||n.scopes===void 0?!0:n.scopes.includes(r)}toOverrides(e,t){const i=[];for(const n of Object.keys(e))if(Jo.test(n)){const s={},r=e[n];for(const a in r)s[a]=r[a];i.push({identifiers:wg(n),keys:Object.keys(s),contents:LC(s,t)})}return i}}class c9{constructor(e,t,i,n,s,r,a,c,h,d,u,f,g){this.key=e,this.overrides=t,this._value=i,this.overrideIdentifiers=n,this.defaultConfiguration=s,this.policyConfiguration=r,this.applicationConfiguration=a,this.userConfiguration=c,this.localUserConfiguration=h,this.remoteUserConfiguration=d,this.workspaceConfiguration=u,this.folderConfigurationModel=f,this.memoryConfigurationModel=g}toInspectValue(e){return e?.value!==void 0||e?.override!==void 0||e?.overrides!==void 0?e:void 0}get defaultInspectValue(){return this._defaultInspectValue||(this._defaultInspectValue=this.defaultConfiguration.inspect(this.key,this.overrides.overrideIdentifier)),this._defaultInspectValue}get defaultValue(){return this.defaultInspectValue.merged}get policyInspectValue(){return this._policyInspectValue===void 0&&(this._policyInspectValue=this.policyConfiguration?this.policyConfiguration.inspect(this.key):null),this._policyInspectValue}get policyValue(){return this.policyInspectValue?.merged}get applicationInspectValue(){return this._applicationInspectValue===void 0&&(this._applicationInspectValue=this.applicationConfiguration?this.applicationConfiguration.inspect(this.key):null),this._applicationInspectValue}get applicationValue(){return this.applicationInspectValue?.merged}get userInspectValue(){return this._userInspectValue||(this._userInspectValue=this.userConfiguration.inspect(this.key,this.overrides.overrideIdentifier)),this._userInspectValue}get userValue(){return this.userInspectValue.merged}get user(){return this.toInspectValue(this.userInspectValue)}get workspaceInspectValue(){return this._workspaceInspectValue===void 0&&(this._workspaceInspectValue=this.workspaceConfiguration?this.workspaceConfiguration.inspect(this.key,this.overrides.overrideIdentifier):null),this._workspaceInspectValue}get workspaceValue(){return this.workspaceInspectValue?.merged}get workspaceFolderInspectValue(){return this._workspaceFolderInspectValue===void 0&&(this._workspaceFolderInspectValue=this.folderConfigurationModel?this.folderConfigurationModel.inspect(this.key,this.overrides.overrideIdentifier):null),this._workspaceFolderInspectValue}get workspaceFolderValue(){return this.workspaceFolderInspectValue?.merged}get memoryInspectValue(){return this._memoryInspectValue===void 0&&(this._memoryInspectValue=this.memoryConfigurationModel.inspect(this.key,this.overrides.overrideIdentifier)),this._memoryInspectValue}get memoryValue(){return this.memoryInspectValue.merged}}class Np{constructor(e,t,i,n,s,r,a,c,h,d){this._defaultConfiguration=e,this._policyConfiguration=t,this._applicationConfiguration=i,this._localUserConfiguration=n,this._remoteUserConfiguration=s,this._workspaceConfiguration=r,this._folderConfigurations=a,this._memoryConfiguration=c,this._memoryConfigurationByResource=h,this.logService=d,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new l.ResourceMap,this._userConfiguration=null}getValue(e,t,i){return this.getConsolidatedConfigurationModel(e,t,i).getValue(e)}updateValue(e,t,i={}){let n;i.resource?(n=this._memoryConfigurationByResource.get(i.resource),n||(n=Tt.createEmptyModel(this.logService),this._memoryConfigurationByResource.set(i.resource,n))):n=this._memoryConfiguration,t===void 0?n.removeValue(e):n.setValue(e,t),i.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(e,t,i){const n=this.getConsolidatedConfigurationModel(e,t,i),s=this.getFolderConfigurationModelForResource(t.resource,i),r=t.resource?this._memoryConfigurationByResource.get(t.resource)||this._memoryConfiguration:this._memoryConfiguration,a=new Set;for(const c of n.overrides)for(const h of c.identifiers)n.getOverrideValue(e,h)!==void 0&&a.add(h);return new c9(e,t,n.getValue(e),a.size?[...a]:void 0,this._defaultConfiguration,this._policyConfiguration.isEmpty()?void 0:this._policyConfiguration,this.applicationConfiguration.isEmpty()?void 0:this.applicationConfiguration,this.userConfiguration,this.localUserConfiguration,this.remoteUserConfiguration,i?this._workspaceConfiguration:void 0,s||void 0,r)}get applicationConfiguration(){return this._applicationConfiguration}get userConfiguration(){if(!this._userConfiguration)if(this._remoteUserConfiguration.isEmpty())this._userConfiguration=this._localUserConfiguration;else{const e=this._localUserConfiguration.merge(this._remoteUserConfiguration);this._userConfiguration=new Tt(e.contents,e.keys,e.overrides,void 0,this.logService)}return this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){return this._remoteUserConfiguration}getConsolidatedConfigurationModel(e,t,i){let n=this.getConsolidatedConfigurationModelForResource(t,i);if(t.overrideIdentifier&&(n=n.override(t.overrideIdentifier)),!this._policyConfiguration.isEmpty()&&this._policyConfiguration.getValue(e)!==void 0){n=n.merge();for(const s of this._policyConfiguration.keys)n.setValue(s,this._policyConfiguration.getValue(s))}return n}getConsolidatedConfigurationModelForResource({resource:e},t){let i=this.getWorkspaceConsolidatedConfiguration();if(t&&e){const n=t.getFolder(e);n&&(i=this.getFolderConsolidatedConfiguration(n.uri)||i);const s=this._memoryConfigurationByResource.get(e);s&&(i=i.merge(s))}return i}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.applicationConfiguration,this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration)),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(e){let t=this._foldersConsolidatedConfigurations.get(e);if(!t){const i=this.getWorkspaceConsolidatedConfiguration(),n=this._folderConfigurations.get(e);n?(t=i.merge(n),this._foldersConsolidatedConfigurations.set(e,t)):t=i}return t}getFolderConfigurationModelForResource(e,t){if(t&&e){const i=t.getFolder(e);if(i)return this._folderConfigurations.get(i.uri)}}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},policy:{contents:this._policyConfiguration.contents,overrides:this._policyConfiguration.overrides,keys:this._policyConfiguration.keys},application:{contents:this.applicationConfiguration.contents,overrides:this.applicationConfiguration.overrides,keys:this.applicationConfiguration.keys,raw:Array.isArray(this.applicationConfiguration.raw)?void 0:this.applicationConfiguration.raw},userLocal:{contents:this.localUserConfiguration.contents,overrides:this.localUserConfiguration.overrides,keys:this.localUserConfiguration.keys,raw:Array.isArray(this.localUserConfiguration.raw)?void 0:this.localUserConfiguration.raw},userRemote:{contents:this.remoteUserConfiguration.contents,overrides:this.remoteUserConfiguration.overrides,keys:this.remoteUserConfiguration.keys,raw:Array.isArray(this.remoteUserConfiguration.raw)?void 0:this.remoteUserConfiguration.raw},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce((e,t)=>{const{contents:i,overrides:n,keys:s}=this._folderConfigurations.get(t);return e.push([t,{contents:i,overrides:n,keys:s}]),e},[])}}static parse(e,t){const i=this.parseConfigurationModel(e.defaults,t),n=this.parseConfigurationModel(e.policy,t),s=this.parseConfigurationModel(e.application,t),r=this.parseConfigurationModel(e.userLocal,t),a=this.parseConfigurationModel(e.userRemote,t),c=this.parseConfigurationModel(e.workspace,t),h=e.folders.reduce((d,u)=>(d.set(l.URI.revive(u[0]),this.parseConfigurationModel(u[1],t)),d),new l.ResourceMap);return new Np(i,n,s,r,a,c,h,Tt.createEmptyModel(t),new l.ResourceMap,t)}static parseConfigurationModel(e,t){return new Tt(e.contents,e.keys,e.overrides,e.raw,t)}}class h9{constructor(e,t,i,n,s){this.change=e,this.previous=t,this.currentConfiguraiton=i,this.currentWorkspace=n,this.logService=s,this._marker=` +`,this._markerCode1=this._marker.charCodeAt(0),this._markerCode2=46,this.affectedKeys=new Set,this._previousConfiguration=void 0;for(const r of e.keys)this.affectedKeys.add(r);for(const[,r]of e.overrides)for(const a of r)this.affectedKeys.add(a);this._affectsConfigStr=this._marker;for(const r of this.affectedKeys)this._affectsConfigStr+=r+this._marker}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=Np.parse(this.previous.data,this.logService)),this._previousConfiguration}affectsConfiguration(e,t){const i=this._marker+e,n=this._affectsConfigStr.indexOf(i);if(n<0)return!1;const s=n+i.length;if(s>=this._affectsConfigStr.length)return!1;const r=this._affectsConfigStr.charCodeAt(s);if(r!==this._markerCode1&&r!==this._markerCode2)return!1;if(t){const a=this.previousConfiguration?this.previousConfiguration.getValue(e,t,this.previous?.workspace):void 0,c=this.currentConfiguraiton.getValue(e,t,this.currentWorkspace);return!l.equals$1(a,c)}return!0}}class d9 extends l.Disposable{get configurationModel(){return this._configurationModel}constructor(e){super(),this.logService=e,this._configurationModel=Tt.createEmptyModel(e)}reload(){return this.resetConfigurationModel(),this.configurationModel}getConfigurationDefaultOverrides(){return{}}resetConfigurationModel(){this._configurationModel=Tt.createEmptyModel(this.logService);const e=St.as(Xo.Configuration).getConfigurationProperties();this.updateConfigurationModel(Object.keys(e),e)}updateConfigurationModel(e,t){const i=this.getConfigurationDefaultOverrides();for(const n of e){const s=i[n],r=t[n];s!==void 0?this._configurationModel.setValue(n,s):r?this._configurationModel.setValue(n,this.getDefaultValue(n,r)):this._configurationModel.removeValue(n)}}getDefaultValue(e,t){return l.deepClone(t.default)}}class u9{constructor(){this._value="",this._pos=0}reset(e){return this._value=e,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos=0;t--,this._valueLen--){const i=this._value.charCodeAt(t);if(!(i===47||this._splitOnBackslash&&i===92))break}return this.next()}hasNext(){return this._to!1,t=()=>!1){return new Xc(new m9(e,t))}static forStrings(){return new Xc(new u9)}static forConfigKeys(){return new Xc(new f9)}constructor(e){this._iter=e}clear(){this._root=void 0}set(e,t){const i=this._iter.reset(e);let n;this._root||(this._root=new Rp,this._root.segment=i.value());const s=[];for(n=this._root;;){const a=i.cmp(n.segment);if(a>0)n.left||(n.left=new Rp,n.left.segment=i.value()),s.push([-1,n]),n=n.left;else if(a<0)n.right||(n.right=new Rp,n.right.segment=i.value()),s.push([1,n]),n=n.right;else if(i.hasNext())i.next(),n.mid||(n.mid=new Rp,n.mid.segment=i.value()),s.push([0,n]),n=n.mid;else break}const r=xo.unwrap(n.value);n.value=xo.wrap(t),n.key=e;for(let a=s.length-1;a>=0;a--){const c=s[a][1];c.updateHeight();const h=c.balanceFactor();if(h<-1||h>1){const d=s[a][0],u=s[a+1][0];if(d===1&&u===1)s[a][1]=c.rotateLeft();else if(d===-1&&u===-1)s[a][1]=c.rotateRight();else if(d===1&&u===-1)c.right=s[a+1][1]=s[a+1][1].rotateRight(),s[a][1]=c.rotateLeft();else if(d===-1&&u===1)c.left=s[a+1][1]=s[a+1][1].rotateLeft(),s[a][1]=c.rotateRight();else throw new Error;if(a>0)switch(s[a-1][0]){case-1:s[a-1][1].left=s[a][1];break;case 1:s[a-1][1].right=s[a][1];break;case 0:s[a-1][1].mid=s[a][1];break}else this._root=s[0][1]}}return r}get(e){return xo.unwrap(this._getNode(e)?.value)}_getNode(e){const t=this._iter.reset(e);let i=this._root;for(;i;){const n=t.cmp(i.segment);if(n>0)i=i.left;else if(n<0)i=i.right;else if(t.hasNext())t.next(),i=i.mid;else break}return i}has(e){const t=this._getNode(e);return!(t?.value===void 0&&t?.mid===void 0)}delete(e){return this._delete(e,!1)}deleteSuperstr(e){return this._delete(e,!0)}_delete(e,t){const i=this._iter.reset(e),n=[];let s=this._root;for(;s;){const r=i.cmp(s.segment);if(r>0)n.push([-1,s]),s=s.left;else if(r<0)n.push([1,s]),s=s.right;else if(i.hasNext())i.next(),n.push([0,s]),s=s.mid;else break}if(s){if(t?(s.left=void 0,s.mid=void 0,s.right=void 0,s.height=1):(s.key=void 0,s.value=void 0),!s.mid&&!s.value)if(s.left&&s.right){const r=[[1,s]],a=this._min(s.right,r);if(a.key){s.key=a.key,s.value=a.value,s.segment=a.segment;const c=a.right;if(r.length>1){const[d,u]=r[r.length-1];switch(d){case-1:u.left=c;break;case 0:l.assert(!1);case 1:l.assert(!1)}}else s.right=c;const h=this._balanceByStack(r);if(n.length>0){const[d,u]=n[n.length-1];switch(d){case-1:u.left=h;break;case 0:u.mid=h;break;case 1:u.right=h;break}}else this._root=h}}else{const r=s.left??s.right;if(n.length>0){const[a,c]=n[n.length-1];switch(a){case-1:c.left=r;break;case 0:c.mid=r;break;case 1:c.right=r;break}}else this._root=r}this._root=this._balanceByStack(n)??this._root}}_min(e,t){for(;e.left;)t.push([-1,e]),e=e.left;return e}_balanceByStack(e){for(let t=e.length-1;t>=0;t--){const i=e[t][1];i.updateHeight();const n=i.balanceFactor();if(n>1?(i.right.balanceFactor()>=0||(i.right=i.right.rotateRight()),e[t][1]=i.rotateLeft()):n<-1&&(i.left.balanceFactor()<=0||(i.left=i.left.rotateLeft()),e[t][1]=i.rotateRight()),t>0)switch(e[t-1][0]){case-1:e[t-1][1].left=e[t][1];break;case 1:e[t-1][1].right=e[t][1];break;case 0:e[t-1][1].mid=e[t][1];break}else return e[0][1]}}findSubstr(e){const t=this._iter.reset(e);let i=this._root,n;for(;i;){const s=t.cmp(i.segment);if(s>0)i=i.left;else if(s<0)i=i.right;else if(t.hasNext())t.next(),n=xo.unwrap(i.value)||n,i=i.mid;else break}return i&&xo.unwrap(i.value)||n}findSuperstr(e){return this._findSuperstrOrElement(e,!1)}_findSuperstrOrElement(e,t){const i=this._iter.reset(e);let n=this._root;for(;n;){const s=i.cmp(n.segment);if(s>0)n=n.left;else if(s<0)n=n.right;else if(i.hasNext())i.next(),n=n.mid;else return n.mid?this._entries(n.mid):t?xo.unwrap(n.value):void 0}}forEach(e){for(const[t,i]of this)e(i,t)}*[Symbol.iterator](){yield*this._entries(this._root)}_entries(e){const t=[];return this._dfsEntries(e,t),t[Symbol.iterator]()}_dfsEntries(e,t){e&&(e.left&&this._dfsEntries(e.left,t),e.value!==void 0&&t.push([e.key,xo.unwrap(e.value)]),e.mid&&this._dfsEntries(e.mid,t),e.right&&this._dfsEntries(e.right,t))}}new q("isMac",l.isMacintosh,l.localize(1746,"Whether the operating system is macOS")),new q("isLinux",l.isLinux,l.localize(1747,"Whether the operating system is Linux"));const p9=new q("isWindows",l.isWindows,l.localize(1748,"Whether the operating system is Windows")),_9=new q("isWeb",l.isWeb,l.localize(1749,"Whether the platform is a web browser"));new q("isMacNative",l.isMacintosh&&!l.isWeb,l.localize(1750,"Whether the operating system is macOS on a non-browser platform")),new q("isIOS",l.isIOS,l.localize(1751,"Whether the operating system is iOS")),new q("isMobile",l.isMobile,l.localize(1752,"Whether the platform is a mobile web browser")),new q("isDevelopment",!1,!0),new q("productQualityType","",l.localize(1753,"Quality type of VS Code"));const HR="inputFocus",Mp=new q(HR,!1,l.localize(1754,"Whether keyboard focus is inside an input box"));var b9=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},C9=function(o,e){return function(t,i){e(t,i,o)}};const Uu="data-keybinding-context";class Iy{constructor(e,t){this._id=e,this._parent=t,this._value=Object.create(null),this._value._contextId=e}get value(){return{...this._value}}setValue(e,t){return l.equals$1(this._value[e],t)?!1:(this._value[e]=t,!0)}removeValue(e){return e in this._value?(delete this._value[e],!0):!1}getValue(e){const t=this._value[e];return typeof t>"u"&&this._parent?this._parent.getValue(e):t}}const fb=class fb extends Iy{constructor(){super(-1,null)}setValue(e,t){return!1}removeValue(e){return!1}getValue(e){}};fb.INSTANCE=new fb;let Jc=fb;const wf=class wf extends Iy{constructor(e,t,i){super(e,null),this._configurationService=t,this._values=Xc.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration(n=>{if(n.source===7){const s=Array.from(this._values,([r])=>r);this._values.clear(),i.fire(new tM(s))}else{const s=[];for(const r of n.affectedKeys){const a=`config.${r}`,c=this._values.findSuperstr(a);c!==void 0&&(s.push(...l.Iterable.map(c,([h])=>h)),this._values.deleteSuperstr(a)),this._values.has(a)&&(s.push(a),this._values.delete(a))}i.fire(new tM(s))}})}dispose(){this._listener.dispose()}getValue(e){if(e.indexOf(wf._keyPrefix)!==0)return super.getValue(e);if(this._values.has(e))return this._values.get(e);const t=e.substr(wf._keyPrefix.length),i=this._configurationService.getValue(t);let n;switch(typeof i){case"number":case"boolean":case"string":n=i;break;default:Array.isArray(i)?n=JSON.stringify(i):n=i}return this._values.set(e,n),n}setValue(e,t){return super.setValue(e,t)}removeValue(e){return super.removeValue(e)}};wf._keyPrefix="config.";let Ty=wf;class v9{constructor(e,t,i){this._service=e,this._key=t,this._defaultValue=i,this.reset()}set(e){this._service.setContext(this._key,e)}reset(){typeof this._defaultValue>"u"?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}}class eM{constructor(e){this.key=e}affectsSome(e){return e.has(this.key)}allKeysContainedIn(e){return this.affectsSome(e)}}class tM{constructor(e){this.keys=e}affectsSome(e){for(const t of this.keys)if(e.has(t))return!0;return!1}allKeysContainedIn(e){return this.keys.every(t=>e.has(t))}}class w9{constructor(e){this.events=e}affectsSome(e){for(const t of this.events)if(t.affectsSome(e))return!0;return!1}allKeysContainedIn(e){return this.events.every(t=>t.allKeysContainedIn(e))}}function S9(o,e){return o.allKeysContainedIn(new Set(Object.keys(e)))}class iM extends l.Disposable{get onDidChangeContext(){return this._onDidChangeContext.event}constructor(e){super(),this._onDidChangeContext=this._register(new l.PauseableEmitter({merge:t=>new w9(t)})),this._isDisposed=!1,this._myContextId=e}createKey(e,t){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new v9(this,e,t)}bufferChangeEvents(e){this._onDidChangeContext.pause();try{e()}finally{this._onDidChangeContext.resume()}}createScoped(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new y9(this,e)}contextMatchesRules(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const t=this.getContextValuesContainer(this._myContextId);return e?e.evaluate(t):!0}getContextKeyValue(e){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(e)}setContext(e,t){if(this._isDisposed)return;const i=this.getContextValuesContainer(this._myContextId);i&&i.setValue(e,t)&&this._onDidChangeContext.fire(new eM(e))}removeContext(e){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(e)&&this._onDidChangeContext.fire(new eM(e))}getContext(e){return this._isDisposed?Jc.INSTANCE:this.getContextValuesContainer(L9(e))}dispose(){super.dispose(),this._isDisposed=!0}}let Ny=class extends iM{constructor(e){super(0),this._contexts=new Map,this._lastContextId=0,this.inputFocusedContext=Mp.bindTo(this);const t=this._register(new Ty(this._myContextId,e,this._onDidChangeContext));this._contexts.set(this._myContextId,t),this._register(l.Event.runAndSubscribe(id,({window:i,disposables:n})=>{const s=n.add(new l.MutableDisposable);n.add(R(i,F.FOCUS_IN,()=>{s.value=new l.DisposableStore,this.updateInputContextKeys(i.document,s.value)},!0))},{window:Ae,disposables:this._store}))}updateInputContextKeys(e,t){function i(){return!!e.activeElement&&jn(e.activeElement)}const n=i();if(this.inputFocusedContext.set(n),n){const s=t.add(Xr(e.activeElement));l.Event.once(s.onDidBlur)(()=>{Le().document===e&&this.inputFocusedContext.set(i()),s.dispose()},void 0,t)}}getContextValuesContainer(e){return this._isDisposed?Jc.INSTANCE:this._contexts.get(e)||Jc.INSTANCE}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");const t=++this._lastContextId;return this._contexts.set(t,new Iy(t,this.getContextValuesContainer(e))),t}disposeContext(e){this._isDisposed||this._contexts.delete(e)}};Ny=b9([C9(0,Ge)],Ny);class y9 extends iM{constructor(e,t){if(super(e.createChildContext()),this._parentChangeListener=this._register(new l.MutableDisposable),this._parent=e,this._updateParentChangeListener(),this._domNode=t,this._domNode.hasAttribute(Uu)){let i="";this._domNode.classList&&(i=Array.from(this._domNode.classList.values()).join(", ")),console.error(`Element already has context attribute${i?": "+i:""}`)}this._domNode.setAttribute(Uu,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext(e=>{const i=this._parent.getContextValuesContainer(this._myContextId).value;S9(e,i)||this._onDidChangeContext.fire(e)})}dispose(){this._isDisposed||(this._parentChangeListener.clear(),this._parent.disposeContext(this._myContextId),this._domNode.removeAttribute(Uu),super.dispose())}getContextValuesContainer(e){return this._isDisposed?Jc.INSTANCE:this._parent.getContextValuesContainer(e)}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(e)}disposeContext(e){this._parent.disposeContext(e)}}function L9(o){for(;o;){if(o.hasAttribute(Uu)){const e=o.getAttribute(Uu);return e?parseInt(e,10):NaN}o=o.parentElement}return 0}function D9(o,e,t){o.get(be).createKey(String(e),x9(t))}function x9(o){return l.cloneAndChange(o,e=>{if(typeof e=="object"&&e.$mid===1)return l.URI.revive(e).toString();if(e instanceof l.URI)return e.toString()})}Ut.registerCommand("_setContext",D9),Ut.registerCommand({id:"getContextKeyInfo",handler(){return[...q.all()].sort((o,e)=>o.key.localeCompare(e.key))},metadata:{description:l.localize(1736,"A command that returns information about context keys"),args:[]}}),Ut.registerCommand("_generateContextKeyInfo",function(){const o=[],e=new Set;for(const t of q.all())e.has(t.key)||(e.add(t.key),o.push(t));o.sort((t,i)=>t.key.localeCompare(i.key)),console.log(JSON.stringify(o,void 0,2))});function xH(o){return o}function Eo(o,e){if(o!==void 0){const t=o.match(/^\s*var\((.+)\)$/);if(t){const i=t[1].split(",",2);return i.length===2&&(e=Eo(i[1].trim(),e)),`var(${i[0]}, ${e})`}return o}return e}function nM(o){const e=o.replaceAll(/[^_\-a-z0-9]/gi,"");return e!==o&&console.warn(`CSS ident value ${o} modified to ${e} to be safe for CSS`),e}function yr(o){return`'${o.replaceAll(/'/g,"\\000027")}'`}function Bs(o){return o?Yi`url('${CSS.escape(l.FileAccess.uriToBrowserUri(o).toString(!0))}')`:"url('')"}function Ap(o,e=!1){const t=CSS.escape(o);return!e&&t!==o&&console.warn(`CSS class name ${o} modified to ${t} to be safe for CSS`),t}function Yi(o,...e){return o.reduce((t,i,n)=>{const s=e[n]||"";return t+i+s},"")}class Ry{constructor(){this._parts=[]}push(...e){this._parts.push(...e)}join(e=` +`){return this._parts.join(e)}}let Op=()=>({get delay(){return-1},dispose:()=>{},showHover:()=>{}});const E9=new l.Lazy(()=>Op("mouse",!1)),I9=new l.Lazy(()=>Op("element",!1));function T9(o){Op=o}function Io(o){return o==="element"?I9.value:E9.value}function sM(){return Op("element",!0)}let oM={showInstantHover:()=>{},showDelayedHover:()=>{},setupDelayedHover:()=>l.Disposable.None,setupDelayedHoverAtMouse:()=>l.Disposable.None,hideHover:()=>{},showAndFocusLastHover:()=>{},setupManagedHover:()=>({dispose:()=>{},show:()=>{},hide:()=>{},update:()=>{}}),showManagedHover:()=>{}};function N9(o){oM=o}function En(){return oM}class R9{constructor(e){this.spliceables=e}splice(e,t,i){this.spliceables.forEach(n=>n.splice(e,t,i))}}const Pp="notSelectable";class Ja extends Error{constructor(e,t){super(`ListError [${e}] ${t}`)}}function rM(o,e){const t=[];for(const i of e){if(o.start>=i.range.end)continue;if(o.ende.concat(t),[]))}class O9{get paddingTop(){return this._paddingTop}set paddingTop(e){this._size=this._size+e-this._paddingTop,this._paddingTop=e}constructor(e){this.groups=[],this._size=0,this._paddingTop=0,this._paddingTop=e??0,this._size=this._paddingTop}splice(e,t,i=[]){const n=i.length-t,s=rM({start:0,end:e},this.groups),r=rM({start:e+t,end:Number.POSITIVE_INFINITY},this.groups).map(c=>({range:My(c.range,n),size:c.size})),a=i.map((c,h)=>({range:{start:e+h,end:e+h+1},size:c.size}));this.groups=A9(s,a,r),this._size=this._paddingTop+this.groups.reduce((c,h)=>c+h.size*(h.range.end-h.range.start),0)}get count(){const e=this.groups.length;return e?this.groups[e-1].range.end:0}get size(){return this._size}indexAt(e){if(e<0)return-1;if(e{for(const i of e)this.getRenderer(t).disposeTemplate(i.templateData),i.templateData=null}),this.cache.clear(),this.transactionNodesPendingRemoval.clear()}getRenderer(e){const t=this.renderers.get(e);if(!t)throw new Error(`No renderer found for ${e}`);return t}}function k9(o,e,t,i=[]){if(!o.dataTransfer)return;const n=Q(".monaco-drag-image");n.textContent=t,n.classList.add(...i),(a=>{for(;a&&!a.classList.contains("monaco-workbench");)a=a.parentElement;return a||e.ownerDocument.body})(e).appendChild(n),o.dataTransfer.setDragImage(n,-10,-10),setTimeout(()=>n.remove(),0)}var To=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s};const Wa={CurrentDragAndDropData:void 0},zs={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements(o){return[o]},getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){},dispose(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class $u{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class F9{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class B9{constructor(){this.types=[],this.files=[]}update(e){if(e.types&&this.types.splice(0,this.types.length,...e.types),e.files){this.files.splice(0,this.files.length);for(let t=0;tn,e?.getPosInSet?this.getPosInSet=e.getPosInSet.bind(e):this.getPosInSet=(t,i)=>i+1,e?.getRole?this.getRole=e.getRole.bind(e):this.getRole=t=>"listitem",e?.isChecked?this.isChecked=e.isChecked.bind(e):this.isChecked=t=>{}}}const gb=class gb{get contentHeight(){return this.rangeMap.size}get onDidScroll(){return this.scrollableElement.onScroll}get scrollableElementDomNode(){return this.scrollableElement.getDomNode()}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(e){if(e!==this._horizontalScrolling){if(e&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=e,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(const t of this.items)this.measureItemWidth(t);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:rC(this.domNode)}),this.rowsContainer.style.width=`${Math.max(this.scrollWidth||0,this.renderWidth)}px`}else this.scrollableElementWidthDelayer.cancel(),this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth}),this.rowsContainer.style.width="",this.domNode.style.removeProperty("--list-scroll-right-offset")}}constructor(e,t,i,n=zs){if(this.virtualDelegate=t,this.domId=`list_id_${++gb.InstanceCount}`,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new l.Delayer(50),this.splicing=!1,this.dragOverAnimationStopDisposable=l.Disposable.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=l.Disposable.None,this.onDragLeaveTimeout=l.Disposable.None,this.currentSelectionDisposable=l.Disposable.None,this.disposables=new l.DisposableStore,this._onDidChangeContentHeight=this.disposables.add(new l.Emitter),this._onDidChangeContentWidth=this.disposables.add(new l.Emitter),this.onDidChangeContentHeight=l.Event.latch(this._onDidChangeContentHeight.event,void 0,this.disposables),this._horizontalScrolling=!1,n.horizontalScrolling&&n.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=this.createRangeMap(n.paddingTop??0);for(const r of i)this.renderers.set(r.templateId,r);if(this.cache=this.disposables.add(new P9(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",this.domNode.classList.add(this.domId),this.domNode.tabIndex=0,this.domNode.classList.toggle("mouse-support",typeof n.mouseSupport=="boolean"?n.mouseSupport:!0),this._horizontalScrolling=n.horizontalScrolling??zs.horizontalScrolling,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.paddingBottom=typeof n.paddingBottom>"u"?0:n.paddingBottom,this.accessibilityProvider=new V9(n.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",(n.transformOptimization??zs.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)",this.rowsContainer.style.overflow="hidden",this.rowsContainer.style.contain="strict"),this.disposables.add(li.addTarget(this.rowsContainer)),this.scrollable=this.disposables.add(new mc({forceIntegerValues:!0,smoothScrollDuration:n.smoothScrolling??!1?125:0,scheduleAtNextAnimationFrame:r=>Ti(j(this.domNode),r)})),this.scrollableElement=this.disposables.add(new Xg(this.rowsContainer,{alwaysConsumeMouseWheel:n.alwaysConsumeMouseWheel??zs.alwaysConsumeMouseWheel,horizontal:1,vertical:n.verticalScrollMode??zs.verticalScrollMode,useShadows:n.useShadows??zs.useShadows,mouseWheelScrollSensitivity:n.mouseWheelScrollSensitivity,fastScrollSensitivity:n.fastScrollSensitivity,scrollByPage:n.scrollByPage},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add(R(this.rowsContainer,_.EventType$1.Change,r=>this.onTouchChange(r))),this.disposables.add(R(this.scrollableElement.getDomNode(),"scroll",r=>{const a=r.target,c=a.scrollTop;a.scrollTop=0,n.scrollToActiveElement&&this.setScrollTop(this.scrollTop+c)})),this.disposables.add(R(this.domNode,"dragover",r=>this.onDragOver(this.toDragEvent(r)))),this.disposables.add(R(this.domNode,"drop",r=>this.onDrop(this.toDragEvent(r)))),this.disposables.add(R(this.domNode,"dragleave",r=>this.onDragLeave(this.toDragEvent(r)))),this.disposables.add(R(this.domNode,"dragend",r=>this.onDragEnd(r))),n.userSelection){if(n.dnd)throw new Error("DND and user selection cannot be used simultaneously");this.disposables.add(R(this.domNode,"mousedown",r=>this.onPotentialSelectionStart(r)))}this.setRowLineHeight=n.setRowLineHeight??zs.setRowLineHeight,this.setRowHeight=n.setRowHeight??zs.setRowHeight,this.supportDynamicHeights=n.supportDynamicHeights??zs.supportDynamicHeights,this.dnd=n.dnd??this.disposables.add(zs.dnd),this.layout(n.initialSize?.height,n.initialSize?.width),n.scrollToActiveElement&&this._setupFocusObserver(e)}_setupFocusObserver(e){this.disposables.add(R(e,"focus",()=>{const t=wt();this.activeElement!==t&&t!==null&&(this.activeElement=t,this._scrollToActiveElement(this.activeElement,e))},!0))}_scrollToActiveElement(e,t){const i=t.getBoundingClientRect(),s=e.getBoundingClientRect().top-i.top;s<0&&this.setScrollTop(this.scrollTop+s)}updateOptions(e){e.paddingBottom!==void 0&&(this.paddingBottom=e.paddingBottom,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),e.smoothScrolling!==void 0&&this.scrollable.setSmoothScrollDuration(e.smoothScrolling?125:0),e.horizontalScrolling!==void 0&&(this.horizontalScrolling=e.horizontalScrolling);let t;if(e.scrollByPage!==void 0&&(t={...t??{},scrollByPage:e.scrollByPage}),e.mouseWheelScrollSensitivity!==void 0&&(t={...t??{},mouseWheelScrollSensitivity:e.mouseWheelScrollSensitivity}),e.fastScrollSensitivity!==void 0&&(t={...t??{},fastScrollSensitivity:e.fastScrollSensitivity}),t&&this.scrollableElement.updateOptions(t),e.paddingTop!==void 0&&e.paddingTop!==this.rangeMap.paddingTop){const i=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),n=e.paddingTop-this.rangeMap.paddingTop;this.rangeMap.paddingTop=e.paddingTop,this.render(i,Math.max(0,this.lastRenderTop+n),this.lastRenderHeight,void 0,void 0,!0),this.setScrollTop(this.lastRenderTop),this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.lastRenderTop,this.lastRenderHeight)}}createRangeMap(e){return new O9(e)}splice(e,t,i=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(e,t,i)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(e,t,i=[]){const n=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),s={start:e,end:e+t},r=ii.intersect(n,s),a=new Map;for(let L=r.end-1;L>=r.start;L--){const D=this.items[L];if(D.dragStartDisposable.dispose(),D.checkedDisposable.dispose(),D.row){let x=a.get(D.templateId);x||(x=[],a.set(D.templateId,x));const I=this.renderers.get(D.templateId);I&&I.disposeElement&&I.disposeElement(D.element,L,D.row.templateData,{height:D.size}),x.unshift(D.row)}D.row=null,D.stale=!0}const c={start:e+t,end:this.items.length},h=ii.intersect(c,n),d=ii.relativeComplement(c,n),u=i.map(L=>({id:String(this.itemId++),element:L,templateId:this.virtualDelegate.getTemplateId(L),size:this.virtualDelegate.getHeight(L),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(L),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:l.Disposable.None,checkedDisposable:l.Disposable.None,stale:!1}));let f;e===0&&t>=this.items.length?(this.rangeMap=this.createRangeMap(this.rangeMap.paddingTop),this.rangeMap.splice(0,0,u),f=this.items,this.items=u):(this.rangeMap.splice(e,t,u),f=l.splice(this.items,e,t,u));const g=i.length-t,m=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),p=My(h,g),b=ii.intersect(m,p);for(let L=b.start;LMy(L,g)),S=[{start:e,end:e+i.length},...C].map(L=>ii.intersect(m,L)).reverse();for(const L of S)for(let D=L.end-1;D>=L.start;D--){const x=this.items[D],T=a.get(x.templateId)?.pop();this.insertItemInDOM(D,T)}for(const L of a.values())for(const D of L)this.cache.release(D);return this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight),f.map(L=>L.element)}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=Ti(j(this.domNode),()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null}))}eventuallyUpdateScrollWidth(){if(!this.horizontalScrolling){this.scrollableElementWidthDelayer.cancel();return}this.scrollableElementWidthDelayer.trigger(()=>this.updateScrollWidth())}updateScrollWidth(){if(!this.horizontalScrolling)return;let e=0;for(const t of this.items)typeof t.width<"u"&&(e=Math.max(e,t.width));this.scrollWidth=e,this.scrollableElement.setScrollDimensions({scrollWidth:e===0?0:e+10}),this._onDidChangeContentWidth.fire(this.scrollWidth)}rerender(){if(this.supportDynamicHeights){for(const e of this.items)e.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}}get length(){return this.items.length}get renderHeight(){return this.scrollableElement.getScrollDimensions().height}get firstVisibleIndex(){return this.getVisibleRange(this.lastRenderTop,this.lastRenderHeight).start}element(e){return this.items[e].element}indexOf(e){return this.items.findIndex(t=>t.element===e)}domElement(e){const t=this.items[e].row;return t&&t.domNode}elementHeight(e){return this.items[e].size}elementTop(e){return this.rangeMap.positionAt(e)}indexAt(e){return this.rangeMap.indexAt(e)}indexAfter(e){return this.rangeMap.indexAfter(e)}layout(e,t){const i={height:typeof e=="number"?e:wF(this.domNode)};if(this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,i.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(i),typeof t<"u"&&(this.renderWidth=t,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling){this.scrollableElement.setScrollDimensions({width:typeof t=="number"?t:rC(this.domNode)});const n=this.scrollableElement.getScrollPosition(),s=this.scrollableElement.getScrollDimensions(),r=Math.max(0,s.scrollWidth-n.scrollLeft-this.renderWidth);this.domNode.style.setProperty("--list-scroll-right-offset",`${Math.max(r-12,0)}px`)}}render(e,t,i,n,s,r=!1,a=!1){const c=this.getRenderRange(t,i),h=ii.relativeComplement(c,e).reverse(),d=ii.relativeComplement(e,c);if(r){const u=ii.intersect(e,c);for(let f=u.start;f{for(const u of d)for(let f=u.start;f=u.start;f--)this.insertItemInDOM(f)}),n!==void 0&&(this.rowsContainer.style.left=`-${n}px`),this.rowsContainer.style.top=`-${t}px`,this.horizontalScrolling&&s!==void 0){this.rowsContainer.style.width=`${Math.max(s,this.renderWidth)}px`;const u=Math.max(0,s-(n??0)-this.renderWidth);this.domNode.style.setProperty("--list-scroll-right-offset",`${Math.max(u-12,0)}px`)}this.lastRenderTop=t,this.lastRenderHeight=i}insertItemInDOM(e,t){const i=this.items[e];if(!i.row)if(t)i.row=t,i.stale=!0;else{const h=this.cache.alloc(i.templateId);i.row=h.row,i.stale||=h.isReusingConnectedDomNode}const n=this.accessibilityProvider.getRole(i.element)||"listitem";i.row.domNode.setAttribute("role",n);const s=this.accessibilityProvider.isChecked(i.element),r=h=>h==="mixed"?"mixed":String(!!h);if(typeof s=="boolean"||s==="mixed")i.row.domNode.setAttribute("aria-checked",r(s));else if(s){const h=d=>i.row.domNode.setAttribute("aria-checked",r(d));h(s.value),i.checkedDisposable=s.onDidChange(()=>h(s.value))}if(i.stale||!i.row.domNode.parentElement){const h=this.items.at(e+1)?.row?.domNode??null;(i.row.domNode.parentElement!==this.rowsContainer||i.row.domNode.nextElementSibling!==h)&&this.rowsContainer.insertBefore(i.row.domNode,h),i.stale=!1}this.updateItemInDOM(i,e);const a=this.renderers.get(i.templateId);if(!a)throw new Error(`No renderer found for template id ${i.templateId}`);a?.renderElement(i.element,e,i.row.templateData,{height:i.size});const c=this.dnd.getDragURI(i.element);i.dragStartDisposable.dispose(),i.row.domNode.draggable=!!c,c&&(i.dragStartDisposable=R(i.row.domNode,"dragstart",h=>this.onDragStart(i.element,c,h))),this.horizontalScrolling&&(this.measureItemWidth(i),this.eventuallyUpdateScrollWidth())}measureItemWidth(e){if(!e.row||!e.row.domNode)return;e.row.domNode.style.width="fit-content",e.width=rC(e.row.domNode);const t=j(e.row.domNode).getComputedStyle(e.row.domNode);t.paddingLeft&&(e.width+=parseFloat(t.paddingLeft)),t.paddingRight&&(e.width+=parseFloat(t.paddingRight)),e.row.domNode.style.width=""}updateItemInDOM(e,t){e.row.domNode.style.top=`${this.elementTop(t)}px`,this.setRowHeight&&(e.row.domNode.style.height=`${e.size}px`),this.setRowLineHeight&&(e.row.domNode.style.lineHeight=`${e.size}px`),e.row.domNode.setAttribute("data-index",`${t}`),e.row.domNode.setAttribute("data-last-element",t===this.length-1?"true":"false"),e.row.domNode.setAttribute("data-parity",t%2===0?"even":"odd"),e.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(e.element,t,this.length))),e.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(e.element,t))),e.row.domNode.setAttribute("id",this.getElementDomId(t)),e.row.domNode.classList.toggle("drop-target",e.dropTarget)}removeItemFromDOM(e,t){const i=this.items[e];if(i.dragStartDisposable.dispose(),i.checkedDisposable.dispose(),i.row){const n=this.renderers.get(i.templateId);n&&n.disposeElement&&n.disposeElement(i.element,e,i.row.templateData,{height:i.size,onScroll:t}),this.cache.release(i.row),i.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}setScrollTop(e,t){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:e,reuseAnimation:t})}get scrollTop(){return this.getScrollTop()}set scrollTop(e){this.setScrollTop(e)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.paddingBottom}get onMouseClick(){return l.Event.map(this.disposables.add(new Te(this.domNode,"click")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseDblClick(){return l.Event.map(this.disposables.add(new Te(this.domNode,"dblclick")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseMiddleClick(){return l.Event.filter(l.Event.map(this.disposables.add(new Te(this.domNode,"auxclick")).event,e=>this.toMouseEvent(e),this.disposables),e=>e.browserEvent.button===1,this.disposables)}get onMouseDown(){return l.Event.map(this.disposables.add(new Te(this.domNode,"mousedown")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseOver(){return l.Event.map(this.disposables.add(new Te(this.domNode,"mouseover")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseOut(){return l.Event.map(this.disposables.add(new Te(this.domNode,"mouseout")).event,e=>this.toMouseEvent(e),this.disposables)}get onContextMenu(){return l.Event.any(l.Event.map(this.disposables.add(new Te(this.domNode,"contextmenu")).event,e=>this.toMouseEvent(e),this.disposables),l.Event.map(this.disposables.add(new Te(this.domNode,_.EventType$1.Contextmenu)).event,e=>this.toGestureEvent(e),this.disposables))}get onTouchStart(){return l.Event.map(this.disposables.add(new Te(this.domNode,"touchstart")).event,e=>this.toTouchEvent(e),this.disposables)}get onTap(){return l.Event.map(this.disposables.add(new Te(this.rowsContainer,_.EventType$1.Tap)).event,e=>this.toGestureEvent(e),this.disposables)}toMouseEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=typeof t>"u"?void 0:this.items[t],n=i&&i.element;return{browserEvent:e,index:t,element:n}}toTouchEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=typeof t>"u"?void 0:this.items[t],n=i&&i.element;return{browserEvent:e,index:t,element:n}}toGestureEvent(e){const t=this.getItemIndexFromEventTarget(e.initialTarget||null),i=typeof t>"u"?void 0:this.items[t],n=i&&i.element;return{browserEvent:e,index:t,element:n}}toDragEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=typeof t>"u"?void 0:this.items[t],n=i&&i.element,s=this.getTargetSector(e,t);return{browserEvent:e,index:t,element:n,sector:s}}onScroll(e){try{const t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(t,e.scrollTop,e.height,e.scrollLeft,e.scrollWidth,void 0,!0),this.supportDynamicHeights&&this._rerender(e.scrollTop,e.height,e.inSmoothScrolling)}catch(t){throw console.error("Got bad scroll event:",e),t}}onTouchChange(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY}onDragStart(e,t,i){if(!i.dataTransfer)return;const n=this.dnd.getDragElements(e);i.dataTransfer.effectAllowed="copyMove",i.dataTransfer.setData(pc.TEXT,t);let s;this.dnd.getDragLabel&&(s=this.dnd.getDragLabel(n,i)),typeof s>"u"&&(s=String(n.length)),k9(i,this.domNode,s,[this.domId]),this.domNode.classList.add("dragging"),this.currentDragData=new $u(n),Wa.CurrentDragAndDropData=new F9(n),this.dnd.onDragStart?.(this.currentDragData,i)}onPotentialSelectionStart(e){this.currentSelectionDisposable.dispose();const t=cF(this.domNode),i=this.currentSelectionDisposable=new l.DisposableStore,n=i.add(new l.DisposableStore);n.add(R(this.domNode,"selectstart",()=>{n.add(R(t,"mousemove",s=>{t.getSelection()?.isCollapsed===!1&&this.setupDragAndDropScrollTopAnimation(s)})),i.add(l.toDisposable(()=>{const s=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.currentSelectionBounds=void 0,this.render(s,this.lastRenderTop,this.lastRenderHeight,void 0,void 0)})),i.add(R(t,"selectionchange",()=>{const s=t.getSelection();if(!s||s.isCollapsed){n.isDisposed&&i.dispose();return}let r=this.getIndexOfListElement(s.anchorNode),a=this.getIndexOfListElement(s.focusNode);r!==void 0&&a!==void 0&&(a{n.dispose(),this.teardownDragAndDropScrollTopAnimation(),t.getSelection()?.isCollapsed!==!1&&i.dispose()}))}getIndexOfListElement(e){if(!(!e||!this.domNode.contains(e)))for(;e&&e!==this.domNode;){if(e.dataset?.index)return Number(e.dataset.index);e=e.parentElement}}onDragOver(e){if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),Wa.CurrentDragAndDropData&&Wa.CurrentDragAndDropData.getData()==="vscode-ui"||(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer))return!1;if(!this.currentDragData)if(Wa.CurrentDragAndDropData)this.currentDragData=Wa.CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new B9}const t=this.dnd.onDragOver(this.currentDragData,e.element,e.index,e.sector,e.browserEvent);if(this.canDrop=typeof t=="boolean"?t:t.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;e.browserEvent.dataTransfer.dropEffect=typeof t!="boolean"&&t.effect?.type===0?"copy":"move";let i;typeof t!="boolean"&&t.feedback?i=t.feedback:typeof e.index>"u"?i=[-1]:i=[e.index],i=l.distinct(i).filter(s=>s>=-1&&ss-r),i=i[0]===-1?[-1]:i;let n=typeof t!="boolean"&&t.effect&&t.effect.position?t.effect.position:"drop-target";if(z9(this.currentDragFeedback,i)&&this.currentDragFeedbackPosition===n)return!0;if(this.currentDragFeedback=i,this.currentDragFeedbackPosition=n,this.currentDragFeedbackDisposable.dispose(),i[0]===-1)this.domNode.classList.add(n),this.rowsContainer.classList.add(n),this.currentDragFeedbackDisposable=l.toDisposable(()=>{this.domNode.classList.remove(n),this.rowsContainer.classList.remove(n)});else{if(i.length>1&&n!=="drop-target")throw new Error("Can't use multiple feedbacks with position different than 'over'");n==="drop-target-after"&&i[0]{for(const s of i){const r=this.items[s];r.dropTarget=!1,r.row?.domNode.classList.remove(n)}})}return!0}onDragLeave(e){this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=l.disposableTimeout(()=>this.clearDragOverFeedback(),100,this.disposables),this.currentDragData&&this.dnd.onDragLeave?.(this.currentDragData,e.element,e.index,e.browserEvent)}onDrop(e){if(!this.canDrop)return;const t=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,Wa.CurrentDragAndDropData=void 0,!(!t||!e.browserEvent.dataTransfer)&&(e.browserEvent.preventDefault(),t.update(e.browserEvent.dataTransfer),this.dnd.drop(t,e.element,e.index,e.sector,e.browserEvent))}onDragEnd(e){this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,Wa.CurrentDragAndDropData=void 0,this.dnd.onDragEnd?.(e)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackPosition=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=l.Disposable.None}setupDragAndDropScrollTopAnimation(e){if(!this.dragOverAnimationDisposable){const t=rx(this.domNode).top;this.dragOverAnimationDisposable=RF(j(this.domNode),this.animateDragAndDropScrollTop.bind(this,t))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=l.disposableTimeout(()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)},1e3,this.disposables),this.dragOverMouseY=e.pageY}animateDragAndDropScrollTop(e){if(this.dragOverMouseY===void 0)return;const t=this.dragOverMouseY-e,i=this.renderHeight-35;t<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(t-35))):t>i&&(this.scrollTop+=Math.min(14,Math.floor(.3*(t-i))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getTargetSector(e,t){if(t===void 0)return;const i=e.offsetY/this.items[t].size,n=Math.floor(i/.25);return wi(n,0,3)}getItemIndexFromEventTarget(e){const t=this.scrollableElement.getDomNode();let i=e;for(;(Ve(i)||hx(i))&&i!==this.rowsContainer&&t.contains(i);){const n=i.getAttribute("data-index");if(n){const s=Number(n);if(!isNaN(s))return s}i=i.parentElement}}getVisibleRange(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}}getRenderRange(e,t){const i=this.getVisibleRange(e,t);if(this.currentSelectionBounds){const n=this.rangeMap.count;i.start=Math.min(i.start,this.currentSelectionBounds.start,n),i.end=Math.min(Math.max(i.end,this.currentSelectionBounds.end+1),n)}return i}_rerender(e,t,i){const n=this.getRenderRange(e,t);let s,r;e===this.elementTop(n.start)?(s=n.start,r=0):n.end-n.start>1&&(s=n.start+1,r=this.elementTop(s)-e);let a=0;for(;;){const c=this.getRenderRange(e,t);let h=!1;for(let d=c.start;d=f.start;g--)this.insertItemInDOM(g);for(let f=c.start;f0&&this.virtualDelegate.setDynamicHeight?.(t.element,t.size),i}probeDynamicHeightForItem(e,t){if(this.virtualDelegate.getDynamicHeight){const r=this.virtualDelegate.getDynamicHeight(e.element);if(r!==null){const a=e.size;return e.size=r,e.lastDynamicHeightWidth=this.renderWidth,r-a}}if(!e.hasDynamicHeight||e.lastDynamicHeightWidth===this.renderWidth||this.virtualDelegate.hasDynamicHeight&&!this.virtualDelegate.hasDynamicHeight(e.element))return 0;const i=e.size;if(e.row)return e.row.domNode.style.height="",e.size=e.row.domNode.offsetHeight,e.size===0&&(ut(e.row.domNode,j(e.row.domNode).document.body)?console.warn("Measured item node at 0px- ensure that ListView is not display:none before measuring row height!",new Error().stack):console.warn("Measuring item node that is not in DOM! Add ListView to the DOM before measuring row height!",new Error().stack)),e.lastDynamicHeightWidth=this.renderWidth,e.size-i;const{row:n}=this.cache.alloc(e.templateId);n.domNode.style.height="",this.rowsContainer.appendChild(n.domNode);const s=this.renderers.get(e.templateId);if(!s)throw new l.BugIndicatingError("Missing renderer for templateId: "+e.templateId);return s.renderElement(e.element,t,n.templateData),e.size=n.domNode.offsetHeight,s.disposeElement?.(e.element,t,n.templateData),e.lastDynamicHeightWidth=this.renderWidth,n.domNode.remove(),this.cache.release(n),e.size-i}getElementDomId(e){return`${this.domId}_${e}`}dispose(){for(const e of this.items)if(e.dragStartDisposable.dispose(),e.checkedDisposable.dispose(),e.row){const t=this.renderers.get(e.row.templateId);t&&(t.disposeElement?.(e.element,-1,e.row.templateData,void 0),t.disposeTemplate(e.row.templateData))}this.items=[],this.domNode?.remove(),this.dragOverAnimationDisposable?.dispose(),this.disposables.dispose()}};gb.InstanceCount=0;let Bn=gb;To([et],Bn.prototype,"onMouseClick",null),To([et],Bn.prototype,"onMouseDblClick",null),To([et],Bn.prototype,"onMouseMiddleClick",null),To([et],Bn.prototype,"onMouseDown",null),To([et],Bn.prototype,"onMouseOver",null),To([et],Bn.prototype,"onMouseOut",null),To([et],Bn.prototype,"onContextMenu",null),To([et],Bn.prototype,"onTouchStart",null),To([et],Bn.prototype,"onTap",null);var Lr=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s};class U9{constructor(e){this.trait=e,this.renderedElements=[]}get templateId(){return`template:${this.trait.name}`}renderTemplate(e){return e}renderElement(e,t,i){const n=this.renderedElements.findIndex(s=>s.templateData===i);if(n>=0){const s=this.renderedElements[n];this.trait.unrender(i),s.index=t}else{const s={index:t,templateData:i};this.renderedElements.push(s)}this.trait.renderIndex(t,i)}splice(e,t,i){const n=[];for(const s of this.renderedElements)s.index=e+t&&n.push({index:s.index+i-t,templateData:s.templateData});this.renderedElements=n}renderIndexes(e){for(const{index:t,templateData:i}of this.renderedElements)e.indexOf(t)>-1&&this.trait.renderIndex(t,i)}disposeTemplate(e){const t=this.renderedElements.findIndex(i=>i.templateData===e);t<0||this.renderedElements.splice(t,1)}}let kp=class{get onChange(){return this._onChange.event}get name(){return this._trait}get renderer(){return new U9(this)}constructor(e){this._trait=e,this.indexes=[],this.sortedIndexes=[],this._onChange=new l.Emitter}splice(e,t,i){const n=i.length-t,s=e+t,r=[];let a=0;for(;a=s;)r.push(this.sortedIndexes[a++]+n);this.renderer.splice(e,t,i.length),this._set(r,r)}renderIndex(e,t){t.classList.toggle(this._trait,this.contains(e))}unrender(e){e.classList.remove(this._trait)}set(e,t){return this._set(e,[...e].sort(fM),t)}_set(e,t,i){const n=this.indexes,s=this.sortedIndexes;this.indexes=e,this.sortedIndexes=t;const r=Oy(s,e);return this.renderer.renderIndexes(r),this._onChange.fire({indexes:e,browserEvent:i}),n}get(){return this.indexes}contains(e){return l.binarySearch(this.sortedIndexes,e,fM)>=0}dispose(){l.dispose(this._onChange)}};Lr([et],kp.prototype,"renderer",null);class $9 extends kp{constructor(e){super("selected"),this.setAriaSelected=e}renderIndex(e,t){super.renderIndex(e,t),this.setAriaSelected&&(this.contains(e)?t.setAttribute("aria-selected","true"):t.setAttribute("aria-selected","false"))}}class Ay{constructor(e,t,i){this.trait=e,this.view=t,this.identityProvider=i}splice(e,t,i){if(!this.identityProvider)return this.trait.splice(e,t,new Array(i.length).fill(!1));const n=this.trait.get().map(a=>this.identityProvider.getId(this.view.element(a)).toString());if(n.length===0)return this.trait.splice(e,t,new Array(i.length).fill(!1));const s=new Set(n),r=i.map(a=>s.has(this.identityProvider.getId(a).toString()));this.trait.splice(e,t,r)}}function Ku(o,e){return o.classList.contains(e)?!0:o.classList.contains("monaco-list")||!o.parentElement?!1:Ku(o.parentElement,e)}function Gu(o){return Ku(o,"monaco-editor")}function K9(o){return Ku(o,"monaco-custom-toggle")}function G9(o){return Ku(o,"action-item")}function ju(o){return Ku(o,"monaco-tree-sticky-row")}function qu(o){return o.classList.contains("monaco-tree-sticky-container")}function aM(o){return o.tagName==="A"&&o.classList.contains("monaco-button")||o.tagName==="DIV"&&o.classList.contains("monaco-button-dropdown")?!0:o.classList.contains("monaco-list")||!o.parentElement?!1:aM(o.parentElement)}class lM{get onKeyDown(){return l.Event.chain(this.disposables.add(new Te(this.view.domNode,"keydown")).event,e=>e.filter(t=>!jn(t.target)).map(t=>new Be(t)))}constructor(e,t,i){this.list=e,this.view=t,this.disposables=new l.DisposableStore,this.multipleSelectionDisposables=new l.DisposableStore,this.multipleSelectionSupport=i.multipleSelectionSupport,this.disposables.add(this.onKeyDown(n=>{switch(n.keyCode){case 3:return this.onEnter(n);case 16:return this.onUpArrow(n);case 18:return this.onDownArrow(n);case 11:return this.onPageUpArrow(n);case 12:return this.onPageDownArrow(n);case 9:return this.onEscape(n);case 31:this.multipleSelectionSupport&&(l.isMacintosh?n.metaKey:n.ctrlKey)&&this.onCtrlA(n)}}))}updateOptions(e){e.multipleSelectionSupport!==void 0&&(this.multipleSelectionSupport=e.multipleSelectionSupport)}onEnter(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus(),e.browserEvent)}onUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(1,!1,e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(1,!1,e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onCtrlA(e){e.preventDefault(),e.stopPropagation();let t=l.range(this.list.length);const i=this.list.getFocus(),n=i.length>0?this.list.getElementGroupId(i[0]):void 0;n!==void 0&&(t=this.list.filterIndicesByGroup(t,n)),this.list.setSelection(t,e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus()}onEscape(e){this.list.getSelection().length&&(e.preventDefault(),e.stopPropagation(),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus())}dispose(){this.disposables.dispose(),this.multipleSelectionDisposables.dispose()}}Lr([et],lM.prototype,"onKeyDown",null);var Vs;(function(o){o[o.Automatic=0]="Automatic",o[o.Trigger=1]="Trigger"})(Vs||(Vs={}));var Wc;(function(o){o[o.Idle=0]="Idle",o[o.Typing=1]="Typing"})(Wc||(Wc={}));const j9=new class{mightProducePrintableCharacter(o){return o.ctrlKey||o.metaKey||o.altKey?!1:o.keyCode>=31&&o.keyCode<=56||o.keyCode>=21&&o.keyCode<=30||o.keyCode>=98&&o.keyCode<=107||o.keyCode>=85&&o.keyCode<=95}};class q9{constructor(e,t,i,n,s){this.list=e,this.view=t,this.keyboardNavigationLabelProvider=i,this.keyboardNavigationEventFilter=n,this.delegate=s,this.enabled=!1,this.state=Wc.Idle,this.mode=Vs.Automatic,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new l.DisposableStore,this.disposables=new l.DisposableStore,this.updateOptions(e.options)}updateOptions(e){e.typeNavigationEnabled??!0?this.enable():this.disable(),this.mode=e.typeNavigationMode??Vs.Automatic}enable(){if(this.enabled)return;let e=!1;const t=l.Event.chain(this.enabledDisposables.add(new Te(this.view.domNode,"keydown")).event,s=>s.filter(r=>!jn(r.target)).filter(()=>this.mode===Vs.Automatic||this.triggered).map(r=>new Be(r)).filter(r=>e||this.keyboardNavigationEventFilter(r)).filter(r=>this.delegate.mightProducePrintableCharacter(r)).forEach(r=>ve.stop(r,!0)).map(r=>r.browserEvent.key)),i=l.Event.debounce(t,()=>null,800,void 0,void 0,void 0,this.enabledDisposables);l.Event.reduce(l.Event.any(t,i),(s,r)=>r===null?null:(s||"")+r,void 0,this.enabledDisposables)(this.onInput,this,this.enabledDisposables),i(this.onClear,this,this.enabledDisposables),t(()=>e=!0,void 0,this.enabledDisposables),i(()=>e=!1,void 0,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){this.enabled&&(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){const e=this.list.getFocus();if(e.length>0&&e[0]===this.previouslyFocused){const t=this.list.options.accessibilityProvider?.getAriaLabel(this.list.element(e[0]));typeof t=="string"?ha(t):t&&ha(t.get())}this.previouslyFocused=-1}onInput(e){if(!e){this.state=Wc.Idle,this.triggered=!1;return}const t=this.list.getFocus(),i=t.length>0?t[0]:0,n=this.state===Wc.Idle?1:0;this.state=Wc.Typing;for(let s=0;s1&&h.length===1){this.previouslyFocused=i,this.list.setFocus([r]),this.list.reveal(r);return}}}else if(typeof c>"u"||Jm(e,c)){this.previouslyFocused=i,this.list.setFocus([r]),this.list.reveal(r);return}}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}}class Y9{constructor(e,t){this.list=e,this.view=t,this.disposables=new l.DisposableStore;const i=l.Event.chain(this.disposables.add(new Te(t.domNode,"keydown")).event,s=>s.filter(r=>!jn(r.target)).map(r=>new Be(r)));l.Event.chain(i,s=>s.filter(r=>r.keyCode===2&&!r.ctrlKey&&!r.metaKey&&!r.shiftKey&&!r.altKey))(this.onTab,this,this.disposables)}onTab(e){if(e.target!==this.view.domNode)return;const t=this.list.getFocus();if(t.length===0)return;const i=this.view.domElement(t[0]);if(!i)return;const n=i.querySelector("[tabIndex]");if(!n||!Ve(n)||n.tabIndex===-1)return;const s=j(n).getComputedStyle(n);s.visibility==="hidden"||s.display==="none"||(e.preventDefault(),e.stopPropagation(),n.focus())}dispose(){this.disposables.dispose()}}function cM(o){return l.isMacintosh?o.browserEvent.metaKey:o.browserEvent.ctrlKey}function hM(o){return o.browserEvent.shiftKey}function Z9(o){return Qf(o)&&o.button===2}const dM={isSelectionSingleChangeEvent:cM,isSelectionRangeChangeEvent:hM};class uM{get onPointer(){return this._onPointer.event}constructor(e){this.list=e,this.disposables=new l.DisposableStore,this._onPointer=this.disposables.add(new l.Emitter),e.options.multipleSelectionSupport!==!1&&(this.multipleSelectionController=this.list.options.multipleSelectionController||dM),this.mouseSupport=typeof e.options.mouseSupport>"u"||!!e.options.mouseSupport,this.mouseSupport&&(e.onMouseDown(this.onMouseDown,this,this.disposables),e.onContextMenu(this.onContextMenu,this,this.disposables),e.onMouseDblClick(this.onDoubleClick,this,this.disposables),e.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(li.addTarget(e.getHTMLElement()))),l.Event.any(e.onMouseClick,e.onMouseMiddleClick,e.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(e){e.multipleSelectionSupport!==void 0&&(this.multipleSelectionController=void 0,e.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||dM))}isSelectionSingleChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(e):!1}isSelectionRangeChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(e):!1}isSelectionChangeEvent(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)}onMouseDown(e){Gu(e.browserEvent.target)||wt()!==e.browserEvent.target&&this.list.domFocus()}onContextMenu(e){if(jn(e.browserEvent.target)||Gu(e.browserEvent.target))return;const t=typeof e.index>"u"?[]:[e.index];this.list.setFocus(t,e.browserEvent)}onViewPointer(e){if(!this.mouseSupport||jn(e.browserEvent.target)||Gu(e.browserEvent.target)||e.browserEvent.isHandledByList)return;e.browserEvent.isHandledByList=!0;const t=e.index;if(typeof t>"u"){this.list.setFocus([],e.browserEvent),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0);return}if(this.isSelectionChangeEvent(e))return this.changeSelection(e);this.list.setFocus([t],e.browserEvent),this.list.setAnchor(t),Z9(e.browserEvent)||this.list.getElementGroupId(t)!==Pp&&this.list.setSelection([t],e.browserEvent),this._onPointer.fire(e)}onDoubleClick(e){if(jn(e.browserEvent.target)||Gu(e.browserEvent.target)||this.isSelectionChangeEvent(e)||e.browserEvent.isHandledByList)return;e.browserEvent.isHandledByList=!0;const t=this.list.getFocus();this.list.setSelection(t,e.browserEvent)}changeSelection(e){const t=e.index;let i=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(e)){typeof i>"u"&&(i=this.list.getFocus()[0]??t,this.list.setAnchor(i));const n=Math.min(i,t),s=Math.max(i,t);let r=l.range(n,s+1);const a=this.list.getSelection()[0];if(a!==void 0){const u=this.list.getElementGroupId(a);u!==void 0&&(r=this.list.filterIndicesByGroup(r,u))}const c=this.list.getSelection(),h=W9(Oy(c,[i]),i);if(h.length===0)return;const d=Oy(r,H9(c,h));this.list.setSelection(d,e.browserEvent),this.list.setFocus([t],e.browserEvent)}else if(this.isSelectionSingleChangeEvent(e)){const n=this.list.getSelection(),s=n.filter(a=>a!==t);this.list.setFocus([t]),this.list.setAnchor(t);const r=this.list.getElementGroupId(t);if(r===Pp)return;if(n.length===s.length){const a=r!==void 0?this.list.filterIndicesByGroup([...s,t],r):[...s,t];this.list.setSelection(a,e.browserEvent)}else this.list.setSelection(s,e.browserEvent)}}dispose(){this.disposables.dispose()}}class Q9{constructor(e,t){this.styleElement=e,this.selectorSuffix=t}style(e){const t=this.selectorSuffix&&`.${this.selectorSuffix}`,i=[];e.listBackground&&i.push(`.monaco-list${t} .monaco-list-rows { background: ${e.listBackground}; }`),e.listFocusBackground&&(i.push(`.monaco-list${t}:focus .monaco-list-row.focused { background-color: ${e.listFocusBackground}; }`),i.push(`.monaco-list${t}:focus .monaco-list-row.focused:hover { background-color: ${e.listFocusBackground}; }`)),e.listFocusForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),e.listActiveSelectionBackground&&(i.push(`.monaco-list${t}:focus .monaco-list-row.selected { background-color: ${e.listActiveSelectionBackground}; }`),i.push(`.monaco-list${t}:focus .monaco-list-row.selected:hover { background-color: ${e.listActiveSelectionBackground}; }`)),e.listActiveSelectionForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.selected { color: ${e.listActiveSelectionForeground}; }`),e.listActiveSelectionIconForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.selected .codicon { color: ${e.listActiveSelectionIconForeground}; }`),e.listFocusAndSelectionBackground&&i.push(` + .monaco-drag-image${t}, + .monaco-list${t}:focus .monaco-list-row.selected.focused { background-color: ${e.listFocusAndSelectionBackground}; } + `),e.listFocusAndSelectionForeground&&i.push(` + .monaco-drag-image${t}, + .monaco-list${t}:focus .monaco-list-row.selected.focused { color: ${e.listFocusAndSelectionForeground}; } + `),e.listInactiveFocusForeground&&(i.push(`.monaco-list${t} .monaco-list-row.focused { color: ${e.listInactiveFocusForeground}; }`),i.push(`.monaco-list${t} .monaco-list-row.focused:hover { color: ${e.listInactiveFocusForeground}; }`)),e.listInactiveSelectionIconForeground&&i.push(`.monaco-list${t} .monaco-list-row.focused .codicon { color: ${e.listInactiveSelectionIconForeground}; }`),e.listInactiveFocusBackground&&(i.push(`.monaco-list${t} .monaco-list-row.focused { background-color: ${e.listInactiveFocusBackground}; }`),i.push(`.monaco-list${t} .monaco-list-row.focused:hover { background-color: ${e.listInactiveFocusBackground}; }`)),e.listInactiveSelectionBackground&&(i.push(`.monaco-list${t} .monaco-list-row.selected { background-color: ${e.listInactiveSelectionBackground}; }`),i.push(`.monaco-list${t} .monaco-list-row.selected:hover { background-color: ${e.listInactiveSelectionBackground}; }`)),e.listInactiveSelectionForeground&&i.push(`.monaco-list${t} .monaco-list-row.selected { color: ${e.listInactiveSelectionForeground}; }`),e.listHoverBackground&&i.push(`.monaco-list${t}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${e.listHoverBackground}; }`),e.listHoverForeground&&i.push(`.monaco-list${t}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { color: ${e.listHoverForeground}; }`);const n=Eo(e.listFocusAndSelectionOutline,Eo(e.listSelectionOutline,e.listFocusOutline??""));n&&i.push(`.monaco-list${t}:focus .monaco-list-row.focused.selected { outline: 1px solid ${n}; outline-offset: -1px;}`),e.listFocusOutline&&i.push(` + .monaco-drag-image${t}, + .monaco-list${t}:focus .monaco-list-row.focused, + .context-menu-visible .monaco-list${t}.last-focused .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; } + `);const s=Eo(e.listSelectionOutline,e.listInactiveFocusOutline??"");s&&i.push(`.monaco-list${t} .monaco-list-row.focused.selected { outline: 1px dotted ${s}; outline-offset: -1px; }`),e.listSelectionOutline&&i.push(`.monaco-list${t} .monaco-list-row.selected { outline: 1px dotted ${e.listSelectionOutline}; outline-offset: -1px; }`),e.listInactiveFocusOutline&&i.push(`.monaco-list${t} .monaco-list-row.focused { outline: 1px dotted ${e.listInactiveFocusOutline}; outline-offset: -1px; }`),e.listHoverOutline&&i.push(`.monaco-list${t} .monaco-list-row:hover { outline: 1px dashed ${e.listHoverOutline}; outline-offset: -1px; }`),e.listDropOverBackground&&i.push(` + .monaco-list${t}.drop-target, + .monaco-list${t} .monaco-list-rows.drop-target, + .monaco-list${t} .monaco-list-row.drop-target { background-color: ${e.listDropOverBackground} !important; color: inherit !important; } + `),e.listDropBetweenBackground&&(i.push(` + .monaco-list${t} .monaco-list-rows.drop-target-before .monaco-list-row:first-child::before, + .monaco-list${t} .monaco-list-row.drop-target-before::before { + content: ""; position: absolute; top: 0px; left: 0px; width: 100%; height: 1px; + background-color: ${e.listDropBetweenBackground}; + }`),i.push(` + .monaco-list${t} .monaco-list-rows.drop-target-after .monaco-list-row:last-child::after, + .monaco-list${t} .monaco-list-row.drop-target-after::after { + content: ""; position: absolute; bottom: 0px; left: 0px; width: 100%; height: 1px; + background-color: ${e.listDropBetweenBackground}; + }`)),e.tableColumnsBorder&&i.push(` + .monaco-table > .monaco-split-view2, + .monaco-table > .monaco-split-view2 .monaco-sash.vertical::before, + .monaco-enable-motion .monaco-table:hover > .monaco-split-view2, + .monaco-enable-motion .monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before { + border-color: ${e.tableColumnsBorder}; + } + + .monaco-enable-motion .monaco-table > .monaco-split-view2, + .monaco-enable-motion .monaco-table > .monaco-split-view2 .monaco-sash.vertical::before { + border-color: transparent; + } + `),e.tableOddRowsBackgroundColor&&i.push(` + .monaco-table .monaco-list-row[data-parity=odd]:not(.focused):not(.selected):not(:hover) .monaco-table-tr, + .monaco-table .monaco-list:not(:focus) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr, + .monaco-table .monaco-list:not(.focused) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr { + background-color: ${e.tableOddRowsBackgroundColor}; + } + `),this.styleElement.textContent=i.join(` +`)}}const X9={listFocusBackground:"#7FB0D0",listActiveSelectionBackground:"#0E639C",listActiveSelectionForeground:"#FFFFFF",listActiveSelectionIconForeground:"#FFFFFF",listFocusAndSelectionOutline:"#90C2F9",listFocusAndSelectionBackground:"#094771",listFocusAndSelectionForeground:"#FFFFFF",listInactiveSelectionBackground:"#3F3F46",listInactiveSelectionIconForeground:"#FFFFFF",listHoverBackground:"#2A2D2E",listDropOverBackground:"#383B3D",listDropBetweenBackground:"#EEEEEE",treeIndentGuidesStroke:"#a9a9a9",treeInactiveIndentGuidesStroke:l.Color.fromHex("#a9a9a9").transparent(.4).toString(),tableColumnsBorder:l.Color.fromHex("#cccccc").transparent(.2).toString(),tableOddRowsBackgroundColor:l.Color.fromHex("#cccccc").transparent(.04).toString(),listBackground:void 0,listFocusForeground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusForeground:void 0,listInactiveFocusBackground:void 0,listHoverForeground:void 0,listFocusOutline:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listHoverOutline:void 0,treeStickyScrollBackground:void 0,treeStickyScrollBorder:void 0,treeStickyScrollShadow:void 0},J9={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){},dispose(){}}};function W9(o,e){const t=o.indexOf(e);if(t===-1)return[];const i=[];let n=t-1;for(;n>=0&&o[n]===e-(t-n);)i.push(o[n--]);for(i.reverse(),n=t;n=o.length)t.push(e[n++]);else if(n>=e.length)t.push(o[i++]);else if(o[i]===e[n]){t.push(o[i]),i++,n++;continue}else o[i]=o.length)t.push(e[n++]);else if(n>=e.length)t.push(o[i++]);else if(o[i]===e[n]){i++,n++;continue}else o[i]o-e;class eq{constructor(e,t){this._templateId=e,this.renderers=t}get templateId(){return this._templateId}renderTemplate(e){return this.renderers.map(t=>t.renderTemplate(e))}renderElement(e,t,i,n){let s=0;for(const r of this.renderers)r.renderElement(e,t,i[s++],n)}disposeElement(e,t,i,n){let s=0;for(const r of this.renderers)r.disposeElement?.(e,t,i[s],n),s+=1}disposeTemplate(e){let t=0;for(const i of this.renderers)i.disposeTemplate(e[t++])}}class tq{constructor(e){this.accessibilityProvider=e,this.templateId="a18n"}renderTemplate(e){return{container:e,disposables:new l.DisposableStore}}renderElement(e,t,i){const n=this.accessibilityProvider.getAriaLabel(e),s=n&&typeof n!="string"?n:Zr(n);i.disposables.add(he(a=>{this.setAriaLabel(a.readObservable(s),i.container)}));const r=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);typeof r=="number"?i.container.setAttribute("aria-level",`${r}`):i.container.removeAttribute("aria-level")}setAriaLabel(e,t){e?t.setAttribute("aria-label",e):t.removeAttribute("aria-label")}disposeElement(e,t,i){i.disposables.clear()}disposeTemplate(e){e.disposables.dispose()}}class iq{constructor(e,t){this.list=e,this.dnd=t}getDragElements(e){const t=this.list.getSelectedElements();return t.indexOf(e)>-1?t:[e]}getDragURI(e){return this.dnd.getDragURI(e)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e,t)}onDragStart(e,t){this.dnd.onDragStart?.(e,t)}onDragOver(e,t,i,n,s){return this.dnd.onDragOver(e,t,i,n,s)}onDragLeave(e,t,i,n){this.dnd.onDragLeave?.(e,t,i,n)}onDragEnd(e){this.dnd.onDragEnd?.(e)}drop(e,t,i,n,s){this.dnd.drop(e,t,i,n,s)}dispose(){this.dnd.dispose()}}class zn{get onDidChangeFocus(){return l.Event.map(this.eventBufferer.wrapEvent(this.focus.onChange),e=>this.toListEvent(e),this.disposables)}get onDidChangeSelection(){return l.Event.map(this.eventBufferer.wrapEvent(this.selection.onChange),e=>this.toListEvent(e),this.disposables)}get domId(){return this.view.domId}get onDidScroll(){return this.view.onDidScroll}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onMouseOver(){return this.view.onMouseOver}get onMouseOut(){return this.view.onMouseOut}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let e=!1;const t=l.Event.chain(this.disposables.add(new Te(this.view.domNode,"keydown")).event,s=>s.map(r=>new Be(r)).filter(r=>e=r.keyCode===58||r.shiftKey&&r.keyCode===68).map(r=>ve.stop(r,!0)).filter(()=>!1)),i=l.Event.chain(this.disposables.add(new Te(this.view.domNode,"keyup")).event,s=>s.forEach(()=>e=!1).map(r=>new Be(r)).filter(r=>r.keyCode===58||r.shiftKey&&r.keyCode===68).map(r=>ve.stop(r,!0)).map(({browserEvent:r})=>{const a=this.getFocus(),c=a.length?a[0]:void 0,h=typeof c<"u"?this.view.element(c):void 0,d=typeof c<"u"?this.view.domElement(c):this.view.domNode;return{index:c,element:h,anchor:d,browserEvent:r}})),n=l.Event.chain(this.view.onContextMenu,s=>s.filter(r=>!e).map(({element:r,index:a,browserEvent:c})=>({element:r,index:a,anchor:new Bi(j(this.view.domNode),c),browserEvent:c})));return l.Event.any(t,i,n)}get onKeyDown(){return this.disposables.add(new Te(this.view.domNode,"keydown")).event}get onDidFocus(){return l.Event.signal(this.disposables.add(new Te(this.view.domNode,"focus",!0)).event)}get onDidBlur(){return l.Event.signal(this.disposables.add(new Te(this.view.domNode,"blur",!0)).event)}constructor(e,t,i,n,s=J9){this.user=e,this._options=s,this.focus=new kp("focused"),this.anchor=new kp("anchor"),this.eventBufferer=new l.EventBufferer,this._ariaLabel="",this.disposables=new l.DisposableStore,this._onDidDispose=new l.Emitter,this.onDidDispose=this._onDidDispose.event;const r=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?this._options.accessibilityProvider?.getWidgetRole():"list";this.selection=new $9(r!=="listbox");const a=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=s.accessibilityProvider,this.accessibilityProvider&&(a.push(new tq(this.accessibilityProvider)),this.accessibilityProvider.onDidChangeActiveDescendant?.(this.onDidChangeActiveDescendant,this,this.disposables)),n=n.map(h=>new eq(h.templateId,[...a,h]));const c={...s,dnd:s.dnd&&new iq(this,s.dnd)};if(this.view=this.createListView(t,i,n,c),this.view.domNode.setAttribute("role",r),s.styleController)this.styleController=s.styleController(this.view.domId);else{const h=bn(this.view.domNode);this.styleController=new Q9(h,this.view.domId)}if(this.spliceable=new R9([new Ay(this.focus,this.view,s.identityProvider),new Ay(this.selection,this.view,s.identityProvider),new Ay(this.anchor,this.view,s.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.anchor),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.disposables.add(new Y9(this,this.view)),(typeof s.keyboardSupport!="boolean"||s.keyboardSupport)&&(this.keyboardController=new lM(this,this.view,s),this.disposables.add(this.keyboardController)),s.keyboardNavigationLabelProvider){const h=s.keyboardNavigationDelegate||j9;this.typeNavigationController=new q9(this,this.view,s.keyboardNavigationLabelProvider,s.keyboardNavigationEventFilter??(()=>!0),h),this.disposables.add(this.typeNavigationController)}if(this.mouseController=this.createMouseController(s),this.disposables.add(this.mouseController),this.onDidChangeFocus(this._onFocusChange,this,this.disposables),this.onDidChangeSelection(this._onSelectionChange,this,this.disposables),this.accessibilityProvider){const h=this.accessibilityProvider.getWidgetAriaLabel(),d=h&&typeof h!="string"?h:Zr(h);this.disposables.add(he(u=>{this.ariaLabel=u.readObservable(d)}))}this._options.multipleSelectionSupport!==!1&&this.view.domNode.setAttribute("aria-multiselectable","true")}createListView(e,t,i,n){return new Bn(e,t,i,n)}createMouseController(e){return new uM(this)}updateOptions(e={}){this._options={...this._options,...e},this.typeNavigationController?.updateOptions(this._options),this._options.multipleSelectionController!==void 0&&(this._options.multipleSelectionSupport?this.view.domNode.setAttribute("aria-multiselectable","true"):this.view.domNode.removeAttribute("aria-multiselectable")),this.mouseController.updateOptions(e),this.keyboardController?.updateOptions(e),this.view.updateOptions(e)}get options(){return this._options}splice(e,t,i=[]){if(e<0||e>this.view.length)throw new Ja(this.user,`Invalid start index: ${e}`);if(t<0)throw new Ja(this.user,`Invalid delete count: ${t}`);t===0&&i.length===0||this.eventBufferer.bufferEvents(()=>this.spliceable.splice(e,t,i))}rerender(){this.view.rerender()}element(e){return this.view.element(e)}indexOf(e){return this.view.indexOf(e)}indexAt(e){return this.view.indexAt(e)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get onDidChangeContentHeight(){return this.view.onDidChangeContentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(e){this.view.setScrollTop(e)}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get firstVisibleIndex(){return this.view.firstVisibleIndex}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){this._ariaLabel=e,this.view.domNode.setAttribute("aria-label",e)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(e,t){this.view.layout(e,t)}setSelection(e,t){for(const i of e)if(i<0||i>=this.length)throw new Ja(this.user,`Invalid index ${i}`);e=e.filter(i=>this.getElementGroupId(i)!==Pp),this.selection.set(e,t)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map(e=>this.view.element(e))}setAnchor(e){if(typeof e>"u"){this.anchor.set([]);return}if(e<0||e>=this.length)throw new Ja(this.user,`Invalid index ${e}`);this.anchor.set([e])}getAnchor(){return this.anchor.get().at(0)}getAnchorElement(){const e=this.getAnchor();return typeof e>"u"?void 0:this.element(e)}getElementGroupId(e){const t=this.options.identityProvider;if(!t?.getGroupId)return;const i=this.element(e);return t.getGroupId(i)}filterIndicesByGroup(e,t){const i=this.options.identityProvider;return i?.getGroupId?t===Pp?[]:e.filter(n=>{const s=this.element(n);return i.getGroupId(s)===t}):e}setFocus(e,t){for(const i of e)if(i<0||i>=this.length)throw new Ja(this.user,`Invalid index ${i}`);this.focus.set(e,t)}focusNext(e=1,t=!1,i,n){if(this.length===0)return;const s=this.focus.get(),r=this.findNextIndex(s.length>0?s[0]+e:0,t,n);r>-1&&this.setFocus([r],i)}focusPrevious(e=1,t=!1,i,n){if(this.length===0)return;const s=this.focus.get(),r=this.findPreviousIndex(s.length>0?s[0]-e:0,t,n);r>-1&&this.setFocus([r],i)}async focusNextPage(e,t){let i=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);i=i===0?0:i-1;const n=this.getFocus()[0];if(n!==i&&(n===void 0||i>n)){const s=this.findPreviousIndex(i,!1,t);s>-1&&n!==s?this.setFocus([s],e):this.setFocus([i],e)}else{const s=this.view.getScrollTop();let r=s+this.view.renderHeight;i>n&&(r-=this.view.elementHeight(i)),this.view.setScrollTop(r),this.view.getScrollTop()!==s&&(this.setFocus([]),await l.timeout(0),await this.focusNextPage(e,t))}}async focusPreviousPage(e,t,i=()=>0){let n;const s=i(),r=this.view.getScrollTop()+s;r===0?n=this.view.indexAt(r):n=this.view.indexAfter(r-1);const a=this.getFocus()[0];if(a!==n&&(a===void 0||a>=n)){const c=this.findNextIndex(n,!1,t);c>-1&&a!==c?this.setFocus([c],e):this.setFocus([n],e)}else{const c=r;this.view.setScrollTop(r-this.view.renderHeight-s),this.view.getScrollTop()+i()!==c&&(this.setFocus([]),await l.timeout(0),await this.focusPreviousPage(e,t,i))}}focusLast(e,t){if(this.length===0)return;const i=this.findPreviousIndex(this.length-1,!1,t);i>-1&&this.setFocus([i],e)}focusFirst(e,t){this.focusNth(0,e,t)}focusNth(e,t,i){if(this.length===0)return;const n=this.findNextIndex(e,!1,i);n>-1&&this.setFocus([n],t)}findNextIndex(e,t=!1,i){for(let n=0;n=this.length&&!t)return-1;if(e=e%this.length,!i||i(this.element(e)))return e;e++}return-1}findPreviousIndex(e,t=!1,i){for(let n=0;nthis.view.element(e))}reveal(e,t,i=0){if(e<0||e>=this.length)throw new Ja(this.user,`Invalid index ${e}`);const n=this.view.getScrollTop(),s=this.view.elementTop(e),r=this.view.elementHeight(e);if(l.isNumber(t)){const a=r-this.view.renderHeight+i;this.view.setScrollTop(a*wi(t,0,1)+s-i)}else{const a=s+r,c=n+this.view.renderHeight;s=c||(s=c&&r>=this.view.renderHeight?this.view.setScrollTop(s-i):a>=c&&this.view.setScrollTop(a-this.view.renderHeight))}}getRelativeTop(e,t=0){if(e<0||e>=this.length)throw new Ja(this.user,`Invalid index ${e}`);const i=this.view.getScrollTop(),n=this.view.elementTop(e),s=this.view.elementHeight(e);if(ni+this.view.renderHeight)return null;const r=s-this.view.renderHeight+t;return Math.abs((i+t-n)/r)}getHTMLElement(){return this.view.domNode}getScrollableElement(){return this.view.scrollableElementDomNode}getElementID(e){return this.view.getElementDomId(e)}getElementTop(e){return this.view.elementTop(e)}style(e){this.styleController.style(e)}toListEvent({indexes:e,browserEvent:t}){return{indexes:e,elements:e.map(i=>this.view.element(i)),browserEvent:t}}_onFocusChange(){const e=this.focus.get();this.view.domNode.classList.toggle("element-focused",e.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){const e=this.focus.get();if(e.length>0){let t;this.accessibilityProvider?.getActiveDescendantId&&(t=this.accessibilityProvider.getActiveDescendantId(this.view.element(e[0]))),this.view.domNode.setAttribute("aria-activedescendant",t||this.view.getElementDomId(e[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const e=this.selection.get();this.view.domNode.classList.toggle("selection-none",e.length===0),this.view.domNode.classList.toggle("selection-single",e.length===1),this.view.domNode.classList.toggle("selection-multiple",e.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}Lr([et],zn.prototype,"onDidChangeFocus",null),Lr([et],zn.prototype,"onDidChangeSelection",null),Lr([et],zn.prototype,"onContextMenu",null),Lr([et],zn.prototype,"onKeyDown",null),Lr([et],zn.prototype,"onDidFocus",null),Lr([et],zn.prototype,"onDidBlur",null);const Ha=Q,gM="selectOption.entry.template";class nq{get templateId(){return gM}renderTemplate(e){const t=Object.create(null);return t.root=e,t.text=K(e,Ha(".option-text")),t.detail=K(e,Ha(".option-detail")),t.decoratorRight=K(e,Ha(".option-decorator-right")),t}renderElement(e,t,i){const n=i,s=e.text,r=e.detail,a=e.decoratorRight,c=e.isDisabled;n.text.textContent=s,n.detail.textContent=r||"",n.decoratorRight.textContent=a||"",c?n.root.classList.add("option-disabled"):n.root.classList.remove("option-disabled"),e.isSeparator?(n.root.classList.add("option-separator"),n.root.classList.add("option-disabled")):n.root.classList.remove("option-separator")}disposeTemplate(e){}}const Js=class Js extends l.Disposable{constructor(e,t,i,n,s){super(),this.options=[],this._currentSelection=0,this._hasDetails=!1,this._selectionDetailsDisposables=this._register(new l.DisposableStore),this._skipLayout=!1,this._sticky=!1,this._isVisible=!1,this.styles=n,this.selectBoxOptions=s||Object.create(null),typeof this.selectBoxOptions.minBottomMargin!="number"?this.selectBoxOptions.minBottomMargin=Js.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN:this.selectBoxOptions.minBottomMargin<0&&(this.selectBoxOptions.minBottomMargin=0),this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box",typeof this.selectBoxOptions.ariaLabel=="string"&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),typeof this.selectBoxOptions.ariaDescription=="string"&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),this._onDidSelect=new l.Emitter,this._register(this._onDidSelect),this.registerListeners(),this.constructSelectDropDown(i),this.selected=t||0,e&&this.setOptions(e,t),this.initStyleSheet()}setTitle(e){!this._hover&&e?this._hover=this._register(En().setupManagedHover(Io("mouse"),this.selectElement,e)):this._hover&&this._hover.update(e)}getHeight(){return 22}getTemplateId(){return gM}constructSelectDropDown(e){this.contextViewProvider=e,this.selectDropDownContainer=Q(".monaco-select-box-dropdown-container"),this.selectionDetailsPane=K(this.selectDropDownContainer,Ha(".select-box-details-pane"));const t=K(this.selectDropDownContainer,Ha(".select-box-dropdown-container-width-control")),i=K(t,Ha(".width-control-div"));this.widthControlElement=document.createElement("span"),this.widthControlElement.className="option-text-width-control",K(i,this.widthControlElement),this._dropDownPosition=0,this.styleElement=bn(this.selectDropDownContainer),this.selectDropDownContainer.setAttribute("draggable","true"),this._register(R(this.selectDropDownContainer,F.DRAG_START,n=>{ve.stop(n,!0)}))}registerListeners(){this._register(At(this.selectElement,"change",t=>{this.selected=t.target.selectedIndex,this._onDidSelect.fire({index:t.target.selectedIndex,selected:t.target.value}),this.options[this.selected]&&this.options[this.selected].text&&this.setTitle(this.options[this.selected].text)})),this._register(R(this.selectElement,F.CLICK,t=>{ve.stop(t),this._isVisible?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(R(this.selectElement,F.MOUSE_DOWN,t=>{ve.stop(t)}));let e;this._register(R(this.selectElement,"touchstart",t=>{e=this._isVisible})),this._register(R(this.selectElement,"touchend",t=>{ve.stop(t),e?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(R(this.selectElement,F.KEY_DOWN,t=>{const i=new Be(t);let n=!1;l.isMacintosh?(i.keyCode===18||i.keyCode===16||i.keyCode===10||i.keyCode===3)&&(n=!0):(i.keyCode===18&&i.altKey||i.keyCode===16&&i.altKey||i.keyCode===10||i.keyCode===3)&&(n=!0),n&&(this.showSelectDropDown(),ve.stop(t,!0))}))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){l.equals(this.options,e)||(this.options=e,this.selectElement.options.length=0,this._hasDetails=!1,this._cachedMaxDetailsHeight=void 0,this.options.forEach((i,n)=>{this.selectElement.add(this.createOption(i.text,n,i.isDisabled)),typeof i.description=="string"&&(this._hasDetails=!0)})),t!==void 0&&(this.select(t),this._currentSelection=this.selected)}setOptionsList(){this.selectList?.splice(0,this.selectList.length,this.options)}select(e){e>=0&&ethis.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.options[this.selected]&&this.options[this.selected].text&&this.setTitle(this.options[this.selected].text)}focus(){this.selectElement&&(this.selectElement.tabIndex=0,this.selectElement.focus())}blur(){this.selectElement&&(this.selectElement.tabIndex=-1,this.selectElement.blur())}setFocusable(e){this.selectElement.tabIndex=e?0:-1}render(e){this.container=e,e.classList.add("select-container"),e.appendChild(this.selectElement),this.styleSelectElement()}initStyleSheet(){const e=[];this.styles.listFocusBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { background-color: ${this.styles.listFocusBackground} !important; }`),this.styles.listFocusForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { color: ${this.styles.listFocusForeground} !important; }`),this.styles.decoratorRightForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.focused) .option-decorator-right { color: ${this.styles.decoratorRightForeground}; }`),this.styles.selectBackground&&this.styles.selectBorder&&this.styles.selectBorder!==this.styles.selectBackground?(e.push(`.monaco-select-box-dropdown-container { border: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectBorder} } `)):this.styles.selectListBorder&&(e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectListBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectListBorder} } `)),this.styles.listHoverForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { color: ${this.styles.listHoverForeground} !important; }`),this.styles.listHoverBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { background-color: ${this.styles.listHoverBackground} !important; }`),this.styles.listFocusOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { outline: 1px solid ${this.styles.listFocusOutline} !important; outline-offset: -1px !important; }`),this.styles.listHoverOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { outline: 1px solid ${this.styles.listHoverOutline} !important; outline-offset: -1px !important; }`),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled.focused { background-color: transparent !important; color: inherit !important; outline: none !important; }"),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled:hover { background-color: transparent !important; color: inherit !important; outline: none !important; }"),this.styleElement.textContent=e.join(` +`)}styleSelectElement(){const e=this.styles.selectBackground??"",t=this.styles.selectForeground??"",i=this.styles.selectBorder??"";this.selectElement.style.backgroundColor=e,this.selectElement.style.color=t,this.selectElement.style.borderColor=i}styleList(){const e=this.styles.selectBackground??"",t=Eo(this.styles.selectListBackground,e);this.selectDropDownContainer.style.backgroundColor=t,this.selectDropDownListContainer.style.backgroundColor=t,this.selectionDetailsPane.style.backgroundColor=t,this.selectList.style(this.styles)}createOption(e,t,i){const n=document.createElement("option");return n.value=e,n.text=e,n.disabled=!!i,n}showSelectDropDown(){this.selectionDetailsPane.textContent="",!(!this.contextViewProvider||this._isVisible)&&(this.createSelectList(this.selectDropDownContainer),this.setOptionsList(),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e,!0),layout:()=>{this.layoutSelectDropDown()},onHide:()=>{this.selectDropDownContainer.classList.remove("visible")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._isVisible=!0,this.hideSelectDropDown(!1),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e),layout:()=>this.layoutSelectDropDown(),onHide:()=>{this.selectDropDownContainer.classList.remove("visible")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._currentSelection=this.selected,this._isVisible=!0,this.selectElement.setAttribute("aria-expanded","true"))}hideSelectDropDown(e){!this.contextViewProvider||!this._isVisible||(this._isVisible=!1,this.selectElement.setAttribute("aria-expanded","false"),e&&this.selectElement.focus(),this.contextViewProvider.hideContextView())}renderSelectDropDown(e,t){e.appendChild(this.selectDropDownContainer);const i=j(this.selectElement).getComputedStyle(this.selectElement).fontSize;return i&&(this.selectDropDownContainer.style.fontSize=i),this.layoutSelectDropDown(t),{dispose:()=>{this.selectDropDownContainer.remove()}}}measureMaxDetailsHeight(){let e=0;return this.options.forEach((t,i)=>{this.updateDetail(i),this.selectionDetailsPane.offsetHeight>e&&(e=this.selectionDetailsPane.offsetHeight)}),e}layoutSelectDropDown(e){if(this._skipLayout)return!1;if(this.selectList){this.selectDropDownContainer.classList.add("visible");const t=j(this.selectElement),i=Qi(this.selectElement),n=t.innerHeight-i.top-i.height-(this.selectBoxOptions.minBottomMargin||0),s=i.top-Js.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN,r=this.selectElement.offsetWidth,a=this.setWidthControlElement(this.widthControlElement),c=`${Math.max(a,Math.round(r))}px`;this.selectDropDownContainer.style.width=c,this.selectList.getHTMLElement().style.height="",this.selectList.layout();let h=this.selectList.contentHeight;this._hasDetails&&this._cachedMaxDetailsHeight===void 0&&(this._cachedMaxDetailsHeight=this.measureMaxDetailsHeight());const d=this._hasDetails?this._cachedMaxDetailsHeight:0,u=h+d,f=Math.floor((n-d)/this.getHeight()),g=Math.floor((s-d)/this.getHeight());if(e)return i.top+i.height>t.innerHeight-22||i.topf&&this.options.length>f?(this._dropDownPosition=1,this.selectDropDownListContainer.remove(),this.selectionDetailsPane.remove(),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectionDetailsPane.classList.remove("border-top"),this.selectionDetailsPane.classList.add("border-bottom")):(this._dropDownPosition=0,this.selectDropDownListContainer.remove(),this.selectionDetailsPane.remove(),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectionDetailsPane.classList.remove("border-bottom"),this.selectionDetailsPane.classList.add("border-top")),!0);if(i.top+i.height>t.innerHeight-22||i.topn&&(h=f*this.getHeight())}else u>s&&(h=g*this.getHeight());return this.selectList.layout(h),this.selectList.domFocus(),this.selectList.length>0&&(this.selectList.setFocus([this.selected||0]),this.selectList.reveal(this.selectList.getFocus()[0]||0)),this._hasDetails?(this.selectList.getHTMLElement().style.height=`${h}px`,this.selectDropDownContainer.style.height=""):this.selectDropDownContainer.style.height=`${h}px`,this.updateDetail(this.selected),this.selectDropDownContainer.style.width=c,this.selectDropDownListContainer.setAttribute("tabindex","0"),!0}else return!1}setWidthControlElement(e){let t=0;if(e){let i=0,n=0;this.options.forEach((s,r)=>{const a=s.detail?s.detail.length:0,c=s.decoratorRight?s.decoratorRight.length:0,h=s.text.length+a+c;h>n&&(i=r,n=h)}),e.textContent=this.options[i].text+(this.options[i].decoratorRight?`${this.options[i].decoratorRight} `:""),t=jf(e)}return t}createSelectList(e){if(this.selectList)return;this.selectDropDownListContainer=K(e,Ha(".select-box-dropdown-list-container")),this.listRenderer=new nq,this.selectList=this._register(new zn("SelectBoxCustom",this.selectDropDownListContainer,this,[this.listRenderer],{useShadows:!1,verticalScrollMode:3,keyboardSupport:!1,mouseSupport:!1,accessibilityProvider:{getAriaLabel:n=>{if(n.isSeparator)return l.localize(17,"separator");let s=n.text;return n.detail&&(s+=`. ${n.detail}`),n.decoratorRight&&(s+=`. ${n.decoratorRight}`),n.description&&(s+=`. ${n.description}`),s},getWidgetAriaLabel:()=>l.localize(18,"Select Box"),getRole:()=>l.isMacintosh?"":"option",getWidgetRole:()=>"listbox"}})),this.selectBoxOptions.ariaLabel&&(this.selectList.ariaLabel=this.selectBoxOptions.ariaLabel);const t=this._register(new Te(this.selectDropDownListContainer,"keydown")),i=l.Event.chain(t.event,n=>n.filter(()=>this.selectList.length>0).map(s=>new Be(s)));this._register(l.Event.chain(i,n=>n.filter(s=>s.keyCode===3))(this.onEnter,this)),this._register(l.Event.chain(i,n=>n.filter(s=>s.keyCode===2))(this.onEnter,this)),this._register(l.Event.chain(i,n=>n.filter(s=>s.keyCode===9))(this.onEscape,this)),this._register(l.Event.chain(i,n=>n.filter(s=>s.keyCode===16))(this.onUpArrow,this)),this._register(l.Event.chain(i,n=>n.filter(s=>s.keyCode===18))(this.onDownArrow,this)),this._register(l.Event.chain(i,n=>n.filter(s=>s.keyCode===12))(this.onPageDown,this)),this._register(l.Event.chain(i,n=>n.filter(s=>s.keyCode===11))(this.onPageUp,this)),this._register(l.Event.chain(i,n=>n.filter(s=>s.keyCode===14))(this.onHome,this)),this._register(l.Event.chain(i,n=>n.filter(s=>s.keyCode===13))(this.onEnd,this)),this._register(l.Event.chain(i,n=>n.filter(s=>s.keyCode>=21&&s.keyCode<=56||s.keyCode>=85&&s.keyCode<=113))(this.onCharacter,this)),this._register(R(this.selectList.getHTMLElement(),F.POINTER_UP,n=>this.onPointerUp(n))),this._register(this.selectList.onMouseOver(n=>typeof n.index<"u"&&!this.options[n.index]?.isDisabled&&this.selectList.setFocus([n.index]))),this._register(this.selectList.onDidChangeFocus(n=>this.onListFocus(n))),this._register(R(this.selectDropDownContainer,F.FOCUS_OUT,n=>{!this._isVisible||ut(n.relatedTarget,this.selectDropDownContainer)||this.onListBlur()})),this.selectList.getHTMLElement().setAttribute("aria-label",this.selectBoxOptions.ariaLabel||""),this.selectList.getHTMLElement().setAttribute("aria-expanded","true"),this.styleList()}onPointerUp(e){if(!this.selectList.length)return;ve.stop(e);const t=e.target;if(!t||t.classList.contains("slider"))return;const i=t.closest(".monaco-list-row");if(!i)return;const n=Number(i.getAttribute("data-index")),s=i.classList.contains("option-disabled");n>=0&&n{for(let r=0;r=this.options.length)return;this.selected=t,this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0])}}onUpArrow(e){if(this.selected>0){ve.stop(e,!0);let t=this.selected-1;for(;t>=0&&this.options[t].isDisabled;)t--;if(t<0)return;this.selected=t,this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0])}}onPageUp(e){ve.stop(e),this.selectList.focusPreviousPage(),setTimeout(()=>{let t=this.selectList.getFocus()[0];for(;t>0&&this.options[t].isDisabled;)t--;this.options[t].isDisabled||(this.selected=t,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))},1)}onPageDown(e){ve.stop(e),this.selectList.focusNextPage(),setTimeout(()=>{let t=this.selectList.getFocus()[0];for(;t0&&this.options[t].isDisabled;)t--;this.options[t].isDisabled||(this.selected=t,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onCharacter(e){const t=l.KeyCodeUtils.toString(e.keyCode);let i=-1;for(let n=0;n{this._register(R(this.selectElement,e,t=>{this.selectElement.focus()}))}),this._register(At(this.selectElement,"click",e=>{ve.stop(e,!0)})),this._register(At(this.selectElement,"change",e=>{this.selectElement.title=e.target.value,this._onDidSelect.fire({index:e.target.selectedIndex,selected:e.target.value})})),this._register(At(this.selectElement,"keydown",e=>{let t=!1;l.isMacintosh?(e.keyCode===18||e.keyCode===16||e.keyCode===10)&&(t=!0):(e.keyCode===18&&e.altKey||e.keyCode===10||e.keyCode===3)&&(t=!0),t&&e.stopPropagation()}))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){(!this.options||!l.equals(this.options,e))&&(this.options=e,this.selectElement.options.length=0,this.options.forEach((i,n)=>{this.selectElement.add(this.createOption(i.text,n,i.isDisabled,i.isSeparator))})),t!==void 0&&this.select(t)}select(e){this.options.length===0?this.selected=0:e>=0&&ethis.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.selected{this.element&&this.handleActionChangeEvent(n)}))}handleActionChangeEvent(e){e.enabled!==void 0&&this.updateEnabled(),e.checked!==void 0&&this.updateChecked(),e.class!==void 0&&this.updateClass(),e.label!==void 0&&(this.updateLabel(),this.updateTooltip()),e.tooltip!==void 0&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new Jr)),this._actionRunner}set actionRunner(e){this._actionRunner=e}isEnabled(){return this._action.enabled}setActionContext(e){this._context=e}render(e){const t=this.element=e;this._register(li.addTarget(e));const i=this.options&&this.options.draggable;i&&(e.draggable=!0,di&&this._register(R(e,F.DRAG_START,n=>n.dataTransfer?.setData(pc.TEXT,this._action.label)))),this._register(R(t,_.EventType$1.Tap,n=>this.onClick(n,!0))),this._register(R(t,F.MOUSE_DOWN,n=>{i||ve.stop(n,!0),this._action.enabled&&n.button===0&&t.classList.add("active")})),l.isMacintosh&&this._register(R(t,F.CONTEXT_MENU,n=>{n.button===0&&n.ctrlKey===!0&&this.onClick(n)})),this._register(R(t,F.CLICK,n=>{ve.stop(n,!0),this.options&&this.options.isMenu||this.onClick(n)})),this._register(R(t,F.DBLCLICK,n=>{ve.stop(n,!0)})),[F.MOUSE_UP,F.MOUSE_OUT].forEach(n=>{this._register(R(t,n,s=>{ve.stop(s),t.classList.remove("active")}))})}onClick(e,t=!1){ve.stop(e,!0);const i=l.isUndefinedOrNull(this._context)?this.options?.useEventAsContext?e:{preserveFocus:t}:this._context;this.actionRunner.run(this._action,i)}focus(){this.element&&(this.element.tabIndex=0,this.element.focus(),this.element.classList.add("focused"))}blur(){this.element&&(this.element.blur(),this.element.tabIndex=-1,this.element.classList.remove("focused"))}setFocusable(e){this.element&&(this.element.tabIndex=e?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}getClass(){return this.action.class}getTooltip(){return this.action.tooltip}getHoverContents(){return this.getTooltip()}updateTooltip(){if(!this.element)return;const e=this.getHoverContents()??"";if(this.updateAriaLabel(),!this.customHover&&e!==""){const t=this.options.hoverDelegate??Io("element");this.customHover=this._store.add(En().setupManagedHover(t,this.element,e))}else this.customHover&&this.customHover.update(e)}updateAriaLabel(){if(this.element){const e=this.getTooltip()??"";this.element.setAttribute("aria-label",e)}}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),this._context=void 0,super.dispose()}}class Fp extends Vn{constructor(e,t,i){i={...i,icon:i.icon!==void 0?i.icon:!1,label:i.label!==void 0?i.label:!0},super(e,t,i),this.options=i,this.cssClass=""}render(e){super.render(e),l.assertType(this.element);const t=document.createElement("a");if(t.classList.add("action-label"),t.setAttribute("role",this.getDefaultAriaRole()),this.label=t,this.element.appendChild(t),this.options.label&&this.options.keybinding&&!this.options.keybindingNotRenderedWithLabel){const i=document.createElement("span");i.classList.add("keybinding"),i.textContent=this.options.keybinding,this.element.appendChild(i)}this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}getDefaultAriaRole(){return this._action.id===ft.ID?"presentation":this.options.isMenu?"menuitem":this.options.isTabList?"tab":"button"}focus(){this.label&&(this.label.tabIndex=0,this.label.focus())}blur(){this.label&&(this.label.tabIndex=-1)}setFocusable(e){this.label&&(this.label.tabIndex=e?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.action.label)}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:this.action.label&&(e=this.action.label,this.options.keybinding&&(e=l.localize(0,"{0} ({1})",e,this.options.keybinding))),e??void 0}updateClass(){this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.action.id===ft.ID&&this.action.class?this.label?.classList.add(this.action.class):this.options.icon?(this.cssClass=this.getClass(),this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):this.label?.classList.remove("codicon")}updateEnabled(){this.action.enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),this.element?.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),this.element?.classList.add("disabled"))}updateAriaLabel(){if(this.label){const e=this.getTooltip()??"";this.label.setAttribute("aria-label",e)}}updateChecked(){this.label&&(this.action.checked!==void 0?(this.label.classList.toggle("checked",this.action.checked),this.options.isTabList?this.label.setAttribute("aria-selected",this.action.checked?"true":"false"):(this.label.setAttribute("aria-pressed",this.action.checked?"true":"false"),this.label.setAttribute("role","button"))):(this.label.classList.remove("checked"),this.label.removeAttribute(this.options.isTabList?"aria-selected":"aria-pressed"),this.label.setAttribute("role",this.getDefaultAriaRole())))}}class aq extends Vn{constructor(e,t,i,n,s,r,a){super(e,t),this.selectBox=new rq(i,n,s,r,a),this.selectBox.setFocusable(!1),this._register(this.selectBox),this.registerListeners()}select(e){this.selectBox.select(e)}registerListeners(){this._register(this.selectBox.onDidSelect(e=>this.runAction(e.selected,e.index)))}runAction(e,t){this.actionRunner.run(this._action,this.getActionContext(e,t))}getActionContext(e,t){return e}setFocusable(e){this.selectBox.setFocusable(e)}focus(){this.selectBox?.focus()}blur(){this.selectBox?.blur()}render(e){this.selectBox.render(e)}}class lq extends Jr{constructor(e,t){super(),this._onDidChangeVisibility=this._register(new l.Emitter),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=K(e,Q(".monaco-dropdown")),this._label=K(this._element,Q(".dropdown-label"));let i=t.labelRenderer;i||(i=s=>(s.textContent=t.label||"",null));for(const s of[F.CLICK,F.MOUSE_DOWN,_.EventType$1.Tap])this._register(R(this.element,s,r=>ve.stop(r,!0)));for(const s of[F.MOUSE_DOWN,_.EventType$1.Tap])this._register(R(this._label,s,r=>{Qf(r)&&r.button!==0||(this.visible?this.hide():this.show())}));this._register(R(this._label,F.KEY_DOWN,s=>{const r=new Be(s);(r.equals(3)||r.equals(10))&&(ve.stop(s,!0),this.visible?this.hide():this.show())}));const n=i(this._label);n&&this._register(n),this._register(li.addTarget(this._label))}get element(){return this._element}show(){this.visible||(this.visible=!0,this._onDidChangeVisibility.fire(!0))}hide(){this.visible&&(this.visible=!1,this._onDidChangeVisibility.fire(!1))}dispose(){super.dispose(),this.hide(),this.boxContainer&&(this.boxContainer.remove(),this.boxContainer=void 0),this.contents&&(this.contents.remove(),this.contents=void 0),this._label&&(this._label.remove(),this._label=void 0)}}class cq extends lq{constructor(e,t){super(e,t),this._options=t,this._actions=[],this.actions=t.actions||[]}set menuOptions(e){this._menuOptions=e}get menuOptions(){return this._menuOptions}get actions(){return this._options.actionProvider?this._options.actionProvider.getActions():this._actions}set actions(e){this._actions=e}show(){super.show(),this.element.classList.add("active"),this._options.contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:(e,t)=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(e,t):void 0,getKeyBinding:e=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(e):void 0,getMenuClassName:()=>this._options.menuClassName||"",onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this._options.menuAsChild?this.element:void 0,skipTelemetry:this._options.skipTelemetry})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}class Bp extends Vn{get onDidChangeVisibility(){return this._onDidChangeVisibility.event}constructor(e,t,i,n=Object.create(null)){super(null,e,n),this.actionItem=null,this._onDidChangeVisibility=this._register(new l.Emitter),this.menuActionsOrProvider=t,this.contextMenuProvider=i,this.options=n,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(e){this.actionItem=e;const t=s=>(this.element=K(s,Q("a.action-label")),this.setAriaLabelAttributes(this.element),this.renderLabel(this.element)),i=Array.isArray(this.menuActionsOrProvider),n={contextMenuProvider:this.contextMenuProvider,labelRenderer:t,menuAsChild:this.options.menuAsChild,actions:i?this.menuActionsOrProvider:void 0,actionProvider:i?void 0:this.menuActionsOrProvider,skipTelemetry:this.options.skipTelemetry};if(this.dropdownMenu=this._register(new cq(e,n)),this._register(this.dropdownMenu.onDidChangeVisibility(s=>{this.element?.setAttribute("aria-expanded",`${s}`),this._onDidChangeVisibility.fire(s)})),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){const s=this;this.dropdownMenu.menuOptions={...this.dropdownMenu.menuOptions,get anchorAlignment(){return s.options.anchorAlignmentProvider()}}}this.updateTooltip(),this.updateEnabled()}renderLabel(e){let t=[];return typeof this.options.classNames=="string"?t=this.options.classNames.split(/\s+/g).filter(i=>!!i):this.options.classNames&&(t=this.options.classNames),t.find(i=>i==="icon")||t.push("codicon"),e.classList.add(...t),this._action.label&&this._register(En().setupManagedHover(this.options.hoverDelegate??Io("mouse"),e,this._action.label)),null}setAriaLabelAttributes(e){e.setAttribute("role","button"),e.setAttribute("aria-haspopup","true"),e.setAttribute("aria-expanded","false"),e.ariaLabel=this._action.label||""}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:this.action.label&&(e=this.action.label),e??void 0}setActionContext(e){super.setActionContext(e),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=e:this.dropdownMenu.menuOptions={context:e})}show(){this.dropdownMenu?.show()}updateEnabled(){const e=!this.action.enabled;this.actionItem?.classList.toggle("disabled",e),this.element?.classList.toggle("disabled",e)}}class zp{constructor(e,t,i=t){this.modifierLabels=[null],this.modifierLabels[2]=e,this.modifierLabels[1]=t,this.modifierLabels[3]=i}toLabel(e,t,i){if(t.length===0)return null;const n=[];for(let s=0,r=t.length;s{Yu&&(Yu.remove(),Yu=void 0)},o)}function $p(o,e){const t=[],i=Math.max(e.scale?.length??0,e.rotate?.length??0,e.translateY?.length??0);if(i!==0){for(let n=0;n=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Si=function(o,e){return function(t,i){e(t,i,o)}};function Nq(o,e){const t=[];return Rq(o,t),t}function Rq(o,e,t){const i=hs.getInstance(),n=i.keyStatus.altKey||(l.isWindows||l.isLinux)&&i.keyStatus.shiftKey;wM(o,e,n,s=>s==="navigation")}function CM(o,e,t,i){const n={primary:[],secondary:[]};return vM(o,n,e,t,i),n}function Mq(o,e,t,i){const n=[];return vM(o,n,e,t,i),n}function vM(o,e,t,i,n){wM(o,e,!1,typeof t=="string"?r=>r===t:t,i,n)}function wM(o,e,t,i=r=>r==="navigation",n=()=>!1,s=!1){let r,a;Array.isArray(e)?(r=e,a=e):(r=e.primary,a=e.secondary);const c=new Set;for(const[h,d]of o){let u;i(h)?(u=r,u.length>0&&s&&u.push(new ft)):(u=a,u.length>0&&u.push(new ft));for(let f of d){t&&(f=f instanceof _.MenuItemAction&&f.alt?f.alt:f);const g=u.push(f);f instanceof cd&&c.add({group:h,action:f,index:g-1})}}for(const{group:h,action:d,index:u}of c){const f=i(h)?r:a,g=d.actions;n(d,h,f.length)&&f.splice(u,1,...g)}}_.MenuEntryActionViewItem=class extends Fp{constructor(e,t,i,n,s,r,a,c){super(void 0,e,{icon:!!(e.class||e.item.icon),label:!e.class&&!e.item.icon,draggable:t?.draggable,keybinding:t?.keybinding,hoverDelegate:t?.hoverDelegate,keybindingNotRenderedWithLabel:t?.keybindingNotRenderedWithLabel}),this._options=t,this._keybindingService=i,this._notificationService=n,this._contextKeyService=s,this._themeService=r,this._contextMenuService=a,this._accessibilityService=c,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new l.MutableDisposable),this._altKey=hs.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}async onClick(e){if(e.preventDefault(),e.stopPropagation(),this._options?.onClickAnimation&&this.element&&!this._accessibilityService.isMotionReduced()){const t=this._menuItemAction.item.icon;xq(this.element,this._options.onClickAnimation,_.ThemeIcon.isThemeIcon(t)?t:void 0)}try{await this.actionRunner.run(this._commandAction,this._context)}catch(t){this._notificationService.error(t)}}render(e){if(super.render(e),e.classList.add("menu-entry"),this.options.icon&&this._updateItemClass(this._menuItemAction.item),this._menuItemAction.alt){let t=!1;const i=()=>{const n=!!this._menuItemAction.alt?.enabled&&(!this._accessibilityService.isMotionReduced()||t)&&(this._altKey.keyStatus.altKey||this._altKey.keyStatus.shiftKey&&t);n!==this._wantsAltCommand&&(this._wantsAltCommand=n,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._register(this._altKey.event(i)),this._register(R(e,"mouseleave",n=>{t=!1,i()})),this._register(R(e,"mouseenter",n=>{t=!0,i()})),i()}}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}getTooltip(){const e=this._commandAction.tooltip||this._commandAction.label;let t=this._keybindingService.appendKeybinding(e,this._commandAction.id,this._contextKeyService);if(!this._wantsAltCommand&&this._menuItemAction.alt?.enabled){const i=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,n=this._keybindingService.appendKeybinding(i,this._menuItemAction.alt.id,this._contextKeyService);t=l.localize(1698,`{0} +[{1}] {2}`,t,ky.modifierLabels[l.OS].altKey,n)}return t}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._updateItemClass(this._menuItemAction.item))}_updateItemClass(e){this._itemClassDispose.value=void 0;const{element:t,label:i}=this;if(!t||!i)return;const n=this._commandAction.checked&&mq(e.toggled)&&e.toggled.icon?e.toggled.icon:e.icon;if(n)if(_.ThemeIcon.isThemeIcon(n)){const s=_.ThemeIcon.asClassNameArray(n);i.classList.add(...s),this._itemClassDispose.value=l.toDisposable(()=>{i.classList.remove(...s)})}else i.style.backgroundImage=rr(this._themeService.getColorTheme().type)?Bs(n.dark):Bs(n.light),i.classList.add("icon"),this._itemClassDispose.value=l.combinedDisposable(l.toDisposable(()=>{i.style.backgroundImage="",i.classList.remove("icon")}),this._themeService.onDidColorThemeChange(()=>{this.updateClass()}))}},_.MenuEntryActionViewItem=Kp([Si(2,xt),Si(3,yn),Si(4,be),Si(5,_i),Si(6,nn),Si(7,Ui)],_.MenuEntryActionViewItem);class Vy extends _.MenuEntryActionViewItem{render(e){this.options.label=!0,this.options.icon=!1,super.render(e),e.classList.add("text-only"),e.classList.toggle("use-comma",this._options?.useComma??!1)}updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const t=Vy._symbolPrintEnter(e);this._options?.conversational?this.label.textContent=l.localize(1699,"{1} to {0}",this._action.label,t):this.label.textContent=l.localize(1700,"{0} ({1})",this._action.label,t)}}static _symbolPrintEnter(e){return e.getLabel()?.replace(/\benter\b/gi,"⏎").replace(/\bEscape\b/gi,"Esc")}}let Uy=class extends Bp{constructor(e,t,i,n,s){const r={...t,menuAsChild:t?.menuAsChild??!1,classNames:t?.classNames??(_.ThemeIcon.isThemeIcon(e.item.icon)?_.ThemeIcon.asClassName(e.item.icon):void 0),keybindingProvider:t?.keybindingProvider??(a=>i.lookupKeybinding(a.id))};super(e,{getActions:()=>e.actions},n,r),this._keybindingService=i,this._contextMenuService=n,this._themeService=s}render(e){super.render(e),l.assertType(this.element),e.classList.add("menu-entry");const t=this._action,{icon:i}=t.item;if(i&&!_.ThemeIcon.isThemeIcon(i)){this.element.classList.add("icon");const n=()=>{this.element&&(this.element.style.backgroundImage=rr(this._themeService.getColorTheme().type)?Bs(i.dark):Bs(i.light))};n(),this._register(this._themeService.onDidColorThemeChange(()=>{n()}))}}};Uy=Kp([Si(2,xt),Si(3,nn),Si(4,_i)],Uy);let $y=class extends Vn{constructor(e,t,i,n,s,r,a,c){super(null,e),this._keybindingService=i,this._notificationService=n,this._contextMenuService=s,this._menuService=r,this._instaService=a,this._storageService=c,this._defaultActionDisposables=this._register(new l.DisposableStore),this._container=null,this._primaryActionListener=this._register(new l.MutableDisposable),this._options=t,this._storageKey=`${e.item.submenu.id}_lastActionId`;let h;const d=t?.togglePrimaryAction?c.get(this._storageKey,1):void 0;d&&(h=e.actions.find(f=>d===f.id)),h||(h=e.actions[0]),this._defaultAction=this._defaultActionDisposables.add(this._instaService.createInstance(_.MenuEntryActionViewItem,h,{keybinding:this._getDefaultActionKeybindingLabel(h),hoverDelegate:t?.hoverDelegate}));const u={keybindingProvider:f=>this._keybindingService.lookupKeybinding(f.id),...t,menuAsChild:t?.menuAsChild??!0,classNames:t?.classNames??["codicon","codicon-chevron-down"],actionRunner:t?.actionRunner??this._register(new Jr)};this._dropdown=this._register(new Bp(e,e.actions,this._contextMenuService,u)),t?.togglePrimaryAction&&this.registerTogglePrimaryActionListener()}registerTogglePrimaryActionListener(){this._primaryActionListener.value=this._dropdown.actionRunner.onDidRun(e=>{e.action instanceof _.MenuItemAction&&this.update(e.action)})}update(e){this._options?.togglePrimaryAction&&this._storageService.store(this._storageKey,e.id,1,1),this._defaultActionDisposables.clear(),this._defaultAction=this._defaultActionDisposables.add(this._instaService.createInstance(_.MenuEntryActionViewItem,e,{keybinding:this._getDefaultActionKeybindingLabel(e),hoverDelegate:this._options?.hoverDelegate})),this._defaultAction.actionRunner=this._defaultActionDisposables.add(new class extends Jr{async runAction(t,i){await t.run(void 0)}}),this._container&&this._defaultAction.render(Xf(this._container,Q(".action-container")))}_getDefaultActionKeybindingLabel(e){let t;if(this._options?.renderKeybindingWithDefaultActionLabel){const i=this._keybindingService.lookupKeybinding(e.id);i&&(t=`(${i.getLabel()})`)}return t}setActionContext(e){super.setActionContext(e),this._defaultAction.setActionContext(e),this._dropdown.setActionContext(e)}set actionRunner(e){super.actionRunner=e,this._defaultAction.actionRunner=e,this._options?.togglePrimaryAction||(this._dropdown.actionRunner=e),this._primaryActionListener.value&&this.registerTogglePrimaryActionListener()}get actionRunner(){return super.actionRunner}render(e){this._container=e,super.render(this._container),this._container.classList.add("monaco-dropdown-with-default");const t=Q(".action-container");this._defaultAction.render(K(this._container,t)),this._register(R(t,F.KEY_DOWN,n=>{const s=new Be(n);s.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),s.stopPropagation())}));const i=Q(".dropdown-action-container");this._dropdown.render(K(this._container,i)),this._register(R(i,F.KEY_DOWN,n=>{const s=new Be(n);s.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),this._defaultAction.element?.focus(),s.stopPropagation())}))}focus(e){e?this._dropdown.focus():(this._defaultAction.element.tabIndex=0,this._defaultAction.element.focus())}blur(){this._defaultAction.element.tabIndex=-1,this._dropdown.blur(),this._container.blur()}setFocusable(e){e?this._defaultAction.element.tabIndex=0:(this._defaultAction.element.tabIndex=-1,this._dropdown.setFocusable(!1))}};$y=Kp([Si(2,xt),Si(3,yn),Si(4,nn),Si(5,Zo),Si(6,me),Si(7,Qa)],$y);let Ky=class extends aq{constructor(e,t,i){super(null,e,e.actions.map(n=>n.id===ft.ID?oq:{text:n.label,isDisabled:!n.enabled}),0,t,vq,{ariaLabel:e.tooltip||e.label,optionsAsChildren:!0,useCustomDrawn:!Eq(i)}),this.select(Math.max(0,e.actions.findIndex(n=>n.checked)))}render(e){super.render(e),e.style.borderColor=z(cv)}runAction(e,t){const i=this.action.actions[t];i&&this.actionRunner.run(i)}};Ky=Kp([Si(1,Fc),Si(2,Ge)],Ky);function Gy(o,e,t){return e instanceof _.MenuItemAction?o.createInstance(_.MenuEntryActionViewItem,e,t):e instanceof sa?e.item.isSelection?o.createInstance(Ky,e):e.item.isSplitButton?o.createInstance($y,e,{...t,togglePrimaryAction:typeof e.item.isSplitButton!="boolean"?e.item.isSplitButton.togglePrimaryAction:!1}):o.createInstance(Uy,e,t):void 0}class el extends l.Disposable{get viewItems(){return this._viewItems}get onDidBlur(){return this._onDidBlur.event}get onDidCancel(){return this._onDidCancel.event}get onDidRun(){return this._onDidRun.event}get onWillRun(){return this._onWillRun.event}constructor(e,t={}){super(),this._actionRunnerDisposables=this._register(new l.DisposableStore),this.viewItemDisposables=this._register(new l.DisposableMap),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new l.Emitter),this._onDidCancel=this._register(new l.Emitter({onWillAddFirstListener:()=>this.cancelHasListener=!0})),this.cancelHasListener=!1,this._onDidRun=this._register(new l.Emitter),this._onWillRun=this._register(new l.Emitter),this.options=t,this._context=t.context??null,this._orientation=this.options.orientation??0,this._triggerKeys={keyDown:this.options.triggerKeys?.keyDown??!1,keys:this.options.triggerKeys?.keys??[3,10]},this._hoverDelegate=t.hoverDelegate??this._register(sM()),this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new Jr,this._actionRunnerDisposables.add(this._actionRunner)),this._actionRunnerDisposables.add(this._actionRunner.onDidRun(s=>this._onDidRun.fire(s))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun(s=>this._onWillRun.fire(s))),this._viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar";let i,n;switch(this._orientation){case 0:i=[15],n=[17];break;case 1:i=[16],n=[18],this.domNode.className+=" vertical";break}this._register(R(this.domNode,F.KEY_DOWN,s=>{const r=new Be(s);let a=!0;const c=typeof this.focusedItem=="number"?this.viewItems[this.focusedItem]:void 0;i&&(r.equals(i[0])||r.equals(i[1]))?a=this.focusPrevious():n&&(r.equals(n[0])||r.equals(n[1]))?a=this.focusNext():r.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():r.equals(14)?a=this.focusFirst():r.equals(13)?a=this.focusLast():r.equals(2)&&c instanceof Vn&&c.trapsArrowNavigation?a=this.focusNext(void 0,!0):this.isTriggerKeyEvent(r)?this._triggerKeys.keyDown?this.doTrigger(r):this.triggerKeyDown=!0:a=!1,a&&(r.preventDefault(),r.stopPropagation())})),this._register(R(this.domNode,F.KEY_UP,s=>{const r=new Be(s);this.isTriggerKeyEvent(r)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(r)),r.preventDefault(),r.stopPropagation()):(r.equals(2)||r.equals(1026)||r.equals(16)||r.equals(18)||r.equals(15)||r.equals(17))&&this.updateFocusedItem()})),this.focusTracker=this._register(Xr(this.domNode)),this._register(this.focusTracker.onDidBlur(()=>{(wt()===this.domNode||!ut(wt(),this.domNode))&&(this._onDidBlur.fire(),this.previouslyFocusedItem=this.focusedItem,this.focusedItem=void 0,this.triggerKeyDown=!1)})),this._register(this.focusTracker.onDidFocus(()=>this.updateFocusedItem())),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.options.highlightToggledItems&&this.actionsList.classList.add("highlight-toggled"),this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),e.appendChild(this.domNode)}refreshRole(){this.length()>=1?this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"):this.actionsList.setAttribute("role","presentation")}setFocusable(e){if(this.focusable=e,this.focusable){const t=this.viewItems.find(i=>i instanceof Vn&&i.isEnabled());t instanceof Vn&&t.setFocusable(!0)}else this.viewItems.forEach(t=>{t instanceof Vn&&t.setFocusable(!1)})}isTriggerKeyEvent(e){let t=!1;return this._triggerKeys.keys.forEach(i=>{t=t||e.equals(i)}),t}updateFocusedItem(){for(let e=0;et.setActionContext(e))}get actionRunner(){return this._actionRunner}set actionRunner(e){this._actionRunner=e,this._actionRunnerDisposables.clear(),this._actionRunnerDisposables.add(this._actionRunner.onDidRun(t=>this._onDidRun.fire(t))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun(t=>this._onWillRun.fire(t))),this.viewItems.forEach(t=>t.actionRunner=e)}getContainer(){return this.domNode}hasAction(e){return this.viewItems.findIndex(t=>t.action.id===e.id)!==-1}getAction(e){if(typeof e=="number")return this.viewItems[e]?.action;if(Ve(e)){for(;e.parentElement!==this.actionsList;){if(!e.parentElement)return;e=e.parentElement}for(let t=0;t{const r=document.createElement("li");r.className="action-item",r.setAttribute("role","presentation");let a;const c={hoverDelegate:this._hoverDelegate,...t,isTabList:this.options.ariaRole==="tablist"};this.options.actionViewItemProvider&&(a=this.options.actionViewItemProvider(s,c)),a||(a=new Fp(this.context,s,c)),this.options.allowContextMenu||this.viewItemDisposables.set(a,R(r,F.CONTEXT_MENU,h=>{ve.stop(h,!0)})),a.actionRunner=this._actionRunner,a.setActionContext(this.context),a.render(r),n===null||n<0||n>=this.actionsList.children.length?(this.actionsList.appendChild(r),this._viewItems.push(a)):(this.actionsList.insertBefore(r,this.actionsList.children[n]),this._viewItems.splice(n,0,a),n++)}),this.focusable){let s=!1;for(const r of this.viewItems){if(!(r instanceof Vn))continue;let a;s||r.action.id===ft.ID||!r.isEnabled()&&this.options.focusOnlyEnabledItems?a=!1:a=!0,a?(r.setFocusable(!0),s=!0):r.setFocusable(!1)}}typeof this.focusedItem=="number"&&this.focus(this.focusedItem),this.refreshRole()}getWidth(e){return this.actionsList.children.item(e)?.clientWidth??0}pull(e){e>=0&&e"u"){const n=this.viewItems.findIndex(s=>s.isEnabled());this.focusedItem=n===-1?void 0:n,this.updateFocus(void 0,void 0,!0)}else i!==void 0&&(this.focusedItem=i),this.updateFocus(void 0,void 0,!0)}focusFirst(){return this.focusedItem=this.length()-1,this.focusNext(!0)}focusLast(){return this.focusedItem=0,this.focusPrevious(!0)}focusNext(e,t){if(typeof this.focusedItem>"u")this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;const i=this.focusedItem;let n;do{if(!e&&this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=i,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,n=this.viewItems[this.focusedItem]}while(this.focusedItem!==i&&(this.options.focusOnlyEnabledItems&&!n.isEnabled()||n.action.id===ft.ID));return this.updateFocus(void 0,void 0,t),!0}focusPrevious(e){if(typeof this.focusedItem>"u")this.focusedItem=0;else if(this.viewItems.length<=1)return!1;const t=this.focusedItem;let i;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(!e&&this.options.preventLoopNavigation)return this.focusedItem=t,!1;this.focusedItem=this.viewItems.length-1}i=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&(this.options.focusOnlyEnabledItems&&!i.isEnabled()||i.action.id===ft.ID));return this.updateFocus(!0),!0}updateFocus(e,t,i=!1){typeof this.focusedItem>"u"&&this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem!==void 0&&this.previouslyFocusedItem!==this.focusedItem&&this.viewItems[this.previouslyFocusedItem]?.blur();const n=this.focusedItem!==void 0?this.viewItems[this.focusedItem]:void 0;if(n){let s=!0;l.isFunction(n.focus)||(s=!1),this.options.focusOnlyEnabledItems&&l.isFunction(n.isEnabled)&&!n.isEnabled()&&(s=!1),n.action.id===ft.ID&&(s=!1),s?(i||this.previouslyFocusedItem!==this.focusedItem)&&(n.focus(e),this.previouslyFocusedItem=this.focusedItem):(this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem=void 0),s&&n.showHover?.()}}doTrigger(e){if(typeof this.focusedItem>"u")return;const t=this.viewItems[this.focusedItem];if(t instanceof Vn){const i=t._context===null||t._context===void 0?e:t._context;this.run(t._action,i)}}async run(e,t){await this._actionRunner.run(e,t)}dispose(){this._context=void 0,this._viewItems=l.dispose(this._viewItems),this.getContainer().remove(),super.dispose()}}const jy=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,qy=/(&)?(&)([^\s&])/g;var Gp;(function(o){o[o.Right=0]="Right",o[o.Left=1]="Left"})(Gp||(Gp={}));var Yy;(function(o){o[o.Above=0]="Above",o[o.Below=1]="Below"})(Yy||(Yy={}));class th extends el{constructor(e,t,i,n){e.classList.add("monaco-menu-container"),e.setAttribute("role","presentation");const s=document.createElement("div");s.classList.add("monaco-menu"),s.setAttribute("role","presentation"),super(s,{orientation:1,actionViewItemProvider:h=>this.doGetActionViewItem(h,i,r),context:i.context,actionRunner:i.actionRunner,ariaLabel:i.ariaLabel,ariaRole:"menu",focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...l.isMacintosh||l.isLinux?[10]:[]],keyDown:!0}}),this.menuStyles=n,this.menuElement=s,this.actionsList.tabIndex=0,this.initializeOrUpdateStyleSheet(e,n),this._register(li.addTarget(s)),this._register(R(s,F.KEY_DOWN,h=>{new Be(h).equals(2)&&h.preventDefault()})),i.enableMnemonics&&this._register(R(s,F.KEY_DOWN,h=>{const d=h.key.toLocaleLowerCase(),u=this.mnemonics.get(d);if(u!==void 0&&(ve.stop(h,!0),u.length===1&&(u[0]instanceof yM&&u[0].container&&this.focusItemByElement(u[0].container),u[0].onClick(h)),u.length>1)){const f=u.shift();f&&f.container&&(this.focusItemByElement(f.container),u.push(f)),this.mnemonics.set(d,u)}})),l.isLinux&&this._register(R(s,F.KEY_DOWN,h=>{const d=new Be(h);d.equals(14)||d.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),ve.stop(h,!0)):(d.equals(13)||d.equals(12))&&(this.focusedItem=0,this.focusPrevious(),ve.stop(h,!0))})),this._register(R(this.domNode,F.MOUSE_OUT,h=>{const d=h.relatedTarget;ut(d,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),h.stopPropagation())})),this._register(R(this.actionsList,F.MOUSE_OVER,h=>{let d=h.target;if(!(!d||!ut(d,this.actionsList)||d===this.actionsList)){for(;d.parentElement!==this.actionsList&&d.parentElement!==null;)d=d.parentElement;if(d.classList.contains("action-item")){const u=this.focusedItem;this.setFocusedItem(d),u!==this.focusedItem&&this.updateFocus()}}})),this._register(li.addTarget(this.actionsList)),this._register(R(this.actionsList,_.EventType$1.Tap,h=>{let d=h.initialTarget;if(!(!d||!ut(d,this.actionsList)||d===this.actionsList)){for(;d.parentElement!==this.actionsList&&d.parentElement!==null;)d=d.parentElement;if(d.classList.contains("action-item")){const u=this.focusedItem;this.setFocusedItem(d),u!==this.focusedItem&&this.updateFocus()}}}));const r={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new Jg(s,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const a=this.scrollableElement.getDomNode();a.style.position="",this.styleScrollElement(a,n),this._register(R(s,_.EventType$1.Change,h=>{ve.stop(h,!0);const d=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:d-h.translationY})})),this._register(R(a,F.MOUSE_UP,h=>{h.preventDefault()}));const c=j(e);s.style.maxHeight=`${Math.max(10,c.innerHeight-e.getBoundingClientRect().top-35)}px`,t=t.filter((h,d)=>i.submenuIds?.has(h.id)?(console.warn(`Found submenu cycle: ${h.id}`),!1):!(h instanceof ft&&(d===t.length-1||d===0||t[d-1]instanceof ft))),this.push(t,{icon:!0,label:!0,isMenu:!0}),e.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter(h=>!(h instanceof LM)).forEach((h,d,u)=>{h.updatePositionInSet(d+1,u.length)})}initializeOrUpdateStyleSheet(e,t){this.styleSheet||(Yf(e)?this.styleSheet=bn(e):(th.globalStyleSheet||(th.globalStyleSheet=bn()),this.styleSheet=th.globalStyleSheet)),this.styleSheet.textContent=Oq(t,Yf(e))}styleScrollElement(e,t){const i=t.foregroundColor??"",n=t.backgroundColor??"",s=t.borderColor?`1px solid ${t.borderColor}`:"",r="var(--vscode-cornerRadius-large)";e.style.outline=s,e.style.borderRadius=r,e.style.color=i,e.style.backgroundColor=n}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}focusItemByElement(e){const t=this.focusedItem;this.setFocusedItem(e),t!==this.focusedItem&&this.updateFocus()}setFocusedItem(e){for(let t=0;t{this.element&&(this._register(R(this.element,F.MOUSE_UP,s=>{if(ve.stop(s,!0),di){if(new Bi(j(this.element),s).rightButton)return;this.onClick(s)}else setTimeout(()=>{this.onClick(s)},0)})),this._register(R(this.element,F.CONTEXT_MENU,s=>{ve.stop(s,!0)})))},100),this._register(this.runOnceToEnableMouseUp)}render(e){super.render(e),this.element&&(this.container=e,this.item=K(this.element,Q("a.action-menu-item")),this._action.id===ft.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=K(this.item,Q("span.menu-item-check"+_.ThemeIcon.asCSSSelector(l.Codicon.menuSelection))),this.check.setAttribute("role","none"),this.label=K(this.item,Q("span.action-label")),this.options.label&&this.options.keybinding&&(K(this.item,Q("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked(),this.applyStyle())}blur(){super.blur(),this.applyStyle()}focus(){super.focus(),this.item?.focus(),this.applyStyle()}updatePositionInSet(e,t){this.item&&(this.item.setAttribute("aria-posinset",`${e}`),this.item.setAttribute("aria-setsize",`${t}`))}updateLabel(){if(this.label&&this.options.label){On(this.label);let e=sp(this.action.label);if(e){const t=Aq(e);this.options.enableMnemonics||(e=t),this.label.setAttribute("aria-label",t.replace(/&&/g,"&"));const i=jy.exec(e);if(i){e=l.escape(e),qy.lastIndex=0;let n=qy.exec(e);for(;n&&n[1];)n=qy.exec(e);const s=r=>r.replace(/&&/g,"&");n?this.label.append(l.ltrim(s(e.substr(0,n.index))," "),Q("u",{"aria-hidden":"true"},n[3]),l.rtrim(s(e.substr(n.index+n[0].length))," ")):this.label.textContent=s(e).trim(),this.item?.setAttribute("aria-keyshortcuts",(i[1]?i[1]:i[3]).toLocaleLowerCase())}else this.label.textContent=e.replace(/&&/g,"&").trim()}}}updateTooltip(){}updateClass(){this.cssClass&&this.item&&this.item.classList.remove(...this.cssClass.split(" ")),this.options.icon&&this.label?(this.cssClass=this.action.class||"",this.label.classList.add("icon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" ")),this.updateEnabled()):this.label&&this.label.classList.remove("icon")}updateEnabled(){this.action.enabled?(this.element&&(this.element.classList.remove("disabled"),this.element.removeAttribute("aria-disabled")),this.item&&(this.item.classList.remove("disabled"),this.item.removeAttribute("aria-disabled"),this.item.tabIndex=0)):(this.element&&(this.element.classList.add("disabled"),this.element.setAttribute("aria-disabled","true")),this.item&&(this.item.classList.add("disabled"),this.item.setAttribute("aria-disabled","true")))}updateChecked(){if(!this.item)return;const e=this.action.checked;this.item.classList.toggle("checked",!!e),e!==void 0?(this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked",e?"true":"false")):(this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked",""))}getMnemonic(){return this.mnemonic}applyStyle(){const e=this.element&&this.element.classList.contains("focused"),t=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,i=e&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,n=e&&this.menuStyle.selectionBorderColor?`1px solid ${this.menuStyle.selectionBorderColor}`:"",s=e&&this.menuStyle.selectionBorderColor?"-1px":"";this.item&&(this.item.style.color=t??"",this.item.style.backgroundColor=i??"",this.item.style.outline=n,this.item.style.outlineOffset=s),this.check&&(this.check.style.color=t??"")}}class yM extends SM{constructor(e,t,i,n,s){super(e,e,n,s),this.submenuActions=t,this.parentData=i,this.submenuOptions=n,this.mysubmenu=null,this.submenuDisposables=this._register(new l.DisposableStore),this.mouseOver=!1,this.expandDirection=n&&n.expandDirection!==void 0?n.expandDirection:{horizontal:Gp.Right,vertical:Yy.Below},this.showScheduler=new l.RunOnceScheduler(()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))},250),this.hideScheduler=new l.RunOnceScheduler(()=>{this.element&&!ut(wt(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))},750)}render(e){super.render(e),this.element&&(this.item&&(this.item.classList.add("monaco-submenu-item"),this.item.tabIndex=0,this.item.setAttribute("aria-haspopup","true"),this.updateAriaExpanded("false"),this.submenuIndicator=K(this.item,Q("span.submenu-indicator"+_.ThemeIcon.asCSSSelector(l.Codicon.menuSubmenu))),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register(R(this.element,F.KEY_UP,t=>{const i=new Be(t);(i.equals(17)||i.equals(3))&&(ve.stop(t,!0),this.createSubmenu(!0))})),this._register(R(this.element,F.KEY_DOWN,t=>{const i=new Be(t);wt()===this.item&&(i.equals(17)||i.equals(3))&&ve.stop(t,!0)})),this._register(R(this.element,F.MOUSE_OVER,t=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())})),this._register(R(this.element,F.MOUSE_LEAVE,t=>{this.mouseOver=!1})),this._register(R(this.element,F.FOCUS_OUT,t=>{this.element&&!ut(wt(),this.element)&&this.hideScheduler.schedule()})),this._register(this.parentData.parent.onScroll(()=>{this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))})))}updateEnabled(){}onClick(e){ve.stop(e,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(e){if(this.parentData.submenu&&(e||this.parentData.submenu!==this.mysubmenu)){try{this.parentData.submenu.dispose()}catch{}this.parentData.submenu=void 0,this.updateAriaExpanded("false"),this.submenuContainer&&(this.submenuDisposables.clear(),this.submenuContainer=void 0)}}calculateSubmenuMenuLayout(e,t,i,n){const s={top:0,left:0};return s.left=jc(e.width,t.width,{position:n.horizontal===Gp.Right?0:1,offset:i.left,size:i.width}).position,s.left>=i.left&&s.left{new Be(d).equals(15)&&(ve.stop(d,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))})),this.submenuDisposables.add(R(this.submenuContainer,F.KEY_DOWN,d=>{new Be(d).equals(15)&&ve.stop(d,!0)})),this.submenuDisposables.add(this.parentData.submenu.onDidCancel(()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)})),this.parentData.submenu.focus(e),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(e){this.item&&this.item?.setAttribute("aria-expanded",e)}applyStyle(){super.applyStyle();const t=this.element&&this.element.classList.contains("focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=t??"")}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}}class LM extends Fp{constructor(e,t,i,n){super(e,t,i),this.menuStyles=n}render(e){super.render(e),this.label&&(this.label.style.borderBottomColor=this.menuStyles.separatorColor?`${this.menuStyles.separatorColor}`:"")}}function Aq(o){const e=jy,t=e.exec(o);if(!t)return o;const i=!t[1];return o.replace(e,i?"$2$3":"").trim()}function DM(o){const e=l.getCodiconFontCharacters()[o.id];return`.codicon-${o.id}:before { content: '\\${e.toString(16)}'; }`}function Oq(o,e){let i=` +.monaco-menu { + font-size: 13px; + border-radius: var(--vscode-cornerRadius-large); + border: 1px solid ${o.borderColor??"var(--vscode-menu-border)"}; + min-width: 160px; +} + +${DM(l.Codicon.menuSelection)} +${DM(l.Codicon.menuSubmenu)} + +.monaco-menu .monaco-action-bar { + text-align: right; + overflow: hidden; + white-space: nowrap; +} + +.monaco-menu .monaco-action-bar .actions-container { + display: flex; + margin: 0 auto; + padding: 0; + width: 100%; + justify-content: flex-end; +} + +.monaco-menu .monaco-action-bar.vertical .actions-container { + display: inline-block; +} + +.monaco-menu .monaco-action-bar.reverse .actions-container { + flex-direction: row-reverse; +} + +.monaco-menu .monaco-action-bar .action-item { + cursor: pointer; + display: inline-block; + transition: transform 50ms ease; + position: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */ +} + +.monaco-menu .monaco-action-bar .action-item.disabled { + cursor: default; +} + +.monaco-menu .monaco-action-bar .action-item .icon, +.monaco-menu .monaco-action-bar .action-item .codicon { + display: inline-block; +} + +.monaco-menu .monaco-action-bar .action-item .codicon { + display: flex; + align-items: center; +} + +.monaco-menu .monaco-action-bar .action-label { + font-size: 11px; + margin-right: 4px; +} + +.monaco-menu .monaco-action-bar .action-item.disabled .action-label, +.monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover { + color: var(--vscode-disabledForeground); +} + +/* Vertical actions */ + +.monaco-menu .monaco-action-bar.vertical { + text-align: left; +} + +.monaco-menu .monaco-action-bar.vertical .action-item { + display: block; +} + +.monaco-menu .monaco-action-bar.vertical .action-label.separator { + display: block; + border-bottom: 1px solid var(--vscode-menu-separatorBackground); + padding-top: 1px; + padding: 30px; +} + +.monaco-menu .secondary-actions .monaco-action-bar .action-label { + margin-left: 6px; +} + +/* Action Items */ +.monaco-menu .monaco-action-bar .action-item.select-container { + overflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */ + flex: 1; + max-width: 170px; + min-width: 60px; + display: flex; + align-items: center; + justify-content: center; + margin-right: 10px; +} + +.monaco-menu .monaco-action-bar.vertical { + margin-left: 0; + overflow: visible; +} + +.monaco-menu .monaco-action-bar.vertical .actions-container { + display: block; +} + +.monaco-menu .monaco-action-bar.vertical .action-item { + padding: 0; + transform: none; + display: flex; +} + +.monaco-menu .monaco-action-bar.vertical .action-item.active { + transform: none; +} + +.monaco-menu .monaco-action-bar.vertical .action-menu-item { + flex: 1 1 auto; + display: flex; + height: 24px; + align-items: center; + position: relative; + margin: 0 4px; + border-radius: var(--vscode-cornerRadius-medium); +} + +.monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .keybinding, +.monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .keybinding { + opacity: unset; +} + +.monaco-menu .monaco-action-bar.vertical .action-label { + flex: 1 1 auto; + text-decoration: none; + padding: 0 1em; + background: none; + font-size: 12px; + line-height: 1; +} + +.monaco-menu .monaco-action-bar.vertical .keybinding, +.monaco-menu .monaco-action-bar.vertical .submenu-indicator { + display: inline-block; + flex: 2 1 auto; + padding: 0 1em; + text-align: right; + font-size: 12px; + line-height: 1; + opacity: 0.7; +} + +.monaco-menu .monaco-action-bar.vertical .submenu-indicator { + height: 100%; +} + +.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon { + font-size: 16px !important; + display: flex; + align-items: center; +} + +.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before { + margin-left: auto; + margin-right: -20px; +} + +.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding, +.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator { + opacity: 0.4; +} + +.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) { + display: inline-block; + box-sizing: border-box; + margin: 0; +} + +.monaco-menu .monaco-action-bar.vertical .action-item { + position: static; + overflow: visible; +} + +.monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu { + position: absolute; +} + +.monaco-menu .monaco-action-bar.vertical .action-label.separator { + width: 100%; + height: 0px !important; + opacity: 1; +} + +.monaco-menu .monaco-action-bar.vertical .action-label.separator.text { + padding: 0.7em 1em 0.1em 1em; + font-weight: bold; + opacity: 1; +} + +.monaco-menu .monaco-action-bar.vertical .action-label:hover { + color: inherit; +} + +.monaco-menu .monaco-action-bar.vertical .menu-item-check { + position: absolute; + visibility: hidden; + width: 1em; + height: 100%; +} + +.monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check { + visibility: visible; + display: flex; + align-items: center; + justify-content: center; +} + +/* Context Menu */ + +.context-view.monaco-menu-container { + outline: 0; + border: none; + animation: fadeIn 0.083s linear; + -webkit-app-region: no-drag; + box-shadow: var(--vscode-shadow-lg${o.shadowColor?`, 0 0 12px ${o.shadowColor}`:""}); + border-radius: var(--vscode-cornerRadius-large); + overflow: hidden; +} + +.context-view.monaco-menu-container :focus, +.context-view.monaco-menu-container .monaco-action-bar.vertical:focus, +.context-view.monaco-menu-container .monaco-action-bar.vertical :focus { + outline: 0; +} + +.hc-black .context-view.monaco-menu-container, +.hc-light .context-view.monaco-menu-container, +:host-context(.hc-black) .context-view.monaco-menu-container, +:host-context(.hc-light) .context-view.monaco-menu-container { + box-shadow: none; +} + +.hc-black .monaco-menu .monaco-action-bar.vertical .action-item.focused, +.hc-light .monaco-menu .monaco-action-bar.vertical .action-item.focused, +:host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused, +:host-context(.hc-light) .monaco-menu .monaco-action-bar.vertical .action-item.focused { + background: none; +} + +/* Show the menu item selection border only for keyboard navigation. Pointer-driven focus typically does not set :focus-visible, so suppress the border in that case. */ +.monaco-menu .monaco-action-bar.vertical .action-menu-item:focus:not(:focus-visible) { + outline: none !important; + outline-offset: 0 !important; +} + +/* High contrast themes always show the selection border to indicate the focused item, regardless of input modality. The duplicated .monaco-menu raises specificity above the keyboard-only suppression rule above so this wins independent of declaration order. */ +.hc-black .monaco-menu.monaco-menu .monaco-action-bar.vertical .action-item.focused .action-menu-item, +.hc-light .monaco-menu.monaco-menu .monaco-action-bar.vertical .action-item.focused .action-menu-item, +:host-context(.hc-black) .monaco-menu.monaco-menu .monaco-action-bar.vertical .action-item.focused .action-menu-item, +:host-context(.hc-light) .monaco-menu.monaco-menu .monaco-action-bar.vertical .action-item.focused .action-menu-item { + outline: 1px solid var(--vscode-menu-selectionBorder) !important; + outline-offset: -1px !important; +} + +/* Vertical Action Bar Styles */ + +.monaco-menu .monaco-action-bar.vertical { + padding: 4px 0; +} + +.monaco-menu .monaco-action-bar.vertical .action-menu-item { + height: 24px; +} + +.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator), +.monaco-menu .monaco-action-bar.vertical .keybinding { + font-size: inherit; + padding: 0 2em; + max-height: 100%; +} + +.monaco-menu .monaco-action-bar.vertical .menu-item-check { + font-size: inherit; + width: 2em; +} + +.monaco-menu .monaco-action-bar.vertical .action-label.separator { + font-size: inherit; + margin: 5px 0 !important; + padding: 0; + border-radius: 0; +} + +.linux .monaco-menu .monaco-action-bar.vertical .action-label.separator, +:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator { + margin-left: 0; + margin-right: 0; +} + +.monaco-menu .monaco-action-bar.vertical .submenu-indicator { + font-size: 60%; + padding: 0 1.8em; +} + +.linux .monaco-menu .monaco-action-bar.vertical .submenu-indicator, +:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator { + height: 100%; + mask-size: 10px 10px; + -webkit-mask-size: 10px 10px; +} + +.monaco-menu .action-item { + cursor: default; +}`;if(e){i+=` + /* Arrows */ + .monaco-scrollable-element > .scrollbar > .scra { + cursor: pointer; + font-size: 11px !important; + } + + .monaco-scrollable-element > .visible { + opacity: 1; + + /* Background rule added for IE9 - to allow clicks on dom node */ + background:rgba(0,0,0,0); + + transition: opacity 100ms linear; + } + .monaco-scrollable-element > .invisible { + opacity: 0; + pointer-events: none; + } + .monaco-scrollable-element > .invisible.fade { + transition: opacity 800ms linear; + } + + /* Scrollable Content Inset Shadow */ + .monaco-scrollable-element > .shadow { + position: absolute; + display: none; + } + .monaco-scrollable-element > .shadow.top { + display: block; + top: 0; + left: 3px; + height: 3px; + width: 100%; + } + .monaco-scrollable-element > .shadow.left { + display: block; + top: 3px; + left: 0; + height: 100%; + width: 3px; + } + .monaco-scrollable-element > .shadow.top-left-corner { + display: block; + top: 0; + left: 0; + height: 3px; + width: 3px; + } + /* Fix for https://github.com/microsoft/vscode/issues/103170 */ + .monaco-menu .action-item .monaco-submenu { + z-index: 1; + } + `;const n=o.scrollbarShadow;n&&(i+=` + .monaco-scrollable-element > .shadow.top { + box-shadow: ${n} 0 6px 6px -6px inset; + } + + .monaco-scrollable-element > .shadow.left { + box-shadow: ${n} 6px 0 6px -6px inset; + } + + .monaco-scrollable-element > .shadow.top.left { + box-shadow: ${n} 6px 6px 6px -6px inset; + } + `);const s=o.scrollbarSliderBackground;s&&(i+=` + .monaco-scrollable-element > .scrollbar > .slider { + background: ${s}; + } + `);const r=o.scrollbarSliderHoverBackground;r&&(i+=` + .monaco-scrollable-element > .scrollbar > .slider:hover { + background: ${r}; + } + `);const a=o.scrollbarSliderActiveBackground;a&&(i+=` + .monaco-scrollable-element > .scrollbar > .slider.active { + background: ${a}; + } + `)}return i}class Pq{constructor(e,t,i,n){this.contextViewService=e,this.telemetryService=t,this.notificationService=i,this.keybindingService=n,this.focusToReturn=null,this.lastContainer=null,this.block=null,this.blockDisposable=null,this.options={blockMouse:!0}}configure(e){this.options=e}showContextMenu(e){const t=e.getActions();if(!t.length)return;this.focusToReturn=wt();let i;const n=Ve(e.domForShadowRoot)?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,anchorAxisAlignment:e.anchorAxisAlignment,layer:e.layer,render:s=>{this.lastContainer=s;const r=e.getMenuClassName?e.getMenuClassName():"";r&&(s.className+=" "+r),this.options.blockMouse&&(this.block=s.appendChild(Q(".context-view-block")),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",this.blockDisposable?.dispose(),this.blockDisposable=R(this.block,F.MOUSE_DOWN,d=>d.stopPropagation()));const a=new l.DisposableStore,c=e.actionRunner||a.add(new Jr);c.onWillRun(d=>this.onActionRun(d,!e.skipTelemetry),this,a),c.onDidRun(this.onDidActionRun,this,a),i=new th(s,t,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:c,getKeyBinding:e.getKeyBinding?e.getKeyBinding:d=>this.keybindingService.lookupKeybinding(d.id)},wq),i.onDidCancel(()=>this.contextViewService.hideContextView(!0),null,a),i.onDidBlur(()=>this.contextViewService.hideContextView(!0),null,a);const h=j(s);return a.add(R(h,F.BLUR,()=>this.contextViewService.hideContextView(!0))),a.add(R(h,F.MOUSE_DOWN,d=>{if(d.defaultPrevented)return;const u=new Bi(h,d);let f=u.target;if(!u.rightButton){for(;f;){if(f===s)return;f=f.parentElement}this.contextViewService.hideContextView(!0)}})),l.combinedDisposable(a,i)},focus:()=>{i?.focus(!!e.autoSelectFirstItem)},onHide:s=>{e.onHide?.(!!s),this.block&&(this.block.remove(),this.block=null),this.blockDisposable?.dispose(),this.blockDisposable=null,this.lastContainer&&(wt()===this.lastContainer||ut(wt(),this.lastContainer))&&this.focusToReturn?.focus(),this.lastContainer=null}},n,!!n)}onActionRun(e,t){t&&this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1)}onDidActionRun(e){e.error&&!l.isCancellationError(e.error)&&this.notificationService.error(e.error)}}var kq=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ih=function(o,e){return function(t,i){e(t,i,o)}};let Zy=class extends l.Disposable{get contextMenuHandler(){return this._contextMenuHandler||(this._contextMenuHandler=new Pq(this.contextViewService,this.telemetryService,this.notificationService,this.keybindingService)),this._contextMenuHandler}constructor(e,t,i,n,s,r){super(),this.telemetryService=e,this.notificationService=t,this.contextViewService=i,this.keybindingService=n,this.menuService=s,this.contextKeyService=r,this._contextMenuHandler=void 0,this._onDidShowContextMenu=this._store.add(new l.Emitter),this.onDidShowContextMenu=this._onDidShowContextMenu.event,this._onDidHideContextMenu=this._store.add(new l.Emitter),this.onDidHideContextMenu=this._onDidHideContextMenu.event}configure(e){this.contextMenuHandler.configure(e)}showContextMenu(e){e=Qy.transform(e,this.menuService,this.contextKeyService),this.contextMenuHandler.showContextMenu({...e,onHide:t=>{e.onHide?.(t),this._onDidHideContextMenu.fire()}}),hs.getInstance().resetKeyStatus(),this._onDidShowContextMenu.fire()}};Zy=kq([ih(0,Xn),ih(1,yn),ih(2,Fc),ih(3,xt),ih(4,Zo),ih(5,be)],Zy);var Qy;(function(o){function e(i){return i&&i.menuId instanceof ct}function t(i,n,s){if(!e(i))return i;const{menuId:r,menuActionOptions:a,contextKeyService:c}=i;return{...i,getActions:()=>{let h=[];if(r){const d=n.getMenuActions(r,c??s,a);h=Nq(d)}return i.getActions?ft.join(i.getActions(),h):h}}}o.transform=t})(Qy||(Qy={}));var Fq=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Bq=function(o,e){return function(t,i){e(t,i,o)}};let Xy=class extends l.Disposable{constructor(e){super(),this.layoutService=e,this.contextView=this._register(new fp(this.layoutService.mainContainer,1)),this.layout(),this._register(e.onDidLayoutContainer(()=>this.layout()))}showContextView(e,t,i){let n;t?t===this.layoutService.getContainer(j(t))?n=1:i?n=3:n=2:n=1,this.contextView.setContainer(t??this.layoutService.activeContainer,n),this.contextView.show(e);const s={close:()=>{this.openContextView===s&&this.hideContextView()}};return this.openContextView=s,s}layout(){this.contextView.layout()}hideContextView(e){this.contextView.hide(e),this.openContextView=void 0}};Xy=Fq([Bq(0,Os)],Xy);class zq extends Xy{getContextViewElement(){return this.contextView.getViewElement()}}const xM=le("dataChannelService");class Vq{getDataChannel(e){return{sendData:()=>{}}}}const EM=le("defaultAccountService");let Uq=class{constructor(e,t){this.key=e,this.data=t,this.incoming=new Map,this.outgoing=new Map}};class IM{constructor(e){this._hashFn=e,this._nodes=new Map}roots(){const e=[];for(const t of this._nodes.values())t.outgoing.size===0&&e.push(t);return e}insertEdge(e,t){const i=this.lookupOrInsertNode(e),n=this.lookupOrInsertNode(t);i.outgoing.set(n.key,n),n.incoming.set(i.key,i)}removeNode(e){const t=this._hashFn(e);this._nodes.delete(t);for(const i of this._nodes.values())i.outgoing.delete(t),i.incoming.delete(t)}lookupOrInsertNode(e){const t=this._hashFn(e);let i=this._nodes.get(t);return i||(i=new Uq(t,e),this._nodes.set(t,i)),i}isEmpty(){return this._nodes.size===0}toString(){const e=[];for(const[t,i]of this._nodes)e.push(`${t} + (-> incoming)[${[...i.incoming.keys()].join(", ")}] + (outgoing ->)[${[...i.outgoing.keys()].join(",")}] +`);return e.join(` +`)}findCycleSlow(){for(const[e,t]of this._nodes){const i=new Set([e]),n=this._findCycle(t,i);if(n)return n}}_findCycle(e,t){for(const[i,n]of e.outgoing){if(t.has(i))return[...t,i].join(" -> ");t.add(i);const s=this._findCycle(n,t);if(s)return s;t.delete(i)}}}const $q=!1;class TM extends Error{constructor(e){super("cyclic dependency between services"),this.message=e.findCycleSlow()??`UNABLE to detect cycle, dumping graph: +${e.toString()}`}}class jp{constructor(e=new Oc,t=!1,i,n=$q){this._services=e,this._strict=t,this._parent=i,this._enableTracing=n,this._isDisposed=!1,this._servicesToMaybeDispose=new Set,this._children=new Set,this._activeInstantiations=new Set,this._services.set(me,this),this._globalGraph=n?i?._globalGraph??new IM(s=>s):void 0}dispose(){if(!this._isDisposed){this._isDisposed=!0,l.dispose(this._children),this._children.clear();for(const e of this._servicesToMaybeDispose)l.isDisposable(e)&&e.dispose();this._servicesToMaybeDispose.clear()}}_throwIfDisposed(){if(this._isDisposed)throw new Error("InstantiationService has been disposed")}createChild(e,t){this._throwIfDisposed();const i=this,n=new class extends jp{dispose(){i._children.delete(n),super.dispose()}}(e,this._strict,this,this._enableTracing);return this._children.add(n),t?.add(n),n}invokeFunction(e,...t){this._throwIfDisposed();const i=Zu.traceInvocation(this._enableTracing,e);let n=!1;try{return e({get:r=>{if(n)throw l.illegalState("service accessor is only valid during the invocation of its target method");const a=this._getOrCreateServiceInstance(r,i);return a||this._throwIfStrict(`[invokeFunction] unknown service '${r}'`,!1),a}},...t)}finally{n=!0,i.stop()}}createInstance(e,...t){this._throwIfDisposed();let i,n;return e instanceof gs?(i=Zu.traceCreation(this._enableTracing,e.ctor),n=this._createInstance(e.ctor,e.staticArguments.concat(t),i)):(i=Zu.traceCreation(this._enableTracing,e),n=this._createInstance(e,t,i)),i.stop(),n}_createInstance(e,t=[],i){const n=Yn.getServiceDependencies(e).sort((a,c)=>a.index-c.index),s=[];for(const a of n){const c=this._getOrCreateServiceInstance(a.id,i);c||this._throwIfStrict(`[createInstance] ${e.name} depends on UNKNOWN service ${a.id}.`,!1),s.push(c)}const r=n.length>0?n[0].index:t.length;if(t.length!==r){console.trace(`[createInstance] First service dependency of ${e.name} at position ${r+1} conflicts with ${t.length} static arguments`);const a=r-t.length;a>0?t=t.concat(new Array(a)):t=t.slice(0,r)}return Reflect.construct(e,t.concat(s))}_setCreatedServiceInstance(e,t){if(this._services.get(e)instanceof gs)this._services.set(e,t);else if(this._parent)this._parent._setCreatedServiceInstance(e,t);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(e){const t=this._services.get(e);return!t&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):t}_getOrCreateServiceInstance(e,t){this._globalGraph&&this._globalGraphImplicitDependency&&this._globalGraph.insertEdge(this._globalGraphImplicitDependency,String(e));const i=this._getServiceInstanceOrDescriptor(e);return i instanceof gs?this._safeCreateAndCacheServiceInstance(e,i,t.branch(e,!0)):(t.branch(e,!1),i)}_safeCreateAndCacheServiceInstance(e,t,i){if(this._activeInstantiations.has(e))throw new Error(`illegal state - RECURSIVELY instantiating service '${e}'`);this._activeInstantiations.add(e);try{return this._createAndCacheServiceInstance(e,t,i)}finally{this._activeInstantiations.delete(e)}}_createAndCacheServiceInstance(e,t,i){const n=new IM(c=>c.id.toString());let s=0;const r=[{id:e,desc:t,_trace:i}],a=new Set;for(;r.length;){const c=r.pop();if(!a.has(String(c.id))){if(a.add(String(c.id)),n.lookupOrInsertNode(c),s++>1e3)throw new TM(n);for(const h of Yn.getServiceDependencies(c.desc.ctor)){const d=this._getServiceInstanceOrDescriptor(h.id);if(d||this._throwIfStrict(`[createInstance] ${e} depends on ${h.id} which is NOT registered.`,!0),this._globalGraph?.insertEdge(String(c.id),String(h.id)),d instanceof gs){const u={id:h.id,desc:d,_trace:c._trace.branch(h.id,!0)};n.insertEdge(c,u),r.push(u)}}}}for(;;){const c=n.roots();if(c.length===0){if(!n.isEmpty())throw new TM(n);break}for(const{data:h}of c){if(this._getServiceInstanceOrDescriptor(h.id)instanceof gs){const u=this._createServiceInstanceWithOwner(h.id,h.desc.ctor,h.desc.staticArguments,h.desc.supportsDelayedInstantiation,h._trace);this._setCreatedServiceInstance(h.id,u)}n.removeNode(h)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,t,i=[],n,s){if(this._services.get(e)instanceof gs)return this._createServiceInstance(e,t,i,n,s,this._servicesToMaybeDispose);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,t,i,n,s);throw new Error(`illegalState - creating UNKNOWN service instance ${t.name}`)}_createServiceInstance(e,t,i=[],n,s,r){if(n){const a=new jp(void 0,this._strict,this,this._enableTracing);a._globalGraphImplicitDependency=String(e);const c=new Map,h=new l.GlobalIdleValue(()=>{const d=a._createInstance(t,i,s);for(const[u,f]of c){const g=d[u];if(typeof g=="function")for(const m of f)m.disposable=g.apply(d,m.listener)}return c.clear(),r.add(d),d});return new Proxy(Object.create(null),{get(d,u){if(!h.isInitialized&&typeof u=="string"&&(u.startsWith("onDid")||u.startsWith("onWill"))){let m=c.get(u);return m||(m=new l.LinkedList,c.set(u,m)),(b,v,C)=>{if(h.isInitialized)return h.value[u](b,v,C);{const w={listener:[b,v,C],disposable:void 0},S=m.push(w);return l.toDisposable(()=>{S(),w.disposable?.dispose()})}}}if(u in d)return d[u];const f=h.value;let g=f[u];return typeof g!="function"||(g=g.bind(f),d[u]=g),g},set(d,u,f){return h.value[u]=f,!0},getPrototypeOf(d){return t.prototype}})}else{const a=this._createInstance(t,i,s);return r.add(a),a}}_throwIfStrict(e,t){if(t&&console.warn(e),this._strict)throw new Error(e)}}const dn=class dn{static traceInvocation(e,t){return e?new dn(2,t.name||new Error().stack.split(` +`).slice(3,4).join(` +`)):dn._None}static traceCreation(e,t){return e?new dn(1,t.name):dn._None}constructor(e,t){this.type=e,this.name=t,this._start=Date.now(),this._dep=[]}branch(e,t){const i=new dn(3,e.toString());return this._dep.push([e,t,i]),i}stop(){const e=Date.now()-this._start;dn._totals+=e;let t=!1;function i(s,r){const a=[],c=new Array(s+1).join(" ");for(const[h,d,u]of r._dep)if(d&&u){t=!0,a.push(`${c}CREATES -> ${h}`);const f=i(s+1,u);f&&a.push(f)}else a.push(`${c}uses -> ${h}`);return a.join(` +`)}const n=[`${this.type===1?"CREATE":"CALL"} ${this.name}`,`${i(1,this)}`,`DONE, took ${e.toFixed(2)}ms (grand total ${dn._totals.toFixed(2)}ms)`];(e>2||t)&&dn.all.add(n.join(` +`))}};dn.all=new Set,dn._None=new class extends dn{constructor(){super(0,null)}stop(){}branch(){return this}},dn._totals=0;let Zu=dn;const qp={kind:0},Kq={kind:1};function Gq(o,e,t){return{kind:2,commandId:o,commandArgs:e,isBubble:t}}class nh{constructor(e,t,i){this._log=i,this._defaultKeybindings=e,this._defaultBoundCommands=new Map;for(const n of e){const s=n.command;s&&s.charAt(0)!=="-"&&this._defaultBoundCommands.set(s,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=nh.handleRemovals([].concat(e).concat(t));for(let n=0,s=this._keybindings.length;n"u"){this._map.set(e,[t]),this._addToLookupMap(t);return}for(let n=i.length-1;n>=0;n--){const s=i[n];if(s.command===t.command)continue;let r=!0;for(let a=1;a"u"?(t=[e],this._lookupMap.set(e.command,t)):t.push(e)}_removeFromLookupMap(e){if(!e.command)return;const t=this._lookupMap.get(e.command);if(!(typeof t>"u")){for(let i=0,n=t.length;i"u"||n.length===0)return null;if(n.length===1&&!i)return n[0];for(let s=n.length-1;s>=0;s--){const r=n[s];if(t.contextMatchesRules(r.when))return r}return i?null:n[n.length-1]}resolve(e,t,i){const n=[...t,i];this._log(`| Resolving ${n}`);const s=this._map.get(n[0]);if(s===void 0)return this._log("\\ No keybinding entries."),qp;let r=null;if(n.length<2)r=s;else{r=[];for(let c=0,h=s.length;cd.chords.length)continue;let u=!0;for(let f=1;f=0;i--){const n=t[i];if(nh._contextMatchesRules(e,n.when))return n}return null}static _contextMatchesRules(e,t){return t?t.evaluate(e):!0}}function NM(o){return o?`${o.serialize()}`:"no when condition"}function RM(o){return o.extensionId?o.isBuiltinExtension?`built-in extension ${o.extensionId}`:`user extension ${o.extensionId}`:o.isDefault?"built-in":"user"}const jq=/^(cursor|delete|undo|redo|tab|editor\.action\.clipboard)/;class qq extends l.Disposable{get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:l.Event.None}get inChordMode(){return this._currentChords.length>0}constructor(e,t,i,n,s){super(),this._contextKeyService=e,this._commandService=t,this._telemetryService=i,this._notificationService=n,this._logService=s,this._onDidUpdateKeybindings=this._register(new l.Emitter),this._currentChords=[],this._currentChordChecker=new l.IntervalTimer,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=sh.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new l.TimeoutTimer,this._currentlyDispatchingCommandId=null,this._logging=!1}_log(e){this._logging&&this._logService.info(`[KeybindingService]: ${e}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(e,t,i=!1){const n=this._getResolver().lookupPrimaryKeybinding(e,t||this._contextKeyService,i);if(n)return n.resolvedKeybinding}dispatchEvent(e,t){return this._dispatch(e,t)}softDispatch(e,t){this._log("/ Soft dispatching keyboard event");const i=this.resolveKeyboardEvent(e);if(i.hasMultipleChords())return console.warn("keyboard event should not be mapped to multiple chords"),qp;const[n]=i.getDispatchChords();if(n===null)return this._log("\\ Keyboard event cannot be dispatched"),qp;const s=this._contextKeyService.getContext(t),r=this._currentChords.map((({keypress:a})=>a));return this._getResolver().resolve(s,r,n)}_scheduleLeaveChordMode(){const e=Date.now();this._currentChordChecker.cancelAndSet(()=>{if(!this._documentHasFocus()){this._leaveChordMode();return}Date.now()-e>5e3&&this._leaveChordMode()},500)}_expectAnotherChord(e,t){switch(this._currentChords.push({keypress:e,label:t}),this._currentChords.length){case 0:throw l.illegalState("impossible");case 1:this._currentChordStatusMessage=this._notificationService.status(l.localize(1763,"({0}) was pressed. Waiting for second key of chord...",t));break;default:{const i=this._currentChords.map(({label:n})=>n).join(", ");this._currentChordStatusMessage=this._notificationService.status(l.localize(1764,"({0}) was pressed. Waiting for next key of chord...",i))}}this._scheduleLeaveChordMode(),Ss.enabled&&Ss.disable()}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.close(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChords=[],Ss.enable()}_dispatch(e,t){return this._doDispatch(this.resolveKeyboardEvent(e),t,!1)}_singleModifierDispatch(e,t){const i=this.resolveKeyboardEvent(e),[n]=i.getSingleModifierDispatchChords();if(n)return this._ignoreSingleModifiers.has(n)?(this._log(`+ Ignoring single modifier ${n} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=sh.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=sh.EMPTY,this._currentSingleModifier===null?(this._log(`+ Storing single modifier for possible chord ${n}.`),this._currentSingleModifier=n,this._currentSingleModifierClearTimeout.cancelAndSet(()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null},300),!1):n===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${n} ${n}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(i,t,!0)):(this._log(`+ Clearing single modifier due to modifier mismatch: ${this._currentSingleModifier} ${n}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1));const[s]=i.getChords();return this._ignoreSingleModifiers=new sh(s),this._currentSingleModifier!==null&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(e,t,i=!1){let n=!1;if(e.hasMultipleChords())return console.warn("Unexpected keyboard event mapped to multiple chords"),!1;let s=null,r=null;if(i){const[d]=e.getSingleModifierDispatchChords();s=d,r=d?[d]:[]}else[s]=e.getDispatchChords(),r=this._currentChords.map(({keypress:d})=>d);if(s===null)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),n;const a=this._contextKeyService.getContext(t),c=e.getLabel(),h=this._getResolver().resolve(a,r,s);switch(h.kind){case 0:{if(this._logService.trace("KeybindingService#dispatch",c,"[ No matching keybinding ]"),this.inChordMode){const d=this._currentChords.map(({label:u})=>u).join(", ");this._log(`+ Leaving multi-chord mode: Nothing bound to "${d}, ${c}".`),this._notificationService.status(l.localize(1765,"The key combination ({0}, {1}) is not a command.",d,c),{hideAfter:10*1e3}),this._leaveChordMode(),n=!0}return n}case 1:return this._logService.trace("KeybindingService#dispatch",c,"[ Several keybindings match - more chords needed ]"),n=!0,this._expectAnotherChord(s,c),this._log(this._currentChords.length===1?"+ Entering multi-chord mode...":"+ Continuing multi-chord mode..."),n;case 2:{if(this._logService.trace("KeybindingService#dispatch",c,`[ Will dispatch command ${h.commandId} ]`),h.commandId===null||h.commandId===""){if(this.inChordMode){const d=this._currentChords.map(({label:u})=>u).join(", ");this._log(`+ Leaving chord mode: Nothing bound to "${d}, ${c}".`),this._notificationService.status(l.localize(1766,"The key combination ({0}, {1}) is not a command.",d,c),{hideAfter:10*1e3}),this._leaveChordMode(),n=!0}}else{this.inChordMode&&this._leaveChordMode(),h.isBubble||(n=!0),this._log(`+ Invoking command ${h.commandId}.`),this._currentlyDispatchingCommandId=h.commandId;try{typeof h.commandArgs>"u"?this._commandService.executeCommand(h.commandId).then(void 0,d=>this._notificationService.warn(d)):this._commandService.executeCommand(h.commandId,h.commandArgs).then(void 0,d=>this._notificationService.warn(d))}finally{this._currentlyDispatchingCommandId=null}jq.test(h.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:h.commandId,from:"keybinding",detail:e.getUserSettingsLabel()??void 0})}return n}}}mightProducePrintableCharacter(e){return e.ctrlKey||e.metaKey?!1:e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30}appendKeybinding(e,t,i,n){if(t){const s=this.lookupKeybinding(t,i,n)?.getLabel();if(s)return l.localize(1767,"{0} ({1})",e,s)}return e}}const mb=class mb{constructor(e){this._ctrlKey=e?e.ctrlKey:!1,this._shiftKey=e?e.shiftKey:!1,this._altKey=e?e.altKey:!1,this._metaKey=e?e.metaKey:!1}has(e){switch(e){case"ctrl":return this._ctrlKey;case"shift":return this._shiftKey;case"alt":return this._altKey;case"meta":return this._metaKey}}};mb.EMPTY=new mb(null);let sh=mb;class MM{constructor(e,t,i,n,s,r,a){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=e,this.chords=e?Jy(e.getDispatchChords()):[],e&&this.chords.length===0&&(this.chords=Jy(e.getSingleModifierDispatchChords())),this.bubble=t?t.charCodeAt(0)===94:!1,this.command=this.bubble?t.substr(1):t,this.commandArgs=i,this.when=n,this.isDefault=s,this.extensionId=r,this.isBuiltinExtension=a}}function Jy(o){const e=[];for(let t=0,i=o.length;tthis._getLabel(e))}getAriaLabel(){return hq.toLabel(this._os,this._chords,e=>this._getAriaLabel(e))}getElectronAccelerator(){return this._chords.length>1||this._chords[0].isDuplicateModifierCase()?null:dq.toLabel(this._os,this._chords,e=>this._getElectronAccelerator(e))}getUserSettingsLabel(){return uq.toLabel(this._os,this._chords,e=>this._getUserSettingsLabel(e))}hasMultipleChords(){return this._chords.length>1}getChords(){return this._chords.map(e=>this._getChord(e))}_getChord(e){return new _k(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getLabel(e),this._getAriaLabel(e))}getDispatchChords(){return this._chords.map(e=>this._getChordDispatch(e))}getSingleModifierDispatchChords(){return this._chords.map(e=>this._getSingleModifierChordDispatch(e))}}class Qu extends Yq{constructor(e,t){super(t,e)}_keyCodeToUILabel(e){if(this._os===2)switch(e){case 15:return"←";case 16:return"↑";case 17:return"→";case 18:return"↓"}return l.KeyCodeUtils.toString(e)}_getLabel(e){return e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode)}_getAriaLabel(e){return e.isDuplicateModifierCase()?"":l.KeyCodeUtils.toString(e.keyCode)}_getElectronAccelerator(e){return l.KeyCodeUtils.toElectronAccelerator(e.keyCode)}_getUserSettingsLabel(e){if(e.isDuplicateModifierCase())return"";const t=l.KeyCodeUtils.toUserSettingsUS(e.keyCode);return t&&t.toLowerCase()}_getChordDispatch(e){return Qu.getDispatchStr(e)}static getDispatchStr(e){if(e.isModifierKey())return null;let t="";return e.ctrlKey&&(t+="ctrl+"),e.shiftKey&&(t+="shift+"),e.altKey&&(t+="alt+"),e.metaKey&&(t+="meta+"),t+=l.KeyCodeUtils.toString(e.keyCode),t}_getSingleModifierChordDispatch(e){return e.keyCode===5&&!e.shiftKey&&!e.altKey&&!e.metaKey?"ctrl":e.keyCode===4&&!e.ctrlKey&&!e.altKey&&!e.metaKey?"shift":e.keyCode===6&&!e.ctrlKey&&!e.shiftKey&&!e.metaKey?"alt":e.keyCode===57&&!e.ctrlKey&&!e.shiftKey&&!e.altKey?"meta":null}static _scanCodeToKeyCode(e){const t=l.IMMUTABLE_CODE_TO_KEY_CODE[e];if(t!==-1)return t;switch(e){case 10:return 31;case 11:return 32;case 12:return 33;case 13:return 34;case 14:return 35;case 15:return 36;case 16:return 37;case 17:return 38;case 18:return 39;case 19:return 40;case 20:return 41;case 21:return 42;case 22:return 43;case 23:return 44;case 24:return 45;case 25:return 46;case 26:return 47;case 27:return 48;case 28:return 49;case 29:return 50;case 30:return 51;case 31:return 52;case 32:return 53;case 33:return 54;case 34:return 55;case 35:return 56;case 36:return 22;case 37:return 23;case 38:return 24;case 39:return 25;case 40:return 26;case 41:return 27;case 42:return 28;case 43:return 29;case 44:return 30;case 45:return 21;case 51:return 88;case 52:return 86;case 53:return 92;case 54:return 94;case 55:return 93;case 56:return 0;case 57:return 85;case 58:return 95;case 59:return 91;case 60:return 87;case 61:return 89;case 62:return 90;case 106:return 97}return 0}static _toKeyCodeChord(e){if(!e)return null;if(e instanceof Yh)return e;const t=this._scanCodeToKeyCode(e.scanCode);return t===0?null:new Yh(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,t)}static resolveKeybinding(e,t){const i=Jy(e.chords.map(n=>this._toKeyCodeChord(n)));return i.length>0?[new Qu(i,t)]:[]}}const AM=le("labelService");class Zq{get templateId(){return this.renderer.templateId}constructor(e,t){this.renderer=e,this.modelProvider=t}renderTemplate(e){return{data:this.renderer.renderTemplate(e),disposable:l.Disposable.None}}renderElement(e,t,i,n){if(i.disposable?.dispose(),!i.data)return;const s=this.modelProvider();if(s.isResolved(e))return this.renderer.renderElement(s.get(e),e,i.data,n);const r=new l.CancellationTokenSource,a=s.resolve(e,r.token);i.disposable={dispose:()=>r.cancel()},this.renderer.renderPlaceholder(e,i.data),a.then(c=>this.renderer.renderElement(c,e,i.data,n))}disposeTemplate(e){e.disposable&&(e.disposable.dispose(),e.disposable=void 0),e.data&&(this.renderer.disposeTemplate(e.data),e.data=void 0)}}class Qq{constructor(e,t){this.modelProvider=e,this.accessibilityProvider=t}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(e){const t=this.modelProvider();return t.isResolved(e)?this.accessibilityProvider.getAriaLabel(t.get(e)):null}}function Xq(o,e){return{...e,accessibilityProvider:e.accessibilityProvider&&new Qq(o,e.accessibilityProvider)}}class Jq{constructor(e,t,i,n,s={}){this.modelDisposables=new l.DisposableStore;const r=()=>this.model,a=n.map(c=>new Zq(c,r));this.list=new zn(e,t,i,a,Xq(r,s))}updateOptions(e){this.list.updateOptions(e)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get widget(){return this.list}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return l.Event.map(this.list.onMouseDblClick,({element:e,index:t,browserEvent:i})=>({element:e===void 0?void 0:this._model.get(e),index:t,browserEvent:i}))}get onPointer(){return l.Event.map(this.list.onPointer,({element:e,index:t,browserEvent:i})=>({element:e===void 0?void 0:this._model.get(e),index:t,browserEvent:i}))}get onDidChangeSelection(){return l.Event.map(this.list.onDidChangeSelection,({elements:e,indexes:t,browserEvent:i})=>({elements:e.map(n=>this._model.get(n)),indexes:t,browserEvent:i}))}get model(){return this._model}set model(e){this.modelDisposables.clear(),this._model=e,this.list.splice(0,this.list.length,l.range(e.length)),this.modelDisposables.add(e.onDidIncrementLength(t=>this.list.splice(this.list.length,0,l.range(this.list.length,t))))}getFocus(){return this.list.getFocus()}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map(e=>this.model.get(e))}style(e){this.list.style(e)}dispose(){this.list.dispose(),this.modelDisposables.dispose()}}var oh=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s};const Wq=!1;_.OrthogonalEdge=void 0,(function(o){o.North="north",o.South="south",o.East="east",o.West="west"})(_.OrthogonalEdge||(_.OrthogonalEdge={}));let Hq=4;const eY=new l.Emitter;let tY=300;const iY=new l.Emitter;class Wy{constructor(e){this.el=e,this.disposables=new l.DisposableStore}get onPointerMove(){return this.disposables.add(new Te(j(this.el),"mousemove")).event}get onPointerUp(){return this.disposables.add(new Te(j(this.el),"mouseup")).event}dispose(){this.disposables.dispose()}}oh([et],Wy.prototype,"onPointerMove",null),oh([et],Wy.prototype,"onPointerUp",null);class Hy{get onPointerMove(){return this.disposables.add(new Te(this.el,_.EventType$1.Change)).event}get onPointerUp(){return this.disposables.add(new Te(this.el,_.EventType$1.End)).event}constructor(e){this.el=e,this.disposables=new l.DisposableStore}dispose(){this.disposables.dispose()}}oh([et],Hy.prototype,"onPointerMove",null),oh([et],Hy.prototype,"onPointerUp",null);class Yp{get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}constructor(e){this.factory=e}dispose(){}}oh([et],Yp.prototype,"onPointerMove",null),oh([et],Yp.prototype,"onPointerUp",null);const OM="pointer-events-disabled";class on extends l.Disposable{get state(){return this._state}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}set state(e){this._state!==e&&(this.el.classList.toggle("disabled",e===0),this.el.classList.toggle("minimum",e===1),this.el.classList.toggle("maximum",e===2),this._state=e,this.onDidEnablementChange.fire(e))}get onDidStart(){return this._onDidStart.event}get onDidChange(){return this._onDidChange.event}get onDidReset(){return this._onDidReset.event}get onDidEnd(){return this._onDidEnd.event}set orthogonalStartSash(e){if(this._orthogonalStartSash!==e){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),e){const t=i=>{this.orthogonalStartDragHandleDisposables.clear(),i!==0&&(this._orthogonalStartDragHandle=K(this.el,Q(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add(l.toDisposable(()=>this._orthogonalStartDragHandle.remove())),this.orthogonalStartDragHandleDisposables.add(R(this._orthogonalStartDragHandle,"mouseenter",()=>on.onMouseEnter(e))),this.orthogonalStartDragHandleDisposables.add(R(this._orthogonalStartDragHandle,"mouseleave",()=>on.onMouseLeave(e))))};this.orthogonalStartSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalStartSash=e}}set orthogonalEndSash(e){if(this._orthogonalEndSash!==e){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),e){const t=i=>{this.orthogonalEndDragHandleDisposables.clear(),i!==0&&(this._orthogonalEndDragHandle=K(this.el,Q(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add(l.toDisposable(()=>this._orthogonalEndDragHandle.remove())),this.orthogonalEndDragHandleDisposables.add(R(this._orthogonalEndDragHandle,"mouseenter",()=>on.onMouseEnter(e))),this.orthogonalEndDragHandleDisposables.add(R(this._orthogonalEndDragHandle,"mouseleave",()=>on.onMouseLeave(e))))};this.orthogonalEndSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalEndSash=e}}constructor(e,t,i){super(),this.hoverDelay=tY,this.hoverDelayer=this._register(new l.Delayer(this.hoverDelay)),this._state=3,this.onDidEnablementChange=this._register(new l.Emitter),this._onDidStart=this._register(new l.Emitter),this._onDidChange=this._register(new l.Emitter),this._onDidReset=this._register(new l.Emitter),this._onDidEnd=this._register(new l.Emitter),this.orthogonalStartSashDisposables=this._register(new l.DisposableStore),this.orthogonalStartDragHandleDisposables=this._register(new l.DisposableStore),this.orthogonalEndSashDisposables=this._register(new l.DisposableStore),this.orthogonalEndDragHandleDisposables=this._register(new l.DisposableStore),this.linkedSash=void 0,this.el=K(e,Q(".monaco-sash")),i.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${i.orthogonalEdge}`),l.isMacintosh&&this.el.classList.add("mac"),this._register(R(this.el,"mousedown",s=>this.onPointerStart(s,new Wy(e)))),this._register(R(this.el,"dblclick",s=>this.onPointerDoublePress(s))),this._register(R(this.el,"mouseenter",()=>on.onMouseEnter(this))),this._register(R(this.el,"mouseleave",()=>on.onMouseLeave(this))),this._register(li.addTarget(this.el)),this._register(R(this.el,_.EventType$1.Start,s=>this.onPointerStart(s,new Hy(this.el))));let n;this._register(R(this.el,_.EventType$1.Tap,s=>{if(n){clearTimeout(n),n=void 0,this.onPointerDoublePress(s);return}clearTimeout(n),n=setTimeout(()=>n=void 0,250)})),typeof i.size=="number"?(this.size=i.size,i.orientation===0?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=Hq,this._register(eY.event(s=>{this.size=s,this.layout()}))),this._register(iY.event(s=>this.hoverDelay=s)),this.layoutProvider=t,this.orthogonalStartSash=i.orthogonalStartSash,this.orthogonalEndSash=i.orthogonalEndSash,this.orientation=i.orientation||0,this.orientation===1?(this.el.classList.add("horizontal"),this.el.classList.remove("vertical")):(this.el.classList.remove("horizontal"),this.el.classList.add("vertical")),this.el.classList.toggle("debug",Wq),this.layout()}onPointerStart(e,t){ve.stop(e);let i=!1;if(!e.__orthogonalSashEvent){const m=this.getOrthogonalSash(e);m&&(i=!0,e.__orthogonalSashEvent=!0,m.onPointerStart(e,new Yp(t)))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onPointerStart(e,new Yp(t))),!this.state)return;const n=this.el.ownerDocument.getElementsByTagName("iframe");for(const m of n)m.classList.add(OM);const s=e.pageX,r=e.pageY,a=e.altKey,c={startX:s,currentX:s,startY:r,currentY:r,altKey:a};this.el.classList.add("active"),this._onDidStart.fire(c);const h=bn(this.el),d=()=>{let m="";i?m="all-scroll":this.orientation===1?this.state===1?m="s-resize":this.state===2?m="n-resize":m=l.isMacintosh?"row-resize":"ns-resize":this.state===1?m="e-resize":this.state===2?m="w-resize":m=l.isMacintosh?"col-resize":"ew-resize",h.textContent=`* { cursor: ${m} !important; }`},u=new l.DisposableStore;d(),i||this.onDidEnablementChange.event(d,null,u);const f=m=>{ve.stop(m,!1);const p={startX:s,currentX:m.pageX,startY:r,currentY:m.pageY,altKey:a};this._onDidChange.fire(p)},g=m=>{ve.stop(m,!1),h.remove(),this.el.classList.remove("active"),this._onDidEnd.fire(),u.dispose();for(const p of n)p.classList.remove(OM)};t.onPointerMove(f,null,u),t.onPointerUp(g,null,u),u.add(t)}onPointerDoublePress(e){const t=this.getOrthogonalSash(e);t&&t._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(e,t=!1){e.el.classList.contains("active")?(e.hoverDelayer.cancel(),e.el.classList.add("hover")):e.hoverDelayer.trigger(()=>e.el.classList.add("hover"),e.hoverDelay).then(void 0,()=>{}),!t&&e.linkedSash&&on.onMouseEnter(e.linkedSash,!0)}static onMouseLeave(e,t=!1){e.hoverDelayer.cancel(),e.el.classList.remove("hover"),!t&&e.linkedSash&&on.onMouseLeave(e.linkedSash,!0)}clearSashHoverState(){on.onMouseLeave(this)}layout(){if(this.orientation===0){const e=this.layoutProvider;this.el.style.left=e.getVerticalSashLeft(this)-this.size/2+"px",e.getVerticalSashTop&&(this.el.style.top=e.getVerticalSashTop(this)+"px"),e.getVerticalSashHeight&&(this.el.style.height=e.getVerticalSashHeight(this)+"px")}else{const e=this.layoutProvider;this.el.style.top=e.getHorizontalSashTop(this)-this.size/2+"px",e.getHorizontalSashLeft&&(this.el.style.left=e.getHorizontalSashLeft(this)+"px"),e.getHorizontalSashWidth&&(this.el.style.width=e.getHorizontalSashWidth(this)+"px")}}getOrthogonalSash(e){const t=e.initialTarget??e.target;if(!(!t||!Ve(t))&&t.classList.contains("orthogonal-drag-handle"))return t.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash}dispose(){super.dispose(),this.el.remove()}}const nY={separatorBorder:l.Color.transparent};class PM{set size(e){this._size=e}get size(){return this._size}get visible(){return typeof this._cachedVisibleSize>"u"}setVisible(e,t){if(e!==this.visible){e?(this.size=wi(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize=typeof t=="number"?t:this.size,this.size=0),this.container.classList.toggle("visible",e);try{this.view.setVisible?.(e)}catch(i){console.error("Splitview: Failed to set visible view"),console.error(i)}}}get minimumSize(){return this.visible?this.view.minimumSize:0}get viewMinimumSize(){return this.view.minimumSize}get maximumSize(){return this.visible?this.view.maximumSize:0}get viewMaximumSize(){return this.view.maximumSize}get priority(){return this.view.priority}get proportionalLayout(){return this.view.proportionalLayout??!0}get snap(){return!!this.view.snap}set enabled(e){this.container.style.pointerEvents=e?"":"none"}constructor(e,t,i,n){this.container=e,this.view=t,this.disposable=n,this._cachedVisibleSize=void 0,typeof i=="number"?(this._size=i,this._cachedVisibleSize=void 0,e.classList.add("visible")):(this._size=0,this._cachedVisibleSize=i.cachedVisibleSize)}layout(e,t){this.layoutContainer(e);try{this.view.layout(this.size,e,t)}catch(i){console.error("Splitview: Failed to layout view"),console.error(i)}}dispose(){this.disposable.dispose()}}class sY extends PM{layoutContainer(e){this.container.style.top=`${e}px`,this.container.style.height=`${this.size}px`}}class oY extends PM{layoutContainer(e){this.container.style.left=`${e}px`,this.container.style.width=`${this.size}px`}}var No;(function(o){o[o.Idle=0]="Idle",o[o.Busy=1]="Busy"})(No||(No={})),_.Sizing=void 0,(function(o){o.Distribute={type:"distribute"};function e(n){return{type:"split",index:n}}o.Split=e;function t(n){return{type:"auto",index:n}}o.Auto=t;function i(n){return{type:"invisible",cachedVisibleSize:n}}o.Invisible=i})(_.Sizing||(_.Sizing={}));class kM extends l.Disposable{get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}get startSnappingEnabled(){return this._startSnappingEnabled}get endSnappingEnabled(){return this._endSnappingEnabled}set orthogonalStartSash(e){for(const t of this.sashItems)t.sash.orthogonalStartSash=e;this._orthogonalStartSash=e}set orthogonalEndSash(e){for(const t of this.sashItems)t.sash.orthogonalEndSash=e;this._orthogonalEndSash=e}set startSnappingEnabled(e){this._startSnappingEnabled!==e&&(this._startSnappingEnabled=e,this.updateSashEnablement())}set endSnappingEnabled(e){this._endSnappingEnabled!==e&&(this._endSnappingEnabled=e,this.updateSashEnablement())}constructor(e,t={}){super(),this.size=0,this._contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=No.Idle,this._onDidSashChange=this._register(new l.Emitter),this._onDidSashReset=this._register(new l.Emitter),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.onDidSashChange=this._onDidSashChange.event,this.onDidSashReset=this._onDidSashReset.event,this.orientation=t.orientation??0,this.inverseAltBehavior=t.inverseAltBehavior??!1,this.proportionalLayout=t.proportionalLayout??!0,this.getSashOrthogonalSize=t.getSashOrthogonalSize,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(this.orientation===0?"vertical":"horizontal"),e.appendChild(this.el),this.sashContainer=K(this.el,Q(".sash-container")),this.viewContainer=Q(".split-view-container"),this.scrollable=this._register(new mc({forceIntegerValues:!0,smoothScrollDuration:125,scheduleAtNextAnimationFrame:n=>Ti(j(this.el),n)})),this.scrollableElement=this._register(new Xg(this.viewContainer,{vertical:this.orientation===0?t.scrollbarVisibility??1:2,horizontal:this.orientation===1?t.scrollbarVisibility??1:2},this.scrollable));const i=this._register(new Te(this.viewContainer,"scroll")).event;this._register(i(n=>{const s=this.scrollableElement.getScrollPosition(),r=Math.abs(this.viewContainer.scrollLeft-s.scrollLeft)<=1?void 0:this.viewContainer.scrollLeft,a=Math.abs(this.viewContainer.scrollTop-s.scrollTop)<=1?void 0:this.viewContainer.scrollTop;(r!==void 0||a!==void 0)&&this.scrollableElement.setScrollPosition({scrollLeft:r,scrollTop:a})})),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll(n=>{n.scrollTopChanged&&(this.viewContainer.scrollTop=n.scrollTop),n.scrollLeftChanged&&(this.viewContainer.scrollLeft=n.scrollLeft)})),K(this.el,this.scrollableElement.getDomNode()),this.style(t.styles||nY),t.descriptor&&(this.size=t.descriptor.size,t.descriptor.views.forEach((n,s)=>{const r=l.isUndefined(n.visible)||n.visible?n.size:{type:"invisible",cachedVisibleSize:n.size},a=n.view;this.doAddView(a,r,s,!0)}),this._contentSize=this.viewItems.reduce((n,s)=>n+s.size,0),this.saveProportions())}style(e){e.separatorBorder.isTransparent()?(this.el.classList.remove("separator-border"),this.el.style.removeProperty("--separator-border")):(this.el.classList.add("separator-border"),this.el.style.setProperty("--separator-border",e.separatorBorder.toString()))}addView(e,t,i=this.viewItems.length,n){this.doAddView(e,t,i,n)}layout(e,t){const i=Math.max(this.size,this._contentSize);if(this.size=e,this.layoutContext=t,this.proportions){let n=0;for(let s=0;s0&&(r.size=wi(Math.round(a*e/n),r.minimumSize,r.maximumSize))}}else{const n=l.range(this.viewItems.length),s=n.filter(a=>this.viewItems[a].priority===1),r=n.filter(a=>this.viewItems[a].priority===2);this.resize(this.viewItems.length-1,e-i,void 0,s,r)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this._contentSize>0&&(this.proportions=this.viewItems.map(e=>e.proportionalLayout&&e.visible?e.size/this._contentSize:void 0))}onSashStart({sash:e,start:t,alt:i}){for(const a of this.viewItems)a.enabled=!1;const n=this.sashItems.findIndex(a=>a.sash===e),s=l.combinedDisposable(R(this.el.ownerDocument.body,"keydown",a=>r(this.sashDragState.current,a.altKey)),R(this.el.ownerDocument.body,"keyup",()=>r(this.sashDragState.current,!1))),r=(a,c)=>{const h=this.viewItems.map(m=>m.size);let d=Number.NEGATIVE_INFINITY,u=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(c=!c),c)if(n===this.sashItems.length-1){const p=this.viewItems[n];d=(p.minimumSize-p.size)/2,u=(p.maximumSize-p.size)/2}else{const p=this.viewItems[n+1];d=(p.size-p.maximumSize)/2,u=(p.size-p.minimumSize)/2}let f,g;if(!c){const m=l.range(n,-1),p=l.range(n+1,this.viewItems.length),b=m.reduce((I,T)=>I+(this.viewItems[T].minimumSize-h[T]),0),v=m.reduce((I,T)=>I+(this.viewItems[T].viewMaximumSize-h[T]),0),C=p.length===0?Number.POSITIVE_INFINITY:p.reduce((I,T)=>I+(h[T]-this.viewItems[T].minimumSize),0),w=p.length===0?Number.NEGATIVE_INFINITY:p.reduce((I,T)=>I+(h[T]-this.viewItems[T].viewMaximumSize),0),S=Math.max(b,w),L=Math.min(C,v),D=this.findFirstSnapIndex(m),x=this.findFirstSnapIndex(p);if(typeof D=="number"){const I=this.viewItems[D],T=Math.floor(I.viewMinimumSize/2);f={index:D,limitDelta:I.visible?S-T:S+T,size:I.size}}if(typeof x=="number"){const I=this.viewItems[x],T=Math.floor(I.viewMinimumSize/2);g={index:x,limitDelta:I.visible?L+T:L-T,size:I.size}}}this.sashDragState={start:a,current:a,index:n,sizes:h,minDelta:d,maxDelta:u,alt:c,snapBefore:f,snapAfter:g,disposable:s}};r(t,i)}onSashChange({current:e}){const{index:t,start:i,sizes:n,alt:s,minDelta:r,maxDelta:a,snapBefore:c,snapAfter:h}=this.sashDragState;this.sashDragState.current=e;const d=e-i,u=this.resize(t,d,n,void 0,void 0,r,a,c,h);if(s){const f=t===this.sashItems.length-1,g=this.viewItems.map(w=>w.size),m=f?t:t+1,p=this.viewItems[m],b=p.size-p.maximumSize,v=p.size-p.minimumSize,C=f?t-1:t+1;this.resize(C,-u,g,void 0,void 0,b,v)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(e){this._onDidSashChange.fire(e),this.sashDragState.disposable.dispose(),this.saveProportions();for(const t of this.viewItems)t.enabled=!0}onViewChange(e,t){const i=this.viewItems.indexOf(e);i<0||i>=this.viewItems.length||(t=typeof t=="number"?t:e.size,t=wi(t,e.minimumSize,e.maximumSize),this.inverseAltBehavior&&i>0?(this.resize(i-1,Math.floor((e.size-t)/2)),this.distributeEmptySpace(),this.layoutViews()):(e.size=t,this.relayout([i],void 0)))}resizeView(e,t){if(!(e<0||e>=this.viewItems.length)){if(this.state!==No.Idle)throw new Error("Cant modify splitview");this.state=No.Busy;try{const i=l.range(this.viewItems.length).filter(a=>a!==e),n=[...i.filter(a=>this.viewItems[a].priority===1),e],s=i.filter(a=>this.viewItems[a].priority===2),r=this.viewItems[e];t=Math.round(t),t=wi(t,r.minimumSize,Math.min(r.maximumSize,this.size)),r.size=t,this.relayout(n,s)}finally{this.state=No.Idle}}}distributeViewSizes(){const e=[];let t=0;for(const a of this.viewItems)a.maximumSize-a.minimumSize>0&&(e.push(a),t+=a.size);const i=Math.floor(t/e.length);for(const a of e)a.size=wi(i,a.minimumSize,a.maximumSize);const n=l.range(this.viewItems.length),s=n.filter(a=>this.viewItems[a].priority===1),r=n.filter(a=>this.viewItems[a].priority===2);this.relayout(s,r)}getViewSize(e){return e<0||e>=this.viewItems.length?-1:this.viewItems[e].size}doAddView(e,t,i=this.viewItems.length,n){if(this.state!==No.Idle)throw new Error("Cant modify splitview");this.state=No.Busy;try{const s=Q(".split-view-view");i===this.viewItems.length?this.viewContainer.appendChild(s):this.viewContainer.insertBefore(s,this.viewContainer.children.item(i));const r=e.onDidChange(f=>this.onViewChange(d,f)),a=l.toDisposable(()=>s.remove()),c=l.combinedDisposable(r,a);let h;typeof t=="number"?h=t:(t.type==="auto"&&(this.areViewsDistributed()?t={type:"distribute"}:t={type:"split",index:t.index}),t.type==="split"?h=this.getViewSize(t.index)/2:t.type==="invisible"?h={cachedVisibleSize:t.cachedVisibleSize}:h=e.minimumSize);const d=this.orientation===0?new sY(s,e,h,c):new oY(s,e,h,c);if(this.viewItems.splice(i,0,d),this.viewItems.length>1){const f={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash},g=this.orientation===0?new on(this.sashContainer,{getHorizontalSashTop:I=>this.getSashPosition(I),getHorizontalSashWidth:this.getSashOrthogonalSize},{...f,orientation:1}):new on(this.sashContainer,{getVerticalSashLeft:I=>this.getSashPosition(I),getVerticalSashHeight:this.getSashOrthogonalSize},{...f,orientation:0}),m=this.orientation===0?I=>({sash:g,start:I.startY,current:I.currentY,alt:I.altKey}):I=>({sash:g,start:I.startX,current:I.currentX,alt:I.altKey}),b=l.Event.map(g.onDidStart,m)(this.onSashStart,this),C=l.Event.map(g.onDidChange,m)(this.onSashChange,this),S=l.Event.map(g.onDidEnd,()=>this.sashItems.findIndex(I=>I.sash===g))(this.onSashEnd,this),L=g.onDidReset(()=>{const I=this.sashItems.findIndex(k=>k.sash===g),T=l.range(I,-1),M=l.range(I+1,this.viewItems.length),O=this.findFirstSnapIndex(T),P=this.findFirstSnapIndex(M);typeof O=="number"&&!this.viewItems[O].visible||typeof P=="number"&&!this.viewItems[P].visible||this._onDidSashReset.fire(I)}),D=l.combinedDisposable(b,C,S,L,g),x={sash:g,disposable:D};this.sashItems.splice(i-1,0,x)}s.appendChild(e.element);let u;typeof t!="number"&&t.type==="split"&&(u=[t.index]),n||this.relayout([i],u),!n&&typeof t!="number"&&t.type==="distribute"&&this.distributeViewSizes()}finally{this.state=No.Idle}}relayout(e,t){const i=this.viewItems.reduce((n,s)=>n+s.size,0);this.resize(this.viewItems.length-1,this.size-i,void 0,e,t),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(e,t,i=this.viewItems.map(d=>d.size),n,s,r=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY,c,h){if(e<0||e>=this.viewItems.length)return 0;const d=l.range(e,-1),u=l.range(e+1,this.viewItems.length);if(s)for(const x of s)l.pushToStart(d,x),l.pushToStart(u,x);if(n)for(const x of n)l.pushToEnd(d,x),l.pushToEnd(u,x);const f=d.map(x=>this.viewItems[x]),g=d.map(x=>i[x]),m=u.map(x=>this.viewItems[x]),p=u.map(x=>i[x]),b=d.reduce((x,I)=>x+(this.viewItems[I].minimumSize-i[I]),0),v=d.reduce((x,I)=>x+(this.viewItems[I].maximumSize-i[I]),0),C=u.length===0?Number.POSITIVE_INFINITY:u.reduce((x,I)=>x+(i[I]-this.viewItems[I].minimumSize),0),w=u.length===0?Number.NEGATIVE_INFINITY:u.reduce((x,I)=>x+(i[I]-this.viewItems[I].maximumSize),0),S=Math.max(b,w,r),L=Math.min(C,v,a);let D=!1;if(c){const x=this.viewItems[c.index],I=t>=c.limitDelta;D=I!==x.visible,x.setVisible(I,c.size)}if(!D&&h){const x=this.viewItems[h.index],I=ta+c.size,0);let i=this.size-t;const n=l.range(this.viewItems.length-1,-1),s=n.filter(a=>this.viewItems[a].priority===1),r=n.filter(a=>this.viewItems[a].priority===2);for(const a of r)l.pushToStart(n,a);for(const a of s)l.pushToEnd(n,a);typeof e=="number"&&l.pushToEnd(n,e);for(let a=0;i!==0&&at+i.size,0);let e=0;for(const t of this.viewItems)t.layout(e,this.layoutContext),e+=t.size;this.sashItems.forEach(t=>t.sash.layout()),this.updateSashEnablement(),this.updateScrollableElement()}updateScrollableElement(){this.orientation===0?this.scrollableElement.setScrollDimensions({height:this.size,scrollHeight:this._contentSize}):this.scrollableElement.setScrollDimensions({width:this.size,scrollWidth:this._contentSize})}updateSashEnablement(){let e=!1;const t=this.viewItems.map(c=>e=c.size-c.minimumSize>0||e);e=!1;const i=this.viewItems.map(c=>e=c.maximumSize-c.size>0||e),n=[...this.viewItems].reverse();e=!1;const s=n.map(c=>e=c.size-c.minimumSize>0||e).reverse();e=!1;const r=n.map(c=>e=c.maximumSize-c.size>0||e).reverse();let a=0;for(let c=0;c0||this.startSnappingEnabled)?h.state=1:C&&t[c]&&(a0)return;if(!i.visible&&i.snap)return t}}areViewsDistributed(){let e,t;for(const i of this.viewItems)if(e=e===void 0?i.size:Math.min(e,i.size),t=t===void 0?i.size:Math.max(t,i.size),t-e>2)return!1;return!0}dispose(){this.sashDragState?.disposable.dispose(),l.dispose(this.viewItems),this.viewItems=[],this.sashItems.forEach(e=>e.disposable.dispose()),this.sashItems=[],super.dispose()}}const pb=class pb{constructor(e,t,i){this.columns=e,this.getColumnSize=i,this.templateId=pb.TemplateId,this.renderedTemplates=new Set;const n=new Map(t.map(s=>[s.templateId,s]));this.renderers=[];for(const s of e){const r=n.get(s.templateId);if(!r)throw new Error(`Table cell renderer for template id ${s.templateId} not found.`);this.renderers.push(r)}}renderTemplate(e){const t=K(e,Q(".monaco-table-tr")),i=[],n=[];for(let r=0;rthis.disposables.add(new aY(d,u))),c={size:a.reduce((d,u)=>d+u.column.weight,0),views:a.map(d=>({size:d.column.weight,view:d}))};this.splitview=this.disposables.add(new kM(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:c})),this.splitview.el.style.height=`${i.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${i.headerRowHeight}px`;const h=new Zp(n,s,d=>this.splitview.getViewSize(d));this.list=this.disposables.add(new zn(e,this.domNode,rY(i),[h],r)),l.Event.any(...a.map(d=>d.onDidLayout))(([d,u])=>h.layoutColumn(d,u),null,this.disposables),this.splitview.onDidSashReset(d=>{const u=n.reduce((g,m)=>g+m.weight,0),f=n[d].weight/u*this.cachedWidth;this.splitview.resizeView(d,f)},null,this.disposables),this.styleElement=bn(this.domNode),this.style(X9)}updateOptions(e){this.list.updateOptions(e)}splice(e,t,i=[]){this.list.splice(e,t,i)}getHTMLElement(){return this.domNode}style(e){const t=[];t.push(`.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before { + top: ${this.virtualDelegate.headerRowHeight+1}px; + height: calc(100% - ${this.virtualDelegate.headerRowHeight}px); + }`),this.styleElement.textContent=t.join(` +`),this.list.style(e)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.disposables.dispose()}};_b.InstanceCount=0;let eL=_b;const FM={inputActiveOptionBorder:"#007ACC00",inputActiveOptionForeground:"#FFFFFF",inputActiveOptionBackground:"#0E639C50"};class lY extends Vn{constructor(e,t,i){super(e,t,i);const n=this.options.keybinding?`${this._action.label} (${this.options.keybinding})`:this._action.label;this.toggle=this._register(new tl({actionClassName:this._action.class,isChecked:!!this._action.checked,title:n,notFocusable:!0,inputActiveOptionBackground:i.toggleStyles?.inputActiveOptionBackground,inputActiveOptionBorder:i.toggleStyles?.inputActiveOptionBorder,inputActiveOptionForeground:i.toggleStyles?.inputActiveOptionForeground})),this._register(this.toggle.onChange(()=>{this._action.checked=!!this.toggle&&this.toggle.checked}))}render(e){this.element=e,this.element.appendChild(this.toggle.domNode),this.updateChecked(),this.updateEnabled()}updateEnabled(){this.toggle&&(this.isEnabled()?(this.toggle.enable(),this.element?.classList.remove("disabled")):(this.toggle.disable(),this.element?.classList.add("disabled")))}updateChecked(){this.toggle.checked=!!this._action.checked}updateLabel(){const e=this.options.keybinding?`${this._action.label} (${this.options.keybinding})`:this._action.label;this.toggle.setTitle(e)}focus(){this.toggle.domNode.tabIndex=0,this.toggle.focus()}blur(){this.toggle.domNode.tabIndex=-1,this.toggle.domNode.blur()}setFocusable(e){this.toggle.domNode.tabIndex=e?0:-1}}class tl extends Wn{get onChange(){return this._onChange.event}get onKeyDown(){return this._onKeyDown.event}constructor(e){super(),this._onChange=this._register(new l.Emitter),this._onKeyDown=this._register(new l.Emitter),this._opts=e,this._title=this._opts.title,this._checked=this._opts.isChecked;const t=["monaco-custom-toggle"];this._opts.icon&&(this._icon=this._opts.icon,t.push(..._.ThemeIcon.asClassNameArray(this._icon))),this._opts.actionClassName&&t.push(...this._opts.actionClassName.split(" ")),this._checked&&t.push("checked"),this.domNode=document.createElement("div"),this._register(En().setupDelayedHover(this.domNode,()=>({content:!Do(this._title)&&!Ve(this._title)?sp(this._title):this._title,style:1}),this._opts.hoverLifecycleOptions)),this.domNode.classList.add(...t),this._opts.notFocusable||(this.domNode.tabIndex=0),this.domNode.setAttribute("role","checkbox"),this.domNode.setAttribute("aria-checked",String(this._checked)),this.setTitle(this._opts.title),this.applyStyles(),this.onclick(this.domNode,i=>{this.enabled&&(this.checked=!this._checked,this._onChange.fire(!1),i.preventDefault(),i.stopPropagation())}),this._register(this.ignoreGesture(this.domNode)),this.onkeydown(this.domNode,i=>{if(this.enabled){if(i.keyCode===10||i.keyCode===3){this.checked=!this._checked,this._onChange.fire(!0),i.preventDefault(),i.stopPropagation();return}this._onKeyDown.fire(i)}})}get enabled(){return this.domNode.getAttribute("aria-disabled")!=="true"}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(e){this._checked=e,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}setIcon(e){this._icon&&this.domNode.classList.remove(..._.ThemeIcon.asClassNameArray(this._icon)),this._icon=e,this._icon&&this.domNode.classList.add(..._.ThemeIcon.asClassNameArray(this._icon))}width(){return 22}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder||"",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground||"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground||"")}enable(){this.domNode.setAttribute("aria-disabled",String(!1)),this.domNode.classList.remove("disabled"),this._opts.notFocusable||(this.domNode.tabIndex=0)}disable(){this.domNode.setAttribute("aria-disabled",String(!0)),this.domNode.classList.add("disabled"),this._opts.notFocusable||(this.domNode.tabIndex=-1)}setTitle(e){this._title=e;const t=typeof e=="string"?e:Do(e)?e.value:e.textContent;this.domNode.setAttribute("aria-label",yS(t))}}const uD=class uD extends Wn{constructor(e,t,i){super(),this.checkbox=e,this.domNode=t,this.styles=i,this._onChange=this._register(new l.Emitter),this.onChange=this._onChange.event,this.applyStyles()}get enabled(){return this.checkbox.enabled}enable(){this.checkbox.enable(),this.applyStyles(!0)}disable(){this.checkbox.disable(),this.applyStyles(!1)}setTitle(e){this.checkbox.setTitle(e)}applyStyles(e=this.enabled){this.domNode.style.color=(e?this.styles.checkboxForeground:this.styles.checkboxDisabledForeground)||"",this.domNode.style.backgroundColor=(e?this.styles.checkboxBackground:this.styles.checkboxDisabledBackground)||"",this.domNode.style.borderColor=(e?this.styles.checkboxBorder:this.styles.checkboxDisabledBackground)||"";const t=this.styles.size||18;this.domNode.style.width=this.domNode.style.height=this.domNode.style.fontSize=`${t}px`,this.domNode.style.fontSize=`${t-2}px`}};uD.CLASS_NAME="monaco-checkbox";let Xu=uD;class tL extends Xu{constructor(e,t,i){const n=new tl({title:e,isChecked:t,icon:l.Codicon.check,actionClassName:Xu.CLASS_NAME,hoverLifecycleOptions:i.hoverLifecycleOptions,...FM});super(n,n.domNode,i),this._register(n),this._register(this.checkbox.onChange(s=>{this.applyStyles(),this._onChange.fire(s)}))}get checked(){return this.checkbox.checked}set checked(e){this.checkbox.checked=e,this.applyStyles()}applyStyles(e){this.checkbox.checked?this.checkbox.setIcon(l.Codicon.check):this.checkbox.setIcon(void 0),super.applyStyles(e)}}class BM extends Xu{constructor(e,t,i){let n;switch(t){case!0:n=l.Codicon.check;break;case"mixed":n=l.Codicon.dash;break;case!1:n=void 0;break}const s=new tl({title:e,isChecked:t===!0,icon:n,actionClassName:tL.CLASS_NAME,hoverLifecycleOptions:i.hoverLifecycleOptions,...FM});super(s,s.domNode,i),this._state=t,this._register(s),this._register(this.checkbox.onChange(r=>{this._state=this.checkbox.checked,this.applyStyles(),this._onChange.fire(r)}))}get checked(){return this._state}set checked(e){this._state!==e&&(this._state=e,this.checkbox.checked=e===!0,this.applyStyles())}applyStyles(e){switch(this._state){case!0:this.checkbox.setIcon(l.Codicon.check);break;case"mixed":this.checkbox.setIcon(l.Codicon.dash);break;case!1:this.checkbox.setIcon(void 0);break}super.applyStyles(e)}}function rh(o){return(e,t)=>{if(e.checked!==void 0)return new lY(null,e,{...t,toggleStyles:o})}}const cY=l.localize(2,"Match Case"),hY=l.localize(3,"Match Whole Word"),dY=l.localize(4,"Use Regular Expression");class zM extends tl{constructor(e){super({icon:l.Codicon.caseSensitive,title:cY+e.appendTitle,isChecked:e.isChecked,hoverLifecycleOptions:e.hoverLifecycleOptions,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class VM extends tl{constructor(e){super({icon:l.Codicon.wholeWord,title:hY+e.appendTitle,isChecked:e.isChecked,hoverLifecycleOptions:e.hoverLifecycleOptions,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class UM extends tl{constructor(e){super({icon:l.Codicon.regex,title:dY+e.appendTitle,isChecked:e.isChecked,hoverLifecycleOptions:e.hoverLifecycleOptions,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}function uY(o,e,t){const i=t??document.createElement("div");return i.textContent=o,i}function fY(o,e,t){const i=t??document.createElement("div");return i.textContent="",$M(i,mY(o),e?.actionHandler,e?.renderCodeSegments),i}class gY{constructor(e){this.source=e,this.index=0}eos(){return this.index>=this.source.length}next(){const e=this.peek();return this.advance(),e}peek(){return this.source[this.index]}advance(){this.index++}}function $M(o,e,t,i){let n;if(e.type===2)n=document.createTextNode(e.content||"");else if(e.type===3)n=document.createElement("b");else if(e.type===4)n=document.createElement("i");else if(e.type===7&&i)n=document.createElement("code");else if(e.type===5&&t){const s=document.createElement("a");t.disposables.add(At(s,"click",r=>{t.callback(String(e.index),r)})),n=s}else e.type===8?n=document.createElement("br"):e.type===1&&(n=o);n&&o!==n&&o.appendChild(n),n&&Array.isArray(e.children)&&e.children.forEach(s=>{$M(n,s,t,i)})}function mY(o,e){const t={type:1,children:[]};let i=0,n=t;const s=[],r=new gY(o);for(;!r.eos();){let a=r.next();const c=a==="\\"&&iL(r.peek())!==0;if(c&&(a=r.next()),!c&&pY(a)&&a===r.peek()){r.advance(),n.type===2&&(n=s.pop());const h=iL(a);if(n.type===h||n.type===5&&h===6)n=s.pop();else{const d={type:h,children:[]};h===5&&(d.index=i,i++),n.children.push(d),s.push(n),n=d}}else if(a===` +`)n.type===2&&(n=s.pop()),n.children.push({type:8});else if(n.type!==2){const h={type:2,content:a};n.children.push(h),s.push(n),n=h}else n.content+=a}return n.type===2&&(n=s.pop()),t}function pY(o,e){return iL(o)!==0}function iL(o,e){switch(o){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return 0;default:return 0}}class _Y{constructor(e,t=0,i=e.length,n=t-1){this.items=e,this.start=t,this.end=i,this.index=n}current(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}next(){return this.index=Math.min(this.index+1,this.end),this.current()}previous(){return this.index=Math.max(this.index-1,this.start-1),this.current()}first(){return this.index=this.start,this.current()}last(){return this.index=this.end-1,this.current()}}class bY{constructor(e=new Set,t=10){this._history=e,this._limit=t,this._onChange(),this._history.onDidChange&&(this._disposable=this._history.onDidChange(()=>this._onChange()))}getHistory(){return this._elements}add(e){this._history.delete(e),this._history.add(e),this._onChange()}next(){return this._navigator.next()}previous(){return this._currentPosition()!==0?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}isLast(){return this._currentPosition()>=this._elements.length-1}isNowhere(){return this._navigator.current()===null}has(e){return this._history.has(e)}_onChange(){this._reduceToLimit();const e=this._elements;this._navigator=new _Y(e,0,e.length,e.length)}_reduceToLimit(){const e=this._elements;if(e.length>this._limit){const t=e.slice(e.length-this._limit);this._history.replace?this._history.replace(t):this._history=new Set(t)}}_currentPosition(){const e=this._navigator.current();return e?this._elements.indexOf(e):-1}get _elements(){const e=[];return this._history.forEach(t=>e.push(t)),e}dispose(){this._disposable&&(this._disposable.dispose(),this._disposable=void 0)}}const ah=Q;let CY=class extends Wn{get onDidChange(){return this._onDidChange.event}get onDidHeightChange(){return this._onDidHeightChange.event}constructor(e,t,i){super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this.hover=this._register(new l.MutableDisposable),this._onDidChange=this._register(new l.Emitter),this._onDidHeightChange=this._register(new l.Emitter),this.contextViewProvider=t,this.options=i,this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=this.options.tooltip??(this.placeholder||""),this.ariaLabel=this.options.ariaLabel||"",this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=K(e,ah(".monaco-inputbox.idle"));const n=this.options.flexibleHeight?"textarea":"input",s=K(this.element,ah(".ibwrapper"));if(this.input=K(s,ah(n+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,()=>this.element.classList.add("synthetic-focus")),this.onblur(this.input,()=>this.element.classList.remove("synthetic-focus")),this.options.flexibleHeight){this.maxHeight=typeof this.options.flexibleMaxHeight=="number"?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=K(s,ah("div.mirror")),this.mirror.innerText=" ",this.scrollableElement=new uI(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),K(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll(c=>this.input.scrollTop=c.scrollTop));const r=this._register(new Te(e.ownerDocument,"selectionchange")),a=l.Event.filter(r.event,()=>e.ownerDocument.getSelection()?.anchorNode===s);this._register(a(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&!this.options.showPlaceholderOnFocus&&this.setPlaceHolder(this.placeholder),this.tooltip&&this.setTooltip(this.tooltip),this.oninput(this.input,()=>this.onValueChange()),this.onblur(this.input,()=>this.onBlur()),this.onfocus(this.input,()=>this.onFocus()),this._register(this.ignoreGesture(this.input)),setTimeout(()=>this.updateMirror(),0),this.options.actions&&(this.actionbar=this._register(new el(this.element,{actionViewItemProvider:this.options.actionViewItemProvider})),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}setActions(e,t){this.actionbar?(this.actionbar.clear(),e&&this.actionbar.push(e,{icon:!0,label:!1})):e&&(this.actionbar=this._register(new el(this.element,{actionViewItemProvider:t??this.options.actionViewItemProvider})),this.actionbar.push(e,{icon:!0,label:!1}))}get actionsWidth(){return this.actionbar?.getContainer().offsetWidth??0}onBlur(){this._hideMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder","")}onFocus(){this._showMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder",this.placeholder||"")}setPlaceHolder(e){this.placeholder=e,this.input.setAttribute("placeholder",e)}setTooltip(e){this.tooltip=e,this.hover.value||(this.hover.value=this._register(En().setupDelayedHoverAtMouse(this.input,()=>({content:this.tooltip,appearance:{compact:!0}}))))}setAriaLabel(e){this.ariaLabel=e,e?this.input.setAttribute("aria-label",this.ariaLabel):this.input.removeAttribute("aria-label")}get inputElement(){return this.input}get value(){return this.input.value}set value(e){this.input.value!==e&&(this.input.value=e,this.onValueChange())}get height(){return typeof this.cachedHeight=="number"?this.cachedHeight:qf(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return sd(this.input)}select(e=null){this.input.select(),e&&(this.input.setSelectionRange(e.start,e.end),e.end===this.input.value.length&&(this.input.scrollLeft=this.input.scrollWidth))}isSelectionAtEnd(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}getSelection(){const e=this.input.selectionStart;if(e===null)return null;const t=this.input.selectionEnd??e;return{start:e,end:t}}enable(){this.input.removeAttribute("disabled")}disable(){this.blur(),this.input.disabled=!0,this._hideMessage()}set paddingRight(e){this.input.style.width=`calc(100% - ${e}px)`,this.mirror&&(this.mirror.style.paddingRight=e+"px")}updateScrollDimensions(){if(typeof this.cachedContentHeight!="number"||typeof this.cachedHeight!="number"||!this.scrollableElement)return;const e=this.cachedContentHeight,t=this.cachedHeight,i=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:e,height:t}),this.scrollableElement.setScrollPosition({scrollTop:i})}showMessage(e,t){if(this.state==="open"&&l.equals$1(this.message,e))return;this.message=e,this.element.classList.remove("idle"),this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add(this.classForType(e.type));const i=this.stylesForType(this.message.type);this.element.style.border=`1px solid ${Eo(i.border,"transparent")}`,this.message.content&&(this.hasFocus()||t)&&this._showMessage()}hideMessage(){this.message=null,this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add("idle"),this._hideMessage(),this.applyStyles()}validate(){let e=null;return this.validation&&(e=this.validation(this.value),e?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(e)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),e?.type}stylesForType(e){const t=this.options.inputBoxStyles;switch(e){case 1:return{border:t.inputValidationInfoBorder,background:t.inputValidationInfoBackground,foreground:t.inputValidationInfoForeground};case 2:return{border:t.inputValidationWarningBorder,background:t.inputValidationWarningBackground,foreground:t.inputValidationWarningForeground};default:return{border:t.inputValidationErrorBorder,background:t.inputValidationErrorBackground,foreground:t.inputValidationErrorForeground}}}classForType(e){switch(e){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let e;const t=()=>e.style.width=jf(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:n=>{if(!this.message)return null;e=K(n,ah(".monaco-inputbox-container")),t();const s=ah("span.monaco-inputbox-message");this.message.formatContent?fY(this.message.content,void 0,s):uY(this.message.content,void 0,s),s.classList.add(this.classForType(this.message.type));const r=this.stylesForType(this.message.type);return s.style.backgroundColor=r.background??"",s.style.color=r.foreground??"",s.style.border=r.border?`1px solid ${r.border}`:"",K(e,s),null},onHide:()=>{this.state="closed"},layout:t});let i;this.message.type===3?i=l.localize(9,"Error: {0}",this.message.content):this.message.type===2?i=l.localize(10,"Warning: {0}",this.message.content):i=l.localize(11,"Info: {0}",this.message.content),ha(i),this.state="open"}_hideMessage(){this.contextViewProvider&&(this.state==="open"&&this.contextViewProvider.hideContextView(),this.state="idle")}layoutMessage(){this.state==="open"&&this.contextViewProvider&&this.contextViewProvider.layout()}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),this.state==="open"&&this.contextViewProvider&&this.contextViewProvider.layout(),this.options.hideHoverOnValueChange&&En().hideHover()}updateMirror(){if(!this.mirror)return;const e=this.value,i=e.charCodeAt(e.length-1)===10?" ":"";(e+i).replace(/\u000c/g,"")?this.mirror.textContent=e+i:this.mirror.innerText=" ",this.layout()}applyStyles(){const e=this.options.inputBoxStyles,t=e.inputBackground??"",i=e.inputForeground??"",n=e.inputBorder??"";this.element.style.backgroundColor=t,this.element.style.color=i,this.input.style.backgroundColor="inherit",this.input.style.color=i,this.element.style.border=`1px solid ${Eo(n,"transparent")}`}layout(){if(!this.mirror){this.layoutMessage();return}const e=this.cachedContentHeight;this.cachedContentHeight=qf(this.mirror),e!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight)),this.layoutMessage()}insertAtCursor(e){const t=this.inputElement,i=t.selectionStart,n=t.selectionEnd,s=t.value;i!==null&&n!==null&&(this.value=s.substr(0,i)+e+s.substr(n),t.setSelectionRange(i+1,i+1),this.layout())}dispose(){this._hideMessage(),this.message=null,this.actionbar?.dispose(),super.dispose()}};class KM extends CY{constructor(e,t,i){const n=l.localize(12," or {0} for history","⇅"),s=l.localize(13," ({0} for history)","⇅");super(e,t,i),this._onDidFocus=this._register(new l.Emitter),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new l.Emitter),this.onDidBlur=this._onDidBlur.event,this.history=this._register(new bY(i.history,100));const r=()=>{if(i.showHistoryHint&&i.showHistoryHint()&&!this.placeholder.endsWith(n)&&!this.placeholder.endsWith(s)&&this.history.getHistory().length){const a=this.placeholder.endsWith(")")?n:s,c=this.placeholder+a;i.showPlaceholderOnFocus&&!sd(this.input)?this.placeholder=c:this.setPlaceHolder(c)}};this.observer=new MutationObserver((a,c)=>{a.forEach(h=>{h.target.textContent||r()})}),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,()=>r()),this.onblur(this.input,()=>{const a=c=>{if(this.placeholder.endsWith(c)){const h=this.placeholder.slice(0,this.placeholder.length-c.length);return i.showPlaceholderOnFocus?this.placeholder=h:this.setPlaceHolder(h),!0}else return!1};a(s)||a(n)})}dispose(){super.dispose(),this.observer&&(this.observer.disconnect(),this.observer=void 0)}addToHistory(e){this.value&&(e||this.value!==this.getCurrentValue())&&this.history.add(this.value)}isAtLastInHistory(){return this.history.isLast()}isNowhereInHistory(){return this.history.isNowhere()}showNextValue(){this.history.has(this.value)||this.addToHistory();let e=this.getNextValue();e&&(e=e===this.value?this.getNextValue():e),this.value=e??"",yd(this.value?this.value:l.localize(14,"Cleared Input"))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let e=this.getPreviousValue();e&&(e=e===this.value?this.getPreviousValue():e),e&&(this.value=e,yd(this.value))}setPlaceHolder(e){super.setPlaceHolder(e),this.setTooltip(e)}onBlur(){super.onBlur(),this._onDidBlur.fire()}onFocus(){super.onFocus(),this._onDidFocus.fire()}getCurrentValue(){let e=this.history.current();return e||(e=this.history.last(),this.history.next()),e}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()}}const vY=l.localize(1,"input");class GM extends Wn{get onDidOptionChange(){return this._onDidOptionChange.event}get onKeyDown(){return this._onKeyDown.event}get onMouseDown(){return this._onMouseDown.event}get onCaseSensitiveKeyDown(){return this._onCaseSensitiveKeyDown.event}get onRegexKeyDown(){return this._onRegexKeyDown.event}constructor(e,t,i){super(),this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this.additionalTogglesDisposables=this._register(new l.MutableDisposable),this.additionalToggles=[],this._onDidOptionChange=this._register(new l.Emitter),this._onKeyDown=this._register(new l.Emitter),this._onMouseDown=this._register(new l.Emitter),this._onInput=this._register(new l.Emitter),this._onKeyUp=this._register(new l.Emitter),this._onCaseSensitiveKeyDown=this._register(new l.Emitter),this._onRegexKeyDown=this._register(new l.Emitter),this._lastHighlightFindOptions=0,this.placeholder=i.placeholder||"",this.validation=i.validation,this.label=i.label||vY,this.showCommonFindToggles=!!i.showCommonFindToggles;const n=i.appendCaseSensitiveLabel||"",s=i.appendWholeWordsLabel||"",r=i.appendRegexLabel||"",a=!!i.flexibleHeight,c=!!i.flexibleWidth,h=i.flexibleMaxHeight;if(this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new KM(this.domNode,t,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},showHistoryHint:i.showHistoryHint,flexibleHeight:a,flexibleWidth:c,flexibleMaxHeight:h,inputBoxStyles:i.inputBoxStyles,history:i.history,actions:i.actions,actionViewItemProvider:i.actionViewItemProvider,hideHoverOnValueChange:i.hideHoverOnValueChange})),this.showCommonFindToggles){const d=i?.hoverLifecycleOptions||{groupId:"find-input"};this.regex=this._register(new UM({appendTitle:r,isChecked:!1,hoverLifecycleOptions:d,...i.toggleStyles})),this._register(this.regex.onChange(u=>{this._onDidOptionChange.fire(u),!u&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.regex.onKeyDown(u=>{this._onRegexKeyDown.fire(u)})),this.wholeWords=this._register(new VM({appendTitle:s,isChecked:!1,hoverLifecycleOptions:d,...i.toggleStyles})),this._register(this.wholeWords.onChange(u=>{this._onDidOptionChange.fire(u),!u&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this.caseSensitive=this._register(new zM({appendTitle:n,isChecked:!1,hoverLifecycleOptions:d,...i.toggleStyles})),this._register(this.caseSensitive.onChange(u=>{this._onDidOptionChange.fire(u),!u&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.caseSensitive.onKeyDown(u=>{this._onCaseSensitiveKeyDown.fire(u)})),this.onkeydown(this.domNode,u=>{if(u.equals(15)||u.equals(17)||u.equals(9)){const f=this.getToggleDomNodes(),g=f.indexOf(this.domNode.ownerDocument.activeElement);if(g>=0){let m=-1;u.equals(17)?m=(g+1)%f.length:u.equals(15)&&(g===0?m=f.length-1:m=g-1),u.equals(9)?(f[g].blur(),this.inputBox.focus()):m>=0&&f[m].focus(),ve.stop(u,!0)}}})}this.controls=document.createElement("div"),this.controls.className="controls",this.controls.style.display=this.showCommonFindToggles?"":"none",this.caseSensitive&&this.controls.append(this.caseSensitive.domNode),this.wholeWords&&this.controls.appendChild(this.wholeWords.domNode),this.regex&&this.controls.appendChild(this.regex.domNode),this.setAdditionalToggles(i?.additionalToggles),this.controls&&this.domNode.appendChild(this.controls),e?.appendChild(this.domNode),this._register(R(this.inputBox.inputElement,"compositionstart",d=>{this.imeSessionInProgress=!0})),this._register(R(this.inputBox.inputElement,"compositionend",d=>{this.imeSessionInProgress=!1,this._onInput.fire()})),this.onkeydown(this.inputBox.inputElement,d=>this._onKeyDown.fire(d)),this.onkeyup(this.inputBox.inputElement,d=>this._onKeyUp.fire(d)),this.oninput(this.inputBox.inputElement,d=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,d=>this._onMouseDown.fire(d))}get onDidChange(){return this.inputBox.onDidChange}layout(e){this.inputBox.layout(),this.updateInputBoxPadding(e.collapsedFindWidget)}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.regex?.enable(),this.wholeWords?.enable(),this.caseSensitive?.enable();for(const e of this.additionalToggles)e.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.regex?.disable(),this.wholeWords?.disable(),this.caseSensitive?.disable();for(const e of this.additionalToggles)e.disable()}setFocusInputOnOptionClick(e){this.fixFocusOnOptionClickEnabled=e}setEnabled(e){e?this.enable():this.disable()}setAdditionalToggles(e){for(const t of this.additionalToggles)t.domNode.remove();this.additionalToggles=[],this.additionalTogglesDisposables.value=new l.DisposableStore;for(const t of e??[])this.additionalTogglesDisposables.value.add(t),this.controls.appendChild(t.domNode),this.additionalTogglesDisposables.value.add(t.onChange(i=>{this._onDidOptionChange.fire(i),!i&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus()})),this.additionalToggles.push(t);this.additionalToggles.length>0&&(this.controls.style.display=""),this.updateInputBoxPadding()}getToggleDomNodes(){const e=[];this.caseSensitive&&e.push(this.caseSensitive.domNode),this.wholeWords&&e.push(this.wholeWords.domNode),this.regex&&e.push(this.regex.domNode);for(const t of this.additionalToggles)e.push(t.domNode);return e}setActions(e,t){this.inputBox.setActions(e,t),this.updateInputBoxPadding()}updateInputBoxPadding(e=!1){const t=e?0:(this.caseSensitive?.width()??0)+(this.wholeWords?.width()??0)+(this.regex?.width()??0)+this.additionalToggles.reduce((i,n)=>i+n.width(),0);this.inputBox.paddingRight=t+this.inputBox.actionsWidth}getValue(){return this.inputBox.value}setValue(e){this.inputBox.value!==e&&(this.inputBox.value=e)}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){return this.caseSensitive?.checked??!1}setCaseSensitive(e){this.caseSensitive&&(this.caseSensitive.checked=e)}getWholeWords(){return this.wholeWords?.checked??!1}setWholeWords(e){this.wholeWords&&(this.wholeWords.checked=e)}getRegex(){return this.regex?.checked??!1}setRegex(e){this.regex&&(this.regex.checked=e,this.validate())}focusOnCaseSensitive(){this.caseSensitive?.focus()}highlightFindOptions(){this.domNode.classList.remove("highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,this.domNode.classList.add("highlight-"+this._lastHighlightFindOptions)}validate(){this.inputBox.validate()}showMessage(e){this.inputBox.showMessage(e)}clearMessage(){this.inputBox.hideMessage()}}var ki;(function(o){o[o.Expanded=0]="Expanded",o[o.Collapsed=1]="Collapsed",o[o.PreserveOrExpanded=2]="PreserveOrExpanded",o[o.PreserveOrCollapsed=3]="PreserveOrCollapsed"})(ki||(ki={}));var il;(function(o){o[o.Unknown=0]="Unknown",o[o.Twistie=1]="Twistie",o[o.Element=2]="Element",o[o.Filter=3]="Filter"})(il||(il={}));class rn extends Error{constructor(e,t){super(`TreeError [${e}] ${t}`)}}class nL{constructor(e){this.fn=e,this._map=new WeakMap}map(e){let t=this._map.get(e);return t||(t=this.fn(e),this._map.set(e,t)),t}}function Ju(o){return!!o&&o.visibility!==void 0}function nl(o){switch(o){case!0:return 1;case!1:return 0;default:return o}}function sL(o){return"collapsible"in o}class wY{constructor(e,t,i={}){this.user=e,this.rootRef=[],this.eventBufferer=new l.EventBufferer,this._onDidSpliceModel=new l.Emitter,this.onDidSpliceModel=this._onDidSpliceModel.event,this._onDidSpliceRenderedNodes=new l.Emitter,this.onDidSpliceRenderedNodes=this._onDidSpliceRenderedNodes.event,this._onDidChangeCollapseState=new l.Emitter,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new l.Emitter,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this.refilterDelayer=new l.Delayer(l.MicrotaskDelay),this.collapseByDefault=typeof i.collapseByDefault>"u"?!1:i.collapseByDefault,this.allowNonCollapsibleParents=i.allowNonCollapsibleParents??!1,this.filter=i.filter,this.autoExpandSingleChildren=typeof i.autoExpandSingleChildren>"u"?!1:i.autoExpandSingleChildren,this.root={parent:void 0,element:t,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(e,t,i=l.Iterable.empty(),n={}){if(e.length===0)throw new rn(this.user,"Invalid tree location");n.diffIdentityProvider?this.spliceSmart(n.diffIdentityProvider,e,t,i,n):this.spliceSimple(e,t,i,n)}spliceSmart(e,t,i,n=l.Iterable.empty(),s,r=s.diffDepth??0){const{parentNode:a}=this.getParentNodeWithListIndex(t);if(!a.lastDiffIds)return this.spliceSimple(t,i,n,s);const c=[...n],h=t[t.length-1],d=new l.LcsDiff({getElements:()=>a.lastDiffIds},{getElements:()=>[...a.children.slice(0,h),...c,...a.children.slice(h+i)].map(p=>e.getId(p.element).toString())}).ComputeDiff(!1);if(d.quitEarly)return a.lastDiffIds=void 0,this.spliceSimple(t,i,c,s);const u=t.slice(0,-1),f=(p,b,v)=>{if(r>0)for(let C=0;Cv.originalStart-b.originalStart))f(g,m,g-(p.originalStart+p.originalLength)),g=p.originalStart,m=p.modifiedStart-h,this.spliceSimple([...u,g],p.originalLength,l.Iterable.slice(c,m,m+p.modifiedLength),s);f(g,m,g)}spliceSimple(e,t,i=l.Iterable.empty(),{onDidCreateNode:n,onDidDeleteNode:s,diffIdentityProvider:r}){const{parentNode:a,listIndex:c,revealed:h,visible:d}=this.getParentNodeWithListIndex(e),u=[],f=l.Iterable.map(i,L=>this.createTreeNode(L,a,a.visible?1:0,h,u,n)),g=e[e.length-1];let m=0;for(let L=g;L>=0&&Lr.getId(L.element).toString())):a.lastDiffIds=a.children.map(L=>r.getId(L.element).toString()):a.lastDiffIds=void 0;let w=0;for(const L of C)L.visible&&w++;if(w!==0)for(let L=g+p.length;L0&&s){const L=D=>{s(D),D.children.forEach(L)};C.forEach(L)}if(h&&d){const L=C.reduce((D,x)=>D+(x.visible?x.renderNodeCount:0),0);this._updateAncestorsRenderNodeCount(a,v-L),this._onDidSpliceRenderedNodes.fire({start:c,deleteCount:L,elements:u})}this._onDidSpliceModel.fire({insertedNodes:p,deletedNodes:C});let S=a;for(;S;){if(S.visibility===2){this.refilterDelayer.trigger(()=>this.refilter());break}S=S.parent}}rerender(e){if(e.length===0)throw new rn(this.user,"Invalid tree location");const{node:t,listIndex:i,revealed:n}=this.getTreeNodeWithListIndex(e);t.visible&&n&&this._onDidSpliceRenderedNodes.fire({start:i,deleteCount:1,elements:[t]})}has(e){return this.hasTreeNode(e)}getListIndex(e){const{listIndex:t,visible:i,revealed:n}=this.getTreeNodeWithListIndex(e);return i&&n?t:-1}getListRenderCount(e){return this.getTreeNode(e).renderNodeCount}isCollapsible(e){return this.getTreeNode(e).collapsible}setCollapsible(e,t){const i=this.getTreeNode(e);typeof t>"u"&&(t=!i.collapsible);const n={collapsible:t};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,n))}isCollapsed(e){return this.getTreeNode(e).collapsed}setCollapsed(e,t,i){const n=this.getTreeNode(e);typeof t>"u"&&(t=!n.collapsed);const s={collapsed:t,recursive:i||!1};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,s))}_setCollapseState(e,t){const{node:i,listIndex:n,revealed:s}=this.getTreeNodeWithListIndex(e),r=this._setListNodeCollapseState(i,n,s,t);if(i!==this.root&&this.autoExpandSingleChildren&&r&&!sL(t)&&i.collapsible&&!i.collapsed&&!t.recursive){let a=-1;for(let c=0;c-1){a=-1;break}else a=c;a>-1&&this._setCollapseState([...e,a],t)}return r}_setListNodeCollapseState(e,t,i,n){const s=this._setNodeCollapseState(e,n,!1);if(!i||!e.visible||!s)return s;const r=e.renderNodeCount,a=this.updateNodeAfterCollapseChange(e),c=r-(t===-1?0:1);return this._onDidSpliceRenderedNodes.fire({start:t+1,deleteCount:c,elements:a.slice(1)}),s}_setNodeCollapseState(e,t,i){let n;if(e===this.root?n=!1:(sL(t)?(n=e.collapsible!==t.collapsible,e.collapsible=t.collapsible):e.collapsible?(n=e.collapsed!==t.collapsed,e.collapsed=t.collapsed):n=!1,n&&this._onDidChangeCollapseState.fire({node:e,deep:i})),!sL(t)&&t.recursive)for(const s of e.children)n=this._setNodeCollapseState(s,t,!0)||n;return n}expandTo(e){this.eventBufferer.bufferEvents(()=>{let t=this.getTreeNode(e);for(;t.parent;)t=t.parent,e=e.slice(0,e.length-1),t.collapsed&&this._setCollapseState(e,{collapsed:!1,recursive:!1})})}refilter(){const e=this.root.renderNodeCount,t=this.updateNodeAfterFilterChange(this.root);this._onDidSpliceRenderedNodes.fire({start:0,deleteCount:e,elements:t}),this.refilterDelayer.cancel()}createTreeNode(e,t,i,n,s,r){const a={parent:t,element:e.element,children:[],depth:t.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:typeof e.collapsible=="boolean"?e.collapsible:typeof e.collapsed<"u",collapsed:typeof e.collapsed>"u"?this.collapseByDefault:e.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},c=this._filterNode(a,i);a.visibility=c,n&&s.push(a);const h=e.children||l.Iterable.empty(),d=n&&c!==0&&!a.collapsed;let u=0,f=1;for(const g of h){const m=this.createTreeNode(g,a,c,d,s,r);a.children.push(m),f+=m.renderNodeCount,m.visible&&(m.visibleChildIndex=u++)}return this.allowNonCollapsibleParents||(a.collapsible=a.collapsible||a.children.length>0),a.visibleChildrenCount=u,a.visible=c===2?u>0:c===1,a.visible?a.collapsed||(a.renderNodeCount=f):(a.renderNodeCount=0,n&&s.pop()),r?.(a),a}updateNodeAfterCollapseChange(e){const t=e.renderNodeCount,i=[];return this._updateNodeAfterCollapseChange(e,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterCollapseChange(e,t){if(e.visible===!1)return 0;if(t.push(e),e.renderNodeCount=1,!e.collapsed)for(const i of e.children)e.renderNodeCount+=this._updateNodeAfterCollapseChange(i,t);return this._onDidChangeRenderNodeCount.fire(e),e.renderNodeCount}updateNodeAfterFilterChange(e){const t=e.renderNodeCount,i=[];return this._updateNodeAfterFilterChange(e,e.visible?1:0,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterFilterChange(e,t,i,n=!0){let s;if(e!==this.root){if(s=this._filterNode(e,t),s===0)return e.visible=!1,e.renderNodeCount=0,!1;n&&i.push(e)}const r=i.length;e.renderNodeCount=e===this.root?0:1;let a=!1;if(!e.collapsed||s!==0){let c=0;for(const h of e.children)a=this._updateNodeAfterFilterChange(h,s,i,n&&!e.collapsed)||a,h.visible&&(h.visibleChildIndex=c++);e.visibleChildrenCount=c}else e.visibleChildrenCount=0;return e!==this.root&&(e.visible=s===2?a:s===1,e.visibility=s),e.visible?e.collapsed||(e.renderNodeCount+=i.length-r):(e.renderNodeCount=0,n&&i.pop()),this._onDidChangeRenderNodeCount.fire(e),e.visible}_updateAncestorsRenderNodeCount(e,t){if(t!==0)for(;e;)e.renderNodeCount+=t,this._onDidChangeRenderNodeCount.fire(e),e=e.parent}_filterNode(e,t){const i=this.filter?this.filter.filter(e.element,t):1;return typeof i=="boolean"?(e.filterData=void 0,i?1:0):Ju(i)?(e.filterData=i.data,nl(i.visibility)):(e.filterData=void 0,nl(i))}hasTreeNode(e,t=this.root){if(!e||e.length===0)return!0;const[i,...n]=e;return i<0||i>t.children.length?!1:this.hasTreeNode(n,t.children[i])}getTreeNode(e,t=this.root){if(!e||e.length===0)return t;const[i,...n]=e;if(i<0||i>t.children.length)throw new rn(this.user,"Invalid tree location");return this.getTreeNode(n,t.children[i])}getTreeNodeWithListIndex(e){if(e.length===0)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:t,listIndex:i,revealed:n,visible:s}=this.getParentNodeWithListIndex(e),r=e[e.length-1];if(r<0||r>t.children.length)throw new rn(this.user,"Invalid tree location");const a=t.children[r];return{node:a,listIndex:i,revealed:n,visible:s&&a.visible}}getParentNodeWithListIndex(e,t=this.root,i=0,n=!0,s=!0){const[r,...a]=e;if(r<0||r>t.children.length)throw new rn(this.user,"Invalid tree location");for(let c=0;ct.element)),this.data=e}}function oL(o){return o instanceof $u?new SY(o):o}class yY{constructor(e,t){this.modelProvider=e,this.dnd=t,this.autoExpandDisposable=l.Disposable.None,this.disposables=new l.DisposableStore}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(i=>i.element),t)}onDragStart(e,t){this.dnd.onDragStart?.(oL(e),t)}onDragOver(e,t,i,n,s,r=!0){const a=this.dnd.onDragOver(oL(e),t&&t.element,i,n,s),c=this.autoExpandNode!==t;if(c&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=t),typeof t>"u")return a;if(c&&typeof a!="boolean"&&a.autoExpand&&(this.autoExpandDisposable=l.disposableTimeout(()=>{const g=this.modelProvider(),m=g.getNodeLocation(t);g.isCollapsed(m)&&g.setCollapsed(m,!1),this.autoExpandNode=void 0},500,this.disposables)),typeof a=="boolean"||!a.accept||typeof a.bubble>"u"||a.feedback){if(!r){const g=typeof a=="boolean"?a:a.accept,m=typeof a=="boolean"?void 0:a.effect;return{accept:g,effect:m,feedback:[i]}}return a}if(a.bubble===1){const g=this.modelProvider(),m=g.getNodeLocation(t),p=g.getParentNodeLocation(m),b=g.getNode(p),v=p&&g.getListIndex(p);return this.onDragOver(e,b,v,n,s,!1)}const h=this.modelProvider(),d=h.getNodeLocation(t),u=h.getListIndex(d),f=h.getListRenderCount(d);return{...a,feedback:l.range(u,u+f)}}drop(e,t,i,n,s){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(oL(e),t&&t.element,i,n,s)}onDragEnd(e){this.dnd.onDragEnd?.(e)}dispose(){this.disposables.dispose(),this.dnd.dispose()}}function LY(o,e,t){return t&&{...t,identityProvider:t.identityProvider&&{getId(i){return t.identityProvider.getId(i.element)},getGroupId:t.identityProvider.getGroupId?i=>t.identityProvider.getGroupId(i.element):void 0},dnd:t.dnd&&e.add(new yY(o,t.dnd)),multipleSelectionController:t.multipleSelectionController&&{isSelectionSingleChangeEvent(i){return t.multipleSelectionController.isSelectionSingleChangeEvent({...i,element:i.element})},isSelectionRangeChangeEvent(i){return t.multipleSelectionController.isSelectionRangeChangeEvent({...i,element:i.element})}},accessibilityProvider:t.accessibilityProvider&&{...t.accessibilityProvider,getSetSize(i){const n=o(),s=n.getNodeLocation(i),r=n.getParentNodeLocation(s);return n.getNode(r).visibleChildrenCount},getPosInSet(i){return i.visibleChildIndex+1},isChecked:t.accessibilityProvider&&t.accessibilityProvider.isChecked?i=>t.accessibilityProvider.isChecked(i.element):void 0,getRole:t.accessibilityProvider&&t.accessibilityProvider.getRole?i=>t.accessibilityProvider.getRole(i.element):()=>"treeitem",getAriaLabel(i){return t.accessibilityProvider.getAriaLabel(i.element)},getWidgetAriaLabel(){return t.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:t.accessibilityProvider&&t.accessibilityProvider.getWidgetRole?()=>t.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:t.accessibilityProvider&&t.accessibilityProvider.getAriaLevel?i=>t.accessibilityProvider.getAriaLevel(i.element):i=>i.depth,getActiveDescendantId:t.accessibilityProvider.getActiveDescendantId&&(i=>t.accessibilityProvider.getActiveDescendantId(i.element))},keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&{...t.keyboardNavigationLabelProvider,getKeyboardNavigationLabel(i){return t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i.element)}}}}class rL{constructor(e){this.delegate=e}getHeight(e){return this.delegate.getHeight(e.element)}getTemplateId(e){return this.delegate.getTemplateId(e.element)}hasDynamicHeight(e){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(e.element)}setDynamicHeight(e,t){this.delegate.setDynamicHeight?.(e.element,t)}}var sl;(function(o){o.None="none",o.OnHover="onHover",o.Always="always"})(sl||(sl={}));class DY{get elements(){return this._elements}constructor(e,t=[]){this._elements=t,this.disposables=new l.DisposableStore,this.onDidChange=l.Event.forEach(e,i=>this._elements=i,this.disposables)}dispose(){this.disposables.dispose()}}const Sf=class Sf{constructor(e,t,i,n,s,r={}){this.renderer=e,this.model=t,this.activeNodes=n,this.renderedIndentGuides=s,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=Sf.DefaultIndent,this.defaultIndent=Sf.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.activeIndentNodes=new Set,this.indentGuidesDisposable=l.Disposable.None,this.disposables=new l.DisposableStore,this.templateId=e.templateId,this.updateOptions(r),l.Event.map(i,a=>a.node)(this.onDidChangeNodeTwistieState,this,this.disposables),e.onDidChangeTwistieState?.(this.onDidChangeTwistieState,this,this.disposables)}updateOptions(e={}){if(typeof e.defaultIndent<"u"&&(this.defaultIndent=e.defaultIndent),typeof e.indent<"u"||typeof e.defaultIndent<"u"){const t=typeof e.indent<"u"?wi(e.indent,0,40):this.indent;if(t!==this.indent||typeof e.defaultIndent<"u"){this.indent=t;for(const[n,s]of this.renderedNodes)s.indentSize=this.defaultIndent+(n.depth-1)*this.indent,this.renderTreeElement(n,s)}}if(typeof e.renderIndentGuides<"u"){const t=e.renderIndentGuides!==sl.None;if(t!==this.shouldRenderIndentGuides){this.shouldRenderIndentGuides=t;for(const[i,n]of this.renderedNodes)this._renderIndentGuides(i,n);if(this.indentGuidesDisposable.dispose(),t){const i=new l.DisposableStore;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,i),this.indentGuidesDisposable=i,this._onDidChangeActiveNodes(this.activeNodes.elements)}}}typeof e.hideTwistiesOfChildlessElements<"u"&&(this.hideTwistiesOfChildlessElements=e.hideTwistiesOfChildlessElements),typeof e.twistieAdditionalCssClass<"u"&&(this.twistieAdditionalCssClass=e.twistieAdditionalCssClass)}renderTemplate(e){const t=K(e,Q(".monaco-tl-row")),i=K(t,Q(".monaco-tl-indent")),n=K(t,Q(".monaco-tl-twistie")),s=K(t,Q(".monaco-tl-contents")),r=this.renderer.renderTemplate(s);return{container:e,indent:i,twistie:n,indentGuidesDisposable:l.Disposable.None,indentSize:0,templateData:r}}renderElement(e,t,i,n){i.indentSize=this.defaultIndent+(e.depth-1)*this.indent,this.renderedNodes.set(e,i),this.renderedElements.set(e.element,e),this.renderTreeElement(e,i),this.renderer.renderElement(e,t,i.templateData,{...n,indent:i.indentSize})}disposeElement(e,t,i,n){i.indentGuidesDisposable.dispose(),this.renderer.disposeElement?.(e,t,i.templateData,{...n,indent:i.indentSize}),typeof n?.height=="number"&&(this.renderedNodes.delete(e),this.renderedElements.delete(e.element))}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}onDidChangeTwistieState(e){const t=this.renderedElements.get(e);t&&this.onDidChangeNodeTwistieState(t)}onDidChangeNodeTwistieState(e){const t=this.renderedNodes.get(e);t&&(this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderTreeElement(e,t))}renderTreeElement(e,t){t.twistie.className=t.twistie.classList.item(0),t.twistie.style.paddingLeft=`${t.indentSize}px`,t.indent.style.width=`${t.indentSize+this.indent-16}px`,e.collapsible?t.container.setAttribute("aria-expanded",String(!e.collapsed)):t.container.removeAttribute("aria-expanded"),t.twistie.classList.remove(..._.ThemeIcon.asClassNameArray(l.Codicon.treeItemExpanded));let i=!1;if(this.renderer.renderTwistie&&(i=this.renderer.renderTwistie(e.element,t.twistie)),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(i||t.twistie.classList.add(..._.ThemeIcon.asClassNameArray(l.Codicon.treeItemExpanded)),t.twistie.classList.add("collapsible"),t.twistie.classList.toggle("collapsed",e.collapsed)):t.twistie.classList.remove("collapsible","collapsed"),this.twistieAdditionalCssClass){const n=this.twistieAdditionalCssClass(e.element);n&&t.twistie.classList.add(n)}this._renderIndentGuides(e,t)}_renderIndentGuides(e,t){if(On(t.indent),t.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const i=new l.DisposableStore;for(;;){const n=this.model.getNodeLocation(e),s=this.model.getParentNodeLocation(n);if(!s)break;const r=this.model.getNode(s),a=Q(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(r)&&a.classList.add("active"),t.indent.childElementCount===0?t.indent.appendChild(a):t.indent.insertBefore(a,t.indent.firstElementChild),this.renderedIndentGuides.add(r,a),i.add(l.toDisposable(()=>this.renderedIndentGuides.delete(r,a))),e=r}t.indentGuidesDisposable=i}_onDidChangeActiveNodes(e){if(!this.shouldRenderIndentGuides)return;const t=new Set;e.forEach(i=>{const n=this.model.getNodeLocation(i);try{const s=this.model.getParentNodeLocation(n);i.collapsible&&i.children.length>0&&!i.collapsed?t.add(i):s&&t.add(this.model.getNode(s))}catch{}}),this.activeIndentNodes.forEach(i=>{t.has(i)||this.renderedIndentGuides.forEach(i,n=>n.classList.remove("active"))}),t.forEach(i=>{this.activeIndentNodes.has(i)||this.renderedIndentGuides.forEach(i,n=>n.classList.add("active"))}),this.activeIndentNodes=t}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),l.dispose(this.disposables)}};Sf.DefaultIndent=8;let aL=Sf;function xY(o,e){const t=e.toLowerCase().indexOf(o);let i;if(t>-1){i=[Number.MAX_SAFE_INTEGER,0];for(let n=o.length;n>0;n--)i.push(t+n-1)}return i}class jM{get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}set findMatchType(e){this._findMatchType=e}get findMatchType(){return this._findMatchType}set findMode(e){this._findMode=e}get findMode(){return this._findMode}constructor(e,t,i){this._keyboardNavigationLabelProvider=e,this._filter=t,this._defaultFindVisibility=i,this._totalCount=0,this._matchCount=0,this._findMatchType=es.Fuzzy,this._findMode=an.Highlight,this._pattern="",this._lowercasePattern="",this.disposables=new l.DisposableStore}filter(e,t){let i=1;if(this._filter){const r=this._filter.filter(e,t);if(typeof r=="boolean"?i=r?1:0:Ju(r)?i=nl(r.visibility):i=r,i===0)return!1}if(this._totalCount++,!this._pattern)return this._matchCount++,{data:_.FuzzyScore.Default,visibility:i};const n=this._keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),s=Array.isArray(n)?n:[n];for(const r of s){const a=r&&r.toString();if(typeof a>"u")return{data:_.FuzzyScore.Default,visibility:i};let c;if(this._findMatchType===es.Contiguous?c=xY(this._lowercasePattern,a.toLowerCase()):c=Bc(this._pattern,this._lowercasePattern,0,a,a.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0}),c)return this._matchCount++,s.length===1?{data:c,visibility:i}:{data:{label:a,score:c},visibility:i}}return this._findMode===an.Filter?typeof this._defaultFindVisibility=="number"?this._defaultFindVisibility:this._defaultFindVisibility?this._defaultFindVisibility(e):2:{data:_.FuzzyScore.Default,visibility:i}}reset(){this._totalCount=0,this._matchCount=0}dispose(){l.dispose(this.disposables)}}class EY{constructor(e){this.stateMap=new Map(e.map(t=>[t.id,{...t}]))}get(e){const t=this.stateMap.get(e);if(t===void 0)throw new Error(`No state found for toggle id ${e}`);return t.isChecked}set(e,t){const i=this.stateMap.get(e);if(i===void 0)throw new Error(`No state found for toggle id ${e}`);return i.isChecked===t?!1:(i.isChecked=t,!0)}}var an;(function(o){o[o.Highlight=0]="Highlight",o[o.Filter=1]="Filter"})(an||(an={}));var es;(function(o){o[o.Fuzzy=0]="Fuzzy",o[o.Contiguous=1]="Contiguous"})(es||(es={}));var Dr;(function(o){o.Mode="mode",o.MatchType="matchType"})(Dr||(Dr={}));class IY{get pattern(){return this._pattern}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.widget?.setPlaceHolder(e)}constructor(e,t,i,n={}){this.tree=e,this.filter=t,this.contextViewProvider=i,this.options=n,this._pattern="",this._onDidChangePattern=new l.Emitter,this._onDidChangeOpenState=new l.Emitter,this.onDidChangeOpenState=this._onDidChangeOpenState.event,this.enabledDisposables=new l.DisposableStore,this.disposables=new l.DisposableStore,this.toggles=new EY(n.toggles??[]),this._placeholder=n.placeholder??l.localize(22,"Type to search")}isOpened(){return!!this.widget}updateToggleState(e,t){this.toggles.set(e,t),this.widget?.setToggleState(e,t)}renderMessage(e,t){e?this.tree.options.showNotFoundMessage??!0?this.widget?.showMessage({type:2,content:t??l.localize(23,"No results found.")}):this.widget?.showMessage({type:2}):this.widget?.clearMessage()}alertResults(e){ha(e?l.localize(25,"{0} results",e):l.localize(24,"No results"))}dispose(){this._history=void 0,this._onDidChangePattern.dispose(),this.enabledDisposables.dispose(),this.disposables.dispose()}}class qM extends IY{get mode(){return this.toggles.get(Dr.Mode)?an.Filter:an.Highlight}set mode(e){if(e===this.mode)return;const t=e===an.Filter;this.updateToggleState(Dr.Mode,t),this.placeholder=t?l.localize(26,"Type to filter"):l.localize(27,"Type to search"),this.filter.findMode=e,this.tree.refilter(),this.render(),this._onDidChangeMode.fire(e)}get matchType(){return this.toggles.get(Dr.MatchType)?es.Fuzzy:es.Contiguous}set matchType(e){e!==this.matchType&&(this.updateToggleState(Dr.MatchType,e===es.Fuzzy),this.filter.findMatchType=e,this.tree.refilter(),this.render(),this._onDidChangeMatchType.fire(e))}constructor(e,t,i,n={}){const s=n.defaultFindMode??an.Highlight,r=n.defaultFindMatchType??es.Fuzzy,a=[{id:Dr.Mode,icon:l.Codicon.listFilter,title:l.localize(28,"Filter"),isChecked:s===an.Filter},{id:Dr.MatchType,icon:l.Codicon.searchFuzzy,title:l.localize(29,"Fuzzy Match"),isChecked:r===es.Fuzzy}];t.findMatchType=r,t.findMode=s,super(e,t,i,{...n,toggles:a}),this.filter=t,this._onDidChangeMode=new l.Emitter,this.onDidChangeMode=this._onDidChangeMode.event,this._onDidChangeMatchType=new l.Emitter,this.onDidChangeMatchType=this._onDidChangeMatchType.event,this.disposables.add(this.tree.onDidChangeModel(()=>{this.isOpened()&&(this.pattern.length!==0&&this.tree.refilter(),this.render())})),this.disposables.add(this.tree.onWillRefilter(()=>this.filter.reset()))}updateOptions(e={}){e.defaultFindMode!==void 0&&(this.mode=e.defaultFindMode),e.defaultFindMatchType!==void 0&&(this.matchType=e.defaultFindMatchType)}shouldAllowFocus(e){return!this.isOpened()||!this.pattern||this.filter.totalCount>0&&this.filter.matchCount<=1?!0:!_.FuzzyScore.isDefault(e.filterData)}render(){const t=this.filter.matchCount===0&&this.filter.totalCount>0&&this.pattern.length>0;this.renderMessage(t),this.pattern.length&&this.alertResults(this.filter.matchCount)}}function TY(o,e){return o.position===e.position&&YM(o,e)}function YM(o,e){return o.node.element===e.node.element&&o.startIndex===e.startIndex&&o.height===e.height&&o.endIndex===e.endIndex}class NY{constructor(e=[]){this.stickyNodes=e}get count(){return this.stickyNodes.length}equal(e){return l.equals(this.stickyNodes,e.stickyNodes,TY)}contains(e){return this.stickyNodes.some(t=>t.node.element===e.element)}lastNodePartiallyVisible(){if(this.count===0)return!1;const e=this.stickyNodes[this.count-1];if(this.count===1)return e.position!==0;const t=this.stickyNodes[this.count-2];return t.position+t.height!==e.position}animationStateChanged(e){if(!l.equals(this.stickyNodes,e.stickyNodes,YM)||this.count===0)return!1;const t=this.stickyNodes[this.count-1],i=e.stickyNodes[e.count-1];return t.position!==i.position}}class RY{constrainStickyScrollNodes(e,t,i){for(let n=0;ni||n>=t)return e.slice(0,n)}return e}}class ZM extends l.Disposable{constructor(e,t,i,n,s,r={}){super(),this.tree=e,this.model=t,this.view=i,this.treeDelegate=s,this.maxWidgetViewRatio=.4;const a=this.validateStickySettings(r);this.stickyScrollMaxItemCount=a.stickyScrollMaxItemCount,this.stickyScrollDelegate=r.stickyScrollDelegate??new RY,this.paddingTop=r.paddingTop??0,this._widget=this._register(new MY(i.getScrollableElement(),i,e,n,s,r.accessibilityProvider)),this.onDidChangeHasFocus=this._widget.onDidChangeHasFocus,this.onContextMenu=this._widget.onContextMenu,this._register(i.onDidScroll(()=>this.update())),this._register(i.onDidChangeContentHeight(()=>this.update())),this._register(e.onDidChangeCollapseState(()=>this.update())),this._register(t.onDidSpliceRenderedNodes(c=>{const h=this._widget.state;if(!h)return;if(c.deleteCount>0&&h.stickyNodes.some(f=>!this.model.has(this.model.getNodeLocation(f.node)))){this.update();return}h.stickyNodes.some(f=>{const g=this.model.getListIndex(this.model.getNodeLocation(f.node));return g>=c.start&&g=this.view.length))return this.view.element(t)}update(){const e=this.getNodeAtHeight(this.paddingTop);if(!e||this.tree.scrollTop<=this.paddingTop||this.view.renderHeight===0){this._widget.setState(void 0);return}const t=this.findStickyState(e);this._widget.setState(t)}findStickyState(e){const t=[];let i=e,n=0,s=this.getNextStickyNode(i,void 0,n);for(;s&&(t.push(s),n+=s.height,!(t.length<=this.stickyScrollMaxItemCount&&(i=this.getNextVisibleNode(s),!i)));)s=this.getNextStickyNode(i,s.node,n);const r=this.constrainStickyNodes(t);return r.length?new NY(r):void 0}getNextVisibleNode(e){return this.getNodeAtHeight(e.position+e.height)}getNextStickyNode(e,t,i){const n=this.getAncestorUnderPrevious(e,t);if(n&&!(n===e&&(!this.nodeIsUncollapsedParent(e)||this.nodeTopAlignsWithStickyNodesBottom(e,i))))return this.createStickyScrollNode(n,i)}nodeTopAlignsWithStickyNodesBottom(e,t){const i=this.getNodeIndex(e),n=this.view.getElementTop(i),s=t;return this.view.scrollTop===n-s}createStickyScrollNode(e,t){const i=this.treeDelegate.getHeight(e),{startIndex:n,endIndex:s}=this.getNodeRange(e),r=this.calculateStickyNodePosition(s,t,i);return{node:e,position:r,height:i,startIndex:n,endIndex:s}}getAncestorUnderPrevious(e,t=void 0){let i=e,n=this.getParentNode(i);for(;n;){if(n===t)return i;i=n,n=this.getParentNode(i)}if(t===void 0)return i}calculateStickyNodePosition(e,t,i){let n=this.view.getRelativeTop(e);if(n===null&&this.view.firstVisibleIndex===e&&e+1c&&t<=c?c-i:t}constrainStickyNodes(e){if(e.length===0)return[];const t=this.view.renderHeight*this.maxWidgetViewRatio,i=e[e.length-1];if(e.length<=this.stickyScrollMaxItemCount&&i.position+i.height<=t)return e;const n=this.stickyScrollDelegate.constrainStickyScrollNodes(e,this.stickyScrollMaxItemCount,t);if(!n.length)return[];const s=n[n.length-1];if(n.length>this.stickyScrollMaxItemCount||s.position+s.height>t)throw new Error("stickyScrollDelegate violates constraints");return n}getParentNode(e){const t=this.model.getNodeLocation(e),i=this.model.getParentNodeLocation(t);return i?this.model.getNode(i):void 0}nodeIsUncollapsedParent(e){const t=this.model.getNodeLocation(e);return this.model.getListRenderCount(t)>1}getNodeIndex(e){const t=this.model.getNodeLocation(e);return this.model.getListIndex(t)}getNodeRange(e){const t=this.model.getNodeLocation(e),i=this.model.getListIndex(t);if(i<0)throw new Error("Node not found in tree");const n=this.model.getListRenderCount(t),s=i+n-1;return{startIndex:i,endIndex:s}}nodePositionTopBelowWidget(e){const t=[];let i=this.getParentNode(e);for(;i;)t.push(i),i=this.getParentNode(i);let n=0;for(let s=0;s0,i=!!e&&e.count>0;if(!t&&!i||t&&i&&this._previousState.equal(e))return;if(t!==i&&this.setVisible(i),!i){this._previousState=void 0,this._previousElements=[],this._previousStateDisposables.clear();return}const n=e.stickyNodes[e.count-1];this._previousState&&e.animationStateChanged(this._previousState)?this._previousElements[this._previousState.count-1].style.top=`${n.position}px`:this.renderState(e),this._previousState=e,this._rootDomNode.style.height=`${n.position+n.height}px`}renderState(e){this._previousStateDisposables.clear();const t=Array(e.count);for(let i=e.count-1;i>=0;i--){const n=e.stickyNodes[i],{element:s,disposable:r}=this.createElement(n,i,e.count);t[i]=s,this._rootDomNode.appendChild(s),this._previousStateDisposables.add(r)}this.stickyScrollFocus.updateElements(t,e),this._previousElements=t}rerender(){this._previousState&&this.renderState(this._previousState)}createElement(e,t,i){const n=e.startIndex,s=document.createElement("div");s.style.top=`${e.position}px`,this.tree.options.setRowHeight!==!1&&(s.style.height=`${e.height}px`),this.tree.options.setRowLineHeight!==!1&&(s.style.lineHeight=`${e.height}px`),s.classList.add("monaco-tree-sticky-row"),s.classList.add("monaco-list-row"),s.setAttribute("data-index",`${n}`),s.setAttribute("data-parity",n%2===0?"even":"odd"),s.setAttribute("id",this.view.getElementID(n));const r=this.setAccessibilityAttributes(s,e.node.element,t,i),a=this.treeDelegate.getTemplateId(e.node),c=this.treeRenderers.find(f=>f.templateId===a);if(!c)throw new Error(`No renderer found for template id ${a}`);let h=e.node;h===this.tree.getNode(this.tree.getNodeLocation(e.node))&&(h=new Proxy(e.node,{}));const d=c.renderTemplate(s);c.renderElement(h,e.startIndex,d,{height:e.height});const u=l.toDisposable(()=>{r.dispose(),c.disposeElement(h,e.startIndex,d,{height:e.height}),c.disposeTemplate(d),s.remove()});return{element:s,disposable:u}}setAccessibilityAttributes(e,t,i,n){if(!this.accessibilityProvider)return l.Disposable.None;this.accessibilityProvider.getSetSize&&e.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(t,i,n))),this.accessibilityProvider.getPosInSet&&e.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(t,i))),this.accessibilityProvider.getRole&&e.setAttribute("role",this.accessibilityProvider.getRole(t)??"treeitem");const s=this.accessibilityProvider.getAriaLabel(t),r=s&&typeof s!="string"?s:Zr(s),a=he(h=>{const d=h.readObservable(r);d?e.setAttribute("aria-label",d):e.removeAttribute("aria-label")});typeof s=="string"||s&&e.setAttribute("aria-label",s.get());const c=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(t);return typeof c=="number"&&e.setAttribute("aria-level",`${c}`),e.setAttribute("aria-selected",String(!1)),a}setVisible(e){this._rootDomNode.classList.toggle("empty",!e),e||this.stickyScrollFocus.updateElements([],void 0)}domFocus(){this.stickyScrollFocus.domFocus()}focusedLast(){return this.stickyScrollFocus.focusedLast()}dispose(){this.stickyScrollFocus.dispose(),this._previousStateDisposables.dispose(),this._rootDomNode.remove()}}class AY extends l.Disposable{get domHasFocus(){return this._domHasFocus}set domHasFocus(e){e!==this._domHasFocus&&(this._onDidChangeHasFocus.fire(e),this._domHasFocus=e)}constructor(e,t){super(),this.container=e,this.view=t,this.focusedIndex=-1,this.elements=[],this._onDidChangeHasFocus=this._register(new l.Emitter),this.onDidChangeHasFocus=this._onDidChangeHasFocus.event,this._onContextMenu=this._register(new l.Emitter),this.onContextMenu=this._onContextMenu.event,this._domHasFocus=!1,this._register(R(this.container,"focus",()=>this.onFocus())),this._register(R(this.container,"blur",()=>this.onBlur())),this._register(this.view.onDidFocus(()=>this.toggleStickyScrollFocused(!1))),this._register(this.view.onKeyDown(i=>this.onKeyDown(i))),this._register(this.view.onMouseDown(i=>this.onMouseDown(i))),this._register(this.view.onContextMenu(i=>this.handleContextMenu(i)))}handleContextMenu(e){const t=e.browserEvent.target;if(!qu(t)&&!ju(t)){this.focusedLast()&&this.view.domFocus();return}if(!so(e.browserEvent)){if(!this.state)throw new Error("Context menu should not be triggered when state is undefined");const r=this.state.stickyNodes.findIndex(a=>a.node.element===e.element?.element);if(r===-1)throw new Error("Context menu should not be triggered when element is not in sticky scroll widget");this.container.focus(),this.setFocus(r);return}if(!this.state||this.focusedIndex<0)throw new Error("Context menu key should not be triggered when focus is not in sticky scroll widget");const n=this.state.stickyNodes[this.focusedIndex].node.element,s=this.elements[this.focusedIndex];this._onContextMenu.fire({element:n,anchor:s,browserEvent:e.browserEvent,isStickyScroll:!0})}onKeyDown(e){if(this.domHasFocus&&this.state){if(e.key==="ArrowUp")this.setFocusedElement(Math.max(0,this.focusedIndex-1)),e.preventDefault(),e.stopPropagation();else if(e.key==="ArrowDown"||e.key==="ArrowRight"){if(this.focusedIndex>=this.state.count-1){const t=this.state.stickyNodes[this.state.count-1].startIndex+1;this.view.domFocus(),this.view.setFocus([t]),this.scrollNodeUnderWidget(t,this.state)}else this.setFocusedElement(this.focusedIndex+1);e.preventDefault(),e.stopPropagation()}}}onMouseDown(e){const t=e.browserEvent.target;!qu(t)&&!ju(t)||(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation())}updateElements(e,t){if(t&&t.count===0)throw new Error("Sticky scroll state must be undefined when there are no sticky nodes");if(t&&t.count!==e.length)throw new Error("Sticky scroll focus received illigel state");const i=this.focusedIndex;if(this.removeFocus(),this.elements=e,this.state=t,t){const n=wi(i,0,t.count-1);this.setFocus(n)}else this.domHasFocus&&this.view.domFocus();this.container.tabIndex=t?0:-1}setFocusedElement(e){const t=this.state;if(!t)throw new Error("Cannot set focus when state is undefined");if(this.setFocus(e),!(e1?t.stickyNodes[t.count-2]:void 0,s=this.view.getElementTop(e),r=n?n.position+n.height+i.height:i.height;this.view.scrollTop=s-r}domFocus(){if(!this.state)throw new Error("Cannot focus when state is undefined");this.container.focus()}focusedLast(){return this.state?this.view.getHTMLElement().classList.contains("sticky-scroll-focused"):!1}removeFocus(){this.focusedIndex!==-1&&(this.toggleElementFocus(this.elements[this.focusedIndex],!1),this.focusedIndex=-1)}setFocus(e){if(0>e)throw new Error("addFocus() can not remove focus");if(!this.state&&e>=0)throw new Error("Cannot set focus index when state is undefined");if(this.state&&e>=this.state.count)throw new Error("Cannot set focus index to an index that does not exist");const t=this.focusedIndex;t>=0&&this.toggleElementFocus(this.elements[t],!1),e>=0&&this.toggleElementFocus(this.elements[e],!0),this.focusedIndex=e}toggleElementFocus(e,t){this.toggleElementActiveFocus(e,t&&this.domHasFocus),this.toggleElementPassiveFocus(e,t)}toggleCurrentElementActiveFocus(e){this.focusedIndex!==-1&&this.toggleElementActiveFocus(this.elements[this.focusedIndex],e)}toggleElementActiveFocus(e,t){e.classList.toggle("focused",t)}toggleElementPassiveFocus(e,t){e.classList.toggle("passive-focused",t)}toggleStickyScrollFocused(e){this.view.getHTMLElement().classList.toggle("sticky-scroll-focused",e)}onFocus(){if(!this.state||this.elements.length===0)throw new Error("Cannot focus when state is undefined or elements are empty");this.domHasFocus=!0,this.toggleStickyScrollFocused(!0),this.toggleCurrentElementActiveFocus(!0),this.focusedIndex===-1&&this.setFocus(0)}onBlur(){this.domHasFocus=!1,this.toggleCurrentElementActiveFocus(!1)}dispose(){this.toggleStickyScrollFocused(!1),this._onDidChangeHasFocus.fire(!1),super.dispose()}}function Qp(o){let e=il.Unknown;return aC(o.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?e=il.Twistie:aC(o.browserEvent.target,"monaco-tl-contents","monaco-tl-row")?e=il.Element:aC(o.browserEvent.target,"monaco-tree-type-filter","monaco-list")&&(e=il.Filter),{browserEvent:o.browserEvent,element:o.element?o.element.element:null,target:e}}function OY(o){const e=qu(o.browserEvent.target);return{element:o.element?o.element.element:null,browserEvent:o.browserEvent,anchor:o.anchor,isStickyScroll:e}}function Xp(o,e){e(o),o.children.forEach(t=>Xp(t,e))}class lL{get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}constructor(e,t){this.getFirstViewElementWithTrait=e,this.identityProvider=t,this.nodes=[],this._onDidChange=new l.Emitter,this.onDidChange=this._onDidChange.event}set(e,t){!t?.__forceEvent&&l.equals(this.nodes,e)||this._set(e,!1,t)}_set(e,t,i){if(this.nodes=[...e],this.elements=void 0,this._nodeSet=void 0,!t){const n=this;this._onDidChange.fire({get elements(){return n.get()},browserEvent:i})}}get(){return this.elements||(this.elements=this.nodes.map(e=>e.element)),[...this.elements]}getNodes(){return this.nodes}has(e){return this.nodeSet.has(e)}onDidModelSplice({insertedNodes:e,deletedNodes:t}){if(!this.identityProvider){const c=this.createNodeSet(),h=d=>c.delete(d);t.forEach(d=>Xp(d,h)),this.set([...c.values()]);return}const i=new Set,n=c=>i.add(this.identityProvider.getId(c.element).toString());t.forEach(c=>Xp(c,n));const s=new Map,r=c=>s.set(this.identityProvider.getId(c.element).toString(),c);e.forEach(c=>Xp(c,r));const a=[];for(const c of this.nodes){const h=this.identityProvider.getId(c.element).toString();if(!i.has(h))a.push(c);else{const u=s.get(h);u&&u.visible&&a.push(u)}}if(this.nodes.length>0&&a.length===0){const c=this.getFirstViewElementWithTrait();c&&a.push(c)}this._set(a,!0)}createNodeSet(){const e=new Set;for(const t of this.nodes)e.add(t);return e}}class PY extends uM{constructor(e,t,i){super(e),this.tree=t,this.stickyScrollProvider=i}onViewPointer(e){if(aM(e.browserEvent.target)||jn(e.browserEvent.target)||Gu(e.browserEvent.target)||e.browserEvent.isHandledByList)return;const t=e.element;if(!t)return super.onViewPointer(e);if(this.isSelectionRangeChangeEvent(e)||this.isSelectionSingleChangeEvent(e))return super.onViewPointer(e);const i=e.browserEvent.target,n=i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&e.browserEvent.offsetX<16,s=ju(e.browserEvent.target);let r=!1;if(s?r=!0:typeof this.tree.expandOnlyOnTwistieClick=="function"?r=this.tree.expandOnlyOnTwistieClick(t.element):r=!!this.tree.expandOnlyOnTwistieClick,s)this.handleStickyScrollMouseEvent(e,t);else{if(r&&!n&&e.browserEvent.detail!==2)return super.onViewPointer(e);if(!this.tree.expandOnDoubleClick&&e.browserEvent.detail===2)return super.onViewPointer(e)}if(t.collapsible&&(!s||n)){const a=this.tree.getNodeLocation(t),c=e.browserEvent.altKey;if(this.tree.setFocus([a]),this.tree.toggleCollapsed(a,c),n){e.browserEvent.isHandledByList=!0;return}}s||super.onViewPointer(e)}handleStickyScrollMouseEvent(e,t){if(K9(e.browserEvent.target)||G9(e.browserEvent.target))return;const i=this.stickyScrollProvider();if(!i)throw new Error("Sticky scroll controller not found");const n=this.list.indexOf(t),s=this.list.getElementTop(n),r=i.nodePositionTopBelowWidget(t);this.tree.scrollTop=s-r,this.list.domFocus(),this.list.setFocus([n]),this.list.setSelection([n])}onDoubleClick(e){e.browserEvent.target.classList.contains("monaco-tl-twistie")||!this.tree.expandOnDoubleClick||e.browserEvent.isHandledByList||super.onDoubleClick(e)}onMouseDown(e){const t=e.browserEvent.target;if(!qu(t)&&!ju(t)){super.onMouseDown(e);return}}onContextMenu(e){const t=e.browserEvent.target;if(!qu(t)&&!ju(t)){super.onContextMenu(e);return}}}class kY extends zn{constructor(e,t,i,n,s,r,a,c){super(e,t,i,n,c),this.focusTrait=s,this.selectionTrait=r,this.anchorTrait=a}createMouseController(e){return new PY(this,e.tree,e.stickyScrollProvider)}splice(e,t,i=[]){if(super.splice(e,t,i),i.length===0)return;const n=[],s=[];let r;i.forEach((a,c)=>{this.focusTrait.has(a)&&n.push(e+c),this.selectionTrait.has(a)&&s.push(e+c),this.anchorTrait.has(a)&&(r=e+c)}),n.length>0&&super.setFocus(l.distinct([...super.getFocus(),...n])),s.length>0&&super.setSelection(l.distinct([...super.getSelection(),...s])),typeof r=="number"&&super.setAnchor(r)}setFocus(e,t,i=!1){super.setFocus(e,t),i||this.focusTrait.set(e.map(n=>this.element(n)),t)}setSelection(e,t,i=!1){super.setSelection(e,t),i||this.selectionTrait.set(e.map(n=>this.element(n)),t)}setAnchor(e,t=!1){super.setAnchor(e),t||(typeof e>"u"?this.anchorTrait.set([]):this.anchorTrait.set([this.element(e)]))}}class QM{get onDidScroll(){return this.view.onDidScroll}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return l.Event.filter(l.Event.map(this.view.onMouseDblClick,Qp),e=>e.target!==il.Filter)}get onMouseOver(){return l.Event.map(this.view.onMouseOver,Qp)}get onMouseOut(){return l.Event.map(this.view.onMouseOut,Qp)}get onContextMenu(){return l.Event.any(l.Event.filter(l.Event.map(this.view.onContextMenu,OY),e=>!e.isStickyScroll),this.stickyScrollController?.onContextMenu??l.Event.None)}get onPointer(){return l.Event.map(this.view.onPointer,Qp)}get onDidFocus(){return this.view.onDidFocus}get onDidChangeModel(){return l.Event.any(this.onDidChangeModelRelay.event,this.onDidSwapModel.event)}get onDidChangeCollapseState(){return this.onDidChangeCollapseStateRelay.event}get expandOnDoubleClick(){return typeof this._options.expandOnDoubleClick>"u"?!0:this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return typeof this._options.expandOnlyOnTwistieClick>"u"?!0:this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}constructor(e,t,i,n,s={}){this._user=e,this._options=s,this.eventBufferer=new l.EventBufferer,this.onDidChangeFindOpenState=l.Event.None,this.onDidChangeStickyScrollFocused=l.Event.None,this.disposables=new l.DisposableStore,this.onDidSwapModel=this.disposables.add(new l.Emitter),this.onDidChangeModelRelay=this.disposables.add(new l.Relay),this.onDidSpliceModelRelay=this.disposables.add(new l.Relay),this.onDidChangeCollapseStateRelay=this.disposables.add(new l.Relay),this.onDidChangeRenderNodeCountRelay=this.disposables.add(new l.Relay),this.onDidChangeActiveNodesRelay=this.disposables.add(new l.Relay),this._onWillRefilter=new l.Emitter,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new l.Emitter,this.modelDisposables=new l.DisposableStore,s.keyboardNavigationLabelProvider&&(s.findWidgetEnabled??!0)&&(this.findFilter=new jM(s.keyboardNavigationLabelProvider,s.filter,s.defaultFindVisibility),s={...s,filter:this.findFilter},this.disposables.add(this.findFilter)),this.model=this.createModel(e,s),this.treeDelegate=new rL(i);const r=this.disposables.add(new DY(this.onDidChangeActiveNodesRelay.event)),a=new l.SetMap;this.renderers=n.map(c=>new aL(c,this.model,this.onDidChangeCollapseStateRelay.event,r,a,s));for(const c of this.renderers)this.disposables.add(c);if(this.focus=new lL(()=>this.view.getFocusedElements()[0],s.identityProvider),this.selection=new lL(()=>this.view.getSelectedElements()[0],s.identityProvider),this.anchor=new lL(()=>this.view.getAnchorElement(),s.identityProvider),this.view=new kY(e,t,this.treeDelegate,this.renderers,this.focus,this.selection,this.anchor,{...LY(()=>this.model,this.disposables,s),tree:this,stickyScrollProvider:()=>this.stickyScrollController}),this.setupModel(this.model),s.keyboardSupport!==!1){const c=l.Event.chain(this.view.onKeyDown,h=>h.filter(d=>!jn(d.target)).map(d=>new Be(d)));l.Event.chain(c,h=>h.filter(d=>d.keyCode===15))(this.onLeftArrow,this,this.disposables),l.Event.chain(c,h=>h.filter(d=>d.keyCode===17))(this.onRightArrow,this,this.disposables),l.Event.chain(c,h=>h.filter(d=>d.keyCode===10))(this.onSpace,this,this.disposables)}if((s.findWidgetEnabled??!0)&&s.keyboardNavigationLabelProvider&&s.contextViewProvider){const c={styles:s.findWidgetStyles,defaultFindMode:s.defaultFindMode,defaultFindMatchType:s.defaultFindMatchType,showNotFoundMessage:s.showNotFoundMessage,findWidgetContainer:s.findWidgetContainer};this.findController=this.disposables.add(new qM(this,this.findFilter,s.contextViewProvider,c)),this.focusNavigationFilter=h=>this.findController.shouldAllowFocus(h),this.onDidChangeFindOpenState=this.findController.onDidChangeOpenState,this.onDidChangeFindMode=this.findController.onDidChangeMode,this.onDidChangeFindMatchType=this.findController.onDidChangeMatchType}else this.onDidChangeFindMode=l.Event.None,this.onDidChangeFindMatchType=l.Event.None;s.enableStickyScroll&&(this.stickyScrollController=new ZM(this,this.model,this.view,this.renderers,this.treeDelegate,s),this.onDidChangeStickyScrollFocused=this.stickyScrollController.onDidChangeHasFocus),this.styleElement=bn(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===sl.Always)}updateOptions(e={}){this._options={...this._options,...e};for(const t of this.renderers)t.updateOptions(e);this.view.updateOptions(e),this.findController?.updateOptions(e),this.updateStickyScroll(e),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===sl.Always)}get options(){return this._options}updateStickyScroll(e){!this.stickyScrollController&&this._options.enableStickyScroll?(this.stickyScrollController=new ZM(this,this.model,this.view,this.renderers,this.treeDelegate,this._options),this.onDidChangeStickyScrollFocused=this.stickyScrollController.onDidChangeHasFocus):this.stickyScrollController&&!this._options.enableStickyScroll&&(this.onDidChangeStickyScrollFocused=l.Event.None,this.stickyScrollController.dispose(),this.stickyScrollController=void 0),this.stickyScrollController?.updateOptions(e)}getHTMLElement(){return this.view.getHTMLElement()}get onDidChangeContentHeight(){return this.view.onDidChangeContentHeight}get scrollTop(){return this.view.scrollTop}set scrollTop(e){this.view.scrollTop=e}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get ariaLabel(){return this.view.ariaLabel}set ariaLabel(e){this.view.ariaLabel=e}domFocus(){this.stickyScrollController?.focusedLast()?this.stickyScrollController.domFocus():this.view.domFocus()}isDOMFocused(){return sd(this.getHTMLElement())}layout(e,t){this.view.layout(e,t)}style(e){const t=`.${this.view.domId}`,i=[];e.treeIndentGuidesStroke&&(i.push(`.monaco-list${t}:hover .monaco-tl-indent > .indent-guide, .monaco-list${t}.always .monaco-tl-indent > .indent-guide { opacity: 1; border-color: ${e.treeInactiveIndentGuidesStroke}; }`),i.push(`.monaco-list${t} .monaco-tl-indent > .indent-guide.active { opacity: 1; border-color: ${e.treeIndentGuidesStroke}; }`));const n=e.treeStickyScrollBackground??e.listBackground;n&&(i.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container { background-color: ${n}; }`),i.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-row { background-color: ${n}; }`)),e.treeStickyScrollBorder&&i.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container { border-bottom: 1px solid ${e.treeStickyScrollBorder}; }`),e.treeStickyScrollShadow&&i.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-container-shadow { box-shadow: ${e.treeStickyScrollShadow} 0 6px 6px -6px inset; height: 3px; }`),e.listFocusForeground&&(i.push(`.monaco-list${t}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),i.push(`.monaco-list${t}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused { color: inherit; }`));const s=Eo(e.listFocusAndSelectionOutline,Eo(e.listSelectionOutline,e.listFocusOutline??""));s&&(i.push(`.monaco-list${t}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused.selected { outline: 1px solid ${s}; outline-offset: -1px;}`),i.push(`.monaco-list${t}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused.selected { outline: inherit;}`)),e.listFocusOutline&&(i.push(`.monaco-list${t}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }`),i.push(`.monaco-list${t}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused { outline: inherit; }`),i.push(`.context-menu-visible .monaco-list${t}.last-focused.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.passive-focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }`),i.push(`.context-menu-visible .monaco-list${t}.last-focused.sticky-scroll-focused .monaco-list-rows .monaco-list-row.focused { outline: inherit; }`),i.push(`.context-menu-visible .monaco-list${t}.last-focused:not(.sticky-scroll-focused) .monaco-tree-sticky-container .monaco-list-rows .monaco-list-row.focused { outline: inherit; }`)),this.styleElement.textContent=i.join(` +`),this.view.style(e)}getParentElement(e){const t=this.model.getParentNodeLocation(e);return this.model.getNode(t).element}getFirstElementChild(e){return this.model.getFirstElementChild(e)}getNode(e){return this.model.getNode(e)}getNodeLocation(e){return this.model.getNodeLocation(e)}collapse(e,t=!1){return this.model.setCollapsed(e,!0,t)}expand(e,t=!1){return this.model.setCollapsed(e,!1,t)}toggleCollapsed(e,t=!1){return this.model.setCollapsed(e,void 0,t)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(e,t){this.eventBufferer.bufferEvents(()=>{const i=e.map(s=>this.model.getNode(s));this.selection.set(i,t);const n=e.map(s=>this.model.getListIndex(s)).filter(s=>s>-1);this.view.setSelection(n,t,!0)})}getSelection(){return this.selection.get()}setFocus(e,t){this.eventBufferer.bufferEvents(()=>{const i=e.map(s=>this.model.getNode(s));this.focus.set(i,t);const n=e.map(s=>this.model.getListIndex(s)).filter(s=>s>-1);this.view.setFocus(n,t,!0)})}focusNext(e=1,t=!1,i,n=so(i)&&i.altKey?void 0:this.focusNavigationFilter){this.view.focusNext(e,t,i,n)}focusPrevious(e=1,t=!1,i,n=so(i)&&i.altKey?void 0:this.focusNavigationFilter){this.view.focusPrevious(e,t,i,n)}focusNextPage(e,t=so(e)&&e.altKey?void 0:this.focusNavigationFilter){return this.view.focusNextPage(e,t)}focusPreviousPage(e,t=so(e)&&e.altKey?void 0:this.focusNavigationFilter){return this.view.focusPreviousPage(e,t,()=>this.stickyScrollController?.height??0)}focusLast(e,t=so(e)&&e.altKey?void 0:this.focusNavigationFilter){this.view.focusLast(e,t)}focusFirst(e,t=so(e)&&e.altKey?void 0:this.focusNavigationFilter){this.view.focusFirst(e,t)}getFocus(){return this.focus.get()}reveal(e,t){this.model.expandTo(e);const i=this.model.getListIndex(e);if(i!==-1)if(!this.stickyScrollController)this.view.reveal(i,t);else{const n=this.stickyScrollController.nodePositionTopBelowWidget(this.getNode(e));this.view.reveal(i,t,n)}}onLeftArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(t.length===0)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!0)){const r=this.model.getParentNodeLocation(n);if(!r)return;const a=this.model.getListIndex(r);this.view.reveal(a),this.view.setFocus([a])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(t.length===0)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!1)){if(!i.children.some(c=>c.visible))return;const[r]=this.view.getFocus(),a=r+1;this.view.reveal(a),this.view.setFocus([a])}}onSpace(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(t.length===0)return;const i=t[0],n=this.model.getNodeLocation(i),s=e.browserEvent.altKey;this.model.setCollapsed(n,void 0,s)}setupModel(e){this.modelDisposables.clear(),this.modelDisposables.add(e.onDidSpliceRenderedNodes(({start:s,deleteCount:r,elements:a})=>this.view.splice(s,r,a)));const t=l.Event.forEach(e.onDidSpliceModel,s=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice(s),this.selection.onDidModelSplice(s)})},this.modelDisposables);t(()=>null,null,this.modelDisposables);const i=this.modelDisposables.add(new l.Emitter),n=this.modelDisposables.add(new l.Delayer(0));this.modelDisposables.add(l.Event.any(t,this.focus.onDidChange,this.selection.onDidChange)(()=>{n.trigger(()=>{const s=new Set;for(const r of this.focus.getNodes())s.add(r);for(const r of this.selection.getNodes())s.add(r);i.fire([...s.values()])})})),this.onDidChangeActiveNodesRelay.input=i.event,this.onDidChangeModelRelay.input=l.Event.signal(e.onDidSpliceModel),this.onDidChangeCollapseStateRelay.input=e.onDidChangeCollapseState,this.onDidChangeRenderNodeCountRelay.input=e.onDidChangeRenderNodeCount,this.onDidSpliceModelRelay.input=e.onDidSpliceModel,l.isMacintosh&&this.modelDisposables.add(e.onDidChangeCollapseState(s=>{const{node:r,deep:a}=s;r.collapsible&&!a&&this.isDOMFocused()&&ha(r.collapsed?l.localize(30,"collapsed"):l.localize(31,"expanded"))}))}dispose(){l.dispose(this.disposables),this.stickyScrollController?.dispose(),this.view.dispose(),this.modelDisposables.dispose()}}class cL{constructor(e,t={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new wY(e,null,t),this.onDidSpliceModel=this.model.onDidSpliceModel,this.onDidSpliceRenderedNodes=this.model.onDidSpliceRenderedNodes,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,t.sorter&&(this.sorter={compare(i,n){return t.sorter.compare(i.element,n.element)}}),this.identityProvider=t.identityProvider}setChildren(e,t=l.Iterable.empty(),i={}){const n=this.getElementLocation(e);this._setChildren(n,this.preserveCollapseState(t),i)}_setChildren(e,t=l.Iterable.empty(),i){const n=new Set,s=new Set,r=c=>{if(c.element===null)return;const h=c;if(n.add(h.element),this.nodes.set(h.element,h),this.identityProvider){const d=this.identityProvider.getId(h.element).toString();s.add(d),this.nodesByIdentity.set(d,h)}i.onDidCreateNode?.(h)},a=c=>{if(c.element===null)return;const h=c;if(n.has(h.element)||this.nodes.delete(h.element),this.identityProvider){const d=this.identityProvider.getId(h.element).toString();s.has(d)||this.nodesByIdentity.delete(d)}i.onDidDeleteNode?.(h)};this.model.splice([...e,0],Number.MAX_VALUE,t,{...i,onDidCreateNode:r,onDidDeleteNode:a})}preserveCollapseState(e=l.Iterable.empty()){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),l.Iterable.map(e,t=>{let i=this.nodes.get(t.element);if(!i&&this.identityProvider){const r=this.identityProvider.getId(t.element).toString();i=this.nodesByIdentity.get(r)}if(!i){let r;return typeof t.collapsed>"u"?r=void 0:t.collapsed===ki.Collapsed||t.collapsed===ki.PreserveOrCollapsed?r=!0:t.collapsed===ki.Expanded||t.collapsed===ki.PreserveOrExpanded?r=!1:r=!!t.collapsed,{...t,children:this.preserveCollapseState(t.children),collapsed:r}}const n=typeof t.collapsible=="boolean"?t.collapsible:i.collapsible;let s;return typeof t.collapsed>"u"||t.collapsed===ki.PreserveOrCollapsed||t.collapsed===ki.PreserveOrExpanded?s=i.collapsed:t.collapsed===ki.Collapsed?s=!0:t.collapsed===ki.Expanded?s=!1:s=!!t.collapsed,{...t,collapsible:n,collapsed:s,children:this.preserveCollapseState(t.children)}})}rerender(e){const t=this.getElementLocation(e);this.model.rerender(t)}resort(e=null,t=!0){if(!this.sorter)return;const i=this.getElementLocation(e),n=this.model.getNode(i);this._setChildren(i,this.resortChildren(n,t),{})}resortChildren(e,t,i=!0){let n=[...e.children];return(t||i)&&(n=n.sort(this.sorter.compare.bind(this.sorter))),l.Iterable.map(n,s=>({element:s.element,collapsible:s.collapsible,collapsed:s.collapsed,children:this.resortChildren(s,t,!1)}))}getFirstElementChild(e=null){const t=this.getElementLocation(e);return this.model.getFirstElementChild(t)}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getElementLocation(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getElementLocation(e);return this.model.getListRenderCount(t)}isCollapsible(e){const t=this.getElementLocation(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const i=this.getElementLocation(e);return this.model.setCollapsible(i,t)}isCollapsed(e){const t=this.getElementLocation(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){const n=this.getElementLocation(e);return this.model.setCollapsed(n,t,i)}expandTo(e){const t=this.getElementLocation(e);this.model.expandTo(t)}refilter(){this.model.refilter()}getNode(e=null){if(e===null)return this.model.getNode(this.model.rootRef);const t=this.nodes.get(e);if(!t)throw new rn(this.user,`Tree element not found: ${e}`);return t}getNodeLocation(e){return e.element}getParentNodeLocation(e){if(e===null)throw new rn(this.user,"Invalid getParentNodeLocation call");const t=this.nodes.get(e);if(!t)throw new rn(this.user,`Tree element not found: ${e}`);const i=this.model.getNodeLocation(t),n=this.model.getParentNodeLocation(i);return this.model.getNode(n).element}getElementLocation(e){if(e===null)return[];const t=this.nodes.get(e);if(!t)throw new rn(this.user,`Tree element not found: ${e}`);return this.model.getNodeLocation(t)}}function Jp(o){const e=[o.element],t=o.incompressible||!1;return{element:{elements:e,incompressible:t},children:l.Iterable.map(l.Iterable.from(o.children),Jp),collapsible:o.collapsible,collapsed:o.collapsed}}function Wp(o){const e=[o.element],t=o.incompressible||!1;let i,n;for(;[n,i]=l.Iterable.consume(l.Iterable.from(o.children),2),!(n.length!==1||n[0].incompressible);)o=n[0],e.push(o.element);return{element:{elements:e,incompressible:t},children:l.Iterable.map(l.Iterable.concat(n,i),Wp),collapsible:o.collapsible,collapsed:o.collapsed}}function hL(o,e=0){let t;return ehL(i,0)),e===0&&o.element.incompressible?{element:o.element.elements[e],children:t,incompressible:!0,collapsible:o.collapsible,collapsed:o.collapsed}:{element:o.element.elements[e],children:t,collapsible:o.collapsible,collapsed:o.collapsed}}function XM(o){return hL(o,0)}function JM(o,e,t){return o.element===e?{...o,children:t}:{...o,children:l.Iterable.map(l.Iterable.from(o.children),i=>JM(i,e,t))}}const FY=o=>({getId(e){return e.elements.map(t=>o.getId(t).toString()).join("\0")},getGroupId:o.getGroupId?e=>o.getGroupId(e.elements[e.elements.length-1]):void 0});class BY{get onDidSpliceRenderedNodes(){return this.model.onDidSpliceRenderedNodes}get onDidSpliceModel(){return this.model.onDidSpliceModel}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}constructor(e,t={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.model=new cL(e,t),this.enabled=typeof t.compressionEnabled>"u"?!0:t.compressionEnabled,this.identityProvider=t.identityProvider}setChildren(e,t=l.Iterable.empty(),i){const n=i.diffIdentityProvider&&FY(i.diffIdentityProvider);if(e===null){const m=l.Iterable.map(t,this.enabled?Wp:Jp);this._setChildren(null,m,{diffIdentityProvider:n,diffDepth:1/0});return}const s=this.nodes.get(e);if(!s)throw new rn(this.user,"Unknown compressed tree node");const r=this.model.getNode(s),a=this.model.getParentNodeLocation(s),c=this.model.getNode(a),h=XM(r),d=JM(h,e,t),u=(this.enabled?Wp:Jp)(d),f=i.diffIdentityProvider?((m,p)=>i.diffIdentityProvider.getId(m)===i.diffIdentityProvider.getId(p)):void 0;if(l.equals(u.element.elements,r.element.elements,f)){this._setChildren(s,u.children||l.Iterable.empty(),{diffIdentityProvider:n,diffDepth:1});return}const g=c.children.map(m=>m===r?u:m);this._setChildren(c.element,g,{diffIdentityProvider:n,diffDepth:r.depth-c.depth})}isCompressionEnabled(){return this.enabled}setCompressionEnabled(e){if(e===this.enabled)return;this.enabled=e;const i=this.model.getNode().children,n=l.Iterable.map(i,XM),s=l.Iterable.map(n,e?Wp:Jp);this._setChildren(null,s,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(e,t,i){const n=new Set,s=a=>{for(const c of a.element.elements)n.add(c),this.nodes.set(c,a.element)},r=a=>{for(const c of a.element.elements)n.has(c)||this.nodes.delete(c)};this.model.setChildren(e,t,{...i,onDidCreateNode:s,onDidDeleteNode:r})}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getCompressedNode(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getCompressedNode(e);return this.model.getListRenderCount(t)}getNode(e){if(typeof e>"u")return this.model.getNode();const t=this.getCompressedNode(e);return this.model.getNode(t)}getNodeLocation(e){const t=this.model.getNodeLocation(e);return t===null?null:t.elements[t.elements.length-1]}getParentNodeLocation(e){const t=this.getCompressedNode(e),i=this.model.getParentNodeLocation(t);return i===null?null:i.elements[i.elements.length-1]}getFirstElementChild(e){const t=this.getCompressedNode(e);return this.model.getFirstElementChild(t)}isCollapsible(e){const t=this.getCompressedNode(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const i=this.getCompressedNode(e);return this.model.setCollapsible(i,t)}isCollapsed(e){const t=this.getCompressedNode(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){const n=this.getCompressedNode(e);return this.model.setCollapsed(n,t,i)}expandTo(e){const t=this.getCompressedNode(e);this.model.expandTo(t)}rerender(e){const t=this.getCompressedNode(e);this.model.rerender(t)}refilter(){this.model.refilter()}resort(e=null,t=!0){const i=this.getCompressedNode(e);this.model.resort(i,t)}getCompressedNode(e){if(e===null)return null;const t=this.nodes.get(e);if(!t)throw new rn(this.user,`Tree element not found: ${e}`);return t}}const zY=o=>o[o.length-1];class dL{get element(){return this.node.element===null?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map(e=>new dL(this.unwrapper,e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e,t){this.unwrapper=e,this.node=t}}function VY(o,e){return{...e,identityProvider:e.identityProvider&&{getId(t){return e.identityProvider.getId(o(t))},getGroupId:e.identityProvider.getGroupId?t=>e.identityProvider.getGroupId(o(t)):void 0},sorter:e.sorter&&{compare(t,i){return e.sorter.compare(t.elements[0],i.elements[0])}},filter:e.filter&&{filter(t,i){const n=t.elements;for(let s=0;s({insertedNodes:e.map(i=>this.nodeMapper.map(i)),deletedNodes:t.map(i=>this.nodeMapper.map(i))}))}get onDidSpliceRenderedNodes(){return l.Event.map(this.model.onDidSpliceRenderedNodes,({start:e,deleteCount:t,elements:i})=>({start:e,deleteCount:t,elements:i.map(n=>this.nodeMapper.map(n))}))}get onDidChangeCollapseState(){return l.Event.map(this.model.onDidChangeCollapseState,({node:e,deep:t})=>({node:this.nodeMapper.map(e),deep:t}))}get onDidChangeRenderNodeCount(){return l.Event.map(this.model.onDidChangeRenderNodeCount,e=>this.nodeMapper.map(e))}constructor(e,t={}){this.rootRef=null,this.elementMapper=t.elementMapper||zY;const i=n=>this.elementMapper(n.elements);this.nodeMapper=new nL(n=>new dL(i,n)),this.model=new BY(e,VY(i,t))}setChildren(e,t=l.Iterable.empty(),i={}){this.model.setChildren(e,t,i)}isCompressionEnabled(){return this.model.isCompressionEnabled()}setCompressionEnabled(e){this.model.setCompressionEnabled(e)}has(e){return this.model.has(e)}getListIndex(e){return this.model.getListIndex(e)}getListRenderCount(e){return this.model.getListRenderCount(e)}getNode(e){return this.nodeMapper.map(this.model.getNode(e))}getNodeLocation(e){return e.element}getParentNodeLocation(e){return this.model.getParentNodeLocation(e)}getFirstElementChild(e){const t=this.model.getFirstElementChild(e);return t===null||typeof t>"u"?t:this.elementMapper(t.elements)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}setCollapsed(e,t,i){return this.model.setCollapsed(e,t,i)}expandTo(e){return this.model.expandTo(e)}rerender(e){return this.model.rerender(e)}refilter(){return this.model.refilter()}resort(e=null,t=!0){return this.model.resort(e,t)}getCompressedTreeNode(e=null){return this.model.getNode(e)}}var $Y=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s};class uL extends QM{get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}constructor(e,t,i,n,s={}){super(e,t,i,n,s),this.user=e}setChildren(e,t=l.Iterable.empty(),i){this.model.setChildren(e,t,i)}rerender(e){if(e===void 0){this.view.rerender();return}this.model.rerender(e)}resort(e,t=!0){this.model.resort(e,t)}hasElement(e){return this.model.has(e)}createModel(e,t){return new cL(e,t)}}class WM{get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}constructor(e,t,i){this._compressedTreeNodeProvider=e,this.stickyScrollDelegate=t,this.renderer=i,this.templateId=i.templateId,i.onDidChangeTwistieState&&(this.onDidChangeTwistieState=i.onDidChangeTwistieState)}renderTemplate(e){return{compressedTreeNode:void 0,data:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){let s=this.stickyScrollDelegate.getCompressedNode(e);s||(s=this.compressedTreeNodeProvider.getCompressedTreeNode(e.element)),s.element.elements.length===1?(i.compressedTreeNode=void 0,this.renderer.renderElement(e,t,i.data,n)):(i.compressedTreeNode=s,this.renderer.renderCompressedElements(s,t,i.data,n))}disposeElement(e,t,i,n){i.compressedTreeNode?this.renderer.disposeCompressedElements?.(i.compressedTreeNode,t,i.data,n):this.renderer.disposeElement?.(e,t,i.data,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.data)}renderTwistie(e,t){return this.renderer.renderTwistie?.(e,t)??!1}}$Y([et],WM.prototype,"compressedTreeNodeProvider",null);class KY{constructor(e){this.modelProvider=e,this.compressedStickyNodes=new Map}getCompressedNode(e){return this.compressedStickyNodes.get(e)}constrainStickyScrollNodes(e,t,i){if(this.compressedStickyNodes.clear(),e.length===0)return[];for(let n=0;ni||n>=t-1&&tthis,a=new KY(()=>this.model),c=n.map(h=>new WM(r,a,h));super(e,t,i,c,{...GY(r,s),stickyScrollDelegate:a})}setChildren(e,t=l.Iterable.empty(),i){this.model.setChildren(e,t,i)}createModel(e,t){return new UY(e,t)}updateOptions(e={}){super.updateOptions(e),typeof e.compressionEnabled<"u"&&this.model.setCompressionEnabled(e.compressionEnabled)}getCompressedTreeNode(e=null){return this.model.getCompressedTreeNode(e)}}function fL(o){return{...o,children:[],refreshPromise:void 0,stale:!0,slow:!1,forceExpanded:!1}}function gL(o,e){return e.parent?e.parent===o?!0:gL(o,e.parent):!1}function jY(o,e){return o===e||gL(o,e)||gL(e,o)}class mL{get element(){return this.node.element.element}get children(){return this.node.children.map(e=>new mL(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e){this.node=e}}class qY{constructor(e,t,i){this.renderer=e,this.nodeMapper=t,this.onDidChangeTwistieState=i,this.renderedNodes=new Map,this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderTwistie(e,t){return e.slow?(t.classList.add(..._.ThemeIcon.asClassNameArray(l.Codicon.treeItemLoading)),!0):(t.classList.remove(..._.ThemeIcon.asClassNameArray(l.Codicon.treeItemLoading)),!1)}disposeElement(e,t,i,n){this.renderer.disposeElement?.(this.nodeMapper.map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear()}}function eA(o){return{browserEvent:o.browserEvent,elements:o.elements.map(e=>e.element)}}function tA(o){return{browserEvent:o.browserEvent,element:o.element&&o.element.element,target:o.target}}class YY extends $u{constructor(e){super(e.elements.map(t=>t.element)),this.data=e}}function pL(o){return o instanceof $u?new YY(o):o}class ZY{constructor(e){this.dnd=e}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(i=>i.element),t)}onDragStart(e,t){this.dnd.onDragStart?.(pL(e),t)}onDragOver(e,t,i,n,s,r=!0){return this.dnd.onDragOver(pL(e),t&&t.element,i,n,s)}drop(e,t,i,n,s){this.dnd.drop(pL(e),t&&t.element,i,n,s)}onDragEnd(e){this.dnd.onDragEnd?.(e)}dispose(){this.dnd.dispose()}}class QY extends jM{constructor(e,t,i){super(t,i),this.findProvider=e,this.isFindSessionActive=!1}filter(e,t){const i=super.filter(e,t);if(!this.isFindSessionActive||this.findMode===an.Highlight||!this.findProvider.isVisible)return i;const n=Ju(i)?i.visibility:i;return nl(n)===0?0:this.findProvider.isVisible(e)?i:0}}class XY extends qM{constructor(e,t,i,n,s){super(e,i,n,s),this.findProvider=t,this.filter=i,this.activeSession=!1,this.asyncWorkInProgress=!1,this.disposables.add(l.toDisposable(async()=>{this.activeSession&&await this.findProvider.endSession?.()}))}render(){if(this.asyncWorkInProgress||!this.activeFindMetadata)return;const e=this.activeFindMetadata.matchCount===0&&this.pattern.length>0;this.renderMessage(e),this.pattern.length&&this.alertResults(this.activeFindMetadata.matchCount)}shouldAllowFocus(e){return this.shouldFocusWhenNavigating(e)}shouldFocusWhenNavigating(e){if(!this.activeSession||!this.activeFindMetadata)return!0;const t=e.element?.element;return t&&this.activeFindMetadata.isMatch(t)?!0:!_.FuzzyScore.isDefault(e.filterData)}}function iA(o){return o&&{...o,collapseByDefault:!0,identityProvider:o.identityProvider&&{getId(e){return o.identityProvider.getId(e.element)},getGroupId:o.identityProvider.getGroupId?e=>o.identityProvider.getGroupId(e.element):void 0},dnd:o.dnd&&new ZY(o.dnd),multipleSelectionController:o.multipleSelectionController&&{isSelectionSingleChangeEvent(e){return o.multipleSelectionController.isSelectionSingleChangeEvent({...e,element:e.element})},isSelectionRangeChangeEvent(e){return o.multipleSelectionController.isSelectionRangeChangeEvent({...e,element:e.element})}},accessibilityProvider:o.accessibilityProvider&&{...o.accessibilityProvider,getPosInSet:void 0,getSetSize:void 0,getRole:o.accessibilityProvider.getRole?e=>o.accessibilityProvider.getRole(e.element):()=>"treeitem",isChecked:o.accessibilityProvider.isChecked?e=>!!o.accessibilityProvider?.isChecked(e.element):void 0,getAriaLabel(e){return o.accessibilityProvider.getAriaLabel(e.element)},getWidgetAriaLabel(){return o.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:o.accessibilityProvider.getWidgetRole?()=>o.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:o.accessibilityProvider.getAriaLevel&&(e=>o.accessibilityProvider.getAriaLevel(e.element)),getActiveDescendantId:o.accessibilityProvider.getActiveDescendantId&&(e=>o.accessibilityProvider.getActiveDescendantId(e.element))},filter:o.filter&&{filter(e,t){return o.filter.filter(e.element,t)}},keyboardNavigationLabelProvider:o.keyboardNavigationLabelProvider&&{...o.keyboardNavigationLabelProvider,getKeyboardNavigationLabel(e){return o.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)}},sorter:void 0,expandOnlyOnTwistieClick:typeof o.expandOnlyOnTwistieClick>"u"?void 0:typeof o.expandOnlyOnTwistieClick!="function"?o.expandOnlyOnTwistieClick:(e=>o.expandOnlyOnTwistieClick(e.element)),twistieAdditionalCssClass:typeof o.twistieAdditionalCssClass>"u"?void 0:(e=>o.twistieAdditionalCssClass(e.element)),defaultFindVisibility:e=>e.hasChildren&&e.stale?1:typeof o.defaultFindVisibility=="number"?o.defaultFindVisibility:typeof o.defaultFindVisibility>"u"?2:o.defaultFindVisibility(e.element),stickyScrollDelegate:o.stickyScrollDelegate}}function _L(o,e){e(o),o.children.forEach(t=>_L(t,e))}class nA{get onDidScroll(){return this.tree.onDidScroll}get onDidChangeFocus(){return l.Event.map(this.tree.onDidChangeFocus,eA)}get onDidChangeSelection(){return l.Event.map(this.tree.onDidChangeSelection,eA)}get onMouseDblClick(){return l.Event.map(this.tree.onMouseDblClick,tA)}get onPointer(){return l.Event.map(this.tree.onPointer,tA)}get onDidFocus(){return this.tree.onDidFocus}get onDidChangeModel(){return this.tree.onDidChangeModel}get onDidChangeCollapseState(){return this.tree.onDidChangeCollapseState}get onDidChangeStickyScrollFocused(){return this.tree.onDidChangeStickyScrollFocused}get onDidDispose(){return this.tree.onDidDispose}constructor(e,t,i,n,s,r={}){this.user=e,this.dataSource=s,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new l.Emitter,this._onDidChangeNodeSlowState=new l.Emitter,this.nodeMapper=new nL(h=>new mL(h)),this.disposables=new l.DisposableStore,this.identityProvider=r.identityProvider,this.autoExpandSingleChildren=typeof r.autoExpandSingleChildren>"u"?!1:r.autoExpandSingleChildren,this.sorter=r.sorter,this.getDefaultCollapseState=h=>r.collapseByDefault?r.collapseByDefault(h)?ki.PreserveOrCollapsed:ki.PreserveOrExpanded:void 0;let a=!1,c;if(r.findProvider&&(r.findWidgetEnabled??!0)&&r.keyboardNavigationLabelProvider&&r.contextViewProvider&&(a=!0,c=new QY(r.findProvider,r.keyboardNavigationLabelProvider,r.filter)),this.tree=this.createTree(e,t,i,n,{...r,findWidgetEnabled:!a,filter:c??r.filter}),this.root=fL({element:void 0,parent:null,hasChildren:!0,defaultCollapseState:void 0}),this.identityProvider&&(this.root={...this.root,id:null}),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables),a){const h={styles:r.findWidgetStyles,showNotFoundMessage:r.showNotFoundMessage,defaultFindMatchType:r.defaultFindMatchType,defaultFindMode:r.defaultFindMode};this.findController=this.disposables.add(new XY(this.tree,r.findProvider,c,this.tree.options.contextViewProvider,h)),this.focusNavigationFilter=d=>this.findController.shouldFocusWhenNavigating(d),this.onDidChangeFindOpenState=this.findController.onDidChangeOpenState,this.onDidChangeFindMode=this.findController.onDidChangeMode,this.onDidChangeFindMatchType=this.findController.onDidChangeMatchType}else this.onDidChangeFindOpenState=this.tree.onDidChangeFindOpenState,this.onDidChangeFindMode=this.tree.onDidChangeFindMode,this.onDidChangeFindMatchType=this.tree.onDidChangeFindMatchType}createTree(e,t,i,n,s){const r=new rL(i),a=n.map(h=>new qY(h,this.nodeMapper,this._onDidChangeNodeSlowState.event)),c=iA(s)||{};return new uL(e,t,r,a,c)}updateOptions(e={}){this.findController&&(e.defaultFindMode!==void 0&&(this.findController.mode=e.defaultFindMode),e.defaultFindMatchType!==void 0&&(this.findController.matchType=e.defaultFindMatchType)),this.tree.updateOptions(e)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(e){this.tree.scrollTop=e}get scrollHeight(){return this.tree.scrollHeight}get renderHeight(){return this.tree.renderHeight}domFocus(){this.tree.domFocus()}layout(e,t){this.tree.layout(e,t)}style(e){this.tree.style(e)}getInput(){return this.root.element}async setInput(e,t){this.cancelAllRefreshPromises(),this.root.element=e;const i=t&&{viewState:t,focus:[],selection:[]};await this._updateChildren(e,!0,!1,i),i&&(this.tree.setFocus(i.focus),this.tree.setSelection(i.selection)),t&&typeof t.scrollTop=="number"&&(this.scrollTop=t.scrollTop)}cancelAllRefreshPromises(e=!1){this.refreshPromises.forEach(t=>t.cancel()),this.refreshPromises.clear(),e&&(this.subTreeRefreshPromises.forEach(t=>t.cancel()),this.subTreeRefreshPromises.clear())}async _updateChildren(e=this.root.element,t=!0,i=!1,n,s){if(typeof this.root.element>"u")throw new rn(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await l.Event.toPromise(this._onDidRender.event));const r=this.getDataNode(e);if(await this.refreshAndRenderNode(r,t,n,s),i)try{this.tree.rerender(r)}catch{}}rerender(e){if(e===void 0||e===this.root.element){this.tree.rerender();return}const t=this.getDataNode(e);this.tree.rerender(t)}getNode(e=this.root.element){const t=this.getDataNode(e),i=this.tree.getNode(t===this.root?null:t);return this.nodeMapper.map(i)}collapse(e,t=!1){const i=this.getDataNode(e);return this.tree.collapse(i===this.root?null:i,t)}async expand(e,t=!1){if(typeof this.root.element>"u")throw new rn(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await l.Event.toPromise(this._onDidRender.event));const i=this.getDataNode(e);if(this.tree.hasElement(i)&&!this.tree.isCollapsible(i)||(i.refreshPromise&&(await i.refreshPromise,await l.Event.toPromise(this._onDidRender.event)),i!==this.root&&!i.refreshPromise&&!this.tree.isCollapsed(i)))return!1;const n=this.tree.expand(i===this.root?null:i,t);return i.refreshPromise&&(await i.refreshPromise,await l.Event.toPromise(this._onDidRender.event)),n}setSelection(e,t){const i=e.map(n=>this.getDataNode(n));this.tree.setSelection(i,t)}getSelection(){return this.tree.getSelection().map(t=>t.element)}setFocus(e,t){const i=e.map(n=>this.getDataNode(n));this.tree.setFocus(i,t)}getFocus(){return this.tree.getFocus().map(t=>t.element)}reveal(e,t){this.tree.reveal(this.getDataNode(e),t)}getParentElement(e){const t=this.tree.getParentElement(this.getDataNode(e));return t&&t.element}getFirstElementChild(e=this.root.element){const t=this.getDataNode(e),i=this.tree.getFirstElementChild(t===this.root?null:t);return i&&i.element}getDataNode(e){const t=this.nodes.get(e===this.root.element?null:e);if(!t){const i=this.identityProvider?.getId(e).toString();throw new rn(this.user,`Data tree node not found${i?`: ${i}`:""}`)}return t}async refreshAndRenderNode(e,t,i,n){this.disposables.isDisposed||(await this.refreshNode(e,t,i),!this.disposables.isDisposed&&this.render(e,i,n))}async refreshNode(e,t,i){let n;if(this.subTreeRefreshPromises.forEach((s,r)=>{!n&&jY(r,e)&&(n=s.then(()=>this.refreshNode(e,t,i)))}),n)return n;if(e!==this.root&&this.tree.getNode(e).collapsed){e.hasChildren=!!this.dataSource.hasChildren(e.element),e.stale=!0,this.setChildren(e,[],t,i);return}return this.doRefreshSubTree(e,t,i)}async doRefreshSubTree(e,t,i){const n=l.createCancelablePromise(async()=>{const s=await this.doRefreshNode(e,t,i);e.stale=!1,await l.Promises.settled(s.map(r=>this.doRefreshSubTree(r,t,i)))});return e.refreshPromise=n,this.subTreeRefreshPromises.set(e,n),n.finally(()=>{e.refreshPromise=void 0,this.subTreeRefreshPromises.delete(e)}),n}async doRefreshNode(e,t,i){e.hasChildren=!!this.dataSource.hasChildren(e.element);let n;if(!e.hasChildren)n=Promise.resolve(l.Iterable.empty());else{const s=this.doGetChildren(e);if(l.isIterable(s))n=Promise.resolve(s);else{const r=l.timeout(800);r.then(()=>{e.slow=!0,this._onDidChangeNodeSlowState.fire(e)},a=>null),n=s.finally(()=>r.cancel())}}try{const s=await n;return this.setChildren(e,s,t,i)}catch(s){if(e!==this.root&&this.tree.hasElement(e)&&this.tree.collapse(e),l.isCancellationError(s))return[];throw s}finally{e.slow&&(e.slow=!1,this._onDidChangeNodeSlowState.fire(e))}}doGetChildren(e){let t=this.refreshPromises.get(e);if(t)return t;const i=this.dataSource.getChildren(e.element);return l.isIterable(i)?this.processChildren(i):(t=l.createCancelablePromise(async()=>this.processChildren(await i)),this.refreshPromises.set(e,t),t.finally(()=>{this.refreshPromises.delete(e)}))}_onDidChangeCollapseState({node:e,deep:t}){e.element!==null&&!e.collapsed&&e.element.stale&&(t?this.collapse(e.element.element):this.refreshAndRenderNode(e.element,!1).catch(l.onUnexpectedError))}setChildren(e,t,i,n){const s=[...t];if(e.children.length===0&&s.length===0)return[];const r=new Map,a=new Map;for(const d of e.children)r.set(d.element,d),this.identityProvider&&a.set(d.id,{node:d,collapsed:this.tree.hasElement(d)&&this.tree.isCollapsed(d)});const c=[],h=s.map(d=>{const u=!!this.dataSource.hasChildren(d);if(!this.identityProvider){const p=fL({element:d,parent:e,hasChildren:u,defaultCollapseState:this.getDefaultCollapseState(d)});return u&&p.defaultCollapseState===ki.PreserveOrExpanded&&c.push(p),p}const f=this.identityProvider.getId(d).toString(),g=a.get(f);if(g){const p=g.node;return r.delete(p.element),this.nodes.delete(p.element),this.nodes.set(d,p),p.element=d,p.hasChildren=u,i?g.collapsed?(p.children.forEach(b=>_L(b,v=>this.nodes.delete(v.element))),p.children.splice(0,p.children.length),p.stale=!0):c.push(p):u&&!g.collapsed&&c.push(p),p}const m=fL({element:d,parent:e,id:f,hasChildren:u,defaultCollapseState:this.getDefaultCollapseState(d)});return n&&n.viewState.focus&&n.viewState.focus.indexOf(f)>-1&&n.focus.push(m),n&&n.viewState.selection&&n.viewState.selection.indexOf(f)>-1&&n.selection.push(m),(n&&n.viewState.expanded&&n.viewState.expanded.indexOf(f)>-1||u&&m.defaultCollapseState===ki.PreserveOrExpanded)&&c.push(m),m});for(const d of r.values())_L(d,u=>this.nodes.delete(u.element));for(const d of h)this.nodes.set(d.element,d);return l.splice(e.children,0,e.children.length,h),e!==this.root&&this.autoExpandSingleChildren&&h.length===1&&c.length===0&&(h[0].forceExpanded=!0,c.push(h[0])),c}render(e,t,i){const n=e.children.map(r=>this.asTreeElement(r,t)),s=i&&{...i,diffIdentityProvider:i.diffIdentityProvider&&{getId(r){return i.diffIdentityProvider.getId(r.element)},getGroupId:i.diffIdentityProvider.getGroupId?r=>i.diffIdentityProvider.getGroupId(r.element):void 0}};this.tree.setChildren(e===this.root?null:e,n,s),e!==this.root&&this.tree.setCollapsible(e,e.hasChildren),this._onDidRender.fire()}asTreeElement(e,t){if(e.stale)return{element:e,collapsible:e.hasChildren,collapsed:!0};let i;return t&&t.viewState.expanded&&e.id&&t.viewState.expanded.indexOf(e.id)>-1?i=!1:e.forceExpanded?(i=!1,e.forceExpanded=!1):i=e.defaultCollapseState,{element:e,children:e.hasChildren?l.Iterable.map(e.children,n=>this.asTreeElement(n,t)):[],collapsible:e.hasChildren,collapsed:i}}processChildren(e){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),e}dispose(){this._onDidRender.dispose(),this._onDidChangeNodeSlowState.dispose(),this.disposables.dispose(),this.tree.dispose()}}class bL{get element(){return{elements:this.node.element.elements.map(e=>e.element),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map(e=>new bL(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e){this.node=e}}class JY{constructor(e,t,i,n){this.renderer=e,this.nodeMapper=t,this.compressibleNodeMapperProvider=i,this.onDidChangeTwistieState=n,this.renderedNodes=new Map,this.disposables=[],this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderCompressedElements(e,t,i,n){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}renderTwistie(e,t){return e.slow?(t.classList.add(..._.ThemeIcon.asClassNameArray(l.Codicon.treeItemLoading)),!0):(t.classList.remove(..._.ThemeIcon.asClassNameArray(l.Codicon.treeItemLoading)),!1)}disposeElement(e,t,i,n){this.renderer.disposeElement?.(this.nodeMapper.map(e),t,i.templateData,n)}disposeCompressedElements(e,t,i,n){this.renderer.disposeCompressedElements?.(this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=l.dispose(this.disposables)}}function WY(o){const e=o&&iA(o);return e&&{...e,keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&{...e.keyboardNavigationLabelProvider,getCompressedNodeKeyboardNavigationLabel(t){return o.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.map(i=>i.element))}},stickyScrollDelegate:e.stickyScrollDelegate}}class HY extends nA{constructor(e,t,i,n,s,r,a={}){super(e,t,i,s,r,a),this.compressionDelegate=n,this.compressibleNodeMapper=new nL(c=>new bL(c)),this.filter=a.filter}createTree(e,t,i,n,s){const r=new rL(i),a=n.map(h=>new JY(h,this.nodeMapper,()=>this.compressibleNodeMapper,this._onDidChangeNodeSlowState.event)),c=WY(s)||{};return new HM(e,t,r,a,c)}asTreeElement(e,t){return{incompressible:this.compressionDelegate.isIncompressible(e.element),...super.asTreeElement(e,t)}}render(e,t,i){if(!this.identityProvider)return super.render(e,t);const n=g=>this.identityProvider.getId(g).toString(),s=g=>{const m=new Set;for(const p of g){const b=this.tree.getCompressedTreeNode(p===this.root?null:p);if(b.element)for(const v of b.element.elements)m.add(n(v.element))}return m},r=s(this.tree.getSelection()),a=s(this.tree.getFocus());super.render(e,t,i);const c=this.getSelection();let h=!1;const d=this.getFocus();let u=!1;const f=g=>{const m=g.element;if(m)for(let p=0;p{const i=this.filter.filter(t,1),n=eZ(i);if(n===2)throw new Error("Recursive tree visibility not supported in async data compressed trees");return n===1})),super.processChildren(e)}}function eZ(o){return typeof o=="boolean"?o?1:0:Ju(o)?nl(o.visibility):nl(o)}class tZ extends QM{constructor(e,t,i,n,s,r={}){super(e,t,i,n,r),this.user=e,this.dataSource=s,this.identityProvider=r.identityProvider}createModel(e,t){return new cL(e,t)}}var Ro=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},$e=function(o,e){return function(t,i){e(t,i,o)}};const ts=le("listService");class iZ{get lastFocusedList(){return this._lastFocusedWidget}constructor(){this.disposables=new l.DisposableStore,this.lists=[],this._lastFocusedWidget=void 0}setLastFocusedList(e){e!==this._lastFocusedWidget&&(this._lastFocusedWidget?.getHTMLElement().classList.remove("last-focused"),this._lastFocusedWidget=e,this._lastFocusedWidget?.getHTMLElement().classList.add("last-focused"))}register(e,t){if(this.lists.some(n=>n.widget===e))throw new Error("Cannot register the same widget multiple times");const i={widget:e,extraContextKeys:t};return this.lists.push(i),sd(e.getHTMLElement())&&this.setLastFocusedList(e),l.combinedDisposable(e.onDidFocus(()=>this.setLastFocusedList(e)),l.toDisposable(()=>this.lists.splice(this.lists.indexOf(i),1)),e.onDidDispose(()=>{this.lists=this.lists.filter(n=>n!==i),this._lastFocusedWidget===e&&this.setLastFocusedList(void 0)}))}dispose(){this.disposables.dispose()}}const Wu=new q("listScrollAtBoundary","none");de.or(Wu.isEqualTo("top"),Wu.isEqualTo("both")),de.or(Wu.isEqualTo("bottom"),Wu.isEqualTo("both"));const sA=new q("listFocus",!0),oA=new q("treestickyScrollFocused",!1),Hp=new q("listSupportsMultiselect",!0),nZ=de.and(sA,de.not(HR),oA.negate()),CL=new q("listHasSelectionOrFocus",!1),vL=new q("listDoubleSelection",!1),wL=new q("listMultiSelection",!1),e_=new q("listSelectionNavigation",!1),sZ=new q("listSupportsFind",!0),rA=new q("treeElementCanCollapse",!1),oZ=new q("treeElementHasParent",!1),aA=new q("treeElementCanExpand",!1),rZ=new q("treeElementHasChild",!1),aZ=new q("treeFindOpen",!1),lA="listTypeNavigationMode",cA="listAutomaticKeyboardNavigation";function t_(o,e){const t=o.createScoped(e.getHTMLElement());return sA.bindTo(t),t}function i_(o,e){const t=Wu.bindTo(o),i=()=>{const n=e.scrollTop===0,s=e.scrollHeight-e.renderHeight-e.scrollTop<1;n&&s?t.set("both"):n?t.set("top"):s?t.set("bottom"):t.set("none")};return i(),e.onDidScroll(i)}const ol="workbench.list.multiSelectModifier",n_="workbench.list.openMode",In="workbench.list.horizontalScrolling",SL="workbench.list.defaultFindMode",yL="workbench.list.typeNavigationMode",s_="workbench.list.keyboardNavigation",is="workbench.list.scrollByPage",LL="workbench.list.defaultFindMatchType",Hu="workbench.tree.indent",o_="workbench.tree.renderIndentGuides",ns="workbench.list.smoothScrolling",Us="workbench.list.mouseWheelScrollSensitivity",$s="workbench.list.fastScrollSensitivity",r_="workbench.tree.expandMode",a_="workbench.tree.enableStickyScroll",l_="workbench.tree.stickyScrollMaxItemCount";function Ks(o){return o.getValue(ol)==="alt"}class lZ extends l.Disposable{constructor(e){super(),this.configurationService=e,this.useAltAsMultipleSelectionModifier=Ks(e),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>{e.affectsConfiguration(ol)&&(this.useAltAsMultipleSelectionModifier=Ks(this.configurationService))}))}isSelectionSingleChangeEvent(e){return this.useAltAsMultipleSelectionModifier?e.browserEvent.altKey:cM(e)}isSelectionRangeChangeEvent(e){return hM(e)}}function c_(o,e){const t=o.get(Ge),i=o.get(xt),n=new l.DisposableStore;return[{...e,keyboardNavigationDelegate:{mightProducePrintableCharacter(r){return i.mightProducePrintableCharacter(r)}},smoothScrolling:!!t.getValue(ns),mouseWheelScrollSensitivity:t.getValue(Us),fastScrollSensitivity:t.getValue($s),multipleSelectionController:e.multipleSelectionController??n.add(new lZ(t)),keyboardNavigationEventFilter:dZ(i),scrollByPage:!!t.getValue(is)},n]}let hA=class extends zn{constructor(e,t,i,n,s,r,a,c,h){const d=typeof s.horizontalScrolling<"u"?s.horizontalScrolling:!!c.getValue(In),[u,f]=h.invokeFunction(c_,s);super(e,t,i,n,{keyboardSupport:!1,...u,horizontalScrolling:d}),this.disposables.add(f),this.contextKeyService=t_(r,this),this.disposables.add(i_(this.contextKeyService,this)),this.listSupportsMultiSelect=Hp.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(s.multipleSelectionSupport!==!1),e_.bindTo(this.contextKeyService).set(!!s.selectionNavigation),this.listHasSelectionOrFocus=CL.bindTo(this.contextKeyService),this.listDoubleSelection=vL.bindTo(this.contextKeyService),this.listMultiSelection=wL.bindTo(this.contextKeyService),this.horizontalScrolling=s.horizontalScrolling,this._useAltAsMultipleSelectionModifier=Ks(c),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),this.updateStyles(s.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const m=this.getSelection(),p=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(m.length>0||p.length>0),this.listMultiSelection.set(m.length>1),this.listDoubleSelection.set(m.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const m=this.getSelection(),p=this.getFocus();this.listHasSelectionOrFocus.set(m.length>0||p.length>0)})),this.disposables.add(c.onDidChangeConfiguration(m=>{m.affectsConfiguration(ol)&&(this._useAltAsMultipleSelectionModifier=Ks(c));let p={};if(m.affectsConfiguration(In)&&this.horizontalScrolling===void 0){const b=!!c.getValue(In);p={...p,horizontalScrolling:b}}if(m.affectsConfiguration(is)){const b=!!c.getValue(is);p={...p,scrollByPage:b}}if(m.affectsConfiguration(ns)){const b=!!c.getValue(ns);p={...p,smoothScrolling:b}}if(m.affectsConfiguration(Us)){const b=c.getValue(Us);p={...p,mouseWheelScrollSensitivity:b}}if(m.affectsConfiguration($s)){const b=c.getValue($s);p={...p,fastScrollSensitivity:b}}Object.keys(p).length>0&&this.updateOptions(p)})),this.navigator=new fA(this,{configurationService:c,...s}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles!==void 0&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?eh(e):Hc)}};hA=Ro([$e(5,be),$e(6,ts),$e(7,Ge),$e(8,me)],hA);let dA=class extends Jq{constructor(e,t,i,n,s,r,a,c,h){const d=typeof s.horizontalScrolling<"u"?s.horizontalScrolling:!!c.getValue(In),[u,f]=h.invokeFunction(c_,s);super(e,t,i,n,{keyboardSupport:!1,...u,horizontalScrolling:d}),this.disposables=new l.DisposableStore,this.disposables.add(f),this.contextKeyService=t_(r,this),this.disposables.add(i_(this.contextKeyService,this.widget)),this.horizontalScrolling=s.horizontalScrolling,this.listSupportsMultiSelect=Hp.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(s.multipleSelectionSupport!==!1),e_.bindTo(this.contextKeyService).set(!!s.selectionNavigation),this._useAltAsMultipleSelectionModifier=Ks(c),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),this.updateStyles(s.overrideStyles),this.disposables.add(c.onDidChangeConfiguration(m=>{m.affectsConfiguration(ol)&&(this._useAltAsMultipleSelectionModifier=Ks(c));let p={};if(m.affectsConfiguration(In)&&this.horizontalScrolling===void 0){const b=!!c.getValue(In);p={...p,horizontalScrolling:b}}if(m.affectsConfiguration(is)){const b=!!c.getValue(is);p={...p,scrollByPage:b}}if(m.affectsConfiguration(ns)){const b=!!c.getValue(ns);p={...p,smoothScrolling:b}}if(m.affectsConfiguration(Us)){const b=c.getValue(Us);p={...p,mouseWheelScrollSensitivity:b}}if(m.affectsConfiguration($s)){const b=c.getValue($s);p={...p,fastScrollSensitivity:b}}Object.keys(p).length>0&&this.updateOptions(p)})),this.navigator=new fA(this,{configurationService:c,...s}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles!==void 0&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?eh(e):Hc)}dispose(){this.disposables.dispose(),super.dispose()}};dA=Ro([$e(5,be),$e(6,ts),$e(7,Ge),$e(8,me)],dA);let uA=class extends eL{constructor(e,t,i,n,s,r,a,c,h,d){const u=typeof r.horizontalScrolling<"u"?r.horizontalScrolling:!!h.getValue(In),[f,g]=d.invokeFunction(c_,r);super(e,t,i,n,s,{keyboardSupport:!1,...f,horizontalScrolling:u}),this.disposables.add(g),this.contextKeyService=t_(a,this),this.disposables.add(i_(this.contextKeyService,this)),this.listSupportsMultiSelect=Hp.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(r.multipleSelectionSupport!==!1),e_.bindTo(this.contextKeyService).set(!!r.selectionNavigation),this.listHasSelectionOrFocus=CL.bindTo(this.contextKeyService),this.listDoubleSelection=vL.bindTo(this.contextKeyService),this.listMultiSelection=wL.bindTo(this.contextKeyService),this.horizontalScrolling=r.horizontalScrolling,this._useAltAsMultipleSelectionModifier=Ks(h),this.disposables.add(this.contextKeyService),this.disposables.add(c.register(this)),this.updateStyles(r.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const p=this.getSelection(),b=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(p.length>0||b.length>0),this.listMultiSelection.set(p.length>1),this.listDoubleSelection.set(p.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const p=this.getSelection(),b=this.getFocus();this.listHasSelectionOrFocus.set(p.length>0||b.length>0)})),this.disposables.add(h.onDidChangeConfiguration(p=>{p.affectsConfiguration(ol)&&(this._useAltAsMultipleSelectionModifier=Ks(h));let b={};if(p.affectsConfiguration(In)&&this.horizontalScrolling===void 0){const v=!!h.getValue(In);b={...b,horizontalScrolling:v}}if(p.affectsConfiguration(is)){const v=!!h.getValue(is);b={...b,scrollByPage:v}}if(p.affectsConfiguration(ns)){const v=!!h.getValue(ns);b={...b,smoothScrolling:v}}if(p.affectsConfiguration(Us)){const v=h.getValue(Us);b={...b,mouseWheelScrollSensitivity:v}}if(p.affectsConfiguration($s)){const v=h.getValue($s);b={...b,fastScrollSensitivity:v}}Object.keys(b).length>0&&this.updateOptions(b)})),this.navigator=new cZ(this,{configurationService:h,...r}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles!==void 0&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?eh(e):Hc)}dispose(){this.disposables.dispose(),super.dispose()}};uA=Ro([$e(6,be),$e(7,ts),$e(8,Ge),$e(9,me)],uA);class DL extends l.Disposable{constructor(e,t){super(),this.widget=e,this._onDidOpen=this._register(new l.Emitter),this.onDidOpen=this._onDidOpen.event,this._register(l.Event.filter(this.widget.onDidChangeSelection,i=>so(i.browserEvent))(i=>this.onSelectionFromKeyboard(i))),this._register(this.widget.onPointer(i=>this.onPointer(i.element,i.browserEvent))),this._register(this.widget.onMouseDblClick(i=>this.onMouseDblClick(i.element,i.browserEvent))),typeof t?.openOnSingleClick!="boolean"&&t?.configurationService?(this.openOnSingleClick=t?.configurationService.getValue(n_)!=="doubleClick",this._register(t?.configurationService.onDidChangeConfiguration(i=>{i.affectsConfiguration(n_)&&(this.openOnSingleClick=t?.configurationService.getValue(n_)!=="doubleClick")}))):this.openOnSingleClick=t?.openOnSingleClick??!0}onSelectionFromKeyboard(e){if(e.elements.length!==1)return;const t=e.browserEvent,i=typeof t.preserveFocus=="boolean"?t.preserveFocus:!0,n=typeof t.pinned=="boolean"?t.pinned:!i;this._open(this.getSelectedElement(),i,n,!1,e.browserEvent)}onPointer(e,t){if(!this.openOnSingleClick||t.detail===2)return;const n=t.button===1,s=!0,r=n,a=t.ctrlKey||t.metaKey||t.altKey;this._open(e,s,r,a,t)}onMouseDblClick(e,t){if(!t)return;const i=t.target;if(i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&t.offsetX<16)return;const s=!1,r=!0,a=t.ctrlKey||t.metaKey||t.altKey;this._open(e,s,r,a,t)}_open(e,t,i,n,s){e&&this._onDidOpen.fire({editorOptions:{preserveFocus:t,pinned:i,revealIfVisible:!0},sideBySide:n,element:e,browserEvent:s})}}class fA extends DL{constructor(e,t){super(e,t),this.widget=e}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class cZ extends DL{constructor(e,t){super(e,t)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class hZ extends DL{constructor(e,t){super(e,t)}getSelectedElement(){return this.widget.getSelection()[0]??void 0}}function dZ(o){let e=!1;return t=>{if(t.toKeyCodeChord().isModifierKey())return!1;if(e)return e=!1,!1;const i=o.softDispatch(t,t.target);return i.kind===1?(e=!0,!1):(e=!1,i.kind===0)}}let h_=class extends uL{get onDidOpen(){return this.internals.onDidOpen}constructor(e,t,i,n,s,r,a,c,h){const{options:d,getTypeNavigationMode:u,disposable:f}=r.invokeFunction(ef,s);super(e,t,i,n,d),this.disposables.add(f),this.internals=new rl(this,s,u,s.overrideStyles,a,c,h),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};h_=Ro([$e(5,me),$e(6,be),$e(7,ts),$e(8,Ge)],h_);let gA=class extends HM{constructor(e,t,i,n,s,r,a,c,h){const{options:d,getTypeNavigationMode:u,disposable:f}=r.invokeFunction(ef,s);super(e,t,i,n,d),this.disposables.add(f),this.internals=new rl(this,s,u,s.overrideStyles,a,c,h),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};gA=Ro([$e(5,me),$e(6,be),$e(7,ts),$e(8,Ge)],gA);let mA=class extends tZ{constructor(e,t,i,n,s,r,a,c,h,d){const{options:u,getTypeNavigationMode:f,disposable:g}=a.invokeFunction(ef,r);super(e,t,i,n,s,u),this.disposables.add(g),this.internals=new rl(this,r,f,r.overrideStyles,c,h,d),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles!==void 0&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};mA=Ro([$e(6,me),$e(7,be),$e(8,ts),$e(9,Ge)],mA),_.WorkbenchAsyncDataTree=class extends nA{get onDidOpen(){return this.internals.onDidOpen}constructor(e,t,i,n,s,r,a,c,h,d){const{options:u,getTypeNavigationMode:f,disposable:g}=a.invokeFunction(ef,r);super(e,t,i,n,s,u),this.disposables.add(g),this.internals=new rl(this,r,f,r.overrideStyles,c,h,d),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}},_.WorkbenchAsyncDataTree=Ro([$e(6,me),$e(7,be),$e(8,ts),$e(9,Ge)],_.WorkbenchAsyncDataTree);let pA=class extends HY{constructor(e,t,i,n,s,r,a,c,h,d,u){const{options:f,getTypeNavigationMode:g,disposable:m}=c.invokeFunction(ef,a);super(e,t,i,n,s,r,f),this.disposables.add(m),this.internals=new rl(this,a,g,a.overrideStyles,h,d,u),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};pA=Ro([$e(7,me),$e(8,be),$e(9,ts),$e(10,Ge)],pA);function _A(o){const e=o.getValue(SL);if(e==="highlight")return an.Highlight;if(e==="filter")return an.Filter;const t=o.getValue(s_);if(t==="simple"||t==="highlight")return an.Highlight;if(t==="filter")return an.Filter}function bA(o){const e=o.getValue(LL);if(e==="fuzzy")return es.Fuzzy;if(e==="contiguous")return es.Contiguous}function ef(o,e){const t=o.get(Ge),i=o.get(Fc),n=o.get(be),s=o.get(me),r=()=>{const f=n.getContextKeyValue(lA);if(f==="automatic")return Vs.Automatic;if(f==="trigger"||n.getContextKeyValue(cA)===!1)return Vs.Trigger;const m=t.getValue(yL);if(m==="automatic")return Vs.Automatic;if(m==="trigger")return Vs.Trigger},a=e.horizontalScrolling!==void 0?e.horizontalScrolling:!!t.getValue(In),[c,h]=s.invokeFunction(c_,e),d=e.paddingBottom,u=e.renderIndentGuides!==void 0?e.renderIndentGuides:t.getValue(o_);return{getTypeNavigationMode:r,disposable:h,options:{keyboardSupport:!1,...c,indent:typeof t.getValue(Hu)=="number"?t.getValue(Hu):void 0,renderIndentGuides:u,smoothScrolling:!!t.getValue(ns),defaultFindMode:e.defaultFindMode??_A(t),defaultFindMatchType:e.defaultFindMatchType??bA(t),horizontalScrolling:a,scrollByPage:!!t.getValue(is),paddingBottom:d,hideTwistiesOfChildlessElements:e.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:e.expandOnlyOnTwistieClick??t.getValue(r_)==="doubleClick",contextViewProvider:i,findWidgetStyles:Cq,enableStickyScroll:!!t.getValue(a_),stickyScrollMaxItemCount:Number(t.getValue(l_))}}}let rl=class{get onDidOpen(){return this.navigator.onDidOpen}constructor(e,t,i,n,s,r,a){this.tree=e,this.disposables=[],this.contextKeyService=t_(s,e),this.disposables.push(i_(this.contextKeyService,e)),this.listSupportsMultiSelect=Hp.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(t.multipleSelectionSupport!==!1),e_.bindTo(this.contextKeyService).set(!!t.selectionNavigation),this.listSupportFindWidget=sZ.bindTo(this.contextKeyService),this.listSupportFindWidget.set(t.findWidgetEnabled??!0),this.hasSelectionOrFocus=CL.bindTo(this.contextKeyService),this.hasDoubleSelection=vL.bindTo(this.contextKeyService),this.hasMultiSelection=wL.bindTo(this.contextKeyService),this.treeElementCanCollapse=rA.bindTo(this.contextKeyService),this.treeElementHasParent=oZ.bindTo(this.contextKeyService),this.treeElementCanExpand=aA.bindTo(this.contextKeyService),this.treeElementHasChild=rZ.bindTo(this.contextKeyService),this.treeFindOpen=aZ.bindTo(this.contextKeyService),this.treeStickyScrollFocused=oA.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=Ks(a),this.updateStyleOverrides(n);const h=()=>{const u=e.getFocus()[0];if(!u)return;const f=e.getNode(u);this.treeElementCanCollapse.set(f.collapsible&&!f.collapsed),this.treeElementHasParent.set(!!e.getParentElement(u)),this.treeElementCanExpand.set(f.collapsible&&f.collapsed),this.treeElementHasChild.set(!!e.getFirstElementChild(u))},d=new Set;d.add(lA),d.add(cA),this.disposables.push(this.contextKeyService,r.register(e),e.onDidChangeSelection(()=>{const u=e.getSelection(),f=e.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.hasSelectionOrFocus.set(u.length>0||f.length>0),this.hasMultiSelection.set(u.length>1),this.hasDoubleSelection.set(u.length===2)})}),e.onDidChangeFocus(()=>{const u=e.getSelection(),f=e.getFocus();this.hasSelectionOrFocus.set(u.length>0||f.length>0),h()}),e.onDidChangeCollapseState(h),e.onDidChangeModel(h),e.onDidChangeFindOpenState(u=>this.treeFindOpen.set(u)),e.onDidChangeStickyScrollFocused(u=>this.treeStickyScrollFocused.set(u)),a.onDidChangeConfiguration(u=>{let f={};if(u.affectsConfiguration(ol)&&(this._useAltAsMultipleSelectionModifier=Ks(a)),u.affectsConfiguration(Hu)){const g=a.getValue(Hu);f={...f,indent:g}}if(u.affectsConfiguration(o_)&&t.renderIndentGuides===void 0){const g=a.getValue(o_);f={...f,renderIndentGuides:g}}if(u.affectsConfiguration(ns)){const g=!!a.getValue(ns);f={...f,smoothScrolling:g}}if(u.affectsConfiguration(SL)||u.affectsConfiguration(s_)){const g=_A(a);f={...f,defaultFindMode:g}}if(u.affectsConfiguration(yL)||u.affectsConfiguration(s_)){const g=i();f={...f,typeNavigationMode:g}}if(u.affectsConfiguration(LL)){const g=bA(a);f={...f,defaultFindMatchType:g}}if(u.affectsConfiguration(In)&&t.horizontalScrolling===void 0){const g=!!a.getValue(In);f={...f,horizontalScrolling:g}}if(u.affectsConfiguration(is)){const g=!!a.getValue(is);f={...f,scrollByPage:g}}if(u.affectsConfiguration(r_)&&t.expandOnlyOnTwistieClick===void 0&&(f={...f,expandOnlyOnTwistieClick:a.getValue(r_)==="doubleClick"}),u.affectsConfiguration(a_)){const g=a.getValue(a_);f={...f,enableStickyScroll:g}}if(u.affectsConfiguration(l_)){const g=Math.max(1,a.getValue(l_));f={...f,stickyScrollMaxItemCount:g}}if(u.affectsConfiguration(Us)){const g=a.getValue(Us);f={...f,mouseWheelScrollSensitivity:g}}if(u.affectsConfiguration($s)){const g=a.getValue($s);f={...f,fastScrollSensitivity:g}}Object.keys(f).length>0&&e.updateOptions(f)}),this.contextKeyService.onDidChangeContext(u=>{u.affectsSome(d)&&e.updateOptions({typeNavigationMode:i()})})),this.navigator=new hZ(e,{configurationService:a,...t}),this.disposables.push(this.navigator)}updateOptions(e){e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyleOverrides(e){this.tree.style(e?eh(e):Hc)}dispose(){this.disposables=l.dispose(this.disposables)}};rl=Ro([$e(4,be),$e(5,ts),$e(6,Ge)],rl),St.as(Xo.Configuration).registerConfiguration({id:"workbench",order:7,title:l.localize(1768,"Workbench"),type:"object",properties:{[ol]:{type:"string",enum:["ctrlCmd","alt"],markdownEnumDescriptions:[l.localize(1769,"Maps to `Control` on Windows and Linux and to `Command` on macOS."),l.localize(1770,"Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:l.localize(1771,"The modifier to be used to add an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.")},[n_]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:l.localize(1772,"Controls how to open items in trees and lists using the mouse (if supported). Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[In]:{type:"boolean",default:!1,description:l.localize(1773,"Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[is]:{type:"boolean",default:!1,description:l.localize(1774,"Controls whether clicks in the scrollbar scroll page by page.")},[Hu]:{type:"number",default:8,minimum:4,maximum:40,description:l.localize(1775,"Controls tree indentation in pixels.")},[o_]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:l.localize(1776,"Controls whether the tree should render indent guides.")},[ns]:{type:"boolean",default:!1,description:l.localize(1777,"Controls whether lists and trees have smooth scrolling.")},[Us]:{type:"number",default:1,markdownDescription:l.localize(1778,"A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")},[$s]:{type:"number",default:5,markdownDescription:l.localize(1779,"Scrolling speed multiplier when pressing `Alt`.")},[SL]:{type:"string",enum:["highlight","filter"],enumDescriptions:[l.localize(1780,"Highlight elements when searching. Further up and down navigation will traverse only the highlighted elements."),l.localize(1781,"Filter elements when searching.")],default:"highlight",description:l.localize(1782,"Controls the default find mode for lists and trees in the workbench.")},[s_]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[l.localize(1783,"Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),l.localize(1784,"Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),l.localize(1785,"Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:l.localize(1786,"Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter."),deprecated:!0,deprecationMessage:l.localize(1787,"Please use 'workbench.list.defaultFindMode' and 'workbench.list.typeNavigationMode' instead.")},[LL]:{type:"string",enum:["fuzzy","contiguous"],enumDescriptions:[l.localize(1788,"Use fuzzy matching when searching."),l.localize(1789,"Use contiguous matching when searching.")],default:"fuzzy",description:l.localize(1790,"Controls the type of matching used when searching lists and trees in the workbench.")},[r_]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:l.localize(1791,"Controls how tree folders are expanded when clicking the folder names. Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[a_]:{type:"boolean",default:!0,description:l.localize(1792,"Controls whether sticky scrolling is enabled in trees.")},[l_]:{type:"number",minimum:1,default:7,markdownDescription:l.localize(1793,"Controls the number of sticky elements displayed in the tree when {0} is enabled.","`#workbench.tree.enableStickyScroll#`")},[yL]:{type:"string",enum:["automatic","trigger"],default:"automatic",markdownDescription:l.localize(1794,"Controls how type navigation works in lists and trees in the workbench. When set to `trigger`, type navigation begins once the `list.triggerTypeNavigation` command is run.")}}});class uZ extends l.Disposable{constructor(e,t=[]){super(),this.logger=new bB([e,...t]),this._register(e.onDidChangeLogLevel(i=>this.setLevel(i)))}get onDidChangeLogLevel(){return this.logger.onDidChangeLogLevel}setLevel(e){this.logger.setLevel(e)}getLevel(){return this.logger.getLevel()}trace(e,...t){this.logger.trace(e,...t)}debug(e,...t){this.logger.debug(e,...t)}info(e,...t){this.logger.info(e,...t)}warn(e,...t){this.logger.warn(e,...t)}error(e,...t){this.logger.error(e,...t)}}_.MarkerSeverity$1=void 0,(function(o){o[o.Hint=1]="Hint",o[o.Info=2]="Info",o[o.Warning=4]="Warning",o[o.Error=8]="Error"})(_.MarkerSeverity$1||(_.MarkerSeverity$1={})),(function(o){function e(c,h){return h-c}o.compare=e;const t=Object.create(null);t[o.Error]=l.localize(1795,"Error"),t[o.Warning]=l.localize(1796,"Warning"),t[o.Info]=l.localize(1797,"Info");function i(c){return t[c]||""}o.toString=i;const n=Object.create(null);n[o.Error]=l.localize(1798,"Errors"),n[o.Warning]=l.localize(1799,"Warnings"),n[o.Info]=l.localize(1800,"Infos");function s(c){return n[c]||""}o.toStringPlural=s;function r(c){switch(c){case rt.Error:return o.Error;case rt.Warning:return o.Warning;case rt.Info:return o.Info;case rt.Ignore:return o.Hint}}o.fromSeverity=r;function a(c){switch(c){case o.Error:return rt.Error;case o.Warning:return rt.Warning;case o.Info:return rt.Info;case o.Hint:return rt.Ignore}}o.toSeverity=a})(_.MarkerSeverity$1||(_.MarkerSeverity$1={})),_.IMarkerData=void 0,(function(o){function t(n){return i(n,!0)}o.makeKey=t;function i(n,s){const r=[""];return n.source?r.push(n.source.replace("¦","\\¦")):r.push(""),n.code?typeof n.code=="string"?r.push(n.code.replace("¦","\\¦")):r.push(n.code.value.replace("¦","\\¦")):r.push(""),n.severity!==void 0&&n.severity!==null?r.push(_.MarkerSeverity$1.toString(n.severity)):r.push(""),n.message&&s?r.push(n.message.replace("¦","\\¦")):r.push(""),n.startLineNumber!==void 0&&n.startLineNumber!==null?r.push(n.startLineNumber.toString()):r.push(""),n.startColumn!==void 0&&n.startColumn!==null?r.push(n.startColumn.toString()):r.push(""),n.endLineNumber!==void 0&&n.endLineNumber!==null?r.push(n.endLineNumber.toString()):r.push(""),n.endColumn!==void 0&&n.endColumn!==null?r.push(n.endColumn.toString()):r.push(""),r.push(""),r.join("¦")}o.makeKeyOptionalMessage=i})(_.IMarkerData||(_.IMarkerData={}));const xr=le("markerService"),fZ=new Set([l.Schemas.inMemory,l.Schemas.vscodeSourceControl,l.Schemas.walkThrough,l.Schemas.walkThroughSnippet,l.Schemas.vscodeChatCodeBlock,l.Schemas.vscodeTerminal]);class gZ{constructor(){this._byResource=new l.ResourceMap,this._byOwner=new Map}set(e,t,i){let n=this._byResource.get(e);n||(n=new Map,this._byResource.set(e,n)),n.set(t,i);let s=this._byOwner.get(t);s||(s=new l.ResourceMap,this._byOwner.set(t,s)),s.set(e,i)}get(e,t){return this._byResource.get(e)?.get(t)}delete(e,t){let i=!1,n=!1;const s=this._byResource.get(e);s&&(i=s.delete(t));const r=this._byOwner.get(t);if(r&&(n=r.delete(e)),i!==n)throw new Error("illegal state");return i&&n}values(e){return typeof e=="string"?this._byOwner.get(e)?.values()??l.Iterable.empty():l.URI.isUri(e)?this._byResource.get(e)?.values()??l.Iterable.empty():l.Iterable.map(l.Iterable.concat(...this._byOwner.values()),t=>t[1])}}class mZ{constructor(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new l.ResourceMap,this._service=e,this._subscription=e.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(e){for(const t of e){const i=this._data.get(t);i&&this._substract(i);const n=this._resourceStats(t);this._add(n),this._data.set(t,n)}}_resourceStats(e){const t={errors:0,warnings:0,infos:0,unknowns:0};if(fZ.has(e.scheme))return t;for(const{severity:i}of this._service.read({resource:e}))i===_.MarkerSeverity$1.Error?t.errors+=1:i===_.MarkerSeverity$1.Warning?t.warnings+=1:i===_.MarkerSeverity$1.Info?t.infos+=1:t.unknowns+=1;return t}_substract(e){this.errors-=e.errors,this.warnings-=e.warnings,this.infos-=e.infos,this.unknowns-=e.unknowns}_add(e){this.errors+=e.errors,this.warnings+=e.warnings,this.infos+=e.infos,this.unknowns+=e.unknowns}}class al{constructor(){this._onMarkerChanged=new l.MicrotaskEmitter({merge:al._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new gZ,this._stats=new mZ(this),this._filteredResources=new l.ResourceMap}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(e,t){for(const i of t||[])this.changeOne(e,i,[])}changeOne(e,t,i){if(l.isFalsyOrEmpty(i))this._data.delete(t,e)&&this._onMarkerChanged.fire([t]);else{const n=[];for(const s of i){const r=al._toMarker(e,t,s);r&&n.push(r)}this._data.set(t,e,n),this._onMarkerChanged.fire([t])}}static _toMarker(e,t,i){let{code:n,severity:s,message:r,source:a,startLineNumber:c,startColumn:h,endLineNumber:d,endColumn:u,relatedInformation:f,modelVersionId:g,tags:m,origin:p}=i;if(r)return c=c>0?c:1,h=h>0?h:1,d=d>=c?d:c,u=u>0?u:h,{resource:t,owner:e,code:n,severity:s,message:r,source:a,startLineNumber:c,startColumn:h,endLineNumber:d,endColumn:u,relatedInformation:f,modelVersionId:g,tags:m,origin:p}}changeAll(e,t){const i=[],n=this._data.values(e);if(n)for(const s of n){const r=l.Iterable.first(s);r&&(i.push(r.resource),this._data.delete(r.resource,e))}if(l.isNonEmptyArray(t)){const s=new l.ResourceMap;for(const{resource:r,marker:a}of t){const c=al._toMarker(e,r,a);if(!c)continue;const h=s.get(r);h?h.push(c):(s.set(r,[c]),i.push(r))}for(const[r,a]of s)this._data.set(r,e,a)}i.length>0&&this._onMarkerChanged.fire(i)}_createFilteredMarker(e,t){const i=t.length===1?l.localize(1801,'Problems are paused because: "{0}"',t[0]):l.localize(1802,'Problems are paused because: "{0}" and {1} more',t[0],t.length-1);return{owner:"markersFilter",resource:e,severity:_.MarkerSeverity$1.Info,message:i,startLineNumber:1,startColumn:1,endLineNumber:1,endColumn:1}}read(e=Object.create(null)){let{owner:t,resource:i,severities:n,take:s}=e;if((!s||s<0)&&(s=-1),t&&i){const r=e.ignoreResourceFilters?void 0:this._filteredResources.get(i);if(r?.length)return[this._createFilteredMarker(i,r)];const a=this._data.get(i,t);if(!a)return[];const c=[];for(const h of a){if(s>0&&c.length===s)break;const d=e.ignoreResourceFilters?void 0:this._filteredResources.get(i);d?.length?c.push(this._createFilteredMarker(i,d)):al._accept(h,n)&&c.push(h)}return c}else{const r=!t&&!i?this._data.values():this._data.values(i??t),a=[],c=new l.ResourceSet;for(const h of r)for(const d of h){if(c.has(d.resource))continue;if(s>0&&a.length===s)break;const u=e.ignoreResourceFilters?void 0:this._filteredResources.get(d.resource);u?.length?(a.push(this._createFilteredMarker(d.resource,u)),c.add(d.resource)):al._accept(d,n)&&a.push(d)}return a}}static _accept(e,t){return t===void 0||(t&e.severity)===e.severity}static _merge(e){const t=new l.ResourceMap;for(const i of e)for(const n of i)t.set(n,!0);return Array.from(t.keys())}}const CA=le("progressService"),fD=class fD{constructor(e){this.callback=e}report(e){this._value=e,this.callback(this._value)}};fD.None=Object.freeze({report(){}});let xL=fD;const d_=le("editorProgressService");class vA{constructor(){this._modifierObservables=new WeakMap}readModifierKeyStatus(e,t){const i=e instanceof Window?e:j(e);let n=this._modifierObservables.get(i);if(!n){const s=hs.getInstance();n=mt(this,s.event,()=>({ctrlKey:s.keyStatus.ctrlKey,shiftKey:s.keyStatus.shiftKey,altKey:s.keyStatus.altKey,metaKey:s.keyStatus.metaKey})),this._modifierObservables.set(i,n)}return n.read(t)}createFocusTracker(e,t){const i=t.add(Xr(e)),s=W("isFocused",(r=>{if(r instanceof Window)return r.document.hasFocus();const a=r.getRootNode()instanceof ShadowRoot?r.getRootNode():null,c=a?a.activeElement:r.ownerDocument.activeElement;return r.contains(c)})(e));return t.add(i.onDidFocus(()=>s.set(!0,void 0))),t.add(i.onDidBlur(()=>s.set(!1,void 0))),s}createHoverTracker(e,t){const i=W("isHovered",!1),n=()=>i.set(!0,void 0),s=()=>i.set(!1,void 0);return e.addEventListener("mouseenter",n),e.addEventListener("mouseleave",s),t.add({dispose:()=>{e.removeEventListener("mouseenter",n),e.removeEventListener("mouseleave",s)}}),i}createDomFocusTracker(e){return Xr(e)}}fe(Na,vA,1);const wA=le("contextService");function SA(o){const e=o;return typeof e?.id=="string"&&l.URI.isUri(e.uri)}function pZ(o){return typeof o?.id=="string"&&!SA(o)&&!CZ(o)}const _Z={id:"empty-window"};function bZ(o,e){if(typeof o=="string"||typeof o>"u")return typeof o=="string"?{id:l.basename(o)}:_Z;const t=o;return t.configuration?{id:t.id,configPath:t.configuration}:t.folders.length===1?{id:t.id,uri:t.folders[0].uri}:{id:t.id}}function CZ(o){const e=o;return typeof e?.id=="string"&&l.URI.isUri(e.configPath)}class vZ{constructor(e,t){this.raw=t,this.uri=e.uri,this.index=e.index,this.name=e.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}const yA="code-workspace";l.localize(2119,"Code Workspace");const LA="4064f6ec-cb38-4ad0-af64-ee6467e63c82";function wZ(o){return o.id===LA}const DA=le("workspaceTrustManagementService"),xA=le("IWorkspaceEditService");class EL{constructor(e){this.metadata=e}static convert(e){return e.edits.map(t=>{if(Er.is(t))return Er.lift(t);if(lh.is(t))return lh.lift(t);throw new Error("Unsupported edit")})}}class Er extends EL{static is(e){return e instanceof Er?!0:l.isObject(e)&&l.URI.isUri(e.resource)&&l.isObject(e.textEdit)}static lift(e){return e instanceof Er?e:new Er(e.resource,e.textEdit,e.versionId,e.metadata)}constructor(e,t,i=void 0,n){super(n),this.resource=e,this.textEdit=t,this.versionId=i}}class lh extends EL{static is(e){return e instanceof lh?!0:l.isObject(e)&&(!!e.newResource||!!e.oldResource)}static lift(e){return e instanceof lh?e:new lh(e.oldResource,e.newResource,e.options,e.metadata)}constructor(e,t,i={},n){super(n),this.oldResource=e,this.newResource=t,this.options=i}}var u_;(function(o){o[o.API=0]="API",o[o.USER=1]="USER"})(u_||(u_={}));var IL=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},f_=function(o,e){return function(t,i){e(t,i,o)}};let TL=class{constructor(e){this._commandService=e}async open(e,t){if(!l.matchesScheme(e,l.Schemas.command))return!1;if(!t?.allowCommands||(typeof e=="string"&&(e=l.URI.parse(e)),Array.isArray(t.allowCommands)&&!t.allowCommands.includes(e.path)))return!0;let i=[];try{i=FS(decodeURIComponent(e.query))}catch{try{i=FS(e.query)}catch{}}return Array.isArray(i)||(i=[i]),await this._commandService.executeCommand(e.path,...i),!0}};TL=IL([f_(0,zi)],TL);let NL=class{constructor(e){this._editorService=e}async open(e,t){typeof e=="string"&&(e=l.URI.parse(e));const{selection:i,uri:n}=a7(e);return e=n,e.scheme===l.Schemas.file&&(e=gB(e)),await this._editorService.openCodeEditor({resource:e,options:{selection:i,source:t?.fromUserGesture?u_.USER:u_.API,...t?.editorOptions}},this._editorService.getFocusedCodeEditor(),t?.openToSide),!0}};NL=IL([f_(0,pt)],NL);let RL=class{constructor(e,t){this._openers=new l.LinkedList,this._validators=new l.LinkedList,this._resolvers=new l.LinkedList,this._resolvedUriTargets=new l.ResourceMap(i=>i.with({path:null,fragment:null,query:null}).toString()),this._externalOpeners=new l.LinkedList,this._defaultExternalOpener={openExternal:async i=>(l.matchesSomeScheme(i,l.Schemas.http,l.Schemas.https)?fx(i):Ae.location.href=i,!0)},this._openers.push({open:async(i,n)=>n?.openExternal||l.matchesSomeScheme(i,l.Schemas.mailto,l.Schemas.http,l.Schemas.https,l.Schemas.vsls)?(await this._doOpenExternal(i,n),!0):!1}),this._openers.push(new TL(t)),this._openers.push(new NL(e))}registerOpener(e){return{dispose:this._openers.unshift(e)}}async open(e,t){const i=typeof e=="string"?l.URI.parse(e):e;if(i.scheme===l.Schemas.internal)return!1;if(!t?.skipValidation){const n=this._resolvedUriTargets.get(i)??e;for(const s of this._validators)if(!await s.shouldOpen(n,t))return!1}for(const n of this._openers)if(await n.open(e,t))return!0;return!1}async resolveExternalUri(e,t){for(const i of this._resolvers)try{const n=await i.resolveExternalUri(e,t);if(n)return this._resolvedUriTargets.has(n.resolved)||this._resolvedUriTargets.set(n.resolved,e),n}catch{}throw new Error("Could not resolve external URI: "+e.toString())}async _doOpenExternal(e,t){const i=typeof e=="string"?l.URI.parse(e):e;let n;try{n=(await this.resolveExternalUri(i,t)).resolved}catch{n=i}let s;if(typeof e=="string"&&i.toString()===n.toString()?s=e:s=encodeURI(n.toString(!0)),t?.allowContributedOpeners){const r=typeof t?.allowContributedOpeners=="string"?t?.allowContributedOpeners:void 0;for(const a of this._externalOpeners)if(await a.openExternal(s,{sourceUri:i,preferredOpenerId:r},l.CancellationToken.None))return!0}return this._defaultExternalOpener.openExternal(s,{sourceUri:i},l.CancellationToken.None)}dispose(){this._validators.clear()}};RL=IL([f_(0,pt),f_(1,zi)],RL);const EA=le("renameSymbolTrackerService");class SZ{constructor(){this._trackedWord=W(this,void 0),this.trackedWord=this._trackedWord,this._trackedWord.set(void 0,void 0)}}const Yt={enableSplitViewResizing:!0,renderSideBySide:!0,renderMarginRevertIcon:!0,renderGutterMenu:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit",diffAlgorithm:"advanced",accessibilityVerbose:!1,experimental:{showMoves:!1,showEmptyDecorations:!0,useTrueInlineView:!1},hideUnchangedRegions:{enabled:!1,contextLineCount:3,minimumLineCount:3,revealLineCount:20},isInEmbeddedEditor:!1,onlyShowAccessibleDiffViewer:!1,renderSideBySideInlineBreakpoint:900,useInlineViewWhenSpaceIsLimited:!0,compactMode:!1},IA=Object.freeze({id:"editor",order:5,type:"object",title:l.localize(163,"Editor"),scope:6}),g_={...IA,properties:{"editor.tabSize":{type:"number",default:zt.tabSize,minimum:1,maximum:100,markdownDescription:l.localize(164,"The number of spaces a tab is equal to. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.indentSize":{anyOf:[{type:"string",enum:["tabSize"]},{type:"number",minimum:1}],default:"tabSize",markdownDescription:l.localize(165,'The number of spaces used for indentation or `"tabSize"` to use the value from `#editor.tabSize#`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.')},"editor.insertSpaces":{type:"boolean",default:zt.insertSpaces,markdownDescription:l.localize(166,"Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.detectIndentation":{type:"boolean",default:zt.detectIndentation,markdownDescription:l.localize(167,"Controls whether {0} and {1} will be automatically detected when a file is opened based on the file contents.","`#editor.tabSize#`","`#editor.insertSpaces#`")},"editor.trimAutoWhitespace":{type:"boolean",default:zt.trimAutoWhitespace,description:l.localize(168,"Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:zt.largeFileOptimizations,description:l.localize(169,"Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{enum:["off","offWithInlineSuggestions","currentDocument","matchingDocuments","allDocuments"],default:"offWithInlineSuggestions",enumDescriptions:[l.localize(170,"Turn off Word Based Suggestions."),l.localize(171,"Turn off Word Based Suggestions when Inline Suggestions are present."),l.localize(172,"Only suggest words from the active document."),l.localize(173,"Suggest words from all open documents of the same language."),l.localize(174,"Suggest words from all open documents.")],description:l.localize(175,"Controls whether completions should be computed based on words in the document and from which documents they are computed."),experiment:{mode:"auto"}},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[l.localize(176,"Semantic highlighting enabled for all color themes."),l.localize(177,"Semantic highlighting disabled for all color themes."),l.localize(178,"Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:l.localize(179,"Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:l.localize(180,"Keep peek editors open even when double-clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:l.localize(181,"Lines above this length will not be tokenized for performance reasons")},"editor.experimental.asyncTokenization":{type:"boolean",default:!0,description:l.localize(182,"Controls whether the tokenization should happen asynchronously on a web worker."),tags:["experimental"]},"editor.experimental.asyncTokenizationLogging":{type:"boolean",default:!1,description:l.localize(183,"Controls whether async tokenization should be logged. For debugging only.")},"editor.experimental.asyncTokenizationVerification":{type:"boolean",default:!1,description:l.localize(184,"Controls whether async tokenization should be verified against legacy background tokenization. Might slow down tokenization. For debugging only."),tags:["experimental"]},"editor.experimental.treeSitterTelemetry":{type:"boolean",default:!1,markdownDescription:l.localize(185,"Controls whether tree sitter parsing should be turned on and telemetry collected. Setting `#editor.experimental.preferTreeSitter#` for specific languages will take precedence."),tags:["experimental"],experiment:{mode:"auto"}},"editor.experimental.preferTreeSitter.css":{type:"boolean",default:!1,markdownDescription:l.localize(186,"Controls whether tree sitter parsing should be turned on for css. This will take precedence over `#editor.experimental.treeSitterTelemetry#` for css."),tags:["experimental"],experiment:{mode:"auto"}},"editor.experimental.preferTreeSitter.typescript":{type:"boolean",default:!1,markdownDescription:l.localize(187,"Controls whether tree sitter parsing should be turned on for typescript. This will take precedence over `#editor.experimental.treeSitterTelemetry#` for typescript."),tags:["experimental"],experiment:{mode:"auto"}},"editor.experimental.preferTreeSitter.ini":{type:"boolean",default:!1,markdownDescription:l.localize(188,"Controls whether tree sitter parsing should be turned on for ini. This will take precedence over `#editor.experimental.treeSitterTelemetry#` for ini."),tags:["experimental"],experiment:{mode:"auto"}},"editor.experimental.preferTreeSitter.regex":{type:"boolean",default:!1,markdownDescription:l.localize(189,"Controls whether tree sitter parsing should be turned on for regex. This will take precedence over `#editor.experimental.treeSitterTelemetry#` for regex."),tags:["experimental"],experiment:{mode:"auto"}},"editor.language.brackets":{type:["array","null"],default:null,description:l.localize(190,"Defines the bracket symbols that increase or decrease the indentation."),items:{type:"array",items:[{type:"string",description:l.localize(191,"The opening bracket character or string sequence.")},{type:"string",description:l.localize(192,"The closing bracket character or string sequence.")}]}},"editor.language.colorizedBracketPairs":{type:["array","null"],default:null,description:l.localize(193,"Defines the bracket pairs that are colorized by their nesting level if bracket pair colorization is enabled."),items:{type:"array",items:[{type:"string",description:l.localize(194,"The opening bracket character or string sequence.")},{type:"string",description:l.localize(195,"The closing bracket character or string sequence.")}]}},"diffEditor.maxComputationTime":{type:"number",default:Yt.maxComputationTime,description:l.localize(196,"Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.maxFileSize":{type:"number",default:Yt.maxFileSize,description:l.localize(197,"Maximum file size in MB for which to compute diffs. Use 0 for no limit.")},"diffEditor.renderSideBySide":{type:"boolean",default:Yt.renderSideBySide,description:l.localize(198,"Controls whether the diff editor shows the diff side by side or inline."),agentsWindow:{default:!0}},"diffEditor.renderSideBySideInlineBreakpoint":{type:"number",default:Yt.renderSideBySideInlineBreakpoint,description:l.localize(199,"If the diff editor width is smaller than this value, the inline view is used.")},"diffEditor.useInlineViewWhenSpaceIsLimited":{type:"boolean",default:Yt.useInlineViewWhenSpaceIsLimited,description:l.localize(200,"If enabled and the editor width is too small, the inline view is used."),agentsWindow:{default:!0}},"diffEditor.renderMarginRevertIcon":{type:"boolean",default:Yt.renderMarginRevertIcon,description:l.localize(201,"When enabled, the diff editor shows arrows in its glyph margin to revert changes."),agentsWindow:{default:!1}},"diffEditor.renderGutterMenu":{type:"boolean",default:Yt.renderGutterMenu,description:l.localize(202,"When enabled, the diff editor shows a special gutter for revert and stage actions."),agentsWindow:{default:!1}},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:Yt.ignoreTrimWhitespace,description:l.localize(203,"When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:Yt.renderIndicators,description:l.localize(204,"Controls whether the diff editor shows +/- indicators for added/removed changes."),agentsWindow:{default:!1}},"diffEditor.codeLens":{type:"boolean",default:Yt.diffCodeLens,description:l.localize(205,"Controls whether the editor shows CodeLens.")},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:Yt.diffWordWrap,markdownEnumDescriptions:[l.localize(206,"Lines will never wrap."),l.localize(207,"Lines will wrap at the viewport width."),l.localize(208,"Lines will wrap according to the {0} setting.","`#editor.wordWrap#`")]},"diffEditor.diffAlgorithm":{type:"string",enum:["legacy","advanced","advanced-external","advanced-wasm"],default:Yt.diffAlgorithm,markdownEnumDescriptions:[l.localize(209,"Uses the legacy diffing algorithm."),l.localize(210,"Uses the advanced diffing algorithm."),l.localize(211,"Uses the advanced diffing algorithm from the external `@vscode/diff` package (pure JavaScript)."),l.localize(212,"Uses the advanced diffing algorithm from the external `@vscode/diff` package (WebAssembly).")]},"diffEditor.hideUnchangedRegions.enabled":{type:"boolean",default:Yt.hideUnchangedRegions.enabled,markdownDescription:l.localize(213,"Controls whether the diff editor shows unchanged regions."),agentsWindow:{default:!0}},"diffEditor.hideUnchangedRegions.revealLineCount":{type:"integer",default:Yt.hideUnchangedRegions.revealLineCount,markdownDescription:l.localize(214,"Controls how many lines are used for unchanged regions."),minimum:1},"diffEditor.hideUnchangedRegions.minimumLineCount":{type:"integer",default:Yt.hideUnchangedRegions.minimumLineCount,markdownDescription:l.localize(215,"Controls how many lines are used as a minimum for unchanged regions."),minimum:1},"diffEditor.hideUnchangedRegions.contextLineCount":{type:"integer",default:Yt.hideUnchangedRegions.contextLineCount,markdownDescription:l.localize(216,"Controls how many lines are used as context when comparing unchanged regions."),minimum:1},"diffEditor.experimental.showMoves":{type:"boolean",default:Yt.experimental.showMoves,markdownDescription:l.localize(217,"Controls whether the diff editor should show detected code moves.")},"diffEditor.experimental.showEmptyDecorations":{type:"boolean",default:Yt.experimental.showEmptyDecorations,description:l.localize(218,"Controls whether the diff editor shows empty decorations to see where characters got inserted or deleted.")},"diffEditor.experimental.useTrueInlineView":{type:"boolean",default:Yt.experimental.useTrueInlineView,description:l.localize(219,"If enabled and the editor uses the inline view, word changes are rendered inline.")}}};function yZ(o){return typeof o.type<"u"||typeof o.anyOf<"u"}for(const o of Vl){const e=o.schema;if(typeof e<"u")if(yZ(e))g_.properties[`editor.${o.name}`]=e;else for(const t in e)Object.hasOwnProperty.call(e,t)&&(g_.properties[t]=e[t])}let m_=null;function TA(){return m_===null&&(m_=Object.create(null),Object.keys(g_.properties).forEach(o=>{m_[o]=!0})),m_}function LZ(o){return TA()[`editor.${o}`]||!1}function DZ(o){return TA()[`diffEditor.${o}`]||!1}St.as(Xo.Configuration).registerConfiguration(g_);class p_{static insert(e,t){return{range:new l.Range(e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0}}static delete(e){return{range:e,text:null}}static replace(e,t){return{range:e,text:t}}static replaceMove(e,t){return{range:e,text:t,forceMoveMarkers:!0}}}const NA=[];function xZ(o){NA.push(o)}function EZ(){return NA.slice(0)}let ch=[],ML=[],RA=[];function __(o,e=!1){IZ(o,!1,e)}function IZ(o,e,t){const i=TZ(o,e);ch.push(i),i.userConfigured?RA.push(i):ML.push(i),t&&!i.userConfigured&&ch.forEach(n=>{n.mime===i.mime||n.userConfigured||(i.extension&&n.extension===i.extension&&console.warn(`Overwriting extension <<${i.extension}>> to now point to mime <<${i.mime}>>`),i.filename&&n.filename===i.filename&&console.warn(`Overwriting filename <<${i.filename}>> to now point to mime <<${i.mime}>>`),i.filepattern&&n.filepattern===i.filepattern&&console.warn(`Overwriting filepattern <<${i.filepattern}>> to now point to mime <<${i.mime}>>`),i.firstline&&n.firstline===i.firstline&&console.warn(`Overwriting firstline <<${i.firstline}>> to now point to mime <<${i.mime}>>`))})}function TZ(o,e){return{id:o.id,mime:o.mime,filename:o.filename,extension:o.extension,filepattern:o.filepattern,firstline:o.firstline,userConfigured:e,filepatternParsed:o.filepattern?UR(o.filepattern,{ignoreCase:!0}):void 0,filepatternOnPath:o.filepattern?o.filepattern.indexOf(l.posix.sep)>=0:!1}}function NZ(){ch=ch.filter(o=>o.userConfigured),ML=[]}function RZ(o,e){return MZ(o,e).map(t=>t.id)}function MZ(o,e){let t;if(o)switch(o.scheme){case l.Schemas.file:t=o.fsPath;break;case l.Schemas.data:{t=_.DataUri.parseMetaData(o).get(_.DataUri.META_DATA_LABEL);break}case l.Schemas.vscodeNotebookCell:t=void 0;break;default:t=o.path}if(!t)return[{id:"unknown",mime:mn.unknown}];t=t.toLowerCase();const i=l.basename(t),n=MA(t,i,RA);if(n)return[n,{id:pn,mime:mn.text}];const s=MA(t,i,ML);if(s)return[s,{id:pn,mime:mn.text}];if(e){const r=AZ(e);if(r)return[r,{id:pn,mime:mn.text}]}return[{id:"unknown",mime:mn.unknown}]}function MA(o,e,t){let i,n,s;for(let r=t.length-1;r>=0;r--){const a=t[r];if(l.equals$2(e,a.filename)){i=a;break}if(a.filepattern&&(!n||a.filepattern.length>n.filepattern.length)){const c=a.filepatternOnPath?o:e;a.filepatternParsed?.(c)&&(n=a)}a.extension&&(!s||a.extension.length>s.extension.length)&&l.endsWithIgnoreCase(e,a.extension)&&(s=a)}if(i)return i;if(n)return n;if(s)return s}function AZ(o){if(l.startsWithUTF8BOM(o)&&(o=o.substring(1)),o.length>0)for(let e=ch.length-1;e>=0;e--){const t=ch[e];if(!t.firstline)continue;const i=o.match(t.firstline);if(i&&i.length>0)return t}}const b_=Object.prototype.hasOwnProperty,AA="vs.editor.nullLanguage";class OZ{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(AA,0),this._register(pn,1),this._nextLanguageId=2}_register(e,t){this._languageIdToLanguage[t]=e,this._languageToLanguageId.set(e,t)}register(e){if(this._languageToLanguageId.has(e))return;const t=this._nextLanguageId++;this._register(e,t)}encodeLanguageId(e){return this._languageToLanguageId.get(e)||0}decodeLanguageId(e){return this._languageIdToLanguage[e]||AA}}const yf=class yf extends l.Disposable{constructor(e=!0,t=!1){super(),this._onDidChange=this._register(new l.Emitter),this.onDidChange=this._onDidChange.event,yf.instanceCount++,this._warnOnOverwrite=t,this.languageIdCodec=new OZ,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(Jl.onDidChangeLanguages(i=>{this._initializeFromRegistry()})))}dispose(){yf.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},NZ();const e=[].concat(Jl.getLanguages()).concat(this._dynamicLanguages);this._registerLanguages(e)}_registerLanguages(e){for(const t of e)this._registerLanguage(t);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach(t=>{const i=this._languages[t];i.name&&(this._nameMap[i.name]=i.identifier),i.aliases.forEach(n=>{this._lowercaseNameMap[n.toLowerCase()]=i.identifier}),i.mimetypes.forEach(n=>{this._mimeTypesMap[n]=i.identifier})}),St.as(Xo.Configuration).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(e){const t=e.id;let i;b_.call(this._languages,t)?i=this._languages[t]:(this.languageIdCodec.register(t),i={identifier:t,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[],icons:[]},this._languages[t]=i),this._mergeLanguage(i,e)}_mergeLanguage(e,t){const i=t.id;let n=null;if(Array.isArray(t.mimetypes)&&t.mimetypes.length>0&&(e.mimetypes.push(...t.mimetypes),n=t.mimetypes[0]),n||(n=`text/x-${i}`,e.mimetypes.push(n)),Array.isArray(t.extensions)){t.configuration?e.extensions=t.extensions.concat(e.extensions):e.extensions=e.extensions.concat(t.extensions);for(const a of t.extensions)__({id:i,mime:n,extension:a},this._warnOnOverwrite)}if(Array.isArray(t.filenames))for(const a of t.filenames)__({id:i,mime:n,filename:a},this._warnOnOverwrite),e.filenames.push(a);if(Array.isArray(t.filenamePatterns))for(const a of t.filenamePatterns)__({id:i,mime:n,filepattern:a},this._warnOnOverwrite);if(typeof t.firstLine=="string"&&t.firstLine.length>0){let a=t.firstLine;a.charAt(0)!=="^"&&(a="^"+a);try{const c=new RegExp(a);l.regExpLeadsToEndlessLoop(c)||__({id:i,mime:n,firstline:c},this._warnOnOverwrite)}catch(c){console.warn(`[${t.id}]: Invalid regular expression \`${a}\`: `,c)}}e.aliases.push(i);let s=null;if(typeof t.aliases<"u"&&Array.isArray(t.aliases)&&(t.aliases.length===0?s=[null]:s=t.aliases),s!==null)for(const a of s)!a||a.length===0||e.aliases.push(a);const r=s!==null&&s.length>0;if(!(r&&s[0]===null)){const a=(r?s[0]:null)||i;(r||!e.name)&&(e.name=a)}t.configuration&&e.configurationFiles.push(t.configuration),t.icon&&e.icons.push(t.icon)}isRegisteredLanguageId(e){return e?b_.call(this._languages,e):!1}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(e){const t=e.toLowerCase();return b_.call(this._lowercaseNameMap,t)?this._lowercaseNameMap[t]:null}getLanguageIdByMimeType(e){return e&&b_.call(this._mimeTypesMap,e)?this._mimeTypesMap[e]:null}guessLanguageIdByFilepathOrFirstLine(e,t){return!e&&!t?[]:RZ(e,t)}};yf.instanceCount=0;let AL=yf;const Lf=class Lf extends l.Disposable{constructor(e=!1){super(),this._onDidRequestBasicLanguageFeatures=this._register(new l.Emitter),this.onDidRequestBasicLanguageFeatures=this._onDidRequestBasicLanguageFeatures.event,this._onDidRequestRichLanguageFeatures=this._register(new l.Emitter),this.onDidRequestRichLanguageFeatures=this._onDidRequestRichLanguageFeatures.event,this._onDidChange=this._register(new l.Emitter({leakWarningThreshold:200,leakWarningName:"LanguageService._onDidChange"})),this.onDidChange=this._onDidChange.event,this._requestedBasicLanguages=new Set,this._requestedRichLanguages=new Set,Lf.instanceCount++,this._registry=this._register(new AL(!0,e)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange(()=>this._onDidChange.fire()))}dispose(){Lf.instanceCount--,super.dispose()}isRegisteredLanguageId(e){return this._registry.isRegisteredLanguageId(e)}getLanguageIdByLanguageName(e){return this._registry.getLanguageIdByLanguageName(e)}getLanguageIdByMimeType(e){return this._registry.getLanguageIdByMimeType(e)}guessLanguageIdByFilepathOrFirstLine(e,t){return this._registry.guessLanguageIdByFilepathOrFirstLine(e,t).at(0)??null}createById(e){return new OA(this.onDidChange,()=>this._createAndGetLanguageIdentifier(e))}createByFilepathOrFirstLine(e,t){return new OA(this.onDidChange,()=>{const i=this.guessLanguageIdByFilepathOrFirstLine(e,t);return this._createAndGetLanguageIdentifier(i)})}_createAndGetLanguageIdentifier(e){return(!e||!this.isRegisteredLanguageId(e))&&(e=pn),e}requestBasicLanguageFeatures(e){this._requestedBasicLanguages.has(e)||(this._requestedBasicLanguages.add(e),this._onDidRequestBasicLanguageFeatures.fire(e))}requestRichLanguageFeatures(e){this._requestedRichLanguages.has(e)||(this._requestedRichLanguages.add(e),this.requestBasicLanguageFeatures(e),l.TokenizationRegistry.getOrCreate(e),this._onDidRequestRichLanguageFeatures.fire(e))}};Lf.instanceCount=0;let OL=Lf;class OA{constructor(e,t){this._value=mt(this,e,()=>t()),this.onDidChange=l.Event.fromObservable(this._value)}get languageId(){return this._value.get()}}var PZ=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},PA=function(o,e){return function(t,i){e(t,i,o)}};let PL=class extends l.Disposable{constructor(e,t){super(),this._markerService=t,this._onDidChangeMarker=this._register(new l.Emitter),this._suppressedRanges=new l.ResourceMap,this._markerDecorations=new l.ResourceMap,e.getModels().forEach(i=>this._onModelAdded(i)),this._register(e.onModelAdded(this._onModelAdded,this)),this._register(e.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach(e=>e.dispose()),this._markerDecorations.clear()}getMarker(e,t){const i=this._markerDecorations.get(e);return i&&i.getMarker(t)||null}_handleMarkerChange(e){e.forEach(t=>{const i=this._markerDecorations.get(t);i&&this._updateDecorations(i)})}_onModelAdded(e){const t=new kZ(e);this._markerDecorations.set(e.uri,t),this._updateDecorations(t)}_onModelRemoved(e){const t=this._markerDecorations.get(e.uri);t&&(t.dispose(),this._markerDecorations.delete(e.uri)),(e.uri.scheme===l.Schemas.inMemory||e.uri.scheme===l.Schemas.internal||e.uri.scheme===l.Schemas.vscode)&&this._markerService?.read({resource:e.uri}).map(i=>i.owner).forEach(i=>this._markerService.remove(i,[e.uri]))}_updateDecorations(e){let t=this._markerService.read({resource:e.model.uri,take:500});const i=this._suppressedRanges.get(e.model.uri);i&&(t=t.filter(n=>!l.Iterable.some(i,s=>l.Range.areIntersectingOrTouching(s,n)))),e.update(t)&&this._onDidChangeMarker.fire(e.model)}};PL=PZ([PA(0,ri),PA(1,xr)],PL);class kZ extends l.Disposable{constructor(e){super(),this.model=e,this._map=new l.BidirectionalMap,this._register(l.toDisposable(()=>{this.model.deltaDecorations([...this._map.values()],[]),this._map.clear()}))}update(e){const{added:t,removed:i}=y5(new Set(this._map.keys()),new Set(e));if(t.length===0&&i.length===0)return!1;const n=i.map(a=>this._map.get(a)),s=t.map(a=>({range:this._createDecorationRange(this.model,a),options:this._createDecorationOption(a)})),r=this.model.deltaDecorations(n,s);for(const a of i)this._map.delete(a);for(let a=0;a=n)return i;const s=e.getWordAtPosition(i.getStartPosition());s&&(i=new l.Range(i.startLineNumber,s.startColumn,i.endLineNumber,s.endColumn))}else if(t.endColumn===Number.MAX_VALUE&&t.startColumn===1&&i.startLineNumber===i.endLineNumber){const n=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);n=0:!1}}var FZ=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},C_=function(o,e){return function(t,i){e(t,i,o)}},hh;function ll(o){return o.toString()}class BZ{constructor(e,t,i){this.model=e,this._modelEventListeners=new l.DisposableStore,this.model=e,this._modelEventListeners.add(e.onWillDispose(()=>t(e))),this._modelEventListeners.add(e.onDidChangeLanguage(n=>i(e,n)))}dispose(){this._modelEventListeners.dispose()}}const zZ=l.isLinux||l.isMacintosh?1:2;class VZ{constructor(e,t,i,n,s,r,a,c){this.uri=e,this.initialUndoRedoSnapshot=t,this.time=i,this.sharesUndoRedoStack=n,this.heapSize=s,this.sha1=r,this.versionId=a,this.alternativeVersionId=c}}let kL=(Il=class extends l.Disposable{constructor(e,t,i,n){super(),this._configurationService=e,this._resourcePropertiesService=t,this._undoRedoService=i,this._instantiationService=n,this._onModelAdded=this._register(new l.Emitter),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new l.Emitter),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new l.Emitter),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._register(this._configurationService.onDidChangeConfiguration(s=>this._updateModelOptions(s))),this._updateModelOptions(void 0)}static _readModelOptions(e,t){let i=zt.tabSize;e.editor&&typeof e.editor.tabSize<"u"&&(i=to(e.editor.tabSize,zt.tabSize,1,100));let n="tabSize";e.editor&&typeof e.editor.indentSize<"u"&&e.editor.indentSize!=="tabSize"&&(n=to(e.editor.indentSize,"tabSize",1,100));let s=zt.insertSpaces;e.editor&&typeof e.editor.insertSpaces<"u"&&(s=e.editor.insertSpaces==="false"?!1:!!e.editor.insertSpaces);let r=zZ;const a=e.eol;a===`\r +`?r=2:a===` +`&&(r=1);let c=zt.trimAutoWhitespace;e.editor&&typeof e.editor.trimAutoWhitespace<"u"&&(c=e.editor.trimAutoWhitespace==="false"?!1:!!e.editor.trimAutoWhitespace);let h=zt.detectIndentation;e.editor&&typeof e.editor.detectIndentation<"u"&&(h=e.editor.detectIndentation==="false"?!1:!!e.editor.detectIndentation);let d=zt.largeFileOptimizations;e.editor&&typeof e.editor.largeFileOptimizations<"u"&&(d=e.editor.largeFileOptimizations==="false"?!1:!!e.editor.largeFileOptimizations);let u=zt.bracketPairColorizationOptions;if(e.editor?.bracketPairColorization&&typeof e.editor.bracketPairColorization=="object"){const f=e.editor.bracketPairColorization;u={enabled:!!f.enabled,independentColorPoolPerBracketType:!!f.independentColorPoolPerBracketType}}return{isForSimpleWidget:t,tabSize:i,indentSize:n,insertSpaces:s,detectIndentation:h,defaultEOL:r,trimAutoWhitespace:c,largeFileOptimizations:d,bracketPairColorizationOptions:u}}_getEOL(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);const i=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return i&&typeof i=="string"&&i!=="auto"?i:l.OS===3||l.OS===2?` +`:`\r +`}_shouldRestoreUndoStack(){const e=this._configurationService.getValue("files.restoreUndoStack");return typeof e=="boolean"?e:!0}getCreationOptions(e,t,i){const n=typeof e=="string"?e:e.languageId;let s=this._modelCreationOptionsByLanguageAndResource[n+t];if(!s){const r=this._configurationService.getValue("editor",{overrideIdentifier:n,resource:t}),a=this._getEOL(t,n);s=hh._readModelOptions({editor:r,eol:a},i),this._modelCreationOptionsByLanguageAndResource[n+t]=s}return s}_updateModelOptions(e){const t=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const i=Object.keys(this._models);for(let n=0,s=i.length;ne){const t=[];for(this._disposedModels.forEach(i=>{i.sharesUndoRedoStack||t.push(i)}),t.sort((i,n)=>i.time-n.time);t.length>0&&this._disposedModelsHeapSize>e;){const i=t.shift();this._removeDisposedModel(i.uri),i.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(i.initialUndoRedoSnapshot)}}}_createModelData(e,t,i,n){const s=this.getCreationOptions(t,i,n),r=this._instantiationService.createInstance(_.TextModel,e,t,s,i);if(i&&this._disposedModels.has(ll(i))){const h=this._removeDisposedModel(i),d=this._undoRedoService.getElements(i),u=this._getSHA1Computer(),f=u.canComputeSHA1(r)?u.computeSHA1(r)===h.sha1:!1;if(f||h.sharesUndoRedoStack){for(const g of d.past)bo(g)&&g.matchesResource(i)&&g.setModel(r);for(const g of d.future)bo(g)&&g.matchesResource(i)&&g.setModel(r);this._undoRedoService.setElementsValidFlag(i,!0,g=>bo(g)&&g.matchesResource(i)),f&&(r._overwriteVersionId(h.versionId),r._overwriteAlternativeVersionId(h.alternativeVersionId),r._overwriteInitialUndoRedoSnapshot(h.initialUndoRedoSnapshot))}else h.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(h.initialUndoRedoSnapshot)}const a=ll(r.uri);if(this._models[a])throw new Error("ModelService: Cannot add model because it already exists!");const c=new BZ(r,h=>this._onWillDispose(h),(h,d)=>this._onDidChangeLanguage(h,d));return this._models[a]=c,c}createModel(e,t,i,n=!1){let s;return t?s=this._createModelData(e,t,i,n):s=this._createModelData(e,pn,i,n),this._onModelAdded.fire(s.model),s.model}getModels(){const e=[],t=Object.keys(this._models);for(let i=0,n=t.length;i0||h.future.length>0){for(const d of h.past)bo(d)&&d.matchesResource(e.uri)&&(s=!0,r+=d.heapSize(e.uri),d.setModel(e.uri));for(const d of h.future)bo(d)&&d.matchesResource(e.uri)&&(s=!0,r+=d.heapSize(e.uri),d.setModel(e.uri))}}const a=hh.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK,c=this._getSHA1Computer();if(s)if(!n&&(r>a||!c.canComputeSHA1(e))){const h=i.model.getInitialUndoRedoSnapshot();h!==null&&this._undoRedoService.restoreSnapshot(h)}else this._ensureDisposedModelsHeapSize(a-r),this._undoRedoService.setElementsValidFlag(e.uri,!1,h=>bo(h)&&h.matchesResource(e.uri)),this._insertDisposedModel(new VZ(e.uri,i.model.getInitialUndoRedoSnapshot(),Date.now(),n,r,c.computeSHA1(e),e.getVersionId(),e.getAlternativeVersionId()));else if(!n){const h=i.model.getInitialUndoRedoSnapshot();h!==null&&this._undoRedoService.restoreSnapshot(h)}delete this._models[t],i.dispose(),delete this._modelCreationOptionsByLanguageAndResource[e.getLanguageId()+e.uri],this._onModelRemoved.fire(e)}_onDidChangeLanguage(e,t){const i=t.oldLanguage,n=e.getLanguageId(),s=this.getCreationOptions(i,e.uri,e.isForSimpleWidget),r=this.getCreationOptions(n,e.uri,e.isForSimpleWidget);hh._setModelOptionsForModel(e,r,s),this._onModelModeChanged.fire({model:e,oldLanguageId:i})}_getSHA1Computer(){return new FL}},hh=Il,Il.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20*1024*1024,Il);kL=hh=FZ([C_(0,Ge),C_(1,cE),C_(2,bw),C_(3,me)],kL);const bb=class bb{canComputeSHA1(e){return e.getValueLength()<=bb.MAX_MODEL_SIZE}computeSHA1(e){const t=new l.StringSHA1,i=e.createSnapshot();let n;for(;n=i.read();)t.update(n);return t.digest()}};bb.MAX_MODEL_SIZE=10*1024*1024;let FL=bb;_.InspectTokensNLS=void 0,(function(o){o.inspectTokensAction=l.localize(821,"Developer: Inspect Tokens")})(_.InspectTokensNLS||(_.InspectTokensNLS={})),_.GoToLineNLS=void 0,(function(o){o.gotoLineActionLabel=l.localize(822,"Go to Line/Column..."),o.gotoOffsetActionLabel=l.localize(823,"Go to Offset...")})(_.GoToLineNLS||(_.GoToLineNLS={})),_.QuickHelpNLS=void 0,(function(o){o.helpQuickAccessActionLabel=l.localize(824,"Show all Quick Access Providers")})(_.QuickHelpNLS||(_.QuickHelpNLS={})),_.QuickCommandNLS=void 0,(function(o){o.quickCommandActionLabel=l.localize(825,"Command Palette"),o.quickCommandHelp=l.localize(826,"Show And Run Commands")})(_.QuickCommandNLS||(_.QuickCommandNLS={})),_.QuickOutlineNLS=void 0,(function(o){o.quickOutlineActionLabel=l.localize(827,"Go to Symbol..."),o.quickOutlineByCategoryActionLabel=l.localize(828,"Go to Symbol by Category...")})(_.QuickOutlineNLS||(_.QuickOutlineNLS={}));var BL;(function(o){o.editorViewAccessibleLabel=l.localize(829,"Editor content")})(BL||(BL={})),_.ToggleHighContrastNLS=void 0,(function(o){o.toggleHighContrast=l.localize(830,"Toggle High Contrast Theme")})(_.ToggleHighContrastNLS||(_.ToggleHighContrastNLS={}));var zL;(function(o){o.bulkEditServiceSummary=l.localize(831,"Made {0} edits in {1} files")})(zL||(zL={}));const Tn=le("themeService");var VL;(function(o){o[o.PRESERVE=0]="PRESERVE",o[o.LAST=1]="LAST"})(VL||(VL={}));const UL={Quickaccess:"workbench.contributions.quickaccess"};class UZ{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(e){return e.prefix.length===0?this.defaultProvider=e:this.providers.push(e),this.providers.sort((t,i)=>i.prefix.length-t.prefix.length),l.toDisposable(()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)})}getQuickAccessProviders(e){return l.coalesce([this.defaultProvider,...this.providers]).filter(t=>!t.when||e.contextMatchesRules(t.when))}getQuickAccessProvider(e,t){return(e?this.providers.find(n=>e.startsWith(n.prefix)&&(!n.when||t.contextMatchesRules(n.when))):void 0)||this.defaultProvider}}St.add(UL.Quickaccess,new UZ);var $Z=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},$L=function(o,e){return function(t,i){e(t,i,o)}};let KL=class extends l.Disposable{constructor(e,t,i){super(),this.quickInputService=e,this.instantiationService=t,this.contextKeyService=i,this.registry=St.as(UL.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0,this._register(l.toDisposable(()=>{for(const n of this.mapProviderToDescriptor.values())l.isDisposable(n)&&n.dispose();this.visibleQuickAccess?.picker.dispose()}))}show(e="",t){this.doShowOrPick(e,!1,t)}doShowOrPick(e,t,i){const[n,s]=this.getOrInstantiateProvider(e,i?.enabledProviderPrefixes),r=this.visibleQuickAccess,a=r?.descriptor;if(r&&s&&a===s){e!==s.prefix&&!i?.preserveValue&&(r.picker.value=e),this.adjustValueSelection(r.picker,s,i);return}if(s&&!i?.preserveValue){let m;if(r&&a&&a!==s){const p=r.value.substr(a.prefix.length);p&&(m=`${s.prefix}${p}`)}if(!m){const p=n?.defaultFilterValue;p===VL.LAST?m=this.lastAcceptedPickerValues.get(s):typeof p=="string"&&(m=`${s.prefix}${p}`)}typeof m=="string"&&(e=m)}const c=r?.picker?.valueSelection,h=r?.picker?.value,d=new l.DisposableStore,u=d.add(this.quickInputService.createQuickPick({useSeparators:!0}));u.value=e,this.adjustValueSelection(u,s,i),u.placeholder=i?.placeholder??s?.placeholder,u.quickNavigate=i?.quickNavigateConfiguration,u.hideInput=!!u.quickNavigate&&!r,(typeof i?.itemActivation=="number"||i?.quickNavigateConfiguration)&&(u.itemActivation=i?.itemActivation??_.ItemActivation.SECOND),u.contextKey=s?.contextKey,u.filterValue=m=>m.substring(s?s.prefix.length:0);let f;t&&(f=new l.DeferredPromise,d.add(l.Event.once(u.onWillAccept)(m=>{m.veto(),u.hide()}))),d.add(this.registerPickerListeners(u,n,s,e,i));const g=d.add(new l.CancellationTokenSource);if(n&&d.add(n.provide(u,g.token,i?.providerOptions)),l.Event.once(u.onDidHide)(()=>{u.selectedItems.length===0&&g.cancel(),d.dispose(),f?.complete(u.selectedItems.slice(0))}),u.show(),c&&h===e&&(u.valueSelection=c),t)return f?.p}adjustValueSelection(e,t,i){let n;i?.preserveValue?n=[e.value.length,e.value.length]:n=[t?.prefix.length??0,e.value.length],e.valueSelection=n}registerPickerListeners(e,t,i,n,s){const r=new l.DisposableStore,a=this.visibleQuickAccess={picker:e,descriptor:i,value:n};return r.add(l.toDisposable(()=>{a===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)})),r.add(e.onDidChangeValue(c=>{const[h]=this.getOrInstantiateProvider(c,s?.enabledProviderPrefixes);h!==t?this.show(c,{enabledProviderPrefixes:s?.enabledProviderPrefixes,preserveValue:!0,providerOptions:s?.providerOptions}):a.value=c})),i&&r.add(e.onDidAccept(()=>{this.lastAcceptedPickerValues.set(i,e.value)})),r}getOrInstantiateProvider(e,t){const i=this.registry.getQuickAccessProvider(e,this.contextKeyService);if(!i||t&&!t?.includes(i.prefix))return[void 0,void 0];let n=this.mapProviderToDescriptor.get(i);return n||(n=this.instantiationService.createInstance(i.ctor),this.mapProviderToDescriptor.set(i,n)),[n,i]}};KL=$Z([$L(0,Ps),$L(1,me),$L(2,be)],KL);var KZ=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s};class kA{constructor(e){this.nodes=e}toString(){return this.nodes.map(e=>typeof e=="string"?e:e.label).join("")}}KZ([et],kA.prototype,"toString",null);const GZ=/\[([^\]]+)\]\(((?:https?:\/\/|command:|file:)[^\)\s]+)(?: (["'])(.+?)(\3))?\)/gi;function jZ(o){const e=[];let t=0,i;for(;i=GZ.exec(o);){i.index-t>0&&e.push(o.substring(t,i.index));const[,n,s,,r]=i;r?e.push({label:n,href:s,title:r}):e.push({label:n,href:s}),t=i.index+i[0].length}return t(o.toggle&&(o.toggle.checked=!o.toggle.checked),t());return o.toggle?new ZZ(e,o.tooltip||"","",i,!0,o.toggle.checked,n):{id:e,label:"",tooltip:o.tooltip||"",class:i,enabled:!0,run:n}}function dh(o,e,t){const i=[],n=[];return o.forEach((s,r)=>{const a=FA(s,`${e}-${r}`,async()=>t(s));s.label&&(a.label=s.label),s.secondary?n.push(a):i.push(a)}),{primary:i,secondary:n}}function QZ(o,e,t){oi(e);const i=jZ(o);let n=0;for(const s of i.nodes)if(typeof s=="string")e.append(...vr(s));else{let r=s.title;!r&&s.href.startsWith("command:")?r=l.localize(1835,"Click to execute command '{0}'",s.href.substring(8)):r||(r=s.href);const a=Q("a",{href:s.href,title:r,tabIndex:n++},s.label);a.style.textDecoration="underline";const c=g=>{LF(g)&&ve.stop(g,!0),t.callback(s.href)},h=t.disposables.add(new Te(a,F.CLICK)).event,d=t.disposables.add(new Te(a,F.KEY_DOWN)).event,u=l.Event.chain(d,g=>g.filter(m=>{const p=new Be(m);return p.equals(10)||p.equals(3)}));t.disposables.add(li.addTarget(a));const f=t.disposables.add(new Te(a,_.EventType$1.Tap)).event;l.Event.any(h,f,u)(c,null,t.disposables),e.appendChild(a)}}var XZ=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},BA=function(o,e){return function(t,i){e(t,i,o)}};const zA="inQuickInput",JZ=new q(zA,!1,l.localize(1812,"Whether keyboard focus is inside the quick input control")),tf=de.has(zA),WZ="quickInputAlignment",HZ=new q(WZ,"top",l.localize(1813,"The alignment of the quick input")),cl="quickInputType",eQ=new q(cl,void 0,l.localize(1814,"The type of the currently visible quick input")),VA="cursorAtEndOfQuickInputBox",tQ=new q(VA,!1,l.localize(1815,"Whether the cursor in the quick input is at the end of the input box")),iQ=de.has(VA),UA={iconClass:_.ThemeIcon.asClassName(l.Codicon.quickInputBack),tooltip:l.localize(1816,"Back")},Cb=class Cb extends l.Disposable{constructor(e){super(),this.ui=e,this._visible=W("visible",!1),this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._leftButtons=[],this._rightButtons=[],this._inlineButtons=[],this._inputButtons=[],this.buttonsUpdated=!1,this.noValidationMessage=Cb.noPromptMessage,this._severity=rt.Ignore,this.onDidTriggerButtonEmitter=this._register(new l.Emitter),this.onDidHideEmitter=this._register(new l.Emitter),this.onWillHideEmitter=this._register(new l.Emitter),this.onDisposeEmitter=this._register(new l.Emitter),this.visibleDisposables=this._register(new l.DisposableStore),this.onDidTriggerButton=this.onDidTriggerButtonEmitter.event,this.onDidHide=this.onDidHideEmitter.event}get visible(){return this._visible.get()}get title(){return this._title}set title(e){this._title=e,this.update()}get description(){return this._description}set description(e){this._description=e,this.update()}get step(){return this._steps}set step(e){this._steps=e,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(e){this._totalSteps=e,this.update()}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.update()}get contextKey(){return this._contextKey}set contextKey(e){this._contextKey=e,this.update()}get busy(){return this._busy}set busy(e){this._busy=e,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(e){const t=this._ignoreFocusOut!==e&&!l.isIOS;this._ignoreFocusOut=e&&!l.isIOS,t&&this.update()}get titleButtons(){return this._leftButtons.length?[...this._leftButtons,this._rightButtons]:this._rightButtons}get buttons(){return[...this._leftButtons,...this._rightButtons,...this._inlineButtons,...this._inputButtons]}set buttons(e){const t=[],i=[],n=[],s=[];for(const r of e)if(r===UA)t.push(r);else switch(r.location){case _.QuickInputButtonLocation.Inline:n.push(r);break;case _.QuickInputButtonLocation.Input:s.push(r);break;default:i.push(r);break}this._leftButtons=t,this._rightButtons=i,this._inlineButtons=n,this._inputButtons=s,this.buttonsUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(e){this._validationMessage=e,this.update()}get severity(){return this._severity}set severity(e){this._severity=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton(e=>{this.buttons.indexOf(e)!==-1&&this.onDidTriggerButtonEmitter.fire(e)})),this.ui.show(this),this._visible.set(!0,void 0),this._lastValidationMessage=void 0,this._lastSeverity=void 0,this.buttons.length&&(this.buttonsUpdated=!0),this.update())}hide(){this.visible&&this.ui.hide()}didHide(e=ku.Other){this._visible.set(!1,void 0),this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:e})}willHide(e=ku.Other){this.onWillHideEmitter.fire({reason:e})}update(){if(!this.visible)return;const e=this.getTitle();e&&this.ui.title.textContent!==e?this.ui.title.textContent=e:!e&&this.ui.title.innerHTML!==" "&&(this.ui.title.innerText=" ");const t=this.getDescription();if(this.ui.description1.textContent!==t&&(this.ui.description1.textContent=t),this.ui.description2.textContent!==t&&(this.ui.description2.textContent=t),this.busy&&!this.busyDelay&&(this.busyDelay=new l.TimeoutTimer,this.busyDelay.setIfNotSet(()=>{this.visible&&(this.ui.progressBar.infinite(),this.ui.progressBar.getContainer().removeAttribute("aria-hidden"))},800)),!this.busy&&this.busyDelay&&(this.ui.progressBar.stop(),this.ui.progressBar.getContainer().setAttribute("aria-hidden","true"),this.busyDelay.cancel(),this.busyDelay=void 0),this.buttonsUpdated){this.buttonsUpdated=!1;const n=dh(this._leftButtons,"left-button",c=>this.onDidTriggerButtonEmitter.fire(c));this.ui.leftActionBar.setActions(n.primary,n.secondary);const s=dh(this._rightButtons,"right-button",c=>this.onDidTriggerButtonEmitter.fire(c));this.ui.rightActionBar.setActions(s.primary,s.secondary);const r=dh(this._inlineButtons,"inline-button",c=>this.onDidTriggerButtonEmitter.fire(c));this.ui.inlineActionBar.setActions(r.primary,r.secondary);const a=this._inputButtons.length*22;this.ui.countContainer.style.right=a>0?`${4+a}px`:"4px",this.ui.inputBox.actions=this._inputButtons.map((c,h)=>FA(c,`id-${h}`,async()=>this.onDidTriggerButtonEmitter.fire(c)))}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);const i=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==i&&(this._lastValidationMessage=i,oi(this.ui.message),i&&QZ(i,this.ui.message,{callback:n=>{this.ui.linkOpenerDelegate(n)},disposables:this.visibleDisposables})),this._lastSeverity!==this.severity&&(this._lastSeverity=this.severity,this.showMessageDecoration(this.severity))}getTitle(){return this.title&&this.step?`${this.title} (${this.getSteps()})`:this.title?this.title:this.step?this.getSteps():""}getDescription(){return this.description||""}getSteps(){return this.step&&this.totalSteps?l.localize(1818,"{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(e){if(this.ui.inputBox.showDecoration(e),e!==rt.Ignore){const t=this.ui.inputBox.stylesForType(e);this.ui.message.style.color=t.foreground?`${t.foreground}`:"",this.ui.message.style.backgroundColor=t.background?`${t.background}`:"",this.ui.message.style.border=t.border?`1px solid ${t.border}`:"",this.ui.message.style.marginBottom="-2px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.marginBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}};Cb.noPromptMessage=l.localize(1817,"Press 'Enter' to confirm your input or 'Escape' to cancel");let uh=Cb;const vb=class vb extends uh{constructor(e){super(e),this._value="",this.onDidChangeValueEmitter=this._register(new l.Emitter),this.onWillAcceptEmitter=this._register(new l.Emitter),this.onDidAcceptEmitter=this._register(new l.Emitter),this.onDidCustomEmitter=this._register(new l.Emitter),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._matchOnLabelMode="fuzzy",this._sortByLabel=!0,this._keepScrollPosition=!1,this._itemActivation=_.ItemActivation.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new l.Emitter),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new l.Emitter),this.onDidTriggerItemButtonEmitter=this._register(new l.Emitter),this.onDidTriggerSeparatorButtonEmitter=this._register(new l.Emitter),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this._customButtonSecondary=!1,this._focusEventBufferer=new l.EventBufferer,this.type="quickPick",this.filterValue=t=>t,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onWillAccept=this.onWillAcceptEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event,this.onDidChangeActive=this.onDidChangeActiveEmitter.event,this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event,this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event,this.onDidTriggerSeparatorButton=this.onDidTriggerSeparatorButtonEmitter.event,this.noValidationMessage=void 0}get quickNavigate(){return this._quickNavigate}set quickNavigate(e){this._quickNavigate=e,this.update()}get value(){return this._value}set value(e){this.doSetValue(e)}doSetValue(e,t){this._value!==e&&(this._value=e,t||this.update(),this.visible&&this.ui.list.filter(this.filterValue(this._value))&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(this._value))}set ariaLabel(e){this._ariaLabel=e,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get prompt(){return this.noValidationMessage}set prompt(e){this.noValidationMessage=e,this.update()}get items(){return this._items}get scrollTop(){return this.ui.list.scrollTop}set scrollTop(e){this.ui.list.scrollTop=e}set items(e){this._items=e,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(e){this._canSelectMany=e,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(e){this._canAcceptInBackground=e}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e,this.update()}get matchOnLabelMode(){return this._matchOnLabelMode}set matchOnLabelMode(e){this._matchOnLabelMode=e,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e,this.update()}get keepScrollPosition(){return this._keepScrollPosition}set keepScrollPosition(e){this._keepScrollPosition=e}get itemActivation(){return this._itemActivation}set itemActivation(e){this._itemActivation=e}get activeItems(){return this._activeItems}set activeItems(e){this._activeItems=e,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(e){this._selectedItems=e,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?L7:this.ui.keyMods}get valueSelection(){const e=this.ui.inputBox.getSelection();if(e)return[e.start,e.end]}set valueSelection(e){this._valueSelection=e,this.valueSelectionUpdated=!0,this.update()}get customButton(){return this._customButton}set customButton(e){this._customButton=e,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(e){this._customButtonLabel=e,this.update()}get customHover(){return this._customButtonHover}set customHover(e){this._customButtonHover=e,this.update()}get customButtonSecondary(){return this._customButtonSecondary}set customButtonSecondary(e){this._customButtonSecondary=e??!1,this.update()}get ok(){return this._ok}set ok(e){this._ok=e,this.update()}get okLabel(){return this._okLabel??l.localize(1820,"OK")}set okLabel(e){this._okLabel=e,this.update()}get hideInput(){return!!this._hideInput}set hideInput(e){this._hideInput=e,this.update()}trySelectFirst(){this.canSelectMany||this.ui.list.focus(xe.First)}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(e=>{this.doSetValue(e,!0)})),this.visibleDisposables.add(this.ui.onDidAccept(()=>{this.canSelectMany?this.ui.list.getCheckedElements().length||(this._selectedItems=[],this.onDidChangeSelectionEmitter.fire(this.selectedItems)):this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.handleAccept(!1)})),this.visibleDisposables.add(this.ui.onDidCustom(()=>{this.onDidCustomEmitter.fire()})),this.visibleDisposables.add(this._focusEventBufferer.wrapEvent(this.ui.list.onDidChangeFocus,(e,t)=>t)(e=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&l.equals(e,this._activeItems,(t,i)=>t===i)||(this._activeItems=e,this.onDidChangeActiveEmitter.fire(e))})),this.visibleDisposables.add(this.ui.list.onDidChangeSelection(({items:e,event:t})=>{if(this.canSelectMany&&!e.some(i=>i.pickable===!1)){e.length&&this.ui.list.setSelectedElements([]);return}this.selectedItemsToConfirm!==this._selectedItems&&l.equals(e,this._selectedItems,(i,n)=>i===n)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e),e.length&&this.handleAccept(Qf(t)&&t.button===1))})),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements(e=>{!this.canSelectMany||!this.visible||this.selectedItemsToConfirm!==this._selectedItems&&l.equals(e,this._selectedItems,(t,i)=>t===i)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e))})),this.visibleDisposables.add(this.ui.list.onButtonTriggered(e=>this.onDidTriggerItemButtonEmitter.fire(e))),this.visibleDisposables.add(this.ui.list.onSeparatorButtonTriggered(e=>this.onDidTriggerSeparatorButtonEmitter.fire(e))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}handleAccept(e){let t=!1;this.onWillAcceptEmitter.fire({veto:()=>t=!0}),t||this.onDidAcceptEmitter.fire({inBackground:e})}registerQuickNavigation(){return R(this.ui.container,F.KEY_UP,e=>{if(this.canSelectMany||!this._quickNavigate)return;const t=new Be(e),i=t.keyCode;this._quickNavigate.keybindings.some(r=>{const a=r.getChords();return a.length>1?!1:a[0].shiftKey&&i===4?!(t.ctrlKey||t.altKey||t.metaKey):!!(a[0].altKey&&i===6||a[0].ctrlKey&&i===5||a[0].metaKey&&i===57)})&&(this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!1)),this._quickNavigate=void 0)})}update(){if(!this.visible)return;const e=this.keepScrollPosition?this.scrollTop:0,t=!!this.description,i={title:!!this.title||!!this.step||!!this.titleButtons.length,description:t,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!this._hideInput,progressBar:!this._hideInput||t,visibleCount:!0,count:this.canSelectMany&&!this._hideCountBadge,ok:this.ok==="default"?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage||!!this.prompt,customButton:this.customButton};this.ui.setVisibilities(i),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||"");let n=this.ariaLabel;!n&&i.inputBox&&(n=this.placeholder,this.title&&(n=n?`${n} - ${this.title}`:this.title),n||(n=vb.DEFAULT_ARIA_LABEL)),this.ui.list.ariaLabel!==n&&(this.ui.list.ariaLabel=n??null),this.ui.inputBox.ariaLabel!==n&&(this.ui.inputBox.ariaLabel=n??"input"),this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.matchOnLabelMode=this.matchOnLabelMode,this.ui.list.sortByLabel=this.sortByLabel,this.itemsUpdated&&(this.itemsUpdated=!1,this._focusEventBufferer.bufferEvents(()=>{switch(this.ui.list.setElements(this.items),this.ui.list.shouldLoop=!this.canSelectMany,this.ui.list.filter(this.filterValue(this.ui.inputBox.value)),this._itemActivation){case _.ItemActivation.NONE:this._itemActivation=_.ItemActivation.FIRST;break;case _.ItemActivation.SECOND:this.ui.list.focus(xe.Second),this._itemActivation=_.ItemActivation.FIRST;break;case _.ItemActivation.LAST:this.ui.list.focus(xe.Last),this._itemActivation=_.ItemActivation.FIRST;break;default:this.trySelectFirst();break}})),this.ui.container.classList.contains("show-checkboxes")!==!!this.canSelectMany&&(this.canSelectMany?this.ui.list.clearFocus():this.trySelectFirst()),this.activeItemsUpdated&&(this.activeItemsUpdated=!1,this.activeItemsToConfirm=this._activeItems,this.ui.list.setFocusedElements(this.activeItems),this.activeItemsToConfirm===this._activeItems&&(this.activeItemsToConfirm=null)),this.selectedItemsUpdated&&(this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=this._selectedItems,this.canSelectMany?this.ui.list.setCheckedElements(this.selectedItems):this.ui.list.setSelectedElements(this.selectedItems),this.selectedItemsToConfirm===this._selectedItems&&(this.selectedItemsToConfirm=null)),this.ui.ok.label=this.okLabel||"",this.ui.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",this.ui.customButton.secondary=this.customButtonSecondary||!1,i.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(xe.First)),this.keepScrollPosition&&(this.scrollTop=e)}focus(e){this.ui.list.focus(e),this.canSelectMany&&this.ui.list.domFocus()}accept(e){e&&!this._canAcceptInBackground||(this.activeItems[0]&&!this._canSelectMany&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.handleAccept(e??!1))}};vb.DEFAULT_ARIA_LABEL=l.localize(1819,"Type to narrow down results.");let fh=vb;class nQ extends uh{constructor(){super(...arguments),this._value="",this.valueSelectionUpdated=!0,this._password=!1,this.onDidValueChangeEmitter=this._register(new l.Emitter),this.onDidAcceptEmitter=this._register(new l.Emitter),this.type="inputBox",this.onDidChangeValue=this.onDidValueChangeEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event}get value(){return this._value}set value(e){this._value=e||"",this.update()}get valueSelection(){const e=this.ui.inputBox.getSelection();if(e)return[e.start,e.end]}set valueSelection(e){this._valueSelection=e,this.valueSelectionUpdated=!0,this.update()}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){this._ariaLabel=e,this.update()}get password(){return this._password}set password(e){this._password=e,this.update()}get prompt(){return this._prompt}set prompt(e){this._prompt=e,this.noValidationMessage=e?l.localize(1821,"{0} (Press 'Enter' to confirm or 'Escape' to cancel)",e):uh.noPromptMessage,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(e=>{e!==this.value&&(this._value=e,this.onDidValueChangeEmitter.fire(e))})),this.visibleDisposables.add(this.ui.onDidAccept(()=>this.onDidAcceptEmitter.fire())),this.valueSelectionUpdated=!0),super.show()}accept(){this.onDidAcceptEmitter.fire()}update(){if(!this.visible)return;this.ui.container.classList.remove("hidden-input");const e={title:!!this.title||!!this.step||!!this.titleButtons.length,description:!!this.description||!!this.step,inputBox:!0,message:!0,progressBar:!0};this.ui.setVisibilities(e),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||""),this.ui.inputBox.password!==this.password&&(this.ui.inputBox.password=this.password);let t=this.ariaLabel;!t&&e.inputBox&&(t=this.placeholder?this.title?`${this.placeholder} - ${this.title}`:this.placeholder:this.title?this.title:"input"),this.ui.inputBox.ariaLabel!==t&&(this.ui.inputBox.ariaLabel=t||"input")}}let jL=class extends _.WorkbenchHoverDelegate{constructor(e,t){super("mouse",void 0,i=>this.getOverrideOptions(i),e,t)}getOverrideOptions(e){const t=(Ve(e.content)?e.content.textContent??"":typeof e.content=="string"?e.content:e.content.value).includes(` +`);return{persistence:{hideOnKeyDown:!1},appearance:{showHoverHint:t,skipFadeInAnimation:!0}}}};jL=XZ([BA(0,Ge),BA(1,kc)],jL);const gh=20,mh=4,qL="--vscode-toolbar-action-min-width";class ph extends l.Disposable{get onDidChangeDropdownVisibility(){return this._onDidChangeDropdownVisibility.event}constructor(e,t,i={orientation:0}){if(super(),this.container=e,this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new l.EventMultiplexer),this.originalPrimaryActions=[],this.originalSecondaryActions=[],this.hiddenActions=[],this.disposables=this._register(new l.DisposableStore),i.hoverDelegate=i.hoverDelegate??this._register(sM()),this.options=i,this.toggleMenuAction=this._register(new _h(()=>this.toggleMenuActionViewItem?.show(),i.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",e.appendChild(this.element),this.actionBar=this._register(new el(this.element,{orientation:i.orientation,ariaLabel:i.ariaLabel,actionRunner:i.actionRunner,allowContextMenu:i.allowContextMenu,highlightToggledItems:i.highlightToggledItems,hoverDelegate:i.hoverDelegate,actionViewItemProvider:(n,s)=>{if(n.id===_h.ID)return this.toggleMenuActionViewItem=new Bp(n,{getActions:()=>this.toggleMenuAction.menuActions},t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:_.ThemeIcon.asClassNameArray(i.moreIcon??l.Codicon.toolBarMore),anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry,isMenu:!0,hoverDelegate:this.options.hoverDelegate}),this.toggleMenuActionViewItem.setActionContext(this.actionBar.context),this.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility)),this.toggleMenuActionViewItem;if(i.actionViewItemProvider){const r=i.actionViewItemProvider(n,s);if(r)return r}if(n instanceof cd){const r=new Bp(n,n.actions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:n.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry,hoverDelegate:this.options.hoverDelegate});return r.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(r),this.disposables.add(this._onDidChangeDropdownVisibility.add(r.onDidChangeVisibility)),r}}})),this.options.responsiveBehavior?.enabled){this.element.classList.toggle("responsive",!0),this.element.classList.toggle("responsive-all",this.options.responsiveBehavior.kind==="all"),this.element.classList.toggle("responsive-last",this.options.responsiveBehavior.kind==="last"),this.element.style.setProperty(qL,`${this.getConfiguredActionMinWidth()}px`);const n=new ResizeObserver(()=>{this.updateActions(this.getAvailableWidth())});n.observe(this.options.responsiveBehavior?.observedElement??this.element),this._store.add(l.toDisposable(()=>n.disconnect()))}}set actionRunner(e){this.actionBar.actionRunner=e}get actionRunner(){return this.actionBar.actionRunner}set context(e){this.actionBar.context=e,this.toggleMenuActionViewItem?.setActionContext(e);for(const t of this.submenuActionViewItems)t.setActionContext(e)}getElement(){return this.element}getItemAction(e){return this.actionBar.getAction(e)}getItemWidth(e){return this.actionBar.getWidth(e)}getItemsLength(){return this.actionBar.length()}setActions(e,t){this.clear(),this.originalPrimaryActions=e?e.slice(0):[],this.originalSecondaryActions=t?t.slice(0):[];const i=e?e.slice(0):[];if(this.hasSecondaryActions=!!(t&&t.length>0),this.hasSecondaryActions&&t&&(this.toggleMenuAction.menuActions=t.slice(0),i.push(this.toggleMenuAction)),i.length>0&&this.options.trailingSeparator&&i.push(new ft),i.forEach(n=>{this.actionBar.push(n,{icon:this.options.icon??!0,label:this.options.label??!1,keybinding:this.getKeybindingLabel(n)})}),this.updateOverflowClassName(),this.applyResponsiveActionMinWidths(),this.options.responsiveBehavior?.enabled){if(this.hiddenActions.length=0,this.options.responsiveBehavior?.minItems!==void 0){const n=this.options.responsiveBehavior.minItems,s=this.originalPrimaryActions.slice(0,n).reduce((a,c)=>a+this.getActionMinWidth(c),0);let r=0;(this.originalSecondaryActions.length>0||n0?this.getActionMinWidth(this.originalPrimaryActions[0]):gh+mh;this.container.style.minWidth=`${n}px`,this.element.style.minWidth=`${n}px`}this.updateActions(this.getAvailableWidth())}}getKeybindingLabel(e){return this.options.getKeyBinding?.(e)?.getLabel()??void 0}getConfiguredActionMinWidth(e){return e?.id===_h.ID?gh:this.options.responsiveBehavior?.getActionMinWidth?.(e??this.toggleMenuAction)??this.options.responsiveBehavior?.actionMinWidth??gh}getActionMinWidth(e){return this.getConfiguredActionMinWidth(e)+mh}getAvailableWidth(){return this.options.responsiveBehavior?.getAvailableWidth?this.options.responsiveBehavior.getAvailableWidth():this.element.getBoundingClientRect().width}applyResponsiveActionMinWidths(){if(!this.options.responsiveBehavior?.enabled)return;if(this.options.responsiveBehavior.kind==="last"){const i=this.actionBar.hasAction(this.toggleMenuAction)?this.actionBar.length()-2:this.actionBar.length()-1,n=i>=0?this.actionBar.getAction(i):void 0,s=`${this.getConfiguredActionMinWidth(n)}px`;this.element.style.getPropertyValue(qL)!==s&&this.element.style.setProperty(qL,s);return}const e=this.actionBar.getContainer().firstElementChild;if(Ve(e))for(let t=0;t{if(this.options.responsiveBehavior?.kind==="last"){const a=this.actionBar.hasAction(this.toggleMenuAction),c=a?this.actionBar.length()-1:this.actionBar.length();if(c===0)return a?gh+mh:0;let h=0;for(let u=0;ue){if(this.options.responsiveBehavior?.minItems!==void 0&&(this.actionBar.hasAction(this.toggleMenuAction)?this.actionBar.length()-1:this.actionBar.length())<=this.options.responsiveBehavior.minItems)return;for(;i(!1)>e&&this.actionBar.length()>0;){const r=this.originalPrimaryActions.length-this.hiddenActions.length-1;if(r<0)break;const a=this.originalPrimaryActions[r],c=Math.min(this.getActionMinWidth(a),this.getItemWidth(r));this.hiddenActions.unshift({action:a,size:c}),this.actionBar.pull(r),this.originalSecondaryActions.length===0&&this.hiddenActions.length===1&&(this.actionBar.push(this.toggleMenuAction,{icon:this.options.icon??!0,label:this.options.label??!1,keybinding:this.getKeybindingLabel(this.toggleMenuAction)}),this.updateOverflowClassName()),this.applyResponsiveActionMinWidths()}}else for(;this.hiddenActions.length>0;){const r=this.hiddenActions.shift();if(i(!0)+r.size>e){this.hiddenActions.unshift(r);break}this.actionBar.push(r.action,{icon:this.options.icon??!0,label:this.options.label??!1,keybinding:this.getKeybindingLabel(r.action),index:this.originalPrimaryActions.length-this.hiddenActions.length-1}),this.originalSecondaryActions.length===0&&this.hiddenActions.length===0&&(this.toggleMenuAction.menuActions=[],this.actionBar.pull(this.actionBar.length()-1),this.updateOverflowClassName()),this.applyResponsiveActionMinWidths()}const s=this.hiddenActions.map(r=>r.action);if(this.originalSecondaryActions.length>0||s.length>0){const r=this.originalSecondaryActions.slice(0);this.toggleMenuAction.menuActions=ft.join(s,r)}this.updateOverflowClassName(),this.applyResponsiveActionMinWidths()}updateOverflowClassName(){this.actionBar.domNode.classList.toggle("has-overflow",this.actionBar.hasAction(this.toggleMenuAction))}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),this.disposables.dispose(),this.element.remove(),super.dispose()}}const wb=class wb extends oo{constructor(e,t){t=t||l.localize(19,"More Actions..."),super(wb.ID,t,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=e}async run(){this.toggleDropdownMenu()}get menuActions(){return this._menuActions}set menuActions(e){this._menuActions=e}};wb.ID="toolbar.toggle.more";let _h=wb;l.Color.white.toString(),l.Color.white.toString();const sQ=Object.freeze({allowedTags:{override:["b","i","u","code","span"]},allowedAttributes:{override:["class"]}}),oQ=Object.freeze({sanitizerConfig:{allowedAttributes:{override:["class"]}}});class v_ extends l.Disposable{get onDidClick(){return this._onDidClick.event}constructor(e,t){super(),this._label="",this._onDidClick=this._register(new l.Emitter),this._onDidEscape=this._register(new l.Emitter),this.options=t,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),this._element.classList.toggle("secondary",!!t.secondary),this._element.classList.toggle("small",!!t.small);const i=t.secondary?t.buttonSecondaryBackground:t.buttonBackground,n=t.secondary?t.buttonSecondaryForeground:t.buttonForeground,s=t.secondary?t.buttonSecondaryBorder:t.buttonBorder;this._element.style.color=n||"",this._element.style.backgroundColor=i||"",s&&(this._element.style.border=`1px solid ${s}`),t.supportShortLabel&&(this._labelShortElement=document.createElement("div"),this._labelShortElement.classList.add("monaco-button-label-short"),this._element.appendChild(this._labelShortElement),this._labelElement=document.createElement("div"),this._labelElement.classList.add("monaco-button-label"),this._element.appendChild(this._labelElement),this._element.classList.add("monaco-text-button-with-short-label")),typeof t.title=="string"&&this.setTitle(t.title),typeof t.ariaLabel=="string"&&this._element.setAttribute("aria-label",t.ariaLabel),e.appendChild(this._element),this.enabled=!t.disabled,this._register(li.addTarget(this._element)),[F.CLICK,_.EventType$1.Tap].forEach(r=>{this._register(R(this._element,r,a=>{if(!this.enabled){ve.stop(a);return}this._onDidClick.fire(a)}))}),this._register(R(this._element,F.KEY_DOWN,r=>{const a=new Be(r);let c=!1;this.enabled&&(a.equals(3)||a.equals(10))?(this._onDidClick.fire(r),c=!0):a.equals(9)&&(this._onDidEscape.fire(r),this._element.blur(),c=!0),c&&ve.stop(a,!0)})),this._register(R(this._element,F.MOUSE_OVER,r=>{this._element.classList.contains("disabled")||this.updateStyles(!0)})),this._register(R(this._element,F.MOUSE_OUT,r=>{this.updateStyles(!1)})),this.focusTracker=this._register(Xr(this._element)),this._register(this.focusTracker.onDidFocus(()=>{this.enabled&&this.updateStyles(!0)})),this._register(this.focusTracker.onDidBlur(()=>{this.enabled&&this.updateStyles(!1)}))}dispose(){super.dispose(),this._element.remove()}getContentElements(e){const t=[];for(let i of vr(e))if(typeof i=="string"){if(i=i.trim(),i==="")continue;const n=document.createElement("span");n.textContent=i,t.push(n)}else t.push(i);return t}updateStyles(e){let t,i,n;this.options.secondary?(t=e?this.options.buttonSecondaryHoverBackground:this.options.buttonSecondaryBackground,i=this.options.buttonSecondaryForeground,n=this.options.buttonSecondaryBorder):(t=e?this.options.buttonHoverBackground:this.options.buttonBackground,i=this.options.buttonForeground,n=this.options.buttonBorder),this._element.style.backgroundColor=t||"",this._element.style.color=i||"",this._element.style.border=n?`1px solid ${n}`:""}get element(){return this._element}set label(e){if(this._label===e||Do(this._label)&&Do(e)&&dG(this._label,e))return;this._element.classList.add("monaco-text-button");const t=this.options.supportShortLabel?this._labelElement:this._element;if(Do(e)){const n=dp(e,oQ,document.createElement("span"));n.dispose();const s=n.element.querySelector("p")?.innerHTML;s?cR(t,s,sQ):oi(t)}else this.options.supportIcons?oi(t,...this.getContentElements(e)):t.textContent=e;let i="";typeof this.options.title=="string"?i=this.options.title:this.options.title&&(i=Uj(e)),this.setTitle(i),this._setAriaLabel(),this._label=e}get label(){return this._label}_setAriaLabel(){typeof this.options.ariaLabel=="string"?this._element.setAttribute("aria-label",this.options.ariaLabel):typeof this.options.title=="string"&&this._element.setAttribute("aria-label",this.options.title)}set icon(e){this._setAriaLabel();const t=Array.from(this._element.classList).filter(i=>i.startsWith("codicon-"));this._element.classList.remove(...t),this._element.classList.add(..._.ThemeIcon.asClassNameArray(e))}set enabled(e){e?(this._element.classList.remove("disabled"),this._element.setAttribute("aria-disabled",String(!1)),this._element.tabIndex=0):(this._element.classList.add("disabled"),this._element.setAttribute("aria-disabled",String(!0)))}get enabled(){return!this._element.classList.contains("disabled")}set secondary(e){this._element.classList.toggle("secondary",e),this.options.secondary=e,this.updateStyles(!1)}setTitle(e){!this._hover&&e!==""?this._hover=this._register(En().setupManagedHover(this.options.hoverDelegate??Io("element"),this._element,e)):this._hover&&this._hover.update(e)}}class YL extends l.Disposable{constructor(e,t,i){super(),this.options=t,this.styles=i,this.count=0,this.hover=this._register(new l.MutableDisposable),this.element=K(e,Q(".monaco-count-badge")),this._register(l.toDisposable(()=>e.removeChild(this.element))),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0),this.updateHover()}setCount(e){this.count=e,this.render()}setTitleFormat(e){this.titleFormat=e,this.updateHover(),this.render()}updateHover(){this.titleFormat!==""&&!this.hover.value?this.hover.value=En().setupDelayedHoverAtMouse(this.element,()=>({content:l.format(this.titleFormat,this.count),appearance:{compact:!0}})):this.titleFormat===""&&this.hover.value&&(this.hover.value=void 0)}render(){this.element.textContent=l.format(this.countFormat,this.count),this.element.style.backgroundColor=this.styles.badgeBackground??"",this.element.style.color=this.styles.badgeForeground??"",this.styles.badgeBorder&&(this.element.style.border=`1px solid ${this.styles.badgeBorder}`)}}const $A="done",KA="active",ZL="infinite",QL="infinite-long-running",GA="discrete",rQ=l.localize(16,"Progress"),Sb=class Sb extends l.Disposable{constructor(e,t){super(),this.progressSignal=this._register(new l.MutableDisposable),this.workedVal=0,this.showDelayedScheduler=this._register(new l.RunOnceScheduler(()=>Jf(this.element),0)),this.longRunningScheduler=this._register(new l.RunOnceScheduler(()=>this.infiniteLongRunning(),Sb.LONG_RUNNING_INFINITE_THRESHOLD)),this.create(e,t)}create(e,t){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),this.element.setAttribute("role","progressbar"),this.element.setAttribute("aria-valuemin","0"),this.element.setAttribute("aria-label",t?.ariaLabel&&t.ariaLabel.trim()?t.ariaLabel:rQ),e.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.bit.style.backgroundColor=t?.progressBarBackground||"#0E70C0",this.element.appendChild(this.bit)}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(KA,ZL,QL,GA),this.workedVal=0,this.totalWork=void 0,this.longRunningScheduler.cancel(),this.progressSignal.clear()}stop(){return this.doDone(!1)}doDone(e){return this.element.classList.add($A),this.element.classList.contains(ZL)?(this.bit.style.opacity="0",e?setTimeout(()=>this.off(),200):this.off()):(this.bit.style.width="inherit",e?setTimeout(()=>this.off(),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(GA,$A,QL),this.element.classList.add(KA,ZL),this.longRunningScheduler.schedule(),this}infiniteLongRunning(){this.element.classList.add(QL)}getContainer(){return this.element}};Sb.LONG_RUNNING_INFINITE_THRESHOLD=1e4;let XL=Sb;const aQ=Q;class lQ extends l.Disposable{constructor(e,t,i){super(),this.parent=e,this._listFocusMode=!1,this.onDidChange=n=>this.findInput.onDidChange(n),this.container=K(this.parent,aQ(".quick-input-box")),this.findInput=this._register(new GM(this.container,void 0,{label:"",inputBoxStyles:t,toggleStyles:i,actionViewItemProvider:rh(i),hideHoverOnValueChange:!0}))}get onKeyDown(){return this.findInput.onKeyDown}get value(){return this.findInput.getValue()}set value(e){this.findInput.setValue(e)}select(e=null){this.findInput.inputBox.select(e)}getSelection(){return this.findInput.inputBox.getSelection()}isSelectionAtEnd(){return this.findInput.inputBox.isSelectionAtEnd()}get placeholder(){return this.findInput.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(e){this.findInput.inputBox.setPlaceHolder(e)}get password(){return this.findInput.inputBox.inputElement.type==="password"}set password(e){this.findInput.inputBox.inputElement.type=e?"password":"text"}set enabled(e){this.findInput.inputBox.inputElement.toggleAttribute("readonly",!e)}set toggles(e){this.findInput.setAdditionalToggles(e)}set actions(e){this.setActions(e)}setActions(e,t){this.findInput.setActions(e,t)}get ariaLabel(){return this.findInput.inputBox.inputElement.getAttribute("aria-label")||""}set ariaLabel(e){this.findInput.inputBox.inputElement.setAttribute("aria-label",e)}hasFocus(){return this.findInput.inputBox.hasFocus()}setAttribute(e,t){this.findInput.inputBox.inputElement.setAttribute(e,t)}removeAttribute(e){this.findInput.inputBox.inputElement.removeAttribute(e)}setListFocusMode(e){if(this._listFocusMode===e)return;this._listFocusMode=e;const t=this.findInput.inputBox.inputElement;e?(t.setAttribute("aria-haspopup","listbox"),t.setAttribute("aria-autocomplete","list")):(t.removeAttribute("aria-haspopup"),t.removeAttribute("aria-autocomplete"))}showDecoration(e){e===rt.Ignore?this.findInput.clearMessage():this.findInput.showMessage({type:e===rt.Info?1:e===rt.Warning?2:3,content:""})}stylesForType(e){return this.findInput.inputBox.stylesForType(e===rt.Info?1:e===rt.Warning?2:3)}setFocus(){this.findInput.focus()}layout(){this.findInput.inputBox.layout()}}class Ir extends l.Disposable{constructor(e,t){super(),this.options=t,this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.domNode=K(e,Q("span.monaco-highlighted-label"))}get element(){return this.domNode}set(e,t=[],i="",n,s){e||(e=""),n&&(e=Ir.escapeNewLines(e,t)),!(this.didEverRender&&this.text===e&&this.title===i&&l.equals$1(this.highlights,t))&&(this.text=e,this.title=i,this.highlights=t,this.render(s))}render(e){const t=[];let i=0;for(const n of this.highlights){if(n.end===n.start)continue;if(i{n=s===`\r +`?-1:0,r+=i;for(const a of t)a.end<=r||(a.start>=r&&(a.start+=n),a.end>=r&&(a.end+=n));return i+=n,"⏎"})}}class nf{constructor(e){this._element=e}get element(){return this._element}set textContent(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)}set classNames(e){this.disposed||l.equals$1(e,this._classNames)||(this._classNames=e,this._element.classList.value="",this._element.classList.add(...e))}set empty(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":"")}dispose(){this.disposed=!0}}class w_ extends l.Disposable{constructor(e,t){super(),this.customHovers=new Map,this.creationOptions=t,this.domNode=this._register(new nf(K(e,Q(".monaco-icon-label")))),this.labelContainer=K(this.domNode.element,Q(".monaco-icon-label-container")),this.nameContainer=K(this.labelContainer,Q("span.monaco-icon-name-container")),t?.supportHighlights||t?.supportIcons?this.nameNode=this._register(new dQ(this.nameContainer,!!t.supportIcons)):this.nameNode=new cQ(this.nameContainer),this.hoverDelegate=t?.hoverDelegate??Io("mouse")}get element(){return this.domNode.element}setLabel(e,t,i){const n=["monaco-icon-label"],s=["monaco-icon-label-container"];let r="";i&&(i.extraClasses&&n.push(...i.extraClasses),i.bold&&n.push("bold"),i.italic&&n.push("italic"),i.strikethrough&&n.push("strikethrough"),i.disabledCommand&&s.push("disabled"),i.title&&(typeof i.title=="string"?r+=i.title:r+=e));const a=this.domNode.element.querySelector(".monaco-icon-label-iconpath");if(i?.iconPath){let c;if(!a||!Ve(a)?(c=Q(".monaco-icon-label-iconpath"),this.domNode.element.prepend(c)):c=a,_.ThemeIcon.isThemeIcon(i.iconPath)){const h=_.ThemeIcon.asClassName(i.iconPath);c.className=`monaco-icon-label-iconpath ${h}`,c.style.backgroundImage=""}else c.style.backgroundImage=Bs(i?.iconPath);c.style.backgroundRepeat="no-repeat",c.style.backgroundPosition="center",c.style.backgroundSize="contain"}else a&&a.remove();if(this.domNode.classNames=n,this.domNode.element.setAttribute("aria-label",r),this.labelContainer.classList.value="",this.labelContainer.classList.add(...s),this.setupHover(i?.descriptionTitle?this.labelContainer:this.element,i?.title),this.nameNode.setLabel(e,i),t||this.descriptionNode){const c=this.getOrCreateDescriptionNode();if(c instanceof Ir){const h=i?.supportIcons??this.creationOptions?.supportIcons;c.set(t||"",i?i.descriptionMatches:void 0,void 0,i?.labelEscapeNewLines,h),this.setupHover(c.element,i?.descriptionTitle)}else c.textContent=t&&i?.labelEscapeNewLines?Ir.escapeNewLines(t,[]):t||"",this.setupHover(c.element,i?.descriptionTitle||""),c.empty=!t}if(i?.suffix||this.suffixNode){const c=this.getOrCreateSuffixNode();c.textContent=i?.suffix??""}}setupHover(e,t){const i=this.customHovers.get(e);if(i&&(i.dispose(),this.customHovers.delete(e)),!t){e.removeAttribute("title");return}let n=e;if(this.creationOptions?.hoverTargetOverride){if(!ut(e,this.creationOptions.hoverTargetOverride))throw new Error("hoverTargetOverrride must be an ancestor of the htmlElement");n=this.creationOptions.hoverTargetOverride}const s=En().setupManagedHover(this.hoverDelegate,n,t);s&&this.customHovers.set(e,s)}dispose(){super.dispose();for(const e of this.customHovers.values())e.dispose();this.customHovers.clear()}getOrCreateSuffixNode(){if(!this.suffixNode){const e=this._register(new nf(IF(this.nameContainer,Q("span.monaco-icon-suffix-container"))));this.suffixNode=this._register(new nf(K(e.element,Q("span.label-suffix"))))}return this.suffixNode}getOrCreateDescriptionNode(){if(!this.descriptionNode){const e=this._register(new nf(K(this.labelContainer,Q("span.monaco-icon-description-container"))));this.creationOptions?.supportDescriptionHighlights?this.descriptionNode=this._register(new Ir(K(e.element,Q("span.label-description")))):this.descriptionNode=this._register(new nf(K(e.element,Q("span.label-description"))))}return this.descriptionNode}}class cQ{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(!(this.label===e&&l.equals$1(this.options,t)))if(this.label=e,this.options=t,typeof e=="string")this.singleLabel||(this.container.textContent="",this.container.classList.remove("multiple"),this.singleLabel=K(this.container,Q("a.label-name",{id:t?.domId}))),this.singleLabel.textContent=e;else{this.container.textContent="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let i=0;i{const s={start:i,end:i+n.length},r=t.map(a=>ii.intersect(s,a)).filter(a=>!ii.isEmpty(a)).map(({start:a,end:c})=>({start:a-i,end:c-i}));return i=s.end+e.length,r})}class dQ extends l.Disposable{constructor(e,t){super(),this.container=e,this.supportIcons=t,this.label=void 0,this.singleLabel=void 0,this._labelDisposables=this._register(new l.DisposableStore)}setLabel(e,t){if(this.label===e&&l.equals$1(this.options,t))return;this.label=e,this.options=t;const i=t?.supportIcons??this.supportIcons;if(typeof e=="string")this.singleLabel||(this._labelDisposables.clear(),this.container.textContent="",this.container.classList.remove("multiple"),this.singleLabel=this._labelDisposables.add(new Ir(K(this.container,Q("a.label-name",{id:t?.domId}))))),this.singleLabel.set(e,t?.matches,void 0,t?.labelEscapeNewLines,i);else{this._labelDisposables.clear(),this.container.textContent="",this.container.classList.add("multiple"),this.singleLabel=void 0;const n=t?.separator||"/",s=hQ(e,n,t?.matches);for(let r=0;r{const o=l.safeIntl.Collator(void 0,{numeric:!0,sensitivity:"base"}).value;return{collator:o,collatorIsNumeric:o.resolvedOptions().numeric}});new l.Lazy(()=>({collator:l.safeIntl.Collator(void 0,{numeric:!0}).value})),new l.Lazy(()=>({collator:l.safeIntl.Collator(void 0,{numeric:!0,sensitivity:"accent"}).value}));function fQ(o,e,t=!1){const i=o||"",n=e||"",s=jA.value.collator.compare(i,n);return jA.value.collatorIsNumeric&&s===0&&i!==n?in.length)return 1}return 0}var sf=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},of=function(o,e){return function(t,i){e(t,i,o)}},JL,WL;const Gs=Q;class qA{constructor(e,t,i){this.index=e,this.hasCheckbox=t,this._hidden=!1,this._init=new l.Lazy(()=>{const n=i.label??"",s=Ka(n).text.trim(),r=i.ariaLabel||[n,this.saneDescription,this.saneDetail].map(a=>yS(a)).filter(a=>!!a).join(", ");return{saneLabel:n,saneSortLabel:s,saneAriaLabel:r}}),this._saneDescription=i.description,this._saneTooltip=i.tooltip}get saneLabel(){return this._init.value.saneLabel}get saneSortLabel(){return this._init.value.saneSortLabel}get saneAriaLabel(){return this._init.value.saneAriaLabel}get element(){return this._element}set element(e){this._element=e}get hidden(){return this._hidden}set hidden(e){this._hidden=e}get saneDescription(){return this._saneDescription}set saneDescription(e){this._saneDescription=e}get saneDetail(){return this._saneDetail}set saneDetail(e){this._saneDetail=e}get saneTooltip(){return this._saneTooltip}set saneTooltip(e){this._saneTooltip=e}get labelHighlights(){return this._labelHighlights}set labelHighlights(e){this._labelHighlights=e}get descriptionHighlights(){return this._descriptionHighlights}set descriptionHighlights(e){this._descriptionHighlights=e}get detailHighlights(){return this._detailHighlights}set detailHighlights(e){this._detailHighlights=e}}class Zt extends qA{constructor(e,t,i,n,s,r,a){super(e,i,r),this.childIndex=t,this.fireButtonTriggered=n,this._onChecked=s,this.item=r,this._separator=a,this._checked=!1,this.onChecked=i?l.Event.map(l.Event.filter(this._onChecked.event,c=>c.element===this),c=>c.checked):l.Event.None,this._saneDetail=r.detail,this._labelHighlights=r.highlights?.label,this._descriptionHighlights=r.highlights?.description,this._detailHighlights=r.highlights?.detail}get separator(){return this._separator}set separator(e){this._separator=e}get checked(){return this._checked}set checked(e){e!==this._checked&&(this._checked=e,this._onChecked.fire({element:this,checked:e}))}get checkboxDisabled(){return!!this.item.disabled}}var js;(function(o){o[o.NONE=0]="NONE",o[o.MOUSE_HOVER=1]="MOUSE_HOVER",o[o.ACTIVE_ITEM=2]="ACTIVE_ITEM"})(js||(js={}));class hl extends qA{constructor(e,t,i){super(e,!1,i),this.fireSeparatorButtonTriggered=t,this.separator=i,this.children=new Array,this.focusInsideSeparator=js.NONE}}class pQ{getHeight(e){return e instanceof hl?30:e.saneDetail?44:22}getTemplateId(e){return e instanceof Zt?L_.ID:D_.ID}}class _Q{getWidgetAriaLabel(){return l.localize(1834,"Quick Input")}getAriaLabel(e){return e.separator?.label?`${e.saneAriaLabel}, ${e.separator.label}`:e.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(e){return e.hasCheckbox?"checkbox":"option"}isChecked(e){if(!(!e.hasCheckbox||!(e instanceof Zt)))return{get value(){return e.checked},onDidChange:t=>e.onChecked(()=>t())}}}class YA extends l.Disposable{constructor(e,t,i){super(),this.hoverDelegate=e,this.toggleStyles=t,this.contextMenuService=i,this._onDidDisposeFocusedElement=this._register(new l.Emitter),this.onDidDisposeFocusedElement=this._onDidDisposeFocusedElement.event}renderTemplate(e){const t=Object.create(null);t.toDisposeElement=new l.DisposableStore,t.toDisposeTemplate=new l.DisposableStore,t.entry=K(e,Gs(".quick-input-list-entry"));const i=K(t.entry,Gs("label.quick-input-list-label"));t.outerLabel=i,t.checkbox=t.toDisposeTemplate.add(new l.MutableDisposable),t.toDisposeTemplate.add(At(i,F.CLICK,h=>{if(t.checkbox.value&&!h.defaultPrevented&&t.checkbox.value.enabled){const d=!t.checkbox.value.checked;t.checkbox.value.checked=d,t.element.checked=d}}));const n=K(i,Gs(".quick-input-list-rows")),s=K(n,Gs(".quick-input-list-row")),r=K(n,Gs(".quick-input-list-row"));t.label=new w_(s,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0,hoverDelegate:this.hoverDelegate}),t.toDisposeTemplate.add(t.label),t.icon=Xf(t.label.element,Gs(".quick-input-list-icon"));const a=K(s,Gs(".quick-input-list-entry-keybinding"));t.keybinding=new y_(a,l.OS),t.toDisposeTemplate.add(t.keybinding);const c=K(r,Gs(".quick-input-list-label-meta"));return t.detail=new w_(c,{supportHighlights:!0,supportIcons:!0,hoverDelegate:this.hoverDelegate}),t.toDisposeTemplate.add(t.detail),t.separator=K(t.entry,Gs(".quick-input-list-separator")),t.toolBar=new ph(t.entry,this.contextMenuService,{...this.hoverDelegate?{hoverDelegate:this.hoverDelegate}:void 0,actionViewItemProvider:rh(this.toggleStyles),icon:!0,label:!1}),t.toolBar.getElement().classList.add("quick-input-list-entry-action-bar"),t.toDisposeTemplate.add(t.toolBar),t}disposeTemplate(e){e.toDisposeElement.dispose(),e.toDisposeTemplate.dispose()}disposeElement(e,t,i){Zf(i.entry)&&this._onDidDisposeFocusedElement.fire(),i.toDisposeElement.clear(),i.toolBar.setActions([])}}let L_=(Tl=class extends YA{constructor(e,t,i,n){super(e,t,i),this.themeService=n,this._itemsWithSeparatorsFrequency=new Map}get templateId(){return JL.ID}ensureCheckbox(e,t){if(!e.hasCheckbox){t.checkbox.value?.domNode.remove(),t.checkbox.clear();return}let i=t.checkbox.value;i?i.setTitle(e.saneLabel):(i=new tL(e.saneLabel,e.checked,{...By,size:15}),t.checkbox.value=i,t.outerLabel.prepend(i.domNode),i.domNode.tabIndex=-1),e.checkboxDisabled?i.disable():i.enable(),i.checked=e.checked,t.toDisposeElement.add(e.onChecked(n=>i.checked=n)),t.toDisposeElement.add(i.onChange(()=>e.checked=i.checked))}renderElement(e,t,i){const n=e.element;i.element=n,n.element=i.entry??void 0;const s=n.item;n.element.classList.toggle("not-pickable",n.item.pickable===!1),this.ensureCheckbox(n,i);const{labelHighlights:r,descriptionHighlights:a,detailHighlights:c}=n;if(s.iconPath){const f=rr(this.themeService.getColorTheme().type)?s.iconPath.dark:s.iconPath.light??s.iconPath.dark,g=l.URI.revive(f);i.icon.className="quick-input-list-icon",i.icon.style.backgroundImage=Bs(g)}else i.icon.style.backgroundImage="",i.icon.className=s.iconClass?`quick-input-list-icon ${s.iconClass}`:"";let h;!n.saneTooltip&&n.saneDescription&&(h={markdown:{value:l.escape(n.saneDescription),supportThemeIcons:!0},markdownNotSupportedFallback:n.saneDescription});const d={matches:r||[],descriptionTitle:h,descriptionMatches:a||[],labelEscapeNewLines:!0};if(d.extraClasses=s.iconClasses,d.italic=s.italic,d.strikethrough=s.strikethrough,i.entry.classList.remove("quick-input-list-separator-as-item"),i.label.setLabel(n.saneLabel,n.saneDescription,d),i.keybinding.set(s.keybinding),n.saneDetail){let f;n.saneTooltip||(f={markdown:{value:l.escape(n.saneDetail),supportThemeIcons:!0},markdownNotSupportedFallback:n.saneDetail}),i.detail.element.style.display="",i.detail.setLabel(n.saneDetail,void 0,{matches:c,title:f,labelEscapeNewLines:!0})}else i.detail.element.style.display="none";n.separator?.label?(i.separator.textContent=n.separator.label,i.separator.style.display="",this.addItemWithSeparator(n)):i.separator.style.display="none",i.entry.classList.toggle("quick-input-list-separator-border",!!n.separator&&n.childIndex!==0);const u=s.buttons;if(u&&u.length){const{primary:f,secondary:g}=dh(u,"quick-input-item",m=>n.fireButtonTriggered({button:m,item:n.item}));i.toolBar.setActions(f,g),i.entry.classList.add("has-actions")}else i.toolBar.setActions([]),i.entry.classList.remove("has-actions")}disposeElement(e,t,i){this.removeItemWithSeparator(e.element),super.disposeElement(e,t,i)}isItemWithSeparatorVisible(e){return this._itemsWithSeparatorsFrequency.has(e)}addItemWithSeparator(e){this._itemsWithSeparatorsFrequency.set(e,(this._itemsWithSeparatorsFrequency.get(e)||0)+1)}removeItemWithSeparator(e){const t=this._itemsWithSeparatorsFrequency.get(e)||0;t>1?this._itemsWithSeparatorsFrequency.set(e,t-1):this._itemsWithSeparatorsFrequency.delete(e)}},JL=Tl,Tl.ID="quickpickitem",Tl);L_=JL=sf([of(2,nn),of(3,_i)],L_);let D_=(Nl=class extends YA{constructor(e,t,i){super(e,t,i),this._visibleSeparatorsFrequency=new Map}get templateId(){return WL.ID}get visibleSeparators(){return[...this._visibleSeparatorsFrequency.keys()]}isSeparatorVisible(e){return this._visibleSeparatorsFrequency.has(e)}renderElement(e,t,i){const n=e.element;i.element=n,n.element=i.entry??void 0,n.element.classList.toggle("focus-inside",!!n.focusInsideSeparator);const s=n.separator,{labelHighlights:r,descriptionHighlights:a}=n;i.icon.style.backgroundImage="",i.icon.className="";let c;!n.saneTooltip&&n.saneDescription&&(c={markdown:{value:l.escape(n.saneDescription),supportThemeIcons:!0},markdownNotSupportedFallback:n.saneDescription});const h={matches:r||[],descriptionTitle:c,descriptionMatches:a||[],labelEscapeNewLines:!0};i.entry.classList.add("quick-input-list-separator-as-item"),i.label.setLabel(n.saneLabel,n.saneDescription,h),i.separator.style.display="none",i.entry.classList.add("quick-input-list-separator-border");const d=s.buttons;if(d&&d.length){const{primary:u,secondary:f}=dh(d,"quick-input-separator",g=>n.fireSeparatorButtonTriggered({button:g,separator:n.separator}));i.toolBar.setActions(u,f),i.entry.classList.add("has-actions")}else i.toolBar.setActions([]),i.entry.classList.remove("has-actions");this.addSeparator(n)}disposeElement(e,t,i){this.removeSeparator(e.element),this.isSeparatorVisible(e.element)||e.element.element?.classList.remove("focus-inside"),super.disposeElement(e,t,i)}addSeparator(e){this._visibleSeparatorsFrequency.set(e,(this._visibleSeparatorsFrequency.get(e)||0)+1)}removeSeparator(e){const t=this._visibleSeparatorsFrequency.get(e)||0;t>1?this._visibleSeparatorsFrequency.set(e,t-1):this._visibleSeparatorsFrequency.delete(e)}},WL=Nl,Nl.ID="quickpickseparator",Nl);D_=WL=sf([of(2,nn)],D_);let rf=class extends l.Disposable{constructor(e,t,i,n,s,r,a){super(),this.parent=e,this.hoverDelegate=t,this.linkOpenerDelegate=i,this.styles=s,this.accessibilityService=a,this._onLeave=this._register(new l.Emitter),this.onLeave=this._onLeave.event,this._visibleCountObservable=W("VisibleCount",0),this.onChangedVisibleCount=l.Event.fromObservable(this._visibleCountObservable,this._store),this._allVisibleCheckedObservable=W("AllVisibleChecked",!1),this.onChangedAllVisibleChecked=l.Event.fromObservable(this._allVisibleCheckedObservable,this._store),this._checkedCountObservable=W("CheckedCount",0),this.onChangedCheckedCount=l.Event.fromObservable(this._checkedCountObservable,this._store),this._checkedElementsObservable=Wh({equalsFn:l.equals},new Array),this.onChangedCheckedElements=l.Event.fromObservable(this._checkedElementsObservable,this._store),this._onButtonTriggered=this._register(new l.Emitter),this.onButtonTriggered=this._onButtonTriggered.event,this._onSeparatorButtonTriggered=this._register(new l.Emitter),this.onSeparatorButtonTriggered=this._onSeparatorButtonTriggered.event,this._elementChecked=this._register(new l.Emitter),this._elementCheckedEventBufferer=new l.EventBufferer,this._hasCheckboxes=!1,this._inputElements=new Array,this._elementTree=new Array,this._itemElements=new Array,this._elementDisposable=this._register(new l.DisposableStore),this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._matchOnLabelMode="fuzzy",this._sortByLabel=!0,this._shouldLoop=!0,this._container=K(this.parent,Gs(".quick-input-list")),this._separatorRenderer=this._register(r.createInstance(D_,t,this.styles.toggle)),this._itemRenderer=this._register(r.createInstance(L_,t,this.styles.toggle)),this._tree=this._register(r.createInstance(h_,"QuickInput",this._container,new pQ,[this._itemRenderer,this._separatorRenderer],{filter:{filter(c){return c.hidden?0:c instanceof hl?2:1}},sorter:{compare:(c,h)=>{if(!this.sortByLabel||!this._lastQueryString)return 0;const d=this._lastQueryString.toLowerCase();return CQ(c,h,d)}},accessibilityProvider:new _Q,setRowLineHeight:!1,multipleSelectionSupport:!1,hideTwistiesOfChildlessElements:!0,renderIndentGuides:sl.None,findWidgetEnabled:!1,indent:0,horizontalScrolling:!1,allowNonCollapsibleParents:!0,alwaysConsumeMouseWheel:!0})),this._tree.getHTMLElement().id=n,this._register(this._itemRenderer.onDidDisposeFocusedElement(()=>this._tree.domFocus())),this._register(this._separatorRenderer.onDidDisposeFocusedElement(()=>this._tree.domFocus())),this._registerListeners()}get onDidChangeFocus(){return l.Event.map(this._tree.onDidChangeFocus,e=>e.elements.filter(t=>t instanceof Zt).map(t=>t.item),this._store)}get onDidChangeSelection(){return l.Event.map(this._tree.onDidChangeSelection,e=>({items:e.elements.filter(t=>t instanceof Zt).map(t=>t.item),event:e.browserEvent}),this._store)}get displayed(){return this._container.style.display!=="none"}set displayed(e){this._container.style.display=e?"":"none"}get scrollTop(){return this._tree.scrollTop}set scrollTop(e){this._tree.scrollTop=e}get ariaLabel(){return this._tree.ariaLabel}set ariaLabel(e){this._tree.ariaLabel=e??""}set enabled(e){this._tree.getHTMLElement().style.pointerEvents=e?"":"none"}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e}get matchOnLabelMode(){return this._matchOnLabelMode}set matchOnLabelMode(e){this._matchOnLabelMode=e}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e}get shouldLoop(){return this._shouldLoop}set shouldLoop(e){this._shouldLoop=e}_registerListeners(){this._registerOnContainerClick(),this._registerOnMouseMiddleClick(),this._registerOnTreeModelChanged(),this._registerOnElementChecked(),this._registerOnContextMenu(),this._registerHoverListeners(),this._registerSelectionChangeListener(),this._registerSeparatorActionShowingListeners()}_registerOnContainerClick(){this._register(R(this._container,F.CLICK,e=>{(e.x||e.y)&&this._onLeave.fire()}))}_registerOnMouseMiddleClick(){this._register(R(this._container,F.AUXCLICK,e=>{e.button===1&&this._onLeave.fire()}))}_registerOnTreeModelChanged(){this._register(this._tree.onDidChangeModel(()=>{const e=this._itemElements.filter(t=>!t.hidden).length;this._visibleCountObservable.set(e,void 0),this._hasCheckboxes&&this._updateCheckedObservables()}))}_registerOnElementChecked(){this._register(this._elementCheckedEventBufferer.wrapEvent(this._elementChecked.event,(e,t)=>t)(e=>this._updateCheckedObservables()))}_registerOnContextMenu(){this._register(this._tree.onContextMenu(e=>{e.element&&(e.browserEvent.preventDefault(),this._tree.setSelection([e.element]))}))}_registerHoverListeners(){const e=this._register(new l.ThrottledDelayer(typeof this.hoverDelegate.delay=="function"?this.hoverDelegate.delay():this.hoverDelegate.delay));this._register(this._tree.onMouseOver(async t=>{if(cx(t.browserEvent.target)){e.cancel();return}if(!(!cx(t.browserEvent.relatedTarget)&&ut(t.browserEvent.relatedTarget,t.element?.element)))try{await e.trigger(async()=>{t.element instanceof Zt&&this.showHover(t.element)})}catch(i){if(!l.isCancellationError(i))throw i}})),this._register(this._tree.onMouseOut(t=>{ut(t.browserEvent.relatedTarget,t.element?.element)||e.cancel()}))}_registerSeparatorActionShowingListeners(){this._register(this._tree.onDidChangeFocus(e=>{const t=e.elements[0]?this._tree.getParentElement(e.elements[0]):null;for(const i of this._separatorRenderer.visibleSeparators){const n=i===t;!!(i.focusInsideSeparator&js.ACTIVE_ITEM)!==n&&(n?i.focusInsideSeparator|=js.ACTIVE_ITEM:i.focusInsideSeparator&=~js.ACTIVE_ITEM,this._tree.rerender(i))}})),this._register(this._tree.onMouseOver(e=>{const t=e.element?this._tree.getParentElement(e.element):null;for(const i of this._separatorRenderer.visibleSeparators){if(i!==t)continue;i.focusInsideSeparator&js.MOUSE_HOVER||(i.focusInsideSeparator|=js.MOUSE_HOVER,this._tree.rerender(i))}})),this._register(this._tree.onMouseOut(e=>{const t=e.element?this._tree.getParentElement(e.element):null;for(const i of this._separatorRenderer.visibleSeparators){if(i!==t)continue;i.focusInsideSeparator&js.MOUSE_HOVER&&(i.focusInsideSeparator&=~js.MOUSE_HOVER,this._tree.rerender(i))}}))}_registerSelectionChangeListener(){this._register(this._tree.onDidChangeSelection(e=>{const t=e.elements.filter(i=>i instanceof Zt);t.length!==e.elements.length&&(e.elements.length===1&&e.elements[0]instanceof hl&&(this._tree.setFocus([e.elements[0].children[0]]),this._tree.reveal(e.elements[0],0)),this._tree.setSelection(t))}))}setAllVisibleChecked(e){this._elementCheckedEventBufferer.bufferEvents(()=>{this._itemElements.forEach(t=>{!t.hidden&&!t.checkboxDisabled&&t.item.pickable!==!1&&(t.checked=e)})})}setElements(e){this._elementDisposable.clear(),this._lastQueryString=void 0,this._inputElements=e,this._hasCheckboxes=this.parent.classList.contains("show-checkboxes");let t;this._itemElements=new Array,this._elementTree=e.reduce((i,n,s)=>{let r;if(n.type==="separator"){if(!n.buttons)return i;t=new hl(s,a=>this._onSeparatorButtonTriggered.fire(a),n),r=t}else{const a=s>0?e[s-1]:void 0;let c;a&&a.type==="separator"&&!a.buttons&&(c=a);const h=new Zt(s,t?.children?t.children.length:s,this._hasCheckboxes&&n.pickable!==!1,d=>this._onButtonTriggered.fire(d),this._elementChecked,n,c);if(this._itemElements.push(h),t)return t.children.push(h),i;r=h}return i.push(r),i},new Array),this._setElementsToTree(this._elementTree),this.accessibilityService.isScreenReaderOptimized()&&l.disposableTimeout(()=>{const i=this._tree.getHTMLElement().querySelector(".monaco-list-row.focused"),n=i?.parentNode;if(i&&n){const s=i.nextSibling;i.remove(),n.insertBefore(i,s)}},0,this._elementDisposable)}setFocusedElements(e){const t=e.map(i=>this._itemElements.find(n=>n.item===i)).filter(i=>!!i).filter(i=>!i.hidden);if(this._tree.setFocus(t),e.length>0){const i=this._tree.getFocus()[0];i&&this._tree.reveal(i)}}getActiveDescendant(){return this._tree.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(e){const t=e.map(i=>this._itemElements.find(n=>n.item===i)).filter(i=>!!i);this._tree.setSelection(t)}getCheckedElements(){return this._itemElements.filter(e=>e.checked).map(e=>e.item)}setCheckedElements(e){this._elementCheckedEventBufferer.bufferEvents(()=>{const t=new Set;for(const i of e)t.add(i);for(const i of this._itemElements)i.checked=t.has(i.item)})}focus(e){if(this._itemElements.length)switch(e===xe.Second&&this._itemElements.length<2&&(e=xe.First),e){case xe.First:this._tree.scrollTop=0,this._tree.focusFirst(void 0,t=>t.element instanceof Zt);break;case xe.Second:{this._tree.scrollTop=0;let t=!1;this._tree.focusFirst(void 0,i=>i.element instanceof Zt?t?!0:(t=!t,!1):!1);break}case xe.Last:this._tree.scrollTop=this._tree.scrollHeight,this._tree.focusLast(void 0,t=>t.element instanceof Zt);break;case xe.Next:{const t=this._tree.getFocus();this._tree.focusNext(void 0,this._shouldLoop,void 0,n=>n.element instanceof Zt?(this._tree.reveal(n.element),!0):!1);const i=this._tree.getFocus();t.length&&t[0]===i[0]&&this._onLeave.fire();break}case xe.Previous:{const t=this._tree.getFocus();this._tree.focusPrevious(void 0,this._shouldLoop,void 0,n=>{if(!(n.element instanceof Zt))return!1;const s=this._tree.getParentElement(n.element);return s===null||s.children[0]!==n.element?this._tree.reveal(n.element):this._tree.reveal(s),!0});const i=this._tree.getFocus();t.length&&t[0]===i[0]&&this._onLeave.fire();break}case xe.NextPage:this._tree.focusNextPage(void 0,t=>t.element instanceof Zt?(this._tree.reveal(t.element),!0):!1);break;case xe.PreviousPage:this._tree.focusPreviousPage(void 0,t=>{if(!(t.element instanceof Zt))return!1;const i=this._tree.getParentElement(t.element);return i===null||i.children[0]!==t.element?this._tree.reveal(t.element):this._tree.reveal(i),!0});break;case xe.NextSeparator:{let t=!1;const i=this._tree.getFocus()[0];this._tree.focusNext(void 0,!0,void 0,s=>{if(t)return!0;if(s.element instanceof hl)t=!0,this._separatorRenderer.isSeparatorVisible(s.element)?this._tree.reveal(s.element.children[0]):this._tree.reveal(s.element,0);else if(s.element instanceof Zt){if(s.element.separator)return this._itemRenderer.isItemWithSeparatorVisible(s.element)?this._tree.reveal(s.element):this._tree.reveal(s.element,0),!0;if(s.element===this._elementTree[0])return this._tree.reveal(s.element,0),!0}return!1});const n=this._tree.getFocus()[0];i===n&&(this._tree.scrollTop=this._tree.scrollHeight,this._tree.focusLast(void 0,s=>s.element instanceof Zt));break}case xe.PreviousSeparator:{let t,i=!!this._tree.getFocus()[0]?.separator;this._tree.focusPrevious(void 0,!0,void 0,n=>{if(n.element instanceof hl)i?t||(this._separatorRenderer.isSeparatorVisible(n.element)?this._tree.reveal(n.element):this._tree.reveal(n.element,0),t=n.element.children[0]):i=!0;else if(n.element instanceof Zt&&!t){if(n.element.separator)this._itemRenderer.isItemWithSeparatorVisible(n.element)?this._tree.reveal(n.element):this._tree.reveal(n.element,0),t=n.element;else if(n.element===this._elementTree[0])return this._tree.reveal(n.element,0),!0}return!1}),t&&this._tree.setFocus([t]);break}}}clearFocus(){this._tree.setFocus([])}domFocus(){this._tree.domFocus()}layout(e){this._tree.getHTMLElement().style.maxHeight=e?`${Math.floor(e/44)*44+6}px`:"",this._tree.layout()}filter(e){if(this._lastQueryString=e,!(this._sortByLabel||this._matchOnLabel||this._matchOnDescription||this._matchOnDetail))return this._tree.layout(),!1;const t=e;if(e=e.trim(),!e||!(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))this._itemElements.forEach(i=>{i.labelHighlights=void 0,i.descriptionHighlights=void 0,i.detailHighlights=void 0,i.hidden=!1;const n=i.index&&this._inputElements[i.index-1];i.item&&(i.separator=n&&n.type==="separator"&&!n.buttons?n:void 0)});else{let i;this._itemElements.forEach(n=>{let s;this.matchOnLabelMode==="fuzzy"?s=this.matchOnLabel?Su(e,Ka(n.saneLabel))??void 0:void 0:s=this.matchOnLabel?bQ(t,Ka(n.saneLabel))??void 0:void 0;const r=this.matchOnDescription?Su(e,Ka(n.saneDescription||""))??void 0:void 0,a=this.matchOnDetail?Su(e,Ka(n.saneDetail||""))??void 0:void 0;if(s||r||a?(n.labelHighlights=s,n.descriptionHighlights=r,n.detailHighlights=a,n.hidden=!1):(n.labelHighlights=void 0,n.descriptionHighlights=void 0,n.detailHighlights=void 0,n.hidden=n.item?!n.item.alwaysShow:!0),n.item?n.separator=void 0:n.separator&&(n.hidden=!0),!this.sortByLabel){const c=n.index&&this._inputElements[n.index-1]||void 0;c?.type==="separator"&&!c.buttons&&(i=c),i&&!n.hidden&&(n.separator=i,i=void 0)}})}return this._setElementsToTree(this._sortByLabel&&e?this._itemElements:this._elementTree),this._tree.layout(),!0}toggleCheckbox(){this._elementCheckedEventBufferer.bufferEvents(()=>{const e=this._tree.getFocus().filter(i=>i instanceof Zt),t=this._allVisibleChecked(e);for(const i of e)i.checkboxDisabled||(i.checked=!t)})}style(e){this._tree.style(e)}toggleHover(){const e=this._tree.getFocus()[0];if(!e?.saneTooltip||!(e instanceof Zt))return;if(this._lastHover&&!this._lastHover.isDisposed){this._lastHover.dispose();return}this.showHover(e);const t=new l.DisposableStore;t.add(this._tree.onDidChangeFocus(i=>{i.elements[0]instanceof Zt&&this.showHover(i.elements[0])})),this._lastHover&&t.add(this._lastHover),this._elementDisposable.add(t)}_setElementsToTree(e){const t=new Array;for(const i of e)i instanceof hl?t.push({element:i,collapsible:!1,collapsed:!1,children:i.children.map(n=>({element:n,collapsible:!1,collapsed:!1}))}):t.push({element:i,collapsible:!1,collapsed:!1});this._tree.setChildren(null,t)}_allVisibleChecked(e,t=!0){for(let i=0,n=e.length;i{this._allVisibleCheckedObservable.set(this._allVisibleChecked(this._itemElements,!1),e);const t=this._itemElements.filter(i=>i.checked).length;this._checkedCountObservable.set(t,e),this._checkedElementsObservable.set(this.getCheckedElements(),e)})}showHover(e){this._lastHover&&!this._lastHover.isDisposed&&(this.hoverDelegate.onDidHideHover?.(),this._lastHover?.dispose()),!(!e.element||!e.saneTooltip)&&(this._lastHover=this.hoverDelegate.showHover({content:e.saneTooltip,target:e.element,linkHandler:t=>{this.linkOpenerDelegate(t)},appearance:{showPointer:!0},container:this._container,position:{hoverPosition:1}},!1))}};sf([et],rf.prototype,"onDidChangeFocus",null),sf([et],rf.prototype,"onDidChangeSelection",null),rf=sf([of(5,me),of(6,Ui)],rf);function bQ(o,e){const{text:t,iconOffsets:i}=e;if(!i||i.length===0)return ZA(o,t);const n=l.ltrim(t," "),s=t.length-n.length,r=ZA(o,n);if(r)for(const a of r){const c=i[a.start+s]+s;a.start+=c,a.end+=c}return r}function ZA(o,e){const t=e.toLowerCase().indexOf(o.toLowerCase());return t!==-1?[{start:t,end:t+o.length}]:null}function CQ(o,e,t){const i=o.labelHighlights||[],n=e.labelHighlights||[];return i.length&&!n.length?-1:!i.length&&n.length?1:i.length===0&&n.length===0?0:gQ(o.saneSortLabel,e.saneSortLabel,t)}function vQ(o,e={}){Zn.registerCommandAndKeybindingRule({weight:200,when:tf,metadata:{description:l.localize(1822,"Used while in the context of any kind of quick input. If you change one keybinding for this command, you should change all of the other keybindings (modifier variants) of this command as well.")},...o,secondary:HL(o.primary,o.secondary??[],e)})}function yi(o,e={}){Zn.registerCommandAndKeybindingRule({weight:200,when:de.and(de.or(de.equals(cl,"quickPick"),de.equals(cl,"quickTree")),tf),metadata:{description:l.localize(1823,"Used while in the context of the quick pick. If you change one keybinding for this command, you should change all of the other keybindings (modifier variants) of this command as well.")},...o,secondary:HL(o.primary,o.secondary??[],e)})}const dl=l.isMacintosh?256:2048;function HL(o,e,t={}){return t.withAltMod&&e.push(512+o),t.withCtrlMod&&(e.push(dl+o),t.withAltMod&&e.push(512+dl+o)),t.withShiftMod&&(e.push(1024+o),t.withAltMod&&e.push(1536+o),t.withCtrlMod&&(e.push(dl+1024+o),t.withAltMod&&e.push(512+dl+1024+o))),t.withCmdMod&&l.isMacintosh&&(e.push(2048+o),t.withCtrlMod&&e.push(2304+o),t.withAltMod&&(e.push(2560+o),t.withCtrlMod&&e.push(2816+o))),e}function ln(o,e){return t=>{const i=t.get(Ps).currentQuickInput;if(i)return e&&i.quickNavigate?i.focus(e):i.focus(o)}}yi({id:"quickInput.pageNext",primary:12,handler:ln(xe.NextPage)},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0}),yi({id:"quickInput.pagePrevious",primary:11,handler:ln(xe.PreviousPage)},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0}),yi({id:"quickInput.first",primary:dl+14,handler:ln(xe.First)},{withAltMod:!0,withCmdMod:!0}),yi({id:"quickInput.last",primary:dl+13,handler:ln(xe.Last)},{withAltMod:!0,withCmdMod:!0}),yi({id:"quickInput.next",primary:18,handler:ln(xe.Next)},{withCtrlMod:!0}),yi({id:"quickInput.previous",primary:16,handler:ln(xe.Previous)},{withCtrlMod:!0});const QA=l.localize(1824,"If we're in quick access mode, this will navigate to the next item. If we are not in quick access mode, this will navigate to the next separator."),XA=l.localize(1825,"If we're in quick access mode, this will navigate to the previous item. If we are not in quick access mode, this will navigate to the previous separator.");l.isMacintosh?(yi({id:"quickInput.nextSeparatorWithQuickAccessFallback",primary:2066,handler:ln(xe.NextSeparator,xe.Next),metadata:{description:QA}}),yi({id:"quickInput.nextSeparator",primary:2578,secondary:[2322],handler:ln(xe.NextSeparator)},{withCtrlMod:!0}),yi({id:"quickInput.previousSeparatorWithQuickAccessFallback",primary:2064,handler:ln(xe.PreviousSeparator,xe.Previous),metadata:{description:XA}}),yi({id:"quickInput.previousSeparator",primary:2576,secondary:[2320],handler:ln(xe.PreviousSeparator)},{withCtrlMod:!0})):(yi({id:"quickInput.nextSeparatorWithQuickAccessFallback",primary:530,handler:ln(xe.NextSeparator,xe.Next),metadata:{description:QA}}),yi({id:"quickInput.nextSeparator",primary:2578,handler:ln(xe.NextSeparator)}),yi({id:"quickInput.previousSeparatorWithQuickAccessFallback",primary:528,handler:ln(xe.PreviousSeparator,xe.Previous),metadata:{description:XA}}),yi({id:"quickInput.previousSeparator",primary:2576,handler:ln(xe.PreviousSeparator)})),Zn.registerCommandAndKeybindingRule({id:"quickInput.accept",primary:3,weight:200,when:de.and(de.notEquals(cl,"quickWidget"),tf,de.not("isComposing")),metadata:{description:l.localize(1826,"Used while in the context of some quick input. If you change one keybinding for this command, you should change all of the other keybindings (modifier variants) of this command as well.")},handler:o=>{o.get(Ps).currentQuickInput?.accept()},secondary:HL(3,[],{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0,withShiftMod:!0})}),yi({id:"quickInput.acceptInBackground",when:de.and(tf,de.equals(cl,"quickPick"),de.or(Mp.negate(),iQ)),primary:17,weight:250,handler:o=>{o.get(Ps).currentQuickInput?.accept(!0)}},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0}),vQ({id:"quickInput.hide",primary:9,handler:o=>{o.get(Ps).currentQuickInput?.hide()}},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0}),yi({id:"quickInput.toggleCheckbox",when:de.and(tf,de.or(de.equals(cl,"quickPick"),de.equals(cl,"quickTree")),Mp.negate()),primary:10,handler:o=>{o.get(Ps).toggle()}}),yi({id:"quickInput.toggleHover",primary:dl|10,handler:o=>{o.get(Ps).toggleHover()}});var wQ=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},JA=function(o,e){return function(t,i){e(t,i,o)}},e0;const af=Q;class SQ extends l.Disposable{constructor(){super(...arguments),this._onDidChangeCheckboxState=this._register(new l.Emitter),this.onDidChangeCheckboxState=this._onDidChangeCheckboxState.event}setCheckboxState(e,t){this._onDidChangeCheckboxState.fire({item:e,checked:t})}}let x_=(Rl=class extends l.Disposable{constructor(e,t,i,n,s,r,a){super(),this._hoverDelegate=e,this._buttonTriggeredEmitter=t,this.onCheckedEvent=i,this._checkboxStateHandler=n,this._toggleStyles=s,this._contextMenuService=r,this._themeService=a,this.templateId=e0.ID,this._onDidDisposeFocusedElement=this._register(new l.Emitter),this.onDidDisposeFocusedElement=this._onDidDisposeFocusedElement.event}renderTemplate(e){const t=new l.DisposableStore,i=K(e,af(".quick-input-tree-entry")),n=t.add(new BM("",!1,{...By,size:15}));i.appendChild(n.domNode);const s=K(i,af("label.quick-input-tree-label")),r=K(s,af(".quick-input-tree-rows")),a=K(r,af(".quick-input-tree-row")),c=Xf(a,af(".quick-input-tree-icon")),h=t.add(new w_(a,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0,hoverDelegate:this._hoverDelegate})),d=t.add(new ph(i,this._contextMenuService,{actionViewItemProvider:rh(this._toggleStyles),hoverDelegate:this._hoverDelegate,icon:!0,label:!1}));return d.getElement().classList.add("quick-input-tree-entry-action-bar"),{toDisposeTemplate:t,entry:i,checkbox:n,icon:c,label:h,actionBar:d,toDisposeElement:new l.DisposableStore}}renderElement(e,t,i,n){const s=i.toDisposeElement,r=e.element;if(r.pickable===!1)i.checkbox.domNode.style.display="none";else{const u=i.checkbox;u.domNode.style.display="",u.checked=r.checked??!1,s.add(l.Event.filter(this.onCheckedEvent,f=>f.item===r)(f=>u.checked=f.checked)),r.disabled&&u.disable(),s.add(u.onChange(f=>this._checkboxStateHandler.setCheckboxState(r,u.checked)))}if(r.iconPath){const u=rr(this._themeService.getColorTheme().type)?r.iconPath.dark:r.iconPath.light??r.iconPath.dark,f=l.URI.revive(u);i.icon.className="quick-input-tree-icon",i.icon.style.backgroundImage=Bs(f)}else i.icon.style.backgroundImage="",i.icon.className=r.iconClass?`quick-input-tree-icon ${r.iconClass}`:"";const{labelHighlights:a,descriptionHighlights:c}=e.filterData||{};let h;r.description&&(h={markdown:{value:l.escape(r.description),supportThemeIcons:!0},markdownNotSupportedFallback:r.description}),i.label.setLabel(r.label,r.description,{matches:a,descriptionMatches:c,extraClasses:r.iconClasses,italic:r.italic,strikethrough:r.strikethrough,labelEscapeNewLines:!0,descriptionTitle:h});const d=r.buttons;if(d&&d.length){const{primary:u,secondary:f}=dh(d,"quick-input-tree",g=>this._buttonTriggeredEmitter.fire({item:r,button:g}));i.actionBar.setActions(u,f),i.entry.classList.add("has-actions")}else i.actionBar.setActions([]),i.entry.classList.remove("has-actions")}disposeElement(e,t,i,n){Zf(i.entry)&&this._onDidDisposeFocusedElement.fire(),i.toDisposeElement.clear(),i.actionBar.setActions([])}disposeTemplate(e){e.toDisposeElement.dispose(),e.toDisposeTemplate.dispose()}},e0=Rl,Rl.ID="quickInputTreeElement",Rl);x_=e0=wQ([JA(5,nn),JA(6,_i)],x_);class yQ{getHeight(e){return 22}getTemplateId(e){return x_.ID}}function E_(o){let e=!1,t=!1,i=!1;for(const s of o){switch(s.element?.checked){case"mixed":i=!0;break;case!0:e=!0;break;default:t=!0;break}if(e&&t&&i)break}return t?i||e?"mixed":!1:i?"mixed":e}class LQ{constructor(e){this.onCheckedEvent=e}getWidgetAriaLabel(){return l.localize(1836,"Quick Tree")}getAriaLabel(e){return e.ariaLabel||[e.label,e.description].map(t=>yS(t)).filter(t=>!!t).join(", ")}getWidgetRole(){return"tree"}getRole(e){return"checkbox"}isChecked(e){return{get value(){return e.checked==="mixed"?"mixed":!!e.checked},onDidChange:t=>l.Event.filter(this.onCheckedEvent,i=>i.item===e)(i=>t())}}}class DQ{constructor(){this.filterValue="",this.matchOnLabel=!0,this.matchOnDescription=!1}filter(e,t){if(!this.filterValue||!(this.matchOnLabel||this.matchOnDescription))return e.children?{visibility:2,data:{}}:{visibility:1,data:{}};const i=this.matchOnLabel?Su(this.filterValue,Ka(e.label))??void 0:void 0,n=this.matchOnDescription?Su(this.filterValue,Ka(e.description||""))??void 0:void 0;return{visibility:t===1||i||n?1:e.children?2:0,data:{labelHighlights:i,descriptionHighlights:n}}}}class xQ extends l.Disposable{constructor(){super(...arguments),this._sortByLabel=!0}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e}compare(e,t){if(!this._sortByLabel)return 0;if(e.labelt.label)return 1;if(e.description&&t.description){if(e.descriptiont.description)return 1}else{if(e.description)return-1;if(t.description)return 1}return 0}}var EQ=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},IQ=function(o,e){return function(t,i){e(t,i,o)}};const TQ=Q,NQ="quick-input-tree-flat";class RQ{constructor(){this._elementIds=new WeakMap,this._counter=0}getId(e){let t=e.id;return t!==void 0||(t=this._elementIds.get(e),t!==void 0)||(t=`__generated_${this._counter++}`,this._elementIds.set(e,t)),t}}let t0=class extends l.Disposable{constructor(e,t,i,n){super(),this.instantiationService=n,this._onDidTriggerButton=this._register(new l.Emitter),this._onDidChangeCheckboxState=this._register(new l.Emitter),this.onDidChangeCheckboxState=this._onDidChangeCheckboxState.event,this._onDidCheckedLeafItemsChange=this._register(new l.Emitter),this.onDidChangeCheckedLeafItems=this._onDidCheckedLeafItemsChange.event,this._onLeave=this._register(new l.Emitter),this.onLeave=this._onLeave.event,this._onDidAccept=this._register(new l.Emitter),this.onDidAccept=this._onDidAccept.event,this._container=K(e,TQ(".quick-input-tree")),this._checkboxStateHandler=this._register(new SQ),this._renderer=this._register(this.instantiationService.createInstance(x_,t,this._onDidTriggerButton,this.onDidChangeCheckboxState,this._checkboxStateHandler,i.toggle)),this._filter=this.instantiationService.createInstance(DQ),this._sorter=this._register(new xQ),this._tree=this._register(this.instantiationService.createInstance(h_,"QuickInputTree",this._container,new yQ,[this._renderer],{accessibilityProvider:new LQ(this.onDidChangeCheckboxState),horizontalScrolling:!1,multipleSelectionSupport:!1,findWidgetEnabled:!1,alwaysConsumeMouseWheel:!0,hideTwistiesOfChildlessElements:!0,renderIndentGuides:sl.None,expandOnDoubleClick:!0,expandOnlyOnTwistieClick:!0,disableExpandOnSpacebar:!0,sorter:this._sorter,filter:this._filter,identityProvider:new RQ})),this._register(this._renderer.onDidDisposeFocusedElement(()=>{this._tree.domFocus()})),this.registerCheckboxStateListeners(),this.registerOnDidChangeFocus()}get tree(){return this._tree}get displayed(){return this._container.style.display!=="none"}set displayed(e){this._container.style.display=e?"":"none"}get sortByLabel(){return this._sorter.sortByLabel}set sortByLabel(e){this._sorter.sortByLabel=e,this._tree.resort(null,!0)}getActiveDescendant(){return this._tree.getHTMLElement().getAttribute("aria-activedescendant")}filter(e){this._filter.filterValue=e,this._tree.refilter()}updateFilterOptions(e){e.matchOnLabel!==void 0&&(this._filter.matchOnLabel=e.matchOnLabel),e.matchOnDescription!==void 0&&(this._filter.matchOnDescription=e.matchOnDescription),this._tree.refilter()}setTreeData(e){let t=!1;const i=s=>{let r;return s.children&&s.children.length>0&&(t=!0,r=s.children.map(a=>i(a)),s.checked=E_(r)),{element:s,children:r,collapsible:!!r,collapsed:s.collapsed?ki.PreserveOrCollapsed:ki.PreserveOrExpanded}},n=e.map(s=>i(s));this._tree.setChildren(null,n),this._container.classList.toggle(NQ,!t)}layout(e){this._tree.getHTMLElement().style.maxHeight=e?`${Math.floor(e/44)*44+6}px`:"",this._tree.layout()}focus(e){switch(e){case xe.First:this._tree.scrollTop=0,this._tree.focusFirst();break;case xe.Second:{this._tree.scrollTop=0;let t=!1;this._tree.focusFirst(void 0,i=>t?!0:(t=!t,!1));break}case xe.Last:this._tree.scrollTop=this._tree.scrollHeight,this._tree.focusLast();break;case xe.Next:{const t=this._tree.getFocus();this._tree.focusNext(void 0,!1,void 0,n=>(this._tree.reveal(n.element),!0));const i=this._tree.getFocus();t.length&&t[0]===i[0]&&this._onLeave.fire();break}case xe.Previous:{const t=this._tree.getFocus();this._tree.focusPrevious(void 0,!1,void 0,n=>(this._tree.reveal(n.element),!0));const i=this._tree.getFocus();t.length&&t[0]===i[0]&&this._onLeave.fire();break}case xe.NextPage:this._tree.focusNextPage(void 0,t=>(this._tree.reveal(t.element),!0));break;case xe.PreviousPage:this._tree.focusPreviousPage(void 0,t=>(this._tree.reveal(t.element),!0));break;case xe.NextSeparator:case xe.PreviousSeparator:return}}registerCheckboxStateListeners(){this._register(this._tree.onDidOpen(e=>{const t=e.element;if(!t||t.disabled)return;if(t.pickable===!1){this._tree.setFocus([t]),this._onDidAccept.fire();return}const i=e.browserEvent?.target;i&&i.classList.contains(tL.CLASS_NAME)||this.updateCheckboxState(t,t.checked===!0)})),this._register(this._checkboxStateHandler.onDidChangeCheckboxState(e=>{this.updateCheckboxState(e.item,e.checked===!0,!0),this._tree.setFocus([e.item]),this._tree.setSelection([e.item])}))}updateCheckboxState(e,t,i=!1){if((e.checked??!1)===t)return;e.checked=t,i||this._tree.rerender(e);const n=new Set,s=[...this._tree.getNode(e).children];for(;s.length;){const a=s.shift();a?.element&&!n.has(a.element)&&(n.add(a.element),(a.element.checked??!1)!==e.checked&&(a.element.checked=e.checked,this._tree.rerender(a.element)),s.push(...a.children))}let r=this._tree.getParentElement(e);for(;r;){const a=[...this._tree.getNode(r).children],c=E_(a);(r.checked??!1)!==c&&(r.checked=c,this._tree.rerender(r)),r=this._tree.getParentElement(r)}this._onDidChangeCheckboxState.fire({item:e,checked:e.checked??!1}),this._onDidCheckedLeafItemsChange.fire(this.getCheckedLeafItems())}registerOnDidChangeFocus(){this._register(this._tree.onDidChangeFocus(e=>{const t=this._tree.getFocus().findLast(i=>i!==null);this._tree.setSelection(t?[t]:[],e.browserEvent)}))}getCheckedLeafItems(){const e=new Set,t=[...this._tree.getNode().children],i=new Array;for(;t.length;){const n=t.shift();!n?.element||e.has(n.element)||n.element.checked&&(e.add(n.element),t.push(...n.children),n.element.children||i.push(n.element))}return i}getActiveItems(){return this._tree.getFocus().filter(e=>e!==null)}toggleCheckbox(){for(const e of this.getActiveItems())e.pickable!==!1&&!e.disabled&&this.updateCheckboxState(e,e.checked!==!0)}checkAll(e){const t=new Set,i=[...this._tree.getNode().children];let n=!1;for(;i.length;){const s=i.shift();!s?.element||t.has(s.element)||s.element.checked!==e&&(n=!0,s.element.checked=e,i.push(...s.children),t.add(s.element),this._tree.rerender(s.element),this._onDidChangeCheckboxState.fire({item:s.element,checked:s.element.checked}))}n&&this._onDidCheckedLeafItemsChange.fire(this.getCheckedLeafItems())}};t0=EQ([IQ(3,me)],t0);const yb=class yb extends uh{constructor(e){super(e),this.type="quickTree",this._value=W("value",""),this._ariaLabel=W("ariaLabel",void 0),this._placeholder=W("placeholder",void 0),this._matchOnDescription=W("matchOnDescription",!1),this._matchOnLabel=W("matchOnLabel",!0),this._sortByLabel=W("sortByLabel",!0),this._activeItems=W("activeItems",[]),this._itemTree=W("itemTree",[]),this._onDidChangeCheckedLeafItems=this._register(new l.Emitter),this._onDidChangeCheckboxState=this._register(new l.Emitter),this._onDidAcceptEmitter=this._register(new l.Emitter),this.onDidAccept=l.Event.any(e.onDidAccept,this._onDidAcceptEmitter.event),this._registerAutoruns(),this._register(e.tree.onDidChangeCheckedLeafItems(t=>this._onDidChangeCheckedLeafItems.fire(t))),this._register(e.tree.onDidChangeCheckboxState(t=>this._onDidChangeCheckboxState.fire(t.item))),this._register(e.tree.tree.onDidChangeFocus(t=>{this._activeItems.set(e.tree.getActiveItems(),void 0)}))}get placeholder(){return this._placeholder.get()}set placeholder(e){this._placeholder.set(e,void 0)}show(){if(!this.visible){const t={title:!!this.title||!!this.step||!!this.titleButtons.length,description:!!this.description,checkAll:!0,checkBox:!0,inputBox:!0,progressBar:!0,visibleCount:!0,count:!0,ok:!0,list:!1,tree:!0,message:!!this.validationMessage,customButton:!1};this.ui.setVisibilities(t),this.visibleDisposables.add(this.ui.inputBox.onDidChange(i=>{this._value.set(i,void 0)})),this.visibleDisposables.add(this.ui.tree.onDidChangeCheckboxState(i=>{const n=E_([...this.ui.tree.tree.getNode().children]);this.ui.checkAll.checked!==n&&(this.ui.checkAll.checked=n)})),this.visibleDisposables.add(this.ui.checkAll.onChange(i=>{const n=this.ui.checkAll.checked;this.ui.tree.checkAll(n)})),this.visibleDisposables.add(this.ui.tree.onDidChangeCheckedLeafItems(i=>{this.ui.count.setCount(i.length)}))}super.show(),l.setTimeout0(()=>this.ui.count.setCount(this.ui.tree.getCheckedLeafItems().length));const e=E_([...this.ui.tree.tree.getNode().children]);this.ui.checkAll.checked!==e&&(this.ui.checkAll.checked=e)}update(){if(!this.visible)return;const e={title:!!this.title||!!this.step||!!this.titleButtons.length,description:!!this.description,checkAll:!0,checkBox:!0,inputBox:!0,progressBar:!0,visibleCount:!0,count:!0,ok:!0,tree:!0,message:!!this.validationMessage};this.ui.setVisibilities(e),super.update()}_registerAutoruns(){this.registerVisibleAutorun(e=>{const t=this._value.read(e);this.ui.inputBox.value=t,this.ui.tree.filter(t)}),this.registerVisibleAutorun(e=>{let t=this._ariaLabel.read(e);t||(t=this.placeholder||yb.DEFAULT_ARIA_LABEL,this.title&&(t+=` - ${this.title}`)),this.ui.list.ariaLabel!==t&&(this.ui.list.ariaLabel=t??null),this.ui.inputBox.ariaLabel!==t&&(this.ui.inputBox.ariaLabel=t??"input")}),this.registerVisibleAutorun(e=>{const t=this._placeholder.read(e);this.ui.inputBox.placeholder!==t&&(this.ui.inputBox.placeholder=t??"")}),this.registerVisibleAutorun(e=>{const t=this._matchOnLabel.read(e),i=this._matchOnDescription.read(e);this.ui.tree.updateFilterOptions({matchOnLabel:t,matchOnDescription:i})}),this.registerVisibleAutorun(e=>{const t=this._sortByLabel.read(e);this.ui.tree.sortByLabel=t}),this.registerVisibleAutorun(e=>{const t=this._itemTree.read(e);this.ui.tree.setTreeData(t)})}registerVisibleAutorun(e){this._register(he(t=>{this._visible.read(t)&&e(t)}))}focus(e){this.ui.tree.focus(e),this.ui.tree.tree.domFocus()}accept(e){this._onDidAcceptEmitter.fire()}};yb.DEFAULT_ARIA_LABEL=l.localize(1837,"Type to narrow down results.");let i0=yb;var WA=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Tr=function(o,e){return function(t,i){e(t,i,o)}},n0;const cn=Q,s0="workbench.quickInput.viewState";let o0=(Ml=class extends l.Disposable{get currentQuickInput(){return this.controller??void 0}get container(){return this._container}constructor(e,t,i,n,s,r){super(),this.options=e,this.layoutService=t,this.instantiationService=i,this.storageService=s,this.contextMenuService=r,this.enabled=!0,this.onDidAcceptEmitter=this._register(new l.Emitter),this.onDidCustomEmitter=this._register(new l.Emitter),this.onDidTriggerButtonEmitter=this._register(new l.Emitter),this.keyMods={ctrlCmd:!1,alt:!1,shift:!1},this.controller=null,this.onShowEmitter=this._register(new l.Emitter),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new l.Emitter),this.onHide=this.onHideEmitter.event,this._alignment=W(this,"top"),this.alignment=this._alignment,this.inQuickInputContext=JZ.bindTo(n),this.quickInputTypeContext=eQ.bindTo(n),this.endOfQuickInputBoxContext=tQ.bindTo(n),this.idPrefix=e.idPrefix,this._container=e.container,this.styles=e.styles,this._register(l.Event.runAndSubscribe(id,({window:a,disposables:c})=>this.registerKeyModsListeners(a,c),{window:Ae,disposables:this._store})),this._register(dF(a=>{this.ui&&j(this.ui.container)===a&&(this.reparentUI(this.layoutService.mainContainer),this.layout(this.layoutService.mainContainerDimension,this.layoutService.mainContainerOffset.quickPickTop))})),this.viewState=this.loadViewState()}registerKeyModsListeners(e,t){const i=n=>{this.keyMods.ctrlCmd=n.ctrlKey||n.metaKey,this.keyMods.alt=n.altKey,this.keyMods.shift=n.shiftKey};for(const n of[F.KEY_DOWN,F.KEY_UP,F.MOUSE_DOWN])t.add(R(e,n,i,!0))}getUI(e){if(this.ui)return e&&j(this._container)!==j(this.layoutService.activeContainer)&&(this.reparentUI(this.layoutService.activeContainer),this.layout(this.layoutService.activeContainerDimension,this.layoutService.activeContainerOffset.quickPickTop)),this.ui;const t=K(this._container,cn(".quick-input-widget.show-file-icons"));t.tabIndex=-1,t.style.display="none";const i=bn(t),n=K(t,cn(".quick-input-titlebar")),s=this._register(new ph(n,this.contextMenuService,{hoverDelegate:this.options.hoverDelegate,actionViewItemProvider:rh(this.styles.toggle),icon:!0,label:!1}));s.getElement().classList.add("quick-input-left-action-bar");const r=K(n,cn(".quick-input-title")),a=this._register(new ph(n,this.contextMenuService,{hoverDelegate:this.options.hoverDelegate,actionViewItemProvider:rh(this.styles.toggle),icon:!0,label:!1}));a.getElement().classList.add("quick-input-right-action-bar");const c=K(t,cn(".quick-input-header")),h=this._register(new BM(l.localize(1827,"Toggle all checkboxes"),!1,{...By,size:15}));K(c,h.domNode),this._register(h.onChange(()=>{const B=h.checked;P.setAllVisibleChecked(B===!0)})),this._register(R(h.domNode,F.CLICK,B=>{(B.x||B.y)&&g.setFocus()}));const d=K(c,cn(".quick-input-description")),u=K(c,cn(".quick-input-and-message")),f=K(u,cn(".quick-input-filter")),g=this._register(new lQ(f,this.styles.inputBox,this.styles.toggle));g.setAttribute("aria-describedby",`${this.idPrefix}message`);const m=K(f,cn(".quick-input-visible-count"));m.setAttribute("aria-live","polite"),m.setAttribute("aria-atomic","true");const p=this._register(new YL(m,{countFormat:l.localize(1828,"{0} Results")},this.styles.countBadge)),b=K(f,cn(".quick-input-count"));b.setAttribute("aria-live","polite");const v=this._register(new YL(b,{countFormat:l.localize(1829,"{0} Selected")},this.styles.countBadge)),C=this._register(new ph(c,this.contextMenuService,{hoverDelegate:this.options.hoverDelegate,actionViewItemProvider:rh(this.styles.toggle),icon:!0,label:!1}));C.getElement().classList.add("quick-input-inline-action-bar");const w=K(c,cn(".quick-input-action")),S=this._register(new v_(w,this.styles.button));S.label=l.localize(1830,"OK"),this._register(S.onDidClick(B=>{this.onDidAcceptEmitter.fire()}));const L=K(c,cn(".quick-input-action")),D=this._register(new v_(L,{...this.styles.button,supportIcons:!0}));D.label=l.localize(1831,"Custom"),this._register(D.onDidClick(B=>{this.onDidCustomEmitter.fire()}));const x=K(u,cn(`#${this.idPrefix}message.quick-input-message`)),I=this._register(new XL(t,this.styles.progressBar));I.getContainer().classList.add("quick-input-progress");const T=K(t,cn(".quick-input-html-widget"));T.tabIndex=-1;const M=K(t,cn(".quick-input-description")),O=this.idPrefix+"list",P=this._register(this.instantiationService.createInstance(rf,t,this.options.hoverDelegate,this.options.linkOpenerDelegate,O,this.styles));g.setAttribute("aria-controls",O),this._register(P.onDidChangeFocus(()=>{if(g.hasFocus()){const B=P.getActiveDescendant();B?(g.setAttribute("aria-activedescendant",B),g.setListFocusMode(!0)):(g.removeAttribute("aria-activedescendant"),g.setListFocusMode(!1))}})),this._register(P.onChangedAllVisibleChecked(B=>{h.checked=B})),this._register(P.onChangedVisibleCount(B=>{p.setCount(B)})),this._register(P.onChangedCheckedCount(B=>{l.setTimeout0(()=>v.setCount(B))})),this._register(P.onLeave(()=>{setTimeout(()=>{this.controller&&(g.setFocus(),this.controller instanceof fh&&this.controller.canSelectMany&&P.clearFocus())},0)}));const k=this._register(this.instantiationService.createInstance(t0,t,this.options.hoverDelegate,this.styles));this._register(k.tree.onDidChangeFocus(()=>{if(g.hasFocus()){const B=k.getActiveDescendant();B?(g.setAttribute("aria-activedescendant",B),g.setListFocusMode(!0)):(g.removeAttribute("aria-activedescendant"),g.setListFocusMode(!1))}})),this._register(k.onLeave(()=>{setTimeout(()=>{this.controller&&(g.setFocus(),k.tree.setFocus([]))},0)})),this._register(k.onDidAccept(()=>{this.onDidAcceptEmitter.fire()})),this._register(k.tree.onDidChangeContentHeight(()=>this.updateLayout()));const U=Xr(t);return this._register(U),this._register(R(t,F.FOCUS,B=>{const G=this.getUI();if(ut(B.relatedTarget,G.inputContainer)){const X=G.inputBox.isSelectionAtEnd();this.endOfQuickInputBoxContext.get()!==X&&this.endOfQuickInputBoxContext.set(X)}ut(B.relatedTarget,G.container)||(this.inQuickInputContext.set(!0),this.previousFocusElement=Ve(B.relatedTarget)?B.relatedTarget:void 0)},!0)),this._register(U.onDidBlur(()=>{!this.getUI().ignoreFocusOut&&!this.options.ignoreFocusOut()&&this.hide(ku.Blur),this.inQuickInputContext.set(!1),this.endOfQuickInputBoxContext.set(!1),this.previousFocusElement=void 0})),this._register(g.onKeyDown(B=>{const G=this.getUI().inputBox.isSelectionAtEnd();this.endOfQuickInputBoxContext.get()!==G&&this.endOfQuickInputBoxContext.set(G),l.isModifierKey(B.keyCode)||(g.removeAttribute("aria-activedescendant"),g.setListFocusMode(!1))})),this._register(R(t,F.FOCUS,B=>{g.setFocus()})),this.dndController=this._register(this.instantiationService.createInstance(r0,this._container,t,[{node:n,includeChildren:!0,excludeNodes:[s.getElement(),a.getElement()]},{node:c,includeChildren:!1}],this.viewState)),this._register(he(B=>{const G=this.dndController?.dndViewState.read(B);G&&(G.top!==void 0&&G.left!==void 0?this.viewState={...this.viewState,top:G.top,left:G.left}:this.viewState=void 0,this.updateLayout(),G.done&&this.saveViewState(this.viewState))})),this._register(he(B=>{this._alignment.set(this.dndController.alignment.read(B),void 0)})),this.ui={container:t,styleSheet:i,leftActionBar:s,titleBar:n,title:r,description1:M,description2:d,widget:T,rightActionBar:a,inlineActionBar:C,checkAll:h,inputContainer:u,filterContainer:f,inputBox:g,visibleCountContainer:m,visibleCount:p,countContainer:b,count:v,okContainer:w,ok:S,message:x,customButtonContainer:L,customButton:D,list:P,tree:k,progressBar:I,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,show:B=>this.show(B),hide:()=>this.hide(),setVisibilities:B=>this.setVisibilities(B),setEnabled:B=>this.setEnabled(B),setContextKey:B=>this.options.setContextKey(B),linkOpenerDelegate:B=>this.options.linkOpenerDelegate(B)},this.updateStyles(),this.ui}reparentUI(e){this.ui&&(this._container=e,K(this._container,this.ui.container),this.dndController?.reparentUI(this._container))}pick(e,t={},i=l.CancellationToken.None){return new Promise((n,s)=>{let r=d=>{r=n,t.onKeyMods?.(a.keyMods),n(d)};if(i.isCancellationRequested){r(void 0);return}const a=this.createQuickPick({useSeparators:!0});let c;const h=[a,a.onDidAccept(()=>{if(a.canSelectMany)r(a.selectedItems.slice()),a.hide();else{const d=a.activeItems[0];d&&(r(d),a.hide())}}),a.onDidChangeActive(d=>{const u=d[0];u&&t.onDidFocus&&t.onDidFocus(u)}),a.onDidChangeSelection(d=>{if(!a.canSelectMany){const u=d[0];u&&(r(u),a.hide())}}),a.onDidTriggerItemButton(d=>t.onDidTriggerItemButton&&t.onDidTriggerItemButton({...d,removeItem:()=>{const u=a.items.indexOf(d.item);if(u!==-1){const f=a.items.slice(),g=f.splice(u,1),m=a.activeItems.filter(b=>b!==g[0]),p=a.keepScrollPosition;a.keepScrollPosition=!0,a.items=f,m&&(a.activeItems=m),a.keepScrollPosition=p}}})),a.onDidTriggerSeparatorButton(d=>t.onDidTriggerSeparatorButton?.(d)),a.onDidChangeValue(d=>{c&&!d&&(a.activeItems.length!==1||a.activeItems[0]!==c)&&(a.activeItems=[c])}),i.onCancellationRequested(()=>{a.hide()}),a.onDidHide(()=>{l.dispose(h),r(void 0)})];a.title=t.title,t.value&&(a.value=t.value),a.canSelectMany=!!t.canPickMany,a.placeholder=t.placeHolder,a.prompt=t.prompt,a.ignoreFocusOut=!!t.ignoreFocusLost,a.matchOnDescription=!!t.matchOnDescription,a.matchOnDetail=!!t.matchOnDetail,t.sortByLabel!==void 0&&(a.sortByLabel=t.sortByLabel),a.matchOnLabel=t.matchOnLabel===void 0||t.matchOnLabel,a.quickNavigate=t.quickNavigate,a.hideInput=!!t.hideInput,a.contextKey=t.contextKey,a.anchor=t.anchor,a.anchorPosition=t.anchorPosition,a.busy=!0,Promise.all([e,t.activeItem]).then(([d,u])=>{c=u,a.busy=!1,a.items=d,a.canSelectMany&&(a.selectedItems=d.filter(f=>f.type!=="separator"&&f.picked)),c&&(a.activeItems=[c])}),a.show(),Promise.resolve(e).then(void 0,d=>{s(d),a.hide()})})}setValidationOnInput(e,t){t&&l.isString(t)?(e.severity=rt.Error,e.validationMessage=t):t&&!l.isString(t)?(e.severity=t.severity,e.validationMessage=t.content):(e.severity=rt.Ignore,e.validationMessage=void 0)}input(e={},t=l.CancellationToken.None){return new Promise(i=>{if(t.isCancellationRequested){i(void 0);return}const n=this.createInputBox(),s=e.validateInput||(()=>Promise.resolve(void 0)),r=l.Event.debounce(n.onDidChangeValue,(d,u)=>u,100);let a=e.value||"",c=Promise.resolve(s(a));const h=[n,r(d=>{d!==a&&(c=Promise.resolve(s(d)),a=d),c.then(u=>{d===a&&this.setValidationOnInput(n,u)})}),n.onDidAccept(()=>{const d=n.value;d!==a&&(c=Promise.resolve(s(d)),a=d),c.then(u=>{!u||!l.isString(u)&&u.severity!==rt.Error?(i(d),n.hide()):d===a&&this.setValidationOnInput(n,u)})}),t.onCancellationRequested(()=>{n.hide()}),n.onDidHide(()=>{l.dispose(h),i(void 0)})];n.title=e.title,n.value=e.value||"",n.valueSelection=e.valueSelection,n.prompt=e.prompt,n.placeholder=e.placeHolder,n.password=!!e.password,n.ignoreFocusOut=!!e.ignoreFocusLost,n.show()})}createQuickPick(e={useSeparators:!1}){const t=this.getUI(!0);return new fh(t)}createInputBox(){const e=this.getUI(!0);return new nQ(e)}show(e){const t=this.getUI(!0),i=this.controller;if(this.controller=e,i?.didHide(),Ve(e.anchor)){const s=j(e.anchor);j(this._container)!==s&&this.reparentUI(this.layoutService.getContainer(s))}this.setEnabled(!0),t.leftActionBar.setActions([]),t.title.textContent="",t.description1.textContent="",t.description2.textContent="",oi(t.widget),t.rightActionBar.setActions([]),t.inlineActionBar.setActions([]),t.checkAll.checked=!1,t.inputBox.placeholder="",t.inputBox.password=!1,t.inputBox.showDecoration(rt.Ignore),t.visibleCount.setCount(0),t.count.setCount(0),t.countContainer.style.right="4px",oi(t.message),t.progressBar.stop(),t.progressBar.getContainer().setAttribute("aria-hidden","true"),t.list.setElements([]),t.list.matchOnDescription=!1,t.list.matchOnDetail=!1,t.list.matchOnLabel=!0,t.list.sortByLabel=!0,t.tree.updateFilterOptions({matchOnDescription:!1,matchOnLabel:!0}),t.tree.sortByLabel=!0,t.ignoreFocusOut=!1,t.inputBox.toggles=void 0,t.inputBox.actions=void 0;const n=this.options.backKeybindingLabel();UA.tooltip=n?l.localize(1832,"Back ({0})",n):l.localize(1833,"Back"),t.container.style.display="",this.updateLayout(),this.dndController?.setEnabled(!e.anchor),this.dndController?.layoutContainer(),e.anchor?this._alignment.set("custom",void 0):this._alignment.set(this.dndController?.alignment.get()??"top",void 0),this.onShowEmitter.fire(),t.inputBox.setFocus(),this.quickInputTypeContext.set(e.type)}isVisible(){return!!this.ui&&this.ui.container.style.display!=="none"}setVisibilities(e){const t=this.getUI();t.title.style.display=e.title?"":"none",t.description1.style.display=e.description&&(e.inputBox||e.checkAll)?"":"none",t.description2.style.display=e.description&&!(e.inputBox||e.checkAll)?"":"none",t.checkAll.domNode.style.display=e.checkAll?"":"none",t.inputContainer.style.display=e.inputBox?"":"none",t.filterContainer.style.display=e.inputBox?"":"none",t.visibleCountContainer.style.display=e.visibleCount?"":"none",t.countContainer.style.display=e.count?"":"none",t.okContainer.style.display=e.ok?"":"none",t.customButtonContainer.style.display=e.customButton?"":"none",t.message.style.display=e.message?"":"none",t.progressBar.getContainer().style.display=e.progressBar?"":"none",t.list.displayed=!!e.list,t.tree.displayed=!!e.tree,t.container.classList.toggle("show-checkboxes",!!e.checkBox),t.container.classList.toggle("hidden-input",!e.inputBox&&!e.description),this.updateLayout()}setEnabled(e){if(e!==this.enabled){this.enabled=e;const t=this.getUI();for(let i=0;i .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&s.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&s.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&s.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&s.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&s.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),s.push("}"));const r=s.join(` +`);r!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=r)}}loadViewState(){try{const e=JSON.parse(this.storageService.get(s0,-1,"{}"));if(e.top!==void 0||e.left!==void 0)return e}catch{}}saveViewState(e){this.layoutService.activeContainer===this.layoutService.mainContainer&&(e!==void 0?this.storageService.store(s0,JSON.stringify(e),-1,1):this.storageService.remove(s0,-1))}},n0=Ml,Ml.MAX_WIDTH=600,Ml);o0=n0=WA([Tr(1,Os),Tr(2,me),Tr(3,be),Tr(4,Qa),Tr(5,nn)],o0);let r0=class extends l.Disposable{constructor(e,t,i,n,s,r,a){super(),this._container=e,this._quickInputContainer=t,this._quickInputDragAreas=i,this._layoutService=s,this.configurationService=a,this.dndViewState=W(this,void 0),this._enabled=!0,this._snapThreshold=20,this._snapLineHorizontalRatio=.25,this._alignment=W(this,"top"),this.alignment=this._alignment,this._quickInputAlignmentContext=HZ.bindTo(r);const c=Tq(this.configurationService)==="custom";this._controlsOnLeft=c&&l.platform===1,this._controlsOnRight=c&&(l.platform===3||l.platform===2),this._registerLayoutListener(),this.registerMouseListeners(),this.dndViewState.set({...n,done:!0},void 0),n?.top!==void 0&&n?.left!==void 0&&this._setAlignmentState(void 0)}reparentUI(e){this._container=e}layoutContainer(e=this._layoutService.activeContainerDimension){if(!this._enabled)return;const t=this.dndViewState.get(),i=this._quickInputContainer.getBoundingClientRect();if(t?.top!==void 0&&t?.left!==void 0){const n=Math.round(t.left*100)/100,s=e.width,r=i.width,a=n*s-r/2;this._layout(t.top*e.height,a)}}setEnabled(e){this._enabled=e,this._quickInputContainer.classList.toggle("no-drag",!e)}_setAlignmentState(e){this._quickInputAlignmentContext.set(e),this._alignment.set(e??"custom",void 0)}_registerLayoutListener(){this._register(l.Event.filter(this._layoutService.onDidLayoutContainer,e=>e.container===this._container)(e=>this.layoutContainer(e.dimension)))}registerMouseListeners(){const e=this._quickInputContainer;this._register(ox(e,t=>{if(!this._enabled)return;const i=new Bi(j(e),t);if(i.detail!==2)return;const n=this._quickInputDragAreas.find(({node:s,includeChildren:r})=>r?ut(i.target,s):i.target===s);!n||n.excludeNodes?.some(s=>ut(i.target,s))||(this.dndViewState.set({top:void 0,left:void 0,done:!0},void 0),this._setAlignmentState("top"))})),this._register(nC(e,t=>{if(!this._enabled)return;const i=j(this._layoutService.activeContainer),n=new Bi(i,t),s=this._quickInputDragAreas.find(({node:f,includeChildren:g})=>g?ut(n.target,f):n.target===f);if(!s||s.excludeNodes?.some(f=>ut(n.target,f)))return;const r=this._quickInputContainer.getBoundingClientRect(),a=n.browserEvent.clientX-r.left,c=n.browserEvent.clientY-r.top;let h=!1;const d=bF(i,f=>{new Bi(i,f).preventDefault(),h||(h=!0),this._layout(f.clientY-c,f.clientX-a)}),u=ox(i,f=>{if(h){const g=this.dndViewState.get();this.dndViewState.set({top:g?.top,left:g?.left,done:!0},void 0)}d.dispose(),u.dispose()})}))}_layout(e,t){const i=this._getTopSnapValue(),n=this._getCenterYSnapValue(),s=this._getCenterXSnapValue();e=Math.max(0,Math.min(e,this._container.clientHeight-this._quickInputContainer.clientHeight)),e=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},lf=function(o,e){return function(t,i){e(t,i,o)}};let a0=class extends zU{get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get hasController(){return!!this._controller}get currentQuickInput(){return this.controller.currentQuickInput}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(KL))),this._quickAccess}constructor(e,t,i,n,s){super(i),this.instantiationService=e,this.contextKeyService=t,this.layoutService=n,this.configurationService=s,this._alignment=W(this,"top"),this._onShow=this._register(new l.Emitter),this._onHide=this._register(new l.Emitter),this.contexts=new Map}createController(e=this.layoutService,t){const i={idPrefix:"quickInput_",container:e.activeContainer,ignoreFocusOut:()=>!1,backKeybindingLabel:()=>{},setContextKey:s=>this.setContextKey(s),linkOpenerDelegate:s=>{this.instantiationService.invokeFunction(r=>{r.get(Ou).open(s,{allowCommands:!0,fromUserGesture:!0})})},returnFocus:()=>e.focus(),styles:this.computeStyles(),hoverDelegate:this._register(this.instantiationService.createInstance(jL))},n=this._register(this.instantiationService.createInstance(o0,{...i,...t}));return n.layout(e.activeContainerDimension,e.activeContainerOffset.quickPickTop),this._register(e.onDidLayoutActiveContainer(s=>{j(e.activeContainer)===j(n.container)&&n.layout(s,e.activeContainerOffset.quickPickTop)})),this._register(e.onDidChangeActiveContainer(()=>{n.isVisible()||n.layout(e.activeContainerDimension,e.activeContainerOffset.quickPickTop)})),this._register(n.onShow(()=>{this.resetContextKeys(),this._onShow.fire()})),this._register(n.onHide(()=>{this.resetContextKeys(),this._onHide.fire()})),this._register(he(s=>{this._alignment.set(n.alignment.read(s),void 0)})),n}setContextKey(e){let t;e&&(t=this.contexts.get(e),t||(t=new q(e,!1).bindTo(this.contextKeyService),this.contexts.set(e,t))),!(t&&t.get())&&(this.resetContextKeys(),t?.set(!0))}resetContextKeys(){this.contexts.forEach(e=>{e.get()&&e.reset()})}pick(e,t,i=l.CancellationToken.None){return this.controller.pick(e,t,i)}input(e={},t=l.CancellationToken.None){return this.controller.input(e,t)}createQuickPick(e={useSeparators:!1}){return this.controller.createQuickPick(e)}createInputBox(){return this.controller.createInputBox()}toggle(){this.controller.toggle()}toggleHover(){this.hasController&&this.controller.toggleHover()}updateStyles(){this.hasController&&this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:{quickInputBackground:z(fv),quickInputForeground:z(H2),quickInputTitleBackground:z(e3),widgetBorder:z(HC),widgetShadow:z(oc)},inputBox:zy,toggle:Fy,countBadge:pM,button:_q,progressBar:bq,keybindingLabel:mM,list:eh({listBackground:fv,listFocusBackground:Ad,listFocusForeground:Md,listInactiveFocusForeground:Md,listInactiveSelectionIconForeground:gv,listInactiveFocusBackground:Ad,listInactiveSelectionBackground:Ad,listInactiveSelectionForeground:Md,listFocusOutline:ot,listInactiveFocusOutline:ot,treeStickyScrollBackground:fv}),pickerGroup:{pickerGroupBorder:z(t3),pickerGroupForeground:z(eI)}}}};a0=MQ([lf(0,me),lf(1,be),lf(2,_i),lf(3,Os),lf(4,Ge)],a0);var HA=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ul=function(o,e){return function(t,i){e(t,i,o)}};let l0=class extends a0{constructor(e,t,i,n,s,r){super(t,i,n,new vy(e.getContainerDomNode(),s),r),this.host=void 0;const a=cf.get(e);if(a){const c=a.widget;this.host={_serviceBrand:void 0,get mainContainer(){return c.getDomNode()},getContainer(){return c.getDomNode()},whenContainerStylesLoaded(){},get containers(){return[c.getDomNode()]},get activeContainer(){return c.getDomNode()},get mainContainerDimension(){return e.getLayoutInfo()},get activeContainerDimension(){return e.getLayoutInfo()},get onDidLayoutMainContainer(){return e.onDidLayoutChange},get onDidLayoutActiveContainer(){return e.onDidLayoutChange},get onDidLayoutContainer(){return l.Event.map(e.onDidLayoutChange,h=>({container:c.getDomNode(),dimension:h}))},get onDidChangeActiveContainer(){return l.Event.None},get onDidAddContainer(){return l.Event.None},get mainContainerOffset(){return{top:0,quickPickTop:0}},get activeContainerOffset(){return{top:0,quickPickTop:0}},focus:()=>e.focus()}}else this.host=void 0}createController(){return super.createController(this.host)}};l0=HA([ul(1,me),ul(2,be),ul(3,_i),ul(4,pt),ul(5,Ge)],l0);let c0=class{get activeService(){const e=this.codeEditorService.getFocusedCodeEditor();if(!e)throw new Error("Quick input service needs a focused editor to work.");let t=this.mapEditorToService.get(e);if(!t){const i=t=this.instantiationService.createInstance(l0,e);this.mapEditorToService.set(e,t),l.createSingleCallFunction(e.onDidDispose)(()=>{i.dispose(),this.mapEditorToService.delete(e)})}return t}get currentQuickInput(){return this.activeService.currentQuickInput}get quickAccess(){return this.activeService.quickAccess}constructor(e,t){this.instantiationService=e,this.codeEditorService=t,this.mapEditorToService=new Map}pick(e,t,i=l.CancellationToken.None){return this.activeService.pick(e,t,i)}input(e,t){return this.activeService.input(e,t)}createQuickPick(e={useSeparators:!1}){return this.activeService.createQuickPick(e)}createInputBox(){return this.activeService.createInputBox()}toggle(){return this.activeService.toggle()}toggleHover(){return this.activeService.toggleHover()}};c0=HA([ul(0,me),ul(1,pt)],c0);const Lb=class Lb{static get(e){return e.getContribution(Lb.ID)}constructor(e){this.editor=e,this.widget=new h0(this.editor)}dispose(){this.widget.dispose()}};Lb.ID="editor.controller.quickInput";let cf=Lb;const Db=class Db{constructor(e){this.codeEditor=e,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return Db.ID}getDomNode(){return this.domNode}getPosition(){return{preference:{top:0,left:0}}}dispose(){this.codeEditor.removeOverlayWidget(this)}};Db.ID="editor.contrib.quickInputWidget";let h0=Db;_C(cf.ID,cf,4);const xb=class xb{createWorkerClient(e){let t;const i=++xb._workerIdPool;return e instanceof Worker||PQ(e)?t=Promise.resolve(e):t=this._createWorker(e),new l.WebWorkerClient(new kQ(t,i))}_createWorker(e){const t=this.getWorkerUrl(e),i=AQ(e.label,t,this._getWorkerLoadingFailedErrorMessage(e)),n=new Worker(eO?eO.createScriptURL(i):i,{name:e.label,type:"module"});return OQ(n)}_getWorkerLoadingFailedErrorMessage(e){}getWorkerUrl(e){if(!e.esmModuleLocation)throw new Error("Missing esmModuleLocation in WebWorkerDescriptor");return(typeof e.esmModuleLocation=="function"?e.esmModuleLocation():e.esmModuleLocation).toString(!0)}};xb._workerIdPool=0;let d0=xb;const eO=(()=>{const o=globalThis;return typeof self=="object"&&self.constructor&&self.constructor.name==="DedicatedWorkerGlobalScope"&&o.workerttPolicy!==void 0?o.workerttPolicy:lo("defaultWorkerFactory",{createScriptURL:e=>e})})();function AQ(o,e,t){if(!(/^((http:)|(https:)|(file:))/.test(e)&&e.substring(0,globalThis.origin.length)!==globalThis.origin)){const n=e.lastIndexOf("?"),s=e.lastIndexOf("#",n),r=n>0?new URLSearchParams(e.substring(n+1,~s?s:void 0)):new URLSearchParams;l.COI.addSearchParam(r,!0,!0),r.toString()?e=`${e}?${r.toString()}#${o}`:e=`${e}#${o}`}const i=new Blob([l.coalesce([`/*${o}*/`,`globalThis._VSCODE_NLS_MESSAGES = ${JSON.stringify(l.getNLSMessages())};`,`globalThis._VSCODE_NLS_LANGUAGE = ${JSON.stringify(l.getNLSLanguage())};`,`globalThis._VSCODE_FILE_ROOT = ${JSON.stringify(globalThis._VSCODE_FILE_ROOT)};`,"const ttPolicy = globalThis.trustedTypes?.createPolicy('defaultWorkerFactory', { createScriptURL: value => value });","globalThis.workerttPolicy = ttPolicy;",t?"try {":"",`await import(ttPolicy?.createScriptURL(${JSON.stringify(e)}) ?? ${JSON.stringify(e)});`,t?`} catch (err) { console.error(${JSON.stringify(t)}, err); throw err; }`:"","globalThis.postMessage({ type: 'vscode-worker-ready' });",`/*${o}*/`]).join("")],{type:"application/javascript"});return URL.createObjectURL(i)}function OQ(o){return new Promise((e,t)=>{o.onmessage=function(i){i.data.type==="vscode-worker-ready"&&(o.onmessage=null,e(o))},o.onerror=t})}function PQ(o){return!!o&&typeof o.then=="function"}class kQ extends l.Disposable{constructor(e,t){super(),this._onMessage=this._register(new l.Emitter),this.onMessage=this._onMessage.event,this._onError=this._register(new l.Emitter),this.onError=this._onError.event,this.id=t,this.worker=e,this.postMessage("-please-ignore-",[]);const i=n=>{this._onError.fire(n)};this.worker.then(n=>{n.onmessage=s=>{this._onMessage.fire(s.data)},n.onmessageerror=s=>{this._onError.fire(s)},typeof n.addEventListener=="function"&&n.addEventListener("error",i)}),this._register(l.toDisposable(()=>{this.worker?.then(n=>{n.onmessage=null,n.onmessageerror=null,n.removeEventListener("error",i),n.terminate()}),this.worker=null}))}getId(){return this.id}postMessage(e,t){this.worker?.then(i=>{try{i.postMessage(e,t)}catch(n){l.onUnexpectedError(n),l.onUnexpectedError(new Error("FAILED to post message to worker",{cause:n}))}})}}class FQ extends d0{_createWorker(e){const t=Bf();if(t&&typeof t.getWorker=="function"){const i=t.getWorker("workerMain.js",e.label);if(i!==void 0)return Promise.resolve(i)}return super._createWorker(e)}_getWorkerLoadingFailedErrorMessage(e){return`Failed to load worker script for label: ${e.label}. +Ensure your bundler properly bundles modules referenced by "new URL('...?esm', import.meta.url)".`}getWorkerUrl(e){const t=Bf();if(t&&typeof t.getWorkerUrl=="function"){const s=t.getWorkerUrl("workerMain.js",e.label);if(s!==void 0)return new URL(s,document.baseURI).toString()}if(!e.esmModuleLocationBundler)throw new Error(`You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker for the worker label: ${e.label}`);return(typeof e.esmModuleLocationBundler=="function"?e.esmModuleLocationBundler():e.esmModuleLocationBundler).toString()}}const BQ={base:"vs",inherit:!1,rules:[{token:"",foreground:"000000",background:"fffffe"},{token:"invalid",foreground:"cd3131"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"001188"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"delimiter.xml",foreground:"0000FF"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"FF0000"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"FF0000"},{token:"attribute.value",foreground:"0451A5"},{token:"attribute.value.number",foreground:"098658"},{token:"attribute.value.unit",foreground:"098658"},{token:"attribute.value.html",foreground:"0000FF"},{token:"attribute.value.xml",foreground:"0000FF"},{token:"string",foreground:"A31515"},{token:"string.html",foreground:"0000FF"},{token:"string.sql",foreground:"FF0000"},{token:"string.yaml",foreground:"0451A5"},{token:"keyword",foreground:"0000FF"},{token:"keyword.json",foreground:"0451A5"},{token:"keyword.flow",foreground:"AF00DB"},{token:"keyword.flow.scss",foreground:"0000FF"},{token:"operator.scss",foreground:"666666"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[vn]:"#FFFFFE",[nc]:"#000000",[kE]:"#E5EBF1",[Ud]:"#D3D3D3",[$d]:"#939393",[$g]:"#ADD6FF4D"}},zQ={base:"vs-dark",inherit:!1,rules:[{token:"",foreground:"D4D4D4",background:"1E1E1E"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"74B0DF"},{token:"variable.predefined",foreground:"4864AA"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"B5CEA8"},{token:"number.hex",foreground:"5BB498"},{token:"regexp",foreground:"B46695"},{token:"annotation",foreground:"cc6666"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"DCDCDC"},{token:"delimiter.html",foreground:"808080"},{token:"delimiter.xml",foreground:"808080"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"A79873"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"DD6A6F"},{token:"metatag.content.html",foreground:"9CDCFE"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key.json",foreground:"9CDCFE"},{token:"string.value.json",foreground:"CE9178"},{token:"attribute.name",foreground:"9CDCFE"},{token:"attribute.value",foreground:"CE9178"},{token:"attribute.value.number.css",foreground:"B5CEA8"},{token:"attribute.value.unit.css",foreground:"B5CEA8"},{token:"attribute.value.hex.css",foreground:"D4D4D4"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"keyword.json",foreground:"CE9178"},{token:"keyword.flow.scss",foreground:"569CD6"},{token:"operator.scss",foreground:"909090"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[vn]:"#1E1E1E",[nc]:"#D4D4D4",[kE]:"#3A3D41",[Ud]:"#404040",[$d]:"#707070",[$g]:"#ADD6FF26"}},VQ={base:"hc-black",inherit:!1,rules:[{token:"",foreground:"FFFFFF",background:"000000"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"1AEBFF"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"FFFFFF"},{token:"regexp",foreground:"C0C0C0"},{token:"annotation",foreground:"569CD6"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"FFFF00"},{token:"delimiter.html",foreground:"FFFF00"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta",foreground:"D4D4D4"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"569CD6"},{token:"metatag.content.html",foreground:"1AEBFF"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key",foreground:"9CDCFE"},{token:"string.value",foreground:"CE9178"},{token:"attribute.name",foreground:"569CD6"},{token:"attribute.value",foreground:"3FF23F"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[vn]:"#000000",[nc]:"#FFFFFF",[Ud]:"#FFFFFF",[$d]:"#FFFFFF"}},UQ={base:"hc-light",inherit:!1,rules:[{token:"",foreground:"292929",background:"FFFFFF"},{token:"invalid",foreground:"B5200D"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"264F70"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"B5200D"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"264F78"},{token:"attribute.value",foreground:"0451A5"},{token:"string",foreground:"A31515"},{token:"string.sql",foreground:"B5200D"},{token:"keyword",foreground:"0000FF"},{token:"keyword.flow",foreground:"AF00DB"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[vn]:"#FFFFFF",[nc]:"#292929",[Ud]:"#292929",[$d]:"#292929"}},$Q={IconContribution:"base.contributions.icons"};var tO;(function(o){function e(t,i){let n=t.defaults;for(;_.ThemeIcon.isThemeIcon(n);){const s=fl.getIcon(n.id);if(!s)return;n=s.defaults}return n}o.getDefinition=e})(tO||(tO={}));var iO;(function(o){function e(i){return{weight:i.weight,style:i.style,src:i.src.map(n=>({format:n.format,location:n.location.toString()}))}}o.toJSONObject=e;function t(i){const n=s=>l.isString(s)?s:void 0;if(i&&Array.isArray(i.src)&&i.src.every(s=>l.isString(s.format)&&l.isString(s.location)))return{weight:n(i.weight),style:n(i.style),src:i.src.map(s=>({format:s.format,location:l.URI.parse(s.location)}))}}o.fromJSONObject=t})(iO||(iO={}));const KQ=/^([\w_-]+)$/,GQ=l.localize(2093,"The font ID must only contain letters, numbers, underscores and dashes.");class jQ extends l.Disposable{constructor(){super(),this._onDidChange=this._register(new l.Emitter),this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:l.localize(2094,"The id of the font to use. If not set, the font that is defined first is used."),pattern:KQ.source,patternErrorMessage:GQ},fontCharacter:{type:"string",description:l.localize(2095,"The font character associated with the icon definition.")}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${_.ThemeIcon.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(e,t,i,n){const s=this.iconsById[e];if(s){if(i&&!s.description){s.description=i,this.iconSchema.properties[e].markdownDescription=`${i} $(${e})`;const c=this.iconReferenceSchema.enum.indexOf(e);c!==-1&&(this.iconReferenceSchema.enumDescriptions[c]=i),this._onDidChange.fire()}return s}const r={id:e,description:i,defaults:t,deprecationMessage:n};this.iconsById[e]=r;const a={$ref:"#/definitions/icons"};return n&&(a.deprecationMessage=n),i&&(a.markdownDescription=`${i}: $(${e})`),this.iconSchema.properties[e]=a,this.iconReferenceSchema.enum.push(e),this.iconReferenceSchema.enumDescriptions.push(i||""),this._onDidChange.fire(),{id:e}}getIcons(){return Object.keys(this.iconsById).map(e=>this.iconsById[e])}getIcon(e){return this.iconsById[e]}getIconSchema(){return this.iconSchema}toString(){const e=(s,r)=>s.id.localeCompare(r.id),t=s=>{for(;_.ThemeIcon.isThemeIcon(s.defaults);)s=this.iconsById[s.defaults.id];return`codicon codicon-${s?s.id:""}`},i=[];i.push("| preview | identifier | default codicon ID | description"),i.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");const n=Object.keys(this.iconsById).map(s=>this.iconsById[s]);for(const s of n.filter(r=>!!r.description).sort(e))i.push(`||${s.id}|${_.ThemeIcon.isThemeIcon(s.defaults)?s.defaults.id:s.id}|${s.description||""}|`);i.push("| preview | identifier "),i.push("| ----------- | --------------------------------- |");for(const s of n.filter(r=>!_.ThemeIcon.isThemeIcon(r.defaults)).sort(e))i.push(`||${s.id}|`);return i.join(` +`)}}const fl=new jQ;St.add($Q.IconContribution,fl);function Mo(o,e,t,i){return fl.registerIcon(o,e,t,i)}function nO(){return fl}function qQ(){const o=l.getCodiconFontCharacters();for(const e in o){const t="\\"+o[e].toString(16);fl.registerIcon(e,{fontCharacter:t})}}qQ();const sO="vscode://schemas/icons",oO=St.as(Cg.JSONContribution);oO.registerSchema(sO,fl.getIconSchema());const rO=new l.RunOnceScheduler(()=>oO.notifySchemaChanged(sO),200);fl.onDidChange(()=>{rO.isScheduled()||rO.schedule()});const YQ=Mo("widget-close",l.Codicon.close,l.localize(2096,"Icon for the close action in widgets."));Mo("goto-previous-location",l.Codicon.arrowUp,l.localize(2097,"Icon for goto previous editor location.")),Mo("goto-next-location",l.Codicon.arrowDown,l.localize(2098,"Icon for goto next editor location.")),_.ThemeIcon.modify(l.Codicon.sync,"spin"),_.ThemeIcon.modify(l.Codicon.loading,"spin");function ZQ(o){const e=new l.DisposableStore,t=e.add(new l.Emitter),i=nO();return e.add(i.onDidChange(()=>t.fire())),o&&e.add(o.onDidProductIconThemeChange(()=>t.fire())),{dispose:()=>e.dispose(),onDidChange:t.event,getCSS(){const n=o?o.getProductIconTheme():new aO,s={},r=new Ry,a=new Ry;for(const c of i.getIcons()){const h=n.getIcon(c);if(!h)continue;const d=h.font,u=Yi`--vscode-icon-${Ap(c.id)}-font-family`,f=Yi`--vscode-icon-${Ap(c.id)}-content`;d?(s[d.id]=d.definition,a.push(Yi`${u}: ${yr(d.id)};`,Yi`${f}: ${yr(h.fontCharacter)};`),r.push(Yi`.codicon-${Ap(c.id)}:before { content: ${yr(h.fontCharacter)}; font-family: ${yr(d.id)}; }`)):(a.push(Yi`${f}: ${yr(h.fontCharacter)}; ${u}: 'codicon';`),r.push(Yi`.codicon-${Ap(c.id)}:before { content: ${yr(h.fontCharacter)}; }`))}for(const c in s){const h=s[c],d=h.weight?Yi`font-weight: ${nM(h.weight)};`:Yi``,u=h.style?Yi`font-style: ${nM(h.style)};`:Yi``,f=new Ry;for(const g of h.src)f.push(Yi`${Bs(g.location)} format(${yr(g.format)})`);r.push(Yi`@font-face { src: ${f.join(", ")}; font-family: ${yr(c)};${d}${u} font-display: block; }`)}return r.push(Yi`:root { ${a.join(" ")} }`),r.join(` +`)}}}class aO{getIcon(e){const t=nO();let i=e.defaults;for(;_.ThemeIcon.isThemeIcon(i);){const n=t.getIcon(i.id);if(!n)return;i=n.defaults}return i}}const Ao="vs",bh="vs-dark",gl="hc-black",ml="hc-light",lO=St.as(IE.ColorContribution),QQ=St.as(VI.ThemingContribution);class cO{constructor(e,t){this.semanticHighlighting=!1,this.themeData=t;const i=t.base;e.length>0?(I_(e)?this.id=e:this.id=i+" "+e,this.themeName=e):(this.id=i,this.themeName=i),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}get base(){return this.themeData.base}notifyBaseUpdated(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)}getColors(){if(!this.colors){const e=new Map;for(const t in this.themeData.colors)e.set(t,l.Color.fromHex(this.themeData.colors[t]));if(this.themeData.inherit){const t=u0(this.themeData.base);for(const i in t.colors)e.has(i)||e.set(i,l.Color.fromHex(t.colors[i]))}this.colors=e}return this.colors}getColor(e,t){const i=this.getColors().get(e);if(i)return i;if(t!==!1)return this.getDefault(e)}getDefault(e){let t=this.defaultColors[e];return t||(t=lO.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)}defines(e){return this.getColors().has(e)}get type(){switch(this.base){case Ao:return Sn.LIGHT;case gl:return Sn.HIGH_CONTRAST_DARK;case ml:return Sn.HIGH_CONTRAST_LIGHT;default:return Sn.DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],t=[];if(this.themeData.inherit){const s=u0(this.themeData.base);e=s.rules,s.encodedTokensColors&&(t=s.encodedTokensColors)}const i=this.themeData.colors["editor.foreground"],n=this.themeData.colors["editor.background"];if(i||n){const s={token:""};i&&(s.foreground=i),n&&(s.background=n),e.push(s)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=L1.createFromRawTokenTheme(e,t)}return this._tokenTheme}getTokenStyleMetadata(e,t,i){const s=this.tokenTheme._match([e].concat(t).join(".")).metadata,r=Vi.getForeground(s),a=Vi.getFontStyle(s);return{foreground:r,italic:!!(a&1),bold:!!(a&2),underline:!!(a&4),strikethrough:!!(a&8)}}get tokenColorMap(){return[]}}function I_(o){return o===Ao||o===bh||o===gl||o===ml}function u0(o){switch(o){case Ao:return BQ;case bh:return zQ;case gl:return VQ;case ml:return UQ}}function T_(o){const e=u0(o);return new cO(o,e)}class XQ extends l.Disposable{constructor(){super(),this._onColorThemeChange=this._register(new l.Emitter),this.onDidColorThemeChange=this._onColorThemeChange.event,this._onProductIconThemeChange=this._register(new l.Emitter),this.onDidProductIconThemeChange=this._onProductIconThemeChange.event,this._environment=Object.create(null),this._builtInProductIconTheme=new aO,this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(Ao,T_(Ao)),this._knownThemes.set(bh,T_(bh)),this._knownThemes.set(gl,T_(gl)),this._knownThemes.set(ml,T_(ml));const e=this._register(ZQ(this));this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS} +${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(Ao),this._onOSSchemeChanged(),this._register(e.onDidChange(()=>{this._codiconCSS=e.getCSS(),this._updateCSS()})),OD(Ae,"(forced-colors: active)",()=>{this._onOSSchemeChanged()})}registerEditorContainer(e){return Yf(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=bn(void 0,e=>{e.className="monaco-colors",e.textContent=this._allCSS}),this._styleElements.push(this._globalStyleElement)),l.Disposable.None}_registerShadowDomContainer(e){const t=bn(e,i=>{i.className="monaco-colors",i.textContent=this._allCSS});return this._styleElements.push(t),{dispose:()=>{for(let i=0;i{i.base===e&&i.notifyBaseUpdated()}),this._theme.themeName===e&&this.setTheme(e)}getColorTheme(){return this._theme}setColorMapOverride(e){this._colorMapOverride=e,this._updateThemeOrColorMap()}setTheme(e){let t;this._knownThemes.has(e)?t=this._knownThemes.get(e):t=this._knownThemes.get(Ao),this._updateActualTheme(t)}_updateActualTheme(e){!e||this._theme===e||(this._theme=e,this._updateThemeOrColorMap())}_onOSSchemeChanged(){if(this._autoDetectHighContrast){const e=Ae.matchMedia("(forced-colors: active)").matches;if(e!==pa(this._theme.type)){let t;rr(this._theme.type)?t=e?gl:bh:t=e?ml:Ao,this._updateActualTheme(this._knownThemes.get(t))}}}setAutoDetectHighContrast(e){this._autoDetectHighContrast=e,this._onOSSchemeChanged()}_updateThemeOrColorMap(){const e=[],t={},i={addRule:r=>{t[r]||(e.push(r),t[r]=!0)}};QQ.getThemingParticipants().forEach(r=>r(this._theme,i,this._environment));const n=[];for(const r of lO.getColors()){const a=this._theme.getColor(r.id,!0);a&&n.push(`${qC(r.id)}: ${a.toString()};`)}i.addRule(`.monaco-editor, .monaco-diff-editor, .monaco-component { ${n.join(` +`)} }`);const s=this._colorMapOverride||this._theme.tokenTheme.getColorMap();i.addRule(RK(s)),i.addRule(".monaco-editor, .monaco-diff-editor, .monaco-component { forced-color-adjust: none; }"),this._themeCSS=e.join(` +`),this._updateCSS(),l.TokenizationRegistry.setColorMap(s),this._onColorThemeChange.fire(this._theme)}_updateCSS(){this._allCSS=`${this._codiconCSS} +${this._themeCSS}`,this._styleElements.forEach(e=>e.textContent=this._allCSS)}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}getProductIconTheme(){return this._builtInProductIconTheme}}class JQ{getParserClass(){throw new Error("not implemented in StandaloneTreeSitterLibraryService")}supportsLanguage(e,t){return!1}getLanguage(e,t,i){}getInjectionQueries(e,t){return null}getHighlightingQueries(e,t){return null}}var Oo=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Nt=function(o,e){return function(t,i){e(t,i,o)}};class WQ{constructor(e){this.disposed=!1,this.model=e,this._onWillDispose=new l.Emitter}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}}let f0=class{constructor(e){this.modelService=e}createModelReference(e){const t=this.modelService.getModel(e);return t?Promise.resolve(new l.ImmortalReference(new WQ(t))):Promise.reject(new Error("Model not found"))}};f0=Oo([Nt(0,ri)],f0);const Eb=class Eb{show(){return Eb.NULL_PROGRESS_RUNNER}async showWhile(e,t){await e}};Eb.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}};let g0=Eb;class HQ{withProgress(e,t,i){return t({report:()=>{}})}}class eX{constructor(){this.isExtensionDevelopment=!1,this.isBuilt=!1}}class tX{async confirm(e){return{confirmed:this.doConfirm(e.message,e.detail),checkboxChecked:!1}}doConfirm(e,t){let i=e;return t&&(i=i+` + +`+t),Ae.confirm(i)}async prompt(e){let t;if(this.doConfirm(e.message,e.detail)){const n=[...e.buttons??[]];e.cancelButton&&typeof e.cancelButton!="string"&&typeof e.cancelButton!="boolean"&&n.push(e.cancelButton),t=await n[0]?.run({checkboxChecked:!1})}return{result:t}}async error(e,t){await this.prompt({type:rt.Error,message:e,detail:t})}}const Df=class Df{info(e){return this.notify({severity:rt.Info,message:e})}warn(e){return this.notify({severity:rt.Warning,message:e})}error(e){return this.notify({severity:rt.Error,message:e})}notify(e){switch(e.severity){case rt.Error:console.error(e.message);break;case rt.Warning:console.warn(e.message);break;default:console.log(e.message);break}return Df.NO_OP}prompt(e,t,i,n){return Df.NO_OP}status(e,t){return{close:()=>{}}}};Df.NO_OP=new D4;let m0=Df,p0=class{constructor(e){this._onWillExecuteCommand=new l.Emitter,this._onDidExecuteCommand=new l.Emitter,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=e}executeCommand(e,...t){const i=Ut.getCommand(e);if(!i)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:t});const n=this._instantiationService.invokeFunction.apply(this._instantiationService,[i.handler,...t]);return this._onDidExecuteCommand.fire({commandId:e,args:t}),Promise.resolve(n)}catch(n){return Promise.reject(n)}}};p0=Oo([Nt(0,me)],p0);let Ch=class extends qq{constructor(e,t,i,n,s,r){super(e,t,i,n,s),this._cachedResolver=null,this._dynamicKeybindings=[],this._domNodeListeners=[];const a=g=>{const m=new l.DisposableStore;m.add(R(g,F.KEY_DOWN,p=>{const b=new Be(p);this._dispatch(b,b.target)&&(b.preventDefault(),b.stopPropagation())})),m.add(R(g,F.KEY_UP,p=>{const b=new Be(p);this._singleModifierDispatch(b,b.target)&&b.preventDefault()})),this._domNodeListeners.push(new iX(g,m))},c=g=>{for(let m=0;m{g.getOption(70)||a(g.getContainerDomNode())},d=g=>{g.getOption(70)||c(g.getContainerDomNode())};this._register(r.onCodeEditorAdd(h)),this._register(r.onCodeEditorRemove(d)),r.listCodeEditors().forEach(h);const u=g=>{a(g.getContainerDomNode())},f=g=>{c(g.getContainerDomNode())};this._register(r.onDiffEditorAdd(u)),this._register(r.onDiffEditorRemove(f)),r.listDiffEditors().forEach(u)}addDynamicKeybinding(e,t,i,n){return l.combinedDisposable(Ut.registerCommand(e,i),this.addDynamicKeybindings([{keybinding:t,command:e,when:n}]))}addDynamicKeybindings(e){const t=e.map(i=>({keybinding:jb(i.keybinding,l.OS),command:i.command??null,commandArgs:i.commandArgs,when:i.when,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}));return this._dynamicKeybindings=this._dynamicKeybindings.concat(t),this.updateResolver(),l.toDisposable(()=>{for(let i=0;ithis._log(i))}return this._cachedResolver}_documentHasFocus(){return Ae.document.hasFocus()}_toNormalizedKeybindingItems(e,t){const i=[];let n=0;for(const s of e){const r=s.when||void 0,a=s.keybinding;if(!a)i[n++]=new MM(void 0,s.command,s.commandArgs,r,t,null,!1);else{const c=Qu.resolveKeybinding(a,l.OS);for(const h of c)i[n++]=new MM(h,s.command,s.commandArgs,r,t,null,!1)}}return i}resolveKeyboardEvent(e){const t=new Yh(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode);return new Qu([t],l.OS)}};Ch=Oo([Nt(0,be),Nt(1,zi),Nt(2,Xn),Nt(3,yn),Nt(4,ei),Nt(5,pt)],Ch);class iX extends l.Disposable{constructor(e,t){super(),this.domNode=e,this._register(t)}}function hO(o){return!!o&&typeof o=="object"&&(!o.overrideIdentifier||typeof o.overrideIdentifier=="string")&&(!o.resource||o.resource instanceof l.URI)}let N_=class{constructor(e){this.logService=e,this._onDidChangeConfiguration=new l.Emitter,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event;const t=new d9(e);this._configuration=new Np(t.reload(),Tt.createEmptyModel(e),Tt.createEmptyModel(e),Tt.createEmptyModel(e),Tt.createEmptyModel(e),Tt.createEmptyModel(e),new l.ResourceMap,Tt.createEmptyModel(e),new l.ResourceMap,e),t.dispose()}getValue(e,t){const i=typeof e=="string"?e:void 0,n=hO(e)?e:hO(t)?t:{};return this._configuration.getValue(i,n,void 0)}updateValues(e){const t={data:this._configuration.toData()},i=[];for(const n of e){const[s,r]=n;this.getValue(s)!==r&&(this._configuration.updateValue(s,r),i.push(s))}if(i.length>0){const n=new h9({keys:i,overrides:[]},t,this._configuration,void 0,this.logService);n.source=8,this._onDidChangeConfiguration.fire(n)}return Promise.resolve()}updateValue(e,t,i,n){return this.updateValues([[e,t]])}inspect(e,t={}){return this._configuration.inspect(e,t,void 0)}};N_=Oo([Nt(0,ei)],N_);let _0=class extends l.Disposable{constructor(e,t,i){super(),this.configurationService=e,this.modelService=t,this.languageService=i,this._onDidChangeConfiguration=this._register(new l.Emitter),this._register(this.configurationService.onDidChangeConfiguration(n=>{this._onDidChangeConfiguration.fire({affectedKeys:n.affectedKeys,affectsConfiguration:(s,r)=>n.affectsConfiguration(r)})}))}getValue(e,t,i){const n=l.Position.isIPosition(t)?t:null,s=n?typeof i=="string"?i:void 0:typeof t=="string"?t:void 0,r=e?this.getLanguage(e,n):void 0;return typeof s>"u"?this.configurationService.getValue({resource:e,overrideIdentifier:r}):this.configurationService.getValue(s,{resource:e,overrideIdentifier:r})}getLanguage(e,t){const i=this.modelService.getModel(e);return i?t?i.getLanguageIdAtPosition(t.lineNumber,t.column):i.getLanguageId():this.languageService.guessLanguageIdByFilepathOrFirstLine(e)}};_0=Oo([Nt(0,Ge),Nt(1,ri),Nt(2,yt)],_0);let b0=class{constructor(e){this.configurationService=e}getEOL(e,t){const i=this.configurationService.getValue("files.eol",{overrideIdentifier:t,resource:e});return i&&typeof i=="string"&&i!=="auto"?i:l.isLinux||l.isMacintosh?` +`:`\r +`}};b0=Oo([Nt(0,Ge)],b0);class nX{publicLog2(){}}const xf=class xf{constructor(){const e=l.URI.from({scheme:xf.SCHEME,authority:"model",path:"/"});this.workspace={id:LA,folders:[new vZ({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}getWorkspaceFolder(e){return e&&e.scheme===xf.SCHEME?this.workspace.folders[0]:null}};xf.SCHEME="inmemory";let C0=xf;function R_(o,e,t){if(!e||!(o instanceof N_))return;const i=[];Object.keys(e).forEach(n=>{LZ(n)&&i.push([`editor.${n}`,e[n]]),t&&DZ(n)&&i.push([`diffEditor.${n}`,e[n]])}),i.length>0&&o.updateValues(i)}let v0=class{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}async apply(e,t){const i=Array.isArray(e)?e:EL.convert(e),n=new Map;for(const a of i){if(!(a instanceof Er))throw new Error("bad edit - only text edits are supported");const c=this._modelService.getModel(a.resource);if(!c)throw new Error("bad edit - model not found");if(typeof a.versionId=="number"&&c.getVersionId()!==a.versionId)throw new Error("bad state - model changed in the meantime");let h=n.get(c);h||(h=[],n.set(c,h)),h.push(p_.replaceMove(l.Range.lift(a.textEdit.range),a.textEdit.text))}let s=0,r=0;for(const[a,c]of n)a.pushStackElement(),a.pushEditOperations([],c,()=>[]),a.pushStackElement(),r+=1,s+=c.length;return{ariaSummary:l.format(zL.bulkEditServiceSummary,s,r),isApplied:s>0}}};v0=Oo([Nt(0,ri)],v0);class sX{getUriLabel(e,t){return e.scheme==="file"?e.fsPath:e.path}getUriBasenameLabel(e){return dg(e)}}let w0=class extends zq{constructor(e,t){super(e),this._codeEditorService=t}showContextView(e,t,i){if(!t){const n=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();n&&(t=n.getContainerDomNode())}return super.showContextView(e,t,i)}};w0=Oo([Nt(0,Os),Nt(1,pt)],w0);class oX{constructor(){this._neverEmitter=new l.Emitter,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}}class rX extends OL{constructor(){super()}}class aX extends uZ{constructor(){super(new _B)}}let S0=class extends Zy{constructor(e,t,i,n,s,r){super(e,t,i,n,s,r),this.configure({blockMouse:!1})}};S0=Oo([Nt(0,Xn),Nt(1,yn),Nt(2,Fc),Nt(3,xt),Nt(4,Zo),Nt(5,be)],S0);class lX{async playSignal(e,t){}}class cX{constructor(){this.onDidChangeDefaultAccount=l.Event.None}async getDefaultAccount(){return null}}fe(fd,FQ,0),fe(ei,aX,0),fe(Ge,N_,0),fe(TC,_0,0),fe(cE,b0,0),fe(wA,C0,0),fe(AM,sX,0),fe(Xn,nX,0),fe(ey,tX,0),fe(ly,eX,0),fe(yn,m0,0),fe(xr,al,0),fe(yt,rX,0),fe(Tn,XQ,0),fe(ri,kL,0),fe($C,PL,0),fe(be,Ny,0),fe(CA,HQ,0),fe(d_,g0,0),fe(Qa,x7,0),fe(xA,v0,0),fe(DA,oX,0),fe(ql,f0,0),fe(Ui,Sy,0),fe(ts,iZ,0),fe(zi,p0,0),fe(xt,Ch,0),fe(Ps,c0,0),fe(Fc,w0,0),fe(Ou,RL,0),fe(Ip,Ey,0),fe(nn,S0,0),fe(Zo,yy,0),fe(Xa,lX,0),fe(Yw,JQ,0),fe(kx,wB,0),fe(xM,Vq,0),fe(EM,cX,0),fe(EA,SZ,0),fe(Na,vA,0);var J;(function(o){const e=new Oc;for(const[c,h]of Jx())e.set(c,h);const t=new jp(e,!0);e.set(me,t);function i(c){n||r({});const h=e.get(c);if(!h)throw new Error("Missing service "+c);return h instanceof gs?t.invokeFunction(d=>d.get(c)):h}o.get=i;let n=!1;const s=new l.Emitter;function r(c){if(n)return t;n=!0;for(const[d,u]of Jx())e.get(d)||e.set(d,u);for(const d in c)if(c.hasOwnProperty(d)){const u=le(d);e.get(u)instanceof gs&&e.set(u,c[d])}const h=EZ();for(const d of h)try{t.createInstance(d)}catch(u){l.onUnexpectedError(u)}return s.fire(),t}o.initialize=r;function a(c){if(n)return c();const h=new l.DisposableStore,d=h.add(s.event(()=>{d.dispose(),h.add(c())}));return h}o.withServices=a})(J||(J={}));function Po(o,e){return o}function hX(o){return Zr(o)}function dX(o,e,t,i=_.DebugLocation.ofCaller()){return An({debugName:()=>`Configuration Key "${o}"`},n=>t.onDidChangeConfiguration(s=>{s.affectsConfiguration(o)&&n(s)}),()=>t.getValue(o)??e,i)}function qs(o,e,t,i=_.DebugLocation.ofCaller()){const n=o.bindTo(e),s=new l.DisposableStore;return fn({debugName:()=>`Set Context Key "${o.key}"`},r=>{const a=t(r);return n.set(a),a},i).recomputeInitiallyAndOnChange(s),s}class vh{static capture(e){if(e.getScrollTop()===0||e.hasPendingScrollAnimation())return new vh(e.getScrollTop(),e.getContentHeight(),null,0,null);let t=null,i=0;const n=e.getVisibleRanges();if(n.length>0){t=n[0].getStartPosition();const s=e.getTopForPosition(t.lineNumber,t.column);i=e.getScrollTop()-s}return new vh(e.getScrollTop(),e.getContentHeight(),t,i,e.getPosition())}constructor(e,t,i,n,s){this._initialScrollTop=e,this._initialContentHeight=t,this._visiblePosition=i,this._visiblePositionScrollDelta=n,this._cursorPosition=s}restore(e){if(!(this._initialContentHeight===e.getContentHeight()&&this._initialScrollTop===e.getScrollTop())&&this._visiblePosition){const t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){if(this._initialContentHeight===e.getContentHeight()&&this._initialScrollTop===e.getScrollTop())return;const t=e.getPosition();if(!this._cursorPosition||!t)return;const i=e.getTopForLineNumber(t.lineNumber)-e.getTopForLineNumber(this._cursorPosition.lineNumber);e.setScrollTop(e.getScrollTop()+i,1)}}function uX(o,e,t,i){if(o.length===0)return e;if(e.length===0)return o;const n=[];let s=0,r=0;for(;sd?(n.push(c),r++):(n.push(i(a,c)),s++,r++)}for(;s`Apply decorations from ${e.debugName}`},n=>{const s=e.read(n);i.set(s)})),t.add({dispose:()=>{i.clear()}}),t}function wh(o,e){return o.appendChild(e),l.toDisposable(()=>{e.remove()})}function fX(o,e){return o.prepend(e),l.toDisposable(()=>{e.remove()})}class dO extends l.Disposable{get width(){return this._width}get height(){return this._height}get automaticLayout(){return this._automaticLayout}constructor(e,t){super(),this._automaticLayout=!1,this.elementSizeObserver=this._register(new SE(e,t)),this._width=W(this,this.elementSizeObserver.getWidth()),this._height=W(this,this.elementSizeObserver.getHeight()),this._register(this.elementSizeObserver.onDidChange(i=>nt(n=>{this._width.set(this.elementSizeObserver.getWidth(),n),this._height.set(this.elementSizeObserver.getHeight(),n)})))}observe(e){this.elementSizeObserver.observe(e)}setAutomaticLayout(e){this._automaticLayout=e,e?this.elementSizeObserver.startObserving():this.elementSizeObserver.stopObserving()}}function uO(o,e,t){let i=e.get(),n=i,s=i;const r=W("animatedValue",i);let a=-1;const c=300;let h;t.add(Gl({changeTracker:{createChangeSummary:()=>({animate:!1}),handleChange:(u,f)=>(u.didChange(e)&&(f.animate=f.animate||u.change),!0)}},(u,f)=>{h!==void 0&&(o.cancelAnimationFrame(h),h=void 0),n=s,i=e.read(u),n===i?a=Date.now()-c:a=Date.now()-(f.animate?0:c),d()}));function d(){const u=Date.now()-a;s=Math.floor(gX(u,n,i-n,c)),u{this._actualTop.set(i,void 0)},this.onComputedHeight=i=>{this._actualHeight.set(i,void 0)}}}const Ib=class Ib{constructor(e,t){this._editor=e,this._domElement=t,this._overlayWidgetId=`managedOverlayWidget-${Ib._counter++}`,this._overlayWidget={getId:()=>this._overlayWidgetId,getDomNode:()=>this._domElement,getPosition:()=>null},this._editor.addOverlayWidget(this._overlayWidget)}dispose(){this._editor.removeOverlayWidget(this._overlayWidget)}};Ib._counter=0;let L0=Ib;function Nr(o,e){return he(t=>{for(let[i,n]of Object.entries(e))n&&typeof n=="object"&&"read"in n&&(n=n.read(t)),typeof n=="number"&&(n=`${n}px`),i=i.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()),o.style[i]=n})}function A_(o,e,t,i){const n=new l.DisposableStore,s=[];return n.add(Kn((r,a)=>{const c=e.read(r),h=new Map,d=new Map;t&&t(!0),o.changeViewZones(u=>{for(const f of s)u.removeZone(f),i?.delete(f);s.length=0;for(const f of c){const g=u.addZone(f);f.setZoneId&&f.setZoneId(g),s.push(g),i?.add(g),h.set(f,g)}}),t&&t(!1),a.add(Gl({changeTracker:{createChangeSummary(){return{zoneIds:[]}},handleChange(u,f){const g=d.get(u.changedObservable);return g!==void 0&&f.zoneIds.push(g),!0}}},(u,f)=>{for(const g of c)g.onChange&&(d.set(g.onChange,h.get(g)),g.onChange.read(u));t&&t(!0),o.changeViewZones(g=>{for(const m of f.zoneIds)g.layoutZone(m)}),t&&t(!1)}))})),n.add({dispose(){t&&t(!0),o.changeViewZones(r=>{for(const a of s)r.removeZone(a)}),i?.clear(),t&&t(!1)}}),n}class mX extends l.CancellationTokenSource{dispose(){super.dispose(!0)}}function fO(o,e){const t=l.findLast(e,n=>n.original.startLineNumber<=o.lineNumber);if(!t)return l.Range.fromPositions(o);if(t.original.endLineNumberExclusive<=o.lineNumber){const n=o.lineNumber-t.original.endLineNumberExclusive+t.modified.endLineNumberExclusive;return l.Range.fromPositions(new l.Position(n,o.column))}if(!t.innerChanges)return l.Range.fromPositions(new l.Position(t.modified.startLineNumber,1));const i=l.findLast(t.innerChanges,n=>n.originalRange.getStartPosition().isBeforeOrEqual(o));if(!i){const n=o.lineNumber-t.original.startLineNumber+t.modified.startLineNumber;return l.Range.fromPositions(new l.Position(n,o.column))}if(i.originalRange.containsPosition(o))return i.modifiedRange;{const n=pX(i.originalRange.getEndPosition(),o);return l.Range.fromPositions(n.addToPosition(i.modifiedRange.getEndPosition()))}}function pX(o,e){return o.lineNumber===e.lineNumber?new l.TextLength(0,e.column-o.column):new l.TextLength(e.lineNumber-o.lineNumber,e.column-1)}function _X(o,e){let t;return o.filter(i=>{const n=e(i,t);return t=i,n})}class O_{static create(e,t=void 0){return new gO(e,e,t)}static createWithDisposable(e,t,i=void 0){const n=new l.DisposableStore;return n.add(t),n.add(e),new gO(e,n,i)}}class gO extends O_{constructor(e,t,i){super(),this.object=e,this._disposable=t,this._debugOwner=i,this._refCount=1,this._isDisposed=!1,this._owners=[],i&&this._addOwner(i)}_addOwner(e){e&&this._owners.push(e)}createNewRef(e){return this._refCount++,e&&this._addOwner(e),new bX(this,e)}dispose(){this._isDisposed||(this._isDisposed=!0,this._decreaseRefCount(this._debugOwner))}_decreaseRefCount(e){if(this._refCount--,this._refCount===0&&this._disposable.dispose(),e){const t=this._owners.indexOf(e);t!==-1&&this._owners.splice(t,1)}}}class bX extends O_{constructor(e,t){super(),this._base=e,this._debugOwner=t,this._isDisposed=!1}get object(){return this._base.object}createNewRef(e){return this._base.createNewRef(e)}dispose(){this._isDisposed||(this._isDisposed=!0,this._base._decreaseRefCount(this._debugOwner))}}var D0=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},x0=function(o,e){return function(t,i){e(t,i,o)}};const CX=Mo("diff-review-insert",l.Codicon.add,l.localize(113,"Icon for 'Insert' in accessible diff viewer.")),vX=Mo("diff-review-remove",l.Codicon.remove,l.localize(114,"Icon for 'Remove' in accessible diff viewer.")),wX=Mo("diff-review-close",l.Codicon.close,l.localize(115,"Icon for 'Close' in accessible diff viewer."));let pl=(kh=class extends l.Disposable{constructor(e,t,i,n,s,r,a,c,h){super(),this._parentNode=e,this._visible=t,this._setVisible=i,this._canClose=n,this._width=s,this._height=r,this._diffs=a,this._models=c,this._instantiationService=h,this._state=Z(this,d=>{const u=this._visible.read(d);if(this._parentNode.style.visibility=u?"visible":"hidden",!u)return null;const f=d.store.add(this._instantiationService.createInstance(E0,this._diffs,this._models,this._setVisible,this._canClose)),g=d.store.add(this._instantiationService.createInstance(I0,this._parentNode,f,this._width,this._height,this._models));return{model:f,view:g}}).recomputeInitiallyAndOnChange(this._store)}next(){nt(e=>{const t=this._visible.get();this._setVisible(!0,e),t&&this._state.get().model.nextGroup(e)})}prev(){nt(e=>{this._setVisible(!0,e),this._state.get().model.previousGroup(e)})}close(){nt(e=>{this._setVisible(!1,e)})}},kh._ttPolicy=lo("diffReview",{createHTML:e=>e}),kh);pl=D0([x0(8,me)],pl);let E0=class extends l.Disposable{constructor(e,t,i,n,s){super(),this._diffs=e,this._models=t,this._setVisible=i,this.canClose=n,this._accessibilitySignalService=s,this._groups=W(this,[]),this._currentGroupIdx=W(this,0),this._currentElementIdx=W(this,0),this.groups=this._groups,this.currentGroup=this._currentGroupIdx.map((r,a)=>this._groups.read(a)[r]),this.currentGroupIndex=this._currentGroupIdx,this.currentElement=this._currentElementIdx.map((r,a)=>this.currentGroup.read(a)?.lines[r]),this._register(he(r=>{const a=this._diffs.read(r);if(!a){this._groups.set([],void 0);return}const c=SX(a,this._models.getOriginalModel().getLineCount(),this._models.getModifiedModel().getLineCount());nt(h=>{const d=this._models.getModifiedPosition();if(d){const u=c.findIndex(f=>d?.lineNumber{const a=this.currentElement.read(r);a?.type===Li.Deleted?this._accessibilitySignalService.playSignal(xn.diffLineDeleted,{source:"accessibleDiffViewer.currentElementChanged"}):a?.type===Li.Added&&this._accessibilitySignalService.playSignal(xn.diffLineInserted,{source:"accessibleDiffViewer.currentElementChanged"})})),this._register(he(r=>{const a=this.currentElement.read(r);if(a&&a.type!==Li.Header){const c=a.modifiedLineNumber??a.diff.modified.startLineNumber;this._models.modifiedSetSelection(l.Range.fromPositions(new l.Position(c,1)))}}))}_goToGroupDelta(e,t){const i=this.groups.get();!i||i.length<=1||Uf(t,n=>{this._currentGroupIdx.set(l.OffsetRange.ofLength(i.length).clipCyclic(this._currentGroupIdx.get()+e),n),this._currentElementIdx.set(0,n)})}nextGroup(e){this._goToGroupDelta(1,e)}previousGroup(e){this._goToGroupDelta(-1,e)}_goToLineDelta(e){const t=this.currentGroup.get();!t||t.lines.length<=1||nt(i=>{this._currentElementIdx.set(l.OffsetRange.ofLength(t.lines.length).clip(this._currentElementIdx.get()+e),i)})}goToNextLine(){this._goToLineDelta(1)}goToPreviousLine(){this._goToLineDelta(-1)}goToLine(e){const t=this.currentGroup.get();if(!t)return;const i=t.lines.indexOf(e);i!==-1&&nt(n=>{this._currentElementIdx.set(i,n)})}revealCurrentElementInEditor(){if(!this.canClose.get())return;this._setVisible(!1,void 0);const e=this.currentElement.get();e&&(e.type===Li.Deleted?this._models.originalReveal(l.Range.fromPositions(new l.Position(e.originalLineNumber,1))):this._models.modifiedReveal(e.type!==Li.Header?l.Range.fromPositions(new l.Position(e.modifiedLineNumber,1)):void 0))}close(){this.canClose.get()&&(this._setVisible(!1,void 0),this._models.modifiedFocus())}};E0=D0([x0(4,Xa)],E0);const hf=3;function SX(o,e,t){const i=[];for(const n of l.groupAdjacentBy(o,(s,r)=>r.modified.startLineNumber-s.modified.endLineNumberExclusive<2*hf)){const s=[];s.push(new LX);const r=new l.LineRange(Math.max(1,n[0].original.startLineNumber-hf),Math.min(n[n.length-1].original.endLineNumberExclusive+hf,e+1)),a=new l.LineRange(Math.max(1,n[0].modified.startLineNumber-hf),Math.min(n[n.length-1].modified.endLineNumberExclusive+hf,t+1));l.forEachAdjacent(n,(d,u)=>{const f=new l.LineRange(d?d.original.endLineNumberExclusive:r.startLineNumber,u?u.original.startLineNumber:r.endLineNumberExclusive),g=new l.LineRange(d?d.modified.endLineNumberExclusive:a.startLineNumber,u?u.modified.startLineNumber:a.endLineNumberExclusive);f.forEach(m=>{s.push(new EX(m,g.startLineNumber+(m-f.startLineNumber)))}),u&&(u.original.forEach(m=>{s.push(new DX(u,m))}),u.modified.forEach(m=>{s.push(new xX(u,m))}))});const c=n[0].modified.join(n[n.length-1].modified),h=n[0].original.join(n[n.length-1].original);i.push(new yX(new l.LineRangeMapping(c,h),s))}return i}var Li;(function(o){o[o.Header=0]="Header",o[o.Unchanged=1]="Unchanged",o[o.Deleted=2]="Deleted",o[o.Added=3]="Added"})(Li||(Li={}));class yX{constructor(e,t){this.range=e,this.lines=t}}class LX{constructor(){this.type=Li.Header}}class DX{constructor(e,t){this.diff=e,this.originalLineNumber=t,this.type=Li.Deleted,this.modifiedLineNumber=void 0}}class xX{constructor(e,t){this.diff=e,this.modifiedLineNumber=t,this.type=Li.Added,this.originalLineNumber=void 0}}class EX{constructor(e,t){this.originalLineNumber=e,this.modifiedLineNumber=t,this.type=Li.Unchanged}}let I0=class extends l.Disposable{constructor(e,t,i,n,s,r){super(),this._element=e,this._model=t,this._width=i,this._height=n,this._models=s,this._languageService=r,this.domNode=this._element,this.domNode.className="monaco-component diff-review monaco-editor-background";const a=document.createElement("div");a.className="diff-review-actions",this._actionBar=this._register(new el(a)),this._register(he(c=>{this._actionBar.clear(),this._model.canClose.read(c)&&this._actionBar.push(Yo({id:"diffreview.close",label:l.localize(116,"Close"),class:"close-diff-review "+_.ThemeIcon.asClassName(wX),enabled:!0,run:async()=>t.close()}),{label:!1,icon:!0})})),this._content=document.createElement("div"),this._content.className="diff-review-content",this._content.setAttribute("role","code"),this._scrollbar=this._register(new Jg(this._content,{})),oi(this.domNode,this._scrollbar.getDomNode(),a),this._register(he(c=>{this._height.read(c),this._width.read(c),this._scrollbar.scanDomNode()})),this._register(l.toDisposable(()=>{oi(this.domNode)})),this._register(Nr(this.domNode,{width:this._width,height:this._height})),this._register(Nr(this._content,{width:this._width,height:this._height})),this._register(Kn((c,h)=>{this._model.currentGroup.read(c),this._render(h)})),this._register(At(this.domNode,"keydown",c=>{(c.equals(18)||c.equals(2066)||c.equals(530))&&(c.preventDefault(),this._model.goToNextLine()),(c.equals(16)||c.equals(2064)||c.equals(528))&&(c.preventDefault(),this._model.goToPreviousLine()),(c.equals(9)||c.equals(2057)||c.equals(521)||c.equals(1033))&&(c.preventDefault(),this._model.close()),(c.equals(10)||c.equals(3))&&(c.preventDefault(),this._model.revealCurrentElementInEditor())}))}_render(e){const t=this._models.getOriginalOptions(),i=this._models.getModifiedOptions(),n=document.createElement("div");n.className="diff-review-table",n.setAttribute("role","list"),n.setAttribute("aria-label",l.localize(117,"Accessible Diff Viewer. Use arrow up and down to navigate.")),Ot(n,i.get(59)),oi(this._content,n);const s=this._models.getOriginalModel(),r=this._models.getModifiedModel();if(!s||!r)return;const a=s.getOptions(),c=r.getOptions(),h=i.get(75),d=this._model.currentGroup.get();for(const u of d?.lines||[]){if(!d)break;let f;if(u.type===Li.Header){const m=document.createElement("div");m.className="diff-review-row",m.setAttribute("role","listitem");const p=d.range,b=this._model.currentGroupIndex.get(),v=this._model.groups.get().length,C=D=>D===0?l.localize(118,"no lines changed"):D===1?l.localize(119,"1 line changed"):l.localize(120,"{0} lines changed",D),w=C(p.original.length),S=C(p.modified.length);m.setAttribute("aria-label",l.localize(121,"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",b+1,v,p.original.startLineNumber,w,p.modified.startLineNumber,S));const L=document.createElement("div");L.className="diff-review-cell diff-review-summary",L.appendChild(document.createTextNode(`${b+1}/${v}: @@ -${p.original.startLineNumber},${p.original.length} +${p.modified.startLineNumber},${p.modified.length} @@`)),m.appendChild(L),f=m}else f=this._createRow(u,h,this._width.get(),t,s,a,i,r,c);n.appendChild(f);const g=Z(m=>this._model.currentElement.read(m)===u);e.add(he(m=>{const p=g.read(m);f.tabIndex=p?0:-1,p&&f.focus()})),e.add(R(f,"focus",()=>{this._model.goToLine(u)}))}this._scrollbar.scanDomNode()}_createRow(e,t,i,n,s,r,a,c,h){const d=n.get(165),u=d.glyphMarginWidth+d.lineNumbersWidth,f=a.get(165),g=10+f.glyphMarginWidth+f.lineNumbersWidth;let m="diff-review-row",p="";const b="diff-review-spacer";let v=null;switch(e.type){case Li.Added:m="diff-review-row line-insert",p=" char-insert",v=CX;break;case Li.Deleted:m="diff-review-row line-delete",p=" char-delete",v=vX;break}const C=document.createElement("div");C.style.minWidth=i+"px",C.className=m,C.setAttribute("role","listitem"),C.ariaLevel="";const w=document.createElement("div");w.className="diff-review-cell",w.style.height=`${t}px`,C.appendChild(w);const S=document.createElement("span");S.style.width=u+"px",S.style.minWidth=u+"px",S.className="diff-review-line-number"+p,e.originalLineNumber!==void 0?S.appendChild(document.createTextNode(String(e.originalLineNumber))):S.innerText=" ",w.appendChild(S);const L=document.createElement("span");L.style.width=g+"px",L.style.minWidth=g+"px",L.style.paddingRight="10px",L.className="diff-review-line-number"+p,e.modifiedLineNumber!==void 0?L.appendChild(document.createTextNode(String(e.modifiedLineNumber))):L.innerText=" ",w.appendChild(L);const D=document.createElement("span");if(D.className=b,v){const T=document.createElement("span");T.className=_.ThemeIcon.asClassName(v),T.innerText="  ",D.appendChild(T)}else D.innerText="  ";w.appendChild(D);let x;if(e.modifiedLineNumber!==void 0){let T=this._getLineHtml(c,a,h.tabSize,e.modifiedLineNumber,this._languageService.languageIdCodec);pl._ttPolicy&&(T=pl._ttPolicy.createHTML(T)),w.insertAdjacentHTML("beforeend",T),x=c.getLineContent(e.modifiedLineNumber)}else{let T=this._getLineHtml(s,n,r.tabSize,e.originalLineNumber,this._languageService.languageIdCodec);pl._ttPolicy&&(T=pl._ttPolicy.createHTML(T)),w.insertAdjacentHTML("beforeend",T),x=s.getLineContent(e.originalLineNumber)}x.length===0&&(x=l.localize(122,"blank"));let I="";switch(e.type){case Li.Unchanged:e.originalLineNumber===e.modifiedLineNumber?I=l.localize(123,"{0} unchanged line {1}",x,e.originalLineNumber):I=l.localize(124,"{0} original line {1} modified line {2}",x,e.originalLineNumber,e.modifiedLineNumber);break;case Li.Added:I=l.localize(125,"+ {0} modified line {1}",x,e.modifiedLineNumber);break;case Li.Deleted:I=l.localize(126,"- {0} original line {1}",x,e.originalLineNumber);break}return C.setAttribute("aria-label",I),C}_getLineHtml(e,t,i,n,s){const r=e.getLineContent(n),a=t.get(59),c=t.get(117).verticalScrollbarSize,h=_t.createEmpty(r,s),d=Wi.isBasicASCII(r,e.mightContainNonBasicASCII()),u=Wi.containsRTL(r,d,e.mightContainRTL());return Eg(new Wo(a.isMonospace&&!t.get(40),a.canUseHalfwidthRightwardsArrow,r,!1,d,u,0,h,[],i,0,a.spaceWidth,a.middotWidth,a.wsmiddotWidth,t.get(133),t.get(113),t.get(108),t.get(60)!==io.OFF,null,null,c)).html}};I0=D0([x0(5,yt)],I0);class IX{constructor(e){this.editors=e}getOriginalModel(){return this.editors.original.getModel()}getOriginalOptions(){return this.editors.original.getOptions()}originalReveal(e){this.editors.original.revealRange(e),this.editors.original.setSelection(e),this.editors.original.focus()}getModifiedModel(){return this.editors.modified.getModel()}getModifiedOptions(){return this.editors.modified.getOptions()}modifiedReveal(e){e&&(this.editors.modified.revealRange(e),this.editors.modified.setSelection(e)),this.editors.modified.focus()}modifiedSetSelection(e){this.editors.modified.setSelection(e)}modifiedFocus(){this.editors.modified.focus()}getModifiedPosition(){return this.editors.modified.getPosition()??void 0}}E("diffEditor.move.border","#8b8b8b9c",l.localize(153,"The border color for text that got moved in the diff editor.")),E("diffEditor.moveActive.border","#FFA500",l.localize(154,"The active border color for text that got moved in the diff editor.")),E("diffEditor.unchangedRegionShadow",{dark:"#000000",light:"#737373BF",hcDark:"#000000",hcLight:"#737373BF"},l.localize(155,"The color of the shadow around unchanged region widgets."));const TX=Mo("diff-insert",l.Codicon.add,l.localize(156,"Line decoration for inserts in the diff editor.")),mO=Mo("diff-remove",l.Codicon.remove,l.localize(157,"Line decoration for removals in the diff editor.")),pO=Ct.register({className:"line-insert",description:"line-insert",isWholeLine:!0,linesDecorationsClassName:"insert-sign "+_.ThemeIcon.asClassName(TX),marginClassName:"gutter-insert"}),_O=Ct.register({className:"line-delete",description:"line-delete",isWholeLine:!0,linesDecorationsClassName:"delete-sign "+_.ThemeIcon.asClassName(mO),marginClassName:"gutter-delete"}),bO=Ct.register({className:"line-insert",description:"line-insert",isWholeLine:!0,marginClassName:"gutter-insert"}),CO=Ct.register({className:"line-delete",description:"line-delete",isWholeLine:!0,marginClassName:"gutter-delete"}),vO=Ct.register({className:"char-insert",description:"char-insert",shouldFillLineOnLineBreak:!0}),NX=Ct.register({className:"char-insert",description:"char-insert",isWholeLine:!0}),RX=Ct.register({className:"char-insert diff-range-empty",description:"char-insert diff-range-empty"}),T0=Ct.register({className:"char-delete",description:"char-delete",shouldFillLineOnLineBreak:!0}),MX=Ct.register({className:"char-delete",description:"char-delete",isWholeLine:!0}),AX=Ct.register({className:"char-delete diff-range-empty",description:"char-delete diff-range-empty"});var wO=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},N0=function(o,e){return function(t,i){e(t,i,o)}},_l;const SO=le("diffProviderFactoryService");let R0=class{constructor(e){this.instantiationService=e}createDiffProvider(e){return this.instantiationService.createInstance(M0,e)}};R0=wO([N0(0,me)],R0),fe(SO,R0,1);let M0=(Al=class{constructor(e,t,i){this.editorWorkerService=t,this.telemetryService=i,this.onDidChangeEventEmitter=new l.Emitter,this.onDidChange=this.onDidChangeEventEmitter.event,this.diffAlgorithm="advanced",this.diffAlgorithmOnDidChangeSubscription=void 0,this.setOptions(e)}dispose(){this.diffAlgorithmOnDidChangeSubscription?.dispose(),this.onDidChangeEventEmitter.dispose()}async computeDiff(e,t,i,n){if(typeof this.diffAlgorithm!="string")return this.diffAlgorithm.computeDiff(e,t,i,n);if(e.isDisposed()||t.isDisposed())return{changes:[],identical:!0,quitEarly:!1,moves:[]};if(e.getLineCount()===1&&e.getLineMaxColumn(1)===1)return t.getLineCount()===1&&t.getLineMaxColumn(1)===1?{changes:[],identical:!0,quitEarly:!1,moves:[]}:{changes:[new l.DetailedLineRangeMapping(new l.LineRange(1,2),new l.LineRange(1,t.getLineCount()+1),[new l.RangeMapping(e.getFullModelRange(),t.getFullModelRange())])],identical:!1,quitEarly:!1,moves:[]};const s=JSON.stringify([e.uri.toString(),t.uri.toString()]),r=JSON.stringify([e.id,t.id,e.getAlternativeVersionId(),t.getAlternativeVersionId(),JSON.stringify(i)]),a=_l.diffCache.get(s);if(a&&a.context===r)return a.result;const c=l.StopWatch.create(),h=await this.editorWorkerService.computeDiff(e.uri,t.uri,i,this.diffAlgorithm),d=c.elapsed();if(this.telemetryService.publicLog2("diffEditor.computeDiff",{timeMs:d,timedOut:h?.quitEarly??!0,detectedMoves:i.computeMoves?h?.moves.length??0:-1}),n.isCancellationRequested)return{changes:[],identical:!1,quitEarly:!0,moves:[]};if(!h)throw new Error("no diff result available");return _l.diffCache.size>10&&_l.diffCache.delete(_l.diffCache.keys().next().value),_l.diffCache.set(s,{result:h,context:r}),h}setOptions(e){let t=!1;e.diffAlgorithm&&this.diffAlgorithm!==e.diffAlgorithm&&(this.diffAlgorithmOnDidChangeSubscription?.dispose(),this.diffAlgorithmOnDidChangeSubscription=void 0,this.diffAlgorithm=e.diffAlgorithm,typeof e.diffAlgorithm!="string"&&(this.diffAlgorithmOnDidChangeSubscription=e.diffAlgorithm.onDidChange(()=>this.onDidChangeEventEmitter.fire())),t=!0),t&&this.onDidChangeEventEmitter.fire()}},_l=Al,Al.diffCache=new Map,Al);M0=_l=wO([N0(1,tr),N0(2,Xn)],M0);var OX=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},PX=function(o,e){return function(t,i){e(t,i,o)}};let A0=class extends l.Disposable{setActiveMovedText(e){this._activeMovedText.set(e,void 0)}constructor(e,t,i){super(),this.model=e,this._options=t,this._diffProviderFactoryService=i,this._isDiffUpToDate=W(this,!1),this.isDiffUpToDate=this._isDiffUpToDate,this._diff=W(this,void 0),this.diff=this._diff,this._unchangedRegions=W(this,void 0),this.unchangedRegions=Z(this,a=>this._options.hideUnchangedRegions.read(a)?this._unchangedRegions.read(a)?.regions??[]:(nt(c=>{for(const h of this._unchangedRegions.read(void 0)?.regions||[])h.collapseAll(c)}),[])),this.movedTextToCompare=W(this,void 0),this._activeMovedText=W(this,void 0),this._hoveredMovedText=W(this,void 0),this.activeMovedText=Z(this,a=>this.movedTextToCompare.read(a)??this._hoveredMovedText.read(a)??this._activeMovedText.read(a)),this._cancellationTokenSource=new l.CancellationTokenSource,this._diffProvider=Z(this,a=>{const c=this._diffProviderFactoryService.createDiffProvider({diffAlgorithm:this._options.diffAlgorithm.read(a)}),h=Ii("onDidChange",c.onDidChange);return{diffProvider:c,onChangeSignal:h}}),this._register(l.toDisposable(()=>this._cancellationTokenSource.cancel()));const n=qr("contentChangedSignal"),s=this._register(new l.RunOnceScheduler(()=>n.trigger(void 0),200));this._register(he(a=>{const c=this._unchangedRegions.read(a);if(!c||c.regions.some(m=>m.isDragged.read(a)))return;const h=c.originalDecorationIds.map(m=>e.original.getDecorationRange(m)).map(m=>m?l.LineRange.fromRangeInclusive(m):void 0),d=c.modifiedDecorationIds.map(m=>e.modified.getDecorationRange(m)).map(m=>m?l.LineRange.fromRangeInclusive(m):void 0),u=c.regions.map((m,p)=>!h[p]||!d[p]?void 0:new Rr(h[p].startLineNumber,d[p].startLineNumber,h[p].length,m.visibleLineCountTop.read(a),m.visibleLineCountBottom.read(a))).filter(l.isDefined),f=[];let g=!1;for(const m of l.groupAdjacentBy(u,(p,b)=>p.getHiddenModifiedRange(a).endLineNumberExclusive===b.getHiddenModifiedRange(a).startLineNumber))if(m.length>1){g=!0;const p=m.reduce((v,C)=>v+C.lineCount,0),b=new Rr(m[0].originalLineNumber,m[0].modifiedLineNumber,p,m[0].visibleLineCountTop.read(void 0),m[m.length-1].visibleLineCountBottom.read(void 0));f.push(b)}else f.push(m[0]);if(g){const m=e.original.deltaDecorations(c.originalDecorationIds,f.map(b=>({range:b.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))),p=e.modified.deltaDecorations(c.modifiedDecorationIds,f.map(b=>({range:b.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})));nt(b=>{this._unchangedRegions.set({regions:f,originalDecorationIds:m,modifiedDecorationIds:p},b)})}}));const r=(a,c,h)=>{const d=Rr.fromDiffs(a.changes,e.original.getLineCount(),e.modified.getLineCount(),this._options.hideUnchangedRegionsMinimumLineCount.read(h),this._options.hideUnchangedRegionsContextLineCount.read(h));let u;const f=this._unchangedRegions.get();if(f){const b=f.originalDecorationIds.map(S=>e.original.getDecorationRange(S)).map(S=>S?l.LineRange.fromRangeInclusive(S):void 0),v=f.modifiedDecorationIds.map(S=>e.modified.getDecorationRange(S)).map(S=>S?l.LineRange.fromRangeInclusive(S):void 0);let w=_X(f.regions.map((S,L)=>{if(!b[L]||!v[L])return;const D=b[L].length;return new Rr(b[L].startLineNumber,v[L].startLineNumber,D,Math.min(S.visibleLineCountTop.get(),D),Math.min(S.visibleLineCountBottom.get(),D-S.visibleLineCountTop.get()))}).filter(l.isDefined),(S,L)=>!L||S.modifiedLineNumber>=L.modifiedLineNumber+L.lineCount&&S.originalLineNumber>=L.originalLineNumber+L.lineCount).map(S=>new l.LineRangeMapping(S.getHiddenOriginalRange(h),S.getHiddenModifiedRange(h)));w=l.LineRangeMapping.clip(w,l.LineRange.ofLength(1,e.original.getLineCount()),l.LineRange.ofLength(1,e.modified.getLineCount())),u=l.LineRangeMapping.inverse(w,e.original.getLineCount(),e.modified.getLineCount())}const g=[];if(u)for(const b of d){const v=u.filter(C=>C.original.intersectsStrict(b.originalUnchangedRange)&&C.modified.intersectsStrict(b.modifiedUnchangedRange));g.push(...b.setVisibleRanges(v,c))}else g.push(...d);const m=e.original.deltaDecorations(f?.originalDecorationIds||[],g.map(b=>({range:b.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))),p=e.modified.deltaDecorations(f?.modifiedDecorationIds||[],g.map(b=>({range:b.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})));this._unchangedRegions.set({regions:g,originalDecorationIds:m,modifiedDecorationIds:p},c)};this._register(e.modified.onDidChangeContent(a=>{if(this._diff.get()){const h=po.fromModelContentChanges(a.changes);this._lastDiff,e.original,e.modified}this._isDiffUpToDate.set(!1,void 0),s.schedule()})),this._register(e.original.onDidChangeContent(a=>{if(this._diff.get()){const h=po.fromModelContentChanges(a.changes);this._lastDiff,e.original,e.modified}this._isDiffUpToDate.set(!1,void 0),s.schedule()})),this._register(he(async a=>{const c=a.store;this._options.hideUnchangedRegionsMinimumLineCount.read(a),this._options.hideUnchangedRegionsContextLineCount.read(a),s.cancel(),n.read(a);const h=this._diffProvider.read(a);h.onChangeSignal.read(a),this._isDiffUpToDate.set(!1,void 0);let d=[];c.add(e.original.onDidChangeContent(g=>{const m=po.fromModelContentChanges(g.changes);d=Nm(d,m)}));let u=[];c.add(e.modified.onDidChangeContent(g=>{const m=po.fromModelContentChanges(g.changes);u=Nm(u,m)}));let f=await h.diffProvider.computeDiff(e.original,e.modified,{ignoreTrimWhitespace:this._options.ignoreTrimWhitespace.read(a),maxComputationTimeMs:this._options.maxComputationTimeMs.read(a),computeMoves:this._options.showMoves.read(a)},this._cancellationTokenSource.token).catch(l.rejectIfNotCanceled);!f||this._cancellationTokenSource.token.isCancellationRequested||e.original.isDisposed()||e.modified.isDisposed()||(f=kX(f,e.original,e.modified),f=(e.original,e.modified,void 0)??f,f=(e.original,e.modified,void 0)??f,nt(g=>{r(f,g),this._lastDiff=f;const m=O0.fromDiffResult(f);this._diff.set(m,g),this._isDiffUpToDate.set(!0,g);const p=this.movedTextToCompare.read(void 0);this.movedTextToCompare.set(p?this._lastDiff.moves.find(b=>b.lineRangeMapping.modified.intersect(p.lineRangeMapping.modified)):void 0,g)}))}))}ensureModifiedLineIsVisible(e,t,i){if(this.diff.get()?.mappings.length===0)return;const n=this._unchangedRegions.get()?.regions||[];for(const s of n)if(s.getHiddenModifiedRange(void 0).contains(e)){s.showModifiedLine(e,t,i);return}}ensureOriginalLineIsVisible(e,t,i){if(this.diff.get()?.mappings.length===0)return;const n=this._unchangedRegions.get()?.regions||[];for(const s of n)if(s.getHiddenOriginalRange(void 0).contains(e)){s.showOriginalLine(e,t,i);return}}async waitForDiff(){await QD(this.isDiffUpToDate,e=>e,void 0,this._cancellationTokenSource.token).catch(l.rejectIfNotCanceled)}serializeState(){return{collapsedRegions:this._unchangedRegions.get()?.regions.map(t=>({range:t.getHiddenModifiedRange(void 0).serialize()}))}}restoreSerializedState(e){const t=e.collapsedRegions?.map(n=>l.LineRange.deserialize(n.range)),i=this._unchangedRegions.get();!i||!t||nt(n=>{for(const s of i.regions)for(const r of t)if(s.modifiedUnchangedRange.intersect(r)){s.setHiddenModifiedRange(r,n);break}})}};A0=OX([PX(2,SO)],A0);function kX(o,e,t){return{changes:o.changes.map(i=>new l.DetailedLineRangeMapping(i.original,i.modified,i.innerChanges?i.innerChanges.map(n=>FX(n,e,t)):void 0)),moves:o.moves,identical:o.identical,quitEarly:o.quitEarly}}function FX(o,e,t){let i=o.originalRange,n=o.modifiedRange;return i.startColumn===1&&n.startColumn===1&&(i.endColumn!==1||n.endColumn!==1)&&i.endColumn===e.getLineMaxColumn(i.endLineNumber)&&n.endColumn===t.getLineMaxColumn(n.endLineNumber)&&i.endLineNumbernew yO(t)),e.moves||[],e.identical,e.quitEarly)}constructor(e,t,i,n){this.mappings=e,this.movedTexts=t,this.identical=i,this.quitEarly=n}}class yO{constructor(e){this.lineRangeMapping=e}}class Rr{static fromDiffs(e,t,i,n,s){const r=l.DetailedLineRangeMapping.inverse(e,t,i),a=[];for(const c of r){let h=c.original.startLineNumber,d=c.modified.startLineNumber,u=c.original.length;const f=h===1&&d===1,g=h+u===t+1&&d+u===i+1;(f||g)&&u>=s+n?(f&&!g&&(u-=s),g&&!f&&(h+=s,d+=s,u-=s),a.push(new Rr(h,d,u,0,0))):u>=s*2+n&&(h+=s,d+=s,u-=s*2,a.push(new Rr(h,d,u,0,0)))}return a}get originalUnchangedRange(){return l.LineRange.ofLength(this.originalLineNumber,this.lineCount)}get modifiedUnchangedRange(){return l.LineRange.ofLength(this.modifiedLineNumber,this.lineCount)}constructor(e,t,i,n,s){this.originalLineNumber=e,this.modifiedLineNumber=t,this.lineCount=i,this._visibleLineCountTop=W(this,0),this.visibleLineCountTop=this._visibleLineCountTop,this._visibleLineCountBottom=W(this,0),this.visibleLineCountBottom=this._visibleLineCountBottom,this._shouldHideControls=Z(this,c=>this.visibleLineCountTop.read(c)+this.visibleLineCountBottom.read(c)===this.lineCount&&!this.isDragged.read(c)),this.isDragged=W(this,void 0);const r=Math.max(Math.min(n,this.lineCount),0),a=Math.max(Math.min(s,this.lineCount-n),0);l.softAssert(n===r),l.softAssert(s===a),this._visibleLineCountTop.set(r,void 0),this._visibleLineCountBottom.set(a,void 0)}setVisibleRanges(e,t){const i=[],n=new l.LineRangeSet(e.map(c=>c.modified)).subtractFrom(this.modifiedUnchangedRange);let s=this.originalLineNumber,r=this.modifiedLineNumber;const a=this.modifiedLineNumber+this.lineCount;if(n.ranges.length===0)this.showAll(t),i.push(this);else{let c=0;for(const h of n.ranges){const d=c===n.ranges.length-1;c++;const u=(d?a:h.endLineNumberExclusive)-r,f=new Rr(s,r,u,0,0);f.setHiddenModifiedRange(h,t),i.push(f),s=f.originalUnchangedRange.endLineNumberExclusive,r=f.modifiedUnchangedRange.endLineNumberExclusive}}return i}shouldHideControls(e){return this._shouldHideControls.read(e)}getHiddenOriginalRange(e){return l.LineRange.ofLength(this.originalLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}getHiddenModifiedRange(e){return l.LineRange.ofLength(this.modifiedLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}setHiddenModifiedRange(e,t){const i=e.startLineNumber-this.modifiedLineNumber,n=this.modifiedLineNumber+this.lineCount-e.endLineNumberExclusive;this.setState(i,n,t)}getMaxVisibleLineCountTop(){return this.lineCount-this._visibleLineCountBottom.get()}getMaxVisibleLineCountBottom(){return this.lineCount-this._visibleLineCountTop.get()}showMoreAbove(e=10,t){const i=this.getMaxVisibleLineCountTop();this._visibleLineCountTop.set(Math.min(this._visibleLineCountTop.get()+e,i),t)}showMoreBelow(e=10,t){const i=this.lineCount-this._visibleLineCountTop.get();this._visibleLineCountBottom.set(Math.min(this._visibleLineCountBottom.get()+e,i),t)}showAll(e){this._visibleLineCountBottom.set(this.lineCount-this._visibleLineCountTop.get(),e)}showModifiedLine(e,t,i){const n=e+1-(this.modifiedLineNumber+this._visibleLineCountTop.get()),s=this.modifiedLineNumber-this._visibleLineCountBottom.get()+this.lineCount-e;t===0&&n{a.preventDefault();const c=e.ownerDocument.getSelection();if(!c||c.rangeCount===0)return;const h=c.getRangeAt(0);if(!h||h.collapsed)return;const d=h.startContainer.nodeType===Node.TEXT_NODE?h.startContainer.parentElement:h.startContainer,u=h.endContainer.nodeType===Node.TEXT_NODE?h.endContainer.parentElement:h.endContainer;if(!d||!u)return;const f=t.getModelPositionAt(d,h.startOffset),g=t.getModelPositionAt(u,h.endOffset);if(!f||!g)return;const m=f.delta(i.original.startLineNumber-1),p=g.delta(i.original.startLineNumber-1),b=p.isBefore(m)?l.Range.fromPositions(p,m):l.Range.fromPositions(m,p),v=n.getValueInRange(b);s.writeText(v)})),r}class zX extends l.Disposable{get visibility(){return this._visibility}set visibility(e){this._visibility!==e&&(this._visibility=e,this._diffActions.style.visibility=e?"visible":"hidden")}constructor(e,t,i,n,s,r,a,c,h,d){super(),this._getViewZoneId=e,this._marginDomNode=t,this._deletedCodeDomNode=i,this._modifiedEditor=n,this._diff=s,this._editor=r,this._renderLinesResult=a,this._originalTextModel=c,this._contextMenuService=h,this._clipboardService=d,this._visibility=!1,this._marginDomNode.style.zIndex="10",this._diffActions=document.createElement("div"),this._diffActions.className=_.ThemeIcon.asClassName(l.Codicon.lightBulb)+" lightbulb-glyph",this._diffActions.style.position="absolute";const u=this._modifiedEditor.getOption(75);this._diffActions.style.right="0px",this._diffActions.style.visibility="hidden",this._diffActions.style.height=`${u}px`,this._diffActions.style.lineHeight=`${u}px`,this._marginDomNode.appendChild(this._diffActions);let f=0;const g=n.getOption(144)&&!l.isIOS,m=(p,b,v)=>{this._contextMenuService.showContextMenu({domForShadowRoot:g?n.getDomNode()??void 0:void 0,getAnchor:()=>p,onHide:v,getActions:()=>{const C=[],w=s.modified.isEmpty;return C.push(new oo("diff.clipboard.copyDeletedContent",w?s.original.length>1?l.localize(128,"Copy deleted lines"):l.localize(129,"Copy deleted line"):s.original.length>1?l.localize(130,"Copy changed lines"):l.localize(131,"Copy changed line"),void 0,!0,async()=>{const L=this._originalTextModel.getValueInRange(s.original.toExclusiveRange());await this._clipboardService.writeText(L)})),s.original.length>1&&C.push(new oo("diff.clipboard.copyDeletedLineContent",w?l.localize(132,"Copy deleted line ({0})",s.original.startLineNumber+f):l.localize(133,"Copy changed line ({0})",s.original.startLineNumber+f),void 0,!0,async()=>{let L=this._originalTextModel.getLineContent(s.original.startLineNumber+f);L===""&&(L=this._originalTextModel.getEndOfLineSequence()===0?` +`:`\r +`),await this._clipboardService.writeText(L)})),n.getOption(104)||C.push(new oo("diff.inline.revertChange",l.localize(134,"Revert this change"),void 0,!0,async()=>{this._editor.revert(this._diff)})),C},autoSelectFirstItem:!0})};this._register(At(this._diffActions,"mousedown",p=>{if(!p.leftButton)return;const{top:b,height:v}=Qi(this._diffActions),C=Math.floor(u/3);p.preventDefault(),m({x:p.posx,y:b+v+C})})),this._register(n.onMouseMove(p=>{(p.target.type===8||p.target.type===5)&&p.target.detail.viewZoneId===this._getViewZoneId()?(f=this._updateLightBulbPosition(this._marginDomNode,p.event.browserEvent.y,u),this.visibility=!0):this.visibility=!1})),this._register(BX({domNode:this._deletedCodeDomNode,diffEntry:s,originalModel:this._originalTextModel,renderLinesResult:this._renderLinesResult,clipboardService:d}))}_updateLightBulbPosition(e,t,i){const{top:n}=Qi(e),s=t-n,r=Math.floor(s/i),a=r*i;if(this._diffActions.style.top=`${a}px`,this._renderLinesResult.viewLineCounts){let c=0;for(let h=0;ho});function DO(o,e,t,i,n=!1){Ot(i,e.fontInfo);const s=t.length>0,r=new ra(1e4);let a=0,c=0;const h=[],d=[];for(let m=0;mnull),i=!0,n=!0){this.lineTokens=e,this.lineBreakData=t,this.mightContainNonBasicASCII=i,this.mightContainRTL=n}}class yh{static fromEditor(e){const t=e.getOptions(),i=t.get(59),n=t.get(165);return new yh(e.getModel()?.getOptions().tabSize||0,i,t.get(40),i.typicalHalfwidthCharacterWidth,t.get(118),t.get(75),n.decorationsWidth,t.get(133),t.get(113),t.get(108),t.get(60),t.get(117).verticalScrollbarSize)}constructor(e,t,i,n,s,r,a,c,h,d,u,f,g=!0){this.tabSize=e,this.fontInfo=t,this.disableMonospaceOptimizations=i,this.typicalHalfwidthCharacterWidth=n,this.scrollBeyondLastColumn=s,this.lineHeight=r,this.lineDecorationsWidth=a,this.stopRenderingLineAfter=c,this.renderWhitespace=h,this.renderControlCharacters=d,this.fontLigatures=u,this.verticalScrollbarSize=f,this.setWidth=g}withSetWidth(e){return new yh(this.tabSize,this.fontInfo,this.disableMonospaceOptimizations,this.typicalHalfwidthCharacterWidth,this.scrollBeyondLastColumn,this.lineHeight,this.lineDecorationsWidth,this.stopRenderingLineAfter,this.renderWhitespace,this.renderControlCharacters,this.fontLigatures,this.verticalScrollbarSize,e)}withScrollBeyondLastColumn(e){return new yh(this.tabSize,this.fontInfo,this.disableMonospaceOptimizations,this.typicalHalfwidthCharacterWidth,e,this.lineHeight,this.lineDecorationsWidth,this.stopRenderingLineAfter,this.renderWhitespace,this.renderControlCharacters,this.fontLigatures,this.verticalScrollbarSize,this.setWidth)}}class VX{constructor(e,t,i,n,s){this.heightInLines=e,this.minWidthInPx=t,this.viewLineCounts=i,this._renderOutputs=n,this._source=s}getModelPositionAt(e,t){let i=e;for(;i&&!i.classList.contains("view-line");)i=i.parentElement;if(!i)return;const n=i.parentElement;if(!n)return;const s=n.querySelectorAll(".view-line");let r=-1;for(let u=0;u=this._renderOutputs.length)return;let a=1,c=r;for(let u=0;uthis._source.lineTokens.length)return;const h=this._renderOutputs[r];if(!h)return;const d=dc(h.characterMapping,e,t)+h.offset;return new l.Position(a,d)}}class EO extends xg{constructor(e,t,i){super(e,t),this.offset=i}}function IO(o,e,t,i,n,s,r,a,c){a.appendString('
    '):a.appendString('px;">');const h=e.getLineContent(),d=Wi.isBasicASCII(h,n),u=Wi.containsRTL(h,d,s),f=bd(new Wo(r.fontInfo.isMonospace&&!r.disableMonospaceOptimizations,r.fontInfo.canUseHalfwidthRightwardsArrow,h,!1,d,u,0,e,t,r.tabSize,0,r.fontInfo.spaceWidth,r.fontInfo.middotWidth,r.fontInfo.wsmiddotWidth,r.stopRenderingLineAfter,r.renderWhitespace,r.renderControlCharacters,r.fontLigatures!==io.OFF,null,null,r.verticalScrollbarSize),a);a.appendString("
    ");const g=f.characterMapping.getHorizontalOffset(f.characterMapping.length);return{output:f,maxCharWidth:g}}var UX=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},TO=function(o,e){return function(t,i){e(t,i,o)}};let P0=class extends l.Disposable{constructor(e,t,i,n,s,r,a,c,h,d){super(),this._targetWindow=e,this._editors=t,this._diffModel=i,this._options=n,this._diffEditorWidget=s,this._canIgnoreViewZoneUpdateEvent=r,this._origViewZonesToIgnore=a,this._modViewZonesToIgnore=c,this._clipboardService=h,this._contextMenuService=d,this._originalTopPadding=W(this,0),this._originalScrollOffset=W(this,0),this._originalScrollOffsetAnimated=uO(this._targetWindow,this._originalScrollOffset,this._store),this._modifiedTopPadding=W(this,0),this._modifiedScrollOffset=W(this,0),this._modifiedScrollOffsetAnimated=uO(this._targetWindow,this._modifiedScrollOffset,this._store);const u=W("invalidateAlignmentsState",0),f=this._register(new l.RunOnceScheduler(()=>{u.set(u.get()+1,void 0)},0));this._register(this._editors.original.onDidChangeViewZones(w=>{this._canIgnoreViewZoneUpdateEvent()||f.schedule()})),this._register(this._editors.modified.onDidChangeViewZones(w=>{this._canIgnoreViewZoneUpdateEvent()||f.schedule()})),this._register(this._editors.original.onDidChangeConfiguration(w=>{(w.hasChanged(166)||w.hasChanged(75))&&f.schedule()})),this._register(this._editors.modified.onDidChangeConfiguration(w=>{(w.hasChanged(166)||w.hasChanged(75))&&f.schedule()}));const g=this._diffModel.map(w=>w?mt(this,w.model.original.onDidChangeTokens,()=>w.model.original.tokenization.backgroundTokenizationState===2):void 0).map((w,S)=>w?.read(S)),m=Z(w=>{const S=this._diffModel.read(w),L=S?.diff.read(w);if(!S||!L)return null;u.read(w);const x=this._options.renderSideBySide.read(w);return NO(this._editors.original,this._editors.modified,L.mappings,this._origViewZonesToIgnore,this._modViewZonesToIgnore,x)}),p=Z(w=>{const S=this._diffModel.read(w)?.movedTextToCompare.read(w);if(!S)return null;u.read(w);const L=S.changes.map(D=>new yO(D));return NO(this._editors.original,this._editors.modified,L,this._origViewZonesToIgnore,this._modViewZonesToIgnore,!0)});function b(){const w=document.createElement("div");return w.className="diagonal-fill",w}const v=this._register(new l.DisposableStore);this.viewZones=Z(this,w=>{v.clear();const S=m.read(w)||[],L=[],D=[],x=this._modifiedTopPadding.read(w);x>0&&D.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:x,showInHiddenAreas:!0,suppressMouseDown:!0});const I=this._originalTopPadding.read(w);I>0&&L.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:I,showInHiddenAreas:!0,suppressMouseDown:!0});const T=this._options.renderSideBySide.read(w),M={getLineContent:Y=>this._editors.original.getModel().getLineContent(Y),getLineInjectedText:Y=>null},O=T?void 0:this._editors.modified._getViewModel()?.createLineBreaksComputer(M);if(O){const Y=this._editors.original.getModel();for(const ee of S)if(ee.diff)for(let Ee=ee.originalRange.startLineNumber;EeY.getLineCount())return{orig:L,mod:D};O?.addRequest(Ee,null)}}const P=O?.finalize()??[];let k=0;const U=this._editors.modified.getOption(75),B=this._diffModel.read(w)?.movedTextToCompare.read(w),G=this._editors.original.getModel()?.mightContainNonBasicASCII()??!1,X=this._editors.original.getModel()?.mightContainRTL()??!1,re=yh.fromEditor(this._editors.modified);for(const Y of S)if(Y.diff&&!T&&(!this._options.useTrueInlineDiffRendering.read(w)||!k0(Y.diff))){if(!Y.originalRange.isEmpty){g.read(w);const Ee=document.createElement("div");Ee.classList.add("view-lines","line-delete","line-delete-selectable","monaco-mouse-cursor-text");const Rt=this._editors.original.getModel();if(Y.originalRange.endLineNumberExclusive-1>Rt.getLineCount())return{orig:L,mod:D};const We=new xO(Y.originalRange.mapToLineArray(Me=>Rt.tokenization.getLineTokens(Me)),Y.originalRange.mapToLineArray(Me=>P[k++]),G,X),Ke=[];for(const Me of Y.diff.innerChanges||[])Ke.push(new Ac(Me.originalRange.delta(-(Y.diff.original.startLineNumber-1)),T0.className,0));const Mt=DO(We,re,Ke,Ee),Ce=document.createElement("div");if(Ce.className="inline-deleted-margin-view-zone",Ot(Ce,re.fontInfo),this._options.renderIndicators.read(w))for(let Me=0;Mel.assertReturnsDefined(Jt),Ce,Ee,this._editors.modified,Y.diff,this._diffEditorWidget,Mt,this._editors.original.getModel(),this._contextMenuService,this._clipboardService));for(let Me=0;Me1&&L.push({afterLineNumber:Y.originalRange.startLineNumber+Me,domNode:b(),heightInPx:(Rn-1)*U,showInHiddenAreas:!0,suppressMouseDown:!0})}D.push({afterLineNumber:Y.modifiedRange.startLineNumber-1,domNode:Ee,heightInPx:Mt.heightInLines*U,minWidthInPx:Mt.minWidthInPx,marginDomNode:Ce,setZoneId(Me){Jt=Me},showInHiddenAreas:!0,suppressMouseDown:!1})}const ee=document.createElement("div");ee.className="gutter-delete",L.push({afterLineNumber:Y.originalRange.endLineNumberExclusive-1,domNode:b(),heightInPx:Y.modifiedHeightInPx,marginDomNode:ee,showInHiddenAreas:!0,suppressMouseDown:!0})}else{const ee=Y.modifiedHeightInPx-Y.originalHeightInPx;if(ee>0){if(B?.lineRangeMapping.original.delta(-1).deltaLength(2).contains(Y.originalRange.endLineNumberExclusive-1))continue;L.push({afterLineNumber:Y.originalRange.endLineNumberExclusive-1,domNode:b(),heightInPx:ee,showInHiddenAreas:!0,suppressMouseDown:!0})}else{let Ee=function(){const We=document.createElement("div");return We.className="arrow-revert-change "+_.ThemeIcon.asClassName(l.Codicon.arrowRight),w.store.add(R(We,"mousedown",Ke=>Ke.stopPropagation())),w.store.add(R(We,"click",Ke=>{Ke.stopPropagation(),s.revert(Y.diff)})),Q("div",{},We)};if(B?.lineRangeMapping.modified.delta(-1).deltaLength(2).contains(Y.modifiedRange.endLineNumberExclusive-1))continue;let Rt;Y.diff&&Y.diff.modified.isEmpty&&this._options.shouldRenderOldRevertArrows.read(w)&&(Rt=Ee()),D.push({afterLineNumber:Y.modifiedRange.endLineNumberExclusive-1,domNode:b(),heightInPx:-ee,marginDomNode:Rt,showInHiddenAreas:!0,suppressMouseDown:!0})}}for(const Y of p.read(w)??[]){if(!B?.lineRangeMapping.original.intersect(Y.originalRange)||!B?.lineRangeMapping.modified.intersect(Y.modifiedRange))continue;const ee=Y.modifiedHeightInPx-Y.originalHeightInPx;ee>0?L.push({afterLineNumber:Y.originalRange.endLineNumberExclusive-1,domNode:b(),heightInPx:ee,showInHiddenAreas:!0,suppressMouseDown:!0}):D.push({afterLineNumber:Y.modifiedRange.endLineNumberExclusive-1,domNode:b(),heightInPx:-ee,showInHiddenAreas:!0,suppressMouseDown:!0})}return{orig:L,mod:D}});let C=!1;this._register(this._editors.original.onDidScrollChange(w=>{w.scrollLeftChanged&&!C&&(C=!0,this._editors.modified.setScrollLeft(w.scrollLeft),C=!1)})),this._register(this._editors.modified.onDidScrollChange(w=>{w.scrollLeftChanged&&!C&&(C=!0,this._editors.original.setScrollLeft(w.scrollLeft),C=!1)})),this._originalScrollTop=mt(this._editors.original.onDidScrollChange,()=>this._editors.original.getScrollTop()),this._modifiedScrollTop=mt(this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollTop()),this._register(he(w=>{const S=this._originalScrollTop.read(w)-(this._originalScrollOffsetAnimated.read(void 0)-this._modifiedScrollOffsetAnimated.read(w))-(this._originalTopPadding.read(void 0)-this._modifiedTopPadding.read(w));S!==this._editors.modified.getScrollTop()&&this._editors.modified.setScrollTop(S,1)})),this._register(he(w=>{const S=this._modifiedScrollTop.read(w)-(this._modifiedScrollOffsetAnimated.read(void 0)-this._originalScrollOffsetAnimated.read(w))-(this._modifiedTopPadding.read(void 0)-this._originalTopPadding.read(w));S!==this._editors.original.getScrollTop()&&this._editors.original.setScrollTop(S,1)})),this._register(he(w=>{const S=this._diffModel.read(w)?.movedTextToCompare.read(w);let L=0;if(S){const D=this._editors.original.getTopForLineNumber(S.lineRangeMapping.original.startLineNumber,!0)-this._originalTopPadding.read(void 0);L=this._editors.modified.getTopForLineNumber(S.lineRangeMapping.modified.startLineNumber,!0)-this._modifiedTopPadding.read(void 0)-D}L>0?(this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(L,void 0)):L<0?(this._modifiedTopPadding.set(-L,void 0),this._originalTopPadding.set(0,void 0)):setTimeout(()=>{this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(0,void 0)},400),this._editors.modified.hasTextFocus()?this._originalScrollOffset.set(this._modifiedScrollOffset.read(void 0)-L,void 0,!0):this._modifiedScrollOffset.set(this._originalScrollOffset.read(void 0)+L,void 0,!0)}))}};P0=UX([TO(8,Ip),TO(9,nn)],P0);function NO(o,e,t,i,n,s){const r=new l.ArrayQueue(RO(o,i)),a=new l.ArrayQueue(RO(e,n)),c=o.getOption(75),h=e.getOption(75),d=[];let u=0,f=0;function g(m,p){for(;;){let b=r.peek(),v=a.peek();if(b&&b.lineNumber>=m&&(b=void 0),v&&v.lineNumber>=p&&(v=void 0),!b&&!v)break;const C=b?b.lineNumber-u:Number.MAX_VALUE,w=v?v.lineNumber-f:Number.MAX_VALUE;Cw?(a.dequeue(),b={lineNumber:v.lineNumber-f+u,heightInPx:0}):(r.dequeue(),a.dequeue()),d.push({originalRange:l.LineRange.ofLength(b.lineNumber,1),modifiedRange:l.LineRange.ofLength(v.lineNumber,1),originalHeightInPx:c+b.heightInPx,modifiedHeightInPx:h+v.heightInPx,diff:void 0})}}for(const m of t){let w=function(S,L,D=!1){if(SO.lineNumberO+P.heightInPx,0)??0,M=a.takeWhile(O=>O.lineNumberO+P.heightInPx,0)??0;d.push({originalRange:x,modifiedRange:I,originalHeightInPx:x.length*c+T,modifiedHeightInPx:I.length*h+M,diff:m.lineRangeMapping}),C=S,v=L};const p=m.lineRangeMapping;g(p.original.startLineNumber,p.modified.startLineNumber);let b=!0,v=p.modified.startLineNumber,C=p.original.startLineNumber;if(s)for(const S of p.innerChanges||[]){S.originalRange.startColumn>1&&S.modifiedRange.startColumn>1&&w(S.originalRange.startLineNumber,S.modifiedRange.startLineNumber);const L=o.getModel(),D=S.originalRange.endLineNumber<=L.getLineCount()?L.getLineMaxColumn(S.originalRange.endLineNumber):Number.MAX_SAFE_INTEGER;S.originalRange.endColumn1&&i.push({lineNumber:c,heightInPx:r*(h-1)})}for(const c of o.getWhitespaces()){if(e.has(c.id))continue;const h=c.afterLineNumber===0?0:s.convertViewPositionToModelPosition(new l.Position(c.afterLineNumber,1)).lineNumber;t.push({lineNumber:h,heightInPx:c.height})}return uX(t,i,c=>c.lineNumber,(c,h)=>({lineNumber:c.lineNumber,heightInPx:c.heightInPx+h.heightInPx}))}function k0(o){return o.innerChanges?o.innerChanges.every(e=>F0(e.modifiedRange)&&F0(e.originalRange)||e.originalRange.equalsRange(new l.Range(1,1,1,1))):!1}function F0(o){return o.startLineNumber===o.endLineNumber}const Ef=class Ef extends l.Disposable{constructor(e,t,i,n,s){super(),this._rootElement=e,this._diffModel=t,this._originalEditorLayoutInfo=i,this._modifiedEditorLayoutInfo=n,this._editors=s,this._originalScrollTop=mt(this,this._editors.original.onDidScrollChange,()=>this._editors.original.getScrollTop()),this._modifiedScrollTop=mt(this,this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollTop()),this._viewZonesChanged=Ii("onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this.width=W(this,0),this._modifiedViewZonesChangedSignal=Ii("modified.onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this._originalViewZonesChangedSignal=Ii("original.onDidChangeViewZones",this._editors.original.onDidChangeViewZones),this._state=Z(this,d=>{this._element.replaceChildren();const u=this._diffModel.read(d),f=u?.diff.read(d)?.movedTexts;if(!f||f.length===0){this.width.set(0,void 0);return}this._viewZonesChanged.read(d);const g=this._originalEditorLayoutInfo.read(d),m=this._modifiedEditorLayoutInfo.read(d);if(!g||!m){this.width.set(0,void 0);return}this._modifiedViewZonesChangedSignal.read(d),this._originalViewZonesChangedSignal.read(d);const p=f.map(D=>{function x(G,X){const re=X.getTopForLineNumber(G.startLineNumber,!0),Y=X.getTopForLineNumber(G.endLineNumberExclusive,!0);return(re+Y)/2}const I=x(D.lineRangeMapping.original,this._editors.original),T=this._originalScrollTop.read(d),M=x(D.lineRangeMapping.modified,this._editors.modified),O=this._modifiedScrollTop.read(d),P=I-T,k=M-O,U=Math.min(I,M),B=Math.max(I,M);return{range:new l.OffsetRange(U,B),from:P,to:k,fromWithoutScroll:I,toWithoutScroll:M,move:D}});p.sort(l.tieBreakComparators(l.compareBy(D=>D.fromWithoutScroll>D.toWithoutScroll,l.booleanComparator),l.compareBy(D=>D.fromWithoutScroll>D.toWithoutScroll?D.fromWithoutScroll:-D.toWithoutScroll,l.numberComparator)));const b=B0.compute(p.map(D=>D.range)),v=10,C=g.verticalScrollbarWidth,w=(b.getTrackCount()-1)*10+v*2,S=C+w+(m.contentLeft-Ef.movedCodeBlockPadding);let L=0;for(const D of p){const x=b.getTrack(L),I=C+v+x*10,T=15,M=15,O=S,P=m.glyphMarginWidth+m.lineNumbersWidth,k=18,U=document.createElementNS("http://www.w3.org/2000/svg","rect");U.classList.add("arrow-rectangle"),U.setAttribute("x",`${O-P}`),U.setAttribute("y",`${D.to-k/2}`),U.setAttribute("width",`${P}`),U.setAttribute("height",`${k}`),this._element.appendChild(U);const B=document.createElementNS("http://www.w3.org/2000/svg","g"),G=document.createElementNS("http://www.w3.org/2000/svg","path");G.setAttribute("d",`M 0 ${D.from} L ${I} ${D.from} L ${I} ${D.to} L ${O-M} ${D.to}`),G.setAttribute("fill","none"),B.appendChild(G);const X=document.createElementNS("http://www.w3.org/2000/svg","polygon");X.classList.add("arrow"),d.store.add(he(re=>{G.classList.toggle("currentMove",D.move===u.activeMovedText.read(re)),X.classList.toggle("currentMove",D.move===u.activeMovedText.read(re))})),X.setAttribute("points",`${O-M},${D.to-T/2} ${O},${D.to} ${O-M},${D.to+T/2}`),B.appendChild(X),this._element.appendChild(B),L++}this.width.set(w,void 0)}),this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("class","moved-blocks-lines"),this._rootElement.appendChild(this._element),this._register(l.toDisposable(()=>this._element.remove())),this._register(he(d=>{const u=this._originalEditorLayoutInfo.read(d),f=this._modifiedEditorLayoutInfo.read(d);!u||!f||(this._element.style.left=`${u.width-u.verticalScrollbarWidth}px`,this._element.style.height=`${u.height}px`,this._element.style.width=`${u.verticalScrollbarWidth+u.contentLeft-Ef.movedCodeBlockPadding+this.width.read(d)}px`)})),this._register(ed(this._state));const r=Z(d=>{const f=this._diffModel.read(d)?.diff.read(d);return f?f.movedTexts.map(g=>({move:g,original:new Sh(Zr(g.lineRangeMapping.original.startLineNumber-1),18),modified:new Sh(Zr(g.lineRangeMapping.modified.startLineNumber-1),18)})):[]});this._register(A_(this._editors.original,r.map(d=>d.map(u=>u.original)))),this._register(A_(this._editors.modified,r.map(d=>d.map(u=>u.modified)))),this._register(Kn((d,u)=>{const f=r.read(d);for(const g of f)u.add(new MO(this._editors.original,g.original,g.move,"original",this._diffModel.get())),u.add(new MO(this._editors.modified,g.modified,g.move,"modified",this._diffModel.get()))}));const a=Ii("original.onDidFocusEditorWidget",d=>this._editors.original.onDidFocusEditorWidget(()=>setTimeout(()=>d(void 0),0))),c=Ii("modified.onDidFocusEditorWidget",d=>this._editors.modified.onDidFocusEditorWidget(()=>setTimeout(()=>d(void 0),0)));let h="modified";this._register(Gl({changeTracker:{createChangeSummary:()=>{},handleChange:(d,u)=>(d.didChange(a)&&(h="original"),d.didChange(c)&&(h="modified"),!0)}},d=>{a.read(d),c.read(d);const u=this._diffModel.read(d);if(!u)return;const f=u.diff.read(d);let g;if(f&&h==="original"){const m=this._editors.originalCursor.read(d);m&&(g=f.movedTexts.find(p=>p.lineRangeMapping.original.contains(m.lineNumber)))}if(f&&h==="modified"){const m=this._editors.modifiedCursor.read(d);m&&(g=f.movedTexts.find(p=>p.lineRangeMapping.modified.contains(m.lineNumber)))}g!==u.movedTextToCompare.read(void 0)&&u.movedTextToCompare.set(void 0,void 0),u.setActiveMovedText(g)}))}};Ef.movedCodeBlockPadding=4;let Lh=Ef;class B0{static compute(e){const t=[],i=[];for(const n of e){let s=t.findIndex(r=>!r.intersectsStrict(n));s===-1&&(t.length>=6?s=l.findMaxIdx(t,l.compareBy(a=>a.intersectWithRangeLength(n),l.numberComparator)):(s=t.length,t.push(new l.OffsetRangeSet))),t[s].addRange(n),i.push(s)}return new B0(t.length,i)}constructor(e,t){this._trackCount=e,this.trackPerLineIdx=t}getTrack(e){return this.trackPerLineIdx[e]}getTrackCount(){return this._trackCount}}class MO extends y0{constructor(e,t,i,n,s){const r=_e("div.diff-hidden-lines-widget");super(e,t,r.root),this._editor=e,this._move=i,this._kind=n,this._diffModel=s,this._nodes=_e("div.diff-moved-code-block",{style:{marginRight:"4px"}},[_e("div.text-content@textContent"),_e("div.action-bar@actionBar")]),r.root.appendChild(this._nodes.root);const a=mt(this._editor.onDidLayoutChange,()=>this._editor.getLayoutInfo());this._register(Nr(this._nodes.root,{paddingRight:a.map(f=>f.verticalScrollbarWidth)}));let c;i.changes.length>0?c=this._kind==="original"?l.localize(147,"Code moved with changes to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):l.localize(148,"Code moved with changes from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1):c=this._kind==="original"?l.localize(149,"Code moved to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):l.localize(150,"Code moved from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1);const h=this._register(new el(this._nodes.actionBar,{highlightToggledItems:!0})),d=new oo("",c,"",!1);h.push(d,{icon:!1,label:!0});const u=new oo("","Compare",_.ThemeIcon.asClassName(l.Codicon.compareChanges),!0,()=>{this._editor.focus(),this._diffModel.movedTextToCompare.set(this._diffModel.movedTextToCompare.get()===i?void 0:this._move,void 0)});this._register(he(f=>{const g=this._diffModel.movedTextToCompare.read(f)===i;u.checked=g})),h.push(u,{icon:!1,label:!0})}}class $X extends l.Disposable{constructor(e,t,i,n){super(),this._editors=e,this._diffModel=t,this._options=i,this._decorations=Z(this,s=>{const r=this._diffModel.read(s),a=r?.diff.read(s);if(!a)return null;const c=this._diffModel.read(s).movedTextToCompare.read(s),h=this._options.renderIndicators.read(s),d=this._options.showEmptyDecorations.read(s),u=[],f=[];if(!c)for(const m of a.mappings)if(m.lineRangeMapping.original.isEmpty||u.push({range:m.lineRangeMapping.original.toInclusiveRange(),options:h?_O:CO}),m.lineRangeMapping.modified.isEmpty||f.push({range:m.lineRangeMapping.modified.toInclusiveRange(),options:h?pO:bO}),m.lineRangeMapping.modified.isEmpty||m.lineRangeMapping.original.isEmpty)m.lineRangeMapping.original.isEmpty||u.push({range:m.lineRangeMapping.original.toInclusiveRange(),options:MX}),m.lineRangeMapping.modified.isEmpty||f.push({range:m.lineRangeMapping.modified.toInclusiveRange(),options:NX});else{const p=this._options.useTrueInlineDiffRendering.read(s)&&k0(m.lineRangeMapping);for(const b of m.lineRangeMapping.innerChanges||[])if(m.lineRangeMapping.original.contains(b.originalRange.startLineNumber)&&u.push({range:b.originalRange,options:b.originalRange.isEmpty()&&d?AX:T0}),m.lineRangeMapping.modified.contains(b.modifiedRange.startLineNumber)&&f.push({range:b.modifiedRange,options:b.modifiedRange.isEmpty()&&d&&!p?RX:vO}),p){const v=r.model.original.getValueInRange(b.originalRange);f.push({range:b.modifiedRange,options:{description:"deleted-text",before:{content:v,inlineClassName:"inline-deleted-text"},zIndex:1e5,showIfCollapsed:!0}})}}if(c)for(const m of c.changes){const p=m.original.toInclusiveRange();p&&u.push({range:p,options:h?_O:CO});const b=m.modified.toInclusiveRange();b&&f.push({range:b,options:h?pO:bO});for(const v of m.innerChanges||[])u.push({range:v.originalRange,options:T0}),f.push({range:v.modifiedRange,options:vO})}const g=this._diffModel.read(s).activeMovedText.read(s);for(const m of a.movedTexts)u.push({range:m.lineRangeMapping.original.toInclusiveRange(),options:{description:"moved",blockClassName:"movedOriginal"+(m===g?" currentMove":""),blockPadding:[Lh.movedCodeBlockPadding,0,Lh.movedCodeBlockPadding,Lh.movedCodeBlockPadding]}}),f.push({range:m.lineRangeMapping.modified.toInclusiveRange(),options:{description:"moved",blockClassName:"movedModified"+(m===g?" currentMove":""),blockPadding:[4,0,4,4]}});return{originalDecorations:u,modifiedDecorations:f}}),this._register(M_(this._editors.original,this._decorations.map(s=>s?.originalDecorations||[]))),this._register(M_(this._editors.modified,this._decorations.map(s=>s?.modifiedDecorations||[])))}}class Un{static equals(e,t){return e.x===t.x&&e.y===t.y}constructor(e,t){this.x=e,this.y=t}add(e){return new Un(this.x+e.x,this.y+e.y)}deltaX(e){return new Un(this.x+e,this.y)}deltaY(e){return new Un(this.x,this.y+e)}toString(){return`(${this.x},${this.y})`}subtract(e){return new Un(this.x-e.x,this.y-e.y)}scale(e){return new Un(this.x*e,this.y*e)}mapComponents(e){return new Un(e(this.x),e(this.y))}isZero(){return this.x===0&&this.y===0}withThreshold(e){return this.mapComponents(t=>t>e?t-e:t<-e?t+e:0)}}function Mr(o){return z0.get(o)}const Fr=class Fr extends l.Disposable{static get(e){let t=Fr._map.get(e);if(!t){t=new Fr(e),Fr._map.set(e,t);const i=e.onDidDispose(()=>{const n=Fr._map.get(e);n&&(Fr._map.delete(e),n.dispose(),i.dispose())})}return t}_beginUpdate(){this._updateCounter++,this._updateCounter===1&&(this._currentTransaction=new $l(()=>{}))}_endUpdate(){if(this._updateCounter--,this._updateCounter===0){const e=this._currentTransaction;this._currentTransaction=void 0,e.finish()}}constructor(e){super(),this.editor=e,this._sawZeroLineWidth=!1,this._onDidContainerResize=An({owner:this,getTransaction:()=>this._currentTransaction},t=>{const i=this.editor.getContainerDomNode(),n=new ResizeObserver(()=>{this._sawZeroLineWidth&&(this._sawZeroLineWidth=!1,this.editor.resetLineWidthCaches()),t(void 0)});return n.observe(i),{dispose:()=>n.disconnect()}},()=>({})),this._updateCounter=0,this._currentTransaction=void 0,this._model=W(this,this.editor.getModel()),this.model=this._model,this.isReadonly=An({owner:this,getTransaction:()=>this._currentTransaction},this.editor.onDidChangeConfiguration,()=>this.editor.getOption(104)),this._versionId=Wh({owner:this,lazy:!0},this.editor.getModel()?.getVersionId()??null),this.versionId=this._versionId,this._selections=Wh({owner:this,equalsFn:Gr(Zh(l.Selection.selectionsEqual)),lazy:!0},this.editor.getSelections()??null),this.selections=this._selections,this.positions=fn({owner:this,equalsFn:Gr(Zh(l.Position.equals))},t=>this.selections.read(t)?.map(i=>i.getStartPosition())??null),this.isFocused=An({owner:this,getTransaction:()=>this._currentTransaction},t=>{const i=this.editor.onDidFocusEditorWidget(t),n=this.editor.onDidBlurEditorWidget(t);return{dispose(){i.dispose(),n.dispose()}}},()=>this.editor.hasWidgetFocus()),this.isTextFocused=An({owner:this,getTransaction:()=>this._currentTransaction},t=>{const i=this.editor.onDidFocusEditorText(t),n=this.editor.onDidBlurEditorText(t);return{dispose(){i.dispose(),n.dispose()}}},()=>this.editor.hasTextFocus()),this.inComposition=An({owner:this,getTransaction:()=>this._currentTransaction},t=>{const i=this.editor.onDidCompositionStart(()=>{t(void 0)}),n=this.editor.onDidCompositionEnd(()=>{t(void 0)});return{dispose(){i.dispose(),n.dispose()}}},()=>this.editor.inComposition),this.value=Hb(this,t=>(this.versionId.read(t),this.model.read(t)?.getValue()??""),(t,i)=>{const n=this.model.get();n!==null&&t!==n.getValue()&&n.setValue(t)}),this.valueIsEmpty=Z(this,t=>(this.versionId.read(t),this.editor.getModel()?.getValueLength()===0)),this.cursorSelection=fn({owner:this,equalsFn:Gr(l.Selection.selectionsEqual)},t=>this.selections.read(t)?.[0]??null),this.cursorPosition=fn({owner:this,equalsFn:l.Position.equals},t=>this.selections.read(t)?.[0]?.getPosition()??null),this.cursorLineNumber=Z(this,t=>this.cursorPosition.read(t)?.lineNumber??null),this.onDidType=qr(this),this.onDidPaste=qr(this),this.scrollTop=An({owner:this,getTransaction:()=>this._currentTransaction},this.editor.onDidScrollChange,()=>this.editor.getScrollTop()),this.scrollLeft=An({owner:this,getTransaction:()=>this._currentTransaction},this.editor.onDidScrollChange,()=>this.editor.getScrollLeft()),this.layoutInfo=An({owner:this,getTransaction:()=>this._currentTransaction},this.editor.onDidLayoutChange,()=>this.editor.getLayoutInfo()),this.layoutInfoContentLeft=this.layoutInfo.map(t=>t.contentLeft),this.layoutInfoDecorationsLeft=this.layoutInfo.map(t=>t.decorationsLeft),this.layoutInfoWidth=this.layoutInfo.map(t=>t.width),this.layoutInfoHeight=this.layoutInfo.map(t=>t.height),this.layoutInfoMinimap=this.layoutInfo.map(t=>t.minimap),this.layoutInfoVerticalScrollbarWidth=this.layoutInfo.map(t=>t.verticalScrollbarWidth),this.contentWidth=An({owner:this,getTransaction:()=>this._currentTransaction},this.editor.onDidContentSizeChange,()=>this.editor.getContentWidth()),this.contentHeight=An({owner:this,getTransaction:()=>this._currentTransaction},this.editor.onDidContentSizeChange,()=>this.editor.getContentHeight()),this._onDidChangeViewZones=Ii(this,this.editor.onDidChangeViewZones),this._onDidHiddenAreasChanged=Ii(this,this.editor.onDidChangeHiddenAreas),this._onDidLineHeightChanged=Ii(this,this.editor.onDidChangeLineHeight),this._widgetCounter=0,this.openedPeekWidgets=W(this,0),this._register(this.editor.onBeginUpdate(()=>this._beginUpdate())),this._register(this.editor.onEndUpdate(()=>this._endUpdate())),this._register(this.editor.onDidChangeModel(()=>{this._beginUpdate();try{this._model.set(this.editor.getModel(),this._currentTransaction),this._forceUpdate()}finally{this._endUpdate()}})),this._register(this.editor.onDidType(t=>{this._beginUpdate();try{this._forceUpdate(),this.onDidType.trigger(this._currentTransaction,t)}finally{this._endUpdate()}})),this._register(this.editor.onDidPaste(t=>{this._beginUpdate();try{this._forceUpdate(),this.onDidPaste.trigger(this._currentTransaction,t)}finally{this._endUpdate()}})),this._register(this.editor.onDidChangeModelContent(t=>{this._beginUpdate();try{this._versionId.set(this.editor.getModel()?.getVersionId()??null,this._currentTransaction,t),this._forceUpdate()}finally{this._endUpdate()}})),this._register(this.editor.onDidChangeCursorSelection(t=>{this._beginUpdate();try{this._selections.set(this.editor.getSelections(),this._currentTransaction,t),this._forceUpdate()}finally{this._endUpdate()}})),this.domNode=Z(t=>(this.model.read(t),this.editor.getDomNode()))}transaction(e){this._beginUpdate();try{return e(this._currentTransaction)}finally{this._endUpdate()}}forceUpdate(e){this._beginUpdate();try{return this._forceUpdate(),e?e(this._currentTransaction):void 0}finally{this._endUpdate()}}_forceUpdate(){this._beginUpdate();try{this._model.set(this.editor.getModel(),this._currentTransaction),this._versionId.set(this.editor.getModel()?.getVersionId()??null,this._currentTransaction,void 0),this._selections.set(this.editor.getSelections(),this._currentTransaction,void 0)}finally{this._endUpdate()}}getOption(e,t=_.DebugLocation.ofCaller()){return mt(this,i=>this.editor.onDidChangeConfiguration(n=>{n.hasChanged(e)&&i(void 0)}),()=>this.editor.getOption(e),t)}setDecorations(e){const t=new l.DisposableStore,i=this.editor.createDecorationsCollection();return t.add($f({owner:this,debugName:()=>`Apply decorations from ${e.debugName}`},n=>{const s=e.read(n);i.set(s)})),t.add({dispose:()=>{i.clear()}}),t}createOverlayWidget(e){const t="observableOverlayWidget"+this._widgetCounter++,i={getDomNode:()=>e.domNode,getPosition:()=>e.position.get(),getId:()=>t,allowEditorOverflow:e.allowEditorOverflow,getMinContentWidthInPx:()=>e.minContentWidthInPx.get()};this.editor.addOverlayWidget(i);const n=he(s=>{e.position.read(s),e.minContentWidthInPx.read(s),this.editor.layoutOverlayWidget(i)});return l.toDisposable(()=>{n.dispose(),this.editor.removeOverlayWidget(i)})}createContentWidget(e){const t="observableContentWidget"+this._widgetCounter++,i={getDomNode:()=>e.domNode,getPosition:()=>e.position.get(),getId:()=>t,allowEditorOverflow:e.allowEditorOverflow};this.editor.addContentWidget(i);const n=he(s=>{e.position.read(s),this.editor.layoutContentWidget(i)});return l.toDisposable(()=>{n.dispose(),this.editor.removeContentWidget(i)})}observeLineOffsetRange(e,t){const i=this.observePosition(e.map(s=>new l.Position(s.startLineNumber,1)),t),n=this.observePosition(e.map(s=>new l.Position(s.endLineNumberExclusive+1,1)),t);return Z(s=>{i.read(s),n.read(s);const r=e.read(s),a=this.model.read(s)?.getLineCount(),c=(typeof a<"u"&&r.startLineNumber>a?this.editor.getBottomForLineNumber(a):this.editor.getTopForLineNumber(r.startLineNumber))-this.scrollTop.read(s),h=r.isEmpty?c:this.editor.getBottomForLineNumber(r.endLineNumberExclusive-1)-this.scrollTop.read(s);return new l.OffsetRange(c,h)})}getLeftOfPosition(e,t){this.layoutInfo.read(t),this.value.read(t);let i=this.editor.getOffsetForColumn(e.lineNumber,e.column);if(i===-1){const n=this.editor.getOption(59).typicalHalfwidthCharacterWidth;i=e.column*n}return i}observePosition(e,t){let i=e.get();const n=Wh({owner:this,debugName:()=>`topLeftOfPosition${i?.toString()}`,equalsFn:Gr(Un.equals)},new Un(0,0)),s="observablePositionWidget"+this._widgetCounter++,r=document.createElement("div"),a={getDomNode:()=>r,getPosition:()=>i?{preference:[0],position:e.get()}:null,getId:()=>s,allowEditorOverflow:!1,useDisplayNone:!0,afterRender:(c,h)=>{const d=this._model.get();d&&i&&i.lineNumber>d.getLineCount()?n.set(new Un(0,this.editor.getBottomForLineNumber(d.getLineCount())-this.scrollTop.get()),void 0):n.set(h?new Un(h.left,h.top):null,void 0)}};return this.editor.addContentWidget(a),t.add(he(c=>{i=e.read(c),this.editor.layoutContentWidget(a)})),t.add(l.toDisposable(()=>{this.editor.removeContentWidget(a)})),n}isTargetHovered(e,t){const i=W("isInjectedTextHovered",!1);return t.add(this.editor.onMouseMove(n=>{const s=e(n);i.set(s,void 0)})),t.add(this.editor.onMouseLeave(n=>{i.set(!1,void 0)})),i}observeLineHeightForPosition(e){return Z(t=>{const i=e instanceof l.Position?e:e.read(t);return i===null?null:(this.getOption(75).read(t),this.editor.getLineHeightForPosition(i))})}observeLineHeightForLine(e){return typeof e=="number"?this.observeLineHeightForPosition(new l.Position(e,1)):Z(t=>{const i=e.read(t);return i===null?null:this.observeLineHeightForPosition(new l.Position(i,1)).read(t)})}observeLineHeightsForLineRange(e){return Z(t=>{const i=e instanceof l.LineRange?e:e.read(t),n=[];for(let s=i.startLineNumber;s(this.layoutInfo.read(t),this._onDidChangeViewZones.read(t),this._onDidHiddenAreasChanged.read(t),this._onDidLineHeightChanged.read(t),this._versionId.read(t),this.editor.getTopForLineNumber(e)))}};Fr._map=new Map;let z0=Fr;var KX=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},GX=function(o,e){return function(t,i){e(t,i,o)}},ss;let df=($o=class extends l.Disposable{constructor(e,t,i,n,s,r,a){super(),this._editors=e,this._rootElement=t,this._diffModel=i,this._rootWidth=n,this._rootHeight=s,this._modifiedEditorLayoutInfo=r,this._themeService=a,this.width=ss.ENTIRE_DIFF_OVERVIEW_WIDTH;const c=mt(this._themeService.onDidColorThemeChange,()=>this._themeService.getColorTheme()),h=Z(f=>{const g=c.read(f),m=g.getColor(kV)||(g.getColor(BE)||JC).transparent(2),p=g.getColor(FV)||(g.getColor(zE)||WC).transparent(2);return{insertColor:m,removeColor:p}}),d=we(document.createElement("div"));d.setClassName("diffViewport"),d.setPosition("absolute");const u=_e("div.diffOverview",{style:{position:"absolute",top:"0px",width:ss.ENTIRE_DIFF_OVERVIEW_WIDTH+"px"}}).root;this._register(wh(u,d.domNode)),this._register(At(u,F.POINTER_DOWN,f=>{this._editors.modified.delegateVerticalScrollbarPointerDown(f)})),this._register(R(u,F.MOUSE_WHEEL,f=>{this._editors.modified.delegateScrollFromMouseWheelEvent(f)},{passive:!1})),this._register(wh(this._rootElement,u)),this._register(Kn((f,g)=>{const m=this._diffModel.read(f),p=this._editors.original.createOverviewRuler("original diffOverviewRuler");p&&(g.add(p),g.add(wh(u,p.getDomNode())));const b=this._editors.modified.createOverviewRuler("modified diffOverviewRuler");if(b&&(g.add(b),g.add(wh(u,b.getDomNode()))),!p||!b)return;const v=Ii("viewZoneChanged",this._editors.original.onDidChangeViewZones),C=Ii("viewZoneChanged",this._editors.modified.onDidChangeViewZones),w=Ii("hiddenRangesChanged",this._editors.original.onDidChangeHiddenAreas),S=Ii("hiddenRangesChanged",this._editors.modified.onDidChangeHiddenAreas);g.add(he(L=>{v.read(L),C.read(L),w.read(L),S.read(L);const D=h.read(L),x=m?.diff.read(L)?.mappings;function I(O,P,k){const U=k._getViewModel();return U?O.filter(B=>B.length>0).map(B=>{const G=U.coordinatesConverter.convertModelPositionToViewPosition(new l.Position(B.startLineNumber,1)),X=U.coordinatesConverter.convertModelPositionToViewPosition(new l.Position(B.endLineNumberExclusive,1)),re=X.lineNumber-G.lineNumber;return new fT(G.lineNumber,X.lineNumber,re,P.toString())}):[]}const T=I((x||[]).map(O=>O.lineRangeMapping.original),D.removeColor,this._editors.original),M=I((x||[]).map(O=>O.lineRangeMapping.modified),D.insertColor,this._editors.modified);p?.setZones(T),b?.setZones(M)})),g.add(he(L=>{const D=this._rootHeight.read(L),x=this._rootWidth.read(L),I=this._modifiedEditorLayoutInfo.read(L);if(I){const T=ss.ENTIRE_DIFF_OVERVIEW_WIDTH-2*ss.ONE_OVERVIEW_WIDTH;p.setLayout({top:0,height:D,right:T+ss.ONE_OVERVIEW_WIDTH,width:ss.ONE_OVERVIEW_WIDTH}),b.setLayout({top:0,height:D,right:0,width:ss.ONE_OVERVIEW_WIDTH});const M=this._editors.modifiedScrollTop.read(L),O=this._editors.modifiedScrollHeight.read(L),P=this._editors.modified.getOption(117),k=new gc(P.verticalHasArrows?P.arrowSize:0,P.verticalScrollbarSize,0,I.height,O,M);d.setTop(k.getSliderPosition()),d.setHeight(k.getSliderSize())}else d.setTop(0),d.setHeight(0);u.style.height=D+"px",u.style.left=x-ss.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",d.setWidth(ss.ENTIRE_DIFF_OVERVIEW_WIDTH)}))}))}},ss=$o,$o.ONE_OVERVIEW_WIDTH=15,$o.ENTIRE_DIFF_OVERVIEW_WIDTH=$o.ONE_OVERVIEW_WIDTH*2,$o);df=ss=KX([GX(6,_i)],df);var jX=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},V0=function(o,e){return function(t,i){e(t,i,o)}};let U0=class extends l.Disposable{get onDidContentSizeChange(){return this._onDidContentSizeChange.event}constructor(e,t,i,n,s,r,a,c){super(),this.originalEditorElement=e,this.modifiedEditorElement=t,this._options=i,this._argCodeEditorWidgetOptions=n,this._createInnerEditor=s,this._contextKeyService=r,this._instantiationService=a,this._keybindingService=c,this.original=this._register(this._createLeftHandSideEditor(this._options.editorOptions.get(),this._argCodeEditorWidgetOptions.originalEditor||{})),this.modified=this._register(this._createRightHandSideEditor(this._options.editorOptions.get(),this._argCodeEditorWidgetOptions.modifiedEditor||{})),this._onDidContentSizeChange=this._register(new l.Emitter),this.modifiedScrollTop=mt(this,this.modified.onDidScrollChange,()=>this.modified.getScrollTop()),this.modifiedScrollHeight=mt(this,this.modified.onDidScrollChange,()=>this.modified.getScrollHeight()),this.modifiedObs=Mr(this.modified),this.originalObs=Mr(this.original),this.modifiedModel=this.modifiedObs.model,this.modifiedSelections=mt(this,this.modified.onDidChangeCursorSelection,()=>this.modified.getSelections()??[]),this.modifiedCursor=fn({owner:this,equalsFn:l.Position.equals},h=>this.modifiedSelections.read(h)[0]?.getPosition()??new l.Position(1,1)),this.originalCursor=mt(this,this.original.onDidChangeCursorPosition,()=>this.original.getPosition()??new l.Position(1,1)),this.isOriginalFocused=Mr(this.original).isFocused,this.isModifiedFocused=Mr(this.modified).isFocused,this.isFocused=Z(this,h=>this.isOriginalFocused.read(h)||this.isModifiedFocused.read(h)),this._argCodeEditorWidgetOptions=null,this._register(Gl({changeTracker:{createChangeSummary:()=>({}),handleChange:(h,d)=>(h.didChange(i.editorOptions)&&Object.assign(d,h.change.changedOptions),!0)}},(h,d)=>{i.editorOptions.read(h),this._options.renderSideBySide.read(h),this.modified.updateOptions(this._adjustOptionsForRightHandSide(h,d)),this.original.updateOptions(this._adjustOptionsForLeftHandSide(h,d))}))}_createLeftHandSideEditor(e,t){const i=this._adjustOptionsForLeftHandSide(void 0,e),n=this._constructInnerEditor(this._instantiationService,this.originalEditorElement,i,t),s=this._contextKeyService.createKey("isInDiffLeftEditor",n.hasWidgetFocus());return this._register(n.onDidFocusEditorWidget(()=>s.set(!0))),this._register(n.onDidBlurEditorWidget(()=>s.set(!1))),n}_createRightHandSideEditor(e,t){const i=this._adjustOptionsForRightHandSide(void 0,e),n=this._constructInnerEditor(this._instantiationService,this.modifiedEditorElement,i,t),s=this._contextKeyService.createKey("isInDiffRightEditor",n.hasWidgetFocus());return this._register(n.onDidFocusEditorWidget(()=>s.set(!0))),this._register(n.onDidBlurEditorWidget(()=>s.set(!1))),n}_constructInnerEditor(e,t,i,n){const s=this._createInnerEditor(e,t,i,n);return this._register(s.onDidContentSizeChange(r=>{const a=this.original.getContentWidth()+this.modified.getContentWidth()+df.ENTIRE_DIFF_OVERVIEW_WIDTH,c=Math.max(this.modified.getContentHeight(),this.original.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:c,contentWidth:a,contentHeightChanged:r.contentHeightChanged,contentWidthChanged:r.contentWidthChanged})})),s}_adjustOptionsForLeftHandSide(e,t){const i=this._adjustOptionsForSubEditor(t);return this._options.renderSideBySide.get()?(i.unicodeHighlight=this._options.editorOptions.get().unicodeHighlight||{},i.wordWrapOverride1=this._options.diffWordWrap.get()):(i.wordWrapOverride1="off",i.wordWrapOverride2="off",i.stickyScroll={enabled:!1},i.unicodeHighlight={nonBasicASCII:!1,ambiguousCharacters:!1,invisibleCharacters:!1}),i.glyphMargin=this._options.renderSideBySide.get(),t.originalAriaLabel&&(i.ariaLabel=t.originalAriaLabel),i.ariaLabel=this._updateAriaLabel(i.ariaLabel),i.readOnly=!this._options.originalEditable.get(),i.dropIntoEditor={enabled:!i.readOnly},i.extraEditorClassName="original-in-monaco-diff-editor",i}_adjustOptionsForRightHandSide(e,t){const i=this._adjustOptionsForSubEditor(t);return t.modifiedAriaLabel&&(i.ariaLabel=t.modifiedAriaLabel),i.ariaLabel=this._updateAriaLabel(i.ariaLabel),i.wordWrapOverride1=this._options.diffWordWrap.get(),i.revealHorizontalRightPadding=Fi.revealHorizontalRightPadding.defaultValue+df.ENTIRE_DIFF_OVERVIEW_WIDTH,i.scrollbar.verticalHasArrows=!1,i.extraEditorClassName="modified-in-monaco-diff-editor",i}_adjustOptionsForSubEditor(e){const t={...e,dimension:{height:0,width:0}};return t.inDiffEditor=!0,t.automaticLayout=!1,t.allowVariableLineHeights=!1,t.allowVariableFonts=!1,t.allowVariableFontsInAccessibilityMode=!1,t.scrollbar={...t.scrollbar||{}},t.folding=!1,t.codeLens=this._options.diffCodeLens.get(),t.fixedOverflowWidgets=!0,t.minimap={...t.minimap||{}},t.minimap.enabled=!1,this._options.hideUnchangedRegions.get()?t.stickyScroll={enabled:!1}:t.stickyScroll=this._options.editorOptions.get().stickyScroll,t}_updateAriaLabel(e){e||(e="");const t=l.localize(127," use {0} to open the accessibility help.",this._keybindingService.lookupKeybinding("editor.action.accessibilityHelp")?.getAriaLabel());return this._options.accessibilityVerbose.get()?e+t:e?e.replaceAll(t,""):""}};U0=jX([V0(5,be),V0(6,me),V0(7,xt)],U0);class qX{resetSash(){this._sashRatio.set(void 0,void 0)}constructor(e,t){this._options=e,this.dimensions=t,this.sashLeft=Hb(this,i=>{const n=this._sashRatio.read(i)??this._options.splitViewDefaultRatio.read(i);return this._computeSashLeft(n,i)},(i,n)=>{const s=this.dimensions.width.get();this._sashRatio.set(i/s,n)}),this._sashRatio=W(this,void 0)}_computeSashLeft(e,t){const i=this.dimensions.width.read(t),n=Math.floor(this._options.splitViewDefaultRatio.read(t)*i),s=this._options.enableSplitViewResizing.read(t)?Math.floor(e*i):n,r=100;return i<=r*2?n:si-r?i-r:s}}class AO extends l.Disposable{constructor(e,t,i,n,s,r){super(),this._domNode=e,this._dimensions=t,this._enabled=i,this._boundarySashes=n,this.sashLeft=s,this._resetSash=r,this._sash=this._register(new on(this._domNode,{getVerticalSashTop:a=>0,getVerticalSashLeft:a=>this.sashLeft.get(),getVerticalSashHeight:a=>this._dimensions.height.get()},{orientation:0})),this._startSashPosition=void 0,this._register(this._sash.onDidStart(()=>{this._startSashPosition=this.sashLeft.get()})),this._register(this._sash.onDidChange(a=>{this.sashLeft.set(this._startSashPosition+(a.currentX-a.startX),void 0)})),this._register(this._sash.onDidEnd(()=>this._sash.layout())),this._register(this._sash.onDidReset(()=>this._resetSash())),this._register(he(a=>{const c=this._boundarySashes.read(a);c&&(this._sash.orthogonalEndSash=c.bottom)})),this._register(he(a=>{const c=this._enabled.read(a);this._sash.state=c?3:0,this.sashLeft.read(a),this._dimensions.height.read(a),this._sash.layout()}))}}const Tb=class Tb extends l.Disposable{constructor(){super(...arguments),this._id=++Tb.idCounter,this._onDidDispose=this._register(new l.Emitter),this.onDidDispose=this._onDidDispose.event}getId(){return this.getEditorType()+":v2:"+this._id}getVisibleColumnFromPosition(e){return this._targetEditor.getVisibleColumnFromPosition(e)}getPosition(){return this._targetEditor.getPosition()}setPosition(e,t="api"){this._targetEditor.setPosition(e,t)}revealLine(e,t=0){this._targetEditor.revealLine(e,t)}revealLineInCenter(e,t=0){this._targetEditor.revealLineInCenter(e,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealLineInCenterIfOutsideViewport(e,t)}revealLineNearTop(e,t=0){this._targetEditor.revealLineNearTop(e,t)}revealPosition(e,t=0){this._targetEditor.revealPosition(e,t)}revealPositionInCenter(e,t=0){this._targetEditor.revealPositionInCenter(e,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealPositionInCenterIfOutsideViewport(e,t)}revealPositionNearTop(e,t=0){this._targetEditor.revealPositionNearTop(e,t)}getSelection(){return this._targetEditor.getSelection()}getSelections(){return this._targetEditor.getSelections()}setSelection(e,t="api"){this._targetEditor.setSelection(e,t)}setSelections(e,t="api"){this._targetEditor.setSelections(e,t)}revealLines(e,t,i=0){this._targetEditor.revealLines(e,t,i)}revealLinesInCenter(e,t,i=0){this._targetEditor.revealLinesInCenter(e,t,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._targetEditor.revealLinesInCenterIfOutsideViewport(e,t,i)}revealLinesNearTop(e,t,i=0){this._targetEditor.revealLinesNearTop(e,t,i)}revealRange(e,t=0,i=!1,n=!0){this._targetEditor.revealRange(e,t,i,n)}revealRangeInCenter(e,t=0){this._targetEditor.revealRangeInCenter(e,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealRangeInCenterIfOutsideViewport(e,t)}revealRangeNearTop(e,t=0){this._targetEditor.revealRangeNearTop(e,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._targetEditor.revealRangeNearTopIfOutsideViewport(e,t)}revealRangeAtTop(e,t=0){this._targetEditor.revealRangeAtTop(e,t)}getSupportedActions(){return this._targetEditor.getSupportedActions()}focus(){this._targetEditor.focus()}trigger(e,t,i){this._targetEditor.trigger(e,t,i)}createDecorationsCollection(e){return this._targetEditor.createDecorationsCollection(e)}changeDecorations(e){return this._targetEditor.changeDecorations(e)}};Tb.idCounter=0;let $0=Tb;var YX=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ZX=function(o,e){return function(t,i){e(t,i,o)}};let K0=class{get editorOptions(){return this._options}constructor(e,t){this._accessibilityService=t,this._diffEditorWidth=W(this,0),this._screenReaderMode=mt(this,this._accessibilityService.onDidChangeScreenReaderOptimized,()=>this._accessibilityService.isScreenReaderOptimized()),this.couldShowInlineViewBecauseOfSize=Z(this,n=>this._options.read(n).renderSideBySide&&this._diffEditorWidth.read(n)<=this._options.read(n).renderSideBySideInlineBreakpoint),this.renderOverviewRuler=Z(this,n=>this._options.read(n).renderOverviewRuler),this.renderSideBySide=Z(this,n=>this.compactMode.read(n)&&this.shouldRenderInlineViewInSmartMode.read(n)?!1:this._options.read(n).renderSideBySide&&!(this._options.read(n).useInlineViewWhenSpaceIsLimited&&this.couldShowInlineViewBecauseOfSize.read(n)&&!this._screenReaderMode.read(n))),this.readOnly=Z(this,n=>this._options.read(n).readOnly),this.shouldRenderOldRevertArrows=Z(this,n=>!(!this._options.read(n).renderMarginRevertIcon||!this.renderSideBySide.read(n)||this.readOnly.read(n)||this.shouldRenderGutterMenu.read(n))),this.shouldRenderGutterMenu=Z(this,n=>this._options.read(n).renderGutterMenu),this.renderIndicators=Z(this,n=>this._options.read(n).renderIndicators),this.enableSplitViewResizing=Z(this,n=>this._options.read(n).enableSplitViewResizing),this.splitViewDefaultRatio=Z(this,n=>this._options.read(n).splitViewDefaultRatio),this.ignoreTrimWhitespace=Z(this,n=>this._options.read(n).ignoreTrimWhitespace),this.maxComputationTimeMs=Z(this,n=>this._options.read(n).maxComputationTime),this.showMoves=Z(this,n=>this._options.read(n).experimental.showMoves&&this.renderSideBySide.read(n)),this.isInEmbeddedEditor=Z(this,n=>this._options.read(n).isInEmbeddedEditor),this.diffWordWrap=Z(this,n=>this._options.read(n).diffWordWrap),this.originalEditable=Z(this,n=>this._options.read(n).originalEditable),this.diffCodeLens=Z(this,n=>this._options.read(n).diffCodeLens),this.accessibilityVerbose=Z(this,n=>this._options.read(n).accessibilityVerbose),this.diffAlgorithm=Z(this,n=>this._options.read(n).diffAlgorithm),this.showEmptyDecorations=Z(this,n=>this._options.read(n).experimental.showEmptyDecorations),this.onlyShowAccessibleDiffViewer=Z(this,n=>this._options.read(n).onlyShowAccessibleDiffViewer),this.compactMode=Z(this,n=>this._options.read(n).compactMode),this.trueInlineDiffRenderingEnabled=Z(this,n=>this._options.read(n).experimental.useTrueInlineView),this.useTrueInlineDiffRendering=Z(this,n=>!this.renderSideBySide.read(n)&&this.trueInlineDiffRenderingEnabled.read(n)),this.hideUnchangedRegions=Z(this,n=>this._options.read(n).hideUnchangedRegions.enabled),this.hideUnchangedRegionsRevealLineCount=Z(this,n=>this._options.read(n).hideUnchangedRegions.revealLineCount),this.hideUnchangedRegionsContextLineCount=Z(this,n=>this._options.read(n).hideUnchangedRegions.contextLineCount),this.hideUnchangedRegionsMinimumLineCount=Z(this,n=>this._options.read(n).hideUnchangedRegions.minimumLineCount),this._model=W(this,void 0),this.shouldRenderInlineViewInSmartMode=this._model.map(this,n=>nF(this,s=>{const r=n?.diff.read(s);return r?QX(r,this.trueInlineDiffRenderingEnabled.read(s)):void 0})).flatten().map(this,n=>!!n),this.inlineViewHideOriginalLineNumbers=this.compactMode;const i={...e,...OO(e,Yt)};this._options=W(this,i)}updateOptions(e){const t=OO(e,this._options.get()),i={...this._options.get(),...e,...t};this._options.set(i,void 0,{changedOptions:e})}setWidth(e){this._diffEditorWidth.set(e,void 0)}setModel(e){this._model.set(e,void 0)}};K0=YX([ZX(1,Ui)],K0);function QX(o,e){return o.mappings.every(t=>XX(t.lineRangeMapping)||JX(t.lineRangeMapping)||e&&k0(t.lineRangeMapping))}function XX(o){return o.original.length===0}function JX(o){return o.modified.length===0}function OO(o,e){return{enableSplitViewResizing:$(o.enableSplitViewResizing,e.enableSplitViewResizing),splitViewDefaultRatio:EP(o.splitViewDefaultRatio,.5,.1,.9),renderSideBySide:$(o.renderSideBySide,e.renderSideBySide),renderMarginRevertIcon:$(o.renderMarginRevertIcon,e.renderMarginRevertIcon),maxComputationTime:to(o.maxComputationTime,e.maxComputationTime,0,1073741824),maxFileSize:to(o.maxFileSize,e.maxFileSize,0,1073741824),ignoreTrimWhitespace:$(o.ignoreTrimWhitespace,e.ignoreTrimWhitespace),renderIndicators:$(o.renderIndicators,e.renderIndicators),originalEditable:$(o.originalEditable,e.originalEditable),diffCodeLens:$(o.diffCodeLens,e.diffCodeLens),renderOverviewRuler:$(o.renderOverviewRuler,e.renderOverviewRuler),diffWordWrap:Fe(o.diffWordWrap,e.diffWordWrap,["off","on","inherit"]),diffAlgorithm:Fe(o.diffAlgorithm,e.diffAlgorithm,["legacy","advanced","advanced-external","advanced-wasm"],{smart:"legacy",experimental:"advanced"}),accessibilityVerbose:$(o.accessibilityVerbose,e.accessibilityVerbose),experimental:{showMoves:$(o.experimental?.showMoves,e.experimental.showMoves),showEmptyDecorations:$(o.experimental?.showEmptyDecorations,e.experimental.showEmptyDecorations),useTrueInlineView:$(o.experimental?.useTrueInlineView,e.experimental.useTrueInlineView)},hideUnchangedRegions:{enabled:$(o.hideUnchangedRegions?.enabled??o.experimental?.collapseUnchangedRegions,e.hideUnchangedRegions.enabled),contextLineCount:to(o.hideUnchangedRegions?.contextLineCount,e.hideUnchangedRegions.contextLineCount,0,1073741824),minimumLineCount:to(o.hideUnchangedRegions?.minimumLineCount,e.hideUnchangedRegions.minimumLineCount,0,1073741824),revealLineCount:to(o.hideUnchangedRegions?.revealLineCount,e.hideUnchangedRegions.revealLineCount,0,1073741824)},isInEmbeddedEditor:$(o.isInEmbeddedEditor,e.isInEmbeddedEditor),onlyShowAccessibleDiffViewer:$(o.onlyShowAccessibleDiffViewer,e.onlyShowAccessibleDiffViewer),renderSideBySideInlineBreakpoint:to(o.renderSideBySideInlineBreakpoint,e.renderSideBySideInlineBreakpoint,0,1073741824),useInlineViewWhenSpaceIsLimited:$(o.useInlineViewWhenSpaceIsLimited,e.useInlineViewWhenSpaceIsLimited),renderGutterMenu:$(o.renderGutterMenu,e.renderGutterMenu),compactMode:$(o.compactMode,e.compactMode)}}const PO=le("IActionViewItemService");class WX{constructor(){this._providers=new Map,this._onDidChange=new l.Emitter,this.onDidChange=this._onDidChange.event}dispose(){this._onDidChange.dispose()}lookUp(e,t){return this._providers.get(this._makeKey(e,t))}_makeKey(e,t){return`${e.id}/${t instanceof ct?t.id:t}`}}fe(PO,WX,1);var kO=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},hn=function(o,e){return function(t,i){e(t,i,o)}};_.WorkbenchToolBar=class extends ph{constructor(e,t,i,n,s,r,a,c){super(e,s,{getKeyBinding:d=>r.lookupKeybinding(d.id)??void 0,...t,allowContextMenu:!0,skipTelemetry:typeof t?.telemetrySource=="string"}),this._options=t,this._menuService=i,this._contextKeyService=n,this._contextMenuService=s,this._keybindingService=r,this._commandService=a,this._sessionDisposables=this._store.add(new l.DisposableStore);const h=t?.telemetrySource;h&&this._store.add(this.actionBar.onDidRun(d=>c.publicLog2("workbenchActionExecuted",{id:d.action.id,from:h})))}setActions(e,t=[],i){this._sessionDisposables.clear();const n=e.slice(),s=t.slice(),r=[];let a=0;const c=[];let h=!1;if(this._options?.hiddenItemStrategy!==-1)for(let d=0;dg?.id)),u=this._options.overflowBehavior.maxItems-d.size;let f=0;for(let g=0;g=u&&(n[g]=void 0,c[g]=m))}}l.coalesceInPlace(n),l.coalesceInPlace(c),super.setActions(ft.clean(n),ft.join(ft.clean(c),s)),(r.length>0||n.length>0)&&this._sessionDisposables.add(R(this.getElement(),"contextmenu",d=>{const u=new Bi(j(this.getElement()),d),f=this.getItemAction(u.target);if(!f)return;u.preventDefault(),u.stopPropagation();const g=[];if(f instanceof _.MenuItemAction&&f.menuKeybinding)g.push(f.menuKeybinding);else if(!(f instanceof sa||f instanceof _h)){const p=!!this._keybindingService.lookupKeybinding(f.id);g.push(XR(this._commandService,this._keybindingService,f.id,void 0,p))}if(r.length>0){let p=!1;if(a===1&&this._options?.hiddenItemStrategy===0){p=!0;for(let b=0;bthis._menuService.resetHiddenStates(i)}))),m.length!==0&&this._contextMenuService.showContextMenu({getAnchor:()=>u,getActions:()=>m,menuId:this._options?.contextMenu,menuActionOptions:{renderShortTitle:!0,...this._options?.menuOptions},skipTelemetry:typeof this._options?.telemetrySource=="string",contextKeyService:this._contextKeyService})}))}},_.WorkbenchToolBar=kO([hn(2,Zo),hn(3,be),hn(4,nn),hn(5,xt),hn(6,zi),hn(7,Xn)],_.WorkbenchToolBar),_.MenuWorkbenchToolBar=class extends _.WorkbenchToolBar{get onDidChangeMenuItems(){return this._onDidChangeMenuItems.event}constructor(e,t,i,n,s,r,a,c,h,d,u){super(e,{resetMenu:t,...i,actionViewItemProvider:(f,g)=>{let m=d.lookUp(t,f instanceof sa?f.item.submenu.id:f.id);m||(m=i?.actionViewItemProvider);const p=m?.(f,g,u,j(e).vscodeWindowId);return p||Gy(u,f,g)}},n,s,r,a,c,h),this._onDidChangeMenuItems=this._store.add(new l.Emitter),this._container=e,this._menuOptions=i?.menuOptions,this._toolbarOptions=i?.toolbarOptions,this._menu=this._store.add(n.createMenu(t,s,{emitEventsForSubmenuChanges:!0,eventDebounceDelay:i?.eventDebounceDelay})),this._store.add(this._menu.onDidChange(()=>{this._updateToolbar(),this._onDidChangeMenuItems.fire(this)})),this._store.add(d.onDidChange(f=>{f===t&&this._updateToolbar()})),this._updateToolbar()}_updateToolbar(){const{primary:e,secondary:t}=CM(this._menu.getActions(this._menuOptions),this._toolbarOptions?.primaryGroup,this._toolbarOptions?.shouldInlineSubmenu,this._toolbarOptions?.useSeparatorsInPrimaryActions);this._container.classList.toggle("has-no-actions",e.length===0&&t.length===0),super.setActions(e,t)}setActions(){throw new l.BugIndicatingError("This toolbar is populated from a menu.")}},_.MenuWorkbenchToolBar=kO([hn(3,Zo),hn(4,be),hn(5,nn),hn(6,xt),hn(7,zi),hn(8,Xn),hn(9,PO),hn(10,me)],_.MenuWorkbenchToolBar);class G0 extends l.AbstractText{constructor(e){super(),this._textModel=e}getValueOfRange(e){return this._textModel.getValueInRange(e)}getLineLength(e){return this._textModel.getLineLength(e)}get length(){const e=this._textModel.getLineCount(),t=this._textModel.getLineLength(e);return new l.TextLength(e-1,t)}}class FO extends Jr{constructor(e){super(),this._getContext=e}runAction(e,t){const i=this._getContext();return super.runAction(e,i)}}class HX extends l.Disposable{constructor(e,t,i){super(),this._editor=e,this._domNode=t,this.itemProvider=i,this.scrollTop=mt(this,this._editor.onDidScrollChange,r=>this._editor.getScrollTop()),this.isScrollTopZero=this.scrollTop.map(r=>r===0),this.modelAttached=mt(this,this._editor.onDidChangeModel,r=>this._editor.hasModel()),this.editorOnDidChangeViewZones=Ii("onDidChangeViewZones",this._editor.onDidChangeViewZones),this.editorOnDidContentSizeChange=Ii("onDidContentSizeChange",this._editor.onDidContentSizeChange),this.domNodeSizeChanged=qr("domNodeSizeChanged"),this.views=this._register(new l.DisposableMap),this._domNode.className="gutter monaco-editor";const n=this._domNode.appendChild(_e("div.scroll-decoration",{role:"presentation",ariaHidden:"true",style:{width:"100%"}}).root),s=new ResizeObserver(()=>{nt(r=>{this.domNodeSizeChanged.trigger(r)})});s.observe(this._domNode),this._register(l.toDisposable(()=>s.disconnect())),this._register(he(r=>{n.className=this.isScrollTopZero.read(r)?"":"scroll-decoration"})),this._register(he(r=>this.render(r)))}dispose(){super.dispose(),oi(this._domNode)}render(e){if(!this.modelAttached.read(e))return;this.domNodeSizeChanged.read(e),this.editorOnDidChangeViewZones.read(e),this.editorOnDidContentSizeChange.read(e);const t=this.scrollTop.read(e),i=this._editor.getVisibleRanges(),n=new Set(this.views.keys()),s=l.OffsetRange.ofStartAndLength(0,this._domNode.clientHeight);if(!s.isEmpty)for(const r of i){const a=new l.LineRange(r.startLineNumber,r.endLineNumber+1),c=this.itemProvider.getIntersectingGutterItems(a,e);nt(h=>{for(const d of c){if(!d.range.intersect(a))continue;n.delete(d.id);let u=this.views.get(d.id);if(u)u.item.set(d,h);else{const p=document.createElement("div");this._domNode.appendChild(p);const b=W("item",d),v=this.itemProvider.createView(b,p);u=new eJ(b,v,p),this.views.set(d.id,u)}const f=d.range.startLineNumber<=this._editor.getModel().getLineCount()?this._editor.getTopForLineNumber(d.range.startLineNumber,!0)-t:d.range.startLineNumber>1?this._editor.getBottomForLineNumber(d.range.startLineNumber-1,!1)-t:0,m=(d.range.endLineNumberExclusive===1?Math.max(f,this._editor.getTopForLineNumber(d.range.startLineNumber,!1)-t):Math.max(f,this._editor.getBottomForLineNumber(d.range.endLineNumberExclusive-1,!0)-t))-f;u.domNode.style.top=`${f}px`,u.domNode.style.height=`${m}px`,u.gutterItemView.layout(l.OffsetRange.ofStartAndLength(f,m),s)}})}for(const r of n)this.views.deleteAndDispose(r)}}class eJ{constructor(e,t,i){this.item=e,this.gutterItemView=t,this.domNode=i}dispose(){this.gutterItemView.dispose(),this.domNode.remove()}}var BO=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},P_=function(o,e){return function(t,i){e(t,i,o)}};const j0=[],k_=35;let q0=class extends l.Disposable{constructor(e,t,i,n,s,r,a,c,h){super(),this._diffModel=t,this._editors=i,this._options=n,this._sashLayout=s,this._boundarySashes=r,this._instantiationService=a,this._contextKeyService=c,this._menuService=h,this._menu=this._register(this._menuService.createMenu(ct.DiffEditorHunkToolbar,this._contextKeyService)),this._actions=mt(this,this._menu.onDidChange,()=>this._menu.getActions()),this._hasActions=this._actions.map(u=>u.length>0),this._showSash=Z(this,u=>this._options.renderSideBySide.read(u)&&this._hasActions.read(u)),this.width=Z(this,u=>this._hasActions.read(u)?k_:0),this.elements=_e("div.gutter@gutter",{style:{position:"absolute",height:"100%",width:k_+"px"}},[]),this._currentDiff=Z(this,u=>{const f=this._diffModel.read(u);if(!f)return;const g=f.diff.read(u)?.mappings,m=this._editors.modifiedCursor.read(u);if(m)return g?.find(p=>p.lineRangeMapping.modified.contains(m.lineNumber))}),this._selectedDiffs=Z(this,u=>{const g=this._diffModel.read(u)?.diff.read(u);if(!g)return j0;const m=this._editors.modifiedSelections.read(u);if(m.every(C=>C.isEmpty()))return j0;const p=new l.LineRangeSet(m.map(C=>l.LineRange.fromRangeInclusive(C))),v=g.mappings.filter(C=>C.lineRangeMapping.innerChanges&&p.intersects(C.lineRangeMapping.modified)).map(C=>({mapping:C,rangeMappings:C.lineRangeMapping.innerChanges.filter(w=>m.some(S=>l.Range.areIntersecting(w.modifiedRange,S)))}));return v.length===0||v.every(C=>C.rangeMappings.length===0)?j0:v}),this._register(fX(e,this.elements.root)),this._register(R(this.elements.root,"click",()=>{this._editors.modified.focus()})),this._register(Nr(this.elements.root,{display:this._hasActions.map(u=>u?"block":"none")})),Gn(this,u=>this._showSash.read(u)?new AO(e,this._sashLayout.dimensions,this._options.enableSplitViewResizing,this._boundarySashes,Hb(this,g=>this._sashLayout.sashLeft.read(g)-k_,(g,m)=>this._sashLayout.sashLeft.set(g+k_,m)),()=>this._sashLayout.resetSash()):void 0).recomputeInitiallyAndOnChange(this._store);const d=Z(this,u=>{const f=this._diffModel.read(u);if(!f)return[];const g=f.diff.read(u);if(!g)return[];const m=this._selectedDiffs.read(u);if(m.length>0){const b=l.DetailedLineRangeMapping.fromRangeMappings(m.flatMap(v=>v.rangeMappings));return[new zO(b,!0,ct.DiffEditorSelectionToolbar,void 0,f.model.original.uri,f.model.modified.uri)]}const p=this._currentDiff.read(u);return g.mappings.map(b=>new zO(b.lineRangeMapping.withInnerChangesFromLineRanges(),b.lineRangeMapping===p?.lineRangeMapping,ct.DiffEditorHunkToolbar,void 0,f.model.original.uri,f.model.modified.uri))});this._register(new HX(this._editors.modified,this.elements.root,{getIntersectingGutterItems:(u,f)=>d.read(f),createView:(u,f)=>this._instantiationService.createInstance(Y0,u,f,this)})),this._register(R(this.elements.gutter,F.MOUSE_WHEEL,u=>{this._editors.modified.getOption(117).handleMouseWheel&&this._editors.modified.delegateScrollFromMouseWheelEvent(u)},{passive:!1}))}computeStagedValue(e){const t=e.innerChanges??[],i=new G0(this._editors.modifiedModel.get()),n=new G0(this._editors.original.getModel());return new l.TextEdit(t.map(a=>a.toTextEdit(i))).apply(n)}layout(e){this.elements.gutter.style.left=e+"px"}};q0=BO([P_(6,me),P_(7,be),P_(8,Zo)],q0);class zO{constructor(e,t,i,n,s,r){this.mapping=e,this.showAlways=t,this.menuId=i,this.rangeOverride=n,this.originalUri=s,this.modifiedUri=r}get id(){return this.mapping.modified.toString()}get range(){return this.rangeOverride??this.mapping.modified}}let Y0=class extends l.Disposable{constructor(e,t,i,n){super(),this._item=e,this._elements=_e("div.gutterItem",{style:{height:"20px",width:"34px"}},[_e("div.background@background",{},[]),_e("div.buttons@buttons",{},[])]),this._showAlways=this._item.map(this,r=>r.showAlways),this._menuId=this._item.map(this,r=>r.menuId),this._isSmall=W(this,!1),this._lastItemRange=void 0,this._lastViewRange=void 0;const s=this._register(n.createInstance(_.WorkbenchHoverDelegate,"element",{instantHover:!0},{position:{hoverPosition:1}}));this._register(wh(t,this._elements.root)),this._register(he(r=>{const a=this._showAlways.read(r);this._elements.root.classList.toggle("noTransition",!0),this._elements.root.classList.toggle("showAlways",a),setTimeout(()=>{this._elements.root.classList.toggle("noTransition",!1)},0)})),this._register(Kn((r,a)=>{this._elements.buttons.replaceChildren();const c=a.add(n.createInstance(_.MenuWorkbenchToolBar,this._elements.buttons,this._menuId.read(r),{orientation:1,hoverDelegate:s,toolbarOptions:{primaryGroup:h=>h.startsWith("primary")},overflowBehavior:{maxItems:this._isSmall.read(r)?1:3},hiddenItemStrategy:0,actionRunner:a.add(new FO(()=>{const h=this._item.read(void 0),d=h.mapping;return{mapping:d,originalWithModifiedChanges:i.computeStagedValue(d),originalUri:h.originalUri,modifiedUri:h.modifiedUri}})),menuOptions:{shouldForwardArgs:!0}}));a.add(c.onDidChangeMenuItems(()=>{this._lastItemRange&&this.layout(this._lastItemRange,this._lastViewRange)}))}))}layout(e,t){this._lastItemRange=e,this._lastViewRange=t;let i=this._elements.buttons.clientHeight;this._isSmall.set(this._item.get().mapping.original.startLineNumber===1&&e.length<30,void 0),i=this._elements.buttons.clientHeight;const n=e.length/2-i/2,s=i;let r=e.start+n;const a=l.OffsetRange.tryCreate(s,t.endExclusive-s-i),c=l.OffsetRange.tryCreate(e.start+s,e.endExclusive-i-s);c&&a&&c.start=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},iJ=function(o,e){return function(t,i){e(t,i,o)}},Z0;_.HideUnchangedRegionsFeature=(Br=class extends l.Disposable{static setBreadcrumbsSourceFactory(e){this._breadcrumbsSourceFactory.set(e,void 0)}get isUpdatingHiddenAreas(){return this._isUpdatingHiddenAreas}constructor(e,t,i,n){super(),this._editors=e,this._diffModel=t,this._options=i,this._instantiationService=n,this._modifiedOutlineSource=Gn(this,c=>{const h=this._editors.modifiedModel.read(c),d=Z0._breadcrumbsSourceFactory.read(c);return!h||!d?void 0:d(h,this._instantiationService)}),this._isUpdatingHiddenAreas=!1,this._register(this._editors.original.onDidChangeCursorPosition(c=>{if(c.reason===1)return;const h=this._diffModel.get();nt(d=>{for(const u of this._editors.original.getSelections()||[])h?.ensureOriginalLineIsVisible(u.getStartPosition().lineNumber,0,d),h?.ensureOriginalLineIsVisible(u.getEndPosition().lineNumber,0,d)})})),this._register(this._editors.modified.onDidChangeCursorPosition(c=>{if(c.reason===1)return;const h=this._diffModel.get();nt(d=>{for(const u of this._editors.modified.getSelections()||[])h?.ensureModifiedLineIsVisible(u.getStartPosition().lineNumber,0,d),h?.ensureModifiedLineIsVisible(u.getEndPosition().lineNumber,0,d)})}));const s=this._diffModel.map((c,h)=>{const d=c?.unchangedRegions.read(h)??[];return d.length===1&&d[0].modifiedLineNumber===1&&d[0].lineCount===this._editors.modifiedModel.read(h)?.getLineCount()?[]:d});this.viewZones=Z(this,c=>{const h=this._modifiedOutlineSource.read(c);if(!h)return{origViewZones:[],modViewZones:[]};const d=[],u=[],f=this._options.renderSideBySide.read(c),g=this._options.compactMode.read(c),m=s.read(c);for(let p=0;pb.getHiddenOriginalRange(w).startLineNumber-1),C=new Sh(v,12);d.push(C),c.store.add(new VO(this._editors.original,C,b,!f))}{const v=Z(this,w=>b.getHiddenModifiedRange(w).startLineNumber-1),C=new Sh(v,12);u.push(C),c.store.add(new VO(this._editors.modified,C,b))}}else{{const v=Z(this,w=>b.getHiddenOriginalRange(w).startLineNumber-1),C=new Sh(v,24);d.push(C),c.store.add(new UO(this._editors.original,C,b,b.originalUnchangedRange,!f,h,w=>this._diffModel.get().ensureModifiedLineIsVisible(w,2,void 0),this._options))}{const v=Z(this,w=>b.getHiddenModifiedRange(w).startLineNumber-1),C=new Sh(v,24);u.push(C),c.store.add(new UO(this._editors.modified,C,b,b.modifiedUnchangedRange,!1,h,w=>this._diffModel.get().ensureModifiedLineIsVisible(w,2,void 0),this._options))}}}return{origViewZones:d,modViewZones:u}});const r={description:"unchanged lines",className:"diff-unchanged-lines",isWholeLine:!0},a={description:"Fold Unchanged",glyphMarginHoverMessage:new DS(void 0,{isTrusted:!0,supportThemeIcons:!0}).appendMarkdown(l.localize(140,"Fold Unchanged Region")),glyphMarginClassName:"fold-unchanged "+_.ThemeIcon.asClassName(l.Codicon.fold),zIndex:10001};this._register(M_(this._editors.original,Z(this,c=>{const h=s.read(c),d=h.map(u=>({range:u.originalUnchangedRange.toInclusiveRange(),options:r}));for(const u of h)u.shouldHideControls(c)&&d.push({range:l.Range.fromPositions(new l.Position(u.originalLineNumber,1)),options:a});return d}))),this._register(M_(this._editors.modified,Z(this,c=>{const h=s.read(c),d=h.map(u=>({range:u.modifiedUnchangedRange.toInclusiveRange(),options:r}));for(const u of h)u.shouldHideControls(c)&&d.push({range:l.LineRange.ofLength(u.modifiedLineNumber,1).toInclusiveRange(),options:a});return d}))),this._register(he(c=>{const h=s.read(c);this._isUpdatingHiddenAreas=!0;try{this._editors.original.setHiddenAreas(h.map(d=>d.getHiddenOriginalRange(c).toInclusiveRange()).filter(l.isDefined)),this._editors.modified.setHiddenAreas(h.map(d=>d.getHiddenModifiedRange(c).toInclusiveRange()).filter(l.isDefined))}finally{this._isUpdatingHiddenAreas=!1}})),this._register(this._editors.modified.onMouseUp(c=>{if(!c.event.rightButton&&c.target.position&&c.target.element?.className.includes("fold-unchanged")){const h=c.target.position.lineNumber,d=this._diffModel.get();if(!d)return;const u=d.unchangedRegions.get().find(f=>f.modifiedUnchangedRange.contains(h));if(!u)return;u.collapseAll(void 0),c.event.stopPropagation(),c.event.preventDefault()}})),this._register(this._editors.original.onMouseUp(c=>{if(!c.event.rightButton&&c.target.position&&c.target.element?.className.includes("fold-unchanged")){const h=c.target.position.lineNumber,d=this._diffModel.get();if(!d)return;const u=d.unchangedRegions.get().find(f=>f.originalUnchangedRange.contains(h));if(!u)return;u.collapseAll(void 0),c.event.stopPropagation(),c.event.preventDefault()}}))}},Z0=Br,Br._breadcrumbsSourceFactory=W(Br,()=>({dispose(){},getBreadcrumbItems(e,t){return[]},getAt:()=>[]})),Br),_.HideUnchangedRegionsFeature=Z0=tJ([iJ(3,me)],_.HideUnchangedRegionsFeature);class VO extends y0{constructor(e,t,i,n=!1){const s=_e("div.diff-hidden-lines-widget");super(e,t,s.root),this._unchangedRegion=i,this._hide=n,this._nodes=_e("div.diff-hidden-lines-compact",[_e("div.line-left",[]),_e("div.text@text",[]),_e("div.line-right",[])]),s.root.appendChild(this._nodes.root),this._hide&&this._nodes.root.replaceChildren(),this._register(he(r=>{if(!this._hide){const a=this._unchangedRegion.getHiddenModifiedRange(r).length,c=l.localize(141,"{0} hidden lines",a);this._nodes.text.innerText=c}}))}}class UO extends y0{constructor(e,t,i,n,s,r,a,c){const h=_e("div.diff-hidden-lines-widget");super(e,t,h.root),this._editor=e,this._unchangedRegion=i,this._unchangedRegionRange=n,this._hide=s,this._modifiedOutlineSource=r,this._revealModifiedHiddenLine=a,this._options=c,this._nodes=_e("div.diff-hidden-lines",[_e("div.top@top",{title:l.localize(142,"Click or drag to show more above")}),_e("div.center@content",{style:{display:"flex"}},[_e("div@first",{style:{display:"flex",justifyContent:"center",alignItems:"center",flexShrink:"0"}},[Q("a",{title:l.localize(143,"Show Unchanged Region"),role:"button",onclick:()=>{this._unchangedRegion.showAll(void 0)}},...vr("$(unfold)"))]),_e("div@others",{style:{display:"flex",justifyContent:"center",alignItems:"center"}})]),_e("div.bottom@bottom",{title:l.localize(144,"Click or drag to show more below"),role:"button"})]),h.root.appendChild(this._nodes.root),this._hide?oi(this._nodes.first):this._register(Nr(this._nodes.first,{width:Mr(this._editor).layoutInfoContentLeft})),this._register(he(u=>{const f=this._unchangedRegion.visibleLineCountTop.read(u)+this._unchangedRegion.visibleLineCountBottom.read(u)===this._unchangedRegion.lineCount;this._nodes.bottom.classList.toggle("canMoveTop",!f),this._nodes.bottom.classList.toggle("canMoveBottom",this._unchangedRegion.visibleLineCountBottom.read(u)>0),this._nodes.top.classList.toggle("canMoveTop",this._unchangedRegion.visibleLineCountTop.read(u)>0),this._nodes.top.classList.toggle("canMoveBottom",!f);const g=this._unchangedRegion.isDragged.read(u),m=this._editor.getDomNode();m&&(m.classList.toggle("draggingUnchangedRegion",!!g),g==="top"?(m.classList.toggle("canMoveTop",this._unchangedRegion.visibleLineCountTop.read(u)>0),m.classList.toggle("canMoveBottom",!f)):g==="bottom"?(m.classList.toggle("canMoveTop",!f),m.classList.toggle("canMoveBottom",this._unchangedRegion.visibleLineCountBottom.read(u)>0)):(m.classList.toggle("canMoveTop",!1),m.classList.toggle("canMoveBottom",!1)))}));const d=this._editor;this._register(R(this._nodes.top,"mousedown",u=>{if(u.button!==0)return;this._nodes.top.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),u.preventDefault();const f=u.clientY;let g=!1;const m=this._unchangedRegion.visibleLineCountTop.get();this._unchangedRegion.isDragged.set("top",void 0);const p=j(this._nodes.top),b=R(p,"mousemove",C=>{const S=C.clientY-f;g=g||Math.abs(S)>2;const L=Math.round(S/d.getOption(75)),D=Math.max(0,Math.min(m+L,this._unchangedRegion.getMaxVisibleLineCountTop()));this._unchangedRegion.visibleLineCountTop.set(D,void 0)}),v=R(p,"mouseup",C=>{g||this._unchangedRegion.showMoreAbove(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0),this._nodes.top.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),this._unchangedRegion.isDragged.set(void 0,void 0),b.dispose(),v.dispose()})})),this._register(R(this._nodes.bottom,"mousedown",u=>{if(u.button!==0)return;this._nodes.bottom.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),u.preventDefault();const f=u.clientY;let g=!1;const m=this._unchangedRegion.visibleLineCountBottom.get();this._unchangedRegion.isDragged.set("bottom",void 0);const p=j(this._nodes.bottom),b=R(p,"mousemove",C=>{const S=C.clientY-f;g=g||Math.abs(S)>2;const L=Math.round(S/d.getOption(75)),D=Math.max(0,Math.min(m-L,this._unchangedRegion.getMaxVisibleLineCountBottom())),x=this._unchangedRegionRange.endLineNumberExclusive>d.getModel().getLineCount()?d.getContentHeight():d.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.visibleLineCountBottom.set(D,void 0);const I=this._unchangedRegionRange.endLineNumberExclusive>d.getModel().getLineCount()?d.getContentHeight():d.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);d.setScrollTop(d.getScrollTop()+(I-x))}),v=R(p,"mouseup",C=>{if(this._unchangedRegion.isDragged.set(void 0,void 0),!g){const w=d.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.showMoreBelow(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0);const S=d.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);d.setScrollTop(d.getScrollTop()+(S-w))}this._nodes.bottom.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),b.dispose(),v.dispose()})})),this._register(he(u=>{const f=[];if(!this._hide){const g=i.getHiddenModifiedRange(u).length,m=l.localize(145,"{0} hidden lines",g),p=Q("span",{title:l.localize(146,"Double click to unfold")},m);p.addEventListener("dblclick",C=>{C.button===0&&(C.preventDefault(),this._unchangedRegion.showAll(void 0))}),f.push(p);const b=this._unchangedRegion.getHiddenModifiedRange(u),v=this._modifiedOutlineSource.getBreadcrumbItems(b,u);if(v.length>0){f.push(Q("span",void 0,"  |  "));for(let C=0;C{this._revealModifiedHiddenLine(w.startLineNumber)}}}}oi(this._nodes.others,...f)}))}}const Q0=[];class nJ extends l.Disposable{constructor(e,t,i,n){super(),this._editors=e,this._diffModel=t,this._options=i,this._widget=n,this._selectedDiffs=Z(this,s=>{const a=this._diffModel.read(s)?.diff.read(s);if(!a)return Q0;const c=this._editors.modifiedSelections.read(s);if(c.every(f=>f.isEmpty()))return Q0;const h=new l.LineRangeSet(c.map(f=>l.LineRange.fromRangeInclusive(f))),u=a.mappings.filter(f=>f.lineRangeMapping.innerChanges&&h.intersects(f.lineRangeMapping.modified)).map(f=>({mapping:f,rangeMappings:f.lineRangeMapping.innerChanges.filter(g=>c.some(m=>l.Range.areIntersecting(g.modifiedRange,m)))}));return u.length===0||u.every(f=>f.rangeMappings.length===0)?Q0:u}),this._register(Kn((s,r)=>{if(!this._options.shouldRenderOldRevertArrows.read(s))return;const a=this._diffModel.read(s),c=a?.diff.read(s);if(!a||!c||a.movedTextToCompare.read(s))return;const h=[],d=this._selectedDiffs.read(s),u=new Set(d.map(f=>f.mapping));if(d.length>0){const f=this._editors.modifiedSelections.read(s),g=r.add(new F_(f[f.length-1].positionLineNumber,this._widget,d.flatMap(m=>m.rangeMappings),!0));this._editors.modified.addGlyphMarginWidget(g),h.push(g)}for(const f of c.mappings)if(!u.has(f)&&!f.lineRangeMapping.modified.isEmpty&&f.lineRangeMapping.innerChanges){const g=r.add(new F_(f.lineRangeMapping.modified.startLineNumber,this._widget,f.lineRangeMapping,!1));this._editors.modified.addGlyphMarginWidget(g),h.push(g)}r.add(l.toDisposable(()=>{for(const f of h)this._editors.modified.removeGlyphMarginWidget(f)}))}))}}const Nb=class Nb extends l.Disposable{getId(){return this._id}constructor(e,t,i,n){super(),this._lineNumber=e,this._widget=t,this._diffs=i,this._revertSelection=n,this._id=`revertButton${Nb.counter++}`,this._domNode=_e("div.revertButton",{title:this._revertSelection?l.localize(151,"Revert Selected Changes"):l.localize(152,"Revert Change")},[Gc(l.Codicon.arrowRight)]).root,this._register(R(this._domNode,F.MOUSE_DOWN,s=>{s.button!==2&&(s.stopPropagation(),s.preventDefault())})),this._register(R(this._domNode,F.MOUSE_UP,s=>{s.stopPropagation(),s.preventDefault()})),this._register(R(this._domNode,F.CLICK,s=>{this._diffs instanceof l.LineRangeMapping?this._widget.revert(this._diffs):this._widget.revertRangeMappings(this._diffs),s.stopPropagation(),s.preventDefault()}))}getDomNode(){return this._domNode}getPosition(){return{lane:l.GlyphMarginLane.Right,range:{startColumn:1,startLineNumber:this._lineNumber,endColumn:1,endLineNumber:this._lineNumber},zIndex:10001}}};Nb.counter=0;let F_=Nb;var sJ=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},uf=function(o,e){return function(t,i){e(t,i,o)}};_.DiffEditorWidget=class extends $0{get onDidContentSizeChange(){return this._editors.onDidContentSizeChange}constructor(e,t,i,n,s,r,a,c){super(),this._domElement=e,this._parentContextKeyService=n,this._parentInstantiationService=s,this._codeEditorService=r,this._accessibilitySignalService=a,this._editorProgressService=c,this.elements=_e("div.monaco-diff-editor.side-by-side",{style:{position:"relative",height:"100%"}},[_e("div.editor.original@original",{style:{position:"absolute",height:"100%"}}),_e("div.editor.modified@modified",{style:{position:"absolute",height:"100%"}}),_e("div.accessibleDiffViewer@accessibleDiffViewer",{style:{position:"absolute",height:"100%"}})]),this._diffModelSrc=this._register(Wb(this,void 0)),this._diffModel=Z(this,S=>this._diffModelSrc.read(S)?.object),this.onDidChangeModel=l.Event.fromObservableLight(this._diffModel),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._domElement)),this._instantiationService=this._register(this._parentInstantiationService.createChild(new Oc([be,this._contextKeyService]))),this._boundarySashes=W(this,void 0),this._accessibleDiffViewerShouldBeVisible=W(this,!1),this._accessibleDiffViewerVisible=Z(this,S=>this._options.onlyShowAccessibleDiffViewer.read(S)?!0:this._accessibleDiffViewerShouldBeVisible.read(S)),this._movedBlocksLinesPart=W(this,void 0),this._layoutInfo=Z(this,S=>{const L=this._rootSizeObserver.width.read(S),D=this._rootSizeObserver.height.read(S);this._rootSizeObserver.automaticLayout?this.elements.root.style.height="100%":this.elements.root.style.height=D+"px";const x=this._sash.read(S),I=this._gutter.read(S),T=I?.width.read(S)??0,M=this._overviewRulerPart.read(S)?.width??0;let O,P,k,U,B;if(!!x){const X=x.sashLeft.read(S),re=this._movedBlocksLinesPart.read(S)?.width.read(S)??0;O=0,P=X-T-re,B=X-T,k=X,U=L-k-M}else{B=0;const X=this._options.inlineViewHideOriginalLineNumbers.read(S);O=T,X?P=0:P=Math.max(5,this._editors.originalObs.layoutInfoDecorationsLeft.read(S)),k=T+P,U=L-k-M}return this.elements.original.style.left=O+"px",this.elements.original.style.width=P+"px",this._editors.original.layout({width:P,height:D},!0),I?.layout(B),this.elements.modified.style.left=k+"px",this.elements.modified.style.width=U+"px",this._editors.modified.layout({width:U,height:D},!0),{modifiedEditor:this._editors.modified.getLayoutInfo(),originalEditor:this._editors.original.getLayoutInfo()}}),this._diffValue=this._diffModel.map((S,L)=>S?.diff.read(L)),this.onDidUpdateDiff=l.Event.fromObservableLight(this._diffValue),this._codeEditorService.willCreateDiffEditor(),this._contextKeyService.createKey("isInDiffEditor",!0),this._domElement.appendChild(this.elements.root),this._register(l.toDisposable(()=>this.elements.root.remove())),this._rootSizeObserver=this._register(new dO(this.elements.root,t.dimension)),this._rootSizeObserver.setAutomaticLayout(t.automaticLayout??!1),this._options=this._instantiationService.createInstance(K0,t),this._register(he(S=>{this._options.setWidth(this._rootSizeObserver.width.read(S))})),this._contextKeyService.createKey(_.EditorContextKeys.isEmbeddedDiffEditor.key,!1),this._register(qs(_.EditorContextKeys.isEmbeddedDiffEditor,this._contextKeyService,S=>this._options.isInEmbeddedEditor.read(S))),this._register(qs(_.EditorContextKeys.comparingMovedCode,this._contextKeyService,S=>!!this._diffModel.read(S)?.movedTextToCompare.read(S))),this._register(qs(_.EditorContextKeys.diffEditorRenderSideBySideInlineBreakpointReached,this._contextKeyService,S=>this._options.couldShowInlineViewBecauseOfSize.read(S))),this._register(qs(_.EditorContextKeys.diffEditorInlineMode,this._contextKeyService,S=>!this._options.renderSideBySide.read(S))),this._register(qs(_.EditorContextKeys.hasChanges,this._contextKeyService,S=>(this._diffModel.read(S)?.diff.read(S)?.mappings.length??0)>0)),this._editors=this._register(this._instantiationService.createInstance(U0,this.elements.original,this.elements.modified,this._options,i,(S,L,D,x)=>this._createInnerEditor(S,L,D,x))),this._register(qs(_.EditorContextKeys.diffEditorOriginalWritable,this._contextKeyService,S=>this._options.originalEditable.read(S))),this._register(qs(_.EditorContextKeys.diffEditorModifiedWritable,this._contextKeyService,S=>!this._options.readOnly.read(S))),this._register(qs(_.EditorContextKeys.diffEditorOriginalUri,this._contextKeyService,S=>this._diffModel.read(S)?.model.original.uri.toString()??"")),this._register(qs(_.EditorContextKeys.diffEditorModifiedUri,this._contextKeyService,S=>this._diffModel.read(S)?.model.modified.uri.toString()??"")),this._overviewRulerPart=Gn(this,S=>this._options.renderOverviewRuler.read(S)?this._instantiationService.createInstance(Po(df),this._editors,this.elements.root,this._diffModel,this._rootSizeObserver.width,this._rootSizeObserver.height,this._layoutInfo.map(L=>L.modifiedEditor)):void 0).recomputeInitiallyAndOnChange(this._store);const h={height:this._rootSizeObserver.height,width:this._rootSizeObserver.width.map((S,L)=>S-(this._overviewRulerPart.read(L)?.width??0))};this._sashLayout=new qX(this._options,h),this._sash=Gn(this,S=>{const L=this._options.renderSideBySide.read(S);return this.elements.root.classList.toggle("side-by-side",L),L?new AO(this.elements.root,h,this._options.enableSplitViewResizing,this._boundarySashes,this._sashLayout.sashLeft,()=>this._sashLayout.resetSash()):void 0}).recomputeInitiallyAndOnChange(this._store);const d=Gn(this,S=>this._instantiationService.createInstance(Po(_.HideUnchangedRegionsFeature),this._editors,this._diffModel,this._options)).recomputeInitiallyAndOnChange(this._store);Gn(this,S=>this._instantiationService.createInstance(Po($X),this._editors,this._diffModel,this._options,this)).recomputeInitiallyAndOnChange(this._store);const u=new Set,f=new Set;let g=!1;const m=Gn(this,S=>this._instantiationService.createInstance(Po(P0),j(this._domElement),this._editors,this._diffModel,this._options,this,()=>g||d.read(void 0).isUpdatingHiddenAreas,u,f)).recomputeInitiallyAndOnChange(this._store),p=Z(this,S=>{const L=m.read(S).viewZones.read(S).orig,D=d.read(S).viewZones.read(S).origViewZones;return L.concat(D)}),b=Z(this,S=>{const L=m.read(S).viewZones.read(S).mod,D=d.read(S).viewZones.read(S).modViewZones;return L.concat(D)});this._register(A_(this._editors.original,p,S=>{g=S},u));let v;this._register(A_(this._editors.modified,b,S=>{g=S,g?v=vh.capture(this._editors.modified):(v?.restore(this._editors.modified),v=void 0)},f)),this._accessibleDiffViewer=Gn(this,S=>this._instantiationService.createInstance(Po(pl),this.elements.accessibleDiffViewer,this._accessibleDiffViewerVisible,(L,D)=>this._accessibleDiffViewerShouldBeVisible.set(L,D),this._options.onlyShowAccessibleDiffViewer.map(L=>!L),this._rootSizeObserver.width,this._rootSizeObserver.height,this._diffModel.map((L,D)=>L?.diff.read(D)?.mappings.map(x=>x.lineRangeMapping)),new IX(this._editors))).recomputeInitiallyAndOnChange(this._store);const C=this._accessibleDiffViewerVisible.map(S=>S?"hidden":"visible");this._register(Nr(this.elements.modified,{visibility:C})),this._register(Nr(this.elements.original,{visibility:C})),this._createDiffEditorContributions(),this._codeEditorService.addDiffEditor(this),this._register(l.toDisposable(()=>{this._codeEditorService.removeDiffEditor(this)})),this._gutter=Gn(this,S=>this._options.shouldRenderGutterMenu.read(S)?this._instantiationService.createInstance(Po(q0),this.elements.root,this._diffModel,this._editors,this._options,this._sashLayout,this._boundarySashes):void 0),this._register(ed(this._layoutInfo)),Gn(this,S=>new(Po(Lh))(this.elements.root,this._diffModel,this._layoutInfo.map(L=>L.originalEditor),this._layoutInfo.map(L=>L.modifiedEditor),this._editors)).recomputeInitiallyAndOnChange(this._store,S=>{this._movedBlocksLinesPart.set(S,void 0)}),this._register(l.Event.runAndSubscribe(this._editors.modified.onDidChangeCursorPosition,S=>this._handleCursorPositionChange(S,!0))),this._register(l.Event.runAndSubscribe(this._editors.original.onDidChangeCursorPosition,S=>this._handleCursorPositionChange(S,!1)));const w=this._diffModel.map(this,(S,L)=>{if(S)return S.diff.read(L)===void 0&&!S.isDiffUpToDate.read(L)});this._register(Kn((S,L)=>{if(w.read(S)===!0){const D=this._editorProgressService.show(!0,1e3);L.add(l.toDisposable(()=>D.done()))}})),this._register(Kn((S,L)=>{L.add(new(Po(nJ))(this._editors,this._diffModel,this._options,this))})),this._register(Kn((S,L)=>{const D=this._diffModel.read(S);if(D)for(const x of[D.model.original,D.model.modified])L.add(x.onWillDispose(I=>{l.onUnexpectedError(new l.BugIndicatingError("TextModel got disposed before DiffEditorWidget model got reset")),this.setModel(null)}))})),this._register(he(S=>{this._options.setModel(this._diffModel.read(S))}))}_createInnerEditor(e,t,i,n){return e.createInstance(_.CodeEditorWidget,t,i,n)}_createDiffEditorContributions(){const e=Ql.getDiffEditorContributions();for(const t of e)try{this._register(this._instantiationService.createInstance(t.ctor,this))}catch(i){l.onUnexpectedError(i)}}get _targetEditor(){return this._editors.modified}getEditorType(){return _d.IDiffEditor}layout(e){this._rootSizeObserver.observe(e)}hasTextFocus(){return this._editors.original.hasTextFocus()||this._editors.modified.hasTextFocus()}saveViewState(){const e=this._editors.original.saveViewState(),t=this._editors.modified.saveViewState();return{original:e,modified:t,modelState:this._diffModel.get()?.serializeState()}}restoreViewState(e){if(e&&e.original&&e.modified){const t=e;this._editors.original.restoreViewState(t.original),this._editors.modified.restoreViewState(t.modified),t.modelState&&this._diffModel.get()?.restoreSerializedState(t.modelState)}}handleInitialized(){this._editors.original.handleInitialized(),this._editors.modified.handleInitialized()}createViewModel(e){return this._instantiationService.createInstance(A0,e,this._options)}getModel(){return this._diffModel.get()?.model??null}setModel(e){const t=e?"model"in e?O_.create(e).createNewRef(this):O_.create(this.createViewModel(e),this):null;this.setDiffModel(t)}setDiffModel(e,t){const i=this._diffModel.get();!e&&i&&this._accessibleDiffViewer.get().close(),this._diffModel.get()!==e?.object&&Uf(t,n=>{const s=e?.object;mt.batchEventsGlobally(n,()=>{this._editors.original.setModel(s?s.model.original:null),this._editors.modified.setModel(s?s.model.modified:null)});const r=this._diffModelSrc.get()?.createNewRef(this);this._diffModelSrc.set(e?.createNewRef(this),n),setTimeout(()=>{r?.dispose()},0)})}updateOptions(e){this._options.updateOptions(e)}getContainerDomNode(){return this._domElement}getOriginalEditor(){return this._editors.original}getModifiedEditor(){return this._editors.modified}getLineChanges(){const e=this._diffModel.get()?.diff.get();return e?oJ(e):null}getDiffComputationResult(){const e=this._diffModel.get()?.diff.get();return e?{changes:this.getLineChanges(),changes2:e.mappings.map(t=>t.lineRangeMapping),identical:e.identical,quitEarly:e.quitEarly}:null}revert(e){const t=this._diffModel.get();!t||!t.isDiffUpToDate.get()||(this._editors.modified.pushUndoStop(),this._editors.modified.executeEdits("diffEditor",[{range:e.modified.toExclusiveRange(),text:t.model.original.getValueInRange(e.original.toExclusiveRange())}]),this._editors.modified.pushUndoStop())}revertRangeMappings(e){const t=this._diffModel.get();if(!t||!t.isDiffUpToDate.get())return;const i=e.map(n=>({range:n.modifiedRange,text:t.model.original.getValueInRange(n.originalRange)}));this._editors.modified.pushUndoStop(),this._editors.modified.executeEdits("diffEditor",i),this._editors.modified.pushUndoStop()}revertFocusedRangeMappings(){const e=this._diffModel.get();if(!e||!e.isDiffUpToDate.get())return;const t=this._diffModel.get()?.diff.get()?.mappings;if(!t||t.length===0)return;const i=this._editors.modified;if(!i.hasTextFocus())return;const n=i.getPosition().lineNumber,s=i.getSelection(),r=l.LineRange.fromRange(s||new l.Range(n,0,n,0)),a=t.filter(c=>c.lineRangeMapping.modified.intersect(r));i.pushUndoStop(),i.executeEdits("diffEditor",a.map(c=>({range:c.lineRangeMapping.modified.toExclusiveRange(),text:e.model.original.getValueInRange(c.lineRangeMapping.original.toExclusiveRange())}))),i.pushUndoStop()}_goTo(e){this._editors.modified.setPosition(new l.Position(e.lineRangeMapping.modified.startLineNumber,1)),this._editors.modified.revealRangeInCenter(e.lineRangeMapping.modified.toExclusiveRange())}goToDiff(e){const t=this._diffModel.get()?.diff.get()?.mappings;if(!t||t.length===0)return;const i=this._editors.modified.getPosition().lineNumber;let n;e==="next"?this._editors.modified.getModel().getLineCount()===i?n=t[0]:n=t.find(r=>r.lineRangeMapping.modified.startLineNumber>i)??t[0]:n=l.findLast(t,s=>s.lineRangeMapping.modified.startLineNumber{const t=e.diff.get()?.mappings;!t||t.length===0||this._goTo(t[0])})}accessibleDiffViewerNext(){this._accessibleDiffViewer.get().next()}accessibleDiffViewerPrev(){this._accessibleDiffViewer.get().prev()}async waitForDiff(){const e=this._diffModel.get();e&&await e.waitForDiff()}mapToOtherSide(){const e=this._editors.modified.hasWidgetFocus(),t=e?this._editors.modified:this._editors.original,i=e?this._editors.original:this._editors.modified;let n;const s=t.getSelection();if(s){const r=this._diffModel.get()?.diff.get()?.mappings.map(a=>e?a.lineRangeMapping.flip():a.lineRangeMapping);if(r){const a=fO(s.getStartPosition(),r),c=fO(s.getEndPosition(),r);n=l.Range.plusRange(a,c)}}return{destination:i,destinationSelection:n}}switchSide(){const{destination:e,destinationSelection:t}=this.mapToOtherSide();e.focus(),t&&e.setSelection(t)}exitCompareMove(){const e=this._diffModel.get();e&&e.movedTextToCompare.set(void 0,void 0)}collapseAllUnchangedRegions(){const e=this._diffModel.get()?.unchangedRegions.get();e&&nt(t=>{for(const i of e)i.collapseAll(t)})}showAllUnchangedRegions(){const e=this._diffModel.get()?.unchangedRegions.get();e&&nt(t=>{for(const i of e)i.showAll(t)})}_handleCursorPositionChange(e,t){if(e?.reason===3){const i=this._diffModel.get()?.diff.get()?.mappings.find(n=>t?n.lineRangeMapping.modified.contains(e.position.lineNumber):n.lineRangeMapping.original.contains(e.position.lineNumber));i?.lineRangeMapping.modified.isEmpty?this._accessibilitySignalService.playSignal(xn.diffLineDeleted,{source:"diffEditor.cursorPositionChanged"}):i?.lineRangeMapping.original.isEmpty?this._accessibilitySignalService.playSignal(xn.diffLineInserted,{source:"diffEditor.cursorPositionChanged"}):i&&this._accessibilitySignalService.playSignal(xn.diffLineModified,{source:"diffEditor.cursorPositionChanged"})}}},_.DiffEditorWidget=sJ([uf(3,be),uf(4,me),uf(5,pt),uf(6,Xa),uf(7,d_)],_.DiffEditorWidget);function oJ(o){return o.mappings.map(e=>{const t=e.lineRangeMapping;let i,n,s,r,a=t.innerChanges;return t.original.isEmpty?(i=t.original.startLineNumber-1,n=0,a=void 0):(i=t.original.startLineNumber,n=t.original.endLineNumberExclusive-1),t.modified.isEmpty?(s=t.modified.startLineNumber-1,r=0,a=void 0):(s=t.modified.startLineNumber,r=t.modified.endLineNumberExclusive-1),{originalStartLineNumber:i,originalEndLineNumber:n,modifiedStartLineNumber:s,modifiedEndLineNumber:r,charChanges:a?.map(c=>({originalStartLineNumber:c.originalRange.startLineNumber,originalStartColumn:c.originalRange.startColumn,originalEndLineNumber:c.originalRange.endLineNumber,originalEndColumn:c.originalRange.endColumn,modifiedStartLineNumber:c.modifiedRange.startLineNumber,modifiedStartColumn:c.modifiedRange.startColumn,modifiedEndLineNumber:c.modifiedRange.endLineNumber,modifiedEndColumn:c.modifiedRange.endColumn}))}})}function Ys(o){return o&&typeof o.getEditorType=="function"?o.getEditorType()===_d.ICodeEditor:!1}function $O(o){return o&&typeof o.getEditorType=="function"?o.getEditorType()===_d.IDiffEditor:!1}function rJ(o){return!!o&&typeof o=="object"&&typeof o.onDidChangeActiveEditor=="function"}function aJ(o){return Ys(o)?o:$O(o)?o.getModifiedEditor():rJ(o)&&Ys(o.activeCodeEditor)?o.activeCodeEditor:null}var lJ=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},KO=function(o,e){return function(t,i){e(t,i,o)}},B_;let X0=(Ol=class{constructor(e,t){this._configurationService=e,this._languageService=t}async renderCodeBlock(e,t,i){const n=Ys(i.context)?i.context:void 0;let s;e?s=this._languageService.getLanguageIdByLanguageName(e):n&&(s=n.getModel()?.getLanguageId()),s||(s=pn);const r=await W6(this._languageService,t,s),a=B_._ttpTokenizer?B_._ttpTokenizer.createHTML(r)??r:r,c=document.createElement("span");c.innerHTML=a;const h=c.querySelector(".monaco-tokenized-source");return Ve(h)?(Ot(h,this.getFontInfo(n)),c):document.createElement("span")}getFontInfo(e){return e?e.getOption(59):eV({fontFamily:this._configurationService.getValue("editor").fontFamily},1)}},B_=Ol,Ol._ttpTokenizer=lo("tokenizeToString",{createHTML(e){return e}}),Ol);X0=B_=lJ([KO(0,Ge),KO(1,yt)],X0);var J0=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Pe=function(o,e){return function(t,i){e(t,i,o)}};let cJ=0,GO=!1;function hJ(o){if(!o){if(GO)return;GO=!0}Yz(o||Ae.document.body)}let z_=class extends _.CodeEditorWidget{constructor(e,t,i,n,s,r,a,c,h,d,u,f,g,m,p){const b={...t};b.ariaLabel=b.ariaLabel||BL.editorViewAccessibleLabel,super(e,b,{},i,n,s,r,h,d,u,f,g,p),c instanceof Ch?this._standaloneKeybindingService=c:this._standaloneKeybindingService=null,hJ(b.ariaContainerElement),T9((v,C)=>i.createInstance(_.WorkbenchHoverDelegate,v,{instantHover:C},{})),N9(a),m.setDefaultCodeBlockRenderer(i.createInstance(X0))}addCommand(e,t,i){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;const n="DYNAMIC_"+ ++cJ,s=de.deserialize(i);return this._standaloneKeybindingService.addDynamicKeybinding(n,e,t,s),n}createContextKey(e,t){return this._contextKeyService.createKey(e,t)}addAction(e){if(typeof e.id!="string"||typeof e.label!="string"||typeof e.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),l.Disposable.None;const t=e.id,i=e.label,n=de.and(de.equals("editorId",this.getId()),de.deserialize(e.precondition)),s=e.keybindings,r=de.and(n,de.deserialize(e.keybindingContext)),a=e.contextMenuGroupId||null,c=e.contextMenuOrder||0,h=(g,...m)=>Promise.resolve(e.run(this,...m)),d=new l.DisposableStore,u=this.getId()+":"+t;if(d.add(Ut.registerCommand(u,h)),a){const g={command:{id:u,title:i},when:n,group:a,order:c};d.add(Qn.appendMenuItem(ct.EditorContext,g))}if(Array.isArray(s))for(const g of s)d.add(this._standaloneKeybindingService.addDynamicKeybinding(u,g,h,r));const f=new zT(u,i,i,void 0,n,(...g)=>Promise.resolve(e.run(this,...g)),this._contextKeyService);return this._actions.set(t,f),d.add(l.toDisposable(()=>{this._actions.delete(t)})),d}_triggerCommand(e,t){if(this._codeEditorService instanceof Lp)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(e,t)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(e,t)}};z_=J0([Pe(2,me),Pe(3,pt),Pe(4,zi),Pe(5,be),Pe(6,kc),Pe(7,xt),Pe(8,_i),Pe(9,yn),Pe(10,Ui),Pe(11,ms),Pe(12,ze),Pe(13,Pu),Pe(14,Na)],z_);let W0=class extends z_{constructor(e,t,i,n,s,r,a,c,h,d,u,f,g,m,p,b,v,C){const w={...t};R_(u,w,!1);const S=h.registerEditorContainer(e);typeof w.theme=="string"&&h.setTheme(w.theme),typeof w.autoDetectHighContrast<"u"&&h.setAutoDetectHighContrast(!!w.autoDetectHighContrast);const L=w.model;delete w.model,super(e,w,i,n,s,r,a,c,h,d,f,p,b,v,C),this._configurationService=u,this._standaloneThemeService=h,this._register(S);let D;if(typeof L>"u"){const x=m.getLanguageIdByMimeType(w.language)||w.language||pn;D=jO(g,m,w.value||"",x,void 0),this._ownsModel=!0}else D=L,this._ownsModel=!1;if(this._attachModel(D),D){const x={oldModelUrl:null,newModelUrl:D.uri};this._onDidChangeModel.fire(x)}}updateOptions(e){R_(this._configurationService,e,!1),typeof e.theme=="string"&&this._standaloneThemeService.setTheme(e.theme),typeof e.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(!!e.autoDetectHighContrast),super.updateOptions(e)}_postDetachModelCleanup(e){super._postDetachModelCleanup(e),e&&this._ownsModel&&(e.dispose(),this._ownsModel=!1)}};W0=J0([Pe(2,me),Pe(3,pt),Pe(4,zi),Pe(5,be),Pe(6,kc),Pe(7,xt),Pe(8,Tn),Pe(9,yn),Pe(10,Ge),Pe(11,Ui),Pe(12,ri),Pe(13,yt),Pe(14,ms),Pe(15,ze),Pe(16,Pu),Pe(17,Na)],W0);let H0=class extends _.DiffEditorWidget{constructor(e,t,i,n,s,r,a,c,h,d,u,f){const g={...t};R_(c,g,!0);const m=r.registerEditorContainer(e);typeof g.theme=="string"&&r.setTheme(g.theme),typeof g.autoDetectHighContrast<"u"&&r.setAutoDetectHighContrast(!!g.autoDetectHighContrast),super(e,g,{},n,i,s,f,d),this._configurationService=c,this._standaloneThemeService=r,this._register(m)}updateOptions(e){R_(this._configurationService,e,!0),typeof e.theme=="string"&&this._standaloneThemeService.setTheme(e.theme),typeof e.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(!!e.autoDetectHighContrast),super.updateOptions(e)}_createInnerEditor(e,t,i){return e.createInstance(z_,t,i)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(e,t,i){return this.getModifiedEditor().addCommand(e,t,i)}createContextKey(e,t){return this.getModifiedEditor().createContextKey(e,t)}addAction(e){return this.getModifiedEditor().addAction(e)}};H0=J0([Pe(2,me),Pe(3,be),Pe(4,pt),Pe(5,Tn),Pe(6,yn),Pe(7,Ge),Pe(8,nn),Pe(9,d_),Pe(10,Ip),Pe(11,Xa)],H0);function jO(o,e,t,i,n){if(t=t||"",!i){const s=t.indexOf(` +`);let r=t;return s!==-1&&(r=t.substring(0,s)),qO(o,t,e.createByFilepathOrFirstLine(n||null,r),n)}return qO(o,t,e.createById(i),n)}function qO(o,e,t,i){return o.createModel(e,t,i)}E("multiDiffEditor.headerBackground",{dark:"#262626",light:"tab.inactiveBackground",hcDark:"tab.inactiveBackground",hcLight:"tab.inactiveBackground"},l.localize(158,"The background color of the diff editor's header")),E("multiDiffEditor.background",vn,l.localize(159,"The background color of the multi file diff editor")),E("multiDiffEditor.border",{dark:"sideBarSectionHeader.border",light:"#cccccc",hcDark:"sideBarSectionHeader.border",hcLight:"#cccccc"},l.localize(160,"The border color of the multi file diff editor"));var dJ=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},YO=function(o,e){return function(t,i){e(t,i,o)}};class uJ{constructor(e,t){this.viewModel=e,this.deltaScrollVertical=t}getId(){return this.viewModel}}let eD=class extends l.Disposable{constructor(e,t,i,n,s){super(),this._container=e,this._overflowWidgetsDomNode=t,this._workbenchUIElementFactory=i,this._instantiationService=n,this._viewModel=W(this,void 0),this._collapsed=Z(this,c=>this._viewModel.read(c)?.collapsed.read(c)),this._editorContentHeight=W(this,500),this.contentHeight=Z(this,c=>(this._collapsed.read(c)?0:this._editorContentHeight.read(c))+this._outerEditorHeight),this._modifiedContentWidth=W(this,0),this._modifiedWidth=W(this,0),this._originalContentWidth=W(this,0),this._originalWidth=W(this,0),this.maxScroll=Z(this,c=>{const h=this._modifiedContentWidth.read(c)-this._modifiedWidth.read(c),d=this._originalContentWidth.read(c)-this._originalWidth.read(c);return h>d?{maxScroll:h,width:this._modifiedWidth.read(c)}:{maxScroll:d,width:this._originalWidth.read(c)}}),this._elements=_e("div.multiDiffEntry",[_e("div.header@header",[_e("div.header-content",[_e("div.collapse-button@collapseButton"),_e("div.file-path",[_e("div.title.modified.show-file-icons@primaryPath",[]),_e("div.status.deleted@status",["R"]),_e("div.title.original.show-file-icons@secondaryPath",[])]),_e("div.actions@actions")])]),_e("div.editorParent",[_e("div.editorContainer@editor")])]),this.editor=this._register(this._instantiationService.createInstance(_.DiffEditorWidget,this._elements.editor,{overflowWidgetsDomNode:this._overflowWidgetsDomNode,fixedOverflowWidgets:!0},{})),this.isModifedFocused=Mr(this.editor.getModifiedEditor()).isFocused,this.isOriginalFocused=Mr(this.editor.getOriginalEditor()).isFocused,this.isFocused=Z(this,c=>this.isModifedFocused.read(c)||this.isOriginalFocused.read(c)),this._resourceLabel=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.primaryPath)):void 0,this._resourceLabel2=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.secondaryPath)):void 0,this._dataStore=this._register(new l.DisposableStore),this._headerHeight=40,this._lastScrollTop=-1,this._isSettingScrollTop=!1;const r=this._register(new v_(this._elements.collapseButton,{}));this._register(he(c=>{r.element.className="",r.icon=this._collapsed.read(c)?l.Codicon.chevronRight:l.Codicon.chevronDown})),this._register(r.onDidClick(()=>{this._viewModel.get()?.collapsed.set(!this._collapsed.get(),void 0)})),this._workbenchUIElementFactory.headerClickToCollapse&&(this._elements.header.tabIndex=0,this._elements.header.setAttribute("role","button"),this._register(R(this._elements.header,F.CLICK,c=>{const h=c.target;h instanceof Element&&(h.closest(".actions")||h.closest(".collapse-button")||this._viewModel.get()?.collapsed.set(!this._collapsed.get(),void 0))})),this._register(R(this._elements.header,F.KEY_DOWN,c=>{if(c.key==="Enter"||c.key===" "){const h=c.target;if(h instanceof Element&&(h.closest(".actions")||h.closest(".collapse-button")))return;c.preventDefault(),this._viewModel.get()?.collapsed.set(!this._collapsed.get(),void 0)}}))),this._register(he(c=>{const h=this._collapsed.read(c);this._elements.editor.style.display=h?"none":"block",this._workbenchUIElementFactory.headerClickToCollapse&&this._elements.header.setAttribute("aria-expanded",String(!h))})),this._register(this.editor.getModifiedEditor().onDidLayoutChange(c=>{const h=this.editor.getModifiedEditor().getLayoutInfo().contentWidth;this._modifiedWidth.set(h,void 0)})),this._register(this.editor.getOriginalEditor().onDidLayoutChange(c=>{const h=this.editor.getOriginalEditor().getLayoutInfo().contentWidth;this._originalWidth.set(h,void 0)})),this._register(this.editor.onDidContentSizeChange(c=>{Xh(h=>{this._editorContentHeight.set(c.contentHeight,h),this._modifiedContentWidth.set(this.editor.getModifiedEditor().getContentWidth(),h),this._originalContentWidth.set(this.editor.getOriginalEditor().getContentWidth(),h)})})),this._register(this.editor.getOriginalEditor().onDidScrollChange(c=>{if(this._isSettingScrollTop||!c.scrollTopChanged||!this._data)return;const h=c.scrollTop-this._lastScrollTop;this._data.deltaScrollVertical(h)})),this._register(he(c=>{const h=this._viewModel.read(c)?.isActive.read(c);this._elements.root.classList.toggle("active",h)})),this._container.appendChild(this._elements.root),this._outerEditorHeight=this._headerHeight,this._contextKeyService=this._register(s.createScoped(this._elements.actions));const a=this._register(this._instantiationService.createChild(new Oc([be,this._contextKeyService])));this._register(a.createInstance(_.MenuWorkbenchToolBar,this._elements.actions,ct.MultiDiffEditorFileToolbar,{actionRunner:this._register(new FO(()=>this._viewModel.get()?.modifiedUri??this._viewModel.get()?.originalUri)),menuOptions:{shouldForwardArgs:!0},toolbarOptions:{primaryGroup:c=>c.startsWith("navigation")},actionViewItemProvider:(c,h)=>Gy(a,c,h)}))}setScrollLeft(e){this._modifiedContentWidth.get()-this._modifiedWidth.get()>this._originalContentWidth.get()-this._originalWidth.get()?this.editor.getModifiedEditor().setScrollLeft(e):this.editor.getOriginalEditor().setScrollLeft(e)}setData(e){this._data=e;function t(n){return{...n,scrollBeyondLastLine:!1,hideUnchangedRegions:{enabled:!0},scrollbar:{vertical:"hidden",horizontal:"hidden",handleMouseWheel:!1,useShadows:!1},renderOverviewRuler:!1,fixedOverflowWidgets:!0,overviewRulerBorder:!1}}if(!e){Xh(n=>{this._viewModel.set(void 0,n),this.editor.setDiffModel(null,n),this._dataStore.clear()});return}const i=e.viewModel.documentDiffItem;if(Xh(n=>{this._resourceLabel?.setUri(e.viewModel.modifiedUri??e.viewModel.originalUri,{strikethrough:e.viewModel.modifiedUri===void 0});let s=!1,r=!1,a=!1,c="";e.viewModel.modifiedUri&&e.viewModel.originalUri&&e.viewModel.modifiedUri.path!==e.viewModel.originalUri.path?(c="R",s=!0):e.viewModel.modifiedUri?e.viewModel.originalUri||(c="A",a=!0):(c="D",r=!0),this._elements.status.classList.toggle("renamed",s),this._elements.status.classList.toggle("deleted",r),this._elements.status.classList.toggle("added",a),this._elements.status.innerText=c,this._resourceLabel2?.setUri(s?e.viewModel.originalUri:void 0,{strikethrough:!0}),this._dataStore.clear(),this._viewModel.set(e.viewModel,n),this.editor.setDiffModel(e.viewModel.diffEditorViewModelRef,n),this.editor.updateOptions(t(i.options??{}))}),i.onOptionsDidChange&&this._dataStore.add(i.onOptionsDidChange(()=>{this.editor.updateOptions(t(i.options??{}))})),e.viewModel.isAlive.recomputeInitiallyAndOnChange(this._dataStore,n=>{n||this.setData(void 0)}),e.viewModel.documentDiffItem.contextKeys)for(const[n,s]of Object.entries(e.viewModel.documentDiffItem.contextKeys))this._contextKeyService.createKey(n,s)}render(e,t,i,n){this._elements.root.style.visibility="visible",this._elements.root.style.top=`${e.start}px`,this._elements.root.style.height=`${e.length}px`,this._elements.root.style.width=`${t}px`,this._elements.root.style.position="absolute";const s=e.length-this._headerHeight,r=Math.max(0,Math.min(n.start-e.start,s));this._elements.header.style.transform=`translateY(${r}px)`,Xh(a=>{this.editor.layout({width:t-16-2,height:e.length-this._outerEditorHeight})});try{this._isSettingScrollTop=!0,this._lastScrollTop=i,this.editor.getOriginalEditor().setScrollTop(i)}finally{this._isSettingScrollTop=!1}this._elements.header.classList.toggle("shadow",r>0||i>0),this._elements.header.classList.toggle("collapsed",r===s)}hide(){this._elements.root.style.top="-100000px",this._elements.root.style.visibility="hidden"}};eD=dJ([YO(3,me),YO(4,be)],eD);class fJ{constructor(e){this._create=e,this._unused=new Set,this._used=new Set,this._itemData=new Map}getUnusedObj(e){let t;if(this._unused.size===0)t=this._create(e),this._itemData.set(t,e);else{const i=[...this._unused.values()];t=i.find(n=>this._itemData.get(n).getId()===e.getId())??i[0],this._unused.delete(t),this._itemData.set(t,e),t.setData(e)}return this._used.add(t),{object:t,dispose:()=>{this._used.delete(t),this._unused.size>5?t.dispose():this._unused.add(t)}}}dispose(){for(const e of this._used)e.dispose();for(const e of this._unused)e.dispose();this._used.clear(),this._unused.clear()}}var gJ=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ZO=function(o,e){return function(t,i){e(t,i,o)}};let tD=class extends l.Disposable{constructor(e,t,i,n,s,r){super(),this._element=e,this._dimension=t,this._viewModel=i,this._workbenchUIElementFactory=n,this._parentContextKeyService=s,this._parentInstantiationService=r,this._scrollableElements=_e("div.scrollContent",[_e("div@content",{style:{overflow:"hidden"}}),_e("div.monaco-editor@overflowWidgetsDomNode",{})]),this._scrollable=this._register(new mc({forceIntegerValues:!1,scheduleAtNextAnimationFrame:h=>Ti(j(this._element),h),smoothScrollDuration:100})),this._scrollableElement=this._register(new Xg(this._scrollableElements.root,{vertical:1,horizontal:1,useShadows:!1},this._scrollable)),this._elements=_e("div.monaco-component.multiDiffEditor",{},[_e("div",{},[this._scrollableElement.getDomNode()]),_e("div.placeholder@placeholder",{},[_e("div")])]),this._sizeObserver=this._register(new dO(this._element,void 0)),this._objectPool=this._register(new fJ(h=>{const d=this._instantiationService.createInstance(eD,this._scrollableElements.content,this._scrollableElements.overflowWidgetsDomNode,this._workbenchUIElementFactory);return d.setData(h),d})),this.scrollTop=mt(this,this._scrollableElement.onScroll,()=>this._scrollableElement.getScrollPosition().scrollTop),this.scrollLeft=mt(this,this._scrollableElement.onScroll,()=>this._scrollableElement.getScrollPosition().scrollLeft),this._viewItemsInfo=Z(this,h=>{const d=this._viewModel.read(h);if(!d)return{items:[],getItem:m=>{throw new l.BugIndicatingError}};const u=d.items.read(h),f=new Map;return{items:u.map(m=>{const p=h.store.add(new pJ(m,this._objectPool,this.scrollLeft,v=>{this._scrollableElement.setScrollPosition({scrollTop:this._scrollableElement.getScrollPosition().scrollTop+v})})),b=this._lastDocStates?.[p.getKey()];return b&&nt(v=>{p.setViewState(b,v)}),f.set(m,p),p}),getItem:m=>f.get(m)}}),this._viewItems=this._viewItemsInfo.map(this,h=>h.items),this._spaceBetweenPx=0,this._totalHeight=this._viewItems.map(this,(h,d)=>h.reduce((u,f)=>u+f.contentHeight.read(d)+this._spaceBetweenPx,0)),this.activeControl=Z(this,h=>{const d=this._viewModel.read(h)?.activeDiffItem.read(h);return d?this._viewItemsInfo.read(h).getItem(d).template.read(h)?.editor:void 0}),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._element)),this._instantiationService=this._register(this._parentInstantiationService.createChild(new Oc([be,this._contextKeyService]))),this._contextKeyService.createKey(_.EditorContextKeys.inMultiDiffEditor.key,!0),this._lastDocStates={},this._register(Kn((h,d)=>{const u=this._viewModel.read(h);if(u&&u.contextKeys)for(const[f,g]of Object.entries(u.contextKeys)){const m=this._contextKeyService.createKey(f,void 0);m.set(g),d.add(l.toDisposable(()=>m.reset()))}}));const a=this._parentContextKeyService.createKey(_.EditorContextKeys.multiDiffEditorAllCollapsed.key,!1);this._register(he(h=>{const d=this._viewModel.read(h);if(d){const u=d.items.read(h).every(f=>f.collapsed.read(h));a.set(u)}})),this._register(he(h=>{const d=this._dimension.read(h);this._sizeObserver.observe(d)}));const c=Z(h=>{if(this._viewItems.read(h).length>0)return;const u=this._viewModel.read(h);return!u||u.isLoading.read(h)?l.localize(161,"Loading..."):l.localize(162,"No Changed Files")});this._register(he(h=>{const d=c.read(h);this._elements.placeholder.innerText=d??"",this._elements.placeholder.classList.toggle("visible",!!d)})),this._scrollableElements.content.style.position="relative",this._register(he(h=>{const d=this._sizeObserver.height.read(h);this._scrollableElements.root.style.height=`${d}px`;const u=this._totalHeight.read(h);this._scrollableElements.content.style.height=`${u}px`;const f=this._sizeObserver.width.read(h);let g=f;const m=this._viewItems.read(h),p=l.findFirstMax(m,l.compareBy(b=>b.maxScroll.read(h).maxScroll,l.numberComparator));if(p){const b=p.maxScroll.read(h);g=f+b.maxScroll}this._scrollableElement.setScrollDimensions({width:f,height:d,scrollHeight:u,scrollWidth:g})})),e.replaceChildren(this._elements.root),this._register(l.toDisposable(()=>{e.replaceChildren()})),this._register(he(h=>{const d=this._viewModel.read(h);if(d&&!d.isLoading.read(h)){if(d.items.read(h).length===0||d.activeDiffItem.read(h))return;this.goToNextChange()}})),this._register(this._register(he(h=>{Xh(d=>{this.render(h)})})))}reveal(e,t){const i=this._viewItems.get(),n=i.findIndex(h=>h.viewModel.originalUri?.toString()===e.original?.toString()&&h.viewModel.modifiedUri?.toString()===e.modified?.toString());if(n===-1)throw new l.BugIndicatingError("Resource not found in diff editor");const s=i[n];this._viewModel.get().activeDiffItem.setCache(s.viewModel,void 0);let r=0;for(let h=0;hc.viewModel===i):-1;if(n===-1){this._goToFile(0,"first");return}const s=t[n];s.viewModel.collapsed.get()&&s.viewModel.collapsed.set(!1,void 0);const r=s.template.get()?.editor;if(r?.getDiffComputationResult()?.changes2?.length){const c=r.getModifiedEditor().getPosition()?.lineNumber||1,h=r.getDiffComputationResult().changes2;if(e==="next"?h.some(u=>u.modified.startLineNumber>c):h.some(u=>u.modified.endLineNumberExclusive<=c)){r.goToDiff(e);return}}const a=(n+(e==="next"?1:-1)+t.length)%t.length;this._goToFile(a,e==="next"?"first":"last")}_goToFile(e,t){const i=this._viewItems.get()[e];i.viewModel.collapsed.get()&&i.viewModel.collapsed.set(!1,void 0),this.reveal({original:i.viewModel.originalUri,modified:i.viewModel.modifiedUri});const n=i.template.get()?.editor;if(n?.getDiffComputationResult()?.changes2?.length)if(t==="first")n.revealFirstDiff();else{const s=n.getDiffComputationResult().changes2.at(-1),r=n.getModifiedEditor();r.setPosition({lineNumber:s.modified.startLineNumber,column:1}),r.revealLineInCenter(s.modified.startLineNumber)}n?.focus()}render(e){const t=this.scrollTop.read(e);let i=0,n=0,s=0;const r=this._sizeObserver.height.read(e),a=l.OffsetRange.ofStartAndLength(t,r),c=this._sizeObserver.width.read(e);for(const h of this._viewItems.read(e)){const d=h.contentHeight.read(e),u=Math.min(d,r),f=l.OffsetRange.ofStartAndLength(n,u),g=l.OffsetRange.ofStartAndLength(s,d);if(g.isBefore(a))i-=d-u,h.hide();else if(g.isAfter(a))h.hide();else{const m=Math.max(0,Math.min(a.start-g.start,d-u));i-=m;const p=l.OffsetRange.ofStartAndLength(t+i,r);h.render(f,m,c,p)}n+=u+this._spaceBetweenPx,s+=d+this._spaceBetweenPx}this._scrollableElements.content.style.transform=`translateY(${-(t+i)}px)`}};tD=gJ([ZO(4,be),ZO(5,me)],tD);function mJ(o,e){const t=o.getModel(),i=o.createDecorationsCollection([{range:e,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{o.getModel()===t&&i.clear()},350)}class pJ extends l.Disposable{constructor(e,t,i,n){super(),this.viewModel=e,this._objectPool=t,this._scrollLeft=i,this._deltaScrollVertical=n,this._templateRef=this._register(Wb(this,void 0)),this.contentHeight=Z(this,s=>this._templateRef.read(s)?.object.contentHeight?.read(s)??this.viewModel.lastTemplateData.read(s).contentHeight),this.maxScroll=Z(this,s=>this._templateRef.read(s)?.object.maxScroll.read(s)??{maxScroll:0,scrollWidth:0}),this.template=Z(this,s=>this._templateRef.read(s)?.object),this._isHidden=W(this,!1),this._isFocused=Z(this,s=>this.template.read(s)?.isFocused.read(s)??!1),this.viewModel.setIsFocused(this._isFocused,void 0),this._register(he(s=>{const r=this._scrollLeft.read(s);this._templateRef.read(s)?.object.setScrollLeft(r)})),this._register(he(s=>{const r=this._templateRef.read(s);!r||!this._isHidden.read(s)||r.object.isFocused.read(s)||this._clear()}))}dispose(){this._clear(),super.dispose()}toString(){return`VirtualViewItem(${this.viewModel.documentDiffItem.modified?.uri.toString()})`}getKey(){return this.viewModel.getKey()}setViewState(e,t){this.viewModel.collapsed.set(e.collapsed,t),this._updateTemplateData(t);const i=this.viewModel.lastTemplateData.get(),n=e.selections?.map(l.Selection.liftSelection);this.viewModel.lastTemplateData.set({...i,selections:n},t);const s=this._templateRef.get();s&&n&&s.object.editor.setSelections(n)}_updateTemplateData(e){const t=this._templateRef.get();t&&this.viewModel.lastTemplateData.set({contentHeight:t.object.contentHeight.get(),selections:t.object.editor.getSelections()??void 0},e)}_clear(){const e=this._templateRef.get();e&&nt(t=>{this._updateTemplateData(t),e.object.hide(),this._templateRef.set(void 0,t)})}hide(){this._isHidden.set(!0,void 0)}render(e,t,i,n){this._isHidden.set(!1,void 0);let s=this._templateRef.get();if(!s){s=this._objectPool.getUnusedObj(new uJ(this.viewModel,this._deltaScrollVertical)),this._templateRef.set(s,void 0);const r=this.viewModel.lastTemplateData.get().selections;r&&s.object.editor.setSelections(r)}s.object.render(e,i,t,n)}}var _J=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},bJ=function(o,e){return function(t,i){e(t,i,o)}};let iD=class extends l.Disposable{constructor(e,t,i){super(),this._element=e,this._workbenchUIElementFactory=t,this._instantiationService=i,this._dimension=W(this,void 0),this._viewModel=W(this,void 0),this._widgetImpl=Z(this,n=>n.store.add(this._instantiationService.createInstance(Po(tD),this._element,this._dimension,this._viewModel,this._workbenchUIElementFactory))),this._register(ed(this._widgetImpl))}};iD=_J([bJ(2,me)],iD);function CJ(o,e,t){return J.initialize(t||{}).createInstance(W0,o,e)}function vJ(o){return J.get(pt).onCodeEditorAdd(t=>{o(t)})}function wJ(o){return J.get(pt).onDiffEditorAdd(t=>{o(t)})}function SJ(){return J.get(pt).listCodeEditors()}function yJ(){return J.get(pt).listDiffEditors()}function LJ(o,e,t){return J.initialize(t||{}).createInstance(H0,o,e)}function DJ(o,e){const t=J.initialize(e||{});return new iD(o,{},t)}function xJ(o){if(typeof o.id!="string"||typeof o.run!="function")throw new Error("Invalid command descriptor, `id` and `run` are required properties!");return Ut.registerCommand(o.id,o.run)}function EJ(o){if(typeof o.id!="string"||typeof o.label!="string"||typeof o.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");const e=de.deserialize(o.precondition),t=(n,...s)=>ao.runEditorCommand(n,s,e,(r,a,c)=>Promise.resolve(o.run(a,...c))),i=new l.DisposableStore;if(i.add(Ut.registerCommand(o.id,t)),o.contextMenuGroupId){const n={command:{id:o.id,title:o.label},when:e,group:o.contextMenuGroupId,order:o.contextMenuOrder||0};i.add(Qn.appendMenuItem(ct.EditorContext,n))}if(Array.isArray(o.keybindings)){const n=J.get(xt);if(!(n instanceof Ch))console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService");else{const s=de.and(e,de.deserialize(o.keybindingContext));i.add(n.addDynamicKeybindings(o.keybindings.map(r=>({keybinding:r,command:o.id,when:s}))))}}return i}function IJ(o){return QO([o])}function QO(o){const e=J.get(xt);return e instanceof Ch?e.addDynamicKeybindings(o.map(t=>({keybinding:t.keybinding,command:t.command,commandArgs:t.commandArgs,when:de.deserialize(t.when)}))):(console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),l.Disposable.None)}function TJ(o,e,t){const i=J.get(yt),n=i.getLanguageIdByMimeType(e)||e;return jO(J.get(ri),i,o,n,t)}function NJ(o,e){const t=J.get(yt),i=t.getLanguageIdByMimeType(e)||e||pn;o.setLanguage(t.createById(i))}function RJ(o,e,t){o&&J.get(xr).changeOne(e,o.uri,t)}function MJ(o){J.get(xr).changeAll(o,[])}function AJ(o){return J.get(xr).read(o)}function OJ(o){return J.get(xr).onMarkerChanged(o)}function PJ(o){return J.get(ri).getModel(o)}function kJ(){return J.get(ri).getModels()}function FJ(o){return J.get(ri).onModelAdded(o)}function BJ(o){return J.get(ri).onModelRemoved(o)}function zJ(o){return J.get(ri).onModelLanguageChanged(t=>{o({model:t.model,oldLanguage:t.oldLanguageId})})}function VJ(o){return _z(J.get(ri),J.get(fd),o)}function UJ(o,e){const t=J.get(yt),i=J.get(Tn);return zC.colorizeElement(i,t,o,e).then(()=>{i.registerEditorContainer(o)})}function $J(o,e,t){const i=J.get(yt);return J.get(Tn).registerEditorContainer(Ae.document.body),zC.colorize(i,o,e,t)}function KJ(o,e,t=4){return J.get(Tn).registerEditorContainer(Ae.document.body),zC.colorizeModelLine(o,e,t)}function GJ(o){const e=l.TokenizationRegistry.get(o);return e||{getInitialState:()=>Hl,tokenize:(t,i,n)=>OC(o,n)}}function jJ(o,e){l.TokenizationRegistry.getOrCreate(e);const t=GJ(e),i=l.splitLines(o),n=[];let s=t.getInitialState();for(let r=0,a=i.length;r{if(!i)return null;const s=t.options?.selection;let r;return s&&typeof s.endLineNumber=="number"&&typeof s.endColumn=="number"?r=s:s&&(r={lineNumber:s.startLineNumber,column:s.startColumn}),await o.openCodeEditor(i,t.resource,r)?i:null})}function WJ(){return{create:CJ,getEditors:SJ,getDiffEditors:yJ,onDidCreateEditor:vJ,onDidCreateDiffEditor:wJ,createDiffEditor:LJ,addCommand:xJ,addEditorAction:EJ,addKeybindingRule:IJ,addKeybindingRules:QO,createModel:TJ,setModelLanguage:NJ,setModelMarkers:RJ,getModelMarkers:AJ,removeAllMarkers:MJ,onDidChangeMarkers:OJ,getModels:kJ,getModel:PJ,onDidCreateModel:FJ,onWillDisposeModel:BJ,onDidChangeModelLanguage:zJ,createWebWorker:VJ,colorizeElement:UJ,colorize:$J,colorizeModelLine:KJ,tokenize:jJ,defineTheme:qJ,setTheme:YJ,remeasureFonts:ZJ,registerCommand:QJ,registerLinkOpener:XJ,registerEditorOpener:JJ,AccessibilitySupport:l.AccessibilitySupport,ContentWidgetPositionPreference:l.ContentWidgetPositionPreference,CursorChangeReason:l.CursorChangeReason,DefaultEndOfLine:l.DefaultEndOfLine,EditorAutoIndentStrategy:l.EditorAutoIndentStrategy,EditorOption:l.EditorOption,EndOfLinePreference:l.EndOfLinePreference,EndOfLineSequence:l.EndOfLineSequence,MinimapPosition:l.MinimapPosition,MinimapSectionHeaderStyle:l.MinimapSectionHeaderStyle,MouseTargetType:l.MouseTargetType,OverlayWidgetPositionPreference:l.OverlayWidgetPositionPreference,OverviewRulerLane:l.OverviewRulerLane$1,GlyphMarginLane:l.GlyphMarginLane$1,RenderLineNumbersType:l.RenderLineNumbersType,RenderMinimap:l.RenderMinimap,ScrollbarVisibility:l.ScrollbarVisibility,ScrollType:l.ScrollType,TextEditorCursorBlinkingStyle:l.TextEditorCursorBlinkingStyle,TextEditorCursorStyle:l.TextEditorCursorStyle,TrackedRangeStickiness:l.TrackedRangeStickiness,WrappingIndent:l.WrappingIndent,InjectedTextCursorStops:l.InjectedTextCursorStops$1,PositionAffinity:l.PositionAffinity,ShowLightbulbIconMode:l.ShowLightbulbIconMode,TextDirection:l.TextDirection$1,ConfigurationChangedEvent:ND,BareFontInfo:Ur,FontInfo:Af,TextModelResolvedOptions:l.TextModelResolvedOptions,FindMatch:l.FindMatch,ApplyUpdateResult:Kh,EditorZoom:eo,createMultiFileDiffEditor:DJ,EditorType:_d,EditorOptions:Fi}}function HJ(o,e){if(!e||!Array.isArray(e))return!1;for(const t of e)if(!o(t))return!1;return!0}function V_(o,e){return typeof o=="boolean"?o:e}function XO(o,e){return typeof o=="string"?o:e}function eW(o){const e={};for(const t of o)e[t]=!0;return e}function JO(o,e=!1){e&&(o=o.map(function(i){return i.toLowerCase()}));const t=eW(o);return e?function(i){return t[i.toLowerCase()]!==void 0&&t.hasOwnProperty(i.toLowerCase())}:function(i){return t[i]!==void 0&&t.hasOwnProperty(i)}}function nD(o,e,t){e=e.replace(/@@/g,"");let i=0,n;do n=!1,e=e.replace(/@(\w+)/g,function(r,a){n=!0;let c="";if(typeof o[a]=="string")c=o[a];else if(o[a]&&o[a]instanceof RegExp)c=o[a].source;else throw o[a]===void 0?je(o,"language definition does not contain attribute '"+a+"', used at: "+e):je(o,"attribute reference '"+a+"' must be a string, used at: "+e);return la(c)?"":"(?:"+c+")"}),i++;while(n&&i<5);e=e.replace(/\x01/g,"@");const s=(o.ignoreCase?"i":"")+(o.unicode?"u":"");if(t&&e.match(/\$[sS](\d\d?)/g)){let a=null,c=null;return h=>(c&&a===h||(a=h,c=new RegExp(Bz(o,e,h),s)),c)}return new RegExp(e,s)}function tW(o,e,t,i){if(i<0)return o;if(i=100){i=i-100;const n=t.split(".");if(n.unshift(t),i=0&&(i.tokenSubst=!0),typeof t.bracket=="string")if(t.bracket==="@open")i.bracket=1;else if(t.bracket==="@close")i.bracket=-1;else throw je(o,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+e);if(t.next){if(typeof t.next!="string")throw je(o,"the next state must be a string value in rule: "+e);{let n=t.next;if(!/^(@pop|@push|@popall)$/.test(n)&&(n[0]==="@"&&(n=n.substr(1)),n.indexOf("$")<0&&!zz(o,Ho(o,n,"",[],""))))throw je(o,"the next state '"+t.next+"' is not defined in rule: "+e);i.next=n}}return typeof t.goBack=="number"&&(i.goBack=t.goBack),typeof t.switchTo=="string"&&(i.switchTo=t.switchTo),typeof t.log=="string"&&(i.log=t.log),typeof t.nextEmbedded=="string"&&(i.nextEmbedded=t.nextEmbedded,o.usesEmbedded=!0),i}}else if(Array.isArray(t)){const i=[];for(let n=0,s=t.length;n0&&i[0]==="^",this.name=this.name+": "+i,this.regex=nD(e,"^(?:"+(this.matchOnlyAtLineStart?i.substr(1):i)+")",!0)}setAction(e,t){this.action=sD(e,this.name,t)}resolveRegex(e){return this.regex instanceof RegExp?this.regex:this.regex(e)}}function WO(o,e){if(!e||typeof e!="object")throw new Error("Monarch: expecting a language definition object");const t={languageId:o,includeLF:V_(e.includeLF,!1),noThrow:!1,maxStack:100,start:typeof e.start=="string"?e.start:null,ignoreCase:V_(e.ignoreCase,!1),unicode:V_(e.unicode,!1),tokenPostfix:XO(e.tokenPostfix,"."+o),defaultToken:XO(e.defaultToken,"source"),usesEmbedded:!1,stateNames:{},tokenizer:{},brackets:[]},i=e;i.languageId=o,i.includeLF=t.includeLF,i.ignoreCase=t.ignoreCase,i.unicode=t.unicode,i.noThrow=t.noThrow,i.usesEmbedded=t.usesEmbedded,i.stateNames=e.tokenizer,i.defaultToken=t.defaultToken;function n(r,a,c){for(const h of c){let d=h.include;if(d){if(typeof d!="string")throw je(t,"an 'include' attribute must be a string at: "+r);if(d[0]==="@"&&(d=d.substr(1)),!e.tokenizer[d])throw je(t,"include target '"+d+"' is not defined at: "+r);n(r+"."+d,a,e.tokenizer[d])}else{const u=new nW(r);if(Array.isArray(h)&&h.length>=1&&h.length<=3)if(u.setRegex(i,h[0]),h.length>=3)if(typeof h[1]=="string")u.setAction(i,{token:h[1],next:h[2]});else if(typeof h[1]=="object"){const f=h[1];f.next=h[2],u.setAction(i,f)}else throw je(t,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+r);else u.setAction(i,h[1]);else{if(!h.regex)throw je(t,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+r);h.name&&typeof h.name=="string"&&(u.name=h.name),h.matchOnlyAtStart&&(u.matchOnlyAtLineStart=V_(h.matchOnlyAtLineStart,!1)),u.setRegex(i,h.regex),u.setAction(i,h.action)}a.push(u)}}}if(!e.tokenizer||typeof e.tokenizer!="object")throw je(t,"a language definition must define the 'tokenizer' attribute as an object");t.tokenizer=[];for(const r in e.tokenizer)if(e.tokenizer.hasOwnProperty(r)){t.start||(t.start=r);const a=e.tokenizer[r];t.tokenizer[r]=new Array,n("tokenizer."+r,t.tokenizer[r],a)}if(t.usesEmbedded=i.usesEmbedded,e.brackets){if(!Array.isArray(e.brackets))throw je(t,"the 'brackets' attribute must be defined as an array")}else e.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];const s=[];for(const r of e.brackets){let a=r;if(a&&Array.isArray(a)&&a.length===3&&(a={token:a[2],open:a[0],close:a[1]}),a.open===a.close)throw je(t,"open and close brackets in a 'brackets' attribute must be different: "+a.open+` + hint: use the 'bracket' attribute if matching on equal brackets is required.`);if(typeof a.open=="string"&&typeof a.token=="string"&&typeof a.close=="string")s.push({token:a.token+t.tokenPostfix,open:co(t,a.open),close:co(t,a.close)});else throw je(t,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return t.brackets=s,t.noThrow=!0,t}function sW(o){Jl.registerLanguage(o)}function oW(){let o=[];return o=o.concat(Jl.getLanguages()),o}function rW(o){return J.get(yt).languageIdCodec.encodeLanguageId(o)}function aW(o,e){return J.withServices(()=>{const i=J.get(yt).onDidRequestRichLanguageFeatures(n=>{n===o&&(i.dispose(),e())});return i})}function lW(o,e){return J.withServices(()=>{const i=J.get(yt).onDidRequestBasicLanguageFeatures(n=>{n===o&&(i.dispose(),e())});return i})}function cW(o,e){if(!J.get(yt).isRegisteredLanguageId(o))throw new Error(`Cannot set configuration for unknown language ${o}`);return J.get(ms).register(o,e,100)}class hW{constructor(e,t){this._languageId=e,this._actual=t}dispose(){}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,i){if(typeof this._actual.tokenize=="function")return ff.adaptTokenize(this._languageId,this._actual,e,i);throw new Error("Not supported!")}tokenizeEncoded(e,t,i){const n=this._actual.tokenizeEncoded(e,i);return new l.EncodedTokenizationResult(n.tokens,[],n.endState)}}class ff{constructor(e,t,i,n){this._languageId=e,this._actual=t,this._languageService=i,this._standaloneThemeService=n}dispose(){}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,t){const i=[];let n=0;for(let s=0,r=e.length;s0&&s[r-1]===f)continue;let g=u.startIndex;h===0?g=0:g{const i=await Promise.resolve(e.create());return i?dW(i)?eP(o,i):new Sd(J.get(yt),J.get(Tn),o,WO(o,i),J.get(Ge)):null});return l.TokenizationRegistry.registerFactory(o,t)}function gW(o,e){if(!J.get(yt).isRegisteredLanguageId(o))throw new Error(`Cannot set tokens provider for unknown language ${o}`);return HO(e)?oD(o,{create:()=>e}):l.TokenizationRegistry.register(o,eP(o,e))}function mW(o,e){const t=i=>new Sd(J.get(yt),J.get(Tn),o,WO(o,i),J.get(Ge));return HO(e)?oD(o,{create:()=>e}):l.TokenizationRegistry.register(o,t(e))}function pW(o,e){return J.get(ze).referenceProvider.register(o,e)}function _W(o,e){return J.get(ze).renameProvider.register(o,e)}function bW(o,e){return J.get(ze).newSymbolNamesProvider.register(o,e)}function CW(o,e){return J.get(ze).signatureHelpProvider.register(o,e)}function vW(o,e){return J.get(ze).hoverProvider.register(o,{provideHover:async(i,n,s,r)=>{const a=i.getWordAtPosition(n);return Promise.resolve(e.provideHover(i,n,s,r)).then(c=>{if(c)return!c.range&&a&&(c.range=new l.Range(n.lineNumber,a.startColumn,n.lineNumber,a.endColumn)),c.range||(c.range=new l.Range(n.lineNumber,n.column,n.lineNumber,n.column)),c})}})}function wW(o,e){return J.get(ze).documentSymbolProvider.register(o,e)}function SW(o,e){return J.get(ze).documentHighlightProvider.register(o,e)}function yW(o,e){return J.get(ze).linkedEditingRangeProvider.register(o,e)}function LW(o,e){return J.get(ze).definitionProvider.register(o,e)}function DW(o,e){return J.get(ze).implementationProvider.register(o,e)}function xW(o,e){return J.get(ze).typeDefinitionProvider.register(o,e)}function EW(o,e){return J.get(ze).codeLensProvider.register(o,e)}function IW(o,e,t){return J.get(ze).codeActionProvider.register(o,{providedCodeActionKinds:t?.providedCodeActionKinds,documentation:t?.documentation,provideCodeActions:(n,s,r,a)=>{const h=J.get(xr).read({resource:n.uri}).filter(d=>l.Range.areIntersectingOrTouching(d,s));return e.provideCodeActions(n,s,{markers:h,only:r.only,trigger:r.trigger},a)},resolveCodeAction:e.resolveCodeAction})}function TW(o,e){return J.get(ze).documentFormattingEditProvider.register(o,e)}function NW(o,e){return J.get(ze).documentRangeFormattingEditProvider.register(o,e)}function RW(o,e){return J.get(ze).onTypeFormattingEditProvider.register(o,e)}function MW(o,e){return J.get(ze).linkProvider.register(o,e)}function AW(o,e){return J.get(ze).completionProvider.register(o,e)}function OW(o,e){return J.get(ze).colorProvider.register(o,e)}function PW(o,e){return J.get(ze).foldingRangeProvider.register(o,e)}function kW(o,e){return J.get(ze).declarationProvider.register(o,e)}function FW(o,e){return J.get(ze).selectionRangeProvider.register(o,e)}function BW(o,e){return J.get(ze).documentSemanticTokensProvider.register(o,e)}function zW(o,e){return J.get(ze).documentRangeSemanticTokensProvider.register(o,e)}function VW(o,e){return J.get(ze).inlineCompletionsProvider.register(o,e)}function UW(o,e){return J.get(ze).inlayHintsProvider.register(o,e)}function $W(){return{register:sW,getLanguages:oW,onLanguage:aW,onLanguageEncountered:lW,getEncodedLanguageId:rW,setLanguageConfiguration:cW,setColorMap:fW,registerTokensProviderFactory:oD,setTokensProvider:gW,setMonarchTokensProvider:mW,registerReferenceProvider:pW,registerRenameProvider:_W,registerNewSymbolNameProvider:bW,registerCompletionItemProvider:AW,registerSignatureHelpProvider:CW,registerHoverProvider:vW,registerDocumentSymbolProvider:wW,registerDocumentHighlightProvider:SW,registerLinkedEditingRangeProvider:yW,registerDefinitionProvider:LW,registerImplementationProvider:DW,registerTypeDefinitionProvider:xW,registerCodeLensProvider:EW,registerCodeActionProvider:IW,registerDocumentFormattingEditProvider:TW,registerDocumentRangeFormattingEditProvider:NW,registerOnTypeFormattingEditProvider:RW,registerLinkProvider:MW,registerColorProvider:OW,registerFoldingRangeProvider:PW,registerDeclarationProvider:kW,registerSelectionRangeProvider:FW,registerDocumentSemanticTokensProvider:BW,registerDocumentRangeSemanticTokensProvider:zW,registerInlineCompletionsProvider:VW,registerInlayHintsProvider:UW,DocumentHighlightKind:l.DocumentHighlightKind$1,CompletionItemKind:l.CompletionItemKind,CompletionItemTag:l.CompletionItemTag,CompletionItemInsertTextRule:l.CompletionItemInsertTextRule,SymbolKind:l.SymbolKind,SymbolTag:l.SymbolTag,IndentAction:l.IndentAction,CompletionTriggerKind:l.CompletionTriggerKind,SignatureHelpTriggerKind:l.SignatureHelpTriggerKind$1,InlayHintKind:l.InlayHintKind$1,InlineCompletionTriggerKind:l.InlineCompletionTriggerKind$1,CodeActionTriggerType:l.CodeActionTriggerType,NewSymbolNameTag:l.NewSymbolNameTag$1,NewSymbolNameTriggerKind:l.NewSymbolNameTriggerKind$1,PartialAcceptTriggerKind:l.PartialAcceptTriggerKind,HoverVerbosityAction:l.HoverVerbosityAction$1,InlineCompletionEndOfLifeReasonKind:l.InlineCompletionEndOfLifeReasonKind$1,InlineCompletionHintStyle:l.InlineCompletionHintStyle$1,FoldingRangeKind:l.FoldingRangeKind,SelectedSuggestionInfo:l.SelectedSuggestionInfo,EditDeltaInfo:tu}}const rD=le("IEditorCancelService"),tP=new q("cancellableOperation",!1,l.localize(978,"Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));fe(rD,class{constructor(){this._tokens=new WeakMap}add(o,e){let t=this._tokens.get(o);t||(t=o.invokeWithinContext(n=>{const s=tP.bindTo(n.get(be)),r=new l.LinkedList;return{key:s,tokens:r}}),this._tokens.set(o,t));let i;return t.key.set(!0),i=t.tokens.push(e),()=>{i&&(i(),t.key.set(!t.tokens.isEmpty()),i=void 0)}}cancel(o){const e=this._tokens.get(o);if(!e)return;const t=e.tokens.pop();t&&(t.cancel(),e.key.set(!e.tokens.isEmpty()))}},1);class KW extends l.CancellationTokenSource{constructor(e,t){super(t),this.editor=e,this._unregister=e.invokeWithinContext(i=>i.get(rD).add(e,this))}dispose(){this._unregister(),super.dispose()}}oe(new class extends ao{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:tP})}runEditorCommand(o,e){o.get(rD).cancel(e)}});class U_{constructor(e,t){if(this.flags=t,(this.flags&1)!==0){const i=e.getModel();this.modelVersionId=i?l.format("{0}#{1}",i.uri.toString(),i.getVersionId()):null}else this.modelVersionId=null;(this.flags&4)!==0?this.position=e.getPosition():this.position=null,(this.flags&2)!==0?this.selection=e.getSelection():this.selection=null,(this.flags&8)!==0?(this.scrollLeft=e.getScrollLeft(),this.scrollTop=e.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(e){if(!(e instanceof U_))return!1;const t=e;return!(this.modelVersionId!==t.modelVersionId||this.scrollLeft!==t.scrollLeft||this.scrollTop!==t.scrollTop||!this.position&&t.position||this.position&&!t.position||this.position&&t.position&&!this.position.equals(t.position)||!this.selection&&t.selection||this.selection&&!t.selection||this.selection&&t.selection&&!this.selection.equalsRange(t.selection))}validate(e){return this._equals(new U_(e,this.flags))}}class aD extends KW{constructor(e,t,i,n){super(e,n),this._listener=new l.DisposableStore,t&4&&this._listener.add(e.onDidChangeCursorPosition(s=>{(!i||!l.Range.containsPosition(i,s.position))&&this.cancel()})),t&2&&this._listener.add(e.onDidChangeCursorSelection(s=>{(!i||!l.Range.containsRange(i,s.selection))&&this.cancel()})),t&8&&this._listener.add(e.onDidScrollChange(s=>this.cancel())),t&1&&(this._listener.add(e.onDidChangeModel(s=>this.cancel())),this._listener.add(e.onDidChangeModelContent(s=>this.cancel())))}dispose(){this._listener.dispose(),super.dispose()}}class lD extends l.CancellationTokenSource{constructor(e,t){super(t),this._listener=e.onDidChangeContent(()=>this.cancel())}dispose(){this._listener.dispose(),super.dispose()}}class Dh{static _handleEolEdits(e,t){let i;const n=[];for(const s of t)typeof s.eol=="number"&&(i=s.eol),s.range&&typeof s.text=="string"&&n.push(s);return typeof i=="number"&&e.hasModel()&&e.getModel().pushEOL(i),n}static _isFullModelReplaceEdit(e,t){if(!e.hasModel())return!1;const i=e.getModel(),n=i.validateRange(t.range);return i.getFullModelRange().equalsRange(n)}static execute(e,t,i){i&&e.pushUndoStop();const n=vh.capture(e),s=Dh._handleEolEdits(e,t);s.length===1&&Dh._isFullModelReplaceEdit(e,s[0])?e.executeEdits("formatEditsCommand",s.map(r=>p_.replace(l.Range.lift(r.range),r.text))):e.executeEdits("formatEditsCommand",s.map(r=>p_.replaceMove(l.Range.lift(r.range),r.text))),i&&e.pushUndoStop(),n.restoreRelativeVerticalPositionOfCursor(e)}}class iP{constructor(e){this.value=e,this._lower=e.toLowerCase()}static toKey(e){return typeof e=="string"?e.toLowerCase():e._lower}}class GW{constructor(e){if(this._set=new Set,e)for(const t of e)this.add(t)}add(e){this._set.add(iP.toKey(e))}has(e){return this._set.has(iP.toKey(e))}}function nP(o,e,t){const i=[],n=new GW,s=o.ordered(t);for(const a of s)i.push(a),a.extensionId&&n.add(a.extensionId);const r=e.ordered(t);for(const a of r){if(a.extensionId){if(n.has(a.extensionId))continue;n.add(a.extensionId)}i.push({displayName:a.displayName,extensionId:a.extensionId,provideDocumentFormattingEdits(c,h,d){return a.provideDocumentRangeFormattingEdits(c,c.getFullModelRange(),h,d)}})}return i}const If=class If{static setFormatterSelector(e){return{dispose:If._selectors.unshift(e)}}static async select(e,t,i,n){if(e.length===0)return;const s=l.Iterable.first(If._selectors);if(s)return await s(e,t,i,n)}};If._selectors=new l.LinkedList;let gf=If;async function jW(o,e,t,i,n,s,r){const a=o.get(me),{documentRangeFormattingEditProvider:c}=o.get(ze),h=Ys(e)?e.getModel():e,d=c.ordered(h),u=await gf.select(d,h,i,2);u&&(n.report(u),await a.invokeFunction(qW,u,e,t,s,r))}async function qW(o,e,t,i,n,s){const r=o.get(tr),a=o.get(ei),c=o.get(Xa);let h,d;Ys(t)?(h=t.getModel(),d=new aD(t,5,void 0,n)):(h=t,d=new lD(t,n));const u=[];let f=0;for(const v of l.asArray(i).sort(l.Range.compareRangesUsingStarts))f>0&&l.Range.areIntersectingOrTouching(u[f-1],v)?u[f-1]=l.Range.fromPositions(u[f-1].getStartPosition(),v.getEndPosition()):f=u.push(v);const g=async v=>{a.trace("[format][provideDocumentRangeFormattingEdits] (request)",e.extensionId?.value,v);const C=await e.provideDocumentRangeFormattingEdits(h,v,h.getFormattingOptions(),d.token)||[];return a.trace("[format][provideDocumentRangeFormattingEdits] (response)",e.extensionId?.value,C),C},m=(v,C)=>{if(!v.length||!C.length)return!1;const w=v.reduce((S,L)=>l.Range.plusRange(S,L.range),v[0].range);if(!C.some(S=>l.Range.intersectRanges(w,S.range)))return!1;for(const S of v)for(const L of C)if(l.Range.intersectRanges(S.range,L.range))return!0;return!1},p=[],b=[];try{if(typeof e.provideDocumentRangesFormattingEdits=="function"){a.trace("[format][provideDocumentRangeFormattingEdits] (request)",e.extensionId?.value,u);const v=await e.provideDocumentRangesFormattingEdits(h,u,h.getFormattingOptions(),d.token)||[];a.trace("[format][provideDocumentRangeFormattingEdits] (response)",e.extensionId?.value,v),b.push(v)}else{for(const v of u){if(d.token.isCancellationRequested)return!0;b.push(await g(v))}for(let v=0;v({text:w.text,range:l.Range.lift(w.range),forceMoveMarkers:!0})),w=>{for(const{range:S}of w)if(l.Range.areIntersectingOrTouching(S,C))return[new l.Selection(S.startLineNumber,S.startColumn,S.endLineNumber,S.endColumn)];return null})}return c.playSignal(xn.format,{userGesture:s}),!0}async function YW(o,e,t,i,n,s){const r=o.get(me),a=o.get(ze),c=Ys(e)?e.getModel():e,h=nP(a.documentFormattingEditProvider,a.documentRangeFormattingEditProvider,c),d=await gf.select(h,c,t,1);d&&(i.report(d),await r.invokeFunction(ZW,d,e,t,n,s))}async function ZW(o,e,t,i,n,s){const r=o.get(tr),a=o.get(Xa);let c,h;Ys(t)?(c=t.getModel(),h=new aD(t,5,void 0,n)):(c=t,h=new lD(t,n));let d;try{const u=await e.provideDocumentFormattingEdits(c,c.getFormattingOptions(),h.token);if(d=await r.computeMoreMinimalEdits(c.uri,u),h.token.isCancellationRequested)return!0}finally{h.dispose()}if(!d||d.length===0)return!1;if(Ys(t))Dh.execute(t,d,i!==2),i!==2&&t.revealPositionInCenterIfOutsideViewport(t.getPosition(),1);else{const[{range:u}]=d,f=new l.Selection(u.startLineNumber,u.startColumn,u.endLineNumber,u.endColumn);c.pushEditOperations([f],d.map(g=>({text:g.text,range:l.Range.lift(g.range),forceMoveMarkers:!0})),g=>{for(const{range:m}of g)if(l.Range.areIntersectingOrTouching(m,f))return[new l.Selection(m.startLineNumber,m.startColumn,m.endLineNumber,m.endColumn)];return null})}return a.playSignal(xn.format,{userGesture:s}),!0}async function QW(o,e,t,i,n,s){const r=e.documentRangeFormattingEditProvider.ordered(t);for(const a of r){const c=await Promise.resolve(a.provideDocumentRangeFormattingEdits(t,i,n,s)).catch(l.onUnexpectedExternalError);if(l.isNonEmptyArray(c))return await o.computeMoreMinimalEdits(t.uri,c)}}async function XW(o,e,t,i,n){const s=nP(e.documentFormattingEditProvider,e.documentRangeFormattingEditProvider,t);for(const r of s){const a=await Promise.resolve(r.provideDocumentFormattingEdits(t,i,n)).catch(l.onUnexpectedExternalError);if(l.isNonEmptyArray(a))return await o.computeMoreMinimalEdits(t.uri,a)}}function sP(o,e,t,i,n,s,r){const a=e.onTypeFormattingEditProvider.ordered(t);return a.length===0||a[0].autoFormatTriggerCharacters.indexOf(n)<0?Promise.resolve(void 0):Promise.resolve(a[0].provideOnTypeFormattingEdits(t,i,n,s,r)).catch(l.onUnexpectedExternalError).then(c=>o.computeMoreMinimalEdits(t.uri,c))}function JW(o){const e=o;return!!e&&typeof e=="object"&&typeof e.tabSize=="number"&&typeof e.insertSpaces=="boolean"}Ut.registerCommand("_executeFormatRangeProvider",async function(o,...e){const[t,i,n]=e;l.assertType(l.URI.isUri(t)),l.assertType(l.Range.isIRange(i));const s=o.get(ql),r=o.get(tr),a=o.get(ze),c=await s.createModelReference(t);try{return QW(r,a,c.object.textEditorModel,l.Range.lift(i),cD(n,c),l.CancellationToken.None)}finally{c.dispose()}}),Ut.registerCommand("_executeFormatDocumentProvider",async function(o,...e){const[t,i]=e;l.assertType(l.URI.isUri(t));const n=o.get(ql),s=o.get(tr),r=o.get(ze),a=await n.createModelReference(t);try{return XW(s,r,a.object.textEditorModel,cD(i,a),l.CancellationToken.None)}finally{a.dispose()}}),Ut.registerCommand("_executeFormatOnTypeProvider",async function(o,...e){const[t,i,n,s]=e;l.assertType(l.URI.isUri(t)),l.assertType(l.Position.isIPosition(i)),l.assertType(typeof n=="string");const r=o.get(ql),a=o.get(tr),c=o.get(ze),h=await r.createModelReference(t);try{return sP(a,c,h.object.textEditorModel,l.Position.lift(i),n,cD(s,h),l.CancellationToken.None)}finally{h.dispose()}});function cD(o,e){let t;if(JW(o))t=o;else{const i=e.object.textEditorModel.getOptions();t={tabSize:i.tabSize,insertSpaces:i.insertSpaces}}return t}Fi.wrappingIndent.defaultValue=0,Fi.glyphMargin.defaultValue=!1,Fi.autoIndent.defaultValue=3,Fi.overviewRulerLanes.defaultValue=2,gf.setFormatterSelector((o,e,t)=>Promise.resolve(o[0]));const Di=l.createMonacoBaseAPI();Di.editor=WJ(),Di.languages=$W();const WW=Di.CancellationTokenSource,HW=Di.Emitter,eH=Di.KeyCode,tH=Di.KeyMod,iH=Di.Position,nH=Di.Range,sH=Di.Selection,oH=Di.SelectionDirection,rH=Di.MarkerSeverity,aH=Di.MarkerTag,lH=Di.Uri,cH=Di.Token,hH=Di.editor,dH=Di.languages,uH=Bf(),xh=globalThis;(uH?.globalAPI||typeof xh.define=="function"&&xh.define.amd)&&(xh.monaco=Di),typeof xh.require<"u"&&typeof xh.require.config=="function"&&xh.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]}),_.$=Q,_.AccessibilitySignal=xn,_.Action=oo,_.Action2=hg,_.ActionBar=el,_.ActionViewItem=Fp,_.Button=v_,_.CONTEXT_ACCESSIBILITY_MODE_ENABLED=yE,_.CancelSnoozeInlineCompletion=ay,_.CancellationTokenSource=WW,_.CaseSensitiveToggle=zM,_.ClickAction=rN,_.CommandsRegistry=Ut,_.ContextKeyEqualsExpr=Yl,_.ContextKeyExpr=de,_.CopyOptions=em,_.CountBadge=YL,_.CursorColumns=Xe,_.CursorMoveCommands=Dt,_.CursorState=ge,_.DataTransfers=pc,_.DebugNameData=Vt,_.DenseKeyProvider=XT,_.DerivedWithSetter=YD,_.Dimension=cs,_.DisposableCancellationTokenSource=mX,_.DomEmitter=Te,_.DomScrollableElement=Jg,_.DynamicCssRules=mv,_.EDITOR_FONT_DEFAULTS=Zi,_.EditDeltaInfo=tu,_.EditOperation=p_,_.EditSources=$i,_.EditorAction=mg,_.EditorAction2=LB,_.EditorCommand=ao,_.EditorFontLigatures=io,_.EditorMouseEvent=uo,_.EditorOptions=Fi,_.EditorState=U_,_.EditorStateCancellationTokenSource=aD,_.EditorZoom=eo,_.Emitter=HW,_.EnterOperation=Ov,_.EventHelper=ve,_.EventType=F,_.Extensions=Xo,_.Extensions$1=UL,_.FindInput=GM,_.FormattingEdit=Dh,_.FuzzyScoreOptions=np,_.Gesture=li,_.GlobalPointerMoveMonitor=xd,_.GlyphRasterizer=Zd,_.HC_BLACK_THEME_NAME=gl,_.HC_LIGHT_THEME_NAME=ml,_.HighlightedLabel=Ir,_.HistoryInputBox=KM,_.HoverAction=Qm,_.HoverWidget=sN,_.IAccessibilityService=Ui,_.IAccessibilitySignalService=Xa,_.IBulkEditService=xA,_.IClipboardService=Ip,_.ICodeEditorService=pt,_.ICommandService=zi,_.IConfigurationService=Ge,_.IContextKeyService=be,_.IContextMenuService=nn,_.IContextViewService=Fc,_.IDataChannelService=xM,_.IDefaultAccountService=EM,_.IDialogService=ey,_.IEditorProgressService=d_,_.IEditorWorkerService=tr,_.IEnvironmentService=ly,_.IHoverService=kc,_.IInlineCompletionsService=Cp,_.IInstantiationService=me,_.IKeybindingService=xt,_.ILabelService=AM,_.ILanguageConfigurationService=ms,_.ILanguageFeatureDebounceService=MR,_.ILanguageFeaturesService=ze,_.ILanguageService=yt,_.ILayoutService=Os,_.IListService=ts,_.ILogService=ei,_.ILoggerService=kx,_.IMarkdownRendererService=Pu,_.IMarkerDecorationsService=$C,_.IMarkerService=xr,_.IMenuService=Zo,_.IModelService=ri,_.INotificationService=yn,_.IOpenerService=Ou,_.IProgressService=CA,_.IQuickInputService=Ps,_.IRenameSymbolTrackerService=EA,_.ISemanticTokensStylingService=qR,_.IStandaloneThemeService=Tn,_.IStorageService=Qa,_.ITelemetryService=Xn,_.ITextModelService=ql,_.ITextResourceConfigurationService=TC,_.IThemeService=_i,_.IUserInteractionService=Na,_.IWorkspaceContextService=wA,_.IWorkspaceTrustManagementService=DA,_.IconLabel=w_,_.IdGenerator=ES,_.InMemoryClipboardMetadataManager=_c,_.InlineDecoration=Ac,_.InputFocusedContext=Mp,_.IsWebContext=_9,_.IsWindowsContext=p9,_.KeyCode=eH,_.KeyDownAction=aN,_.KeyMod=tH,_.KeybindingLabel=y_,_.KeybindingsRegistry=Zn,_.LanguageAgnosticBracketTokens=WT,_.LineDecoration=Ji,_.LineSource=xO,_.LineTokens=_t,_.List=zn,_.LocalSelectionTransfer=Lv,_.MarkdownString=DS,_.MarkerSeverity=rH,_.MarkerTag=aH,_.MenuId=ct,_.MenuRegistry=Qn,_.Mimes=mn,_.ModelDecorationInjectedTextOptions=Mc,_.ModelDecorationOptions=Ct,_.ModifierKeyEmitter=hs,_.MoveOperations=ye,_.MultiCommand=gg,_.MultiEditorAction=yB,_.NativeEditContextRegistry=NT,_.NullState=Hl,_.PLAINTEXT_LANGUAGE_ID=pn,_.PixelRatio=ld,_.Point=Un,_.Position=iH,_.ProcessedIndentRulesSupport=Tv,_.Progress=xL,_.Range=nH,_.RawContextKey=q,_.RegexToggle=UM,_.Registry=St,_.RenderLineInput=Wo,_.RenderOptions=yh,_.ReplaceCommand=Ri,_.ReplaceCommandThatPreservesSelection=xI,_.ReplaceCommandThatSelectsText=oU,_.ResourceTextEdit=Er,_.Sash=on,_.ScrollableElement=uI,_.Selection=sH,_.SelectionDirection=oH,_.Separator=ft,_.Severity=Hv,_.Severity$1=rt,_.SnoozeInlineCompletion=ry,_.SplitView=kM,_.StableEditorScrollState=vh,_.StandardKeyboardEvent=Be,_.StandardMouseEvent=Bi,_.StringBuilder=ra,_.SubmenuAction=cd,_.SubmenuItemAction=sa,_.TabFocus=Dd,_.TernarySearchTree=Xc,_.TextBufferTokenizer=JT,_.TextModelCancellationTokenSource=lD,_.TextModelText=G0,_.TextOnlyMenuEntryActionViewItem=Vy,_.Toggle=tl,_.Token=cH,_.TokenArray=ec,_.TokenMetadata=Vi,_.TriggerInlineEditCommandsRegistry=ug,_.TypeOperations=cr,_.Uri=lH,_.UriList=yv,_.VSDataTransfer=pI,_.VS_DARK_THEME_NAME=bh,_.VS_LIGHT_THEME_NAME=Ao,_.WORKSPACE_EXTENSION=yA,_.WholeWordsToggle=VM,_.Widget=Wn,_.WindowIdleValue=CF,_.WordOperations=Ne,_.WordPartOperations=aU,_.WorkbenchListFocusContextKey=nZ,_.WorkbenchTreeElementCanCollapse=rA,_.WorkbenchTreeElementCanExpand=aA,_.activeContrastBorder=ot,_.addDisposableGenericMouseDownListener=nC,_.addDisposableListener=R,_.addStandardDisposableGenericMouseDownListener=_F,_.addStandardDisposableListener=At,_.alert=ha,_.anyScore=W8,_.append=K,_.appendRemoveOnDispose=wh,_.applyFontInfo=Ot,_.arrayEqualsC=Zh,_.asCssVariable=z,_.asyncTransaction=kk,_.autorun=he,_.autorunDelta=Gk,_.autorunWithStore=Kn,_.basename=dg,_.basenameOrAuthority=uB,_.bindContextKey=qs,_.buttonBackground=lc,_.buttonForeground=hv,_.canLog=Bx,_.clamp=wi,_.clearNode=On,_.computeIndentLevel=eT,_.constObservable=Zr,_.contrastBorder=pe,_.countEOL=fr,_.createActionViewItem=Gy,_.createCSSRule=Pg,_.createCommandUri=mG,_.createDecorator=le,_.createHotClass=hX,_.createMatches=wN,_.createStringDataTransferItem=Sv,_.createStyleSheetFromObservable=dV,_.createTrustedTypesPolicy=lo,_.darken=da,_.debouncedObservable=Zk,_.debouncedObservable2=Qk,_.defaultCountBadgeStyles=pM,_.defaultGenerator=IS,_.defaultInputBoxStyles=zy,_.defaultKeybindingLabelStyles=mM,_.defaultListStyles=Hc,_.defaultToggleStyles=Fy,_.derived=Z,_.derivedDisposable=Gn,_.derivedHandleChanges=qk,_.derivedObservableWithCache=JD,_.derivedOpts=fn,_.descriptionForeground=_V,_.diffInserted=BE,_.diffInsertedLine=PV,_.diffRemoved=zE,_.dirname=Rx,_.disposableObservableValue=Wb,_.editor=hH,_.editorActionListForeground=p2,_.editorActiveLinkForeground=LV,_.editorBackground=vn,_.editorBracketMatchForeground=o$,_.editorConfigurationBaseNode=IA,_.editorErrorBorder=wV,_.editorErrorForeground=Ug,_.editorFindMatchForeground=xV,_.editorFindMatchHighlight=Cs,_.editorFindMatchHighlightBorder=ua,_.editorFindMatchHighlightForeground=EV,_.editorFindRangeHighlightBorder=IV,_.editorForeground=nc,_.editorHoverBackground=ZC,_.editorHoverBorder=FE,_.editorHoverForeground=TV,_.editorInfoBorder=Id,_.editorInfoForeground=nr,_.editorInlayHintBackground=XC,_.editorInlayHintForeground=QC,_.editorInlayHintParameterBackground=AV,_.editorInlayHintParameterForeground=MV,_.editorInlayHintTypeBackground=RV,_.editorInlayHintTypeForeground=NV,_.editorSelectionBackground=sr,_.editorSelectionHighlight=$g,_.editorWarningBorder=Ed,_.editorWarningForeground=ho,_.editorWidgetBackground=wn,_.editorWidgetBorder=Vg,_.ensureNonNullable=Ia,_.equalsIfDefined=$D,_.equalsIfDefinedC=Gr,_.extUri=Qe,_.extname=fB,_.foreground=De,_.formatDocumentRangesWithSelectedProvider=jW,_.formatDocumentWithSelectedProvider=YW,_.fuzzyScore=Bc,_.fuzzyScoreGracefulAggressive=iG,_.generateDataToCopyAndStoreInMemory=G3,_.generateUuid=Wg,_.getActionBarActions=CM,_.getActiveDocument=od,_.getActiveElement=wt,_.getActiveWindow=Le,_.getAnchorRect=JS,_.getBaseLayerHoverDelegate=En,_.getClientArea=Gf,_.getCodeEditor=aJ,_.getColumnOfNodeOffset=dc,_.getComputedStyle=Kf,_.getDefaultHoverDelegate=Io,_.getDomNodePagePosition=Qi,_.getEnterAction=am,_.getFlatActionBarActions=Mq,_.getGoodIndentForLine=fU,_.getHoverAccessibleViewHint=oN,_.getIndentMetadata=pU,_.getListStyles=eh,_.getOnTypeFormattingEdits=sP,_.getShadowRoot=qo,_.getStandardTokenTypeAtPosition=Cz,_.getTopLeftOffset=rx,_.getTotalHeight=qf,_.getTotalWidth=jf,_.getWindow=j,_.ghostTextForeground=c$,_.groupByMap=S5,_.h=_e,_.hasDriveLetter=hB,_.hide=Wf,_.iconForeground=Fg,_.inUntrustedWorkspace=Mn,_.indentOfLine=k1,_.inputActiveOptionBackground=rv,_.inputActiveOptionBorder=ov,_.inputActiveOptionForeground=av,_.inputBackground=JE,_.inputBorder=HE,_.inputForeground=WE,_.isActiveElement=sd,_.isAncestor=ut,_.isCodeEditor=Ys,_.isCompletionsEnabledFromObject=hE,_.isDark=rr,_.isDiffEditor=$O,_.isEmptyMarkdownString=DN,_.isEmptyWorkspaceIdentifier=pZ,_.isEqual=Nx,_.isFirefox=di,_.isHTMLElement=Ve,_.isHighContrast=pa,_.isIMenuItem=Zl,_.isKeyModified=y7,_.isLocalizedString=gq,_.isMarkdownString=Do,_.isModelDecorationInComment=aT,_.isModelDecorationInString=lT,_.isModelDecorationVisible=rT,_.isMouseEvent=Qf,_.isSingleFolderWorkspaceIdentifier=SA,_.isStandaloneEditorWorkspace=wZ,_.joinPath=Mx,_.languages=dH,_.lengthAdd=gt,_.lengthGetColumnCountIfZeroLineCount=T5,_.lengthZero=bi,_.listFocusHighlightForeground=QE,_.listHighlightForeground=Nd,_.mainWindow=Ae,_.mapObservableArrayCached=Jk,_.matchesBaseContiguousSubString=$8,_.matchesMimeType=B3,_.matchesSubString=cN,_.matchesWords=Y8,_.minimapFindMatch=qE,_.minimapSelectionOccurrenceHighlight=qV,_.nativeHoverDelegate=A8,_.normalizeIndentation=xv,_.nullTokenize=OC,_.nullTokenizeEncoded=Lg,_.observableCodeEditor=Mr,_.observableConfigValue=dX,_.observableFromEvent=mt,_.observableFromEventOpts=An,_.observableFromPromise=Yk,_.observableSignal=qr,_.observableSignalFromEvent=Ii,_.observableValue=W,_.offsetEditFromContentChanges=x1,_.oneOf=YC,_.openLinkFromMarkdown=mR,_.or=uS,_.originalFSPath=ds,_.overviewRulerFindMatchForeground=UV,_.overviewRulerRangeHighlight=d$,_.overviewRulerSelectionHighlightForeground=$V,_.parseDocument=xw,_.prefixedUuid=mI,_.product=pd,_.quickInputListFocusBackground=Ad,_.quickInputListFocusForeground=Md,_.quickInputListFocusIconForeground=gv,_.rangeIsSingleLine=F0,_.recomputeInitiallyAndOnChange=ed,_.recordChangesLazy=Hk,_.registerAction2=lB,_.registerColor=E,_.registerEditorAction=xB,_.registerEditorCommand=oe,_.registerEditorContribution=_C,_.registerEditorFeature=xZ,_.registerIcon=Mo,_.registerInstantiatedEditorAction=IB,_.registerModelAndPositionCommand=DB,_.registerMultiEditorAction=EB,_.registerSingleton=fe,_.registerThemingParticipant=vs,_.relativePath=mB,_.removeCSSRulesContainingSelector=xE,_.renderIcon=Gc,_.renderLabelWithIcons=vr,_.renderLines=DO,_.renderMarkdown=dp,_.renderViewLine=bd,_.reset=oi,_.runOnChange=Qr,_.runOnChangeWithCancellationToken=iF,_.runOnChangeWithStore=HD,_.runWhenWindowIdle=nd,_.score=uy,_.scrollbarShadow=zg,_.setVisibility=NF,_.show=Jf,_.size=vF,_.status=yd,_.strictEquals=Ei,_.stripIcons=sp,_.structuralEquals=Qh,_.subtransaction=Uf,_.themeColorFromId=La,_.thisEqualsC=Qb,_.toAction=Yo,_.toExternalVSDataTransfer=vI,_.toMultilineTokens2=W7,_.toWorkspaceIdentifier=bZ,_.trackFocus=Xr,_.transaction=nt,_.transparent=ce,_.unicodeHighlightConfigKeys=jo,_.unthemedKeybindingLabelOptions=uQ,_.waitForState=QD,_.widgetBorder=HC,_.widgetClose=YQ,_.widgetShadow=oc,_.withSelection=r7})); diff --git a/emrg/gui/vendor/monaco/vs/editor.js b/emrg/gui/vendor/monaco/vs/editor.js new file mode 100644 index 00000000..b519477a --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/editor.js @@ -0,0 +1 @@ +define("vs/editor",["exports","./editor-KLE6jdfb"],(function(e,n){"use strict";e.CancellationTokenSource=n.CancellationTokenSource,e.Emitter=n.Emitter,e.KeyCode=n.KeyCode,e.KeyMod=n.KeyMod,e.MarkerSeverity=n.MarkerSeverity,e.MarkerTag=n.MarkerTag,e.Position=n.Position,e.Range=n.Range,e.Selection=n.Selection,e.SelectionDirection=n.SelectionDirection,e.Token=n.Token,e.Uri=n.Uri,e.editor=n.editor,e.languages=n.languages,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/editor/editor.main.css b/emrg/gui/vendor/monaco/vs/editor/editor.main.css new file mode 100644 index 00000000..ec328e59 --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/editor/editor.main.css @@ -0,0 +1 @@ +.monaco-editor{font-family:-apple-system,BlinkMacSystemFont,Segoe WPC,Segoe UI,HelveticaNeue-Light,system-ui,Ubuntu,Droid Sans,sans-serif;--monaco-monospace-font: "SF Mono", Monaco, Menlo, Consolas, "Ubuntu Mono", "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace}.monaco-menu .monaco-action-bar.vertical .action-item .action-menu-item:focus .action-label{stroke-width:1.2px}.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,.monaco-editor.hc-black .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,.monaco-editor.hc-light .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label{stroke-width:1.2px}.monaco-hover p{margin:0}.monaco-aria-container{position:absolute!important;top:0;height:1px;width:1px;margin:-1px;overflow:hidden;padding:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%)}.monaco-editor .synthetic-focus,.monaco-diff-editor .synthetic-focus,.monaco-editor [tabindex="0"]:focus,.monaco-diff-editor [tabindex="0"]:focus,.monaco-editor [tabindex="-1"]:focus,.monaco-diff-editor [tabindex="-1"]:focus,.monaco-editor button:focus,.monaco-diff-editor button:focus,.monaco-editor input[type=button]:focus,.monaco-diff-editor input[type=button]:focus,.monaco-editor input[type=checkbox]:focus,.monaco-diff-editor input[type=checkbox]:focus,.monaco-editor input[type=search]:focus,.monaco-diff-editor input[type=search]:focus,.monaco-editor input[type=text]:focus,.monaco-diff-editor input[type=text]:focus,.monaco-editor select:focus,.monaco-diff-editor select:focus,.monaco-editor textarea:focus,.monaco-diff-editor textarea:focus{outline-width:1px;outline-style:solid;outline-offset:-1px;outline-color:var(--vscode-focusBorder);opacity:1}.monaco-aria-container{position:absolute;left:-999em}::-ms-clear{display:none}.monaco-editor .editor-widget input{color:inherit}.monaco-editor{position:relative;overflow:visible;-webkit-text-size-adjust:100%;text-spacing-trim:space-all;color:var(--vscode-editor-foreground);background-color:var(--vscode-editor-background);overflow-wrap:initial}.monaco-editor-background{background-color:var(--vscode-editor-background)}.monaco-editor .rangeHighlight{background-color:var(--vscode-editor-rangeHighlightBackground);box-sizing:border-box;border:1px solid var(--vscode-editor-rangeHighlightBorder)}.monaco-editor.hc-black .rangeHighlight,.monaco-editor.hc-light .rangeHighlight{border-style:dotted}.monaco-editor .symbolHighlight{background-color:var(--vscode-editor-symbolHighlightBackground);box-sizing:border-box;border:1px solid var(--vscode-editor-symbolHighlightBorder)}.monaco-editor.hc-black .symbolHighlight,.monaco-editor.hc-light .symbolHighlight{border-style:dotted}.monaco-editor .editorCanvas{position:absolute;width:100%;height:100%;z-index:0;pointer-events:none}.monaco-editor .overflow-guard{position:relative;overflow:hidden}.monaco-editor .view-overlays{position:absolute;top:0}.monaco-editor .view-overlays>div,.monaco-editor .margin-view-overlays>div{position:absolute;width:100%}.monaco-editor .squiggly-error{border-bottom:4px double var(--vscode-editorError-border)}.monaco-editor .squiggly-error:before{display:block;content:"";width:100%;height:100%;background:var(--vscode-editorError-background)}.monaco-editor .squiggly-warning{border-bottom:4px double var(--vscode-editorWarning-border)}.monaco-editor .squiggly-warning:before{display:block;content:"";width:100%;height:100%;background:var(--vscode-editorWarning-background)}.monaco-editor .squiggly-info{border-bottom:4px double var(--vscode-editorInfo-border)}.monaco-editor .squiggly-info:before{display:block;content:"";width:100%;height:100%;background:var(--vscode-editorInfo-background)}.monaco-editor .squiggly-hint{border-bottom:2px dotted var(--vscode-editorHint-border)}.monaco-editor.showUnused .squiggly-unnecessary{border-bottom:2px dashed var(--vscode-editorUnnecessaryCode-border)}.monaco-editor.showDeprecated .squiggly-inline-deprecated{text-decoration:line-through;text-decoration-color:var(--vscode-editor-foreground, inherit)}.monaco-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.monaco-scrollable-element>.visible{opacity:1;background:#0000;transition:opacity .1s linear;z-index:11}.monaco-scrollable-element>.invisible{opacity:0;pointer-events:none}.monaco-scrollable-element>.invisible.fade{transition:opacity .8s linear}.disable-animations .monaco-scrollable-element>.visible,.disable-animations .monaco-scrollable-element>.invisible.fade{transition:none}.monaco-scrollable-element>.shadow{position:absolute;display:none}.monaco-scrollable-element>.shadow.top{display:block;top:0;left:3px;height:3px;width:100%;box-shadow:var(--vscode-scrollbar-shadow) 0 6px 6px -6px inset}.monaco-scrollable-element>.shadow.left{display:block;top:3px;left:0;height:100%;width:3px;box-shadow:var(--vscode-scrollbar-shadow) 6px 0 6px -6px inset}.monaco-scrollable-element>.shadow.top-left-corner{display:block;top:0;left:0;height:3px;width:3px}.monaco-scrollable-element>.shadow.top.left{box-shadow:var(--vscode-scrollbar-shadow) 6px 0 6px -6px inset}.monaco-scrollable-element>.scrollbar{background:var(--vscode-scrollbar-background)}.monaco-scrollable-element>.scrollbar>.slider{background:var(--vscode-scrollbarSlider-background)}.monaco-scrollable-element>.scrollbar>.slider:hover{background:var(--vscode-scrollbarSlider-hoverBackground)}.monaco-scrollable-element>.scrollbar>.slider.active{background:var(--vscode-scrollbarSlider-activeBackground)}.monaco-editor .blockDecorations-container{position:absolute;top:0;pointer-events:none}.monaco-editor .blockDecorations-block{position:absolute;box-sizing:border-box}.monaco-editor .view-overlays .current-line,.monaco-editor .margin-view-overlays .current-line{display:block;position:absolute;left:0;top:0;box-sizing:border-box;height:100%}.monaco-editor .margin-view-overlays .current-line.current-line-margin.current-line-margin-both{border-right:0}.monaco-editor .lines-content .cdr{position:absolute;height:100%}.monaco-editor .glyph-margin{position:absolute;top:0}.monaco-editor .glyph-margin-widgets .cgmr{position:absolute;display:flex;align-items:center;justify-content:center}.monaco-editor .glyph-margin-widgets .cgmr.codicon-modifier-spin:before{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.monaco-editor .lines-content .core-guide{position:absolute;box-sizing:border-box;height:100%}.monaco-editor .margin-view-overlays .line-numbers{bottom:0;font-variant-numeric:tabular-nums;position:absolute;text-align:right;display:inline-block;vertical-align:middle;box-sizing:border-box;cursor:default}.monaco-editor .relative-current-line-number{text-align:left;display:inline-block;width:100%}.monaco-editor .margin-view-overlays .line-numbers.lh-odd{margin-top:1px}.monaco-editor .line-numbers{color:var(--vscode-editorLineNumber-foreground)}.monaco-editor .line-numbers.active-line-number{color:var(--vscode-editorLineNumber-activeForeground)}.monaco-mouse-cursor-text{cursor:text}.mtkcontrol{color:#fff!important;background:#960000!important}.mtkoverflow{background-color:var(--vscode-button-background, var(--vscode-editor-background));color:var(--vscode-button-foreground, var(--vscode-editor-foreground));border-width:1px;border-style:solid;border-color:var(--vscode-contrastBorder);border-radius:2px;padding:4px;cursor:pointer}.mtkoverflow:hover{background-color:var(--vscode-button-hoverBackground)}.monaco-editor.no-user-select .lines-content,.monaco-editor.no-user-select .view-line,.monaco-editor.no-user-select .view-lines{user-select:none;-webkit-user-select:none}.monaco-editor.mac .lines-content:hover,.monaco-editor.mac .view-line:hover,.monaco-editor.mac .view-lines:hover{user-select:text;-webkit-user-select:text;-ms-user-select:text}.monaco-editor.enable-user-select{user-select:initial;-webkit-user-select:initial}.monaco-editor .view-lines{white-space:nowrap}.monaco-editor .view-line{box-sizing:border-box;position:absolute;width:100%}.monaco-editor .lines-content>.view-lines>.view-line>span{top:0;bottom:0;position:absolute}.monaco-editor .mtkw{color:var(--vscode-editorWhitespace-foreground)!important}.monaco-editor .mtkz{display:inline-block;color:var(--vscode-editorWhitespace-foreground)!important}.monaco-editor .lines-decorations{position:absolute;top:0;background:#fff}.monaco-editor .margin-view-overlays .cldr{position:absolute;height:100%}.monaco-editor .margin{background-color:var(--vscode-editorGutter-background)}.monaco-editor .margin-view-overlays .cmdr{position:absolute;left:0;width:100%;height:100%}.monaco-editor .minimap.slider-mouseover .minimap-slider{opacity:0;transition:opacity .1s linear}.monaco-editor .minimap.slider-mouseover:hover .minimap-slider,.monaco-editor .minimap.slider-mouseover .minimap-slider.active{opacity:1}.monaco-editor .minimap-slider .minimap-slider-horizontal{background:var(--vscode-minimapSlider-background)}.monaco-editor .minimap-slider:hover .minimap-slider-horizontal{background:var(--vscode-minimapSlider-hoverBackground)}.monaco-editor .minimap-slider.active .minimap-slider-horizontal{background:var(--vscode-minimapSlider-activeBackground)}.monaco-editor .minimap-shadow-visible{box-shadow:var(--vscode-shadow-md)}.monaco-editor .minimap-shadow-hidden{position:absolute;width:0}.monaco-editor .minimap-shadow-visible{position:absolute;left:-6px;width:6px;pointer-events:none}.monaco-editor.no-minimap-shadow .minimap-shadow-visible{position:absolute;left:-1px;width:1px}.minimap.minimap-autohide-mouseover,.minimap.minimap-autohide-scroll{opacity:0;transition:opacity .5s}.minimap.minimap-autohide-scroll{pointer-events:none}.minimap.minimap-autohide-mouseover:hover,.minimap.minimap-autohide-scroll.active{opacity:1;pointer-events:auto}.monaco-editor .minimap{z-index:5}.monaco-editor .minimap canvas{opacity:.9}.monaco-editor .overlayWidgets{position:absolute;top:0;left:0}.monaco-editor .view-ruler{position:absolute;top:0;box-shadow:1px 0 0 0 var(--vscode-editorRuler-foreground) inset;pointer-events:none}.monaco-editor .scroll-decoration{position:absolute;top:0;left:0;height:6px;box-shadow:var(--vscode-scrollbar-shadow) 0 6px 6px -6px inset}.monaco-editor .lines-content .cslr{position:absolute}.monaco-editor .focused .selected-text{background-color:var(--vscode-editor-selectionBackground)}.monaco-editor .selected-text{background-color:var(--vscode-editor-inactiveSelectionBackground)}.monaco-editor .top-left-radius{border-top-left-radius:3px}.monaco-editor .bottom-left-radius{border-bottom-left-radius:3px}.monaco-editor .top-right-radius{border-top-right-radius:3px}.monaco-editor .bottom-right-radius{border-bottom-right-radius:3px}.monaco-editor.hc-black .top-left-radius{border-top-left-radius:0}.monaco-editor.hc-black .bottom-left-radius{border-bottom-left-radius:0}.monaco-editor.hc-black .top-right-radius{border-top-right-radius:0}.monaco-editor.hc-black .bottom-right-radius{border-bottom-right-radius:0}.monaco-editor.hc-light .top-left-radius{border-top-left-radius:0}.monaco-editor.hc-light .bottom-left-radius{border-bottom-left-radius:0}.monaco-editor.hc-light .top-right-radius{border-top-right-radius:0}.monaco-editor.hc-light .bottom-right-radius{border-bottom-right-radius:0}.monaco-editor .cursors-layer{position:absolute;top:0}.monaco-editor .cursors-layer>.cursor{position:absolute;overflow:hidden;box-sizing:border-box}.monaco-editor .cursors-layer.cursor-smooth-caret-animation>.cursor{transition:all 80ms}.monaco-editor .cursors-layer.cursor-block-outline-style>.cursor{background:transparent!important;border-style:solid;border-width:1px}.monaco-editor .cursors-layer.cursor-underline-style>.cursor{border-bottom-width:2px;border-bottom-style:solid;background:transparent!important}.monaco-editor .cursors-layer.cursor-underline-thin-style>.cursor{border-bottom-width:1px;border-bottom-style:solid;background:transparent!important}@keyframes monaco-cursor-smooth{0%,20%{opacity:1}60%,to{opacity:0}}@keyframes monaco-cursor-phase{0%,20%{opacity:1}90%,to{opacity:0}}@keyframes monaco-cursor-expand{0%,20%{transform:scaleY(1)}80%,to{transform:scaleY(0)}}.cursor-smooth{animation:monaco-cursor-smooth .5s ease-in-out 0s 20 alternate}.cursor-phase{animation:monaco-cursor-phase .5s ease-in-out 0s 20 alternate}.cursor-expand>.cursor{animation:monaco-cursor-expand .5s ease-in-out 0s 20 alternate}.monaco-editor .mwh{position:absolute;color:var(--vscode-editorWhitespace-foreground)!important}.monaco-editor .monaco-decoration-css-rule-extractor{visibility:hidden;pointer-events:none}.monaco-editor .inputarea{min-width:0;min-height:0;margin:0;padding:0;position:absolute;outline:none!important;resize:none;border:none;overflow:hidden;color:transparent;background-color:transparent;z-index:-10}.monaco-editor .inputarea.ime-input{z-index:10;caret-color:var(--vscode-editorCursor-foreground);color:var(--vscode-editor-foreground)}.monaco-editor .native-edit-context{margin:0;padding:0;position:absolute;overflow-y:scroll;scrollbar-width:none;z-index:-10;white-space:pre-wrap}.monaco-editor .ime-text-area{min-width:0;min-height:0;margin:0;padding:0;position:absolute;outline:none!important;resize:none;border:none;overflow:hidden;color:transparent;background-color:transparent;z-index:-10}.monaco-editor .edit-context-composition-none{background-color:transparent;border-bottom:none}.monaco-editor :not(.hc-black,.hc-light) .edit-context-composition-secondary{border-bottom:1px solid var(--vscode-editor-compositionBorder)}.monaco-editor :not(.hc-black,.hc-light) .edit-context-composition-primary{border-bottom:2px solid var(--vscode-editor-compositionBorder)}.monaco-editor :is(.hc-black,.hc-light) .edit-context-composition-secondary{border:1px solid var(--vscode-editor-compositionBorder)}.monaco-editor :is(.hc-black,.hc-light) .edit-context-composition-primary{border:2px solid var(--vscode-editor-compositionBorder)}.monaco-editor .margin-view-overlays .gpu-mark{position:absolute;top:0;bottom:0;left:0;width:100%;display:inline-block;border-left:solid 2px var(--vscode-editorWarning-foreground);opacity:.2;transition:background-color .1s linear}.monaco-editor .margin-view-overlays .gpu-mark:hover{background-color:var(--vscode-editorWarning-foreground)}.monaco-hover.workbench-hover{position:relative;font-size:13px;line-height:19px;z-index:40;overflow:hidden;max-width:700px;background:var(--vscode-editorHoverWidget-background);border:1px solid var(--vscode-editorHoverWidget-border);border-radius:5px;color:var(--vscode-editorHoverWidget-foreground);box-shadow:var(--vscode-shadow-lg)}.monaco-hover.workbench-hover.with-pointer{border-radius:3px}.monaco-hover.workbench-hover .monaco-action-bar .action-item .codicon{width:13px;height:13px}.monaco-hover.workbench-hover hr{border-bottom:none}.monaco-hover.workbench-hover.compact{font-size:12px}.monaco-hover.workbench-hover.compact .monaco-action-bar .action-item .codicon{width:12px;height:12px}.monaco-hover.workbench-hover.compact .hover-contents{padding:2px 8px}.workbench-hover-container.locked .monaco-hover.workbench-hover{outline:1px solid var(--vscode-editorHoverWidget-border)}.workbench-hover-container:focus-within.locked .monaco-hover.workbench-hover{outline-color:var(--vscode-focusBorder)}.workbench-hover-pointer{position:absolute;z-index:41;pointer-events:none}.workbench-hover-pointer:after{content:"";position:absolute;width:5px;height:5px;background-color:var(--vscode-editorHoverWidget-background);border-right:1px solid var(--vscode-editorHoverWidget-border);border-bottom:1px solid var(--vscode-editorHoverWidget-border)}.workbench-hover-container:not(:focus-within).locked .workbench-hover-pointer:after{width:4px;height:4px;border-right-width:2px;border-bottom-width:2px}.workbench-hover-container:focus-within .workbench-hover-pointer:after{border-right:1px solid var(--vscode-focusBorder);border-bottom:1px solid var(--vscode-focusBorder)}.workbench-hover-pointer.left{left:-3px}.workbench-hover-pointer.right{right:3px}.workbench-hover-pointer.top{top:-3px}.workbench-hover-pointer.bottom{bottom:3px}.workbench-hover-pointer.left:after{transform:rotate(135deg)}.workbench-hover-pointer.right:after{transform:rotate(315deg)}.workbench-hover-pointer.top:after{transform:rotate(225deg)}.workbench-hover-pointer.bottom:after{transform:rotate(45deg)}.monaco-hover.workbench-hover a{color:var(--vscode-textLink-foreground)}.monaco-hover.workbench-hover a:focus{outline:1px solid;outline-offset:-1px;text-decoration:underline;outline-color:var(--vscode-focusBorder)}.monaco-hover.workbench-hover a.codicon:focus,.monaco-hover.workbench-hover a.monaco-button:focus{text-decoration:none}.monaco-hover.workbench-hover a:hover,.monaco-hover.workbench-hover a:active{color:var(--vscode-textLink-activeForeground)}.monaco-hover.workbench-hover code{background:var(--vscode-textCodeBlock-background)}.monaco-hover.workbench-hover .hover-row .actions{background:var(--vscode-editorHoverWidget-statusBarBackground)}.monaco-hover.workbench-hover.right-aligned{left:1px}.monaco-hover.workbench-hover.right-aligned .hover-row.status-bar .actions{flex-direction:row-reverse}.monaco-hover.workbench-hover.right-aligned .hover-row.status-bar .actions .action-container{margin-right:0;margin-left:16px}.monaco-hover{cursor:default;position:absolute;overflow:hidden;user-select:text;-webkit-user-select:text;box-sizing:border-box;line-height:1.5em;white-space:var(--vscode-hover-whiteSpace, normal)}.monaco-hover.fade-in{animation:fadein .1s linear}.monaco-hover.hidden{display:none}.monaco-hover a:hover:not(.disabled){cursor:pointer}.monaco-hover .hover-contents:not(.html-hover-contents){padding:4px 8px}.monaco-hover .markdown-hover>.hover-contents:not(.code-hover-contents){max-width:var(--vscode-hover-maxWidth, 500px);word-wrap:break-word}.monaco-hover .markdown-hover>.hover-contents:not(.code-hover-contents) hr{min-width:100%}.monaco-hover p,.monaco-hover .code,.monaco-hover ul,.monaco-hover h1,.monaco-hover h2,.monaco-hover h3,.monaco-hover h4,.monaco-hover h5,.monaco-hover h6{margin:8px 0}.monaco-hover h1,.monaco-hover h2,.monaco-hover h3,.monaco-hover h4,.monaco-hover h5,.monaco-hover h6{line-height:1.1}.monaco-hover code{font-family:var(--monaco-monospace-font)}.monaco-hover hr{box-sizing:border-box;border-left:0px;border-right:0px;margin:4px -8px -4px;height:1px}.monaco-hover p:first-child,.monaco-hover .code:first-child,.monaco-hover ul:first-child{margin-top:0}.monaco-hover p:last-child,.monaco-hover .code:last-child,.monaco-hover ul:last-child{margin-bottom:0}.monaco-hover ul,.monaco-hover ol{padding-left:20px}.monaco-hover li>p{margin-bottom:0}.monaco-hover li>ul{margin-top:0}.monaco-hover code{border-radius:3px;padding:0 .4em}.monaco-hover .monaco-tokenized-source{white-space:var(--vscode-hover-sourceWhiteSpace, pre-wrap)}.monaco-hover .hover-row.status-bar{font-size:12px;line-height:22px}.monaco-hover .hover-row.status-bar .info{font-style:italic;padding:0 8px}.monaco-hover .hover-row.status-bar .actions{display:flex;padding:0 8px;width:100%;box-sizing:border-box}.monaco-hover .hover-row.status-bar .actions .action-container{margin-right:16px;cursor:pointer;overflow:hidden;text-wrap:nowrap;text-overflow:ellipsis}.monaco-hover .hover-row.status-bar .actions .action-container .action .icon{padding-right:4px;vertical-align:middle;font-size:inherit}.monaco-hover .hover-row.status-bar .actions .action-container a{color:var(--vscode-textLink-foreground);text-decoration:var(--text-link-decoration)}.monaco-hover .hover-row.status-bar .actions .action-container a .icon.codicon{color:var(--vscode-textLink-foreground)}.monaco-hover .markdown-hover .hover-contents .codicon{color:inherit;font-size:inherit;vertical-align:middle}.monaco-hover .hover-contents a.code-link:hover,.monaco-hover .hover-contents a.code-link{color:inherit}.monaco-hover .hover-contents a.code-link:before{content:"("}.monaco-hover .hover-contents a.code-link:after{content:")"}.monaco-hover .hover-contents a.code-link>span{text-decoration:underline;border-bottom:1px solid transparent;text-underline-position:under;color:var(--vscode-textLink-foreground)}.monaco-hover .hover-contents a.code-link>span:hover{color:var(--vscode-textLink-activeForeground)}.monaco-hover .markdown-hover .hover-contents:not(.code-hover-contents):not(.html-hover-contents) span.codicon{margin-bottom:2px}.monaco-hover-content .action-container a{-webkit-user-select:none;user-select:none}.monaco-hover-content .action-container.disabled{pointer-events:none;opacity:.4;cursor:default}.monaco-hover .action-container,.monaco-hover .action,.monaco-hover button,.monaco-hover .monaco-button,.monaco-hover .monaco-text-button,.monaco-hover [role=button]{-webkit-user-select:none;user-select:none}.context-view{position:absolute}.context-view.fixed{all:initial;font-family:inherit;font-size:13px;position:fixed;color:inherit}.monaco-select-box{width:100%;cursor:pointer;border-radius:var(--vscode-cornerRadius-small)}.monaco-select-box-dropdown-container{font-size:13px;font-weight:400;text-transform:none}.monaco-action-bar .action-item.select-container{cursor:default}.monaco-action-bar .action-item .monaco-select-box{cursor:pointer;min-width:100px;min-height:18px;padding:2px 23px 2px 8px}.mac .monaco-action-bar .action-item .monaco-select-box{font-size:11px;border-radius:var(--vscode-cornerRadius-small);min-height:24px}.monaco-list{position:relative;height:100%;width:100%;white-space:nowrap;overflow:hidden}.monaco-list.mouse-support{user-select:none;-webkit-user-select:none}.monaco-list>.monaco-scrollable-element{height:100%}.monaco-list-rows{position:relative;width:100%;height:100%}.monaco-list.horizontal-scrolling .monaco-list-rows{width:auto;min-width:100%}.monaco-list-row{position:absolute;box-sizing:border-box;overflow:hidden;width:100%}.monaco-list.mouse-support .monaco-list-row{cursor:pointer;touch-action:none}.monaco-list .monaco-scrollable-element>.scrollbar.vertical,.monaco-pane-view>.monaco-split-view2.vertical>.monaco-scrollable-element>.scrollbar.vertical{z-index:14}.monaco-list-row.scrolling{display:none!important}.monaco-list.element-focused,.monaco-list.selection-single,.monaco-list.selection-multiple{outline:0!important}.monaco-list-type-filter-message{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;padding:40px 1em 1em;text-align:center;white-space:normal;opacity:.7;pointer-events:none}.monaco-list-type-filter-message:empty{display:none}.monaco-drag-image{display:inline-block;padding:1px 7px;border-radius:10px;font-size:12px;position:absolute;z-index:1000;background-color:var(--vscode-list-activeSelectionBackground);color:var(--vscode-list-activeSelectionForeground);outline:1px solid var(--vscode-list-focusOutline);outline-offset:-1px;max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-select-box-dropdown-container{display:none;box-sizing:border-box;border-radius:var(--vscode-cornerRadius-large);box-shadow:var(--vscode-shadow-lg)}.monaco-select-box-dropdown-container>.select-box-details-pane>.select-box-description-markdown *{margin:0}.monaco-select-box-dropdown-container>.select-box-details-pane>.select-box-description-markdown a:focus{outline:1px solid -webkit-focus-ring-color;outline-offset:-1px}.monaco-select-box-dropdown-container>.select-box-details-pane>.select-box-description-markdown code{line-height:15px;font-family:var(--monaco-monospace-font)}.monaco-select-box-dropdown-container.visible{display:flex;flex-direction:column;text-align:left;width:1px;overflow:hidden}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container{flex:0 0 auto;align-self:flex-start;width:100%;overflow:hidden;box-sizing:border-box}.monaco-select-box-dropdown-container>.select-box-details-pane{padding:5px 6px}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list:focus:before{outline:0!important}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list .monaco-list-row{cursor:pointer;padding-left:2px}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list .monaco-list-row>.option-text{text-overflow:ellipsis;overflow:hidden;padding-left:6px;white-space:nowrap;float:left}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list .monaco-list-row>.option-detail{text-overflow:ellipsis;overflow:hidden;padding-left:6px;white-space:nowrap;float:left;opacity:.7}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list .monaco-list-row>.option-decorator-right{text-overflow:ellipsis;overflow:hidden;padding-right:10px;white-space:nowrap;float:right}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list .monaco-list-row.option-separator{cursor:default;border-radius:0;padding:0}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list .monaco-list-row.option-separator>.option-text{visibility:hidden;width:0;float:none}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list .monaco-list-row.option-separator>.option-detail{display:none}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list .monaco-list-row.option-separator>.option-decorator-right{color:var(--vscode-descriptionForeground);font-size:12px}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list .monaco-list-row.option-separator:after{content:"";position:absolute;left:0;right:0;top:50%;height:1px;background-color:var(--vscode-menu-separatorBackground)}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list .monaco-list-row>.visually-hidden{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}.monaco-select-box-dropdown-container>.select-box-dropdown-container-width-control{flex:1 1 auto;align-self:flex-start;opacity:0}.monaco-select-box-dropdown-container>.select-box-dropdown-container-width-control>.width-control-div{overflow:hidden;max-height:0px}.monaco-select-box-dropdown-container>.select-box-dropdown-container-width-control>.width-control-div>.option-text-width-control{padding-left:8px;padding-right:8px;white-space:nowrap}.monaco-action-bar{white-space:nowrap;height:100%}.monaco-action-bar .actions-container{display:flex;margin:0 auto;padding:0;height:100%;width:100%;align-items:center}.monaco-action-bar.vertical .actions-container{display:inline-block}.monaco-action-bar .action-item{display:block;align-items:center;justify-content:center;cursor:pointer;position:relative}.monaco-action-bar .action-item.disabled{cursor:default}.monaco-action-bar .action-item .icon,.monaco-action-bar .action-item .codicon{display:block}.monaco-action-bar .action-item .codicon{display:flex;align-items:center;width:16px;height:16px}.monaco-action-bar .action-label,.monaco-action-bar .action-item .keybinding{display:flex;font-size:11px;padding:3px;border-radius:var(--vscode-cornerRadius-medium)}.monaco-action-bar .action-item.disabled .action-label:not(.icon),.monaco-action-bar .action-item.disabled .action-label:not(.icon):before,.monaco-action-bar .action-item.disabled .action-label:not(.icon):hover{color:var(--vscode-disabledForeground)}.monaco-action-bar .action-item.disabled .action-label.icon,.monaco-action-bar .action-item.disabled .action-label.icon:before,.monaco-action-bar .action-item.disabled .action-label.icon:hover{opacity:.6}.monaco-action-bar.vertical{text-align:left}.monaco-action-bar.vertical .action-item{display:block}.monaco-action-bar.vertical .action-item .action-label.separator{display:block;border-bottom:1px solid var(--vscode-menu-separatorBackground, var(--vscode-disabledForeground));padding-top:1px;margin:4px .8em;width:100%;height:0;background-color:transparent}.monaco-action-bar .action-item .action-label.separator{width:1px;height:16px;margin:5px 4px!important;cursor:default;min-width:1px;padding:0;background-color:var(--vscode-disabledForeground)}.secondary-actions .monaco-action-bar .action-label{margin-left:6px}.monaco-action-bar .action-item.select-container{overflow:hidden;flex:1;max-width:170px;min-width:60px;display:flex;align-items:center;justify-content:center;margin-right:10px}.monaco-action-bar .action-item.action-dropdown-item{display:flex}.monaco-action-bar .action-item.action-dropdown-item>.action-dropdown-item-separator{display:flex;align-items:center;cursor:default}.monaco-action-bar .action-item.action-dropdown-item>.action-dropdown-item-separator>div{width:1px}.monaco-dropdown{height:100%;padding:0}.monaco-dropdown>.dropdown-label{cursor:pointer;height:100%;display:flex;align-items:center;justify-content:center}.monaco-dropdown>.dropdown-label>.action-label.disabled{cursor:default}.monaco-dropdown .dropdown-menu{border-radius:var(--vscode-cornerRadius-large);box-shadow:var(--vscode-shadow-lg)}.monaco-dropdown-with-primary{display:flex!important;flex-direction:row;border-radius:5px}.monaco-dropdown-with-primary>.action-container>.action-label{margin-right:0}.monaco-dropdown-with-primary>.dropdown-action-container>.monaco-dropdown>.dropdown-label .codicon[class*=codicon-]{font-size:12px;padding-left:0;padding-right:0;line-height:16px;margin-left:-3px}.monaco-dropdown-with-primary>.dropdown-action-container>.monaco-dropdown>.dropdown-label>.action-label{display:block;background-size:16px;background-position:center center;background-repeat:no-repeat}.monaco-action-bar .action-item.menu-entry .action-label.icon{width:16px;height:16px;background-repeat:no-repeat;background-position:50%;background-size:16px}.monaco-action-bar .action-item.menu-entry.text-only .action-label{color:var(--vscode-descriptionForeground);overflow:hidden;border-radius:2px}.monaco-action-bar .action-item.menu-entry.text-only.use-comma:not(:last-of-type) .action-label:after{content:", "}.monaco-action-bar .action-item.menu-entry.text-only+.action-item:not(.text-only)>.monaco-dropdown .action-label{color:var(--vscode-descriptionForeground)}.monaco-dropdown-with-default{display:flex!important;flex-direction:row;border-radius:5px}.monaco-dropdown-with-default>.action-container>.action-label{margin-right:0}.monaco-dropdown-with-default>.action-container.menu-entry>.action-label.icon{width:16px;height:16px;background-repeat:no-repeat;background-position:50%;background-size:16px}.monaco-dropdown-with-default>.action-container.disabled{cursor:default}.monaco-dropdown-with-default>.action-container.disabled>.action-label{opacity:.4;pointer-events:none}.monaco-dropdown-with-default:hover{background-color:var(--vscode-toolbar-hoverBackground)}.monaco-dropdown-with-default>.dropdown-action-container>.monaco-dropdown>.dropdown-label .codicon[class*=codicon-]{font-size:12px;padding-left:0;padding-right:0;line-height:16px;margin-left:-3px}.monaco-dropdown-with-default>.dropdown-action-container>.monaco-dropdown>.dropdown-label>.action-label{display:block;background-size:16px;background-position:center center;background-repeat:no-repeat}:root{--vscode-sash-size: 4px;--vscode-sash-hover-size: 4px}.monaco-sash{position:absolute;z-index:35;touch-action:none}.monaco-sash.disabled{pointer-events:none}.monaco-sash.mac.vertical{cursor:col-resize}.monaco-sash.vertical.minimum{cursor:e-resize}.monaco-sash.vertical.maximum{cursor:w-resize}.monaco-sash.mac.horizontal{cursor:row-resize}.monaco-sash.horizontal.minimum{cursor:s-resize}.monaco-sash.horizontal.maximum{cursor:n-resize}.monaco-sash.disabled{cursor:default!important;pointer-events:none!important}.monaco-sash.vertical{cursor:ew-resize;top:0;width:var(--vscode-sash-size);height:100%}.monaco-sash.horizontal{cursor:ns-resize;left:0;width:100%;height:var(--vscode-sash-size)}.monaco-sash:not(.disabled)>.orthogonal-drag-handle{content:" ";height:calc(var(--vscode-sash-size) * 2);width:calc(var(--vscode-sash-size) * 2);z-index:100;display:block;cursor:all-scroll;position:absolute}.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)>.orthogonal-drag-handle.start,.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)>.orthogonal-drag-handle.end{cursor:nwse-resize}.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)>.orthogonal-drag-handle.end,.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)>.orthogonal-drag-handle.start{cursor:nesw-resize}.monaco-sash.vertical>.orthogonal-drag-handle.start{left:calc(var(--vscode-sash-size) * -.5);top:calc(var(--vscode-sash-size) * -1)}.monaco-sash.vertical>.orthogonal-drag-handle.end{left:calc(var(--vscode-sash-size) * -.5);bottom:calc(var(--vscode-sash-size) * -1)}.monaco-sash.horizontal>.orthogonal-drag-handle.start{top:calc(var(--vscode-sash-size) * -.5);left:calc(var(--vscode-sash-size) * -1)}.monaco-sash.horizontal>.orthogonal-drag-handle.end{top:calc(var(--vscode-sash-size) * -.5);right:calc(var(--vscode-sash-size) * -1)}.monaco-sash:before{content:"";pointer-events:none;position:absolute;width:100%;height:100%;background:transparent}.monaco-enable-motion .monaco-sash:before{transition:background-color .1s ease-out}.monaco-sash.hover:before,.monaco-sash.active:before{background:var(--vscode-sash-hoverBorder)}.monaco-sash.vertical:before{width:var(--vscode-sash-hover-size);left:calc(50% - (var(--vscode-sash-hover-size) / 2))}.monaco-sash.horizontal:before{height:var(--vscode-sash-hover-size);top:calc(50% - (var(--vscode-sash-hover-size) / 2))}.pointer-events-disabled{pointer-events:none!important}.monaco-sash.debug{background:#0ff}.monaco-sash.debug.disabled{background:#0ff3}.monaco-sash.debug:not(.disabled)>.orthogonal-drag-handle{background:red}.monaco-split-view2{position:relative;width:100%;height:100%}.monaco-split-view2>.sash-container{position:absolute;width:100%;height:100%;pointer-events:none}.monaco-split-view2>.sash-container>.monaco-sash{pointer-events:initial}.monaco-split-view2>.monaco-scrollable-element{width:100%;height:100%}.monaco-split-view2>.monaco-scrollable-element>.split-view-container{width:100%;height:100%;white-space:nowrap;position:relative}.monaco-split-view2>.monaco-scrollable-element>.split-view-container>.split-view-view{white-space:initial;position:absolute}.monaco-split-view2>.monaco-scrollable-element>.split-view-container>.split-view-view:not(.visible){display:none}.monaco-split-view2.vertical>.monaco-scrollable-element>.split-view-container>.split-view-view{width:100%}.monaco-split-view2.horizontal>.monaco-scrollable-element>.split-view-container>.split-view-view{height:100%}.monaco-split-view2.separator-border>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before{content:" ";position:absolute;top:0;left:0;z-index:5;pointer-events:none;background-color:var(--separator-border)}.monaco-split-view2.separator-border.horizontal>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before{height:100%;width:1px}.monaco-split-view2.separator-border.vertical>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before{height:1px;width:100%}.monaco-table{display:flex;flex-direction:column;position:relative;height:100%;width:100%;white-space:nowrap;overflow:hidden}.monaco-table>.monaco-split-view2{border-bottom:1px solid transparent}.monaco-table>.monaco-list{flex:1}.monaco-table-tr{display:flex;height:100%}.monaco-table-th{width:100%;height:100%;font-weight:700;overflow:hidden;text-overflow:ellipsis}.monaco-table-th,.monaco-table-td{box-sizing:border-box;flex-shrink:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.monaco-table>.monaco-split-view2 .monaco-sash.vertical:before{content:"";position:absolute;left:calc(var(--vscode-sash-size) / 2);width:0;border-left:1px solid transparent}.monaco-enable-motion .monaco-table>.monaco-split-view2,.monaco-enable-motion .monaco-table>.monaco-split-view2 .monaco-sash.vertical:before{transition:border-color .2s ease-out}.monaco-custom-toggle{margin-left:2px;float:left;cursor:pointer;overflow:hidden;width:20px;height:20px;border-radius:3px;border:1px solid transparent;padding:1px;box-sizing:border-box;user-select:none;-webkit-user-select:none}.monaco-custom-toggle:hover{background-color:var(--vscode-inputOption-hoverBackground)}.monaco-custom-toggle.disabled{opacity:.4;cursor:default;pointer-events:none}.hc-black .monaco-custom-toggle:hover,.hc-light .monaco-custom-toggle:hover{border:1px dashed var(--vscode-focusBorder)}.hc-black .monaco-custom-toggle,.hc-light .monaco-custom-toggle,.hc-black .monaco-custom-toggle:hover,.hc-light .monaco-custom-toggle:hover{background:none}.monaco-custom-toggle.monaco-checkbox{height:18px;width:18px;border:1px solid transparent;border-radius:3px;margin-right:9px;margin-left:0;padding:0;opacity:1;background-size:16px!important}.monaco-action-bar .checkbox-action-item{display:flex;align-items:center;border-radius:2px;padding-right:2px}.monaco-action-bar .checkbox-action-item:hover{background-color:var(--vscode-toolbar-hoverBackground)}.monaco-action-bar .checkbox-action-item>.monaco-custom-toggle.monaco-checkbox{margin-right:4px}.monaco-action-bar .checkbox-action-item>.checkbox-label{font-size:12px}.monaco-inputbox{position:relative;display:block;padding:0;box-sizing:border-box;border-radius:4px;font-size:inherit}.monaco-inputbox>.ibwrapper>.input,.monaco-inputbox>.ibwrapper>.mirror{padding:4px 6px}.monaco-inputbox>.ibwrapper{position:relative;width:100%}.monaco-inputbox>.ibwrapper>.input{display:inline-block;box-sizing:border-box;width:100%;height:100%;line-height:inherit;border:none;font-family:inherit;font-size:inherit;resize:none;color:inherit}.monaco-inputbox>.ibwrapper>input{text-overflow:ellipsis}.monaco-inputbox>.ibwrapper>textarea.input{display:block;scrollbar-width:none;outline:none}.monaco-inputbox>.ibwrapper>textarea.input::-webkit-scrollbar{display:none}.monaco-inputbox>.ibwrapper>textarea.input.empty{white-space:nowrap}.monaco-inputbox>.ibwrapper>.mirror{position:absolute;display:inline-block;width:100%;top:0;left:0;box-sizing:border-box;white-space:pre-wrap;visibility:hidden;word-wrap:break-word}.monaco-inputbox-container{text-align:right}.monaco-inputbox-container .monaco-inputbox-message{display:inline-block;overflow:hidden;text-align:left;width:100%;box-sizing:border-box;padding:.4em;font-size:12px;line-height:17px;margin-top:-1px;word-wrap:break-word}.monaco-inputbox .monaco-action-bar{position:absolute;right:2px;top:4px}.monaco-inputbox .monaco-action-bar .action-item{margin-left:2px}.monaco-inputbox .monaco-action-bar .action-item .codicon{background-repeat:no-repeat;width:16px;height:16px;color:var(--vscode-icon-foreground)}.monaco-findInput{position:relative}.monaco-findInput .monaco-inputbox{font-size:13px;width:100%}.monaco-findInput>.controls{position:absolute;top:3px;right:2px}.vs .monaco-findInput.disabled{background-color:#e1e1e1}.vs-dark .monaco-findInput.disabled{background-color:#333}.monaco-findInput.highlight-0 .controls,.hc-light .monaco-findInput.highlight-0 .controls{animation:monaco-findInput-highlight-0 .1s linear 0s}.monaco-findInput.highlight-1 .controls,.hc-light .monaco-findInput.highlight-1 .controls{animation:monaco-findInput-highlight-1 .1s linear 0s}.hc-black .monaco-findInput.highlight-0 .controls,.vs-dark .monaco-findInput.highlight-0 .controls{animation:monaco-findInput-highlight-dark-0 .1s linear 0s}.hc-black .monaco-findInput.highlight-1 .controls,.vs-dark .monaco-findInput.highlight-1 .controls{animation:monaco-findInput-highlight-dark-1 .1s linear 0s}@keyframes monaco-findInput-highlight-0{0%{background:#fdff00cc}to{background:transparent}}@keyframes monaco-findInput-highlight-1{0%{background:#fdff00cc}99%{background:transparent}}@keyframes monaco-findInput-highlight-dark-0{0%{background:#ffffff70}to{background:transparent}}@keyframes monaco-findInput-highlight-dark-1{0%{background:#ffffff70}99%{background:transparent}}.monaco-tl-row{display:flex;height:100%;align-items:center;position:relative}.monaco-tl-row.disabled{cursor:default}.monaco-tl-indent{height:100%;position:absolute;top:0;left:16px;pointer-events:none}.hide-arrows .monaco-tl-indent{left:12px}.monaco-tl-indent>.indent-guide{display:inline-block;box-sizing:border-box;height:100%;border-left:1px solid transparent;opacity:0}.monaco-enable-motion .monaco-tl-indent>.indent-guide{transition:opacity .1s linear}.monaco-tl-twistie,.monaco-tl-contents{height:100%}.monaco-tl-twistie{font-size:10px;text-align:right;padding-right:6px;flex-shrink:0;width:16px;display:flex!important;align-items:center;justify-content:center;transform:translate(3px)}.monaco-tl-contents{flex:1;overflow:hidden}.monaco-tl-twistie:before{border-radius:20px}.monaco-tl-twistie.collapsed:before{transform:rotate(-90deg)}.monaco-tl-twistie.codicon-tree-item-loading:before{animation:codicon-spin 1.25s steps(30) infinite;transform-origin:center center}.monaco-tree-type-filter{position:absolute;top:0;right:0;display:flex;padding:3px;max-width:200px;z-index:100;margin:0 10px 0 6px;border:1px solid var(--vscode-widget-border);border-bottom-left-radius:4px;border-bottom-right-radius:4px}.monaco-enable-motion .monaco-tree-type-filter{transition:top .3s}.monaco-tree-type-filter.disabled{top:-40px!important}.monaco-tree-type-filter-input{flex:1}.monaco-tree-type-filter-input .monaco-inputbox{height:23px}.monaco-tree-type-filter-input .monaco-inputbox>.ibwrapper>.input,.monaco-tree-type-filter-input .monaco-inputbox>.ibwrapper>.mirror{padding:2px 4px}.monaco-tree-type-filter-input .monaco-findInput>.controls{top:2px}.monaco-tree-type-filter-actionbar{margin-left:4px}.monaco-tree-type-filter-actionbar .monaco-action-bar .action-label{padding:2px}.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container{position:absolute;top:0;left:0;width:100%;height:0;z-index:13;background-color:var(--vscode-sideBar-background)}.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-row.monaco-list-row{position:absolute;width:100%;opacity:1!important;overflow:hidden;background-color:var(--vscode-sideBar-background)}.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-row:hover{background-color:var(--vscode-list-hoverBackground)!important;cursor:pointer}.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container.empty,.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container.empty .monaco-tree-sticky-container-shadow{display:none}.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-container-shadow{position:absolute;bottom:-3px;left:0;height:0px;width:100%}.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container[tabindex="0"]:focus{outline:none}.quick-input-widget{font-size:13px}.quick-input-widget .monaco-highlighted-label .highlight{color:#0066bf}.vs .quick-input-widget .monaco-list-row.focused .monaco-highlighted-label .highlight{color:#9dddff}.vs-dark .quick-input-widget .monaco-highlighted-label .highlight{color:#0097fb}.hc-black .quick-input-widget .monaco-highlighted-label .highlight{color:#f38518}.hc-light .quick-input-widget .monaco-highlighted-label .highlight{color:#0f4a85}.monaco-keybinding>.monaco-keybinding-key{background-color:#ddd6;border:solid 1px rgba(204,204,204,.4);border-bottom-color:#bbb6;box-shadow:inset 0 -1px #bbb6;color:#555}.hc-black .monaco-keybinding>.monaco-keybinding-key{background-color:transparent;border:solid 1px rgb(111,195,223);box-shadow:none;color:#fff}.hc-light .monaco-keybinding>.monaco-keybinding-key{background-color:transparent;border:solid 1px #0F4A85;box-shadow:none;color:#292929}.vs-dark .monaco-keybinding>.monaco-keybinding-key{background-color:#8080802b;border:solid 1px rgba(51,51,51,.6);border-bottom-color:#4449;box-shadow:inset 0 -1px #4449;color:#ccc}.quick-input-widget{position:absolute;width:600px;z-index:2550;left:50%;-webkit-app-region:no-drag;border-radius:var(--vscode-cornerRadius-xLarge);box-shadow:var(--vscode-shadow-xl)}.quick-input-titlebar{cursor:grab;display:flex;align-items:center;border-top-right-radius:5px;border-top-left-radius:5px}.quick-input-widget.no-drag .quick-input-titlebar,.quick-input-widget.no-drag .quick-input-title,.quick-input-widget.no-drag .quick-input-header{cursor:default}.quick-input-widget .monaco-inputbox .monaco-action-bar{top:0}.quick-input-widget .monaco-action-bar .monaco-custom-toggle{margin-left:0;border-radius:5px;box-sizing:content-box}.quick-input-left-action-bar{display:flex;margin-left:4px}.quick-input-inline-action-bar .actions-container>.action-item:first-child{margin-left:5px}.quick-input-inline-action-bar .actions-container>.action-item{margin-top:2px}.quick-input-title{cursor:grab;padding:3px 0;text-align:center;text-overflow:ellipsis;overflow:hidden;flex:1}.quick-input-right-action-bar{display:flex;margin-right:4px}.quick-input-right-action-bar .actions-container{justify-content:flex-end}.quick-input-right-action-bar .actions-container>.action-item{margin-left:4px}.quick-input-inline-action-bar .actions-container>.action-item{margin-left:4px}.quick-input-titlebar .monaco-action-bar .action-label.codicon{background-position:center;background-repeat:no-repeat;padding:2px}.quick-input-description{margin:6px 6px 6px 11px}.quick-input-header .quick-input-description{margin:4px 2px;flex:1}.quick-input-header{cursor:grab;display:flex;padding:6px 6px 4px}.quick-input-widget .quick-input-filter .monaco-inputbox{border-radius:var(--vscode-cornerRadius-medium)}.quick-input-widget.hidden-input .quick-input-header{padding:0;margin-bottom:0}.quick-input-and-message{display:flex;flex-direction:column;flex-grow:1;min-width:0;position:relative}.quick-input-check-all{align-self:center;margin:0}.quick-input-widget .quick-input-header .monaco-checkbox{margin-top:6px}.quick-input-filter{flex-grow:1;display:flex;position:relative}.quick-input-box{flex-grow:1}.quick-input-widget.show-checkboxes .quick-input-box,.quick-input-widget.show-checkboxes .quick-input-message{margin-left:5px}.quick-input-visible-count{position:absolute;left:-10000px}.quick-input-count{align-self:center;position:absolute;right:4px;display:flex;align-items:center}.quick-input-count .monaco-count-badge{vertical-align:middle;padding:2px 4px;border-radius:2px;min-height:auto;line-height:normal}.quick-input-action{margin-left:6px}.quick-input-message{margin-top:-1px;padding:5px;overflow-wrap:break-word}.quick-input-message>.codicon{margin:0 .2em;vertical-align:text-bottom}.quick-input-message a{color:inherit}.quick-input-progress.monaco-progress-container{position:relative}.quick-input-list{line-height:22px}.quick-input-widget.hidden-input .quick-input-list{margin-top:4px;padding-bottom:4px}.quick-input-list .monaco-list{overflow:hidden;max-height:440px;padding-bottom:7px}.quick-input-list .monaco-scrollable-element{padding:0 6px}.quick-input-list .quick-input-list-entry{box-sizing:border-box;overflow:hidden;display:flex;padding:0 6px}.quick-input-list .quick-input-list-entry.quick-input-list-separator-border{border-top-width:1px;border-top-style:solid}.quick-input-list .monaco-list-row{border-radius:3px}.quick-input-list .monaco-list-row[data-index="0"] .quick-input-list-entry.quick-input-list-separator-border{border-top-style:none}.quick-input-list .quick-input-list-label{overflow:hidden;display:flex;height:100%;flex:1}.quick-input-widget .monaco-checkbox{margin-right:0}.quick-input-widget .quick-input-list .monaco-checkbox,.quick-input-widget .quick-input-tree .monaco-checkbox{margin-top:4px}.quick-input-list .quick-input-list-icon{background-size:16px;background-position:left center;background-repeat:no-repeat;padding-right:6px;width:16px;height:22px;display:flex;align-items:center;justify-content:center}.quick-input-list .quick-input-list-rows{overflow:hidden;text-overflow:ellipsis;display:flex;flex-direction:column;height:100%;flex:1;margin-left:5px}.quick-input-list .quick-input-list-rows>.quick-input-list-row{display:flex;align-items:center}.quick-input-list .quick-input-list-rows>.quick-input-list-row .monaco-icon-label,.quick-input-list .quick-input-list-rows>.quick-input-list-row .monaco-icon-label .monaco-icon-label-container>.monaco-icon-name-container{flex:1}.quick-input-list .quick-input-list-rows>.quick-input-list-row .codicon[class*=codicon-]{vertical-align:text-bottom}.quick-input-list .quick-input-list-rows .monaco-highlighted-label>span{opacity:1}.quick-input-list .quick-input-list-entry .quick-input-list-entry-keybinding{margin-right:8px}.quick-input-list .quick-input-list-label-meta{opacity:.7;line-height:normal;text-overflow:ellipsis;overflow:hidden}.quick-input-list .monaco-list .monaco-list-row .monaco-highlighted-label .highlight{font-weight:700;background-color:unset;color:var(--vscode-list-highlightForeground)!important}.quick-input-list .monaco-list .monaco-list-row.focused .monaco-highlighted-label .highlight{color:var(--vscode-quickInputList-focusHighlightForeground)!important}.quick-input-list .quick-input-list-entry .quick-input-list-separator{margin-right:4px;font-size:var(--vscode-bodyFontSize-xSmall);color:var(--vscode-descriptionForeground)}.quick-input-list .quick-input-list-entry-action-bar{display:flex;flex:0;overflow:visible}.quick-input-list .quick-input-list-entry-action-bar .action-label,.quick-input-list .quick-input-list-entry-action-bar .monaco-custom-toggle{display:none}.quick-input-list .quick-input-list-entry-action-bar .action-label.codicon{margin-right:4px;padding:2px}.quick-input-list .quick-input-list-entry-action-bar .monaco-custom-toggle.codicon{margin-right:4px}.quick-input-list .quick-input-list-entry-action-bar{margin-top:1px}.quick-input-list .quick-input-list-entry-action-bar{margin-right:4px}.quick-input-list .quick-input-list-entry .quick-input-list-entry-action-bar .action-label.always-visible,.quick-input-list .quick-input-list-entry:hover .quick-input-list-entry-action-bar .action-label,.quick-input-list .quick-input-list-entry.focus-inside .quick-input-list-entry-action-bar .action-label,.quick-input-list .monaco-list-row.focused .quick-input-list-entry-action-bar .action-label,.quick-input-list .monaco-list-row.passive-focused .quick-input-list-entry-action-bar .action-label,.quick-input-list .quick-input-list-entry .quick-input-list-entry-action-bar .monaco-custom-toggle.always-visible,.quick-input-list .quick-input-list-entry:hover .quick-input-list-entry-action-bar .monaco-custom-toggle,.quick-input-list .quick-input-list-entry.focus-inside .quick-input-list-entry-action-bar .monaco-custom-toggle,.quick-input-list .monaco-list-row.focused .quick-input-list-entry-action-bar .monaco-custom-toggle,.quick-input-list .monaco-list-row.passive-focused .quick-input-list-entry-action-bar .monaco-custom-toggle{display:flex}.quick-input-list>.monaco-list:focus .monaco-list-row.focused{outline:1px solid var(--vscode-list-focusOutline)!important;outline-offset:-1px}.quick-input-list>.monaco-list:focus .monaco-list-row.focused .quick-input-list-entry.quick-input-list-separator-border{border-color:transparent}.quick-input-list .monaco-list-row.focused .monaco-keybinding-key,.quick-input-list .monaco-list-row.focused .quick-input-list-entry .quick-input-list-separator{color:inherit}.quick-input-list .monaco-list-row.focused .monaco-keybinding-key,.quick-input-list .monaco-list-row:hover .monaco-keybinding-key{background:none;border-color:var(--vscode-widget-shadow)}:is(.vs,.vs-dark) .quick-input-list .monaco-list-row.focused .monaco-keybinding-key,:is(.vs,.vs-dark) .quick-input-list .monaco-list-row:hover .monaco-keybinding-key{border-color:color-mix(in srgb,currentColor 30%,transparent)}.quick-input-list .quick-input-list-separator-as-item{padding:4px 6px;font-size:12px}.quick-input-list .quick-input-list-separator-as-item .label-name{font-weight:600}.quick-input-list .quick-input-list-separator-as-item .label-description{opacity:1!important}.quick-input-list .monaco-tree-sticky-row .quick-input-list-entry.quick-input-list-separator-as-item.quick-input-list-separator-border{border-top-style:none}.quick-input-list .monaco-tree-sticky-row{padding:0 5px}.quick-input-list .monaco-tl-twistie{display:none!important}.quick-input-tree .monaco-list{overflow:hidden;max-height:440px;padding-bottom:5px}.quick-input-tree.quick-input-tree-flat .monaco-tl-indent,.quick-input-tree.quick-input-tree-flat .monaco-tl-twistie{display:none!important}.quick-input-tree.quick-input-tree-flat .monaco-checkbox{margin-left:6px}.quick-input-tree .quick-input-tree-entry{box-sizing:border-box;overflow:hidden;display:flex;padding-right:6px}.quick-input-tree .quick-input-tree-label{overflow:hidden;display:flex;height:100%;flex:1}.quick-input-tree .quick-input-tree-icon{background-size:16px;background-position:left center;background-repeat:no-repeat;padding-right:6px;width:16px;height:22px;display:flex;align-items:center;justify-content:center}.quick-input-tree .quick-input-tree-rows{overflow:hidden;text-overflow:ellipsis;display:flex;flex-direction:column;height:100%;flex:1;margin-left:5px}.quick-input-tree .quick-input-tree-rows>.quick-input-tree-row{display:flex;align-items:center}.quick-input-tree .quick-input-tree-rows>.quick-input-tree-row .monaco-icon-label,.quick-input-tree .quick-input-tree-rows>.quick-input-tree-row .monaco-icon-label .monaco-icon-label-container>.monaco-icon-name-container{flex:1}.quick-input-tree .quick-input-tree-rows>.quick-input-tree-row .codicon[class*=codicon-]{vertical-align:text-bottom}.quick-input-tree .quick-input-tree-rows .monaco-highlighted-label>span{opacity:1}.quick-input-tree .quick-input-tree-entry-action-bar{display:flex;flex:0;overflow:visible}.quick-input-tree .quick-input-tree-entry-action-bar .action-label,.quick-input-tree .quick-input-tree-entry-action-bar .monaco-custom-toggle{display:none}.quick-input-tree .quick-input-tree-entry-action-bar .action-label.codicon{margin-right:4px;padding:2px}.quick-input-tree .quick-input-tree-entry-action-bar .monaco-custom-toggle.codicon{margin-right:4px}.quick-input-tree .quick-input-tree-entry-action-bar{margin-top:1px}.quick-input-tree .quick-input-tree-entry-action-bar{margin-right:4px}.quick-input-tree .quick-input-tree-entry .quick-input-tree-entry-action-bar .action-label.always-visible,.quick-input-tree .quick-input-tree-entry:hover .quick-input-tree-entry-action-bar .action-label,.quick-input-tree .quick-input-tree-entry.focus-inside .quick-input-tree-entry-action-bar .action-label,.quick-input-tree .monaco-list-row.focused .quick-input-tree-entry-action-bar .action-label,.quick-input-tree .monaco-list-row.passive-focused .quick-input-tree-entry-action-bar .action-label,.quick-input-tree .quick-input-tree-entry .quick-input-tree-entry-action-bar .monaco-custom-toggle.always-visible,.quick-input-tree .quick-input-tree-entry:hover .quick-input-tree-entry-action-bar .monaco-custom-toggle,.quick-input-tree .quick-input-tree-entry.focus-inside .quick-input-tree-entry-action-bar .monaco-custom-toggle,.quick-input-tree .monaco-list-row.focused .quick-input-tree-entry-action-bar .monaco-custom-toggle,.quick-input-tree .monaco-list-row.passive-focused .quick-input-tree-entry-action-bar .monaco-custom-toggle{display:flex}.quick-input-tree>.monaco-list:focus .monaco-list-row.focused{outline:1px solid var(--vscode-list-focusOutline)!important;outline-offset:-1px}.monaco-toolbar{height:100%}.monaco-toolbar .toolbar-toggle-more{display:inline-block;padding:0}.monaco-toolbar.responsive.responsive-all .monaco-action-bar>.actions-container>.action-item{flex-shrink:1;min-width:var(--vscode-toolbar-action-min-width, 20px)}.monaco-toolbar.responsive.responsive-last .monaco-action-bar>.actions-container>.action-item{flex-shrink:0}.monaco-toolbar.responsive.responsive-last .monaco-action-bar:not(.has-overflow)>.actions-container>.action-item:last-child,.monaco-toolbar.responsive.responsive-last .monaco-action-bar.has-overflow>.actions-container>.action-item:nth-last-child(2){flex-shrink:1;min-width:var(--vscode-toolbar-action-min-width, 20px)}.monaco-text-button{box-sizing:border-box;display:flex;width:100%;padding:4px 8px;border-radius:4px;text-align:center;cursor:pointer;justify-content:center;align-items:center;border:1px solid var(--vscode-button-border, transparent);line-height:16px;font-size:12px;overflow-wrap:normal}.monaco-text-button.secondary{border-color:var(--vscode-button-secondaryBorder, var(--vscode-button-border, transparent))}.monaco-text-button.small{line-height:14px;font-size:11px;padding:3px 6px}.monaco-text-button:focus{outline-offset:2px!important}.monaco-text-button:hover{text-decoration:none!important}.monaco-button.disabled:focus,.monaco-button.disabled{opacity:.4!important;cursor:default}.monaco-text-button .codicon{margin:0 .2em;color:inherit!important}.monaco-text-button.monaco-text-button-with-short-label{flex-direction:row;flex-wrap:wrap;padding:0 4px;overflow:hidden;height:28px}.monaco-text-button.monaco-text-button-with-short-label>.monaco-button-label{flex-basis:100%}.monaco-text-button.monaco-text-button-with-short-label>.monaco-button-label-short{flex-grow:1;width:0;overflow:hidden}.monaco-text-button.monaco-text-button-with-short-label>.monaco-button-label,.monaco-text-button.monaco-text-button-with-short-label>.monaco-button-label-short{display:flex;justify-content:center;align-items:center;font-weight:400;font-style:inherit;line-height:18px;padding:4px 0}.monaco-button-dropdown{display:flex;cursor:pointer}.monaco-button-dropdown.disabled{cursor:default}.monaco-button-dropdown>.monaco-button:focus{outline-offset:-1px!important}.monaco-button-dropdown.disabled>.monaco-button.disabled,.monaco-button-dropdown.disabled>.monaco-button.disabled:focus,.monaco-button-dropdown.disabled>.monaco-button-dropdown-separator{opacity:.4!important}.monaco-button-dropdown>.monaco-button.monaco-text-button{border-right-width:0!important}.monaco-button-dropdown .monaco-button-dropdown-separator{padding:4px 0;cursor:default}.monaco-button-dropdown .monaco-button-dropdown-separator>div{height:100%;width:1px}.monaco-button-dropdown>.monaco-button.monaco-dropdown-button{border:1px solid var(--vscode-button-border, transparent);border-left-width:0!important;border-radius:0 4px 4px 0;padding:0 4px;display:flex;align-items:center}.monaco-button-dropdown>.monaco-button.monaco-dropdown-button.secondary{border-color:var(--vscode-button-secondaryBorder, var(--vscode-button-border, transparent))}.monaco-button-dropdown>.monaco-button.monaco-text-button{border-radius:4px 0 0 4px}.monaco-description-button{display:flex;flex-direction:column;align-items:center;margin:4px 5px}.monaco-description-button .monaco-button-description{font-style:italic;font-size:11px;padding:4px 20px}.monaco-description-button .monaco-button-label,.monaco-description-button .monaco-button-description{display:flex;justify-content:center;align-items:center}.monaco-description-button .monaco-button-label>.codicon,.monaco-description-button .monaco-button-description>.codicon{margin:0 .2em;color:inherit!important}.monaco-button.default-colors,.monaco-button-dropdown.default-colors>.monaco-button{color:var(--vscode-button-foreground);background-color:var(--vscode-button-background)}.monaco-button.default-colors:hover,.monaco-button-dropdown.default-colors>.monaco-button:hover{background-color:var(--vscode-button-hoverBackground)}.monaco-button.default-colors.secondary,.monaco-button-dropdown.default-colors>.monaco-button.secondary{color:var(--vscode-button-secondaryForeground);background-color:var(--vscode-button-secondaryBackground)}.monaco-button.default-colors.secondary:hover,.monaco-button-dropdown.default-colors>.monaco-button.secondary:hover{background-color:var(--vscode-button-secondaryHoverBackground)}.monaco-button-dropdown.default-colors .monaco-button-dropdown-separator{background-color:var(--vscode-button-background);border-top:1px solid var(--vscode-button-border);border-bottom:1px solid var(--vscode-button-border)}.monaco-button-dropdown.default-colors .monaco-button.secondary+.monaco-button-dropdown-separator{background-color:var(--vscode-button-secondaryBackground);border-top-color:var(--vscode-button-secondaryBorder, var(--vscode-button-border));border-bottom-color:var(--vscode-button-secondaryBorder, var(--vscode-button-border))}.monaco-button-dropdown.default-colors .monaco-button-dropdown-separator>div{background-color:var(--vscode-button-separator)}.monaco-count-badge{padding:3px 5px;border-radius:11px;font-size:11px;min-width:18px;min-height:18px;line-height:11px;font-weight:400;text-align:center;display:inline-block;box-sizing:border-box}.monaco-count-badge.long{padding:2px 3px;border-radius:2px;min-height:auto;line-height:normal}.monaco-progress-container{width:100%;height:2px;overflow:hidden}.monaco-progress-container .progress-bit{width:2%;height:2px;position:absolute;left:0;display:none}.monaco-progress-container.active .progress-bit{display:inherit}.monaco-progress-container.discrete .progress-bit{left:0;transition:width .1s linear}.monaco-progress-container.discrete.done .progress-bit{width:100%}.monaco-progress-container.infinite .progress-bit{animation-name:progress;animation-duration:4s;animation-iteration-count:infinite;transform:translateZ(0);animation-timing-function:linear}.monaco-progress-container.infinite.infinite-long-running .progress-bit{animation-timing-function:steps(100)}@keyframes progress{0%{transform:translate(0) scaleX(1)}50%{transform:translate(2500%) scaleX(3)}to{transform:translate(4900%) scaleX(1)}}.monaco-icon-label{display:flex;overflow:hidden;text-overflow:ellipsis}.monaco-icon-label:before{background-size:16px;background-position:left center;background-repeat:no-repeat;padding-right:6px;width:16px;height:22px;line-height:inherit!important;display:inline-block;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:top;flex-shrink:0}.monaco-icon-label-iconpath{width:16px;height:22px;margin-right:6px;display:flex}.monaco-icon-label-container.disabled{color:var(--vscode-disabledForeground)}.monaco-icon-label>.monaco-icon-label-container{min-width:0;overflow:hidden;text-overflow:ellipsis;flex:1}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-name-container>.label-name{color:inherit;white-space:pre}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-name-container>.label-name>.label-separator{margin:0 2px;opacity:.5}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-suffix-container>.label-suffix{opacity:.7;white-space:pre}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{opacity:.7;margin-left:.5em;font-size:.9em;white-space:pre}.monaco-icon-label.nowrap>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{white-space:nowrap}.vs .monaco-icon-label>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{opacity:.95}.monaco-icon-label.bold>.monaco-icon-label-container>.monaco-icon-name-container>.label-name,.monaco-icon-label.bold>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{font-weight:700}.monaco-icon-label.italic>.monaco-icon-label-container>.monaco-icon-name-container>.label-name,.monaco-icon-label.italic>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{font-style:italic}.monaco-icon-label.deprecated{text-decoration:line-through;opacity:.66}.monaco-icon-label.strikethrough>.monaco-icon-label-container>.monaco-icon-name-container>.label-name,.monaco-icon-label.strikethrough>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{text-decoration:line-through}.monaco-icon-label:after{opacity:.75;font-size:90%;font-weight:600;margin:auto 16px 0 5px;text-align:center}.monaco-list:focus .selected .monaco-icon-label,.monaco-list:focus .selected .monaco-icon-label:after{color:inherit!important}.monaco-list-row.focused.selected .label-description,.monaco-list-row.selected .label-description{opacity:.8}.monaco-keybinding{display:flex;align-items:center;line-height:10px}.monaco-keybinding>.monaco-keybinding-key{display:inline-flex;align-items:center;border-style:solid;border-width:1px;border-radius:3px;justify-content:center;min-width:12px;font-size:11px;padding:3px 5px;margin:0 2px}.monaco-keybinding>.monaco-keybinding-key:first-child{margin-left:0}.monaco-keybinding>.monaco-keybinding-key:last-child{margin-right:0}.monaco-keybinding>.monaco-keybinding-key-separator{display:inline-block}.monaco-keybinding>.monaco-keybinding-key-chord-separator{width:6px}.monaco-diff-editor .diff-review{position:absolute}.monaco-component.diff-review{user-select:none;-webkit-user-select:none;z-index:99}.monaco-component.diff-review .diff-review-line-number{text-align:right;display:inline-block;color:var(--vscode-editorLineNumber-foreground)}.monaco-component.diff-review .diff-review-summary{padding-left:10px}.monaco-component.diff-review .diff-review-shadow{position:absolute;box-shadow:var(--vscode-scrollbar-shadow) 0 -6px 6px -6px inset}.monaco-component.diff-review .diff-review-row{white-space:pre}.monaco-component.diff-review .diff-review-table{display:table;min-width:100%}.monaco-component.diff-review .diff-review-row{display:table-row;width:100%}.monaco-component.diff-review .diff-review-spacer{display:inline-block;width:10px;vertical-align:middle}.monaco-component.diff-review .diff-review-spacer>.codicon{font-size:9px!important}.monaco-component.diff-review .diff-review-actions{display:inline-block;position:absolute;right:10px;top:2px;z-index:100}.monaco-component.diff-review .diff-review-actions .action-label{width:16px;height:16px;margin:2px 0}.monaco-component.diff-review .revertButton{cursor:pointer}.monaco-component.diff-review .action-label{background:var(--vscode-editorActionList-background)}.monaco-editor .diff-hidden-lines-widget{width:100%}.monaco-editor .diff-hidden-lines{height:0px;transform:translateY(-10px);font-size:13px;line-height:14px}.monaco-editor .diff-hidden-lines:not(.dragging) .top:hover,.monaco-editor .diff-hidden-lines:not(.dragging) .bottom:hover,.monaco-editor .diff-hidden-lines .top.dragging,.monaco-editor .diff-hidden-lines .bottom.dragging{background-color:var(--vscode-focusBorder)}.monaco-editor .diff-hidden-lines .top,.monaco-editor .diff-hidden-lines .bottom{transition:background-color .1s ease-out;height:4px;background-color:transparent;background-clip:padding-box;border-bottom:2px solid transparent;border-top:4px solid transparent}.monaco-editor.draggingUnchangedRegion.canMoveTop:not(.canMoveBottom) *,.monaco-editor .diff-hidden-lines .top.canMoveTop:not(.canMoveBottom),.monaco-editor .diff-hidden-lines .bottom.canMoveTop:not(.canMoveBottom){cursor:n-resize!important}.monaco-editor.draggingUnchangedRegion:not(.canMoveTop).canMoveBottom *,.monaco-editor .diff-hidden-lines .top:not(.canMoveTop).canMoveBottom,.monaco-editor .diff-hidden-lines .bottom:not(.canMoveTop).canMoveBottom{cursor:s-resize!important}.monaco-editor.draggingUnchangedRegion.canMoveTop.canMoveBottom *,.monaco-editor .diff-hidden-lines .top.canMoveTop.canMoveBottom,.monaco-editor .diff-hidden-lines .bottom.canMoveTop.canMoveBottom{cursor:ns-resize!important}.monaco-editor .diff-hidden-lines .top{transform:translateY(4px)}.monaco-editor .diff-hidden-lines .bottom{transform:translateY(-6px)}.monaco-editor .diff-unchanged-lines{background:var(--vscode-diffEditor-unchangedCodeBackground)}.monaco-editor .noModificationsOverlay{z-index:1;background:var(--vscode-editor-background);display:flex;justify-content:center;align-items:center}.monaco-editor .diff-hidden-lines .center{background:var(--vscode-diffEditor-unchangedRegionBackground);color:var(--vscode-diffEditor-unchangedRegionForeground);overflow:hidden;display:block;text-overflow:ellipsis;white-space:nowrap;height:24px;box-shadow:inset 0 -5px 5px -7px var(--vscode-diffEditor-unchangedRegionShadow),inset 0 5px 5px -7px var(--vscode-diffEditor-unchangedRegionShadow)}.monaco-editor .diff-hidden-lines .center span.codicon{vertical-align:middle}.monaco-editor .diff-hidden-lines .center a:hover .codicon{cursor:pointer;color:var(--vscode-editorLink-activeForeground)!important}.monaco-editor .diff-hidden-lines div.breadcrumb-item{cursor:pointer}.monaco-editor .diff-hidden-lines div.breadcrumb-item:hover{color:var(--vscode-editorLink-activeForeground)}.monaco-editor .movedOriginal,.monaco-editor .movedModified{border:2px solid var(--vscode-diffEditor-move-border)}.monaco-editor .movedOriginal.currentMove,.monaco-editor .movedModified.currentMove{border:2px solid var(--vscode-diffEditor-moveActive-border)}.monaco-diff-editor .moved-blocks-lines path.currentMove{stroke:var(--vscode-diffEditor-moveActive-border)}.monaco-diff-editor .moved-blocks-lines path{pointer-events:visiblestroke}.monaco-diff-editor .moved-blocks-lines .arrow{fill:var(--vscode-diffEditor-move-border)}.monaco-diff-editor .moved-blocks-lines .arrow.currentMove{fill:var(--vscode-diffEditor-moveActive-border)}.monaco-diff-editor .moved-blocks-lines .arrow-rectangle{fill:var(--vscode-editor-background)}.monaco-diff-editor .moved-blocks-lines{position:absolute;pointer-events:none}.monaco-diff-editor .moved-blocks-lines path{fill:none;stroke:var(--vscode-diffEditor-move-border);stroke-width:2}.monaco-editor .char-delete.diff-range-empty{margin-left:-1px;border-left:solid var(--vscode-diffEditor-removedTextBackground) 3px}.monaco-editor .char-insert.diff-range-empty{border-left:solid var(--vscode-diffEditor-insertedTextBackground) 3px}.monaco-editor .fold-unchanged{cursor:pointer}.monaco-diff-editor .diff-moved-code-block{display:flex;justify-content:flex-end;margin-top:-4px}.monaco-diff-editor .diff-moved-code-block .action-bar .action-label.codicon{width:12px;height:12px;font-size:12px}.monaco-diff-editor .diffOverview{z-index:9}.monaco-diff-editor .diffOverview .diffViewport{z-index:10}.monaco-diff-editor.vs .diffOverview{background:#00000008}.monaco-diff-editor.vs-dark .diffOverview{background:#ffffff03}.monaco-scrollable-element.modified-in-monaco-diff-editor.vs .scrollbar,.monaco-scrollable-element.modified-in-monaco-diff-editor.vs-dark .scrollbar{background:#0000}.monaco-scrollable-element.modified-in-monaco-diff-editor.hc-black .scrollbar,.monaco-scrollable-element.modified-in-monaco-diff-editor.hc-light .scrollbar{background:none}.monaco-scrollable-element.modified-in-monaco-diff-editor .slider{z-index:10}.modified-in-monaco-diff-editor .slider.active{background:#ababab66}.modified-in-monaco-diff-editor.hc-black .slider.active,.modified-in-monaco-diff-editor.hc-light .slider.active{background:none}.monaco-editor .insert-sign,.monaco-diff-editor .insert-sign,.monaco-editor .delete-sign,.monaco-diff-editor .delete-sign{font-size:11px!important;opacity:.7!important;display:flex!important;align-items:center}.monaco-editor.hc-black .insert-sign,.monaco-diff-editor.hc-black .insert-sign,.monaco-editor.hc-black .delete-sign,.monaco-diff-editor.hc-black .delete-sign,.monaco-editor.hc-light .insert-sign,.monaco-diff-editor.hc-light .insert-sign,.monaco-editor.hc-light .delete-sign,.monaco-diff-editor.hc-light .delete-sign{opacity:1}.monaco-editor .inline-deleted-margin-view-zone,.monaco-editor .inline-added-margin-view-zone{text-align:right}.monaco-editor .arrow-revert-change{z-index:10;position:absolute}.monaco-editor .arrow-revert-change:hover{cursor:pointer}.monaco-editor .view-zones .view-lines .view-line span{display:inline-block}.monaco-editor .margin-view-zones .lightbulb-glyph:hover{cursor:pointer}.monaco-editor .char-insert,.monaco-diff-editor .char-insert{background-color:var(--vscode-diffEditor-insertedTextBackground)}.monaco-editor .line-insert,.monaco-diff-editor .line-insert{background-color:var(--vscode-diffEditor-insertedLineBackground, var(--vscode-diffEditor-insertedTextBackground))}.monaco-editor .line-insert,.monaco-editor .char-insert{box-sizing:border-box;border:1px solid var(--vscode-diffEditor-insertedTextBorder)}.monaco-editor.hc-black .line-insert,.monaco-editor.hc-light .line-insert,.monaco-editor.hc-black .char-insert,.monaco-editor.hc-light .char-insert{border-style:dashed}.monaco-editor .line-delete,.monaco-editor .char-delete{box-sizing:border-box;border:1px solid var(--vscode-diffEditor-removedTextBorder)}.monaco-editor.hc-black .line-delete,.monaco-editor.hc-light .line-delete,.monaco-editor.hc-black .char-delete,.monaco-editor.hc-light .char-delete{border-style:dashed}.monaco-editor .inline-added-margin-view-zone,.monaco-editor .gutter-insert,.monaco-diff-editor .gutter-insert{background-color:var(--vscode-diffEditorGutter-insertedLineBackground, var(--vscode-diffEditor-insertedLineBackground), var(--vscode-diffEditor-insertedTextBackground))}.monaco-editor .char-delete,.monaco-diff-editor .char-delete,.monaco-editor .inline-deleted-text{background-color:var(--vscode-diffEditor-removedTextBackground)}.monaco-editor .inline-deleted-text{text-decoration:line-through}.monaco-editor .line-delete,.monaco-diff-editor .line-delete{background-color:var(--vscode-diffEditor-removedLineBackground, var(--vscode-diffEditor-removedTextBackground))}.monaco-editor .inline-deleted-margin-view-zone,.monaco-editor .gutter-delete,.monaco-diff-editor .gutter-delete{background-color:var(--vscode-diffEditorGutter-removedLineBackground, var(--vscode-diffEditor-removedLineBackground), var(--vscode-diffEditor-removedTextBackground))}.monaco-diff-editor.side-by-side .editor.modified{box-shadow:-6px 0 5px -5px var(--vscode-scrollbar-shadow);border-left:1px solid var(--vscode-diffEditor-border)}.monaco-diff-editor.side-by-side .editor.original{box-shadow:6px 0 5px -5px var(--vscode-scrollbar-shadow);border-right:1px solid var(--vscode-diffEditor-border)}.monaco-diff-editor .diffViewport{background:var(--vscode-scrollbarSlider-background)}.monaco-diff-editor .diffViewport:hover{background:var(--vscode-scrollbarSlider-hoverBackground)}.monaco-diff-editor .diffViewport:active{background:var(--vscode-scrollbarSlider-activeBackground)}.monaco-editor .diagonal-fill{background-image:linear-gradient(-45deg,var(--vscode-diffEditor-diagonalFill) 12.5%,#0000 12.5%,#0000 50%,var(--vscode-diffEditor-diagonalFill) 50%,var(--vscode-diffEditor-diagonalFill) 62.5%,#0000 62.5%,#0000 100%);background-size:8px 8px}.monaco-diff-editor .gutter{position:relative;overflow:hidden;flex-shrink:0;flex-grow:0}.monaco-diff-editor .gutter>div{position:absolute}.monaco-diff-editor .gutter .gutterItem{opacity:0;transition:opacity .7s}.monaco-diff-editor .gutter .gutterItem.showAlways{opacity:1;transition:none}.monaco-diff-editor .gutter .gutterItem.noTransition{transition:none}.monaco-diff-editor .gutter:hover .gutterItem{opacity:1;transition:opacity .1s ease-in-out}.monaco-diff-editor .gutter .gutterItem .background{position:absolute;height:100%;left:50%;width:1px;border-left:2px var(--vscode-menu-separatorBackground) solid}.monaco-diff-editor .gutter .gutterItem .buttons{position:absolute;width:100%;display:flex;justify-content:center;align-items:center}.monaco-diff-editor .gutter .gutterItem .buttons .monaco-toolbar{height:fit-content}.monaco-diff-editor .gutter .gutterItem .buttons .monaco-toolbar .monaco-action-bar{line-height:1}.monaco-diff-editor .gutter .gutterItem .buttons .monaco-toolbar .monaco-action-bar .actions-container{width:fit-content;border-radius:4px;background:var(--vscode-editorGutter-itemBackground)}.monaco-diff-editor .gutter .gutterItem .buttons .monaco-toolbar .monaco-action-bar .actions-container .action-item:hover{background:var(--vscode-toolbar-hoverBackground)}.monaco-diff-editor .gutter .gutterItem .buttons .monaco-toolbar .monaco-action-bar .actions-container .action-item .action-label{color:var(--vscode-editorGutter-itemGlyphForeground);padding:1px 2px}.monaco-diff-editor .diff-hidden-lines-compact{display:flex;height:11px}.monaco-diff-editor .diff-hidden-lines-compact .line-left,.monaco-diff-editor .diff-hidden-lines-compact .line-right{height:1px;border-top:1px solid;border-color:var(--vscode-editorCodeLens-foreground);opacity:.5;margin:auto;width:100%}.monaco-diff-editor .diff-hidden-lines-compact .line-left{width:20px}.monaco-diff-editor .diff-hidden-lines-compact .text{color:var(--vscode-editorCodeLens-foreground);text-wrap:nowrap;font-size:11px;line-height:11px;margin:0 4px}.monaco-editor .line-delete-selectable{user-select:text!important;-webkit-user-select:text!important;z-index:1!important}.line-delete-selectable .view-line{user-select:text!important;-webkit-user-select:text!important}.monaco-editor .rendered-markdown kbd{background-color:var(--vscode-keybindingLabel-background);color:var(--vscode-keybindingLabel-foreground);border-style:solid;border-width:1px;border-radius:3px;border-color:var(--vscode-keybindingLabel-border);border-bottom-color:var(--vscode-keybindingLabel-bottomBorder);box-shadow:inset 0 -1px 0 var(--vscode-widget-shadow);vertical-align:middle;padding:1px 3px}.rendered-markdown li:has(input[type=checkbox]){list-style-type:none}.monaco-component.multiDiffEditor{background:var(--vscode-multiDiffEditor-background);position:relative;height:100%;width:100%;overflow-y:hidden}.monaco-component.multiDiffEditor>div{position:absolute;top:0;left:0;height:100%;width:100%}.monaco-component.multiDiffEditor>div.placeholder{visibility:hidden;display:grid;place-items:center;place-content:center}.monaco-component.multiDiffEditor>div.placeholder.visible{visibility:visible}.monaco-component.multiDiffEditor>.multi-diff-root-floating-menu{position:absolute;inset:auto 28px 24px auto;width:auto}.monaco-component.multiDiffEditor .active{--vscode-multiDiffEditor-border: var(--vscode-focusBorder)}.monaco-component.multiDiffEditor .multiDiffEntry{display:flex;flex-direction:column;flex:1;overflow:hidden}.monaco-component.multiDiffEditor .multiDiffEntry .collapse-button{margin:0 5px;cursor:pointer}.monaco-component.multiDiffEditor .multiDiffEntry .collapse-button a{display:block}.monaco-component.multiDiffEditor .multiDiffEntry .header{z-index:1000;background:var(--vscode-editor-background)}.monaco-component.multiDiffEditor .multiDiffEntry .header:not(.collapsed) .header-content{border-bottom:1px solid var(--vscode-sideBarSectionHeader-border)}.monaco-component.multiDiffEditor .multiDiffEntry .header .header-content{margin:8px 0 0;padding:4px 5px;border-top:1px solid var(--vscode-multiDiffEditor-border);display:flex;align-items:center;color:var(--vscode-foreground);background:var(--vscode-multiDiffEditor-headerBackground)}.monaco-component.multiDiffEditor .multiDiffEntry .header .header-content.shadow{box-shadow:var(--vscode-scrollbar-shadow) 0 6px 6px -6px}.monaco-component.multiDiffEditor .multiDiffEntry .header .header-content .file-path{display:flex;flex:1;min-width:0}.monaco-component.multiDiffEditor .multiDiffEntry .header .header-content .file-path .title{font-size:14px;line-height:22px}.monaco-component.multiDiffEditor .multiDiffEntry .header .header-content .file-path .title.original{flex:1;min-width:0;text-overflow:ellipsis}.monaco-component.multiDiffEditor .multiDiffEntry .header .header-content .file-path .status{font-weight:600;opacity:.75;margin:0 10px;line-height:22px}.monaco-component.multiDiffEditor .multiDiffEntry .header .header-content .actions{padding:0 8px}.monaco-component.multiDiffEditor .multiDiffEntry .editorParent{flex:1;display:flex;flex-direction:column;border-bottom:1px solid var(--vscode-multiDiffEditor-border);overflow:hidden}.monaco-component.multiDiffEditor .multiDiffEntry .editorContainer{flex:1}.monaco-editor .selection-anchor{background-color:#007acc;width:2px!important}.monaco-editor .bracket-match{box-sizing:border-box;background-color:var(--vscode-editorBracketMatch-background);border:1px solid var(--vscode-editorBracketMatch-border)}.inline-editor-progress-decoration{display:inline-block;width:1em;height:1em}.inline-progress-widget{display:flex!important;justify-content:center;align-items:center}.inline-progress-widget .icon{font-size:80%!important}.inline-progress-widget:hover .icon{font-size:90%!important;animation:none}.inline-progress-widget:hover .icon:before{content:var(--vscode-icon-x-content);font-family:var(--vscode-icon-x-font-family)}.monaco-editor .monaco-editor-overlaymessage{padding-bottom:8px;z-index:10000}.monaco-editor .monaco-editor-overlaymessage.below{padding-bottom:0;padding-top:8px;z-index:10000}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.monaco-editor .monaco-editor-overlaymessage.fadeIn{animation:fadeIn .15s ease-out}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}.monaco-editor .monaco-editor-overlaymessage.fadeOut{animation:fadeOut .1s ease-out}.monaco-editor .monaco-editor-overlaymessage .message{padding:2px 4px;color:var(--vscode-editorHoverWidget-foreground);background-color:var(--vscode-editorHoverWidget-background);border:1px solid var(--vscode-inputValidation-infoBorder);border-radius:3px}.monaco-editor .monaco-editor-overlaymessage .message p{margin-block:0px}.monaco-editor .monaco-editor-overlaymessage .message a{color:var(--vscode-textLink-foreground)}.monaco-editor .monaco-editor-overlaymessage .message a:hover{color:var(--vscode-textLink-activeForeground)}.monaco-editor.hc-black .monaco-editor-overlaymessage .message,.monaco-editor.hc-light .monaco-editor-overlaymessage .message{border-width:2px}.monaco-editor .monaco-editor-overlaymessage .anchor{width:0!important;height:0!important;border-color:transparent;border-style:solid;z-index:1000;border-width:8px;position:absolute;left:2px}.monaco-editor .monaco-editor-overlaymessage .anchor.top{border-bottom-color:var(--vscode-inputValidation-infoBorder)}.monaco-editor .monaco-editor-overlaymessage .anchor.below{border-top-color:var(--vscode-inputValidation-infoBorder)}.monaco-editor .monaco-editor-overlaymessage:not(.below) .anchor.top,.monaco-editor .monaco-editor-overlaymessage.below .anchor.below{display:none}.monaco-editor .monaco-editor-overlaymessage.below .anchor.top{display:inherit;top:-8px}.action-widget{font-size:13px;min-width:100px;max-width:80vw;z-index:40;display:block;width:100%;border:1px solid var(--vscode-editorHoverWidget-border)!important;border-radius:var(--vscode-cornerRadius-large);background-color:var(--vscode-menu-background);color:var(--vscode-menu-foreground);padding:4px;box-shadow:var(--vscode-shadow-lg)}.context-view-block{position:fixed;cursor:initial;left:0;top:0;width:100%;height:100%;z-index:-1}.context-view-pointerBlock{position:fixed;cursor:initial;left:0;top:0;width:100%;height:100%;z-index:2}.action-widget .monaco-list{user-select:none;-webkit-user-select:none;border:none!important;border-width:0!important}.action-widget .monaco-list:focus:before{outline:0!important}.action-widget .monaco-list .monaco-scrollable-element{overflow:visible}.action-widget .monaco-list .monaco-list-row{padding:0 12px 0 6px;white-space:nowrap;cursor:pointer;touch-action:none;border-radius:var(--vscode-cornerRadius-medium)}.action-widget .monaco-list .monaco-list-row.action.focused:not(.option-disabled){background-color:var(--vscode-list-hoverBackground)!important;color:var(--vscode-list-hoverForeground);outline:1px solid var(--vscode-menu-selectionBorder, transparent);outline-offset:-2px}.action-widget .monaco-list-row.group-header{color:var(--vscode-descriptionForeground)!important;font-weight:500;font-size:11px}.action-widget .monaco-list-row.group-header:not(:first-of-type){margin-top:2px}.action-widget .monaco-scrollable-element .monaco-list-rows .monaco-list-row.separator{border-top:1px solid var(--vscode-editorHoverWidget-border);color:var(--vscode-descriptionForeground);font-size:12px;margin:4px 0;width:100%;cursor:default;-webkit-user-select:none;user-select:none;border-radius:0;pointer-events:none}.action-widget .monaco-scrollable-element .monaco-list-rows .monaco-list-row.separator:hover,.action-widget .monaco-scrollable-element .monaco-list-rows .monaco-list-row.separator.focused{outline:0 solid;background-color:transparent!important;border-radius:0}.action-widget .monaco-list-row.separator:first-of-type{border-top:none;margin-top:0}.action-widget .monaco-list-row.separator>span:not(:empty){display:flex;align-items:center;height:100%;padding-left:10px}.action-widget .monaco-list .group-header,.action-widget .monaco-list .option-disabled,.action-widget .monaco-list .option-disabled:before,.action-widget .monaco-list .option-disabled .focused,.action-widget .monaco-list .option-disabled .focused:before{cursor:default!important;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;background-color:transparent!important;outline:0 solid!important}.action-widget .monaco-list-row.action{display:flex;gap:6px;align-items:center}.action-widget .monaco-list-row.action .codicon{font-size:12px}.action-widget .monaco-list-row.action .action-list-item-toolbar .codicon{font-size:16px}.action-widget .actionList.compact-icons .monaco-list-row.action .codicon{font-size:var(--vscode-codiconFontSize-compact, 12px)}.action-widget .actionList.compact-icons .monaco-list-row.action .action-list-item-toolbar .codicon,.action-widget .actionList.compact-icons .monaco-list-row.action .action-list-submenu-indicator.codicon{font-size:var(--vscode-codiconFontSize, 16px)}.action-widget .monaco-list-row.action.option-disabled,.action-widget .monaco-list:focus .monaco-list-row.focused.action.option-disabled,.action-widget .monaco-list-row.action.option-disabled .codicon,.action-widget .monaco-list:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused).option-disabled{color:var(--vscode-disabledForeground)}.action-widget .monaco-list-row.action:not(.option-disabled) .codicon{color:inherit}.action-widget .monaco-list-row.action .title{flex:1;overflow:hidden;text-overflow:ellipsis}.action-widget .monaco-list-row.action .detail{order:99;width:100%;padding-left:18px;font-size:11px;line-height:14px;color:var(--vscode-descriptionForeground);opacity:.8;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.action-widget .monaco-list-row.action .action-item-badge{padding:0 6px;border-radius:10px;background-color:var(--vscode-badge-background);color:var(--vscode-badge-foreground);font-size:11px;line-height:18px;flex-shrink:0}.action-widget .monaco-list-row.action .monaco-keybinding>.monaco-keybinding-key{background-color:var(--vscode-keybindingLabel-background);color:var(--vscode-keybindingLabel-foreground);border-style:solid;border-width:1px;border-radius:3px;border-color:var(--vscode-keybindingLabel-border);border-bottom-color:var(--vscode-keybindingLabel-bottomBorder);box-shadow:inset 0 -1px 0 var(--vscode-widget-shadow)}.action-widget .action-widget-action-bar{background-color:var(--vscode-menu-background);border-top:1px solid var(--vscode-editorHoverWidget-border);margin-top:4px}.action-widget .action-widget-action-bar:before{display:block;content:"";width:100%}.action-widget .action-widget-action-bar .actions-container{padding:2px 8px 0 26px;width:auto}.action-widget-action-bar .action-label{color:var(--vscode-textLink-activeForeground);font-size:12px;line-height:22px;padding:0;pointer-events:all}.action-widget-action-bar .action-item{margin-right:16px;pointer-events:none}.action-widget-action-bar .action-label:hover{background-color:transparent!important}.monaco-action-bar .actions-container.highlight-toggled .action-label.checked{background:var(--vscode-actionBar-toggledBackground)!important}.action-widget .monaco-list .monaco-list-row .description{color:var(--vscode-descriptionForeground);margin-left:.5em;font-size:12px}.action-widget .monaco-list .monaco-list-row .description a{color:var(--vscode-textLink-foreground)}.action-widget .monaco-list .monaco-list-row .description a:hover,.action-widget .monaco-list .monaco-list-row .description a:active{color:var(--vscode-textLink-activeForeground)}.action-widget .monaco-list-row.action .group-title{color:var(--vscode-descriptionForeground);margin-left:.5em;margin-right:6px;font-size:12px;flex-shrink:0}.action-widget .monaco-list .monaco-list-row.action:has(.detail:not([style*="display: none"])){flex-wrap:wrap;align-content:center;padding-right:6px}.action-widget .monaco-list .monaco-list-row.action:has(.detail:not([style*="display: none"])) .title{line-height:14px}.action-widget .inline-description .monaco-list-row.action{gap:0}.action-widget .inline-description .monaco-list-row.action .title{flex:0 1 auto;min-width:0;margin-left:6px}.action-widget .inline-description .monaco-list-row.action .description{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis}.action-widget .inline-description .monaco-list-row.action .group-title{margin-left:auto}.action-widget .inline-description .monaco-list-row.action .action-list-item-toolbar{margin-left:4px;margin-right:10px}.action-widget .inline-description .monaco-list-row.action .action-list-submenu-indicator{margin-left:auto;margin-right:10px}.action-widget .monaco-list-row.action .action-list-item-toolbar{display:none}.action-widget .monaco-list-row.focused.action.has-toolbar .action-list-item-toolbar,.action-widget .monaco-list-row:hover.action.has-toolbar .action-list-item-toolbar{display:flex}.action-widget .monaco-list-row .action-list-item-toolbar .monaco-action-bar:not(.vertical) .action-label:not(.disabled):hover{background-color:var(--vscode-toolbar-hoverBackground)}.action-widget-delegate-label{display:flex;align-items:center;gap:4px;font-size:12px}.action-widget .action-list-filter{padding:2px 2px 4px}.action-widget .action-list-filter-row{display:flex;align-items:center;gap:4px;padding-right:10px}.action-widget .action-list-filter:first-child{border-bottom:none}.action-widget .action-list-filter:last-child{border-top:1px solid var(--vscode-editorHoverWidget-border)}.action-widget .action-list-filter-input{width:100%;flex:1;box-sizing:border-box;padding:4px 8px;border:1px solid var(--vscode-input-border, transparent);border-radius:3px;background-color:var(--vscode-input-background);color:var(--vscode-input-foreground);outline:none}.action-widget .action-list-filter-input:focus{border-color:var(--vscode-focusBorder)}.action-widget .action-list-filter-input::placeholder{color:var(--vscode-input-placeholderForeground)}.action-widget .action-list-filter-actions .action-label{padding:3px;border-radius:3px}.action-widget .action-list-filter-actions .action-label:hover{background-color:var(--vscode-toolbar-hoverBackground)}.action-widget .action-list-filter-label{color:var(--vscode-descriptionForeground);font-size:12px;flex-shrink:0;margin-right:2px}.action-widget .action-list-footer{color:var(--vscode-descriptionForeground);font-size:11px;padding:4px 10px 2px 6px;margin-top:4px;border-top:1px solid var(--vscode-editorHoverWidget-border)}.action-widget .action-list-header{display:flex;align-items:flex-start;gap:6px;color:var(--vscode-foreground);font-size:12px;line-height:16px;padding:6px 12px 6px 6px;margin-bottom:2px;background-color:var(--vscode-chat-requestBubbleBackground);border-radius:var(--vscode-cornerRadius-medium)}.action-widget:has(.action-list-header){min-width:160px}.action-widget .action-list-header .action-list-header-icon{flex-shrink:0;width:12px;text-align:center;font-size:12px!important;line-height:16px;color:var(--vscode-descriptionForeground)}.action-widget .action-list-header .action-list-header-text{flex:1;font-size:11px}.action-widget .actionList{position:relative}.action-widget .action-list-submenu-indicator{display:flex;align-items:center;justify-content:center;width:20px;height:20px;flex-shrink:0;border-radius:4px}.action-widget .action-list-submenu-indicator.has-submenu{opacity:.6}.action-widget .monaco-list-row.action .action-list-submenu-indicator.codicon{display:flex;font-size:16px}.action-list-submenu-panel{background-color:var(--vscode-menu-background);color:var(--vscode-menu-foreground);border:1px solid var(--vscode-menu-border, var(--vscode-editorHoverWidget-border));border-radius:5px;box-shadow:0 2px 8px var(--vscode-widget-shadow);z-index:50;width:max-content;outline:none}.action-list-submenu-hover-header{padding:4px 8px;line-height:1.4em;font-size:12px;max-width:300px;word-wrap:break-word;-webkit-user-select:text;user-select:text}.action-list-submenu-hover-header a{color:var(--vscode-textLink-foreground)}.action-list-submenu-hover-header a:hover,.action-list-submenu-hover-header a:active{color:var(--vscode-textLink-activeForeground)}.action-list-submenu-hover-header.has-submenu{border-bottom:1px solid var(--vscode-menu-separatorBackground, var(--vscode-editorWidget-border))}.action-list-submenu-hover-header>p{margin-left:0;margin-right:0}.action-list-submenu-hover-header>p:first-child{margin-top:0}.action-list-submenu-hover-header>p:last-child{margin-bottom:0}.post-edit-widget{box-shadow:var(--vscode-shadow-lg);border:1px solid var(--vscode-widget-border, transparent);border-radius:4px;color:var(--vscode-button-foreground);background-color:var(--vscode-button-background);overflow:hidden}.post-edit-widget .monaco-button{padding:2px;border:none;border-radius:0}.post-edit-widget .monaco-button:hover{background-color:var(--vscode-button-hoverBackground)!important}.post-edit-widget .monaco-button .codicon{margin:0}@font-face{font-family:codicon;font-display:block;src:url(data:font/ttf;base64,AAEAAAALAIAAAwAwR1NVQiCLJXoAAAE4AAAAVE9TLzI3UEb4AAABjAAAAGBjbWFwJofXiQAAC1wAACMSZ2x5Zh9TgmUAADMsAAHOhGhlYWRYk6BSAAAA4AAAADZoaGVhAlcDhgAAALwAAAAkaG10eMJy/+AAAAHsAAAJcGxvY2GY1iGKAAAucAAABLptYXhwA3UBiAAAARgAAAAgbmFtZZP7uU8AAgGwAAAB+HBvc3Q6hS/3AAIDqAAAIvEAAQAAASwAAAAAASz/+v/9AS8AAQAAAAAAAAAAAAAAAAAAAlwAAQAAAAEAABJ8y25fDzz1AAsBLAAAAAB8JbCAAAAAAHwlsID/+v/8AS8BLQAAAAgAAgAAAAAAAAABAAACXAF8AA8AAAAAAAIAAAAKAAoAAAD/AAAAAAAAAAEAAAAKADAAPgACREZMVAAObGF0bgAaAAQAAAAAAAAAAQAAAAQAAAAAAAAAAQAAAAFsaWdhAAgAAAABAAAAAQAEAAQAAAABAAgAAQAGAAAAAQAAAAQBKwGQAAUAAAC+ANIAAAAqAL4A0gAAAJAADgBNAAACAAUDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFBmRWQAwOpg7MwBLAAAABsBRwAEAAAAAQAAAAAAAAAAAAAAAAACAAAAAAEsAAABLAAAASwAAAEs//8BLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLP//ASwAAAEs//8BLAAAASwAAAEsAAABLAAAASz//wEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASz//wEsAAABLAAAASwAAAEsAAABLAAAASz//wEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEs//8BLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEs//8BLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASz//wEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLP//ASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASAAAAEsAAABLAAAASwAAAEsAAABIAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEgAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABIAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASD/+gEsAAABLAAAASAAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLP//ASz//wEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLP/+ASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASz//wEsAAABLP/8ASwAAAEs//8BLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLP//ASz//wEs//8BLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLP//ASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEs//8BLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEs//8BLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAAAAAUAAAADAAAALAAAAAQAAAZSAAEAAAAABUwAAwABAAAALAADAAoAAAZSAAQFIAAAABIAEAADAALqiOqM6sfqyesJ607sXuzM//8AAOpg6orqj+rJ6szrC+tQ7GD//wAAAAAAAAAAAAAAAAAAAAAAAQASAGIAZgDWANYBUAHWA/IAAAJYARkAqwCwAWEAxgBMANwAdwD5AHAB7AAQAIwAfAB9AZICEwDRAaABQgELAgMATgGyAj4AGgBgAZ4AtgDmAPMA8gA1AUsBeQFZAD4AYgGZAFEAagBaAFwAaQBZAFIAVwBTAVYAYwBVAloCVQJUAk8CTgJNAkwCSwJKAkkCRwI6AjgCNwI2AdIB0QHQAc8BzAHLAjMCMgAKAjECLwIsAiQCIgIgAh4CHAIaAhgCFwIWAhUCCwIPAgoCCAIHAgUCAQH/AfsB+AH1AfAB2gHYAdcB1gHFAcIBwAG9AbkBtwG2AbUBtAGzAbABrwGuAa0BrAGrAakBqAGnAaYBnwGdAZgBlAGTAZABjwGNAYwBiwGKAYkBhwGGAYQBggGBAYABfwF+AXoBdQF0AXMBcgFtAWwBagFdAVwBWAFUAVABTwFMAUoBSQFIAUUBPgE9ATwBOwBaAToBOQE1ARwBGAEXARQBEQEQAQ4BDQEJAQgBAwEBAQAA+gD4APcAIgD1AO8A7gDrAOgA5ADjANkA1QDUANMA0gDPAM4AzADLAMkAyADCAMAAvwC9ALwAugC4ALcAtQCyAK4ArQCqAKkApACjAKIAoQCgAJcAlgCVAJMAkgCNAIcAgwCCAH4AegB4AHMAcgBxAG8AbgBoAGYAZQBkAGEAYABfAF4AWwBYAFYAVABKAEkAPQA7ADkANwA2ADQAMwAyADEAMAArACkAKAAmACMAIgAhAB4AHAAPAA4ADQAKAAkAAgABARYBFQETARIBzgHNAbsCDQG6AcoAUwG8AbgBvgHTAi4CLQD/AZcBkQFOACoCWwI9AccBHQDlAJ0ATwDXAVsAiACJAN8AbQDWAMQB1AAfAf4A/QGWAVMBCgDsAMMCJgDYAOACEgIRAfQATQAlAC0ALwAuAWcAnwCcAO0BvwAIAAYABwBHAEUAQwBCAEAAPwBIAkgB3ADdAYUAEgHBAUABMgEzATQB6QHqAesCQQE/AWkBZQHVAcQAmQF8AcYCPwFSAVEA2gI1AjQBDAJCACQA8AEfATEBMAEqAS0BKwEoAScBJAEhASABLgEvAEsBRADFAZoCUwJSAlECUAEiASkBJQI5AU0BBAEHAgwCOwI8Ae0BYwFiAJAB7wCKAHQBQQD7ADoAOAH6AHkBdwAXAhkA2wD2APwAswHdARoApgB1AKkBqgBrAIABXgFgAV8AEwAVAf0AmgCeAdsBWgEFAQYBVQDeAkMBVwGiAfwB3gDNAeQB3wE2AegB4wGDARkAXQHgAK8BOAE3AWYBAgGVASwBJgEjAeUB5gHhAicAjgGhAeIAiwHxAigCKQH2APQAPAIwAfIB2QGcAYgAygC5AJgByABsAOoBQwJWAaQArAB7AP4BcQFuAW8AdwCPAEQADAF4AaUCBgAsAIUB9wAbAgACWQC7AAQAAwCUAkUA5wIJAOkA8QBBAioCKwCBAhAB5wF7AX0BdgFwAR4AxwC+ALEAtAB/AHYAZwALAZsAEQDiAUYBRwClACcCWQJEAkACJQIjAiECHwIdAhsCFAIOAgQB+QHzAe4ByQHDAaMBjgFrARsBDwDhANAAwQCRAIYAUABGAB0ABQGxAgICVwJGAIQAIACbAWgBZACoAKcAFgAUABgAGQAAAQYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAcwAAAAAAAAAJkAADqYAAA6mAAAAJYAADqYQAA6mEAAAEZAADqYgAA6mIAAACrAADqYwAA6mMAAACwAADqZAAA6mQAAAFhAADqZQAA6mUAAADGAADqZgAA6mYAAABMAADqZwAA6mcAAADcAADqaAAA6mgAAAB3AADqaQAA6mkAAAD5AADqagAA6moAAABwAADqawAA6msAAAHsAADqbAAA6mwAAAAQAADqbQAA6m0AAACMAADqbgAA6m4AAAB8AADqbwAA6m8AAAB9AADqcAAA6nAAAAGSAADqcQAA6nEAAAITAADqcgAA6nIAAADRAADqcwAA6nMAAAGgAADqdAAA6nQAAAFCAADqdQAA6nUAAAELAADqdgAA6nYAAAIDAADqdwAA6ncAAABOAADqeAAA6ngAAAGyAADqeQAA6nkAAAI+AADqegAA6noAAAAaAADqewAA6nsAAABgAADqfAAA6nwAAAGeAADqfQAA6n0AAAC2AADqfgAA6n4AAADmAADqfwAA6n8AAADzAADqgAAA6oAAAADyAADqgQAA6oEAAAA1AADqggAA6oIAAAFLAADqgwAA6oMAAAF5AADqhAAA6oQAAAFZAADqhQAA6oUAAAA+AADqhgAA6oYAAABiAADqhwAA6ocAAAGZAADqiAAA6ogAAABRAADqigAA6ooAAABqAADqiwAA6osAAABaAADqjAAA6owAAABcAADqjwAA6o8AAABpAADqkAAA6pAAAABZAADqkQAA6pEAAABSAADqkgAA6pIAAABXAADqkwAA6pMAAABTAADqlAAA6pQAAAFWAADqlQAA6pUAAABjAADqlgAA6pYAAABVAADqlwAA6pcAAAJaAADqmAAA6pgAAAJVAADqmQAA6pkAAAJUAADqmgAA6poAAAJPAADqmwAA6psAAAJOAADqnAAA6pwAAAJNAADqnQAA6p0AAAJMAADqngAA6p4AAAJLAADqnwAA6p8AAAJKAADqoAAA6qAAAAJJAADqoQAA6qEAAAJHAADqogAA6qIAAAI6AADqowAA6qMAAAI4AADqpAAA6qQAAAI3AADqpQAA6qUAAAI2AADqpgAA6qYAAAHSAADqpwAA6qcAAAHRAADqqAAA6qgAAAHQAADqqQAA6qkAAAHPAADqqgAA6qoAAAHMAADqqwAA6qsAAAHLAADqrAAA6qwAAAIzAADqrQAA6q0AAAIyAADqrgAA6q4AAAAKAADqrwAA6q8AAAIxAADqsAAA6rAAAAIvAADqsQAA6rEAAAIsAADqsgAA6rIAAAIkAADqswAA6rMAAAIiAADqtAAA6rQAAAIgAADqtQAA6rUAAAIeAADqtgAA6rYAAAIcAADqtwAA6rcAAAIaAADquAAA6rgAAAIYAADquQAA6rkAAAIXAADqugAA6roAAAIWAADquwAA6rsAAAIVAADqvAAA6rwAAAILAADqvQAA6r0AAAIPAADqvgAA6r4AAAIKAADqvwAA6r8AAAIIAADqwAAA6sAAAAIHAADqwQAA6sEAAAIFAADqwgAA6sIAAAIBAADqwwAA6sMAAAH/AADqxAAA6sQAAAH7AADqxQAA6sUAAAH4AADqxgAA6sYAAAH1AADqxwAA6scAAAHwAADqyQAA6skAAAHaAADqzAAA6swAAAHYAADqzQAA6s0AAAHXAADqzgAA6s4AAAHWAADqzwAA6s8AAAHFAADq0AAA6tAAAAHCAADq0QAA6tEAAAHAAADq0gAA6tIAAAG9AADq0wAA6tMAAAG5AADq1AAA6tQAAAG3AADq1QAA6tUAAAG2AADq1gAA6tYAAAG1AADq1wAA6tcAAAG0AADq2AAA6tgAAAGzAADq2QAA6tkAAAGwAADq2gAA6toAAAGvAADq2wAA6tsAAAGuAADq3AAA6twAAAGtAADq3QAA6t0AAAGsAADq3gAA6t4AAAGrAADq3wAA6t8AAAGpAADq4AAA6uAAAAGoAADq4QAA6uEAAAGnAADq4gAA6uIAAAGmAADq4wAA6uMAAAGfAADq5AAA6uQAAAGdAADq5QAA6uUAAAGYAADq5gAA6uYAAAGUAADq5wAA6ucAAAGTAADq6AAA6ugAAAGQAADq6QAA6ukAAAGPAADq6gAA6uoAAAGNAADq6wAA6usAAAGMAADq7AAA6uwAAAGLAADq7QAA6u0AAAGKAADq7gAA6u4AAAGJAADq7wAA6u8AAAGHAADq8AAA6vAAAAGGAADq8QAA6vEAAAGEAADq8gAA6vIAAAGCAADq8wAA6vMAAAGBAADq9AAA6vQAAAGAAADq9QAA6vUAAAF/AADq9gAA6vYAAAF+AADq9wAA6vcAAAF6AADq+AAA6vgAAAF1AADq+QAA6vkAAAF0AADq+gAA6voAAAFzAADq+wAA6vsAAAFyAADq/AAA6vwAAAFtAADq/QAA6v0AAAFsAADq/gAA6v4AAAFqAADq/wAA6v8AAAFdAADrAAAA6wAAAAFcAADrAQAA6wEAAAFYAADrAgAA6wIAAAFUAADrAwAA6wMAAAFQAADrBAAA6wQAAAFPAADrBQAA6wUAAAFMAADrBgAA6wYAAAFKAADrBwAA6wcAAAFJAADrCAAA6wgAAAFIAADrCQAA6wkAAAFFAADrCwAA6wsAAAE+AADrDAAA6wwAAAE9AADrDQAA6w0AAAE8AADrDgAA6w4AAAE7AADrDwAA6w8AAABaAADrEAAA6xAAAAE6AADrEQAA6xEAAAE5AADrEgAA6xIAAAE1AADrEwAA6xMAAAEcAADrFAAA6xQAAAEYAADrFQAA6xUAAAEXAADrFgAA6xYAAAEUAADrFwAA6xcAAAERAADrGAAA6xgAAAEQAADrGQAA6xkAAAEOAADrGgAA6xoAAAENAADrGwAA6xsAAAEJAADrHAAA6xwAAAEIAADrHQAA6x0AAAEDAADrHgAA6x4AAAEBAADrHwAA6x8AAAEAAADrIAAA6yAAAAD6AADrIQAA6yEAAAD4AADrIgAA6yIAAAD3AADrIwAA6yMAAAAiAADrJAAA6yQAAAD1AADrJQAA6yUAAADvAADrJgAA6yYAAADuAADrJwAA6ycAAADrAADrKAAA6ygAAADoAADrKQAA6ykAAADkAADrKgAA6yoAAADjAADrKwAA6ysAAADZAADrLAAA6ywAAADVAADrLQAA6y0AAADUAADrLgAA6y4AAADTAADrLwAA6y8AAADSAADrMAAA6zAAAADPAADrMQAA6zEAAADOAADrMgAA6zIAAADMAADrMwAA6zMAAADLAADrNAAA6zQAAADJAADrNQAA6zUAAADIAADrNgAA6zYAAADCAADrNwAA6zcAAADAAADrOAAA6zgAAAC/AADrOQAA6zkAAAC9AADrOgAA6zoAAAC8AADrOwAA6zsAAAC6AADrPAAA6zwAAAC4AADrPQAA6z0AAAC3AADrPgAA6z4AAAC1AADrPwAA6z8AAACyAADrQAAA60AAAACuAADrQQAA60EAAACtAADrQgAA60IAAACqAADrQwAA60MAAACpAADrRAAA60QAAACkAADrRQAA60UAAACjAADrRgAA60YAAACiAADrRwAA60cAAAChAADrSAAA60gAAACgAADrSQAA60kAAACXAADrSgAA60oAAACWAADrSwAA60sAAACVAADrTAAA60wAAACTAADrTQAA600AAACSAADrTgAA604AAACNAADrUAAA61AAAACHAADrUQAA61EAAACDAADrUgAA61IAAACCAADrUwAA61MAAAB+AADrVAAA61QAAAB6AADrVQAA61UAAAB4AADrVgAA61YAAABzAADrVwAA61cAAAByAADrWAAA61gAAABxAADrWQAA61kAAABvAADrWgAA61oAAABuAADrWwAA61sAAABoAADrXAAA61wAAABmAADrXQAA610AAABlAADrXgAA614AAABkAADrXwAA618AAABhAADrYAAA62AAAABgAADrYQAA62EAAABfAADrYgAA62IAAABeAADrYwAA62MAAABbAADrZAAA62QAAABYAADrZQAA62UAAABWAADrZgAA62YAAABUAADrZwAA62cAAABKAADraAAA62gAAABJAADraQAA62kAAAA9AADragAA62oAAAA7AADrawAA62sAAAA5AADrbAAA62wAAAA3AADrbQAA620AAAA2AADrbgAA624AAAA0AADrbwAA628AAAAzAADrcAAA63AAAAAyAADrcQAA63EAAAAxAADrcgAA63IAAAAwAADrcwAA63MAAAArAADrdAAA63QAAAApAADrdQAA63UAAAAoAADrdgAA63YAAAAmAADrdwAA63cAAAAjAADreAAA63gAAAAiAADreQAA63kAAAAhAADregAA63oAAAAeAADrewAA63sAAAAcAADrfAAA63wAAAAPAADrfQAA630AAAAOAADrfgAA634AAAANAADrfwAA638AAAAKAADrgAAA64AAAAAJAADrgQAA64EAAAACAADrggAA64IAAAABAADrgwAA64MAAAEWAADrhAAA64QAAAEVAADrhQAA64UAAAETAADrhgAA64YAAAESAADrhwAA64cAAAHOAADriAAA64gAAAHNAADriQAA64kAAAG7AADrigAA64oAAAINAADriwAA64sAAAG6AADrjAAA64wAAAHKAADrjQAA640AAABTAADrjgAA644AAAG8AADrjwAA648AAAG4AADrkAAA65AAAAG+AADrkQAA65EAAAHTAADrkgAA65IAAAIuAADrkwAA65MAAAItAADrlAAA65QAAAD/AADrlQAA65UAAAGXAADrlgAA65YAAAGRAADrlwAA65cAAAFOAADrmAAA65gAAAAqAADrmQAA65kAAAJbAADrmgAA65oAAAI9AADrmwAA65sAAAHHAADrnAAA65wAAAEdAADrnQAA650AAADlAADrngAA654AAACdAADrnwAA658AAABPAADroAAA66AAAADXAADroQAA66EAAAFbAADrogAA66IAAACIAADrowAA66MAAACJAADrpAAA66QAAADfAADrpQAA66UAAABtAADrpgAA66YAAADWAADrpwAA66cAAADEAADrqAAA66gAAAHUAADrqQAA66kAAAAfAADrqgAA66oAAAH+AADrqwAA66sAAAD9AADrrAAA66wAAAGWAADrrQAA660AAAFTAADrrgAA664AAAEKAADrrwAA668AAADsAADrsAAA67AAAADDAADrsQAA67EAAAImAADrsgAA67IAAADYAADrswAA67MAAADgAADrtAAA67QAAAISAADrtQAA67UAAAIRAADrtgAA67YAAAH0AADrtwAA67cAAABNAADruAAA67gAAAAlAADruQAA67kAAAAtAADrugAA67oAAAAvAADruwAA67sAAAAuAADrvAAA67wAAAFnAADrvQAA670AAACfAADrvgAA674AAACcAADrvwAA678AAADtAADrwAAA68AAAAG/AADrwQAA68EAAAAIAADrwgAA68IAAAAGAADrwwAA68MAAAAHAADrxAAA68QAAABHAADrxQAA68UAAABFAADrxgAA68YAAABDAADrxwAA68cAAABCAADryAAA68gAAABAAADryQAA68kAAAA/AADrygAA68oAAABIAADrywAA68sAAAJIAADrzAAA68wAAAHcAADrzQAA680AAADdAADrzgAA684AAAGFAADrzwAA688AAAASAADr0AAA69AAAAHBAADr0QAA69EAAAFAAADr0gAA69IAAAEyAADr0wAA69MAAAEzAADr1AAA69QAAAE0AADr1QAA69UAAAHpAADr1gAA69YAAAHqAADr1wAA69cAAAHrAADr2AAA69gAAAJBAADr2QAA69kAAAE/AADr2gAA69oAAAFpAADr2wAA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7HIAAAAMAADscwAA7HMAAAF4AADsdAAA7HQAAAGlAADsdQAA7HUAAAIGAADsdgAA7HYAAAAsAADsdwAA7HcAAACFAADseAAA7HgAAAH3AADseQAA7HkAAAAbAADsegAA7HoAAAIAAADsewAA7HsAAAJZAADsfAAA7HwAAAC7AADsfQAA7H0AAAAEAADsfgAA7H4AAAADAADsfwAA7H8AAACUAADsgAAA7IAAAAJFAADsgQAA7IEAAADnAADsggAA7IIAAAIJAADsgwAA7IMAAADpAADshAAA7IQAAADxAADshQAA7IUAAABBAADshgAA7IYAAAIqAADshwAA7IcAAAIrAADsiAAA7IgAAACBAADsiQAA7IkAAAIQAADsigAA7IoAAAHnAADsiwAA7IsAAAF7AADsjAAA7IwAAAF9AADsjQAA7I0AAAF2AADsjgAA7I4AAAFwAADsjwAA7I8AAAEeAADskAAA7JAAAADHAADskQAA7JEAAAC+AADskgAA7JIAAACxAADskwAA7JMAAAC0AADslAAA7JQAAAB/AADslQAA7JUAAAB2AADslgAA7JYAAABnAADslwAA7JcAAAALAADsmAAA7JgAAAGbAADsmQAA7JkAAAARAADsmgAA7JoAAADiAADsmwAA7JsAAAFGAADsnAAA7JwAAAFHAADsnQAA7J0AAAClAADsngAA7J4AAAAnAADsnwAA7J8AAAJZAADsoAAA7KAAAAJEAADsoQAA7KEAAAJAAADsogAA7KIAAAIlAADsowAA7KMAAAIjAADspAAA7KQAAAIhAADspQAA7KUAAAIfAADspgAA7KYAAAIdAADspwAA7KcAAAIbAADsqAAA7KgAAAIUAADsqQAA7KkAAAIOAADsqgAA7KoAAAIEAADsqwAA7KsAAAH5AADsrAAA7KwAAAHzAADsrQAA7K0AAAHuAADsrgAA7K4AAAHJAADsrwAA7K8AAAHDAADssAAA7LAAAAGjAADssQAA7LEAAAGOAADssgAA7LIAAAFrAADsswAA7LMAAAEbAADstAAA7LQAAAEPAADstQAA7LUAAADhAADstgAA7LYAAADQAADstwAA7LcAAADBAADsuAAA7LgAAACRAADsuQAA7LkAAACGAADsugAA7LoAAABQAADsuwAA7LsAAABGAADsvAAA7LwAAAAdAADsvQAA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AYMBhAGFAYYBhwGIAYkBigGLAYwBjQGOAY8BkAGRAZIBkwGUAZUBlgGXAZgBmQGaAZsBnAGdAZ4BnwGgAaEBogGjAaQBpQGmAacBqAGpAaoBqwGsAa0BrgGvAbABsQGyAbMBtAG1AbYBtwG4AbkBugG7AbwBvQG+Ab8BwAHBAcIBwwHEAcUBxgHHAcgByQHKAcsBzAHNAc4BzwHQAdEB0gHTAdQB1QHWAdcB2AHZAdoB2wHcAd0B3gHfAeAB4QHiAeMB5AHlAeYB5wHoAekB6gHrAewB7QHuAe8B8AHxAfIB8wH0AfUB9gH3AfgB+QH6AfsB/AH9Af4B/wIAAgECAgIDAgQCBQIGAgcCCAIJAgoCCwIMAg0CDgIPAhACEQISAhMCFAIVAhYCFwIYAhkCGgIbAhwCHQIeAh8CIAIhAiICIwIkAiUCJgInAigCKQIqAisCLAItAi4CLwIwAjECMgIzAjQCNQI2AjcCOAI5AjoCOwI8Aj0CPgI/AkACQQJCAkMCRAJFAkYCRwJIAkkCSgJLAkwCTQJOAk8CUAJRAlICUwJUAlUCVgJXAlgCWQJaAlsCXAJdAl4CXwJgAmECYgJjAmQCZQJmAmcCaAJpAmoCawJsAm0CbgJvAnACcQJyAnMCdAJ1AnYCdwJ4AnkCegJ7AnwCfQJ+An8CgAKBAoICgwKEAoUChgKHAogCiQKKAosCjAKNAo4CjwKQApECkgKTApQClQKWApcCmAKZApoCmwKcAp0CngKfAqACoQKiAqMCpAKlAqYCpwKoAqkCqgKrAqwCrQKuAq8CsAKxArICswK0ArUCtgK3ArgCuQK6ArsCvAK9Ar4CvwLAAsECwgLDAsQCxQLGAscCyALJAsoCywLMAs0CzgLPAtAC0QLSAtMC1ALVAtYC1wLYAtkC2gLbAtwC3QLeAt8C4ALhAuIC4wLkAuUC5gLnAugC6QLqAusC7ALtAu4C7wLwAvEC8gLzAvQC9QL2AvcC+AL5AvoC+wL8Av0C/gL/AwADAQMCAwMDBAMFAwYDBwMIAwkDCgMLAwwDDQMOAw8DEAMRAxIDEwMUAxUDFgMXAxgDGQMaAxsDHAMdAx4DHwMgAyEDIgMjAyQDJQMmAycDKAMpAyoDKwMsAy0DLgMvAzADMQMyAzMDNAM1AzYDNwM4AzkDOgM7AzwDPQM+Az8DQANBA0IDQwNEA0UDRgNHA0gDSQNKA0sDTANNA04DTwNQA1EDUgNTA1QDVQNWA1cDWANZA1oDWwNcA10ACHpvb20tb3V0B3pvb20taW4Id29ya3RyZWUOd29ya3RyZWUtc21hbGwQd29ya3RyZWUtY29tcGFjdBN3b3Jrc3BhY2UtdW50cnVzdGVkEXdvcmtzcGFjZS11bmtub3duEXdvcmtzcGFjZS10cnVzdGVkCXdvcmQtd3JhcAZ3aW5kb3cOd2luZG93LWNvbXBhY3QNd2luZG93LWFjdGl2ZQp3aG9sZS13b3JkCndoaXRlc3BhY2UFd2F0Y2gHd2FybmluZw93YXJuaW5nLWNvbXBhY3QEd2FuZAZ2c2NvZGUOdnNjb2RlLW91dGxpbmUPdnNjb2RlLWluc2lkZXJzF3ZzY29kZS1pbnNpZGVycy1vdXRsaW5lAnZyCnZvaWNlLW1vZGUSdm9pY2UtbW9kZS1jb21wYWN0AnZtCHZtLXNtYWxsCnZtLXJ1bm5pbmcKdm0tcGVuZGluZwp2bS1vdXRsaW5lCnZtLWNvbm5lY3QKdm0tY29tcGFjdAl2bS1hY3RpdmUIdmVyc2lvbnMIdmVyaWZpZWQPdmVyaWZpZWQtZmlsbGVkDnZhcmlhYmxlLWdyb3VwCnVudmVyaWZpZWQFdW5waW4GdW5tdXRlBnVubG9jaxN1bmdyb3VwLWJ5LXJlZi10eXBlBnVuZm9sZAl1bmFyY2hpdmUOdHlwZS1oaWVyYXJjaHkUdHlwZS1oaWVyYXJjaHktc3VwZXISdHlwZS1oaWVyYXJjaHktc3ViB3R3aXR0ZXILdHJpYW5nbGUtdXAOdHJpYW5nbGUtcmlnaHQNdHJpYW5nbGUtbGVmdA10cmlhbmdsZS1kb3duBXRyYXNoBXRvb2xzCHRodW1ic3VwD3RodW1ic3VwLWZpbGxlZAp0aHVtYnNkb3duEXRodW1ic2Rvd24tZmlsbGVkCnRocmVlLWJhcnMIdGhpbmtpbmcJdGV4dC1zaXplCHRlcm1pbmFsD3Rlcm1pbmFsLXVidW50dQ10ZXJtaW5hbC10bXV4D3Rlcm1pbmFsLXNlY3VyZRN0ZXJtaW5hbC1wb3dlcnNoZWxsDnRlcm1pbmFsLWxpbnV4EXRlcm1pbmFsLWdpdC1iYXNoD3Rlcm1pbmFsLWRlYmlhbhB0ZXJtaW5hbC1jb21wYWN0DHRlcm1pbmFsLWNtZA10ZXJtaW5hbC1iYXNoCXRlbGVzY29wZQh0YXNrbGlzdAZ0YXJnZXQDdGFnBXRhYmxlBHN5bmMMc3luYy1pZ25vcmVkDHN5bmMtY29tcGFjdA9zeW1ib2wtdmFyaWFibGUQc3ltYm9sLXN0cnVjdHVyZQ1zeW1ib2wtc3RyaW5nDnN5bWJvbC1zbmlwcGV0DHN5bWJvbC1ydWxlcg9zeW1ib2wtcHJvcGVydHkQc3ltYm9sLXBhcmFtZXRlcg9zeW1ib2wtb3BlcmF0b3IOc3ltYm9sLW51bWVyaWMQc3ltYm9sLW5hbWVzcGFjZQtzeW1ib2wtbWlzYw1zeW1ib2wtbWV0aG9kE3N5bWJvbC1tZXRob2QtYXJyb3cOc3ltYm9sLWtleXdvcmQQc3ltYm9sLWludGVyZmFjZQtzeW1ib2wtZmlsZQxzeW1ib2wtZmllbGQMc3ltYm9sLWV2ZW50C3N5bWJvbC1lbnVtEnN5bWJvbC1lbnVtLW1lbWJlcg9zeW1ib2wtY29uc3RhbnQMc3ltYm9sLWNvbG9yFHN5bWJvbC1jb2xvci1jb21wYWN0DHN5bWJvbC1jbGFzcw5zeW1ib2wtYm9vbGVhbgxzeW1ib2wtYXJyYXkNc3Vycm91bmQtd2l0aA1zdHJpa2V0aHJvdWdoC3N0b3AtY2lyY2xlCXN0YXItaGFsZglzdGFyLWZ1bGwKc3Rhci1lbXB0eQhzcXVpcnJlbA5zcGxpdC12ZXJ0aWNhbBBzcGxpdC1ob3Jpem9udGFsB3NwYXJrbGUOc3BhcmtsZS1maWxsZWQPc3BhcmtsZS1jb21wYWN0DnNvdXJjZS1jb250cm9sD3NvcnQtcHJlY2VkZW5jZQVzbmFrZQZzbWlsZXkEc2tpcAhzaWduLW91dAdzaWduLWluBnNoaWVsZA5zaGllbGQtY29tcGFjdAVzaGFyZQxzaGFyZS13aW5kb3cIc2V0dGluZ3MNc2V0dGluZ3MtZ2VhchBzZXR0aW5ncy1jb21wYWN0E3Nlc3Npb24taW4tcHJvZ3Jlc3Mbc2Vzc2lvbi1pbi1wcm9ncmVzcy1jb21wYWN0BnNlcnZlcg5zZXJ2ZXItcHJvY2VzcxJzZXJ2ZXItZW52aXJvbm1lbnQEc2VuZBRzZW5kLXRvLXJlbW90ZS1hZ2VudAZzZWFyY2gLc2VhcmNoLXN0b3AOc2VhcmNoLXNwYXJrbGUMc2VhcmNoLWxhcmdlDHNlYXJjaC1mdXp6eQ5zZWFyY2gtY29tcGFjdA1zY3JlZW4tbm9ybWFsC3NjcmVlbi1mdWxsCnNjcmVlbi1jdXQEc2F2ZQdzYXZlLWFzCHNhdmUtYWxsDXJ1bi13aXRoLWRlcHMKcnVuLWVycm9ycwxydW4tY292ZXJhZ2ULcnVuLWNvbXBhY3QJcnVuLWJlbG93B3J1bi1hbGwQcnVuLWFsbC1jb3ZlcmFnZQlydW4tYWJvdmUEcnVieQNyc3MLcm9vdC1mb2xkZXIScm9vdC1mb2xkZXItb3BlbmVkBnJvY2tldA5yb2NrZXQtY29tcGFjdAVyb2JvdBByaWdodC1wYW5lbC1zaG93EHJpZ2h0LXBhbmVsLWhpZGUPcmVxdWVzdC1jaGFuZ2VzBnJlcG9ydARyZXBvDXJlcG8tc2VsZWN0ZWQJcmVwby1wdXNoCXJlcG8tcHVsbAtyZXBvLXBpbm5lZAtyZXBvLWZvcmtlZBNyZXBvLWZvcmtlZC1jb21wYWN0D3JlcG8tZm9yY2UtcHVzaApyZXBvLWZldGNoDHJlcG8tY29tcGFjdApyZXBvLWNsb25lBXJlcGx5B3JlcGxhY2ULcmVwbGFjZS1hbGwGcmVuYW1lBnJlbW92ZQxyZW1vdmUtc21hbGwGcmVtb3RlD3JlbW90ZS1leHBsb3Jlcg5yZW1vdGUtY29tcGFjdAVyZWdleAdyZWZyZXNoD3JlZnJlc2gtY29tcGFjdApyZWZlcmVuY2VzBHJlZG8GcmVjb3JkDHJlY29yZC1zbWFsbAtyZWNvcmQta2V5cxNyZWNvcmQta2V5cy1jb21wYWN0CXJlYWN0aW9ucwtyYWRpby10b3dlcgZxdW90ZXMFcXVvdGUIcXVlc3Rpb24GcHl0aG9uBXB1bHNlB3Byb2plY3QPcHJvamVjdC1jb21wYWN0EHByaW1pdGl2ZS1zcXVhcmUHcHJldmlldw1wcmVzZXJ2ZS1jYXNlBHBsdWcEcGxheQtwbGF5LWNpcmNsZQZwaW5uZWQMcGlubmVkLWRpcnR5A3BpbglwaWUtY2hhcnQFcGlhbm8GcGVyc29uCnBlcnNvbi1hZGQKcGVyY2VudGFnZQRwYXNzC3Bhc3MtZmlsbGVkE3Bhc3MtZmlsbGVkLWNvbXBhY3QMcGFzcy1jb21wYWN0CHBhaW50Y2FuB3BhY2thZ2UGb3V0cHV0DG9yZ2FuaXphdGlvbgZvcGVuYWkMb3Blbi1wcmV2aWV3Dm9wZW4taW4td2luZG93D29wZW4taW4tcHJvZHVjdAhvY3RvZmFjZQhub3RlYm9vaxFub3RlYm9vay10ZW1wbGF0ZQRub3RlCm5vLW5ld2xpbmUHbmV3bGluZQtuZXctc2Vzc2lvbgpuZXctZm9sZGVyCG5ldy1maWxlDm5ldy1jb2xsZWN0aW9uBG11dGUFbXVzaWMEbW92ZQxtb3J0YXItYm9hcmQGbWlycm9yCW1pbGVzdG9uZQNtaWMKbWljLWZpbGxlZAVtZXJnZQptZXJnZS1pbnRvBG1lbnUHbWVudGlvbgltZWdhcGhvbmUDbWNwCG1hcmtkb3duA21hcAxtYXAtdmVydGljYWwTbWFwLXZlcnRpY2FsLWZpbGxlZAptYXAtZmlsbGVkBG1haWwJbWFpbC1yZWFkBm1hZ25ldARsb2NrCmxvY2stc21hbGwIbG9jYXRpb24HbG9hZGluZw9sb2FkaW5nLWNvbXBhY3QKbGl2ZS1zaGFyZQ5saXN0LXVub3JkZXJlZAlsaXN0LXRyZWUObGlzdC1zZWxlY3Rpb24MbGlzdC1vcmRlcmVkCWxpc3QtZmxhdAtsaXN0LWZpbHRlcgRsaW5rDWxpbmstZXh0ZXJuYWwJbGlnaHRidWxiEWxpZ2h0YnVsYi1zcGFya2xlEWxpZ2h0YnVsYi1jb21wYWN0EWxpZ2h0YnVsYi1hdXRvZml4B2xpYnJhcnkPbGlicmFyeS1jb21wYWN0BmxheW91dBBsYXlvdXQtc3RhdHVzYmFyFGxheW91dC1zaWRlYmFyLXJpZ2h0GGxheW91dC1zaWRlYmFyLXJpZ2h0LW9mZhlsYXlvdXQtc2lkZWJhci1yaWdodC1kb2NrE2xheW91dC1zaWRlYmFyLWxlZnQXbGF5b3V0LXNpZGViYXItbGVmdC1vZmYYbGF5b3V0LXNpZGViYXItbGVmdC1kb2NrDGxheW91dC1wYW5lbBJsYXlvdXQtcGFuZWwtcmlnaHQQbGF5b3V0LXBhbmVsLW9mZhFsYXlvdXQtcGFuZWwtbGVmdBRsYXlvdXQtcGFuZWwtanVzdGlmeRFsYXlvdXQtcGFuZWwtZG9jaxNsYXlvdXQtcGFuZWwtY2VudGVyDmxheW91dC1tZW51YmFyD2xheW91dC1jZW50ZXJlZBhsYXlvdXQtYWN0aXZpdHliYXItcmlnaHQXbGF5b3V0LWFjdGl2aXR5YmFyLWxlZnQGbGF5ZXJzCmxheWVycy1kb3QNbGF5ZXJzLWFjdGl2ZQNsYXcMa2V5Ym9hcmQtdGFiEmtleWJvYXJkLXRhYi1iZWxvdxJrZXlib2FyZC10YWItYWJvdmUDa2V5DmtlYmFiLXZlcnRpY2FsBmplcnNleQZpdGFsaWMGaXNzdWVzDmlzc3VlLXJlb3BlbmVkC2lzc3VlLWRyYWZ0B2luc3BlY3QGaW5zZXJ0BGluZm8KaW5kZXgtemVybwZpbmRlbnQFaW5ib3gJaW1wb3J0YW50EWltcG9ydGFudC1jb21wYWN0BWh1Ym90D2hvcml6b250YWwtcnVsZQRob21lB2hpc3RvcnkFaGVhcnQMaGVhcnQtZmlsbGVkEWdyb3VwLWJ5LXJlZi10eXBlB2dyaXBwZXIFZ3JhcGgNZ3JhcGgtc2NhdHRlcgpncmFwaC1saW5lCmdyYXBoLWxlZnQHZ3JhYmJlcgxnby10by1zZWFyY2gKZ28tdG8tZmlsZRVnby10by1lZGl0aW5nLXNlc3Npb24FZ2xvYmUGZ2l0aHViDmdpdGh1Yi1wcm9qZWN0D2dpdGh1Yi1pbnZlcnRlZApnaXRodWItYWx0DWdpdGh1Yi1hY3Rpb24JZ2l0LXN0YXNoDWdpdC1zdGFzaC1wb3APZ2l0LXN0YXNoLWFwcGx5EGdpdC1wdWxsLXJlcXVlc3QcZ2l0LXB1bGwtcmVxdWVzdC1uZXctY2hhbmdlcx5naXQtcHVsbC1yZXF1ZXN0LWdvLXRvLWNoYW5nZXMWZ2l0LXB1bGwtcmVxdWVzdC1lcnJvchZnaXQtcHVsbC1yZXF1ZXN0LWRyYWZ0FWdpdC1wdWxsLXJlcXVlc3QtZG9uZRdnaXQtcHVsbC1yZXF1ZXN0LWNyZWF0ZRhnaXQtcHVsbC1yZXF1ZXN0LWNvbW1lbnQXZ2l0LXB1bGwtcmVxdWVzdC1jbG9zZWQJZ2l0LW1lcmdlCWdpdC1mZXRjaAtnaXQtY29tcGFyZQpnaXQtY29tbWl0GWdpdC1icmFuY2gtc3RhZ2VkLWNoYW5nZXMUZ2l0LWJyYW5jaC1jb25mbGljdHMSZ2l0LWJyYW5jaC1jb21wYWN0EmdpdC1icmFuY2gtY2hhbmdlcwRnaXN0C2dpc3Qtc2VjcmV0BGdpZnQEZ2VhcgxnZWFyLWNvbXBhY3QEZ2FtZQdmb3J3YXJkBmZvbGRlcg1mb2xkZXItb3BlbmVkFWZvbGRlci1vcGVuZWQtY29tcGFjdA5mb2xkZXItbGlicmFyeQ5mb2xkZXItY29tcGFjdA1mb2xkZXItYWN0aXZlBGZvbGQHZm9sZC11cAlmb2xkLWRvd24FZmxhbWUEZmxhZwZmaWx0ZXINZmlsdGVyLWZpbGxlZAVmaWxlcwhmaWxlLXppcAlmaWxlLXRleHQRZmlsZS1zeW1saW5rLWZpbGUWZmlsZS1zeW1saW5rLWRpcmVjdG9yeQ5maWxlLXN1Ym1vZHVsZQhmaWxlLXBkZgpmaWxlLW1lZGlhEmZpbGUtbWVkaWEtY29tcGFjdAlmaWxlLWNvZGULZmlsZS1iaW5hcnkIZmVlZGJhY2sDZXllCmV5ZS1jbG9zZWQKZXh0ZW5zaW9ucxBleHRlbnNpb25zLWxhcmdlBmV4cG9ydApleHBhbmQtYWxsB2V4Y2x1ZGUFZXJyb3ILZXJyb3Itc21hbGwNZXJyb3ItY29tcGFjdAZlcmFzZXIMZW1wdHktd2luZG93CGVsbGlwc2lzDWVkaXRvci1sYXlvdXQEZWRpdAxlZGl0LXNwYXJrbGUMZWRpdC1zZXNzaW9uDGVkaXQtY29tcGFjdAllZGl0LWNvZGUIZG93bmxvYWQHZGlzY2FyZARkaWZmDGRpZmYtcmVuYW1lZAxkaWZmLXJlbW92ZWQNZGlmZi1tdWx0aXBsZQ1kaWZmLW1vZGlmaWVkDGRpZmYtaWdub3JlZApkaWZmLWFkZGVkDWRldmljZS1tb2JpbGUNZGV2aWNlLWNhbWVyYRNkZXZpY2UtY2FtZXJhLXZpZGVvD2RldmVsb3Blci10b29scxBkZXNrdG9wLWRvd25sb2FkBWRlYnVnCmRlYnVnLXN0b3APZGVidWctc3RlcC1vdmVyDmRlYnVnLXN0ZXAtb3V0D2RlYnVnLXN0ZXAtaW50bw9kZWJ1Zy1zdGVwLWJhY2sLZGVidWctc3RhcnQQZGVidWctc3RhY2tmcmFtZRdkZWJ1Zy1zdGFja2ZyYW1lLWFjdGl2ZRZkZWJ1Zy1yZXZlcnNlLWNvbnRpbnVlDWRlYnVnLXJlc3RhcnQTZGVidWctcmVzdGFydC1mcmFtZQtkZWJ1Zy1yZXJ1bgtkZWJ1Zy1wYXVzZRJkZWJ1Zy1saW5lLWJ5LWxpbmUQZGVidWctZGlzY29ubmVjdBhkZWJ1Zy1kaXNjb25uZWN0LWNvbXBhY3QOZGVidWctY292ZXJhZ2UOZGVidWctY29udGludWUUZGVidWctY29udGludWUtc21hbGwNZGVidWctY29uc29sZQ9kZWJ1Zy1jb25uZWN0ZWQXZGVidWctY29ubmVjdGVkLWNvbXBhY3QcZGVidWctYnJlYWtwb2ludC11bnN1cHBvcnRlZBRkZWJ1Zy1icmVha3BvaW50LWxvZx9kZWJ1Zy1icmVha3BvaW50LWxvZy11bnZlcmlmaWVkGWRlYnVnLWJyZWFrcG9pbnQtZnVuY3Rpb24kZGVidWctYnJlYWtwb2ludC1mdW5jdGlvbi11bnZlcmlmaWVkFWRlYnVnLWJyZWFrcG9pbnQtZGF0YSBkZWJ1Zy1icmVha3BvaW50LWRhdGEtdW52ZXJpZmllZBxkZWJ1Zy1icmVha3BvaW50LWNvbmRpdGlvbmFsJ2RlYnVnLWJyZWFrcG9pbnQtY29uZGl0aW9uYWwtdW52ZXJpZmllZAlkZWJ1Zy1hbHQPZGVidWctYWx0LXNtYWxsCWRlYnVnLWFsbAhkYXRhYmFzZQlkYXNoYm9hcmQEZGFzaAZjdXJzb3ILY3JlZGl0LWNhcmQIY292ZXJhZ2UEY29weQdjb3BpbG90D2NvcGlsb3Qtd2FybmluZxVjb3BpbG90LXdhcm5pbmctbGFyZ2UTY29waWxvdC11bmF2YWlsYWJsZQ9jb3BpbG90LXN1Y2Nlc3MOY29waWxvdC1zbm9vemUVY29waWxvdC1ub3QtY29ubmVjdGVkDWNvcGlsb3QtbGFyZ2UTY29waWxvdC1pbi1wcm9ncmVzcw1jb3BpbG90LWVycm9yD2NvcGlsb3QtY29tcGFjdA9jb3BpbG90LWJsb2NrZWQHY29tcGFzcwtjb21wYXNzLWRvdA5jb21wYXNzLWFjdGl2ZQdjb21tZW50EmNvbW1lbnQtdW5yZXNvbHZlZBpjb21tZW50LXVucmVzb2x2ZWQtY29tcGFjdA1jb21tZW50LWRyYWZ0EmNvbW1lbnQtZGlzY3Vzc2lvbhpjb21tZW50LWRpc2N1c3Npb24tc3BhcmtsZRhjb21tZW50LWRpc2N1c3Npb24tcXVvdGUPY29tbWVudC1jb21wYWN0B2NvbWJpbmUKY29sb3ItbW9kZQpjb2xsZWN0aW9uEGNvbGxlY3Rpb24tc21hbGwMY29sbGFwc2UtYWxsFGNvbGxhcHNlLWFsbC1jb21wYWN0BmNvZmZlZQRjb2RlC2NvZGUtcmV2aWV3CGNvZGUtb3NzBWNsb3VkDGNsb3VkLXVwbG9hZAtjbG91ZC1zbWFsbA5jbG91ZC1kb3dubG9hZA1jbG91ZC1jb21wYWN0BWNsb3NlDWNsb3NlLWNvbXBhY3QJY2xvc2UtYWxsCWNsb2NrZmFjZQZjbGlwcHkJY2xlYXItYWxsBmNsYXVkZQ1jaXJjdWl0LWJvYXJkBmNpcmNsZQxjaXJjbGUtc21hbGwTY2lyY2xlLXNtYWxsLWZpbGxlZBtjaXJjbGUtc21hbGwtZmlsbGVkLWNvbXBhY3QMY2lyY2xlLXNsYXNoFGNpcmNsZS1zbGFzaC1jb21wYWN0DGNpcmNsZS1sYXJnZRNjaXJjbGUtbGFyZ2UtZmlsbGVkDWNpcmNsZS1maWxsZWQVY2lyY2xlLWZpbGxlZC1jb21wYWN0DmNocm9tZS1yZXN0b3JlD2Nocm9tZS1taW5pbWl6ZQ9jaHJvbWUtbWF4aW1pemUMY2hyb21lLWNsb3NlBGNoaXAKY2hldnJvbi11cBJjaGV2cm9uLXVwLWNvbXBhY3QNY2hldnJvbi1yaWdodBVjaGV2cm9uLXJpZ2h0LWNvbXBhY3QMY2hldnJvbi1sZWZ0FGNoZXZyb24tbGVmdC1jb21wYWN0DGNoZXZyb24tZG93bhRjaGV2cm9uLWRvd24tY29tcGFjdAljaGVja2xpc3QRY2hlY2tsaXN0LWNvbXBhY3QFY2hlY2sNY2hlY2stY29tcGFjdAljaGVjay1hbGwMY2hhdC1zcGFya2xlFGNoYXQtc3BhcmtsZS13YXJuaW5nEmNoYXQtc3BhcmtsZS1lcnJvcgtjaGF0LWltcG9ydAtjaGF0LWV4cG9ydA5jYXNlLXNlbnNpdGl2ZQ1jYWxsLW91dGdvaW5nDWNhbGwtaW5jb21pbmcIY2FsZW5kYXIFYnVpbGQDYnVnCWJyb2FkY2FzdAlicmllZmNhc2UNYnJhY2tldC1lcnJvcgticmFja2V0LWRvdAhib29rbWFyawRib29rBGJvbGQFYmxhbmsEYmVsbApiZWxsLXNsYXNoDmJlbGwtc2xhc2gtZG90CGJlbGwtZG90BmJlYWtlcgtiZWFrZXItc3RvcA5iZWFrZXItY29tcGFjdAVhenVyZQxhenVyZS1kZXZvcHMGYXR0YWNoDmF0dGFjaC1jb21wYWN0A2Fzawthc2stY29tcGFjdAhhcnJvdy11cAphcnJvdy1zd2FwDmFycm93LXNtYWxsLXVwEWFycm93LXNtYWxsLXJpZ2h0EGFycm93LXNtYWxsLWxlZnQQYXJyb3ctc21hbGwtZG93bgthcnJvdy1yaWdodAphcnJvdy1sZWZ0CmFycm93LWRvd24PYXJyb3ctY2lyY2xlLXVwEmFycm93LWNpcmNsZS1yaWdodBFhcnJvdy1jaXJjbGUtbGVmdBFhcnJvdy1jaXJjbGUtZG93bgphcnJvdy1ib3RoB2FyY2hpdmUFYWdlbnQNYWdlbnQtY29tcGFjdANhZGQJYWRkLXNtYWxsFGFjdGl2YXRlLWJyZWFrcG9pbnRzB2FjY291bnQAAAAAAA==) format("truetype")}.codicon[class*=codicon-]{font: 16px/1 codicon;display:inline-block;text-decoration:none;text-rendering:auto;text-align:center;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;user-select:none;-webkit-user-select:none}.codicon-wrench-subaction{opacity:.5}@keyframes codicon-spin{to{transform:rotate(360deg)}}.codicon-sync.codicon-modifier-spin,.codicon-loading.codicon-modifier-spin,.codicon-gear.codicon-modifier-spin,.codicon-notebook-state-executing.codicon-modifier-spin,.codicon-loading,.codicon-tree-item-loading:before{animation:codicon-spin 1.5s steps(30) infinite;transform-origin:center center}.codicon-modifier-disabled{opacity:.4}.monaco-editor .codicon.codicon-symbol-array,.monaco-workbench .codicon-colored.codicon.codicon-symbol-array{color:var(--vscode-symbolIcon-arrayForeground)}.monaco-editor .codicon.codicon-symbol-boolean,.monaco-workbench .codicon-colored.codicon.codicon-symbol-boolean{color:var(--vscode-symbolIcon-booleanForeground)}.monaco-editor .codicon.codicon-symbol-class,.monaco-workbench .codicon-colored.codicon.codicon-symbol-class{color:var(--vscode-symbolIcon-classForeground)}.monaco-editor .codicon.codicon-symbol-method,.monaco-workbench .codicon-colored.codicon.codicon-symbol-method{color:var(--vscode-symbolIcon-methodForeground)}.monaco-editor .codicon.codicon-symbol-color,.monaco-workbench .codicon-colored.codicon.codicon-symbol-color{color:var(--vscode-symbolIcon-colorForeground)}.monaco-editor .codicon.codicon-symbol-constant,.monaco-workbench .codicon-colored.codicon.codicon-symbol-constant{color:var(--vscode-symbolIcon-constantForeground)}.monaco-editor .codicon.codicon-symbol-constructor,.monaco-workbench .codicon-colored.codicon.codicon-symbol-constructor{color:var(--vscode-symbolIcon-constructorForeground)}.monaco-editor .codicon.codicon-symbol-value,.monaco-workbench .codicon-colored.codicon.codicon-symbol-value,.monaco-editor .codicon.codicon-symbol-enum,.monaco-workbench .codicon-colored.codicon.codicon-symbol-enum{color:var(--vscode-symbolIcon-enumeratorForeground)}.monaco-editor .codicon.codicon-symbol-enum-member,.monaco-workbench .codicon-colored.codicon.codicon-symbol-enum-member{color:var(--vscode-symbolIcon-enumeratorMemberForeground)}.monaco-editor .codicon.codicon-symbol-event,.monaco-workbench .codicon-colored.codicon.codicon-symbol-event{color:var(--vscode-symbolIcon-eventForeground)}.monaco-editor .codicon.codicon-symbol-field,.monaco-workbench .codicon-colored.codicon.codicon-symbol-field{color:var(--vscode-symbolIcon-fieldForeground)}.monaco-editor .codicon.codicon-symbol-file,.monaco-workbench .codicon-colored.codicon.codicon-symbol-file{color:var(--vscode-symbolIcon-fileForeground)}.monaco-editor .codicon.codicon-symbol-folder,.monaco-workbench .codicon-colored.codicon.codicon-symbol-folder{color:var(--vscode-symbolIcon-folderForeground)}.monaco-editor .codicon.codicon-symbol-function,.monaco-workbench .codicon-colored.codicon.codicon-symbol-function{color:var(--vscode-symbolIcon-functionForeground)}.monaco-editor .codicon.codicon-symbol-interface,.monaco-workbench .codicon-colored.codicon.codicon-symbol-interface{color:var(--vscode-symbolIcon-interfaceForeground)}.monaco-editor .codicon.codicon-symbol-key,.monaco-workbench .codicon-colored.codicon.codicon-symbol-key{color:var(--vscode-symbolIcon-keyForeground)}.monaco-editor .codicon.codicon-symbol-keyword,.monaco-workbench .codicon-colored.codicon.codicon-symbol-keyword{color:var(--vscode-symbolIcon-keywordForeground)}.monaco-editor .codicon.codicon-symbol-module,.monaco-workbench .codicon-colored.codicon.codicon-symbol-module{color:var(--vscode-symbolIcon-moduleForeground)}.monaco-editor .codicon.codicon-symbol-namespace,.monaco-workbench .codicon-colored.codicon.codicon-symbol-namespace{color:var(--vscode-symbolIcon-namespaceForeground)}.monaco-editor .codicon.codicon-symbol-null,.monaco-workbench .codicon-colored.codicon.codicon-symbol-null{color:var(--vscode-symbolIcon-nullForeground)}.monaco-editor .codicon.codicon-symbol-number,.monaco-workbench .codicon-colored.codicon.codicon-symbol-number{color:var(--vscode-symbolIcon-numberForeground)}.monaco-editor .codicon.codicon-symbol-object,.monaco-workbench .codicon-colored.codicon.codicon-symbol-object{color:var(--vscode-symbolIcon-objectForeground)}.monaco-editor .codicon.codicon-symbol-operator,.monaco-workbench .codicon-colored.codicon.codicon-symbol-operator{color:var(--vscode-symbolIcon-operatorForeground)}.monaco-editor .codicon.codicon-symbol-package,.monaco-workbench .codicon-colored.codicon.codicon-symbol-package{color:var(--vscode-symbolIcon-packageForeground)}.monaco-editor .codicon.codicon-symbol-property,.monaco-workbench .codicon-colored.codicon.codicon-symbol-property{color:var(--vscode-symbolIcon-propertyForeground)}.monaco-editor .codicon.codicon-symbol-reference,.monaco-workbench .codicon-colored.codicon.codicon-symbol-reference{color:var(--vscode-symbolIcon-referenceForeground)}.monaco-editor .codicon.codicon-symbol-snippet,.monaco-workbench .codicon-colored.codicon.codicon-symbol-snippet{color:var(--vscode-symbolIcon-snippetForeground)}.monaco-editor .codicon.codicon-symbol-string,.monaco-workbench .codicon-colored.codicon.codicon-symbol-string{color:var(--vscode-symbolIcon-stringForeground)}.monaco-editor .codicon.codicon-symbol-struct,.monaco-workbench .codicon-colored.codicon.codicon-symbol-struct{color:var(--vscode-symbolIcon-structForeground)}.monaco-editor .codicon.codicon-symbol-text,.monaco-workbench .codicon-colored.codicon.codicon-symbol-text{color:var(--vscode-symbolIcon-textForeground)}.monaco-editor .codicon.codicon-symbol-type-parameter,.monaco-workbench .codicon-colored.codicon.codicon-symbol-type-parameter{color:var(--vscode-symbolIcon-typeParameterForeground)}.monaco-editor .codicon.codicon-symbol-unit,.monaco-workbench .codicon-colored.codicon.codicon-symbol-unit{color:var(--vscode-symbolIcon-unitForeground)}.monaco-editor .codicon.codicon-symbol-variable,.monaco-workbench .codicon-colored.codicon.codicon-symbol-variable{color:var(--vscode-symbolIcon-variableForeground)}.monaco-editor .lightBulbWidget{display:flex;align-items:center;justify-content:center}.monaco-editor .lightBulbWidget:hover{cursor:pointer}.monaco-editor .lightBulbWidget.codicon-light-bulb,.monaco-editor .lightBulbWidget.codicon-lightbulb-sparkle{color:var(--vscode-editorLightBulb-foreground)}.monaco-editor .lightBulbWidget.codicon-lightbulb-autofix,.monaco-editor .lightBulbWidget.codicon-lightbulb-sparkle-autofix{color:var(--vscode-editorLightBulbAutoFix-foreground, var(--vscode-editorLightBulb-foreground))}.monaco-editor .lightBulbWidget.codicon-sparkle-filled{color:var(--vscode-editorLightBulbAi-foreground, var(--vscode-icon-foreground))}.monaco-editor .lightBulbWidget:before{position:relative;z-index:2}.monaco-editor .lightBulbWidget:after{position:absolute;top:0;left:0;content:"";display:block;width:100%;height:100%;opacity:.3;z-index:1}.monaco-editor .glyph-margin-widgets .cgmr[class*=codicon-gutter-lightbulb]{display:block;cursor:pointer}.monaco-editor .glyph-margin-widgets .cgmr.codicon-gutter-lightbulb,.monaco-editor .glyph-margin-widgets .cgmr.codicon-gutter-lightbulb-sparkle{color:var(--vscode-editorLightBulb-foreground)}.monaco-editor .glyph-margin-widgets .cgmr.codicon-gutter-lightbulb-auto-fix,.monaco-editor .glyph-margin-widgets .cgmr.codicon-gutter-lightbulb-aifix-auto-fix{color:var(--vscode-editorLightBulbAutoFix-foreground, var(--vscode-editorLightBulb-foreground))}.monaco-editor .glyph-margin-widgets .cgmr.codicon-gutter-lightbulb-sparkle-filled{color:var(--vscode-editorLightBulbAi-foreground, var(--vscode-icon-foreground))}.monaco-editor .codelens-decoration{overflow:hidden;display:inline-flex!important;align-items:center;text-overflow:ellipsis;white-space:nowrap;color:var(--vscode-editorCodeLens-foreground);line-height:var(--vscode-editorCodeLens-lineHeight);font-size:var(--vscode-editorCodeLens-fontSize);padding-right:calc(var(--vscode-editorCodeLens-fontSize)*.5);font-feature-settings:var(--vscode-editorCodeLens-fontFeatureSettings);font-family:var(--vscode-editorCodeLens-fontFamily),var(--vscode-editorCodeLens-fontFamilyDefault)}.monaco-editor .codelens-decoration>span,.monaco-editor .codelens-decoration>a{user-select:none;-webkit-user-select:none;white-space:nowrap;vertical-align:sub;display:inline-flex;align-items:center}.monaco-editor .codelens-decoration>a{text-decoration:none}.monaco-editor .codelens-decoration>a:hover{cursor:pointer;color:var(--vscode-editorLink-activeForeground)!important}.monaco-editor .codelens-decoration>a:hover .codicon{color:var(--vscode-editorLink-activeForeground)!important}.monaco-editor .codelens-decoration .codicon[class*=codicon-]{vertical-align:middle;color:currentColor!important;color:var(--vscode-editorCodeLens-foreground);line-height:var(--vscode-editorCodeLens-lineHeight);font-size:var(--vscode-editorCodeLens-fontSize)}.monaco-editor .codelens-decoration>a:hover .codicon:before{cursor:pointer}@keyframes fadein{0%{opacity:0}to{opacity:1}}.monaco-editor .codelens-decoration.fadein{animation:fadein .1s linear}.monaco-editor .inlineSuggestionsHints{padding:4px}.monaco-editor .inlineSuggestionsHints .warningMessage p{margin:0}.monaco-editor .inlineSuggestionsHints.withBorder{z-index:39;color:var(--vscode-editorHoverWidget-foreground);background-color:var(--vscode-editorHoverWidget-background);border:1px solid var(--vscode-editorHoverWidget-border)}.monaco-editor .inlineSuggestionsHints a,.monaco-editor .inlineSuggestionsHints a:hover{color:var(--vscode-foreground)!important}.monaco-editor .inlineSuggestionsHints .keybinding{display:flex;align-items:center;margin-left:4px;opacity:.6}.monaco-editor .inlineSuggestionsHints .keybinding .monaco-keybinding-key{font-size:8px;padding:2px 3px}.monaco-editor .inlineSuggestionsHints .availableSuggestionCount a{display:flex;min-width:19px;justify-content:center}.monaco-editor .inlineSuggestionStatusBarItemLabel{align-items:center;margin-right:2px}.monaco-editor .find-widget{position:absolute;z-index:35;height:34px;overflow:hidden;line-height:19px;transition:transform .2s linear;padding:0 4px 0 9px;margin-top:4px;box-sizing:border-box;transform:translateY(calc(-100% - 10px));box-shadow:var(--vscode-shadow-lg);color:var(--vscode-editorWidget-foreground);border:1px solid var(--vscode-widget-border);border-radius:var(--vscode-cornerRadius-large);background-color:var(--vscode-editorWidget-background)}.monaco-reduce-motion .monaco-editor .find-widget{transition:transform 0ms linear}.monaco-editor .find-widget textarea{margin:0}.monaco-editor .find-widget.hiddenEditor{display:none}.monaco-editor .find-widget.replaceToggled>.replace-part{display:flex}.monaco-editor .find-widget.visible{transform:translateY(0)}.monaco-editor .find-widget .monaco-inputbox.synthetic-focus{outline:1px solid -webkit-focus-ring-color;outline-offset:-1px;outline-color:var(--vscode-focusBorder)}.monaco-editor .find-widget .monaco-inputbox .input{background-color:transparent;min-height:0}.monaco-editor .find-widget .monaco-findInput .input{font-size:13px}.monaco-editor .find-widget>.find-part,.monaco-editor .find-widget>.replace-part{margin:3px 25px 0 17px;font-size:12px;display:flex}.monaco-editor .find-widget>.find-part .monaco-inputbox,.monaco-editor .find-widget>.replace-part .monaco-inputbox{min-height:25px}.monaco-editor .find-widget>.replace-part .monaco-inputbox>.ibwrapper>.mirror{padding-right:22px}.monaco-editor .find-widget>.find-part .monaco-inputbox>.ibwrapper>.input,.monaco-editor .find-widget>.find-part .monaco-inputbox>.ibwrapper>.mirror,.monaco-editor .find-widget>.replace-part .monaco-inputbox>.ibwrapper>.input,.monaco-editor .find-widget>.replace-part .monaco-inputbox>.ibwrapper>.mirror{padding-top:2px;padding-bottom:2px}.monaco-editor .find-widget>.find-part .find-actions{height:25px;display:flex;align-items:center}.monaco-editor .find-widget>.replace-part .replace-actions{height:25px;display:flex;align-items:center}.monaco-editor .find-widget .monaco-findInput{vertical-align:middle;display:flex;flex:1}.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element{width:100%}.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element .scrollbar.vertical{opacity:0}.monaco-editor .find-widget .matchesCount{display:flex;flex:initial;margin:0 0 0 3px;padding:2px 0 0 2px;height:25px;vertical-align:middle;box-sizing:border-box;text-align:center;line-height:23px}.monaco-editor .find-widget .button{width:16px;height:16px;padding:3px;border-radius:5px;flex:initial;margin-left:3px;background-position:center center;background-repeat:no-repeat;cursor:pointer;display:flex;align-items:center;justify-content:center}.monaco-editor .find-widget .codicon-find-selection{width:22px;height:22px;padding:3px;border-radius:5px}.monaco-editor .find-widget .button.left{margin:4px 0 4px 5px}.monaco-editor .find-widget .button.wide{width:auto;padding:1px 6px;top:-1px}.monaco-editor .find-widget .button.toggle{position:absolute;top:0;left:0;width:18px;height:-webkit-fill-available;border-radius:var(--vscode-cornerRadius-small);box-sizing:border-box}.monaco-editor .find-widget .button.toggle.disabled{display:none}.monaco-editor .find-widget .disabled{color:var(--vscode-disabledForeground);cursor:default}.monaco-editor .find-widget>.replace-part{display:none}.monaco-editor .find-widget>.replace-part>.monaco-findInput{position:relative;display:flex;vertical-align:middle;flex:auto;flex-grow:0;flex-shrink:0}.monaco-editor .find-widget>.replace-part>.monaco-findInput>.controls{position:absolute;top:3px;right:2px}.monaco-editor .find-widget.reduced-find-widget .matchesCount{display:none}.monaco-editor .find-widget.narrow-find-widget{max-width:257px!important}.monaco-editor .find-widget.collapsed-find-widget{max-width:170px!important}.monaco-editor .find-widget.collapsed-find-widget .button.previous,.monaco-editor .find-widget.collapsed-find-widget .button.next,.monaco-editor .find-widget.collapsed-find-widget .button.replace,.monaco-editor .find-widget.collapsed-find-widget .button.replace-all,.monaco-editor .find-widget.collapsed-find-widget>.find-part .monaco-findInput .controls{display:none}.monaco-editor .find-widget.no-results .matchesCount{color:var(--vscode-errorForeground)}.monaco-editor .findMatch{animation-duration:0;animation-name:inherit!important;background-color:var(--vscode-editor-findMatchHighlightBackground)}.monaco-editor .currentFindMatch{background-color:var(--vscode-editor-findMatchBackground);border:2px solid var(--vscode-editor-findMatchBorder);padding:1px;box-sizing:border-box}.monaco-editor .findScope{background-color:var(--vscode-editor-findRangeHighlightBackground)}.monaco-editor .find-widget .monaco-sash{left:0!important;background-color:var(--vscode-editorWidget-resizeBorder, var(--vscode-editorWidget-border))}.monaco-editor.hc-black .find-widget .button:before{position:relative;top:1px;left:2px}.monaco-editor .find-widget .button:not(.disabled):hover,.monaco-editor .find-widget .codicon-find-selection:hover{background-color:var(--vscode-toolbar-hoverBackground)!important}.monaco-editor.findMatch{background-color:var(--vscode-editor-findMatchHighlightBackground)}.monaco-editor.currentFindMatch{background-color:var(--vscode-editor-findMatchBackground)}.monaco-editor.findScope{background-color:var(--vscode-editor-findRangeHighlightBackground)}.monaco-editor.findMatch{background-color:var(--vscode-editorWidget-background)}.monaco-editor .find-widget>.button.codicon-widget-close{position:absolute;top:5px;right:4px}.colorpicker-widget{height:190px;user-select:none;-webkit-user-select:none}.colorpicker-color-decoration,.hc-light .colorpicker-color-decoration{border:solid .1em #000;box-sizing:border-box;margin:.1em .2em 0;width:.8em;height:.8em;line-height:.8em;display:inline-block;cursor:pointer}.hc-black .colorpicker-color-decoration,.vs-dark .colorpicker-color-decoration{border:solid .1em #eee}.colorpicker-header{display:flex;height:24px;position:relative;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAHUlEQVQYV2PYvXu3JAi7uLiAMaYAjAGTQBPYLQkAa/0Zef3qRswAAAAASUVORK5CYII=);background-size:9px 9px;image-rendering:pixelated}.colorpicker-header .picked-color{width:240px;display:flex;align-items:center;justify-content:center;line-height:24px;cursor:pointer;color:#fff;flex:1;white-space:nowrap;overflow:hidden}.colorpicker-header .picked-color .picked-color-presentation{white-space:nowrap;margin-left:5px;margin-right:5px}.colorpicker-header .picked-color .codicon{color:inherit;font-size:14px}.colorpicker-header .picked-color.light{color:#000}.colorpicker-header .original-color{width:74px;z-index:inherit;cursor:pointer}.standalone-colorpicker{color:var(--vscode-editorHoverWidget-foreground);background-color:var(--vscode-editorHoverWidget-background);border:1px solid var(--vscode-editorHoverWidget-border)}.colorpicker-header.standalone-colorpicker{border-bottom:none}.colorpicker-header .close-button{cursor:pointer;background-color:var(--vscode-editorHoverWidget-background);border-left:1px solid var(--vscode-editorHoverWidget-border)}.colorpicker-header .close-button-inner-div{width:100%;height:100%;text-align:center}.colorpicker-header .close-button-inner-div:hover{background-color:var(--vscode-toolbar-hoverBackground)}.colorpicker-header .close-icon{padding:3px}.colorpicker-body{display:flex;padding:8px;position:relative}.colorpicker-body .saturation-wrap{overflow:hidden;height:150px;position:relative;min-width:220px;flex:1}.colorpicker-body .saturation-box{height:150px;position:absolute}.colorpicker-body .saturation-selection{width:9px;height:9px;margin:-5px 0 0 -5px;border:1px solid rgb(255,255,255);border-radius:100%;box-shadow:0 0 2px #000c;position:absolute}.colorpicker-body .strip{width:25px;height:150px}.colorpicker-body .standalone-strip{width:25px;height:122px}.colorpicker-body .hue-strip{position:relative;margin-left:8px;cursor:grab;background:linear-gradient(to bottom,red,#ff0 17%,#0f0 33%,#0ff,#00f 67%,#f0f 83%,red)}.colorpicker-body .opacity-strip{position:relative;margin-left:8px;cursor:grab;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAHUlEQVQYV2PYvXu3JAi7uLiAMaYAjAGTQBPYLQkAa/0Zef3qRswAAAAASUVORK5CYII=);background-size:9px 9px;image-rendering:pixelated}.colorpicker-body .strip.grabbing{cursor:grabbing}.colorpicker-body .slider{position:absolute;top:0;left:-2px;width:calc(100% + 4px);height:4px;box-sizing:border-box;border:1px solid rgba(255,255,255,.71);box-shadow:0 0 1px #000000d9}.colorpicker-body .strip .overlay{height:150px;pointer-events:none}.colorpicker-body .standalone-strip .standalone-overlay{height:122px;pointer-events:none}.standalone-colorpicker-body{display:block;border:1px solid transparent;border-bottom:1px solid var(--vscode-editorHoverWidget-border);overflow:hidden}.colorpicker-body .insert-button{position:absolute;height:20px;width:58px;padding:0;right:8px;bottom:8px;background:var(--vscode-button-background);color:var(--vscode-button-foreground);border-radius:2px;border:none;cursor:pointer}.colorpicker-body .insert-button:hover{background:var(--vscode-button-hoverBackground)}.monaco-editor .peekview-widget{box-shadow:var(--vscode-shadow-lg)}.monaco-editor .peekview-widget .head{box-sizing:border-box;display:flex;justify-content:space-between;flex-wrap:nowrap}.monaco-editor .peekview-widget .head .peekview-title{display:flex;align-items:baseline;font-size:13px;margin-left:20px;min-width:0;text-overflow:ellipsis;overflow:hidden}.monaco-editor .peekview-widget .head .peekview-title.clickable{cursor:pointer}.monaco-editor .peekview-widget .head .peekview-title .dirname:not(:empty){font-size:.9em;margin-left:.5em}.monaco-editor .peekview-widget .head .peekview-title .meta{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.monaco-editor .peekview-widget .head .peekview-title .dirname,.monaco-editor .peekview-widget .head .peekview-title .filename{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-editor .peekview-widget .head .peekview-title .meta:not(:empty):before{content:"-";padding:0 .3em}.monaco-editor .peekview-widget .head .peekview-actions{flex:1;text-align:right;padding-right:2px}.monaco-editor .peekview-widget .head .peekview-actions>.monaco-action-bar{display:inline-block}.monaco-editor .peekview-widget .head .peekview-actions>.monaco-action-bar,.monaco-editor .peekview-widget .head .peekview-actions>.monaco-action-bar>.actions-container{height:100%}.monaco-editor .peekview-widget>.body{border-top:1px solid;position:relative}.monaco-editor .peekview-widget .head .peekview-title .codicon{margin-right:4px;align-self:center}.monaco-editor .peekview-widget .monaco-list .monaco-list-row.focused .codicon{color:inherit!important}.monaco-editor .zone-widget{position:absolute;z-index:10}.monaco-editor .zone-widget .zone-widget-container{border-top-style:solid;border-bottom-style:solid;border-top-width:0;border-bottom-width:0;position:relative}.monaco-editor .zone-widget .zone-widget-container.reference-zone-widget{border-top-width:1px;border-bottom-width:1px}.monaco-editor .reference-zone-widget .inline{display:inline-block;vertical-align:top}.monaco-editor .reference-zone-widget .messages{height:100%;width:100%;text-align:center;padding:3em 0}.monaco-editor .reference-zone-widget .ref-tree{line-height:23px;background-color:var(--vscode-peekViewResult-background);color:var(--vscode-peekViewResult-lineForeground)}.monaco-editor .reference-zone-widget .ref-tree .reference{text-overflow:ellipsis;overflow:hidden}.monaco-editor .reference-zone-widget .ref-tree .reference-file{display:inline-flex;width:100%;height:100%;color:var(--vscode-peekViewResult-fileForeground)}.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .selected .reference-file{color:inherit!important}.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows>.monaco-list-row.selected:not(.highlighted){background-color:var(--vscode-peekViewResult-selectionBackground);color:var(--vscode-peekViewResult-selectionForeground)!important}.monaco-editor .reference-zone-widget .ref-tree .reference-file .count{margin-right:12px;margin-left:auto}.monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight{color:var(--vscode-peekViewResult-fileForeground)!important;background-color:var(--vscode-peekViewResult-matchHighlightBackground)!important}.monaco-editor .reference-zone-widget .preview .reference-decoration{background-color:var(--vscode-peekViewEditor-matchHighlightBackground);border:2px solid var(--vscode-peekViewEditor-matchHighlightBorder);box-sizing:border-box}.monaco-editor .reference-zone-widget .preview .monaco-editor .monaco-editor-background,.monaco-editor .reference-zone-widget .preview .monaco-editor .inputarea.ime-input{background-color:var(--vscode-peekViewEditor-background)}.monaco-editor .reference-zone-widget .preview .monaco-editor .margin{background-color:var(--vscode-peekViewEditorGutter-background)}.monaco-editor.hc-black .reference-zone-widget .ref-tree .reference-file,.monaco-editor.hc-light .reference-zone-widget .ref-tree .reference-file{font-weight:700}.monaco-editor.hc-black .reference-zone-widget .ref-tree .referenceMatch .highlight,.monaco-editor.hc-light .reference-zone-widget .ref-tree .referenceMatch .highlight{border:1px dotted var(--vscode-contrastActiveBorder, transparent);box-sizing:border-box}.monaco-editor .hoverHighlight{background-color:var(--vscode-editor-hoverHighlightBackground)}.monaco-editor .monaco-resizable-hover{border:1px solid var(--vscode-editorHoverWidget-border);border-radius:var(--vscode-cornerRadius-large);box-sizing:content-box;background-color:var(--vscode-editorHoverWidget-background)}.monaco-editor .monaco-resizable-hover>.monaco-hover{border:none;border-radius:inherit;overflow:hidden}.monaco-editor .monaco-hover{border:1px solid var(--vscode-editorHoverWidget-border);border-radius:var(--vscode-cornerRadius-large);color:var(--vscode-editorHoverWidget-foreground);background-color:var(--vscode-editorHoverWidget-background);box-shadow:var(--vscode-shadow-lg)}.monaco-editor .monaco-hover a{color:var(--vscode-textLink-foreground)}.monaco-editor .monaco-hover a:hover{color:var(--vscode-textLink-activeForeground)}.monaco-editor .monaco-hover .hover-row{border-radius:var(--vscode-cornerRadius-large);display:flex}.monaco-editor .monaco-hover .hover-row.hover-row-with-copy{position:relative;padding-right:20px}.monaco-editor .monaco-hover .hover-row .hover-row-contents{min-width:0;display:flex;flex-direction:column}.monaco-editor .monaco-hover .hover-row .verbosity-actions{border-right:1px solid var(--vscode-editorHoverWidget-border);width:22px;overflow-y:clip}.monaco-editor .monaco-hover .hover-row .verbosity-actions-inner{display:flex;flex-direction:column;padding-left:5px;padding-right:5px;justify-content:flex-end;position:relative}.monaco-editor .monaco-hover .hover-row .verbosity-actions-inner .codicon{cursor:pointer;font-size:11px}.monaco-editor .monaco-hover .hover-row .verbosity-actions-inner .codicon.enabled{color:var(--vscode-textLink-foreground)}.monaco-editor .monaco-hover .hover-row .verbosity-actions-inner .codicon.disabled{opacity:.6}.monaco-editor .monaco-hover .hover-row .actions{background-color:var(--vscode-editorHoverWidget-statusBarBackground)}.monaco-editor .monaco-hover code{background-color:var(--vscode-textCodeBlock-background)}.monaco-editor .monaco-hover .hover-copy-button{position:absolute;top:4px;right:4px;padding:2px 4px;border-radius:3px;display:flex;align-items:center;justify-content:center;opacity:0}.monaco-editor .monaco-hover .hover-row-with-copy:hover .hover-copy-button,.monaco-editor .monaco-hover .hover-row-with-copy:focus-within .hover-copy-button{opacity:1}.monaco-editor .monaco-hover .hover-copy-button:hover{background-color:var(--vscode-toolbar-hoverBackground);cursor:pointer}.monaco-editor .monaco-hover .hover-copy-button:focus{outline:1px solid var(--vscode-focusBorder);outline-offset:-1px}.monaco-editor .monaco-hover .hover-copy-button .codicon{font-size:16px;color:var(--vscode-foreground)}.monaco-editor.vs .dnd-target,.monaco-editor.hc-light .dnd-target{border-right:2px dotted black;color:#fff}.monaco-editor.vs-dark .dnd-target{border-right:2px dotted #AEAFAD;color:#51504f}.monaco-editor.hc-black .dnd-target{border-right:2px dotted #fff;color:#000}.monaco-editor.mouse-default .view-lines,.monaco-editor.vs-dark.mac.mouse-default .view-lines,.monaco-editor.hc-black.mac.mouse-default .view-lines,.monaco-editor.hc-light.mac.mouse-default .view-lines{cursor:default}.monaco-editor.mouse-copy .view-lines,.monaco-editor.vs-dark.mac.mouse-copy .view-lines,.monaco-editor.hc-black.mac.mouse-copy .view-lines,.monaco-editor.hc-light.mac.mouse-copy .view-lines{cursor:copy}.monaco-editor .findOptionsWidget{background-color:var(--vscode-editorWidget-background);color:var(--vscode-editorWidget-foreground);box-shadow:var(--vscode-shadow-lg);border:2px solid var(--vscode-contrastBorder)}.monaco-editor .margin-view-overlays .codicon-folding-manual-collapsed,.monaco-editor .margin-view-overlays .codicon-folding-manual-expanded,.monaco-editor .margin-view-overlays .codicon-folding-expanded,.monaco-editor .margin-view-overlays .codicon-folding-collapsed{cursor:pointer;opacity:0;transition:opacity .5s;display:flex;align-items:center;justify-content:center;font-size:140%;margin-left:2px}.monaco-reduce-motion .monaco-editor .margin-view-overlays .codicon-folding-manual-collapsed,.monaco-reduce-motion .monaco-editor .margin-view-overlays .codicon-folding-manual-expanded,.monaco-reduce-motion .monaco-editor .margin-view-overlays .codicon-folding-expanded,.monaco-reduce-motion .monaco-editor .margin-view-overlays .codicon-folding-collapsed{transition:initial}.monaco-editor .margin-view-overlays:hover .codicon,.monaco-editor .margin-view-overlays .codicon.codicon-folding-collapsed,.monaco-editor .margin-view-overlays .codicon.codicon-folding-manual-collapsed,.monaco-editor .margin-view-overlays .codicon.alwaysShowFoldIcons{opacity:1}.monaco-editor .inline-folded:after{color:var(--vscode-editor-foldPlaceholderForeground);margin:.1em .2em 0;content:"⋯";display:inline;line-height:1em;cursor:pointer}.monaco-editor .folded-background{background-color:var(--vscode-editor-foldBackground)}.monaco-editor .cldr.codicon.codicon-folding-expanded,.monaco-editor .cldr.codicon.codicon-folding-collapsed,.monaco-editor .cldr.codicon.codicon-folding-manual-expanded,.monaco-editor .cldr.codicon.codicon-folding-manual-collapsed{color:var(--vscode-editorGutter-foldingControlForeground)!important}.monaco-editor .peekview-widget .head .peekview-title .severity-icon{display:inline-block;vertical-align:text-top;margin-right:4px}.monaco-editor .marker-widget{text-overflow:ellipsis;white-space:nowrap}.monaco-editor .marker-widget>.stale{opacity:.6;font-style:italic}.monaco-editor .marker-widget .title{display:inline-block;padding-right:5px}.monaco-editor .marker-widget .descriptioncontainer{position:absolute;white-space:pre;user-select:text;-webkit-user-select:text;padding:8px 12px 0 20px}.monaco-editor .marker-widget .descriptioncontainer .message{display:flex;flex-direction:column}.monaco-editor .marker-widget .descriptioncontainer .message .details{padding-left:6px}.monaco-editor .marker-widget .descriptioncontainer .message .source,.monaco-editor .marker-widget .descriptioncontainer .message span.code{opacity:.6}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link{opacity:.6;color:inherit}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:before{content:"("}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:after{content:")"}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link>span{text-decoration:underline;border-bottom:1px solid transparent;text-underline-position:under;color:var(--vscode-textLink-activeForeground)}.monaco-editor .marker-widget .descriptioncontainer .filename{cursor:pointer;color:var(--vscode-textLink-activeForeground)}.monaco-editor .zone-widget .codicon.codicon-error,.markers-panel .marker-icon.error,.markers-panel .marker-icon .codicon.codicon-error,.text-search-provider-messages .providerMessage .codicon.codicon-error,.extensions-viewlet>.extensions .codicon.codicon-error,.extension-editor .codicon.codicon-error,.chat-attached-context-attachment .codicon.codicon-error{color:var(--vscode-problemsErrorIcon-foreground)}.monaco-editor .zone-widget .codicon.codicon-warning,.markers-panel .marker-icon.warning,.markers-panel .marker-icon .codicon.codicon-warning,.text-search-provider-messages .providerMessage .codicon.codicon-warning,.extensions-viewlet>.extensions .codicon.codicon-warning,.extension-editor .codicon.codicon-warning,.preferences-editor .codicon.codicon-warning{color:var(--vscode-problemsWarningIcon-foreground)}.monaco-editor .zone-widget .codicon.codicon-info,.markers-panel .marker-icon.info,.markers-panel .marker-icon .codicon.codicon-info,.text-search-provider-messages .providerMessage .codicon.codicon-info,.extensions-viewlet>.extensions .codicon.codicon-info,.extension-editor .codicon.codicon-info{color:var(--vscode-problemsInfoIcon-foreground)}.monaco-editor .snippet-placeholder{min-width:2px;outline-style:solid;outline-width:1px;background-color:var(--vscode-editor-snippetTabstopHighlightBackground, transparent);outline-color:var(--vscode-editor-snippetTabstopHighlightBorder, transparent)}.monaco-editor .finish-snippet-placeholder{outline-style:solid;outline-width:1px;background-color:var(--vscode-editor-snippetFinalTabstopHighlightBackground, transparent);outline-color:var(--vscode-editor-snippetFinalTabstopHighlightBorder, transparent)}.monaco-editor .rename-box{z-index:100;color:inherit;border-radius:4px;box-shadow:var(--vscode-shadow-lg)}.monaco-editor .rename-box.preview{padding:4px 4px 0}.monaco-editor .rename-box .rename-input-with-button{padding:3px;border-radius:4px;width:calc(100% - 8px)}.monaco-editor .rename-box .rename-input{width:calc(100% - 8px);padding:0}.monaco-editor .rename-box .rename-input:focus{outline:none}.monaco-editor .rename-box .rename-suggestions-button{display:flex;align-items:center;padding:3px;background-color:transparent;border:none;border-radius:5px;cursor:pointer}.monaco-editor .rename-box .rename-suggestions-button:hover{background-color:var(--vscode-toolbar-hoverBackground)}.monaco-editor .rename-box .rename-candidate-list-container .monaco-list-row{border-radius:2px}.monaco-editor .rename-box .rename-label{display:none;opacity:.8}.monaco-editor .rename-box.preview .rename-label{display:inherit}.monaco-editor .suggest-widget{width:430px;z-index:40;display:flex;flex-direction:column;border-radius:var(--vscode-cornerRadius-large);box-shadow:var(--vscode-shadow-lg)}.monaco-editor .suggest-widget.message{flex-direction:row;align-items:center}.monaco-editor .suggest-widget,.monaco-editor .suggest-details{flex:0 1 auto;width:100%;border-style:solid;border-width:1px;border-color:var(--vscode-editorSuggestWidget-border);background-color:var(--vscode-editorSuggestWidget-background)}.monaco-editor.hc-black .suggest-widget,.monaco-editor.hc-black .suggest-details,.monaco-editor.hc-light .suggest-widget,.monaco-editor.hc-light .suggest-details{border-width:2px}.monaco-editor .suggest-widget .suggest-status-bar{box-sizing:border-box;display:none;flex-flow:row nowrap;justify-content:space-between;width:100%;font-size:80%;padding:0 4px;border-top:1px solid var(--vscode-editorSuggestWidget-border);overflow:hidden}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar{display:flex}.monaco-editor .suggest-widget .suggest-status-bar .left{padding-right:8px}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-label{color:var(--vscode-editorSuggestWidgetStatus-foreground)}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label{margin-right:0}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label:after{content:", ";margin-right:.3em}.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row>.contents>.main>.right>.readMore,.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row.focused.string-label>.contents>.main>.right>.readMore{display:none}.monaco-editor .suggest-widget.with-status-bar:not(.docs-side) .monaco-list .monaco-list-row:hover>.contents>.main>.right.can-expand-details>.details-label{width:100%}.monaco-editor .suggest-widget>.message{padding-left:22px}.monaco-editor .suggest-widget>.tree{height:100%;width:100%}.monaco-editor .suggest-widget .monaco-list{user-select:none;-webkit-user-select:none;border-radius:var(--vscode-cornerRadius-large)}.monaco-editor .suggest-widget .monaco-list .monaco-list-row{display:flex;-mox-box-sizing:border-box;box-sizing:border-box;padding-right:10px;background-repeat:no-repeat;background-position:2px 2px;white-space:nowrap;cursor:pointer;touch-action:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused{color:var(--vscode-editorSuggestWidget-selectedForeground)}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused .codicon{color:var(--vscode-editorSuggestWidget-selectedIconForeground)}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents{flex:1;height:100%;overflow:hidden;padding-left:2px}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main{display:flex;overflow:hidden;text-overflow:ellipsis;white-space:pre;justify-content:space-between}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right{display:flex}.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.focused)>.contents>.main .monaco-icon-label{color:var(--vscode-editorSuggestWidget-foreground)}.monaco-editor .suggest-widget:not(.frozen) .monaco-highlighted-label .highlight{font-weight:700}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main .monaco-highlighted-label .highlight{color:var(--vscode-editorSuggestWidget-highlightForeground)}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused>.contents>.main .monaco-highlighted-label .highlight{color:var(--vscode-editorSuggestWidget-focusHighlightForeground)}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore:before{color:inherit;opacity:1;font-size:14px;cursor:pointer}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close{position:absolute;top:6px;right:2px}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close:hover,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore:hover{opacity:1}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label{color:var(--vscode-editorSuggestWidget-foreground)}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused>.contents>.main>.right>.details-label{color:var(--vscode-editorSuggestWidget-selectedForeground)}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.signature-label{overflow:hidden;text-overflow:ellipsis;opacity:.6}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.qualifier-label{margin-left:12px;opacity:.4;font-size:85%;line-height:initial;text-overflow:ellipsis;overflow:hidden;align-self:center}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label{font-size:85%;margin-left:1.1em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label>.monaco-tokenized-source{display:inline}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label{display:none}.monaco-editor .suggest-widget:not(.shows-details) .monaco-list .monaco-list-row.focused>.contents>.main>.right>.details-label{display:inline}.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label)>.contents>.main>.right>.details-label,.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row.focused:not(.string-label)>.contents>.main>.right>.details-label{display:inline}.monaco-editor .suggest-widget:not(.docs-side) .monaco-list .monaco-list-row.focused:hover>.contents>.main>.right.can-expand-details>.details-label{width:calc(100% - 26px)}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left{flex-shrink:1;flex-grow:1;overflow:hidden}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.monaco-icon-label{flex-shrink:0}.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label)>.contents>.main>.left>.monaco-icon-label{max-width:100%}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label>.contents>.main>.left>.monaco-icon-label{flex-shrink:1}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right{overflow:hidden;flex-shrink:4;max-width:70%}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore{display:inline-block;position:absolute;right:10px;width:18px;height:18px;visibility:hidden}.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row>.contents>.main>.right>.readMore{display:none!important}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label>.contents>.main>.right>.readMore{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused.string-label>.contents>.main>.right>.readMore{display:inline-block}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused:hover>.contents>.main>.right>.readMore{visibility:visible}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated{opacity:.66;text-decoration:unset}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated>.monaco-icon-label-container>.monaco-icon-name-container{text-decoration:line-through}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label:before{height:100%}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon{display:block;height:16px;width:16px;margin-left:2px;background-repeat:no-repeat;background-size:80%;background-position:center}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.hide{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .suggest-icon{display:flex;align-items:center;margin-right:4px}.monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .icon,.monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .suggest-icon:before{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.customcolor .colorspan{margin:0 0 0 .3em;border:.1em solid #000;width:.7em;height:.7em;display:inline-block}.monaco-editor .suggest-details-container{z-index:41}.monaco-editor .suggest-details{display:flex;flex-direction:column;cursor:default;color:var(--vscode-editorSuggestWidget-foreground)}.monaco-editor .suggest-details:focus{border-color:var(--vscode-focusBorder)}.monaco-editor .suggest-details a{color:var(--vscode-textLink-foreground)}.monaco-editor .suggest-details a:hover{color:var(--vscode-textLink-activeForeground)}.monaco-editor .suggest-details code{background-color:var(--vscode-textCodeBlock-background)}.monaco-editor .suggest-details.no-docs{display:none}.monaco-editor .suggest-details>.monaco-scrollable-element{flex:1}.monaco-editor .suggest-details>.monaco-scrollable-element>.body{box-sizing:border-box;height:100%;width:100%}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.type{flex:2;overflow:hidden;text-overflow:ellipsis;opacity:.7;white-space:pre;margin:0 24px 0 0;padding:4px 0 4px 5px}.monaco-editor .suggest-details.detail-and-doc>.monaco-scrollable-element>.body>.header>.type{padding-bottom:12px}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.type.auto-wrap{white-space:normal;word-break:break-all}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs{margin:0;padding:4px 5px;white-space:pre-wrap}.monaco-editor .suggest-details.no-type>.monaco-scrollable-element>.body>.docs{margin-right:24px;overflow:hidden}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs{padding:0;white-space:initial;min-height:calc(1rem + 8px)}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div,.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>span:not(:empty){padding:4px 5px}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div>p:first-child{margin-top:0}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div>p:last-child{margin-bottom:0}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs .monaco-tokenized-source{white-space:pre}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs .code{white-space:pre-wrap;word-wrap:break-word}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs .codicon{vertical-align:sub}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>p:empty{display:none}.monaco-editor .suggest-details code{border-radius:3px;padding:0 .4em}.monaco-editor .suggest-details ul,.monaco-editor .suggest-details ol{padding-left:20px}.monaco-editor .suggest-details p code{font-family:var(--monaco-monospace-font)}.monaco-editor .suggest-preview-additional-widget{white-space:nowrap}.monaco-editor .suggest-preview-additional-widget .content-spacer{color:transparent;white-space:pre}.monaco-editor .suggest-preview-additional-widget .button{display:inline-block;cursor:pointer;text-decoration:underline;text-underline-position:under}.monaco-editor .ghost-text-hidden{opacity:0;font-size:0}.monaco-editor .ghost-text-decoration,.monaco-editor .suggest-preview-text .ghost-text{font-style:italic}.monaco-editor .suggest-preview-text.clickable .view-line{z-index:1}.monaco-editor .ghost-text-decoration.clickable,.monaco-editor .ghost-text-decoration-preview.clickable,.monaco-editor .suggest-preview-text.clickable .ghost-text{cursor:pointer}.monaco-editor .inline-completion-text-to-replace{text-decoration:underline;text-underline-position:under}.monaco-editor .ghost-text-decoration,.monaco-editor .ghost-text-decoration-preview,.monaco-editor .suggest-preview-text .ghost-text{background-color:var(--vscode-editorGhostText-background);border:1px solid var(--vscode-editorGhostText-border)}:is(.monaco-editor .ghost-text-decoration,.monaco-editor .ghost-text-decoration-preview,.monaco-editor .suggest-preview-text .ghost-text).syntax-highlighted{opacity:.7}:is(.monaco-editor .ghost-text-decoration,.monaco-editor .ghost-text-decoration-preview,.monaco-editor .suggest-preview-text .ghost-text):not(.syntax-highlighted){color:var(--vscode-editorGhostText-foreground)}.monaco-editor .ghost-text-decoration.warning,.monaco-editor .ghost-text-decoration-preview.warning,.monaco-editor .suggest-preview-text .ghost-text.warning{background:var(--monaco-editor-warning-decoration) repeat-x bottom left;border-bottom:4px double var(--vscode-editorWarning-border)}.monaco-editor .ghost-text-decoration.short-text,.monaco-editor .ghost-text-decoration-preview.short-text,.monaco-editor .suggest-preview-text .ghost-text.short-text{text-decoration:underline dotted var(--vscode-editorGhostText-foreground);text-underline-position:under}.ghost-text-view-warning-widget-icon .codicon{color:var(--vscode-editorWarning-foreground)!important}.monaco-editor .edits-fadeout-decoration{opacity:var(--animation-opacity, 1);background-color:var(--vscode-inlineEdit-modifiedChangedTextBackground)}.monaco-editor .sticky-widget{overflow:hidden;border-bottom:1px solid var(--vscode-editorStickyScroll-border);width:100%;box-shadow:var(--vscode-editorStickyScroll-shadow) 0 4px 2px -2px;z-index:4;right:initial!important;margin-left:"0px"}.monaco-editor .sticky-widget .sticky-widget-line-numbers{float:left;background-color:var(--vscode-editorStickyScrollGutter-background)}.monaco-editor .sticky-widget.peek .sticky-widget-line-numbers{background-color:var(--vscode-peekViewEditorStickyScrollGutter-background)}.monaco-editor .sticky-widget .sticky-widget-lines-scrollable{display:inline-block;position:absolute;overflow:hidden;width:var(--vscode-editorStickyScroll-scrollableWidth);background-color:var(--vscode-editorStickyScroll-background)}.monaco-editor .sticky-widget.peek .sticky-widget-lines-scrollable{background-color:var(--vscode-peekViewEditorStickyScroll-background)}.monaco-editor .sticky-widget .sticky-widget-lines{position:absolute;background-color:inherit}.monaco-editor .sticky-widget .sticky-line-number,.monaco-editor .sticky-widget .sticky-line-content{color:var(--vscode-editorLineNumber-foreground);white-space:nowrap;display:inline-block;position:absolute;background-color:inherit}.monaco-editor .sticky-widget .sticky-line-number .codicon-folding-expanded,.monaco-editor .sticky-widget .sticky-line-number .codicon-folding-collapsed{float:right;transition:var(--vscode-editorStickyScroll-foldingOpacityTransition);position:absolute;margin-left:2px}.monaco-editor .sticky-widget .sticky-line-content{width:var(--vscode-editorStickyScroll-scrollableWidth);background-color:inherit;white-space:nowrap}.monaco-editor .sticky-widget .sticky-line-number-inner{display:inline-block;text-align:right}.monaco-editor .sticky-widget .sticky-line-content:hover{background-color:var(--vscode-editorStickyScrollHover-background);cursor:pointer}.monaco-editor{--inline-edit-border-radius: 3px}.monaco-editor .inline-edits-view-indicator{display:flex;z-index:34;height:20px;color:var(--vscode-inlineEdit-gutterIndicator-primaryForeground);background-color:var(--vscode-inlineEdit-gutterIndicator-background);border:1px solid var(--vscode-inlineEdit-gutterIndicator-primaryBorder);border-radius:var(--inline-edit-border-radius);align-items:center;padding:2px 10px 2px 2px;margin:0 4px;opacity:0}.monaco-editor .inline-edits-view-indicator.contained{transition:opacity .2s ease-in-out;transition-delay:.4s}.monaco-editor .inline-edits-view-indicator.visible,.monaco-editor .inline-edits-view-indicator.top{opacity:1}.monaco-editor .inline-edits-view-indicator.top .icon{transform:rotate(90deg)}.monaco-editor .inline-edits-view-indicator.bottom{opacity:1}.monaco-editor .inline-edits-view-indicator.bottom .icon{transform:rotate(-90deg)}.monaco-editor .inline-edits-view-indicator .icon{display:flex;align-items:center;margin:0 2px;transform:none;transition:transform .2s ease-in-out}.monaco-editor .inline-edits-view-indicator .icon .codicon{color:var(--vscode-inlineEdit-gutterIndicator-primaryForeground)}.monaco-editor .inline-edits-view-indicator .label{margin:0 2px;display:flex;justify-content:center;width:100%}.monaco-editor .inline-edits-view .editorContainer .preview .monaco-editor .view-overlays .current-line-exact,.monaco-editor .inline-edits-view .editorContainer .preview .monaco-editor .current-line-margin{border:none}.monaco-editor .inline-edits-view .editorContainer .inline-edits-view-zone.diagonal-fill{opacity:.5}.monaco-editor .strike-through{text-decoration:line-through}.monaco-editor .inlineCompletions-line-insert{background:var(--vscode-inlineEdit-modifiedChangedLineBackground)}.monaco-editor .inlineCompletions-line-delete{background:var(--vscode-inlineEdit-originalChangedLineBackground)}.monaco-editor .inlineCompletions-char-insert{background:var(--vscode-inlineEdit-modifiedChangedTextBackground);cursor:pointer}.monaco-editor .inlineCompletions-char-delete{background:var(--vscode-inlineEdit-originalChangedTextBackground)}.monaco-editor .inlineCompletions-char-delete.diff-range-empty{margin-left:-1px;border-left:solid var(--vscode-inlineEdit-originalChangedTextBackground) 3px}.monaco-editor .inlineCompletions-char-insert.diff-range-empty{border-left:solid var(--vscode-inlineEdit-modifiedChangedTextBackground) 3px}.monaco-editor .inlineCompletions-char-delete.single-line-inline{border:1px solid var(--vscode-editorHoverWidget-border);margin:-2px 0 0 -2px}.monaco-editor .inlineCompletions-char-insert.single-line-inline{border-top:1px solid var(--vscode-inlineEdit-modifiedBorder);border-bottom:1px solid var(--vscode-inlineEdit-modifiedBorder)}.monaco-editor .inlineCompletions-char-insert.single-line-inline.start{border-top-left-radius:var(--inline-edit-border-radius);border-bottom-left-radius:var(--inline-edit-border-radius);border-left:1px solid var(--vscode-inlineEdit-modifiedBorder)}.monaco-editor .inlineCompletions-char-insert.single-line-inline.end{border-top-right-radius:var(--inline-edit-border-radius);border-bottom-right-radius:var(--inline-edit-border-radius);border-right:1px solid var(--vscode-inlineEdit-modifiedBorder)}.monaco-editor .inlineCompletions-char-delete.single-line-inline.empty,.monaco-editor .inlineCompletions-char-insert.single-line-inline.empty{display:none}.monaco-editor .inlineCompletions.strike-through{text-decoration-thickness:1px}.monaco-editor .inlineCompletions-modified-bubble{background:var(--vscode-inlineEdit-modifiedChangedTextBackground)}.monaco-editor .inlineCompletions-original-bubble{background:var(--vscode-inlineEdit-originalChangedTextBackground)}.monaco-editor .inlineCompletions-modified-bubble,.monaco-editor .inlineCompletions-original-bubble{pointer-events:none;display:inline-block}.monaco-editor .inline-edit.ghost-text,.monaco-editor .inline-edit.ghost-text-decoration,.monaco-editor .inline-edit.ghost-text-decoration-preview,.monaco-editor .inline-edit.suggest-preview-text .ghost-text{font-style:normal!important}:is(.monaco-editor .inline-edit.ghost-text,.monaco-editor .inline-edit.ghost-text-decoration,.monaco-editor .inline-edit.ghost-text-decoration-preview,.monaco-editor .inline-edit.suggest-preview-text .ghost-text).syntax-highlighted{opacity:1!important}.monaco-editor .inline-edit.modified-background.ghost-text,.monaco-editor .inline-edit.modified-background.ghost-text-decoration,.monaco-editor .inline-edit.modified-background.ghost-text-decoration-preview,.monaco-editor .inline-edit.modified-background.suggest-preview-text .ghost-text{background:var(--vscode-inlineEdit-modifiedChangedTextBackground)!important;display:inline-block!important}.monaco-editor .inlineCompletions-original-lines{background:var(--vscode-editor-background)}.monaco-editor .inline-edit-jump-to-widget .monaco-keybinding .monaco-keybinding-key{font-size:11px;padding:1px 2px 2px}.monaco-menu-option{color:var(--vscode-editorActionList-foreground);font-size:13px;padding:0 4px;line-height:28px;display:flex;gap:4px;align-items:center;border-radius:3px;cursor:pointer}.monaco-menu-option .monaco-keybinding-key{font-size:13px;opacity:.7;padding:0;border:none;margin:0;min-width:unset}.monaco-menu-option.active{background:var(--vscode-editorActionList-focusBackground);color:var(--vscode-editorActionList-focusForeground);outline:1px solid var(--vscode-menu-selectionBorder, transparent);outline-offset:-1px}.monaco-menu-option.active .monaco-keybinding-key{color:var(--vscode-editorActionList-focusForeground)}.inline-edits-long-distance-hint-widget .go-to-label:before{content:"";position:absolute;left:-12px;top:0;width:12px;height:100%;background:linear-gradient(to left,var(--vscode-editorWidget-background) 0,transparent 12px)}.hc-black .inline-edits-long-distance-hint-widget .go-to-label:before,.hc-light .inline-edits-long-distance-hint-widget .go-to-label:before{background:var(--vscode-editorWidget-background)}.inline-edit-alternative-action-label .codicon{font-size:12px!important;padding-right:4px}.inline-edit-alternative-action-label .monaco-keybinding-key{padding:2px 3px}.inline-edit-alternative-action-label .inline-edit-alternative-action-label-separator{width:4px}.inline-edits-long-distance-hint-widget.show-file-icons .target-file .file-icon:before{display:inline-block;width:16px;height:16px;vertical-align:text-bottom;background-size:16px;background-position:center;background-repeat:no-repeat}.monaco-editor .goto-definition-link{text-decoration:underline;cursor:pointer;color:var(--vscode-editorLink-activeForeground)!important}.monaco-editor.vs .valueSetReplacement{outline:solid 2px var(--vscode-editorBracketMatch-border)}.monaco-editor .linked-editing-decoration{background-color:var(--vscode-editor-linkedEditingBackground);min-width:1px}.monaco-editor .detected-link,.monaco-editor .detected-link-active{text-decoration:underline;text-underline-position:under}.monaco-editor .detected-link-active{cursor:pointer;color:var(--vscode-editorLink-activeForeground)!important}.monaco-editor .scroll-editor-on-middle-click-dot{cursor:all-scroll;position:absolute;z-index:1;background-color:var(--vscode-editor-foreground, white);border:1px solid var(--vscode-editor-background, black);opacity:.5;width:5px;height:5px;border-radius:50%;transform:translate(-50%,-50%)}.monaco-editor .scroll-editor-on-middle-click-dot.hidden{display:none}.monaco-editor.scroll-editor-on-middle-click-editor *{cursor:all-scroll}.monaco-editor .focused .selectionHighlight{background-color:var(--vscode-editor-selectionHighlightBackground);box-sizing:border-box;border:1px solid var(--vscode-editor-selectionHighlightBorder)}.monaco-editor.hc-black .focused .selectionHighlight,.monaco-editor.hc-light .focused .selectionHighlight{border-style:dotted}.monaco-editor .wordHighlight{background-color:var(--vscode-editor-wordHighlightBackground);box-sizing:border-box;border:1px solid var(--vscode-editor-wordHighlightBorder)}.monaco-editor.hc-black .wordHighlight,.monaco-editor.hc-light .wordHighlight{border-style:dotted}.monaco-editor .wordHighlightStrong{background-color:var(--vscode-editor-wordHighlightStrongBackground);box-sizing:border-box;border:1px solid var(--vscode-editor-wordHighlightStrongBorder)}.monaco-editor.hc-black .wordHighlightStrong,.monaco-editor.hc-light .wordHighlightStrong{border-style:dotted}.monaco-editor .wordHighlightText{background-color:var(--vscode-editor-wordHighlightTextBackground);box-sizing:border-box;border:1px solid var(--vscode-editor-wordHighlightTextBorder)}.monaco-editor.hc-black .wordHighlightText,.monaco-editor.hc-light .wordHighlightText{border-style:dotted}.monaco-editor .parameter-hints-widget{z-index:39;display:flex;flex-direction:column;line-height:1.5em;cursor:default;color:var(--vscode-editorHoverWidget-foreground);background-color:var(--vscode-editorHoverWidget-background);border:1px solid var(--vscode-editorHoverWidget-border);border-radius:var(--vscode-cornerRadius-large);box-shadow:var(--vscode-shadow-lg)}.hc-black .monaco-editor .parameter-hints-widget,.hc-light .monaco-editor .parameter-hints-widget{border-width:2px}.monaco-editor .parameter-hints-widget>.phwrapper{max-width:440px;display:flex;flex-direction:row}.monaco-editor .parameter-hints-widget.multiple{min-height:3.3em;padding:0}.monaco-editor .parameter-hints-widget.multiple .body:before{content:"";display:block;height:100%;position:absolute;opacity:.5;border-left:1px solid var(--vscode-editorHoverWidget-border)}.monaco-editor .parameter-hints-widget p,.monaco-editor .parameter-hints-widget ul{margin:8px 0}.monaco-editor .parameter-hints-widget .monaco-scrollable-element,.monaco-editor .parameter-hints-widget .body{display:flex;flex:1;flex-direction:column;min-height:100%}.monaco-editor .parameter-hints-widget .signature{padding:4px 5px;position:relative}.monaco-editor .parameter-hints-widget .signature.has-docs:after{content:"";display:block;position:absolute;left:0;width:100%;padding-top:4px;opacity:.5;border-bottom:1px solid var(--vscode-editorHoverWidget-border)}.monaco-editor .parameter-hints-widget .code{font-family:var(--vscode-parameterHintsWidget-editorFontFamily),var(--vscode-parameterHintsWidget-editorFontFamilyDefault)}.monaco-editor .parameter-hints-widget .docs{padding:0 10px 0 5px;white-space:pre-wrap;overflow-wrap:break-word;word-break:break-word;min-width:0}.monaco-editor .parameter-hints-widget .docs.empty{display:none}.monaco-editor .parameter-hints-widget .docs a{color:var(--vscode-textLink-foreground)}.monaco-editor .parameter-hints-widget .docs a:hover{color:var(--vscode-textLink-activeForeground);cursor:pointer}.monaco-editor .parameter-hints-widget .docs .markdown-docs{white-space:initial;overflow-wrap:break-word;word-break:break-word;max-width:100%}.monaco-editor .parameter-hints-widget .docs code{font-family:var(--monaco-monospace-font);border-radius:3px;padding:0 .4em;background-color:var(--vscode-textCodeBlock-background)}.monaco-editor .parameter-hints-widget .docs .monaco-tokenized-source,.monaco-editor .parameter-hints-widget .docs .code{white-space:pre-wrap}.monaco-editor .parameter-hints-widget .controls{display:none;flex-direction:column;align-items:center;min-width:22px;justify-content:flex-end}.monaco-editor .parameter-hints-widget.multiple .controls{display:flex;padding:0 2px}.monaco-editor .parameter-hints-widget.multiple .button{width:16px;height:16px;background-repeat:no-repeat;cursor:pointer}.monaco-editor .parameter-hints-widget .button.previous{bottom:24px}.monaco-editor .parameter-hints-widget .overloads{text-align:center;height:12px;line-height:12px;font-family:var(--monaco-monospace-font)}.monaco-editor .parameter-hints-widget .signature .parameter.active{color:var(--vscode-editorHoverWidget-highlightForeground);font-weight:700}.monaco-editor .parameter-hints-widget .documentation-parameter>.parameter{font-weight:700;margin-right:.5em}.monaco-editor .editorPlaceholder{top:0;position:absolute;overflow:hidden;text-overflow:ellipsis;text-wrap:nowrap;pointer-events:none;color:var(--vscode-editor-placeholder-foreground)}.monaco-editor .unicode-highlight{border:1px solid var(--vscode-editorUnicodeHighlight-border);background-color:var(--vscode-editorUnicodeHighlight-background);box-sizing:border-box}.editor-banner{box-sizing:border-box;cursor:default;width:100%;font-size:12px;display:flex;overflow:visible;height:26px;background:var(--vscode-banner-background)}.editor-banner .icon-container{display:flex;flex-shrink:0;align-items:center;padding:0 6px 0 10px}.editor-banner .icon-container.custom-icon{background-repeat:no-repeat;background-position:center center;background-size:16px;width:16px;padding:0;margin:0 6px 0 10px}.editor-banner .message-container{display:flex;align-items:center;line-height:26px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.editor-banner .message-container p{margin-block-start:0;margin-block-end:0}.editor-banner .message-actions-container{flex-grow:1;flex-shrink:0;line-height:26px;margin:0 4px}.editor-banner .message-actions-container a.monaco-button{width:inherit;margin:2px 8px;padding:0 12px}.editor-banner .message-actions-container a{padding:3px;margin-left:12px;text-decoration:underline}.editor-banner .action-container{padding:0 10px 0 6px}.editor-banner{background-color:var(--vscode-banner-background)}.editor-banner,.editor-banner .action-container .codicon,.editor-banner .message-actions-container .monaco-link{color:var(--vscode-banner-foreground)}.editor-banner .icon-container .codicon{color:var(--vscode-banner-iconForeground)}.monaco-link{color:var(--vscode-textLink-foreground)}.monaco-link:hover{color:var(--vscode-textLink-activeForeground)}.floating-menu-overlay-widget{padding:2px 4px;color:var(--vscode-foreground);background-color:var(--vscode-editorWidget-background);border-radius:var(--vscode-cornerRadius-medium);border:1px solid var(--vscode-contrastBorder);display:flex;align-items:center;justify-content:center;gap:4px;z-index:10;box-shadow:var(--vscode-shadow-lg);overflow:hidden}.floating-menu-overlay-widget.single-button{background-color:transparent;border-width:0;padding:0;overflow:visible}.floating-menu-overlay-widget.single-button .action-item>.action-label,.floating-menu-overlay-widget.single-button .action-item>.action-label.codicon:not(.separator){height:28px;line-height:28px;border-radius:var(--vscode-cornerRadius-medium);box-shadow:0 2px 8px var(--vscode-widget-shadow)}.floating-menu-overlay-widget.single-button .action-item>.action-label{padding:0 8px}.floating-menu-overlay-widget.single-button .action-item>.action-label.codicon:not(.separator){width:28px}.floating-menu-overlay-widget .actions-container{gap:4px}.floating-menu-overlay-widget .action-item>.action-label{padding:4px 6px;font-size:11px;line-height:14px;border-radius:var(--vscode-cornerRadius-small)}.floating-menu-overlay-widget .action-item>.action-label.codicon:not(.separator){color:var(--vscode-foreground);width:22px;height:22px;padding:0;font-size:16px;line-height:22px;display:flex;align-items:center;justify-content:center}.floating-menu-overlay-widget .action-item.primary>.action-label,.floating-menu-overlay-widget .action-item.primary>.action-label.action-label.codicon:not(.separator){background-color:var(--vscode-button-background);color:var(--vscode-button-foreground)}.floating-menu-overlay-widget .action-item.primary>.action-label:hover{background-color:var(--vscode-button-hoverBackground)!important}.hc-black .floating-menu-overlay-widget.single-button,.hc-light .floating-menu-overlay-widget.single-button{border-width:1px;border-style:solid;border-color:var(--vscode-contrastBorder);background-color:var(--vscode-editorWidget-background);padding:0}:is(.hc-black .floating-menu-overlay-widget.single-button,.hc-light .floating-menu-overlay-widget.single-button) .action-item>.action-label,:is(.hc-black .floating-menu-overlay-widget.single-button,.hc-light .floating-menu-overlay-widget.single-button) .action-item>.action-label.codicon:not(.separator){box-shadow:none}.monaco-editor .iPadShowKeyboard{width:58px;min-width:0;height:36px;min-height:0;margin:0;padding:0;position:absolute;resize:none;overflow:hidden;background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIHZpZXdCb3g9IjAgMCA1MyAzNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwKSI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNDguMDM2NCA0LjAxMDQySDQuMDA3NzlMNC4wMDc3OSAzMi4wMjg2SDQ4LjAzNjRWNC4wMTA0MlpNNC4wMDc3OSAwLjAwNzgxMjVDMS43OTcyMSAwLjAwNzgxMjUgMC4wMDUxODc5OSAxLjc5OTg0IDAuMDA1MTg3OTkgNC4wMTA0MlYzMi4wMjg2QzAuMDA1MTg3OTkgMzQuMjM5MiAxLjc5NzIxIDM2LjAzMTIgNC4wMDc3OSAzNi4wMzEySDQ4LjAzNjRDNTAuMjQ3IDM2LjAzMTIgNTIuMDM5IDM0LjIzOTIgNTIuMDM5IDMyLjAyODZWNC4wMTA0MkM1Mi4wMzkgMS43OTk4NCA1MC4yNDcgMC4wMDc4MTI1IDQ4LjAzNjQgMC4wMDc4MTI1SDQuMDA3NzlaTTguMDEwNDIgOC4wMTMwMkgxMi4wMTNWMTIuMDE1Nkg4LjAxMDQyVjguMDEzMDJaTTIwLjAxODIgOC4wMTMwMkgxNi4wMTU2VjEyLjAxNTZIMjAuMDE4MlY4LjAxMzAyWk0yNC4wMjA4IDguMDEzMDJIMjguMDIzNFYxMi4wMTU2SDI0LjAyMDhWOC4wMTMwMlpNMzYuMDI4NiA4LjAxMzAySDMyLjAyNlYxMi4wMTU2SDM2LjAyODZWOC4wMTMwMlpNNDAuMDMxMiA4LjAxMzAySDQ0LjAzMzlWMTIuMDE1Nkg0MC4wMzEyVjguMDEzMDJaTTE2LjAxNTYgMTYuMDE4Mkg4LjAxMDQyVjIwLjAyMDhIMTYuMDE1NlYxNi4wMTgyWk0yMC4wMTgyIDE2LjAxODJIMjQuMDIwOFYyMC4wMjA4SDIwLjAxODJWMTYuMDE4MlpNMzIuMDI2IDE2LjAxODJIMjguMDIzNFYyMC4wMjA4SDMyLjAyNlYxNi4wMTgyWk00NC4wMzM5IDE2LjAxODJWMjAuMDIwOEgzNi4wMjg2VjE2LjAxODJINDQuMDMzOVpNMTIuMDEzIDI0LjAyMzRIOC4wMTA0MlYyOC4wMjZIMTIuMDEzVjI0LjAyMzRaTTE2LjAxNTYgMjQuMDIzNEgzNi4wMjg2VjI4LjAyNkgxNi4wMTU2VjI0LjAyMzRaTTQ0LjAzMzkgMjQuMDIzNEg0MC4wMzEyVjI4LjAyNkg0NC4wMzM5VjI0LjAyMzRaIiBmaWxsPSIjNDI0MjQyIi8+CjwvZz4KPGRlZnM+CjxjbGlwUGF0aCBpZD0iY2xpcDAiPgo8cmVjdCB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==) center center no-repeat;border:4px solid #F6F6F6;border-radius:4px}.monaco-editor.vs-dark .iPadShowKeyboard{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIHZpZXdCb3g9IjAgMCA1MyAzNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwKSI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNDguMDM2NCA0LjAxMDQySDQuMDA3NzlMNC4wMDc3OSAzMi4wMjg2SDQ4LjAzNjRWNC4wMTA0MlpNNC4wMDc3OSAwLjAwNzgxMjVDMS43OTcyMSAwLjAwNzgxMjUgMC4wMDUxODc5OSAxLjc5OTg0IDAuMDA1MTg3OTkgNC4wMTA0MlYzMi4wMjg2QzAuMDA1MTg3OTkgMzQuMjM5MiAxLjc5NzIxIDM2LjAzMTIgNC4wMDc3OSAzNi4wMzEySDQ4LjAzNjRDNTAuMjQ3IDM2LjAzMTIgNTIuMDM5IDM0LjIzOTIgNTIuMDM5IDMyLjAyODZWNC4wMTA0MkM1Mi4wMzkgMS43OTk4NCA1MC4yNDcgMC4wMDc4MTI1IDQ4LjAzNjQgMC4wMDc4MTI1SDQuMDA3NzlaTTguMDEwNDIgOC4wMTMwMkgxMi4wMTNWMTIuMDE1Nkg4LjAxMDQyVjguMDEzMDJaTTIwLjAxODIgOC4wMTMwMkgxNi4wMTU2VjEyLjAxNTZIMjAuMDE4MlY4LjAxMzAyWk0yNC4wMjA4IDguMDEzMDJIMjguMDIzNFYxMi4wMTU2SDI0LjAyMDhWOC4wMTMwMlpNMzYuMDI4NiA4LjAxMzAySDMyLjAyNlYxMi4wMTU2SDM2LjAyODZWOC4wMTMwMlpNNDAuMDMxMiA4LjAxMzAySDQ0LjAzMzlWMTIuMDE1Nkg0MC4wMzEyVjguMDEzMDJaTTE2LjAxNTYgMTYuMDE4Mkg4LjAxMDQyVjIwLjAyMDhIMTYuMDE1NlYxNi4wMTgyWk0yMC4wMTgyIDE2LjAxODJIMjQuMDIwOFYyMC4wMjA4SDIwLjAxODJWMTYuMDE4MlpNMzIuMDI2IDE2LjAxODJIMjguMDIzNFYyMC4wMjA4SDMyLjAyNlYxNi4wMTgyWk00NC4wMzM5IDE2LjAxODJWMjAuMDIwOEgzNi4wMjg2VjE2LjAxODJINDQuMDMzOVpNMTIuMDEzIDI0LjAyMzRIOC4wMTA0MlYyOC4wMjZIMTIuMDEzVjI0LjAyMzRaTTE2LjAxNTYgMjQuMDIzNEgzNi4wMjg2VjI4LjAyNkgxNi4wMTU2VjI0LjAyMzRaTTQ0LjAzMzkgMjQuMDIzNEg0MC4wMzEyVjI4LjAyNkg0NC4wMzM5VjI0LjAyMzRaIiBmaWxsPSIjQzVDNUM1Ii8+CjwvZz4KPGRlZnM+CjxjbGlwUGF0aCBpZD0iY2xpcDAiPgo8cmVjdCB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==) center center no-repeat;border:4px solid #252526}.monaco-editor .tokens-inspect-widget{z-index:50;user-select:text;-webkit-user-select:text;padding:10px;color:var(--vscode-editorHoverWidget-foreground);background-color:var(--vscode-editorHoverWidget-background);border:1px solid var(--vscode-editorHoverWidget-border)}.monaco-editor.hc-black .tokens-inspect-widget,.monaco-editor.hc-light .tokens-inspect-widget{border-width:2px}.monaco-editor .tokens-inspect-widget .tokens-inspect-separator{height:1px;border:0;background-color:var(--vscode-editorHoverWidget-border)}.monaco-editor .tokens-inspect-widget .tm-token{font-family:var(--monaco-monospace-font)}.monaco-editor .tokens-inspect-widget .tm-token-length{font-weight:400;font-size:60%;float:right}.monaco-editor .tokens-inspect-widget .tm-metadata-table{width:100%}.monaco-editor .tokens-inspect-widget .tm-metadata-value{font-family:var(--monaco-monospace-font);text-align:right}.monaco-editor .tokens-inspect-widget .tm-token-type{font-family:var(--monaco-monospace-font)} diff --git a/emrg/gui/vendor/monaco/vs/editor/editor.main.js b/emrg/gui/vendor/monaco/vs/editor/editor.main.js new file mode 100644 index 00000000..1901ae57 --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/editor/editor.main.js @@ -0,0 +1 @@ +define("vs/editor/editor.main",["exports","../json.worker-BizpAl9O","../css.worker-CyhWkhHo","../html.worker-CA3iAimZ","../ts.worker-2QLmBukE","require","vs/nls.messages-loader!","../index-CBVt3dzv","../monaco.contribution-9cKT3C7t","../editor-KLE6jdfb","../monaco.contribution-BgRy6xDf","../monaco.contribution-BE88ZNGY","../monaco.contribution-BPhsneLd"],(function(e,m,k,v,h,a,S,l,u,r,g,y,f){"use strict";function w(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const s in t)if(s!=="default"){const d=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(n,s,d.get?d:{enumerable:!0,get:()=>t[s]})}}return n.default=t,Object.freeze(n)}const j=w(a),T=""+new URL(a.toUrl("../assets/editor.worker-lj3bdIIn.js"),document.baseURI).href;typeof globalThis.require<"u"&&typeof globalThis.require.config=="function"&&globalThis.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]}),self.MonacoEnvironment={getWorker:function(t,n){return n==="json"?new Worker(o(m.__worker_url_0__)):n==="css"||n==="scss"||n==="less"?new Worker(o(k.__worker_url_0__)):n==="html"||n==="handlebars"||n==="razor"?new Worker(o(v.__worker_url_0__)):n==="typescript"||n==="javascript"?new Worker(o(h.__worker_url_0__)):new Worker(o(T))}};function o(t){typeof t!="string"&&(t=t.toString());const n=new Blob([["const ttPolicy = globalThis.trustedTypes?.createPolicy('defaultWorkerFactory', { createScriptURL: value => value });","globalThis.workerttPolicy = ttPolicy;",`importScripts(ttPolicy?.createScriptURL(${JSON.stringify(t)}) ?? ${JSON.stringify(t)});`,"globalThis.postMessage({ type: 'vscode-worker-ready' });"].join("")],{type:"application/javascript"});return URL.createObjectURL(n)}globalThis.monaco=l.monaco;const i=r.languages;i.css=u.register,i.html=g.register,i.typescript=y.register,i.json=f.register;const b=j.toUrl("vs/editor/editor.main.css"),c=document.createElement("link");c.rel="stylesheet",c.href=b,document.head.appendChild(c),e.lsp=l.index,e.css=u.register,e.CancellationTokenSource=r.CancellationTokenSource,e.Emitter=r.Emitter,e.KeyCode=r.KeyCode,e.KeyMod=r.KeyMod,e.MarkerSeverity=r.MarkerSeverity,e.MarkerTag=r.MarkerTag,e.Position=r.Position,e.Range=r.Range,e.Selection=r.Selection,e.SelectionDirection=r.SelectionDirection,e.Token=r.Token,e.Uri=r.Uri,e.editor=r.editor,e.languages=r.languages,e.html=g.register,e.typescript=y.register,e.json=f.register,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/editor/editor.worker.js b/emrg/gui/vendor/monaco/vs/editor/editor.worker.js new file mode 100644 index 00000000..3eba10a2 --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/editor/editor.worker.js @@ -0,0 +1 @@ +define("vs/editor/editor.worker",["exports","../initialize-DL0l1TGY"],(function(i,e){"use strict";self.onmessage=()=>{e.isWorkerInitialized()||e.start(()=>({}))},i.initialize=e.initialize,Object.defineProperty(i,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/editorWorkerHost-fVE1cjcC.js b/emrg/gui/vendor/monaco/vs/editorWorkerHost-fVE1cjcC.js new file mode 100644 index 00000000..79544976 --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/editorWorkerHost-fVE1cjcC.js @@ -0,0 +1,35 @@ +define("vs/editorWorkerHost-fVE1cjcC",["require","exports"],(function(w1,u){"use strict";function _1(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}function y1(t){if(t.length===0)throw new Error("Invalid tail call");return[t.slice(0,t.length-1),t[t.length-1]]}function as(t,e,n=(i,s)=>i===s){if(t===e)return!0;if(!t||!e||t.length!==e.length)return!1;for(let i=0,s=t.length;in(t[i],e))}function os(t,e){let n=0,i=t-1;for(;n<=i;){const s=(n+i)/2|0,r=e(s);if(r<0)n=s+1;else if(r>0)i=s-1;else return s}return-(n+1)}function $n(t,e,n){if(t=t|0,t>=e.length)throw new TypeError("invalid index");const i=e[Math.floor(e.length*Math.random())],s=[],r=[],a=[];for(const l of e){const c=n(l,i);c<0?s.push(l):c>0?r.push(l):a.push(l)}return t!!e)}function C1(t){let e=0;for(let n=0;n0}function E1(t,e=n=>n){const n=new Set;return t.filter(i=>{const s=e(i);return n.has(s)?!1:(n.add(s),!0)})}function M1(t,e){let n=typeof e=="number"?t:0;typeof e=="number"?n=t:(n=0,e=t);const i=[];if(n<=e)for(let s=n;se;s--)i.push(s);return i}function cs(t,e,n){const i=t.slice(0,e),s=t.slice(e);return i.concat(n,s)}function k1(t,e){const n=t.indexOf(e);n>-1&&(t.splice(n,1),t.unshift(e))}function T1(t,e){const n=t.indexOf(e);n>-1&&(t.splice(n,1),t.push(e))}function hs(t,e){for(const n of e)t.push(n)}function P1(t,e){const n=[];for(const i of t){const s=e(i);s!==void 0&&n.push(s)}return n}function I1(t){return Array.isArray(t)?t:[t]}function F1(t,e,n){const i=fs(t,e),s=t.length,r=n.length;t.length=s+r;for(let a=s-1;a>=i;a--)t[a+r]=t[a];for(let a=0;a0}t.isGreaterThan=i;function s(r){return r===0}t.isNeitherLessOrGreaterThan=s,t.greaterThan=1,t.lessThan=-1,t.neitherLessOrGreaterThan=0})(qe||(qe={}));function $e(t,e){return(n,i)=>e(t(n),t(i))}function B1(...t){return(e,n)=>{for(const i of t){const s=i(e,n);if(!qe.isNeitherLessOrGreaterThan(s))return s}return qe.neitherLessOrGreaterThan}}const Oe=(t,e)=>t-e,V1=(t,e)=>Oe(t?1:0,e?1:0);function ds(t){return(e,n)=>-t(e,n)}function q1(t){return(e,n)=>e===void 0?n===void 0?qe.neitherLessOrGreaterThan:qe.lessThan:n===void 0?qe.greaterThan:t(e,n)}class U1{constructor(e){this.firstIdx=0,this.items=e,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let n=this.firstIdx;for(;n(e.push(n),!0)),e}filter(e){return new Ct(n=>this.iterate(i=>e(i)?n(i):!0))}map(e){return new Ct(n=>this.iterate(i=>n(e(i))))}findLast(e){let n;return this.iterate(i=>(e(i)&&(n=i),!0)),n}findLastMaxBy(e){let n,i=!0;return this.iterate(s=>((i||qe.isGreaterThan(e(s,n)))&&(i=!1,n=s),!0)),n}};Ct.empty=new Ct(e=>{});let On=Ct;class tn{constructor(e){this._indexMap=e}static createSortPermutation(e,n){const i=Array.from(e.keys()).sort((s,r)=>n(e[s],e[r]));return new tn(i)}apply(e){return e.map((n,i)=>e[this._indexMap[i]])}inverse(){const e=this._indexMap.slice();for(let n=0;ne+n,0)}class $1{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?st.isErrorNoTelemetry(e)?new st(e.message+` + +`+e.stack):new Error(e.message+` + +`+e.stack):e},0)}}emit(e){this.listeners.forEach(n=>{n(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}}const zn=new $1;function O1(t){zn.onUnexpectedError(t)}function ze(t){sn(t)||zn.onUnexpectedError(t)}function ms(t){sn(t)||zn.onUnexpectedExternalError(t)}function Hn(t){if(t instanceof Error){const{name:e,message:n,cause:i}=t,s=t.stacktrace||t.stack;return{$isError:!0,name:e,message:n,stack:s,noTelemetry:st.isErrorNoTelemetry(t),cause:i?Hn(i):void 0,code:t.code}}return t}const nn="Canceled";function sn(t){return t instanceof Ce?!0:t instanceof Error&&t.name===nn&&t.message===nn}class Ce extends Error{constructor(){super(nn),this.name=this.message}}function z1(){const t=new Error(nn);return t.name=t.message,t}function H1(t){return t?new Error(`Illegal argument: ${t}`):new Error("Illegal argument")}function j1(t){return t?new Error(`Illegal state: ${t}`):new Error("Illegal state")}class G1 extends Error{constructor(e){super("NotSupported"),e&&(this.message=e)}}class st extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof st)return e;const n=new st;return n.message=e.message,n.stack=e.stack,n}static isErrorNoTelemetry(e){return e.name==="CodeExpectedError"}}class G extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,G.prototype)}}function Q1(t,e){if(!t)throw new Error(e?`Assertion failed (${e})`:"Assertion Failed")}function gs(t,e="Unreachable"){throw new Error(e)}function jn(t,e="unexpected state"){if(!t)throw typeof e=="string"?new G(`Assertion Failed: ${e}`):e}function X1(t,e="Soft Assertion Failed"){t||ze(new G(e))}function rt(t){if(!t()){debugger;t(),ze(new G("Assertion Failed"))}}function rn(t,e){let n=0;for(;n"u"}function ea(t){return!an(t)}function an(t){return bs(t)||t===null}function ta(t,e){if(!t)throw new Error(e?`Unexpected type, expected '${e}'`:"Unexpected type")}function na(t){return jn(t!=null,"Argument is `undefined` or `null`."),t}function ws(t){return typeof t=="function"}function ia(t,e){const n=Math.min(t.length,e.length);for(let i=0;i{e[n]=i&&typeof i=="object"?_s(i):i}),e}function aa(t){if(!t||typeof t!="object")return t;const e=[t];for(;e.length>0;){const n=e.shift();Object.freeze(n);for(const i in n)if(ys.call(n,i)){const s=n[i];typeof s=="object"&&!Object.isFrozen(s)&&!J1(s)&&e.push(s)}}return t}const ys=Object.prototype.hasOwnProperty;function oa(t,e){return Qn(t,e,new Set)}function Qn(t,e,n){if(an(t))return t;const i=e(t);if(typeof i<"u")return i;if(Array.isArray(t)){const s=[];for(const r of t)s.push(Qn(r,e,n));return s}if(at(t)){if(n.has(t))throw new Error("Cannot clone recursive data-structure");n.add(t);const s={};for(const r in t)ys.call(t,r)&&(s[r]=Qn(t[r],e,n));return n.delete(t),s}return t}function Ls(t,e,n=!0){return at(t)?(at(e)&&Object.keys(e).forEach(i=>{i in t?n&&(at(t[i])&&at(e[i])?Ls(t[i],e[i],n):t[i]=e[i]):t[i]=e[i]}),t):e}function Tt(t,e){if(t===e)return!0;if(t==null||e===null||e===void 0||typeof t!=typeof e||typeof t!="object"||Array.isArray(t)!==Array.isArray(e))return!1;let n,i;if(Array.isArray(t)){if(t.length!==e.length)return!1;for(n=0;n=0;function on(t,e){let n;return e.length===0?n=t:n=t.replace(/\{(\d+)\}/g,(i,s)=>{const r=s[0],a=e[r];let l=i;return typeof a=="string"?l=a:(typeof a=="number"||typeof a=="boolean"||a===void 0||a===null)&&(l=String(a)),l}),la&&(n="["+n.replace(/[aouei]/g,"$&$&")+"]"),n}function F(t,e,...n){return on(typeof t=="number"?xs(t,e):e,n)}function xs(t,e){const n=vs()?.[t];if(typeof n!="string"){if(typeof e=="string")return e;throw new Error(`!!! NLS MISSING: ${t} !!!`)}return n}function ua(t,e,...n){let i;typeof t=="number"?i=xs(t,e):i=e;const s=on(i,n);return{value:s,original:e===i?s:on(e,n)}}const He="en";let Pt=!1,It=!1,Ft=!1,Ss=!1,Yn=!1,Jn=!1,Ns=!1,ln,un=He,Cs=He,ca,Re;const Ae=globalThis;let le;typeof Ae.vscode<"u"&&typeof Ae.vscode.process<"u"?le=Ae.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(le=process);const ha=typeof le?.versions?.electron=="string"&&le?.type==="renderer";if(typeof le=="object"){Pt=le.platform==="win32",It=le.platform==="darwin",Ft=le.platform==="linux",Ft&&le.env.SNAP&&le.env.SNAP_REVISION,le.env.CI||le.env.BUILD_ARTIFACTSTAGINGDIRECTORY||le.env.GITHUB_WORKSPACE,ln=He,un=He;const t=le.env.VSCODE_NLS_CONFIG;if(t)try{const e=JSON.parse(t);ln=e.userLocale,Cs=e.osLocale,un=e.resolvedLanguage||He,ca=e.languagePack?.translationsConfigFile}catch{}Ss=!0}else typeof navigator=="object"&&!ha?(Re=navigator.userAgent,Pt=Re.indexOf("Windows")>=0,It=Re.indexOf("Macintosh")>=0,Jn=(Re.indexOf("Macintosh")>=0||Re.indexOf("iPad")>=0||Re.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Ft=Re.indexOf("Linux")>=0,Ns=Re?.indexOf("Mobi")>=0,Yn=!0,un=Xn()||He,ln=navigator.language.toLowerCase(),Cs=ln):console.error("Unable to resolve platform.");let cn=0;It?cn=1:Pt?cn=3:Ft&&(cn=2);const ot=Pt,Rs=It,fa=Ft,As=Ss,Zn=Yn,da=Yn&&typeof Ae.importScripts=="function"?Ae.origin:void 0,ma=Jn,ga=Ns,pa=cn,ve=Re,ba=un,wa=typeof Ae.postMessage=="function"&&!Ae.importScripts,Es=(()=>{if(wa){const t=[];Ae.addEventListener("message",n=>{if(n.data&&n.data.vscodeScheduleAsyncWork)for(let i=0,s=t.length;i{const i=++e;t.push({id:i,callback:n}),Ae.postMessage({vscodeScheduleAsyncWork:i},"*")}}return t=>setTimeout(t)})(),_a=It||Jn?2:Pt?1:3;let Ms=!0,ks=!1;function ya(){if(!ks){ks=!0;const t=new Uint8Array(2);t[0]=1,t[1]=2,Ms=new Uint16Array(t.buffer)[0]===513}return Ms}const Ts=!!(ve&&ve.indexOf("Chrome")>=0),La=!!(ve&&ve.indexOf("Firefox")>=0),va=!!(!Ts&&ve&&ve.indexOf("Safari")>=0),xa=!!(ve&&ve.indexOf("Edg/")>=0),Sa=!!(ve&&ve.indexOf("Android")>=0);function Ps(t,e){const n=this;let i=!1,s;return function(){return i||(i=!0,s=t.apply(n,arguments)),s}}u.Iterable=void 0,(function(t){function e(y){return!!y&&typeof y=="object"&&typeof y[Symbol.iterator]=="function"}t.is=e;const n=Object.freeze([]);function i(){return n}t.empty=i;function*s(y){yield y}t.single=s;function r(y){return e(y)?y:s(y)}t.wrap=r;function a(y){return y??n}t.from=a;function*l(y){for(let L=y.length-1;L>=0;L--)yield y[L]}t.reverse=l;function c(y){return!y||y[Symbol.iterator]().next().done===!0}t.isEmpty=c;function h(y){return y[Symbol.iterator]().next().value}t.first=h;function d(y,L){let R=0;for(const V of y)if(L(V,R++))return!0;return!1}t.some=d;function f(y,L){let R=0;for(const V of y)if(!L(V,R++))return!1;return!0}t.every=f;function m(y,L){for(const R of y)if(L(R))return R}t.find=m;function*b(y,L){for(const R of y)L(R)&&(yield R)}t.filter=b;function*p(y,L){let R=0;for(const V of y)yield L(V,R++)}t.map=p;function*g(y,L){let R=0;for(const V of y)yield*L(V,R++)}t.flatMap=g;function*_(...y){for(const L of y)ps(L)?yield*L:yield L}t.concat=_;function x(y,L,R){let V=R;for(const W of y)V=L(V,W);return V}t.reduce=x;function S(y){let L=0;for(const R of y)L++;return L}t.length=S;function*v(y,L,R=y.length){for(L<-y.length&&(L=0),L<0&&(L+=y.length),R<0?R+=y.length:R>y.length&&(R=y.length);L1)throw new AggregateError(e,"Encountered errors while disposing of store");return Array.isArray(t)?[]:t}else if(t)return t.dispose(),t}function Fs(...t){return xe(()=>lt(t))}class Ca{constructor(e){this._isDisposed=!1,this._fn=e}dispose(){if(!this._isDisposed){if(!this._fn)throw new Error("Unbound disposable context: Need to use an arrow function to preserve the value of this");this._isDisposed=!0,this._fn()}}}function xe(t){return new Ca(t)}const Dn=class Dn{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{lt(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e||e===we.None)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?Dn.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}delete(e){if(e){if(e===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(e),e.dispose()}}};Dn.DISABLE_DISPOSED_WARNING=!1;let je=Dn;const ss=class ss{constructor(){this._store=new je,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};ss.None=Object.freeze({dispose(){}});let we=ss;class Ra{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,this._value?.dispose(),this._value=void 0}}class Aa{constructor(e){this._disposable=e,this._counter=1}acquire(){return this._counter++,this}release(){return--this._counter===0&&this._disposable.dispose(),this}}class Ea{constructor(e){this.object=e}dispose(){}}class Ma{constructor(e=new Map){this._isDisposed=!1,this._store=e}dispose(){this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(this._store.size)try{lt(this._store.values())}finally{this._store.clear()}}get(e){return this._store.get(e)}set(e,n,i=!1){this._isDisposed&&console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack),i||this._store.get(e)?.dispose(),this._store.set(e,n)}deleteAndDispose(e){this._store.get(e)?.dispose(),this._store.delete(e)}keys(){return this._store.keys()}values(){return this._store.values()}[Symbol.iterator](){return this._store[Symbol.iterator]()}}const Rt=class Rt{constructor(e){this.element=e,this.next=Rt.Undefined,this.prev=Rt.Undefined}};Rt.Undefined=new Rt(void 0);let Y=Rt;class Kn{constructor(){this._first=Y.Undefined,this._last=Y.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Y.Undefined}clear(){let e=this._first;for(;e!==Y.Undefined;){const n=e.next;e.prev=Y.Undefined,e.next=Y.Undefined,e=n}this._first=Y.Undefined,this._last=Y.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,n){const i=new Y(e);if(this._first===Y.Undefined)this._first=i,this._last=i;else if(n){const r=this._last;this._last=i,i.prev=r,r.next=i}else{const r=this._first;this._first=i,i.next=r,r.prev=i}this._size+=1;let s=!1;return()=>{s||(s=!0,this._remove(i))}}shift(){if(this._first!==Y.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==Y.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==Y.Undefined&&e.next!==Y.Undefined){const n=e.prev;n.next=e.next,e.next.prev=n}else e.prev===Y.Undefined&&e.next===Y.Undefined?(this._first=Y.Undefined,this._last=Y.Undefined):e.next===Y.Undefined?(this._last=this._last.prev,this._last.next=Y.Undefined):e.prev===Y.Undefined&&(this._first=this._first.next,this._first.prev=Y.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==Y.Undefined;)yield e.element,e=e.next}}let ut;const ei=globalThis.vscode;if(typeof ei<"u"&&typeof ei.process<"u"){const t=ei.process;ut={get platform(){return t.platform},get arch(){return t.arch},get env(){return t.env},cwd(){return t.cwd()}}}else typeof process<"u"&&typeof process?.versions?.node=="string"?ut={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:ut={get platform(){return ot?"win32":Rs?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};const hn=ut.cwd,ti=ut.env,ka=ut.platform,Ta=globalThis.performance.now.bind(globalThis.performance);class Dt{static create(e){return new Dt(e)}constructor(e){this._now=e===!1?Date.now:Ta,this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}}const Pa=100,Ds=6e4;function Bs(){return!!ti.VSCODE_DEV}u.Event=void 0,(function(t){t.None=()=>we.None;function e(A,C,E){return m(A,()=>{},0,void 0,C??!0,void 0,E)}t.defer=e;function n(A){return(C,E=null,T)=>{let M=!1,B;return B=A(z=>{if(!M)return B?B.dispose():M=!0,C.call(E,z)},null,T),M&&B.dispose(),B}}t.once=n;function i(A,C){return t.once(t.filter(A,C))}t.onceIf=i;function s(A,C,E){return d((T,M=null,B)=>A(z=>T.call(M,C(z)),null,B),E)}t.map=s;function r(A,C,E){return d((T,M=null,B)=>A(z=>{C(z),T.call(M,z)},null,B),E)}t.forEach=r;function a(A,C,E){return d((T,M=null,B)=>A(z=>C(z)&&T.call(M,z),null,B),E)}t.filter=a;function l(A){return A}t.signal=l;function c(...A){return(C,E=null,T)=>{const M=Fs(...A.map(B=>B(z=>C.call(E,z))));return f(M,T)}}t.any=c;function h(A,C,E,T){let M=E;return s(A,B=>(M=C(M,B),M),T)}t.reduce=h;function d(A,C){let E;const T={onWillAddFirstListener(){E=A(M.fire,M)},onDidRemoveLastListener(){E?.dispose()}},M=new ie(T);return C?.add(M),M.event}function f(A,C){return C instanceof Array?C.push(A):C&&C.add(A),A}function m(A,C,E=100,T=!1,M=!1,B,z){let te,X,oe,ne=0,de;const it={leakWarningThreshold:B,onWillAddFirstListener(){te=A(Cc=>{ne++,X=C(X,Cc),T&&!oe&&(kt.fire(X),X=void 0),de=()=>{const Rc=X;X=void 0,oe=void 0,(!T||ne>1)&&kt.fire(Rc),ne=0},typeof E=="number"?(oe&&clearTimeout(oe),oe=setTimeout(de,E)):oe===void 0&&(oe=null,queueMicrotask(de))})},onWillRemoveListener(){M&&ne>0&&de?.()},onDidRemoveLastListener(){de=void 0,te.dispose()}},kt=new ie(it);return z?.add(kt),kt.event}t.debounce=m;function b(A,C=0,E,T){return t.debounce(A,(M,B)=>M?(M.push(B),M):[B],C,void 0,E??!0,void 0,T)}t.accumulate=b;function p(A,C,E=100,T=!0,M=!0,B,z){let te,X,oe,ne=0;const de={leakWarningThreshold:B,onWillAddFirstListener(){te=A(kt=>{ne++,X=C(X,kt),oe===void 0&&(T&&(it.fire(X),X=void 0,ne=0),typeof E=="number"?oe=setTimeout(()=>{M&&ne>0&&it.fire(X),X=void 0,oe=void 0,ne=0},E):(oe=0,queueMicrotask(()=>{M&&ne>0&&it.fire(X),X=void 0,oe=void 0,ne=0})))})},onDidRemoveLastListener(){te.dispose()}},it=new ie(de);return z?.add(it),it.event}t.throttle=p;function g(A,C=(T,M)=>T===M,E){let T=!0,M;return a(A,B=>{const z=T||!C(B,M);return T=!1,M=B,z},E)}t.latch=g;function _(A,C,E){return[t.filter(A,C,E),t.filter(A,T=>!C(T),E)]}t.split=_;function x(A,C,E=!1,T=[],M){let B=T.slice(),z;Bs()&&(z={stack:fn.create(),timerId:setTimeout(()=>{B&&B.length>0&&z&&!z.warned&&(z.warned=!0,console.warn(`[Event.buffer][${C}] potential LEAK detected: ${B.length} events buffered for ${Ds/1e3}s without being consumed. Buffered here:`),z.stack.print())},Ds),warned:!1},M&&M.add(xe(()=>clearTimeout(z.timerId))));const te=()=>{z&&clearTimeout(z.timerId)};let X=A(de=>{B?(B.push(de),Bs()&&z&&!z.warned&&B.length>=Pa&&(z.warned=!0,console.warn(`[Event.buffer][${C}] potential LEAK detected: ${B.length} events buffered without being consumed. Buffered here:`),z.stack.print())):ne.fire(de)});M&&M.add(X);const oe=()=>{B?.forEach(de=>ne.fire(de)),B=null,te()},ne=new ie({onWillAddFirstListener(){X||(X=A(de=>ne.fire(de)),M&&M.add(X))},onDidAddFirstListener(){B&&(E?setTimeout(oe):oe())},onDidRemoveLastListener(){X&&X.dispose(),X=null,te()}});return M&&M.add(ne),ne.event}t.buffer=x;function S(A,C){return(T,M,B)=>{const z=C(new k);return A(function(te){const X=z.evaluate(te);X!==v&&T.call(M,X)},void 0,B)}}t.chain=S;const v=Symbol("HaltChainable");class k{constructor(){this.steps=[]}map(C){return this.steps.push(C),this}forEach(C){return this.steps.push(E=>(C(E),E)),this}filter(C){return this.steps.push(E=>C(E)?E:v),this}reduce(C,E){let T=E;return this.steps.push(M=>(T=C(T,M),T)),this}latch(C=(E,T)=>E===T){let E=!0,T;return this.steps.push(M=>{const B=E||!C(M,T);return E=!1,T=M,B?M:v}),this}evaluate(C){for(const E of this.steps)if(C=E(C),C===v)break;return C}}function D(A,C,E=T=>T){const T=(...te)=>z.fire(E(...te)),M=()=>A.on(C,T),B=()=>A.removeListener(C,T),z=new ie({onWillAddFirstListener:M,onDidRemoveLastListener:B});return z.event}t.fromNodeEventEmitter=D;function O(A,C,E=T=>T){const T=(...te)=>z.fire(E(...te)),M=()=>A.addEventListener(C,T),B=()=>A.removeEventListener(C,T),z=new ie({onWillAddFirstListener:M,onDidRemoveLastListener:B});return z.event}t.fromDOMEventEmitter=O;function y(A,C){let E,T;const M=new Promise(B=>{T=n(A)(B),ri(T,C),E=()=>{Us(T,C)}});return M.cancel=E,C&&M.finally(()=>Us(T,C)),M}t.toPromise=y;function L(A,C){return A(E=>C.fire(E))}t.forward=L;function R(A,C,E){return C(E),A(T=>C(T))}t.runAndSubscribe=R;class V{constructor(C,E){this._observable=C,this._counter=0,this._hasChanged=!1;const T={onWillAddFirstListener:()=>{C.addObserver(this),this._observable.reportChanges()},onDidRemoveLastListener:()=>{C.removeObserver(this)}};this.emitter=new ie(T),E&&E.add(this.emitter)}beginUpdate(C){this._counter++}handlePossibleChange(C){}handleChange(C,E){this._hasChanged=!0}endUpdate(C){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function W(A,C){return new V(A,C).emitter.event}t.fromObservable=W;function q(A){return(C,E,T)=>{let M=0,B=!1;const z={beginUpdate(){M++},endUpdate(){M--,M===0&&(A.reportChanges(),B&&(B=!1,C.call(E)))},handlePossibleChange(){},handleChange(){B=!0}};A.addObserver(z),A.reportChanges();const te={dispose(){A.removeObserver(z)}};return ri(te,T),te}}t.fromObservableLight=q})(u.Event||(u.Event={}));const At=class At{constructor(e){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${e}_${At._idPool++}`,At.all.add(this)}start(e){this._stopWatch=new Dt,this.listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}};At.all=new Set,At._idPool=0;let ni=At,Ia=-1;const Bn=class Bn{constructor(e,n,i=(Bn._idPool++).toString(16).padStart(3,"0")){this._errorHandler=e,this.threshold=n,this.name=i,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(e,n){const i=this.threshold;if(i<=0||n.3?"dominated":"popular",d=new dn(h,c,r,n,l);this._errorHandler(d)}return()=>{const r=this._stacks.get(e.value)||0;this._stacks.set(e.value,r-1)}}getMostFrequentStack(){if(!this._stacks)return;let e,n=0;for(const[i,s]of this._stacks)(!e||n{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){const l=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(l);const c=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],h=c[1]/this._size>.3?"dominated":"popular",d=new Fa(h,`${l}. HINT: Stack shows most frequent listener (${c[1]}-times)`,c[0],this._size,this._options?.leakWarningName);return(this._options?.onListenerError||ze)(d),we.None}if(this._disposed)return we.None;n&&(e=e.bind(n));const s=new si(e);let r;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(s.stack=fn.create(),r=this._leakageMon.check(s.stack,this._size+1)),this._listeners?this._listeners instanceof si?(this._deliveryQueue??=new Vs,this._listeners=[this._listeners,s]):this._listeners.push(s):(this._options?.onWillAddFirstListener?.(this),this._listeners=s,this._options?.onDidAddFirstListener?.(this)),this._options?.onDidAddListener?.(this),this._size++;const a=xe(()=>{r?.(),this._removeListener(s)});return ri(a,i),a},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}const n=this._listeners,i=n.indexOf(e);if(i===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,n[i]=void 0;const s=this._deliveryQueue.current===this;if(this._size*Da<=n.length){let r=0;for(let a=0;a0}}const Ba=()=>new Vs;class Vs{constructor(){this.i=-1,this.end=0}enqueue(e,n,i){this.i=0,this.end=i,this.current=e,this.value=n}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}class qs extends ie{constructor(e){super(e),this._isPaused=0,this._eventQueue=new Kn,this._mergeFn=e?.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){if(this._eventQueue.size>0){const e=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(e))}}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(e){this._size&&(this._isPaused!==0?this._eventQueue.push(e):super.fire(e))}}class Va extends qs{constructor(e){super(e),this._delay=e.delay??100}fire(e){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(e)}}class qa extends ie{constructor(e){super(e),this._queuedEvents=[],this._mergeFn=e?.merge}fire(e){this.hasListeners()&&(this._queuedEvents.push(e),this._queuedEvents.length===1&&queueMicrotask(()=>{this._mergeFn?super.fire(this._mergeFn(this._queuedEvents)):this._queuedEvents.forEach(n=>super.fire(n)),this._queuedEvents=[]}))}}class Ua{constructor(){this.hasListeners=!1,this.events=[],this.emitter=new ie({onWillAddFirstListener:()=>this.onFirstListenerAdd(),onDidRemoveLastListener:()=>this.onLastListenerRemove()})}get event(){return this.emitter.event}add(e){const n={event:e,listener:null};return this.events.push(n),this.hasListeners&&this.hook(n),xe(Ps(()=>{this.hasListeners&&this.unhook(n);const s=this.events.indexOf(n);this.events.splice(s,1)}))}onFirstListenerAdd(){this.hasListeners=!0,this.events.forEach(e=>this.hook(e))}onLastListenerRemove(){this.hasListeners=!1,this.events.forEach(e=>this.unhook(e))}hook(e){e.listener=e.event(n=>this.emitter.fire(n))}unhook(e){e.listener?.dispose(),e.listener=null}dispose(){this.emitter.dispose();for(const e of this.events)e.listener?.dispose();this.events=[]}}class Wa{constructor(){this.data=[]}wrapEvent(e,n,i){return(s,r,a)=>e(l=>{const c=this.data[this.data.length-1];if(!n){c?c.buffers.push(()=>s.call(r,l)):s.call(r,l);return}const h=c;if(!h){s.call(r,n(i,l));return}h.items??=[],h.items.push(l),h.buffers.length===0&&c.buffers.push(()=>{h.reducedResult??=i?h.items.reduce(n,i):h.items.reduce(n),s.call(r,h.reducedResult)})},void 0,a)}bufferEvents(e){const n={buffers:new Array};this.data.push(n);const i=e();return this.data.pop(),n.buffers.forEach(s=>s()),i}}class $a{constructor(){this.listening=!1,this.inputEvent=u.Event.None,this.inputEventListener=we.None,this.emitter=new ie({onDidAddFirstListener:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onDidRemoveLastListener:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}function ri(t,e){e instanceof je?e.add(t):Array.isArray(e)&&e.push(t)}function Us(t,e){if(e instanceof je)e.delete(t);else if(Array.isArray(e)){const n=e.indexOf(t);n!==-1&&e.splice(n,1)}t.dispose()}const Ws="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function Oa(t=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(const n of Ws)t.indexOf(n)>=0||(e+="\\"+n);return e+="\\s]+)",new RegExp(e,"g")}const ai=Oa();function oi(t){let e=ai;if(t&&t instanceof RegExp)if(t.global)e=t;else{let n="g";t.ignoreCase&&(n+="i"),t.multiline&&(n+="m"),t.unicode&&(n+="u"),e=new RegExp(t.source,n)}return e.lastIndex=0,e}const $s=new Kn;$s.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function mn(t,e,n,i,s){if(e=oi(e),s||(s=u.Iterable.first($s)),n.length>s.maxLen){let h=t-s.maxLen/2;return h<0?h=0:i+=h,n=n.substring(h,t+s.maxLen/2),mn(t,e,n,i,s)}const r=Date.now(),a=t-1-i;let l=-1,c=null;for(let h=1;!(Date.now()-r>=s.timeBudget);h++){const d=a-s.windowSize*h;e.lastIndex=Math.max(0,d);const f=za(e,n,a,l);if(!f&&c||(c=f,d<=0))break;l=d}if(c){const h={word:c[0],startColumn:i+1+c.index,endColumn:i+1+c.index+c[0].length};return e.lastIndex=0,h}return null}function za(t,e,n,i){let s;for(;s=t.exec(e);){const r=s.index||0;if(r<=n&&t.lastIndex>=n)return s;if(i>0&&r>i)return null}return null}const Os=Object.freeze(function(t,e){const n=setTimeout(t.bind(e),0);return{dispose(){clearTimeout(n)}}});u.CancellationToken=void 0,(function(t){function e(n){return n===t.None||n===t.Cancelled||n instanceof gn?!0:!n||typeof n!="object"?!1:typeof n.isCancellationRequested=="boolean"&&typeof n.onCancellationRequested=="function"}t.isCancellationToken=e,t.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:u.Event.None}),t.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Os})})(u.CancellationToken||(u.CancellationToken={}));class gn{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?Os:(this._emitter||(this._emitter=new ie),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class ct{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new gn),this._token}cancel(){this._token?this._token instanceof gn&&this._token.cancel():this._token=u.CancellationToken.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener?.dispose(),this._token?this._token instanceof gn&&this._token.dispose():this._token=u.CancellationToken.None}}function Ha(t){const e=new ct;return t.add({dispose(){e.cancel()}}),e.token}class li{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,n){this._keyCodeToStr[e]=n,this._strToKeyCode[n.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const pn=new li,ui=new li,ci=new li,zs=new Array(230),ja=Object.create(null),Ga=Object.create(null),hi=[];for(let t=0;t<=193;t++)hi[t]=-1;(function(){const e=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN","",""],[1,1,"Hyper",0,"",0,"","",""],[1,2,"Super",0,"",0,"","",""],[1,3,"Fn",0,"",0,"","",""],[1,4,"FnLock",0,"",0,"","",""],[1,5,"Suspend",0,"",0,"","",""],[1,6,"Resume",0,"",0,"","",""],[1,7,"Turbo",0,"",0,"","",""],[1,8,"Sleep",0,"",0,"VK_SLEEP","",""],[1,9,"WakeUp",0,"",0,"","",""],[0,10,"KeyA",31,"A",65,"VK_A","",""],[0,11,"KeyB",32,"B",66,"VK_B","",""],[0,12,"KeyC",33,"C",67,"VK_C","",""],[0,13,"KeyD",34,"D",68,"VK_D","",""],[0,14,"KeyE",35,"E",69,"VK_E","",""],[0,15,"KeyF",36,"F",70,"VK_F","",""],[0,16,"KeyG",37,"G",71,"VK_G","",""],[0,17,"KeyH",38,"H",72,"VK_H","",""],[0,18,"KeyI",39,"I",73,"VK_I","",""],[0,19,"KeyJ",40,"J",74,"VK_J","",""],[0,20,"KeyK",41,"K",75,"VK_K","",""],[0,21,"KeyL",42,"L",76,"VK_L","",""],[0,22,"KeyM",43,"M",77,"VK_M","",""],[0,23,"KeyN",44,"N",78,"VK_N","",""],[0,24,"KeyO",45,"O",79,"VK_O","",""],[0,25,"KeyP",46,"P",80,"VK_P","",""],[0,26,"KeyQ",47,"Q",81,"VK_Q","",""],[0,27,"KeyR",48,"R",82,"VK_R","",""],[0,28,"KeyS",49,"S",83,"VK_S","",""],[0,29,"KeyT",50,"T",84,"VK_T","",""],[0,30,"KeyU",51,"U",85,"VK_U","",""],[0,31,"KeyV",52,"V",86,"VK_V","",""],[0,32,"KeyW",53,"W",87,"VK_W","",""],[0,33,"KeyX",54,"X",88,"VK_X","",""],[0,34,"KeyY",55,"Y",89,"VK_Y","",""],[0,35,"KeyZ",56,"Z",90,"VK_Z","",""],[0,36,"Digit1",22,"1",49,"VK_1","",""],[0,37,"Digit2",23,"2",50,"VK_2","",""],[0,38,"Digit3",24,"3",51,"VK_3","",""],[0,39,"Digit4",25,"4",52,"VK_4","",""],[0,40,"Digit5",26,"5",53,"VK_5","",""],[0,41,"Digit6",27,"6",54,"VK_6","",""],[0,42,"Digit7",28,"7",55,"VK_7","",""],[0,43,"Digit8",29,"8",56,"VK_8","",""],[0,44,"Digit9",30,"9",57,"VK_9","",""],[0,45,"Digit0",21,"0",48,"VK_0","",""],[1,46,"Enter",3,"Enter",13,"VK_RETURN","",""],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE","",""],[1,48,"Backspace",1,"Backspace",8,"VK_BACK","",""],[1,49,"Tab",2,"Tab",9,"VK_TAB","",""],[1,50,"Space",10,"Space",32,"VK_SPACE","",""],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,"",0,"","",""],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL","",""],[1,64,"F1",59,"F1",112,"VK_F1","",""],[1,65,"F2",60,"F2",113,"VK_F2","",""],[1,66,"F3",61,"F3",114,"VK_F3","",""],[1,67,"F4",62,"F4",115,"VK_F4","",""],[1,68,"F5",63,"F5",116,"VK_F5","",""],[1,69,"F6",64,"F6",117,"VK_F6","",""],[1,70,"F7",65,"F7",118,"VK_F7","",""],[1,71,"F8",66,"F8",119,"VK_F8","",""],[1,72,"F9",67,"F9",120,"VK_F9","",""],[1,73,"F10",68,"F10",121,"VK_F10","",""],[1,74,"F11",69,"F11",122,"VK_F11","",""],[1,75,"F12",70,"F12",123,"VK_F12","",""],[1,76,"PrintScreen",0,"",0,"","",""],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL","",""],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE","",""],[1,79,"Insert",19,"Insert",45,"VK_INSERT","",""],[1,80,"Home",14,"Home",36,"VK_HOME","",""],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR","",""],[1,82,"Delete",20,"Del",46,"VK_DELETE","Delete",""],[1,83,"End",13,"End",35,"VK_END","",""],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT","",""],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",""],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",""],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",""],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",""],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK","",""],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE","",""],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY","",""],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT","",""],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD","",""],[1,94,"NumpadEnter",3,"",0,"","",""],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1","",""],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2","",""],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3","",""],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4","",""],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5","",""],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6","",""],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7","",""],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8","",""],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9","",""],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0","",""],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL","",""],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102","",""],[1,107,"ContextMenu",58,"ContextMenu",93,"","",""],[1,108,"Power",0,"",0,"","",""],[1,109,"NumpadEqual",0,"",0,"","",""],[1,110,"F13",71,"F13",124,"VK_F13","",""],[1,111,"F14",72,"F14",125,"VK_F14","",""],[1,112,"F15",73,"F15",126,"VK_F15","",""],[1,113,"F16",74,"F16",127,"VK_F16","",""],[1,114,"F17",75,"F17",128,"VK_F17","",""],[1,115,"F18",76,"F18",129,"VK_F18","",""],[1,116,"F19",77,"F19",130,"VK_F19","",""],[1,117,"F20",78,"F20",131,"VK_F20","",""],[1,118,"F21",79,"F21",132,"VK_F21","",""],[1,119,"F22",80,"F22",133,"VK_F22","",""],[1,120,"F23",81,"F23",134,"VK_F23","",""],[1,121,"F24",82,"F24",135,"VK_F24","",""],[1,122,"Open",0,"",0,"","",""],[1,123,"Help",0,"",0,"","",""],[1,124,"Select",0,"",0,"","",""],[1,125,"Again",0,"",0,"","",""],[1,126,"Undo",0,"",0,"","",""],[1,127,"Cut",0,"",0,"","",""],[1,128,"Copy",0,"",0,"","",""],[1,129,"Paste",0,"",0,"","",""],[1,130,"Find",0,"",0,"","",""],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE","",""],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP","",""],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN","",""],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR","",""],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1","",""],[1,136,"KanaMode",0,"",0,"","",""],[0,137,"IntlYen",0,"",0,"","",""],[1,138,"Convert",0,"",0,"","",""],[1,139,"NonConvert",0,"",0,"","",""],[1,140,"Lang1",0,"",0,"","",""],[1,141,"Lang2",0,"",0,"","",""],[1,142,"Lang3",0,"",0,"","",""],[1,143,"Lang4",0,"",0,"","",""],[1,144,"Lang5",0,"",0,"","",""],[1,145,"Abort",0,"",0,"","",""],[1,146,"Props",0,"",0,"","",""],[1,147,"NumpadParenLeft",0,"",0,"","",""],[1,148,"NumpadParenRight",0,"",0,"","",""],[1,149,"NumpadBackspace",0,"",0,"","",""],[1,150,"NumpadMemoryStore",0,"",0,"","",""],[1,151,"NumpadMemoryRecall",0,"",0,"","",""],[1,152,"NumpadMemoryClear",0,"",0,"","",""],[1,153,"NumpadMemoryAdd",0,"",0,"","",""],[1,154,"NumpadMemorySubtract",0,"",0,"","",""],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR","",""],[1,156,"NumpadClearEntry",0,"",0,"","",""],[1,0,"",5,"Ctrl",17,"VK_CONTROL","",""],[1,0,"",4,"Shift",16,"VK_SHIFT","",""],[1,0,"",6,"Alt",18,"VK_MENU","",""],[1,0,"",57,"Meta",91,"VK_COMMAND","",""],[1,157,"ControlLeft",5,"",0,"VK_LCONTROL","",""],[1,158,"ShiftLeft",4,"",0,"VK_LSHIFT","",""],[1,159,"AltLeft",6,"",0,"VK_LMENU","",""],[1,160,"MetaLeft",57,"",0,"VK_LWIN","",""],[1,161,"ControlRight",5,"",0,"VK_RCONTROL","",""],[1,162,"ShiftRight",4,"",0,"VK_RSHIFT","",""],[1,163,"AltRight",6,"",0,"VK_RMENU","",""],[1,164,"MetaRight",57,"",0,"VK_RWIN","",""],[1,165,"BrightnessUp",0,"",0,"","",""],[1,166,"BrightnessDown",0,"",0,"","",""],[1,167,"MediaPlay",0,"",0,"","",""],[1,168,"MediaRecord",0,"",0,"","",""],[1,169,"MediaFastForward",0,"",0,"","",""],[1,170,"MediaRewind",0,"",0,"","",""],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK","",""],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK","",""],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP","",""],[1,174,"Eject",0,"",0,"","",""],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE","",""],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT","",""],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL","",""],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2","",""],[1,179,"LaunchApp1",0,"",0,"VK_MEDIA_LAUNCH_APP1","",""],[1,180,"SelectTask",0,"",0,"","",""],[1,181,"LaunchScreenSaver",0,"",0,"","",""],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH","",""],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME","",""],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK","",""],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD","",""],[1,186,"BrowserStop",0,"",0,"VK_BROWSER_STOP","",""],[1,187,"BrowserRefresh",0,"",0,"VK_BROWSER_REFRESH","",""],[1,188,"BrowserFavorites",0,"",0,"VK_BROWSER_FAVORITES","",""],[1,189,"ZoomToggle",0,"",0,"","",""],[1,190,"MailReply",0,"",0,"","",""],[1,191,"MailForward",0,"",0,"","",""],[1,192,"MailSend",0,"",0,"","",""],[1,0,"",114,"KeyInComposition",229,"","",""],[1,0,"",116,"ABNT_C2",194,"VK_ABNT_C2","",""],[1,0,"",96,"OEM_8",223,"VK_OEM_8","",""],[1,0,"",0,"",0,"VK_KANA","",""],[1,0,"",0,"",0,"VK_HANGUL","",""],[1,0,"",0,"",0,"VK_JUNJA","",""],[1,0,"",0,"",0,"VK_FINAL","",""],[1,0,"",0,"",0,"VK_HANJA","",""],[1,0,"",0,"",0,"VK_KANJI","",""],[1,0,"",0,"",0,"VK_CONVERT","",""],[1,0,"",0,"",0,"VK_NONCONVERT","",""],[1,0,"",0,"",0,"VK_ACCEPT","",""],[1,0,"",0,"",0,"VK_MODECHANGE","",""],[1,0,"",0,"",0,"VK_SELECT","",""],[1,0,"",0,"",0,"VK_PRINT","",""],[1,0,"",0,"",0,"VK_EXECUTE","",""],[1,0,"",0,"",0,"VK_SNAPSHOT","",""],[1,0,"",0,"",0,"VK_HELP","",""],[1,0,"",0,"",0,"VK_APPS","",""],[1,0,"",0,"",0,"VK_PROCESSKEY","",""],[1,0,"",0,"",0,"VK_PACKET","",""],[1,0,"",0,"",0,"VK_DBE_SBCSCHAR","",""],[1,0,"",0,"",0,"VK_DBE_DBCSCHAR","",""],[1,0,"",0,"",0,"VK_ATTN","",""],[1,0,"",0,"",0,"VK_CRSEL","",""],[1,0,"",0,"",0,"VK_EXSEL","",""],[1,0,"",0,"",0,"VK_EREOF","",""],[1,0,"",0,"",0,"VK_PLAY","",""],[1,0,"",0,"",0,"VK_ZOOM","",""],[1,0,"",0,"",0,"VK_NONAME","",""],[1,0,"",0,"",0,"VK_PA1","",""],[1,0,"",0,"",0,"VK_OEM_CLEAR","",""]],n=[],i=[];for(const s of e){const[r,a,l,c,h,d,f,m,b]=s;if(i[a]||(i[a]=!0,ja[l]=a,Ga[l.toLowerCase()]=a,r&&(hi[a]=c)),!n[c]){if(n[c]=!0,!h)throw new Error(`String representation missing for key code ${c} around scan code ${l}`);pn.define(c,h),ui.define(c,m||h),ci.define(c,b||m||h)}d&&(zs[d]=c)}})(),u.KeyCodeUtils=void 0,(function(t){function e(l){return pn.keyCodeToStr(l)}t.toString=e;function n(l){return pn.strToKeyCode(l)}t.fromString=n;function i(l){return ui.keyCodeToStr(l)}t.toUserSettingsUS=i;function s(l){return ci.keyCodeToStr(l)}t.toUserSettingsGeneral=s;function r(l){return ui.strToKeyCode(l)||ci.strToKeyCode(l)}t.fromUserSettings=r;function a(l){if(l>=98&&l<=113)return null;switch(l){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right";case 20:return"Delete"}return pn.keyCodeToStr(l)}t.toElectronAccelerator=a})(u.KeyCodeUtils||(u.KeyCodeUtils={}));function Hs(t,e){const n=(e&65535)<<16>>>0;return(t|n)>>>0}function Qa(t){return t===5||t===4||t===6||t===57}const Xa=65,Ya=97,Ja=90,Za=122,Ge=46,K=47,ue=92,Ee=58,Ka=63;class js extends Error{constructor(e,n,i){let s;typeof n=="string"&&n.indexOf("not ")===0?(s="must not be",n=n.replace(/^not /,"")):s="must be";const r=e.indexOf(".")!==-1?"property":"argument";let a=`The "${e}" ${r} ${s} of type ${n}`;a+=`. Received type ${typeof i}`,super(a),this.code="ERR_INVALID_ARG_TYPE"}}function eo(t,e){if(t===null||typeof t!="object")throw new js(e,"Object",t)}function Z(t,e){if(typeof t!="string")throw new js(e,"string",t)}const Me=ka==="win32";function $(t){return t===K||t===ue}function fi(t){return t===K}function ke(t){return t>=Xa&&t<=Ja||t>=Ya&&t<=Za}function bn(t,e,n,i){let s="",r=0,a=-1,l=0,c=0;for(let h=0;h<=t.length;++h){if(h2){const d=s.lastIndexOf(n);d===-1?(s="",r=0):(s=s.slice(0,d),r=s.length-1-s.lastIndexOf(n)),a=h,l=0;continue}else if(s.length!==0){s="",r=0,a=h,l=0;continue}}e&&(s+=s.length>0?`${n}..`:"..",r=2)}else s.length>0?s+=`${n}${t.slice(a+1,h)}`:s=t.slice(a+1,h),r=h-a-1;a=h,l=0}else c===Ge&&l!==-1?++l:l=-1}return s}function to(t){return t?`${t[0]==="."?"":"."}${t}`:""}function Gs(t,e){eo(e,"pathObject");const n=e.dir||e.root,i=e.base||`${e.name||""}${to(e.ext)}`;return n?n===e.root?`${n}${i}`:`${n}${t}${i}`:i}const se={resolve(...t){let e="",n="",i=!1;for(let s=t.length-1;s>=-1;s--){let r;if(s>=0){if(r=t[s],Z(r,`paths[${s}]`),r.length===0)continue}else e.length===0?r=hn():(r=ti[`=${e}`]||hn(),(r===void 0||r.slice(0,2).toLowerCase()!==e.toLowerCase()&&r.charCodeAt(2)===ue)&&(r=`${e}\\`));const a=r.length;let l=0,c="",h=!1;const d=r.charCodeAt(0);if(a===1)$(d)&&(l=1,h=!0);else if($(d))if(h=!0,$(r.charCodeAt(1))){let f=2,m=f;for(;f2&&$(r.charCodeAt(2))&&(h=!0,l=3));if(c.length>0)if(e.length>0){if(c.toLowerCase()!==e.toLowerCase())continue}else e=c;if(i){if(e.length>0)break}else if(n=`${r.slice(l)}\\${n}`,i=h,h&&e.length>0)break}return n=bn(n,!i,"\\",$),i?`${e}\\${n}`:`${e}${n}`||"."},normalize(t){Z(t,"path");const e=t.length;if(e===0)return".";let n=0,i,s=!1;const r=t.charCodeAt(0);if(e===1)return fi(r)?"\\":t;if($(r))if(s=!0,$(t.charCodeAt(1))){let l=2,c=l;for(;l2&&$(t.charCodeAt(2))&&(s=!0,n=3));let a=n0&&$(t.charCodeAt(e-1))&&(a+="\\"),!s&&i===void 0&&t.includes(":")){if(a.length>=2&&ke(a.charCodeAt(0))&&a.charCodeAt(1)===Ee)return`.\\${a}`;let l=t.indexOf(":");do if(l===e-1||$(t.charCodeAt(l+1)))return`.\\${a}`;while((l=t.indexOf(":",l+1))!==-1)}return i===void 0?s?`\\${a}`:a:s?`${i}\\${a}`:`${i}${a}`},isAbsolute(t){Z(t,"path");const e=t.length;if(e===0)return!1;const n=t.charCodeAt(0);return $(n)||e>2&&ke(n)&&t.charCodeAt(1)===Ee&&$(t.charCodeAt(2))},join(...t){if(t.length===0)return".";let e,n;for(let r=0;r0&&(e===void 0?e=n=a:e+=`\\${a}`)}if(e===void 0)return".";let i=!0,s=0;if(typeof n=="string"&&$(n.charCodeAt(0))){++s;const r=n.length;r>1&&$(n.charCodeAt(1))&&(++s,r>2&&($(n.charCodeAt(2))?++s:i=!1))}if(i){for(;s=2&&(e=`\\${e.slice(s)}`)}return se.normalize(e)},relative(t,e){if(Z(t,"from"),Z(e,"to"),t===e)return"";const n=se.resolve(t),i=se.resolve(e);if(n===i||(t=n.toLowerCase(),e=i.toLowerCase(),t===e))return"";if(n.length!==t.length||i.length!==e.length){const p=n.split("\\"),g=i.split("\\");p[p.length-1]===""&&p.pop(),g[g.length-1]===""&&g.pop();const _=p.length,x=g.length,S=_S?g.slice(v).join("\\"):_>S?"..\\".repeat(_-1-v)+"..":"":"..\\".repeat(_-v)+g.slice(v).join("\\")}let s=0;for(;ss&&t.charCodeAt(r-1)===ue;)r--;const a=r-s;let l=0;for(;ll&&e.charCodeAt(c-1)===ue;)c--;const h=c-l,d=ad){if(e.charCodeAt(l+m)===ue)return i.slice(l+m+1);if(m===2)return i.slice(l+m)}a>d&&(t.charCodeAt(s+m)===ue?f=m:m===2&&(f=3)),f===-1&&(f=0)}let b="";for(m=s+f+1;m<=r;++m)(m===r||t.charCodeAt(m)===ue)&&(b+=b.length===0?"..":"\\..");return l+=f,b.length>0?`${b}${i.slice(l,c)}`:(i.charCodeAt(l)===ue&&++l,i.slice(l,c))},toNamespacedPath(t){if(typeof t!="string"||t.length===0)return t;const e=se.resolve(t);if(e.length<=2)return t;if(e.charCodeAt(0)===ue){if(e.charCodeAt(1)===ue){const n=e.charCodeAt(2);if(n!==Ka&&n!==Ge)return`\\\\?\\UNC\\${e.slice(2)}`}}else if(ke(e.charCodeAt(0))&&e.charCodeAt(1)===Ee&&e.charCodeAt(2)===ue)return`\\\\?\\${e}`;return e},dirname(t){Z(t,"path");const e=t.length;if(e===0)return".";let n=-1,i=0;const s=t.charCodeAt(0);if(e===1)return $(s)?t:".";if($(s)){if(n=i=1,$(t.charCodeAt(1))){let l=2,c=l;for(;l2&&$(t.charCodeAt(2))?3:2,i=n);let r=-1,a=!0;for(let l=e-1;l>=i;--l)if($(t.charCodeAt(l))){if(!a){r=l;break}}else a=!1;if(r===-1){if(n===-1)return".";r=n}return t.slice(0,r)},basename(t,e){e!==void 0&&Z(e,"suffix"),Z(t,"path");let n=0,i=-1,s=!0,r;if(t.length>=2&&ke(t.charCodeAt(0))&&t.charCodeAt(1)===Ee&&(n=2),e!==void 0&&e.length>0&&e.length<=t.length){if(e===t)return"";let a=e.length-1,l=-1;for(r=t.length-1;r>=n;--r){const c=t.charCodeAt(r);if($(c)){if(!s){n=r+1;break}}else l===-1&&(s=!1,l=r+1),a>=0&&(c===e.charCodeAt(a)?--a===-1&&(i=r):(a=-1,i=l))}return n===i?i=l:i===-1&&(i=t.length),t.slice(n,i)}for(r=t.length-1;r>=n;--r)if($(t.charCodeAt(r))){if(!s){n=r+1;break}}else i===-1&&(s=!1,i=r+1);return i===-1?"":t.slice(n,i)},extname(t){Z(t,"path");let e=0,n=-1,i=0,s=-1,r=!0,a=0;t.length>=2&&t.charCodeAt(1)===Ee&&ke(t.charCodeAt(0))&&(e=i=2);for(let l=t.length-1;l>=e;--l){const c=t.charCodeAt(l);if($(c)){if(!r){i=l+1;break}continue}s===-1&&(r=!1,s=l+1),c===Ge?n===-1?n=l:a!==1&&(a=1):n!==-1&&(a=-1)}return n===-1||s===-1||a===0||a===1&&n===s-1&&n===i+1?"":t.slice(n,s)},format:Gs.bind(null,"\\"),parse(t){Z(t,"path");const e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;const n=t.length;let i=0,s=t.charCodeAt(0);if(n===1)return $(s)?(e.root=e.dir=t,e):(e.base=e.name=t,e);if($(s)){if(i=1,$(t.charCodeAt(1))){let f=2,m=f;for(;f0&&(e.root=t.slice(0,i));let r=-1,a=i,l=-1,c=!0,h=t.length-1,d=0;for(;h>=i;--h){if(s=t.charCodeAt(h),$(s)){if(!c){a=h+1;break}continue}l===-1&&(c=!1,l=h+1),s===Ge?r===-1?r=h:d!==1&&(d=1):r!==-1&&(d=-1)}return l!==-1&&(r===-1||d===0||d===1&&r===l-1&&r===a+1?e.base=e.name=t.slice(a,l):(e.name=t.slice(a,r),e.base=t.slice(a,l),e.ext=t.slice(r,l))),a>0&&a!==i?e.dir=t.slice(0,a-1):e.dir=e.root,e},sep:"\\",delimiter:";",win32:null,posix:null},no=(()=>{if(Me){const t=/\\/g;return()=>{const e=hn().replace(t,"/");return e.slice(e.indexOf("/"))}}return()=>hn()})(),ee={resolve(...t){let e="",n=!1;for(let i=t.length-1;i>=0&&!n;i--){const s=t[i];Z(s,`paths[${i}]`),s.length!==0&&(e=`${s}/${e}`,n=s.charCodeAt(0)===K)}if(!n){const i=no();e=`${i}/${e}`,n=i.charCodeAt(0)===K}return e=bn(e,!n,"/",fi),n?`/${e}`:e.length>0?e:"."},normalize(t){if(Z(t,"path"),t.length===0)return".";const e=t.charCodeAt(0)===K,n=t.charCodeAt(t.length-1)===K;return t=bn(t,!e,"/",fi),t.length===0?e?"/":n?"./":".":(n&&(t+="/"),e?`/${t}`:t)},isAbsolute(t){return Z(t,"path"),t.length>0&&t.charCodeAt(0)===K},join(...t){if(t.length===0)return".";const e=[];for(let n=0;n0&&e.push(i)}return e.length===0?".":ee.normalize(e.join("/"))},relative(t,e){if(Z(t,"from"),Z(e,"to"),t===e||(t=ee.resolve(t),e=ee.resolve(e),t===e))return"";const n=1,i=t.length,s=i-n,r=1,a=e.length-r,l=sl){if(e.charCodeAt(r+h)===K)return e.slice(r+h+1);if(h===0)return e.slice(r+h)}else s>l&&(t.charCodeAt(n+h)===K?c=h:h===0&&(c=0));let d="";for(h=n+c+1;h<=i;++h)(h===i||t.charCodeAt(h)===K)&&(d+=d.length===0?"..":"/..");return`${d}${e.slice(r+c)}`},toNamespacedPath(t){return t},dirname(t){if(Z(t,"path"),t.length===0)return".";const e=t.charCodeAt(0)===K;let n=-1,i=!0;for(let s=t.length-1;s>=1;--s)if(t.charCodeAt(s)===K){if(!i){n=s;break}}else i=!1;return n===-1?e?"/":".":e&&n===1?"//":t.slice(0,n)},basename(t,e){e!==void 0&&Z(e,"suffix"),Z(t,"path");let n=0,i=-1,s=!0,r;if(e!==void 0&&e.length>0&&e.length<=t.length){if(e===t)return"";let a=e.length-1,l=-1;for(r=t.length-1;r>=0;--r){const c=t.charCodeAt(r);if(c===K){if(!s){n=r+1;break}}else l===-1&&(s=!1,l=r+1),a>=0&&(c===e.charCodeAt(a)?--a===-1&&(i=r):(a=-1,i=l))}return n===i?i=l:i===-1&&(i=t.length),t.slice(n,i)}for(r=t.length-1;r>=0;--r)if(t.charCodeAt(r)===K){if(!s){n=r+1;break}}else i===-1&&(s=!1,i=r+1);return i===-1?"":t.slice(n,i)},extname(t){Z(t,"path");let e=-1,n=0,i=-1,s=!0,r=0;for(let a=t.length-1;a>=0;--a){const l=t[a];if(l==="/"){if(!s){n=a+1;break}continue}i===-1&&(s=!1,i=a+1),l==="."?e===-1?e=a:r!==1&&(r=1):e!==-1&&(r=-1)}return e===-1||i===-1||r===0||r===1&&e===i-1&&e===n+1?"":t.slice(e,i)},format:Gs.bind(null,"/"),parse(t){Z(t,"path");const e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;const n=t.charCodeAt(0)===K;let i;n?(e.root="/",i=1):i=0;let s=-1,r=0,a=-1,l=!0,c=t.length-1,h=0;for(;c>=i;--c){const d=t.charCodeAt(c);if(d===K){if(!l){r=c+1;break}continue}a===-1&&(l=!1,a=c+1),d===Ge?s===-1?s=c:h!==1&&(h=1):s!==-1&&(h=-1)}if(a!==-1){const d=r===0&&n?1:r;s===-1||h===0||h===1&&s===a-1&&s===r+1?e.base=e.name=t.slice(d,a):(e.name=t.slice(d,s),e.base=t.slice(d,a),e.ext=t.slice(s,a))}return r>0?e.dir=t.slice(0,r-1):n&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};ee.win32=se.win32=se,ee.posix=se.posix=ee;const io=Me?se.normalize:ee.normalize,so=Me?se.join:ee.join,ro=Me?se.resolve:ee.resolve,ao=Me?se.relative:ee.relative,oo=Me?se.dirname:ee.dirname,lo=Me?se.basename:ee.basename,uo=Me?se.extname:ee.extname,co=Me?se.sep:ee.sep,ho=/^\w[\w\d+.-]*$/,fo=/^\//,mo=/^\/\//;function go(t,e){if(!t.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${t.authority}", path: "${t.path}", query: "${t.query}", fragment: "${t.fragment}"}`);if(t.scheme&&!ho.test(t.scheme)){const n=[...t.scheme.matchAll(/[^\w\d+.-]/gu)],i=n.length>0?` Found '${n[0][0]}' at index ${n[0].index} (${n.length} total)`:"";throw new Error(`[UriError]: Scheme contains illegal characters.${i} (len:${t.scheme.length})`)}if(t.path){if(t.authority){if(!fo.test(t.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(mo.test(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function po(t,e){return!t&&!e?"file":t}function bo(t,e){switch(t){case"https":case"http":case"file":e?e[0]!==_e&&(e=_e+e):e=_e;break}return e}const Q="",_e="/",wo=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class re{static isUri(e){return e instanceof re?!0:!e||typeof e!="object"?!1:typeof e.authority=="string"&&typeof e.fragment=="string"&&typeof e.path=="string"&&typeof e.query=="string"&&typeof e.scheme=="string"&&typeof e.fsPath=="string"&&typeof e.with=="function"&&typeof e.toString=="function"}constructor(e,n,i,s,r,a=!1){typeof e=="object"?(this.scheme=e.scheme||Q,this.authority=e.authority||Q,this.path=e.path||Q,this.query=e.query||Q,this.fragment=e.fragment||Q):(this.scheme=po(e,a),this.authority=n||Q,this.path=bo(this.scheme,i||Q),this.query=s||Q,this.fragment=r||Q,go(this,a))}get fsPath(){return wn(this,!1)}with(e){if(!e)return this;let{scheme:n,authority:i,path:s,query:r,fragment:a}=e;return n===void 0?n=this.scheme:n===null&&(n=Q),i===void 0?i=this.authority:i===null&&(i=Q),s===void 0?s=this.path:s===null&&(s=Q),r===void 0?r=this.query:r===null&&(r=Q),a===void 0?a=this.fragment:a===null&&(a=Q),n===this.scheme&&i===this.authority&&s===this.path&&r===this.query&&a===this.fragment?this:new ht(n,i,s,r,a)}static parse(e,n=!1){const i=wo.exec(e);return i?new ht(i[2]||Q,_n(i[4]||Q),_n(i[5]||Q),_n(i[7]||Q),_n(i[9]||Q),n):new ht(Q,Q,Q,Q,Q)}static file(e){let n=Q;if(ot&&(e=e.replace(/\\/g,_e)),e[0]===_e&&e[1]===_e){const i=e.indexOf(_e,2);i===-1?(n=e.substring(2),e=_e):(n=e.substring(2,i),e=e.substring(i)||_e)}return new ht("file",n,e,Q,Q)}static from(e,n){return new ht(e.scheme,e.authority,e.path,e.query,e.fragment,n)}static joinPath(e,...n){if(!e.path)throw new Error(`[UriError]: cannot call joinPath on URI without path: ${e.toString()}`);let i;return ot&&e.scheme==="file"?i=re.file(se.join(wn(e,!0),...n)).path:i=ee.join(e.path,...n),e.with({path:i})}toString(e=!1){return di(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof re)return e;{const n=new ht(e);return n._formatted=e.external??null,n._fsPath=e._sep===Qs?e.fsPath??null:null,n}}else return e}}const Qs=ot?1:void 0;class ht extends re{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=wn(this,!1)),this._fsPath}toString(e=!1){return e?di(this,!0):(this._formatted||(this._formatted=di(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=Qs),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const Xs={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function Ys(t,e,n){let i,s=-1;for(let r=0;r=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||a===45||a===46||a===95||a===126||e&&a===47||n&&a===91||n&&a===93||n&&a===58)s!==-1&&(i+=encodeURIComponent(t.substring(s,r)),s=-1),i!==void 0&&(i+=t.charAt(r));else{i===void 0&&(i=t.substr(0,r));const l=Xs[a];l!==void 0?(s!==-1&&(i+=encodeURIComponent(t.substring(s,r)),s=-1),i+=l):s===-1&&(s=r)}}return s!==-1&&(i+=encodeURIComponent(t.substring(s))),i!==void 0?i:t}function _o(t){let e;for(let n=0;n1&&t.scheme==="file"?n=`//${t.authority}${t.path}`:t.path.charCodeAt(0)===47&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&t.path.charCodeAt(2)===58?e?n=t.path.substr(1):n=t.path[1].toLowerCase()+t.path.substr(2):n=t.path,ot&&(n=n.replace(/\//g,"\\")),n}function di(t,e){const n=e?_o:Ys;let i="",{scheme:s,authority:r,path:a,query:l,fragment:c}=t;if(s&&(i+=s,i+=":"),(r||s==="file")&&(i+=_e,i+=_e),r){let h=r.indexOf("@");if(h!==-1){const d=r.substr(0,h);r=r.substr(h+1),h=d.lastIndexOf(":"),h===-1?i+=n(d,!1,!1):(i+=n(d.substr(0,h),!1,!1),i+=":",i+=n(d.substr(h+1),!1,!0)),i+="@"}r=r.toLowerCase(),h=r.lastIndexOf(":"),h===-1?i+=n(r,!1,!0):(i+=n(r.substr(0,h),!1,!0),i+=r.substr(h))}if(a){if(a.length>=3&&a.charCodeAt(0)===47&&a.charCodeAt(2)===58){const h=a.charCodeAt(1);h>=65&&h<=90&&(a=`/${String.fromCharCode(h+32)}:${a.substr(3)}`)}else if(a.length>=2&&a.charCodeAt(1)===58){const h=a.charCodeAt(0);h>=65&&h<=90&&(a=`${String.fromCharCode(h+32)}:${a.substr(2)}`)}i+=n(a,!0,!1)}return l&&(i+="?",i+=n(l,!1,!1)),c&&(i+="#",i+=e?c:Ys(c,!1,!1)),i}function Js(t){try{return decodeURIComponent(t)}catch{return t.length>3?t.substr(0,3)+Js(t.substr(3)):t}}const Zs=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function _n(t){return t.match(Zs)?t.replace(Zs,e=>Js(e)):t}class U{constructor(e,n){this.lineNumber=e,this.column=n}with(e=this.lineNumber,n=this.column){return e===this.lineNumber&&n===this.column?this:new U(e,n)}delta(e=0,n=0){return this.with(Math.max(1,this.lineNumber+e),Math.max(1,this.column+n))}equals(e){return U.equals(this,e)}static equals(e,n){return!e&&!n?!0:!!e&&!!n&&e.lineNumber===n.lineNumber&&e.column===n.column}isBefore(e){return U.isBefore(this,e)}static isBefore(e,n){return e.lineNumberi||e===i&&n>s?(this.startLineNumber=i,this.startColumn=s,this.endLineNumber=e,this.endColumn=n):(this.startLineNumber=e,this.startColumn=n,this.endLineNumber=i,this.endColumn=s)}isEmpty(){return N.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return N.containsPosition(this,e)}static containsPosition(e,n){return!(n.lineNumbere.endLineNumber||n.lineNumber===e.startLineNumber&&n.columne.endColumn)}static strictContainsPosition(e,n){return!(n.lineNumbere.endLineNumber||n.lineNumber===e.startLineNumber&&n.column<=e.startColumn||n.lineNumber===e.endLineNumber&&n.column>=e.endColumn)}containsRange(e){return N.containsRange(this,e)}static containsRange(e,n){return!(n.startLineNumbere.endLineNumber||n.endLineNumber>e.endLineNumber||n.startLineNumber===e.startLineNumber&&n.startColumne.endColumn)}strictContainsRange(e){return N.strictContainsRange(this,e)}static strictContainsRange(e,n){return!(n.startLineNumbere.endLineNumber||n.endLineNumber>e.endLineNumber||n.startLineNumber===e.startLineNumber&&n.startColumn<=e.startColumn||n.endLineNumber===e.endLineNumber&&n.endColumn>=e.endColumn)}plusRange(e){return N.plusRange(this,e)}static plusRange(e,n){let i,s,r,a;return n.startLineNumbere.endLineNumber?(r=n.endLineNumber,a=n.endColumn):n.endLineNumber===e.endLineNumber?(r=n.endLineNumber,a=Math.max(n.endColumn,e.endColumn)):(r=e.endLineNumber,a=e.endColumn),new N(i,s,r,a)}intersectRanges(e){return N.intersectRanges(this,e)}static intersectRanges(e,n){let i=e.startLineNumber,s=e.startColumn,r=e.endLineNumber,a=e.endColumn;const l=n.startLineNumber,c=n.startColumn,h=n.endLineNumber,d=n.endColumn;return ih?(r=h,a=d):r===h&&(a=Math.min(a,d)),i>r||i===r&&s>a?null:new N(i,s,r,a)}equalsRange(e){return N.equalsRange(this,e)}static equalsRange(e,n){return!e&&!n?!0:!!e&&!!n&&e.startLineNumber===n.startLineNumber&&e.startColumn===n.startColumn&&e.endLineNumber===n.endLineNumber&&e.endColumn===n.endColumn}getEndPosition(){return N.getEndPosition(this)}static getEndPosition(e){return new U(e.endLineNumber,e.endColumn)}getStartPosition(){return N.getStartPosition(this)}static getStartPosition(e){return new U(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,n){return new N(this.startLineNumber,this.startColumn,e,n)}setStartPosition(e,n){return new N(e,n,this.endLineNumber,this.endColumn)}collapseToStart(){return N.collapseToStart(this)}static collapseToStart(e){return new N(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}collapseToEnd(){return N.collapseToEnd(this)}static collapseToEnd(e){return new N(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)}delta(e){return new N(this.startLineNumber+e,this.startColumn,this.endLineNumber+e,this.endColumn)}isSingleLine(){return this.startLineNumber===this.endLineNumber}static fromPositions(e,n=e){return new N(e.lineNumber,e.column,n.lineNumber,n.column)}static lift(e){return e?new N(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return!!e&&typeof e.startLineNumber=="number"&&typeof e.startColumn=="number"&&typeof e.endLineNumber=="number"&&typeof e.endColumn=="number"}static areIntersectingOrTouching(e,n){return!(e.endLineNumbere.startLineNumber}toJSON(){return this}}class ce extends N{constructor(e,n,i,s){super(e,n,i,s),this.selectionStartLineNumber=e,this.selectionStartColumn=n,this.positionLineNumber=i,this.positionColumn=s}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return ce.selectionsEqual(this,e)}static selectionsEqual(e,n){return e.selectionStartLineNumber===n.selectionStartLineNumber&&e.selectionStartColumn===n.selectionStartColumn&&e.positionLineNumber===n.positionLineNumber&&e.positionColumn===n.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,n){return this.getDirection()===0?new ce(this.startLineNumber,this.startColumn,e,n):new ce(e,n,this.startLineNumber,this.startColumn)}getPosition(){return new U(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new U(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,n){return this.getDirection()===0?new ce(e,n,this.endLineNumber,this.endColumn):new ce(this.endLineNumber,this.endColumn,e,n)}static fromPositions(e,n=e){return new ce(e.lineNumber,e.column,n.lineNumber,n.column)}static fromRange(e,n){return n===0?new ce(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new ce(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new ce(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,n){if(e&&!n||!e&&n)return!1;if(!e&&!n)return!0;if(e.length!==n.length)return!1;for(let i=0,s=e.length;i{this._tokenizationSupports.get(e)===n&&(this._tokenizationSupports.delete(e),this.handleChange([e]))})}get(e){return this._tokenizationSupports.get(e)||null}registerFactory(e,n){this._factories.get(e)?.dispose();const i=new So(this,e,n);return this._factories.set(e,i),xe(()=>{const s=this._factories.get(e);!s||s!==i||(this._factories.delete(e),s.dispose())})}async getOrCreate(e){const n=this.get(e);if(n)return n;const i=this._factories.get(e);return!i||i.isResolved?null:(await i.resolve(),this.get(e))}isResolved(e){if(this.get(e))return!0;const i=this._factories.get(e);return!!(!i||i.isResolved)}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}};class So extends we{get isResolved(){return this._isResolved}constructor(e,n,i){super(),this._registry=e,this._languageId=n,this._factory=i,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}async resolve(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}async _create(){const e=await this._factory.tokenizationSupport;this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))}}class Ks{constructor(e,n,i){this.offset=e,this.type=n,this.language=i,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}}class No{constructor(e,n){this.tokens=e,this.endState=n,this._tokenizationResultBrand=void 0}}class Co{constructor(e,n,i){this.tokens=e,this.fontInfo=n,this.endState=i,this._encodedTokenizationResultBrand=void 0}}u.HoverVerbosityAction=void 0,(function(t){t[t.Increase=0]="Increase",t[t.Decrease=1]="Decrease"})(u.HoverVerbosityAction||(u.HoverVerbosityAction={})),u.CompletionItemKinds=void 0,(function(t){const e=new Map;e.set(0,P.symbolMethod),e.set(1,P.symbolFunction),e.set(2,P.symbolConstructor),e.set(3,P.symbolField),e.set(4,P.symbolVariable),e.set(5,P.symbolClass),e.set(6,P.symbolStruct),e.set(7,P.symbolInterface),e.set(8,P.symbolModule),e.set(9,P.symbolProperty),e.set(10,P.symbolEvent),e.set(11,P.symbolOperator),e.set(12,P.symbolUnit),e.set(13,P.symbolValue),e.set(15,P.symbolEnum),e.set(14,P.symbolConstant),e.set(15,P.symbolEnum),e.set(16,P.symbolEnumMember),e.set(17,P.symbolKeyword),e.set(28,P.symbolSnippet),e.set(18,P.symbolText),e.set(19,P.symbolColor),e.set(20,P.symbolFile),e.set(21,P.symbolReference),e.set(22,P.symbolCustomColor),e.set(23,P.symbolFolder),e.set(24,P.symbolTypeParameter),e.set(25,P.account),e.set(26,P.issues),e.set(27,P.tools);function n(a){let l=e.get(a);return l||(console.info("No codicon found for CompletionItemKind "+a),l=P.symbolProperty),l}t.toIcon=n;function i(a){switch(a){case 0:return F(763,"Method");case 1:return F(764,"Function");case 2:return F(765,"Constructor");case 3:return F(766,"Field");case 4:return F(767,"Variable");case 5:return F(768,"Class");case 6:return F(769,"Struct");case 7:return F(770,"Interface");case 8:return F(771,"Module");case 9:return F(772,"Property");case 10:return F(773,"Event");case 11:return F(774,"Operator");case 12:return F(775,"Unit");case 13:return F(776,"Value");case 14:return F(777,"Constant");case 15:return F(778,"Enum");case 16:return F(779,"Enum Member");case 17:return F(780,"Keyword");case 18:return F(781,"Text");case 19:return F(782,"Color");case 20:return F(783,"File");case 21:return F(784,"Reference");case 22:return F(785,"Custom Color");case 23:return F(786,"Folder");case 24:return F(787,"Type Parameter");case 25:return F(788,"User");case 26:return F(789,"Issue");case 27:return F(790,"Tool");case 28:return F(791,"Snippet");default:return""}}t.toLabel=i;const s=new Map;s.set("method",0),s.set("function",1),s.set("constructor",2),s.set("field",3),s.set("variable",4),s.set("class",5),s.set("struct",6),s.set("interface",7),s.set("module",8),s.set("property",9),s.set("event",10),s.set("operator",11),s.set("unit",12),s.set("value",13),s.set("constant",14),s.set("enum",15),s.set("enum-member",16),s.set("enumMember",16),s.set("keyword",17),s.set("snippet",28),s.set("text",18),s.set("color",19),s.set("file",20),s.set("reference",21),s.set("customcolor",22),s.set("folder",23),s.set("type-parameter",24),s.set("typeParameter",24),s.set("account",25),s.set("issue",26),s.set("tool",27);function r(a,l){let c=s.get(a);return typeof c>"u"&&!l&&(c=9),c}t.fromString=r})(u.CompletionItemKinds||(u.CompletionItemKinds={})),u.InlineCompletionTriggerKind=void 0,(function(t){t[t.Automatic=0]="Automatic",t[t.Explicit=1]="Explicit"})(u.InlineCompletionTriggerKind||(u.InlineCompletionTriggerKind={}));class Ro{constructor(e,n,i,s){this.range=e,this.text=n,this.completionKind=i,this.isSnippetText=s}equals(e){return N.lift(this.range).equalsRange(e.range)&&this.text===e.text&&this.completionKind===e.completionKind&&this.isSnippetText===e.isSnippetText}}u.InlineCompletionHintStyle=void 0,(function(t){t[t.Code=1]="Code",t[t.Label=2]="Label"})(u.InlineCompletionHintStyle||(u.InlineCompletionHintStyle={}));class gi{static fromExtensionId(e){return new gi(e,void 0,void 0)}constructor(e,n,i){this.extensionId=e,this.extensionVersion=n,this.providerId=i}toString(){let e="";return this.extensionId&&(e+=this.extensionId),this.extensionVersion&&(e+=`@${this.extensionVersion}`),this.providerId&&(e+=`:${this.providerId}`),e.length===0&&(e="unknown"),e}toStringWithoutVersion(){let e="";return this.extensionId&&(e+=this.extensionId),this.providerId&&(e+=`:${this.providerId}`),e}}u.InlineCompletionEndOfLifeReasonKind=void 0,(function(t){t[t.Accepted=0]="Accepted",t[t.Rejected=1]="Rejected",t[t.Ignored=2]="Ignored"})(u.InlineCompletionEndOfLifeReasonKind||(u.InlineCompletionEndOfLifeReasonKind={})),u.DocumentPasteTriggerKind=void 0,(function(t){t[t.Automatic=0]="Automatic",t[t.PasteAs=1]="PasteAs"})(u.DocumentPasteTriggerKind||(u.DocumentPasteTriggerKind={})),u.SignatureHelpTriggerKind=void 0,(function(t){t[t.Invoke=1]="Invoke",t[t.TriggerCharacter=2]="TriggerCharacter",t[t.ContentChange=3]="ContentChange"})(u.SignatureHelpTriggerKind||(u.SignatureHelpTriggerKind={})),u.DocumentHighlightKind=void 0,(function(t){t[t.Text=0]="Text",t[t.Read=1]="Read",t[t.Write=2]="Write"})(u.DocumentHighlightKind||(u.DocumentHighlightKind={}));function Ao(t){return!!t&&re.isUri(t.uri)&&N.isIRange(t.range)&&(N.isIRange(t.originSelectionRange)||N.isIRange(t.targetSelectionRange))}const Eo={17:F(792,"array"),16:F(793,"boolean"),4:F(794,"class"),13:F(795,"constant"),8:F(796,"constructor"),9:F(797,"enumeration"),21:F(798,"enumeration member"),23:F(799,"event"),7:F(800,"field"),0:F(801,"file"),11:F(802,"function"),10:F(803,"interface"),19:F(804,"key"),5:F(805,"method"),1:F(806,"module"),2:F(807,"namespace"),20:F(808,"null"),15:F(809,"number"),18:F(810,"object"),24:F(811,"operator"),3:F(812,"package"),6:F(813,"property"),14:F(814,"string"),22:F(815,"struct"),25:F(816,"type parameter"),12:F(817,"variable")};function Mo(t,e){return F(818,"{0} ({1})",t,Eo[e])}u.SymbolKinds=void 0,(function(t){const e=new Map;e.set(0,P.symbolFile),e.set(1,P.symbolModule),e.set(2,P.symbolNamespace),e.set(3,P.symbolPackage),e.set(4,P.symbolClass),e.set(5,P.symbolMethod),e.set(6,P.symbolProperty),e.set(7,P.symbolField),e.set(8,P.symbolConstructor),e.set(9,P.symbolEnum),e.set(10,P.symbolInterface),e.set(11,P.symbolFunction),e.set(12,P.symbolVariable),e.set(13,P.symbolConstant),e.set(14,P.symbolString),e.set(15,P.symbolNumber),e.set(16,P.symbolBoolean),e.set(17,P.symbolArray),e.set(18,P.symbolObject),e.set(19,P.symbolKey),e.set(20,P.symbolNull),e.set(21,P.symbolEnumMember),e.set(22,P.symbolStruct),e.set(23,P.symbolEvent),e.set(24,P.symbolOperator),e.set(25,P.symbolTypeParameter);function n(r){let a=e.get(r);return a||(console.info("No codicon found for SymbolKind "+r),a=P.symbolProperty),a}t.toIcon=n;const i=new Map;i.set(0,20),i.set(1,8),i.set(2,8),i.set(3,8),i.set(4,5),i.set(5,0),i.set(6,9),i.set(7,3),i.set(8,2),i.set(9,15),i.set(10,7),i.set(11,1),i.set(12,4),i.set(13,14),i.set(14,18),i.set(15,13),i.set(16,13),i.set(17,13),i.set(18,13),i.set(19,17),i.set(20,13),i.set(21,16),i.set(22,6),i.set(23,10),i.set(24,11),i.set(25,24);function s(r){let a=i.get(r);return a===void 0&&(console.info("No completion kind found for SymbolKind "+r),a=20),a}t.toCompletionKind=s})(u.SymbolKinds||(u.SymbolKinds={}));const be=class be{static fromValue(e){switch(e){case"comment":return be.Comment;case"imports":return be.Imports;case"region":return be.Region}return new be(e)}constructor(e){this.value=e}};be.Comment=new be("comment"),be.Imports=new be("imports"),be.Region=new be("region");let pi=be;u.NewSymbolNameTag=void 0,(function(t){t[t.AIGenerated=1]="AIGenerated"})(u.NewSymbolNameTag||(u.NewSymbolNameTag={})),u.NewSymbolNameTriggerKind=void 0,(function(t){t[t.Invoke=0]="Invoke",t[t.Automatic=1]="Automatic"})(u.NewSymbolNameTriggerKind||(u.NewSymbolNameTriggerKind={})),u.Command=void 0,(function(t){function e(n){return!n||typeof n!="object"?!1:typeof n.id=="string"&&typeof n.title=="string"}t.is=e})(u.Command||(u.Command={})),u.InlayHintKind=void 0,(function(t){t[t.Type=1]="Type",t[t.Parameter=2]="Parameter"})(u.InlayHintKind||(u.InlayHintKind={}));class ko{constructor(e){this.createSupport=e,this._tokenizationSupport=null}dispose(){this._tokenizationSupport&&this._tokenizationSupport.then(e=>{e&&e.dispose()})}get tokenizationSupport(){return this._tokenizationSupport||(this._tokenizationSupport=this.createSupport()),this._tokenizationSupport}}const To=new xo;u.AccessibilitySupport=void 0,(function(t){t[t.Unknown=0]="Unknown",t[t.Disabled=1]="Disabled",t[t.Enabled=2]="Enabled"})(u.AccessibilitySupport||(u.AccessibilitySupport={})),u.CodeActionTriggerType=void 0,(function(t){t[t.Invoke=1]="Invoke",t[t.Auto=2]="Auto"})(u.CodeActionTriggerType||(u.CodeActionTriggerType={})),u.CompletionItemInsertTextRule=void 0,(function(t){t[t.None=0]="None",t[t.KeepWhitespace=1]="KeepWhitespace",t[t.InsertAsSnippet=4]="InsertAsSnippet"})(u.CompletionItemInsertTextRule||(u.CompletionItemInsertTextRule={})),u.CompletionItemKind=void 0,(function(t){t[t.Method=0]="Method",t[t.Function=1]="Function",t[t.Constructor=2]="Constructor",t[t.Field=3]="Field",t[t.Variable=4]="Variable",t[t.Class=5]="Class",t[t.Struct=6]="Struct",t[t.Interface=7]="Interface",t[t.Module=8]="Module",t[t.Property=9]="Property",t[t.Event=10]="Event",t[t.Operator=11]="Operator",t[t.Unit=12]="Unit",t[t.Value=13]="Value",t[t.Constant=14]="Constant",t[t.Enum=15]="Enum",t[t.EnumMember=16]="EnumMember",t[t.Keyword=17]="Keyword",t[t.Text=18]="Text",t[t.Color=19]="Color",t[t.File=20]="File",t[t.Reference=21]="Reference",t[t.Customcolor=22]="Customcolor",t[t.Folder=23]="Folder",t[t.TypeParameter=24]="TypeParameter",t[t.User=25]="User",t[t.Issue=26]="Issue",t[t.Tool=27]="Tool",t[t.Snippet=28]="Snippet"})(u.CompletionItemKind||(u.CompletionItemKind={})),u.CompletionItemTag=void 0,(function(t){t[t.Deprecated=1]="Deprecated"})(u.CompletionItemTag||(u.CompletionItemTag={})),u.CompletionTriggerKind=void 0,(function(t){t[t.Invoke=0]="Invoke",t[t.TriggerCharacter=1]="TriggerCharacter",t[t.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(u.CompletionTriggerKind||(u.CompletionTriggerKind={})),u.ContentWidgetPositionPreference=void 0,(function(t){t[t.EXACT=0]="EXACT",t[t.ABOVE=1]="ABOVE",t[t.BELOW=2]="BELOW"})(u.ContentWidgetPositionPreference||(u.ContentWidgetPositionPreference={})),u.CursorChangeReason=void 0,(function(t){t[t.NotSet=0]="NotSet",t[t.ContentFlush=1]="ContentFlush",t[t.RecoverFromMarkers=2]="RecoverFromMarkers",t[t.Explicit=3]="Explicit",t[t.Paste=4]="Paste",t[t.Undo=5]="Undo",t[t.Redo=6]="Redo"})(u.CursorChangeReason||(u.CursorChangeReason={})),u.DefaultEndOfLine=void 0,(function(t){t[t.LF=1]="LF",t[t.CRLF=2]="CRLF"})(u.DefaultEndOfLine||(u.DefaultEndOfLine={})),u.DocumentHighlightKind$1=void 0,(function(t){t[t.Text=0]="Text",t[t.Read=1]="Read",t[t.Write=2]="Write"})(u.DocumentHighlightKind$1||(u.DocumentHighlightKind$1={})),u.EditorAutoIndentStrategy=void 0,(function(t){t[t.None=0]="None",t[t.Keep=1]="Keep",t[t.Brackets=2]="Brackets",t[t.Advanced=3]="Advanced",t[t.Full=4]="Full"})(u.EditorAutoIndentStrategy||(u.EditorAutoIndentStrategy={})),u.EditorOption=void 0,(function(t){t[t.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",t[t.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",t[t.accessibilitySupport=2]="accessibilitySupport",t[t.accessibilityPageSize=3]="accessibilityPageSize",t[t.allowOverflow=4]="allowOverflow",t[t.allowVariableLineHeights=5]="allowVariableLineHeights",t[t.allowVariableFonts=6]="allowVariableFonts",t[t.allowVariableFontsInAccessibilityMode=7]="allowVariableFontsInAccessibilityMode",t[t.ariaLabel=8]="ariaLabel",t[t.ariaRequired=9]="ariaRequired",t[t.autoClosingBrackets=10]="autoClosingBrackets",t[t.autoClosingComments=11]="autoClosingComments",t[t.screenReaderAnnounceInlineSuggestion=12]="screenReaderAnnounceInlineSuggestion",t[t.autoClosingDelete=13]="autoClosingDelete",t[t.autoClosingOvertype=14]="autoClosingOvertype",t[t.autoClosingQuotes=15]="autoClosingQuotes",t[t.autoIndent=16]="autoIndent",t[t.autoIndentOnPaste=17]="autoIndentOnPaste",t[t.autoIndentOnPasteWithinString=18]="autoIndentOnPasteWithinString",t[t.automaticLayout=19]="automaticLayout",t[t.autoSurround=20]="autoSurround",t[t.bracketPairColorization=21]="bracketPairColorization",t[t.guides=22]="guides",t[t.codeLens=23]="codeLens",t[t.codeLensFontFamily=24]="codeLensFontFamily",t[t.codeLensFontSize=25]="codeLensFontSize",t[t.colorDecorators=26]="colorDecorators",t[t.colorDecoratorsLimit=27]="colorDecoratorsLimit",t[t.columnSelection=28]="columnSelection",t[t.comments=29]="comments",t[t.contextmenu=30]="contextmenu",t[t.copyWithSyntaxHighlighting=31]="copyWithSyntaxHighlighting",t[t.cursorBlinking=32]="cursorBlinking",t[t.cursorSmoothCaretAnimation=33]="cursorSmoothCaretAnimation",t[t.cursorStyle=34]="cursorStyle",t[t.cursorSurroundingLines=35]="cursorSurroundingLines",t[t.cursorSurroundingLinesStyle=36]="cursorSurroundingLinesStyle",t[t.cursorWidth=37]="cursorWidth",t[t.cursorHeight=38]="cursorHeight",t[t.disableLayerHinting=39]="disableLayerHinting",t[t.disableMonospaceOptimizations=40]="disableMonospaceOptimizations",t[t.domReadOnly=41]="domReadOnly",t[t.dragAndDrop=42]="dragAndDrop",t[t.dropIntoEditor=43]="dropIntoEditor",t[t.editContext=44]="editContext",t[t.emptySelectionClipboard=45]="emptySelectionClipboard",t[t.experimentalGpuAcceleration=46]="experimentalGpuAcceleration",t[t.experimentalWhitespaceRendering=47]="experimentalWhitespaceRendering",t[t.extraEditorClassName=48]="extraEditorClassName",t[t.fastScrollSensitivity=49]="fastScrollSensitivity",t[t.find=50]="find",t[t.fixedOverflowWidgets=51]="fixedOverflowWidgets",t[t.folding=52]="folding",t[t.foldingStrategy=53]="foldingStrategy",t[t.foldingHighlight=54]="foldingHighlight",t[t.foldingImportsByDefault=55]="foldingImportsByDefault",t[t.foldingMaximumRegions=56]="foldingMaximumRegions",t[t.unfoldOnClickAfterEndOfLine=57]="unfoldOnClickAfterEndOfLine",t[t.fontFamily=58]="fontFamily",t[t.fontInfo=59]="fontInfo",t[t.fontLigatures=60]="fontLigatures",t[t.fontSize=61]="fontSize",t[t.fontWeight=62]="fontWeight",t[t.fontVariations=63]="fontVariations",t[t.formatOnPaste=64]="formatOnPaste",t[t.formatOnType=65]="formatOnType",t[t.glyphMargin=66]="glyphMargin",t[t.gotoLocation=67]="gotoLocation",t[t.hideCursorInOverviewRuler=68]="hideCursorInOverviewRuler",t[t.hover=69]="hover",t[t.inDiffEditor=70]="inDiffEditor",t[t.inlineSuggest=71]="inlineSuggest",t[t.letterSpacing=72]="letterSpacing",t[t.lightbulb=73]="lightbulb",t[t.lineDecorationsWidth=74]="lineDecorationsWidth",t[t.lineHeight=75]="lineHeight",t[t.lineNumbers=76]="lineNumbers",t[t.lineNumbersMinChars=77]="lineNumbersMinChars",t[t.linkedEditing=78]="linkedEditing",t[t.links=79]="links",t[t.matchBrackets=80]="matchBrackets",t[t.minimap=81]="minimap",t[t.mouseStyle=82]="mouseStyle",t[t.mouseWheelScrollSensitivity=83]="mouseWheelScrollSensitivity",t[t.mouseWheelZoom=84]="mouseWheelZoom",t[t.multiCursorMergeOverlapping=85]="multiCursorMergeOverlapping",t[t.multiCursorModifier=86]="multiCursorModifier",t[t.mouseMiddleClickAction=87]="mouseMiddleClickAction",t[t.multiCursorPaste=88]="multiCursorPaste",t[t.multiCursorLimit=89]="multiCursorLimit",t[t.occurrencesHighlight=90]="occurrencesHighlight",t[t.occurrencesHighlightDelay=91]="occurrencesHighlightDelay",t[t.overtypeCursorStyle=92]="overtypeCursorStyle",t[t.overtypeOnPaste=93]="overtypeOnPaste",t[t.overviewRulerBorder=94]="overviewRulerBorder",t[t.overviewRulerLanes=95]="overviewRulerLanes",t[t.padding=96]="padding",t[t.pasteAs=97]="pasteAs",t[t.parameterHints=98]="parameterHints",t[t.peekWidgetDefaultFocus=99]="peekWidgetDefaultFocus",t[t.placeholder=100]="placeholder",t[t.definitionLinkOpensInPeek=101]="definitionLinkOpensInPeek",t[t.quickSuggestions=102]="quickSuggestions",t[t.quickSuggestionsDelay=103]="quickSuggestionsDelay",t[t.readOnly=104]="readOnly",t[t.readOnlyMessage=105]="readOnlyMessage",t[t.renameOnType=106]="renameOnType",t[t.renderRichScreenReaderContent=107]="renderRichScreenReaderContent",t[t.renderControlCharacters=108]="renderControlCharacters",t[t.renderFinalNewline=109]="renderFinalNewline",t[t.renderLineHighlight=110]="renderLineHighlight",t[t.renderLineHighlightOnlyWhenFocus=111]="renderLineHighlightOnlyWhenFocus",t[t.renderValidationDecorations=112]="renderValidationDecorations",t[t.renderWhitespace=113]="renderWhitespace",t[t.revealHorizontalRightPadding=114]="revealHorizontalRightPadding",t[t.roundedSelection=115]="roundedSelection",t[t.rulers=116]="rulers",t[t.scrollbar=117]="scrollbar",t[t.scrollBeyondLastColumn=118]="scrollBeyondLastColumn",t[t.scrollBeyondLastLine=119]="scrollBeyondLastLine",t[t.scrollPredominantAxis=120]="scrollPredominantAxis",t[t.selectionClipboard=121]="selectionClipboard",t[t.selectionHighlight=122]="selectionHighlight",t[t.selectionHighlightMaxLength=123]="selectionHighlightMaxLength",t[t.selectionHighlightMultiline=124]="selectionHighlightMultiline",t[t.selectOnLineNumbers=125]="selectOnLineNumbers",t[t.showFoldingControls=126]="showFoldingControls",t[t.showUnused=127]="showUnused",t[t.snippetSuggestions=128]="snippetSuggestions",t[t.smartSelect=129]="smartSelect",t[t.smoothScrolling=130]="smoothScrolling",t[t.stickyScroll=131]="stickyScroll",t[t.stickyTabStops=132]="stickyTabStops",t[t.stopRenderingLineAfter=133]="stopRenderingLineAfter",t[t.suggest=134]="suggest",t[t.suggestFontSize=135]="suggestFontSize",t[t.suggestLineHeight=136]="suggestLineHeight",t[t.suggestOnTriggerCharacters=137]="suggestOnTriggerCharacters",t[t.suggestSelection=138]="suggestSelection",t[t.tabCompletion=139]="tabCompletion",t[t.tabIndex=140]="tabIndex",t[t.trimWhitespaceOnDelete=141]="trimWhitespaceOnDelete",t[t.unicodeHighlighting=142]="unicodeHighlighting",t[t.unusualLineTerminators=143]="unusualLineTerminators",t[t.useShadowDOM=144]="useShadowDOM",t[t.useTabStops=145]="useTabStops",t[t.wordBreak=146]="wordBreak",t[t.wordSegmenterLocales=147]="wordSegmenterLocales",t[t.wordSeparators=148]="wordSeparators",t[t.wordWrap=149]="wordWrap",t[t.wordWrapBreakAfterCharacters=150]="wordWrapBreakAfterCharacters",t[t.wordWrapBreakBeforeCharacters=151]="wordWrapBreakBeforeCharacters",t[t.wordWrapColumn=152]="wordWrapColumn",t[t.wordWrapOverride1=153]="wordWrapOverride1",t[t.wordWrapOverride2=154]="wordWrapOverride2",t[t.wrappingIndent=155]="wrappingIndent",t[t.wrappingStrategy=156]="wrappingStrategy",t[t.showDeprecated=157]="showDeprecated",t[t.inertialScroll=158]="inertialScroll",t[t.inlayHints=159]="inlayHints",t[t.wrapOnEscapedLineFeeds=160]="wrapOnEscapedLineFeeds",t[t.effectiveCursorStyle=161]="effectiveCursorStyle",t[t.editorClassName=162]="editorClassName",t[t.pixelRatio=163]="pixelRatio",t[t.tabFocusMode=164]="tabFocusMode",t[t.layoutInfo=165]="layoutInfo",t[t.wrappingInfo=166]="wrappingInfo",t[t.defaultColorDecorators=167]="defaultColorDecorators",t[t.colorDecoratorsActivatedOn=168]="colorDecoratorsActivatedOn",t[t.inlineCompletionsAccessibilityVerbose=169]="inlineCompletionsAccessibilityVerbose",t[t.effectiveEditContext=170]="effectiveEditContext",t[t.scrollOnMiddleClick=171]="scrollOnMiddleClick",t[t.effectiveAllowVariableFonts=172]="effectiveAllowVariableFonts",t[t.doubleClickSelectsBlock=173]="doubleClickSelectsBlock"})(u.EditorOption||(u.EditorOption={})),u.EndOfLinePreference=void 0,(function(t){t[t.TextDefined=0]="TextDefined",t[t.LF=1]="LF",t[t.CRLF=2]="CRLF"})(u.EndOfLinePreference||(u.EndOfLinePreference={})),u.EndOfLineSequence=void 0,(function(t){t[t.LF=0]="LF",t[t.CRLF=1]="CRLF"})(u.EndOfLineSequence||(u.EndOfLineSequence={})),u.GlyphMarginLane$1=void 0,(function(t){t[t.Left=1]="Left",t[t.Center=2]="Center",t[t.Right=3]="Right"})(u.GlyphMarginLane$1||(u.GlyphMarginLane$1={})),u.HoverVerbosityAction$1=void 0,(function(t){t[t.Increase=0]="Increase",t[t.Decrease=1]="Decrease"})(u.HoverVerbosityAction$1||(u.HoverVerbosityAction$1={})),u.IndentAction=void 0,(function(t){t[t.None=0]="None",t[t.Indent=1]="Indent",t[t.IndentOutdent=2]="IndentOutdent",t[t.Outdent=3]="Outdent"})(u.IndentAction||(u.IndentAction={})),u.InjectedTextCursorStops$1=void 0,(function(t){t[t.Both=0]="Both",t[t.Right=1]="Right",t[t.Left=2]="Left",t[t.None=3]="None"})(u.InjectedTextCursorStops$1||(u.InjectedTextCursorStops$1={})),u.InlayHintKind$1=void 0,(function(t){t[t.Type=1]="Type",t[t.Parameter=2]="Parameter"})(u.InlayHintKind$1||(u.InlayHintKind$1={})),u.InlineCompletionEndOfLifeReasonKind$1=void 0,(function(t){t[t.Accepted=0]="Accepted",t[t.Rejected=1]="Rejected",t[t.Ignored=2]="Ignored"})(u.InlineCompletionEndOfLifeReasonKind$1||(u.InlineCompletionEndOfLifeReasonKind$1={})),u.InlineCompletionHintStyle$1=void 0,(function(t){t[t.Code=1]="Code",t[t.Label=2]="Label"})(u.InlineCompletionHintStyle$1||(u.InlineCompletionHintStyle$1={})),u.InlineCompletionTriggerKind$1=void 0,(function(t){t[t.Automatic=0]="Automatic",t[t.Explicit=1]="Explicit"})(u.InlineCompletionTriggerKind$1||(u.InlineCompletionTriggerKind$1={}));var bi;(function(t){t[t.DependsOnKbLayout=-1]="DependsOnKbLayout",t[t.Unknown=0]="Unknown",t[t.Backspace=1]="Backspace",t[t.Tab=2]="Tab",t[t.Enter=3]="Enter",t[t.Shift=4]="Shift",t[t.Ctrl=5]="Ctrl",t[t.Alt=6]="Alt",t[t.PauseBreak=7]="PauseBreak",t[t.CapsLock=8]="CapsLock",t[t.Escape=9]="Escape",t[t.Space=10]="Space",t[t.PageUp=11]="PageUp",t[t.PageDown=12]="PageDown",t[t.End=13]="End",t[t.Home=14]="Home",t[t.LeftArrow=15]="LeftArrow",t[t.UpArrow=16]="UpArrow",t[t.RightArrow=17]="RightArrow",t[t.DownArrow=18]="DownArrow",t[t.Insert=19]="Insert",t[t.Delete=20]="Delete",t[t.Digit0=21]="Digit0",t[t.Digit1=22]="Digit1",t[t.Digit2=23]="Digit2",t[t.Digit3=24]="Digit3",t[t.Digit4=25]="Digit4",t[t.Digit5=26]="Digit5",t[t.Digit6=27]="Digit6",t[t.Digit7=28]="Digit7",t[t.Digit8=29]="Digit8",t[t.Digit9=30]="Digit9",t[t.KeyA=31]="KeyA",t[t.KeyB=32]="KeyB",t[t.KeyC=33]="KeyC",t[t.KeyD=34]="KeyD",t[t.KeyE=35]="KeyE",t[t.KeyF=36]="KeyF",t[t.KeyG=37]="KeyG",t[t.KeyH=38]="KeyH",t[t.KeyI=39]="KeyI",t[t.KeyJ=40]="KeyJ",t[t.KeyK=41]="KeyK",t[t.KeyL=42]="KeyL",t[t.KeyM=43]="KeyM",t[t.KeyN=44]="KeyN",t[t.KeyO=45]="KeyO",t[t.KeyP=46]="KeyP",t[t.KeyQ=47]="KeyQ",t[t.KeyR=48]="KeyR",t[t.KeyS=49]="KeyS",t[t.KeyT=50]="KeyT",t[t.KeyU=51]="KeyU",t[t.KeyV=52]="KeyV",t[t.KeyW=53]="KeyW",t[t.KeyX=54]="KeyX",t[t.KeyY=55]="KeyY",t[t.KeyZ=56]="KeyZ",t[t.Meta=57]="Meta",t[t.ContextMenu=58]="ContextMenu",t[t.F1=59]="F1",t[t.F2=60]="F2",t[t.F3=61]="F3",t[t.F4=62]="F4",t[t.F5=63]="F5",t[t.F6=64]="F6",t[t.F7=65]="F7",t[t.F8=66]="F8",t[t.F9=67]="F9",t[t.F10=68]="F10",t[t.F11=69]="F11",t[t.F12=70]="F12",t[t.F13=71]="F13",t[t.F14=72]="F14",t[t.F15=73]="F15",t[t.F16=74]="F16",t[t.F17=75]="F17",t[t.F18=76]="F18",t[t.F19=77]="F19",t[t.F20=78]="F20",t[t.F21=79]="F21",t[t.F22=80]="F22",t[t.F23=81]="F23",t[t.F24=82]="F24",t[t.NumLock=83]="NumLock",t[t.ScrollLock=84]="ScrollLock",t[t.Semicolon=85]="Semicolon",t[t.Equal=86]="Equal",t[t.Comma=87]="Comma",t[t.Minus=88]="Minus",t[t.Period=89]="Period",t[t.Slash=90]="Slash",t[t.Backquote=91]="Backquote",t[t.BracketLeft=92]="BracketLeft",t[t.Backslash=93]="Backslash",t[t.BracketRight=94]="BracketRight",t[t.Quote=95]="Quote",t[t.OEM_8=96]="OEM_8",t[t.IntlBackslash=97]="IntlBackslash",t[t.Numpad0=98]="Numpad0",t[t.Numpad1=99]="Numpad1",t[t.Numpad2=100]="Numpad2",t[t.Numpad3=101]="Numpad3",t[t.Numpad4=102]="Numpad4",t[t.Numpad5=103]="Numpad5",t[t.Numpad6=104]="Numpad6",t[t.Numpad7=105]="Numpad7",t[t.Numpad8=106]="Numpad8",t[t.Numpad9=107]="Numpad9",t[t.NumpadMultiply=108]="NumpadMultiply",t[t.NumpadAdd=109]="NumpadAdd",t[t.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",t[t.NumpadSubtract=111]="NumpadSubtract",t[t.NumpadDecimal=112]="NumpadDecimal",t[t.NumpadDivide=113]="NumpadDivide",t[t.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",t[t.ABNT_C1=115]="ABNT_C1",t[t.ABNT_C2=116]="ABNT_C2",t[t.AudioVolumeMute=117]="AudioVolumeMute",t[t.AudioVolumeUp=118]="AudioVolumeUp",t[t.AudioVolumeDown=119]="AudioVolumeDown",t[t.BrowserSearch=120]="BrowserSearch",t[t.BrowserHome=121]="BrowserHome",t[t.BrowserBack=122]="BrowserBack",t[t.BrowserForward=123]="BrowserForward",t[t.MediaTrackNext=124]="MediaTrackNext",t[t.MediaTrackPrevious=125]="MediaTrackPrevious",t[t.MediaStop=126]="MediaStop",t[t.MediaPlayPause=127]="MediaPlayPause",t[t.LaunchMediaPlayer=128]="LaunchMediaPlayer",t[t.LaunchMail=129]="LaunchMail",t[t.LaunchApp2=130]="LaunchApp2",t[t.Clear=131]="Clear",t[t.MAX_VALUE=132]="MAX_VALUE"})(bi||(bi={}));var wi;(function(t){t[t.Hint=1]="Hint",t[t.Info=2]="Info",t[t.Warning=4]="Warning",t[t.Error=8]="Error"})(wi||(wi={}));var _i;(function(t){t[t.Unnecessary=1]="Unnecessary",t[t.Deprecated=2]="Deprecated"})(_i||(_i={})),u.MinimapPosition=void 0,(function(t){t[t.Inline=1]="Inline",t[t.Gutter=2]="Gutter"})(u.MinimapPosition||(u.MinimapPosition={})),u.MinimapSectionHeaderStyle=void 0,(function(t){t[t.Normal=1]="Normal",t[t.Underlined=2]="Underlined"})(u.MinimapSectionHeaderStyle||(u.MinimapSectionHeaderStyle={})),u.MouseTargetType=void 0,(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.TEXTAREA=1]="TEXTAREA",t[t.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",t[t.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",t[t.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",t[t.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",t[t.CONTENT_TEXT=6]="CONTENT_TEXT",t[t.CONTENT_EMPTY=7]="CONTENT_EMPTY",t[t.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",t[t.CONTENT_WIDGET=9]="CONTENT_WIDGET",t[t.OVERVIEW_RULER=10]="OVERVIEW_RULER",t[t.SCROLLBAR=11]="SCROLLBAR",t[t.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",t[t.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(u.MouseTargetType||(u.MouseTargetType={})),u.NewSymbolNameTag$1=void 0,(function(t){t[t.AIGenerated=1]="AIGenerated"})(u.NewSymbolNameTag$1||(u.NewSymbolNameTag$1={})),u.NewSymbolNameTriggerKind$1=void 0,(function(t){t[t.Invoke=0]="Invoke",t[t.Automatic=1]="Automatic"})(u.NewSymbolNameTriggerKind$1||(u.NewSymbolNameTriggerKind$1={})),u.OverlayWidgetPositionPreference=void 0,(function(t){t[t.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",t[t.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",t[t.TOP_CENTER=2]="TOP_CENTER"})(u.OverlayWidgetPositionPreference||(u.OverlayWidgetPositionPreference={})),u.OverviewRulerLane$1=void 0,(function(t){t[t.Left=1]="Left",t[t.Center=2]="Center",t[t.Right=4]="Right",t[t.Full=7]="Full"})(u.OverviewRulerLane$1||(u.OverviewRulerLane$1={})),u.PartialAcceptTriggerKind=void 0,(function(t){t[t.Word=0]="Word",t[t.Line=1]="Line",t[t.Suggest=2]="Suggest"})(u.PartialAcceptTriggerKind||(u.PartialAcceptTriggerKind={})),u.PositionAffinity=void 0,(function(t){t[t.Left=0]="Left",t[t.Right=1]="Right",t[t.None=2]="None",t[t.LeftOfInjectedText=3]="LeftOfInjectedText",t[t.RightOfInjectedText=4]="RightOfInjectedText"})(u.PositionAffinity||(u.PositionAffinity={})),u.RenderLineNumbersType=void 0,(function(t){t[t.Off=0]="Off",t[t.On=1]="On",t[t.Relative=2]="Relative",t[t.Interval=3]="Interval",t[t.Custom=4]="Custom"})(u.RenderLineNumbersType||(u.RenderLineNumbersType={})),u.RenderMinimap=void 0,(function(t){t[t.None=0]="None",t[t.Text=1]="Text",t[t.Blocks=2]="Blocks"})(u.RenderMinimap||(u.RenderMinimap={})),u.ScrollType=void 0,(function(t){t[t.Smooth=0]="Smooth",t[t.Immediate=1]="Immediate"})(u.ScrollType||(u.ScrollType={})),u.ScrollbarVisibility=void 0,(function(t){t[t.Auto=1]="Auto",t[t.Hidden=2]="Hidden",t[t.Visible=3]="Visible"})(u.ScrollbarVisibility||(u.ScrollbarVisibility={}));var yi;(function(t){t[t.LTR=0]="LTR",t[t.RTL=1]="RTL"})(yi||(yi={})),u.ShowLightbulbIconMode=void 0,(function(t){t.Off="off",t.OnCode="onCode",t.On="on"})(u.ShowLightbulbIconMode||(u.ShowLightbulbIconMode={})),u.SignatureHelpTriggerKind$1=void 0,(function(t){t[t.Invoke=1]="Invoke",t[t.TriggerCharacter=2]="TriggerCharacter",t[t.ContentChange=3]="ContentChange"})(u.SignatureHelpTriggerKind$1||(u.SignatureHelpTriggerKind$1={})),u.SymbolKind=void 0,(function(t){t[t.File=0]="File",t[t.Module=1]="Module",t[t.Namespace=2]="Namespace",t[t.Package=3]="Package",t[t.Class=4]="Class",t[t.Method=5]="Method",t[t.Property=6]="Property",t[t.Field=7]="Field",t[t.Constructor=8]="Constructor",t[t.Enum=9]="Enum",t[t.Interface=10]="Interface",t[t.Function=11]="Function",t[t.Variable=12]="Variable",t[t.Constant=13]="Constant",t[t.String=14]="String",t[t.Number=15]="Number",t[t.Boolean=16]="Boolean",t[t.Array=17]="Array",t[t.Object=18]="Object",t[t.Key=19]="Key",t[t.Null=20]="Null",t[t.EnumMember=21]="EnumMember",t[t.Struct=22]="Struct",t[t.Event=23]="Event",t[t.Operator=24]="Operator",t[t.TypeParameter=25]="TypeParameter"})(u.SymbolKind||(u.SymbolKind={})),u.SymbolTag=void 0,(function(t){t[t.Deprecated=1]="Deprecated"})(u.SymbolTag||(u.SymbolTag={})),u.TextDirection$1=void 0,(function(t){t[t.LTR=0]="LTR",t[t.RTL=1]="RTL"})(u.TextDirection$1||(u.TextDirection$1={})),u.TextEditorCursorBlinkingStyle=void 0,(function(t){t[t.Hidden=0]="Hidden",t[t.Blink=1]="Blink",t[t.Smooth=2]="Smooth",t[t.Phase=3]="Phase",t[t.Expand=4]="Expand",t[t.Solid=5]="Solid"})(u.TextEditorCursorBlinkingStyle||(u.TextEditorCursorBlinkingStyle={})),u.TextEditorCursorStyle=void 0,(function(t){t[t.Line=1]="Line",t[t.Block=2]="Block",t[t.Underline=3]="Underline",t[t.LineThin=4]="LineThin",t[t.BlockOutline=5]="BlockOutline",t[t.UnderlineThin=6]="UnderlineThin"})(u.TextEditorCursorStyle||(u.TextEditorCursorStyle={})),u.TrackedRangeStickiness=void 0,(function(t){t[t.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",t[t.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",t[t.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",t[t.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(u.TrackedRangeStickiness||(u.TrackedRangeStickiness={})),u.WrappingIndent=void 0,(function(t){t[t.None=0]="None",t[t.Same=1]="Same",t[t.Indent=2]="Indent",t[t.DeepIndent=3]="DeepIndent"})(u.WrappingIndent||(u.WrappingIndent={}));const Et=class Et{static chord(e,n){return Hs(e,n)}};Et.CtrlCmd=2048,Et.Shift=1024,Et.Alt=512,Et.WinCtrl=256;let Li=Et;function er(){return{editor:void 0,languages:void 0,CancellationTokenSource:ct,Emitter:ie,KeyCode:bi,KeyMod:Li,Position:U,Range:N,Selection:ce,SelectionDirection:yi,MarkerSeverity:wi,MarkerTag:_i,Uri:re,Token:Ks}}function tr(t){return t}class Po{constructor(e,n){this.lastCache=void 0,this.lastArgKey=void 0,typeof e=="function"?(this._fn=e,this._computeKey=tr):(this._fn=n,this._computeKey=e.getCacheKey)}get(e){const n=this._computeKey(e);return this.lastArgKey!==n&&(this.lastArgKey=n,this.lastCache=this._fn(e)),this.lastCache}}class Io{get cachedValues(){return this._map}constructor(e,n){this._map=new Map,this._map2=new Map,typeof e=="function"?(this._fn=e,this._computeKey=tr):(this._fn=n,this._computeKey=e.getCacheKey)}get(e){const n=this._computeKey(e);if(this._map2.has(n))return this._map2.get(n);const i=this._fn(e);return this._map.set(e,i),this._map2.set(n,i),i}}var Qe;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Running=1]="Running",t[t.Completed=2]="Completed"})(Qe||(Qe={}));class Te{constructor(e){this.executor=e,this._state=Qe.Uninitialized}get value(){if(this._state===Qe.Uninitialized){this._state=Qe.Running;try{this._value=this.executor()}catch(e){this._error=e}finally{this._state=Qe.Completed}}else if(this._state===Qe.Running)throw new Error("Cannot read the value of a lazy that is being initialized");if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}function Fo(t){return!t||typeof t!="string"?!0:t.trim().length===0}const Do=/{(\d+)}/g;function Bo(t,...e){return e.length===0?t:t.replace(Do,function(n,i){const s=parseInt(i,10);return isNaN(s)||s<0||s>=e.length?n:e[s]})}function Vo(t){return t.replace(/[<>"'&]/g,e=>{switch(e){case"<":return"<";case">":return">";case'"':return""";case"'":return"'";case"&":return"&"}return e})}function qo(t){return t.replace(/[<>&]/g,function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}})}function vi(t){return t.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function Uo(t,e=" "){const n=nr(t,e);return ir(n,e)}function nr(t,e){if(!t||!e)return t;const n=e.length;let i=0;if(n===1){const s=e.charCodeAt(0);for(;i0&&t.charCodeAt(r-1)===a;)r--;return t.substring(0,r)}let s=i;for(;s>0&&t.endsWith(e,s);)s-=n;return t.substring(0,s)}function Wo(t){return t.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function sr(t,e,n={}){if(!t)throw new Error("Cannot create regex from empty string");e||(t=vi(t)),n.wholeWord&&(/\B/.test(t.charAt(0))||(t="\\b"+t),/\B/.test(t.charAt(t.length-1))||(t=t+"\\b"));let i="";return n.global&&(i+="g"),n.matchCase||(i+="i"),n.multiline&&(i+="m"),n.unicode&&(i+="u"),new RegExp(t,i)}function rr(t){return t.source==="^"||t.source==="^$"||t.source==="$"||t.source==="^\\s*$"?!1:!!(t.exec("")&&t.lastIndex===0)}function ar(t){return t.split(/\r\n|\r|\n/)}function or(t){for(let e=0,n=t.length;e=0;n--){const i=t.charCodeAt(n);if(i!==32&&i!==9)return n}return-1}function Oo(t,e){return te?1:0}function ur(t,e,n=0,i=t.length,s=0,r=e.length){for(;nh)return 1}const a=i-n,l=r-s;return al?1:0}function zo(t,e){return Bt(t,e,0,t.length,0,e.length)}function Bt(t,e,n=0,i=t.length,s=0,r=e.length){for(;n=128||h>=128)return ur(t.toLowerCase(),e.toLowerCase(),n,i,s,r);xi(c)&&(c-=32),xi(h)&&(h-=32);const d=c-h;if(d!==0)return d}const a=i-n,l=r-s;return al?1:0}function Ho(t){return t>=48&&t<=57}function xi(t){return t>=97&&t<=122}function Si(t){return t>=65&&t<=90}function Ni(t,e){return t.length===e.length&&Bt(t,e)===0}function jo(t,e,n){return t===e||t!==void 0&&e!==void 0&&Ni(t,e)}function cr(t,e){const n=e.length;return n<=t.length&&Bt(t,e,0,n)===0}function Go(t,e){const n=t.length,i=n-e.length;return i>=0&&Bt(t,e,i,n)===0}function yn(t,e){const n=Math.min(t.length,e.length);let i;for(i=0;i1){const i=t.charCodeAt(e-2);if(ft(i))return Ci(i,n)}return n}class Ai{get offset(){return this._offset}constructor(e,n=0){this._str=e,this._len=e.length,this._offset=n}setOffset(e){this._offset=e}prevCodePoint(){const e=Qo(this._str,this._offset);return this._offset-=e>=65536?2:1,e}nextCodePoint(){const e=Ri(this._str,this._len,this._offset);return this._offset+=e>=65536?2:1,e}eol(){return this._offset>=this._len}}class Ei{get offset(){return this._iterator.offset}constructor(e,n=0){this._iterator=new Ai(e,n)}nextGraphemeLength(){const e=vn.getInstance(),n=this._iterator,i=n.offset;let s=e.getGraphemeBreakType(n.nextCodePoint());for(;!n.eol();){const r=n.offset,a=e.getGraphemeBreakType(n.nextCodePoint());if(pr(s,a)){n.setOffset(r);break}s=a}return n.offset-i}prevGraphemeLength(){const e=vn.getInstance(),n=this._iterator,i=n.offset;let s=e.getGraphemeBreakType(n.prevCodePoint());for(;n.offset>0;){const r=n.offset,a=e.getGraphemeBreakType(n.prevCodePoint());if(pr(a,s)){n.setOffset(r);break}s=a}return i-n.offset}eol(){return this._iterator.eol()}}function hr(t,e){return new Ei(t,e).nextGraphemeLength()}function fr(t,e){return new Ei(t,e).prevGraphemeLength()}function Xo(t,e){e>0&&dt(t.charCodeAt(e))&&e--;const n=e+hr(t,e);return[n-fr(t,n),n]}let Mi;function Yo(){return/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/}function Jo(t){return Mi||(Mi=Yo()),Mi.test(t)}const Zo=/^[\t\n\r\x20-\x7E]*$/;function dr(t){return Zo.test(t)}const mr=/[\u2028\u2029]/;function Ko(t){return mr.test(t)}function el(t){return t>=11904&&t<=55215||t>=63744&&t<=64255||t>=65281&&t<=65374||t>=65504&&t<=65510}function gr(t){return t>=127462&&t<=127487||t===8986||t===8987||t===9200||t===9203||t>=9728&&t<=10175||t===11088||t===11093||t>=127744&&t<=128591||t>=128640&&t<=128764||t>=128992&&t<=129008||t>=129280&&t<=129535||t>=129648&&t<=129782}const tl="\uFEFF";function nl(t){return!!(t&&t.length>0&&t.charCodeAt(0)===65279)}function il(t,e=!1){return t?(e&&(t=t.replace(/\\./g,"")),t.toLowerCase()!==t):!1}function sl(t){return t=t%52,t<26?String.fromCharCode(97+t):String.fromCharCode(65+t-26)}function pr(t,e){return t===0?e!==5&&e!==7:t===2&&e===3?!1:t===4||t===2||t===3||e===4||e===2||e===3?!0:!(t===8&&(e===8||e===9||e===11||e===12)||(t===11||t===9)&&(e===9||e===10)||(t===12||t===10)&&e===10||e===5||e===13||e===7||t===1||t===13&&e===14||t===6&&e===6)}const Ze=class Ze{static getInstance(){return Ze._INSTANCE||(Ze._INSTANCE=new Ze),Ze._INSTANCE}constructor(){this._data=rl()}getGraphemeBreakType(e){if(e<32)return e===10?3:e===13?2:4;if(e<127)return 0;const n=this._data,i=n.length/3;let s=1;for(;s<=i;)if(en[3*s+1])s=2*s+1;else return n[3*s+2];return 0}};Ze._INSTANCE=null;let vn=Ze;function rl(){return JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}function al(t,e){if(t===0)return 0;const n=ol(t,e);if(n!==void 0)return n;const i=new Ai(e,t);return i.prevCodePoint(),i.offset}function ol(t,e){const n=new Ai(e,t);let i=n.prevCodePoint();for(;ll(i)||i===65039||i===8419;){if(n.offset===0)return;i=n.prevCodePoint()}if(!gr(i))return;let s=n.offset;return s>0&&n.prevCodePoint()===8205&&(s=n.offset),s}function ll(t){return 127995<=t&&t<=127999}const ul=" ",Ne=class Ne{static getInstance(e){return Ne.cache.get(Array.from(e).join(","))}static getLocales(){return Ne._locales.value}constructor(e){this.confusableDictionary=e}isAmbiguous(e){return this.confusableDictionary.has(e)}getPrimaryConfusable(e){return this.confusableDictionary.get(e)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}};Ne.ambiguousCharacterData=new Te(()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,1523,96,8242,96,1370,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,118002,50,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,118003,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,118004,52,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,118005,53,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,118006,54,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,118007,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,118008,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,118009,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,117974,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,117975,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71913,67,71922,67,65315,67,8557,67,8450,67,8493,67,117976,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,117977,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,117978,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,117979,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,117980,71,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,117981,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,117983,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,117984,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,118001,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,117982,108,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,117985,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,117986,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,117987,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,118000,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,117988,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,117989,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,117990,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,117991,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,117992,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,117993,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,117994,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,117995,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71910,87,71919,87,117996,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,117997,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,117998,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,71909,90,66293,90,65338,90,8484,90,8488,90,117999,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65283,35,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"cs":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"es":[8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"fr":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"it":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"ja":[8211,45,8218,44,65281,33,8216,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65292,44,65297,49,65307,59],"ko":[8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"pt-BR":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"ru":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"zh-hans":[160,32,65374,126,8218,44,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65297,49],"zh-hant":[8211,45,65374,126,8218,44,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89]}')),Ne.cache=new Po(e=>{const n=e.split(",");function i(f){const m=new Map;for(let b=0;b!f.startsWith("_")&&Object.hasOwn(a,f));l.length===0&&(l=["_default"]);let c;for(const f of l){const m=i(a[f]);c=r(c,m)}const h=i(a._common),d=s(h,c);return new Ne(d)}),Ne._locales=new Te(()=>Object.keys(Ne.ambiguousCharacterData.value).filter(e=>!e.startsWith("_")));let Vt=Ne;const Mt=class Mt{static getRawData(){return JSON.parse('{"_common":[11,12,13,127,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999],"cs":[173,8203,12288],"de":[173,8203,12288],"es":[8203,12288],"fr":[173,8203,12288],"it":[160,173,12288],"ja":[173],"ko":[173,12288],"pl":[173,8203,12288],"pt-BR":[173,8203,12288],"qps-ploc":[160,173,8203,12288],"ru":[173,12288],"tr":[160,173,8203,12288],"zh-hans":[160,173,8203,12288],"zh-hant":[173,12288]}')}static getData(){return this._data||(this._data=new Set([...Object.values(Mt.getRawData())].flat())),this._data}static isInvisibleCharacter(e){return Mt.getData().has(e)}static get codePoints(){return Mt.getData()}};Mt._data=void 0;let mt=Mt;const br=Symbol("MicrotaskDelay");function cl(t){return!!t&&typeof t.then=="function"}function wr(t){const e=new ct,n=t(e.token);let i=!1;const s=new Promise((r,a)=>{const l=e.token.onCancellationRequested(()=>{i=!0,l.dispose(),a(new Ce)});Promise.resolve(n).then(c=>{l.dispose(),e.dispose(),i?Is(c)&&c.dispose():r(c)},c=>{l.dispose(),e.dispose(),a(c)})});return new class{cancel(){e.cancel(),e.dispose()}then(r,a){return s.then(r,a)}catch(r){return this.then(void 0,r)}finally(r){return s.finally(r)}}}function hl(t,e,n){return new Promise((i,s)=>{const r=e.onCancellationRequested(()=>{r.dispose(),i(n)});t.then(i,s).finally(()=>r.dispose())})}function fl(t,e){return new Promise((n,i)=>{const s=e.onCancellationRequested(()=>{s.dispose(),i(new Ce)});t.then(n,i).finally(()=>s.dispose())})}function dl(t){if(!sn(t))return Promise.reject(t)}function ml(t,e,n){let i;const s=setTimeout(()=>{i?.(void 0),n?.()},e);return Promise.race([t.finally(()=>clearTimeout(s)),new Promise(r=>i=r)])}class gl{constructor(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null,this.cancellationTokenSource=new ct}queue(e){if(this.cancellationTokenSource.token.isCancellationRequested)return Promise.reject(new Error("Throttler is disposed"));if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){const n=()=>{if(this.queuedPromise=null,this.cancellationTokenSource.token.isCancellationRequested)return;const i=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,i};this.queuedPromise=new Promise(i=>{this.activePromise.then(n,n).then(i)})}return new Promise((n,i)=>{this.queuedPromise.then(n,i)})}return this.activePromise=e(this.cancellationTokenSource.token),new Promise((n,i)=>{this.activePromise.then(s=>{this.activePromise=null,n(s)},s=>{this.activePromise=null,i(s)})})}dispose(){this.cancellationTokenSource.cancel()}}const pl=(t,e)=>{let n=!0;const i=setTimeout(()=>{n=!1,e()},t);return{isTriggered:()=>n,dispose:()=>{clearTimeout(i),n=!1}}},bl=t=>{let e=!0;return queueMicrotask(()=>{e&&(e=!1,t())}),{isTriggered:()=>e,dispose:()=>{e=!1}}};class _r{constructor(e){this.defaultDelay=e,this.deferred=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(e,n=this.defaultDelay){this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((s,r)=>{this.doResolve=s,this.doReject=r}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const s=this.task;return this.task=null,s()}}));const i=()=>{this.deferred=null,this.doResolve?.(null)};return this.deferred=n===br?bl(i):pl(n,i),this.completionPromise}isTriggered(){return!!this.deferred?.isTriggered()}cancel(){this.cancelTimeout(),this.completionPromise&&(this.doReject?.(new Ce),this.completionPromise=null)}cancelTimeout(){this.deferred?.dispose(),this.deferred=null}dispose(){this.cancel()}}class wl{constructor(e){this.delayer=new _r(e),this.throttler=new gl}trigger(e,n){return this.delayer.trigger(()=>this.throttler.queue(e),n)}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose(),this.throttler.dispose()}}function yr(t,e){return e?new Promise((n,i)=>{const s=setTimeout(()=>{r.dispose(),n()},t),r=e.onCancellationRequested(()=>{clearTimeout(s),r.dispose(),i(new Ce)})}):wr(n=>yr(t,n))}function _l(t,e=0,n){const i=setTimeout(()=>{t(),n&&s.dispose()},e),s=xe(()=>{clearTimeout(i),n?.delete(s)});return n?.add(s),s}function yl(t,e=i=>!!i,n=null){let i=0;const s=t.length,r=()=>{if(i>=s)return Promise.resolve(n);const a=t[i++];return Promise.resolve(a()).then(c=>e(c)?Promise.resolve(c):r())};return r()}class Ll{constructor(){this._runningTask=void 0,this._pendingTasks=[]}schedule(e){const n=new xn;return this._pendingTasks.push({task:e,deferred:n,setUndefinedWhenCleared:!1}),this._runIfNotRunning(),n.p}_runIfNotRunning(){this._runningTask===void 0&&this._processQueue()}async _processQueue(){if(this._pendingTasks.length===0)return;const e=this._pendingTasks.shift();if(e){if(this._runningTask)throw new G;this._runningTask=e.task;try{const n=await e.task();e.deferred.complete(n)}catch(n){e.deferred.error(n)}finally{this._runningTask=void 0,this._processQueue()}}}clearPending(){const e=this._pendingTasks;this._pendingTasks=[];for(const n of e)n.setUndefinedWhenCleared?n.deferred.complete(void 0):n.deferred.error(new Ce)}}class vl{constructor(e,n){this._isDisposed=!1,this._token=void 0,typeof e=="function"&&typeof n=="number"&&this.setIfNotSet(e,n)}dispose(){this.cancel(),this._isDisposed=!0}cancel(){this._token!==void 0&&(clearTimeout(this._token),this._token=void 0)}cancelAndSet(e,n){if(this._isDisposed)throw new G("Calling 'cancelAndSet' on a disposed TimeoutTimer");this.cancel(),this._token=setTimeout(()=>{this._token=void 0,e()},n)}setIfNotSet(e,n){if(this._isDisposed)throw new G("Calling 'setIfNotSet' on a disposed TimeoutTimer");this._token===void 0&&(this._token=setTimeout(()=>{this._token=void 0,e()},n))}}class Lr{constructor(){this.disposable=void 0,this.isDisposed=!1}cancel(){this.disposable?.dispose(),this.disposable=void 0}cancelAndSet(e,n,i=globalThis){if(this.isDisposed)throw new G("Calling 'cancelAndSet' on a disposed IntervalTimer");this.cancel();const s=i.setInterval(()=>{e()},n);this.disposable=xe(()=>{i.clearInterval(s),this.disposable=void 0})}dispose(){this.cancel(),this.isDisposed=!0}}class xl{constructor(e,n){this.timeoutToken=void 0,this.runner=e,this.timeout=n,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=void 0)}schedule(e=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)}get delay(){return this.timeout}set delay(e){this.timeout=e}isScheduled(){return this.timeoutToken!==void 0}onTimeout(){this.timeoutToken=void 0,this.runner&&this.doRun()}doRun(){this.runner?.()}}u.runWhenGlobalIdle=void 0,u._runWhenIdle=void 0,(function(){const t=globalThis;typeof t.requestIdleCallback!="function"||typeof t.cancelIdleCallback!="function"?u._runWhenIdle=(e,n,i)=>{Es(()=>{if(s)return;const r=Date.now()+15;n(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,r-Date.now())}}))});let s=!1;return{dispose(){s||(s=!0)}}}:u._runWhenIdle=(e,n,i)=>{const s=e.requestIdleCallback(n,typeof i=="number"?{timeout:i}:void 0);let r=!1;return{dispose(){r||(r=!0,e.cancelIdleCallback(s))}}},u.runWhenGlobalIdle=(e,n)=>u._runWhenIdle(globalThis,e,n)})();class vr{constructor(e,n){this._didRun=!1,this._executor=()=>{try{this._value=n()}catch(i){this._error=i}finally{this._didRun=!0}},this._handle=u._runWhenIdle(e,()=>this._executor())}dispose(){this._handle.dispose()}get value(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}get isInitialized(){return this._didRun}}class Sl extends vr{constructor(e){super(globalThis,e)}}class xn{get isRejected(){return this.outcome?.outcome===1}get isSettled(){return!!this.outcome}constructor(){this.p=new Promise((e,n)=>{this.completeCallback=e,this.errorCallback=n})}complete(e){return this.isSettled?Promise.resolve():new Promise(n=>{this.completeCallback(e),this.outcome={outcome:0,value:e},n()})}error(e){return this.isSettled?Promise.resolve():new Promise(n=>{this.errorCallback(e),this.outcome={outcome:1,value:e},n()})}cancel(){return this.error(new Ce)}}u.Promises=void 0,(function(t){async function e(i){let s;const r=await Promise.all(i.map(a=>a.then(l=>l,l=>{s||(s=l)})));if(typeof s<"u")throw s;return r}t.settled=e;function n(i){return new Promise(async(s,r)=>{try{await i(s,r)}catch(a){r(a)}})}t.withAsyncBody=n})(u.Promises||(u.Promises={}));function Nl(t){const e=new ct,n=t(e.token);return new Rl(e,async i=>{const s=e.token.onCancellationRequested(()=>{s.dispose(),e.dispose(),i.reject(new Ce)});try{for await(const r of n){if(e.token.isCancellationRequested)return;i.emitOne(r)}s.dispose(),e.dispose()}catch(r){s.dispose(),e.dispose(),i.reject(r)}})}class Cl{constructor(){this._unsatisfiedConsumers=[],this._unconsumedValues=[]}get hasFinalValue(){return!!this._finalValue}produce(e){if(this._ensureNoFinalValue(),this._unsatisfiedConsumers.length>0){const n=this._unsatisfiedConsumers.shift();this._resolveOrRejectDeferred(n,e)}else this._unconsumedValues.push(e)}produceFinal(e){this._ensureNoFinalValue(),this._finalValue=e;for(const n of this._unsatisfiedConsumers)this._resolveOrRejectDeferred(n,e);this._unsatisfiedConsumers.length=0}_ensureNoFinalValue(){if(this._finalValue)throw new G("ProducerConsumer: cannot produce after final value has been set")}_resolveOrRejectDeferred(e,n){n.ok?e.complete(n.value):e.error(n.error)}consume(){if(this._unconsumedValues.length>0||this._finalValue){const e=this._unconsumedValues.length>0?this._unconsumedValues.shift():this._finalValue;return e.ok?Promise.resolve(e.value):Promise.reject(e.error)}else{const e=new xn;return this._unsatisfiedConsumers.push(e),e.p}}}const ae=class ae{constructor(e,n){this._onReturn=n,this._producerConsumer=new Cl,this._iterator={next:()=>this._producerConsumer.consume(),return:()=>(this._onReturn?.(),Promise.resolve({done:!0,value:void 0})),throw:async i=>(this._finishError(i),{done:!0,value:void 0})},queueMicrotask(async()=>{const i=e({emitOne:s=>this._producerConsumer.produce({ok:!0,value:{done:!1,value:s}}),emitMany:s=>{for(const r of s)this._producerConsumer.produce({ok:!0,value:{done:!1,value:r}})},reject:s=>this._finishError(s)});if(!this._producerConsumer.hasFinalValue)try{await i,this._finishOk()}catch(s){this._finishError(s)}})}static fromArray(e){return new ae(n=>{n.emitMany(e)})}static fromPromise(e){return new ae(async n=>{n.emitMany(await e)})}static fromPromisesResolveOrder(e){return new ae(async n=>{await Promise.all(e.map(async i=>n.emitOne(await i)))})}static merge(e){return new ae(async n=>{await Promise.all(e.map(async i=>{for await(const s of i)n.emitOne(s)}))})}static map(e,n){return new ae(async i=>{for await(const s of e)i.emitOne(n(s))})}static tee(e){let n,i;const s=new xn,r=async()=>{if(!(!n||!i))try{for await(const c of e)n.emitOne(c),i.emitOne(c)}catch(c){n.reject(c),i.reject(c)}finally{s.complete()}},a=new ae(async c=>(n=c,r(),s.p)),l=new ae(async c=>(i=c,r(),s.p));return[a,l]}map(e){return ae.map(this,e)}static coalesce(e){return ae.filter(e,n=>!!n)}coalesce(){return ae.coalesce(this)}static filter(e,n){return new ae(async i=>{for await(const s of e)n(s)&&i.emitOne(s)})}filter(e){return ae.filter(this,e)}_finishOk(){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!0,value:{done:!0,value:void 0}})}_finishError(e){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!1,error:e})}[Symbol.asyncIterator](){return this._iterator}};ae.EMPTY=ae.fromArray([]);let Sn=ae;class Rl extends Sn{constructor(e,n){super(n),this._source=e}cancel(){this._source.cancel()}}u.Schemas=void 0,(function(t){t.inMemory="inmemory",t.vscode="vscode",t.internal="private",t.walkThrough="walkThrough",t.walkThroughSnippet="walkThroughSnippet",t.http="http",t.https="https",t.file="file",t.mailto="mailto",t.untitled="untitled",t.data="data",t.command="command",t.vscodeRemote="vscode-remote",t.vscodeRemoteResource="vscode-remote-resource",t.vscodeManagedRemoteResource="vscode-managed-remote-resource",t.vscodeUserData="vscode-userdata",t.vscodeCustomEditor="vscode-custom-editor",t.vscodeNotebookCell="vscode-notebook-cell",t.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",t.vscodeNotebookCellMetadataDiff="vscode-notebook-cell-metadata-diff",t.vscodeNotebookCellOutput="vscode-notebook-cell-output",t.vscodeNotebookCellOutputDiff="vscode-notebook-cell-output-diff",t.vscodeNotebookMetadata="vscode-notebook-metadata",t.vscodeInteractiveInput="vscode-interactive-input",t.vscodeSettings="vscode-settings",t.vscodeWorkspaceTrust="vscode-workspace-trust",t.vscodeTerminal="vscode-terminal",t.vscodeImageCarousel="vscode-image-carousel",t.vscodeChatCodeBlock="vscode-chat-code-block",t.vscodeChatCodeCompareBlock="vscode-chat-code-compare-block",t.vscodeChatEditor="vscode-chat-editor",t.vscodeChatInput="chatSessionInput",t.vscodeLocalChatSession="vscode-chat-session",t.webviewPanel="webview-panel",t.vscodeWebview="vscode-webview",t.vscodeBrowser="vscode-browser",t.extension="extension",t.vscodeFileResource="vscode-file",t.tmp="tmp",t.vsls="vsls",t.vscodeSourceControl="vscode-scm",t.commentsInput="comment",t.codeSetting="code-setting",t.outputChannel="output",t.accessibleView="accessible-view",t.chatEditingSnapshotScheme="chat-editing-snapshot-text-model",t.chatEditingModel="chat-editing-text-model",t.copilotPr="copilot-pr"})(u.Schemas||(u.Schemas={}));function xr(t,e){return re.isUri(t)?Ni(t.scheme,e):cr(t,e+":")}function Al(t,...e){return e.some(n=>xr(t,n))}const El="tkn";class Ml{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._serverRootPath="/"}setPreferredWebSchema(e){this._preferredWebSchema=e}get _remoteResourcesPath(){return ee.join(this._serverRootPath,u.Schemas.vscodeRemoteResource)}rewrite(e){if(this._delegate)try{return this._delegate(e)}catch(l){return ms(l),e}const n=e.authority;let i=this._hosts[n];i&&i.indexOf(":")!==-1&&i.indexOf("[")===-1&&(i=`[${i}]`);const s=this._ports[n],r=this._connectionTokens[n];let a=`path=${encodeURIComponent(e.path)}`;return typeof r=="string"&&(a+=`&${El}=${encodeURIComponent(r)}`),re.from({scheme:Zn?this._preferredWebSchema:u.Schemas.vscodeRemoteResource,authority:`${i}:${s}`,path:this._remoteResourcesPath,query:a})}}const Sr=new Ml,kl="vs/../../node_modules",Tl="vscode-app",Zt=class Zt{asBrowserUri(e){const n=this.toUri(e);return this.uriToBrowserUri(n)}uriToBrowserUri(e){return e.scheme===u.Schemas.vscodeRemote?Sr.rewrite(e):e.scheme===u.Schemas.file&&(As||da===`${u.Schemas.vscodeFileResource}://${Zt.FALLBACK_AUTHORITY}`)?e.with({scheme:u.Schemas.vscodeFileResource,authority:e.authority||Zt.FALLBACK_AUTHORITY,query:null,fragment:null}):e}toUri(e){if(re.isUri(e))return e;if(globalThis._VSCODE_FILE_ROOT){const n=globalThis._VSCODE_FILE_ROOT;if(/^\w[\w\d+.-]*:\/\//.test(n))return re.joinPath(re.parse(n,!0),e);const i=so(n,e);return re.file(i)}throw new Error("Cannot determine URI for module id!")}};Zt.FALLBACK_AUTHORITY=Tl;let ki=Zt;const Nr=new ki;u.COI=void 0,(function(t){const e=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);t.CoopAndCoep=Object.freeze(e.get("3"));const n="vscode-coi";function i(r){let a;typeof r=="string"?a=new URL(r).searchParams:r instanceof URL?a=r.searchParams:re.isUri(r)&&(a=new URL(r.toString(!0)).searchParams);const l=a?.get(n);if(l)return e.get(l)}t.getHeadersFromQuery=i;function s(r,a,l){if(!globalThis.crossOriginIsolated)return;const c=a&&l?"3":l?"2":"1";r instanceof URLSearchParams?r.set(n,c):r[n]=c}t.addSearchParam=s})(u.COI||(u.COI={}));const Cr=typeof Buffer<"u";new Te(()=>new Uint8Array(256));let Ti;class Nn{static wrap(e){return Cr&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new Nn(e)}constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}toString(){return Cr?this.buffer.toString():(Ti||(Ti=new TextDecoder(void 0,{ignoreBOM:!0})),Ti.decode(this.buffer))}}function Pl(t,e){return t[e+0]<<0>>>0|t[e+1]<<8>>>0}function Il(t,e,n){t[n+0]=e&255,e=e>>>8,t[n+1]=e&255}function Fl(t,e){return t[e]*2**24+t[e+1]*2**16+t[e+2]*2**8+t[e+3]}function Dl(t,e,n){t[n+3]=e,e=e>>>8,t[n+2]=e,e=e>>>8,t[n+1]=e,e=e>>>8,t[n]=e}function Bl(t,e){return t[e]}function Vl(t,e,n){t[n]=e}const Rr="0123456789abcdef";function ql({buffer:t}){let e="";for(let n=0;n>>4],e+=Rr[i&15]}return e}function Ul(t){return Cn(t,0)}function Cn(t,e){switch(typeof t){case"object":return t===null?Pe(349,e):Array.isArray(t)?$l(t,e):Ol(t,e);case"string":return Pi(t,e);case"boolean":return Wl(t,e);case"number":return Pe(t,e);case"undefined":return Pe(937,e);default:return Pe(617,e)}}function Pe(t,e){return(e<<5)-e+t|0}function Wl(t,e){return Pe(t?433:863,e)}function Pi(t,e){e=Pe(149417,e);for(let n=0,i=t.length;nCn(i,n),e)}function Ol(t,e){return e=Pe(181387,e),Object.keys(t).sort().reduce((n,i)=>(n=Pi(i,n),Cn(t[i],n)),e)}function Ii(t,e,n=32){const i=n-e,s=~((1<>>i)>>>0}function qt(t,e=32){return t instanceof ArrayBuffer?ql(Nn.wrap(new Uint8Array(t))):(t>>>0).toString(16).padStart(e/4,"0")}const Vn=class Vn{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){const n=e.length;if(n===0)return;const i=this._buff;let s=this._buffLen,r=this._leftoverHighSurrogate,a,l;for(r!==0?(a=r,l=-1,r=0):(a=e.charCodeAt(0),l=0);;){let c=a;if(ft(a))if(l+1>>6,e[n++]=128|(i&63)>>>0):i<65536?(e[n++]=224|(i&61440)>>>12,e[n++]=128|(i&4032)>>>6,e[n++]=128|(i&63)>>>0):(e[n++]=240|(i&1835008)>>>18,e[n++]=128|(i&258048)>>>12,e[n++]=128|(i&4032)>>>6,e[n++]=128|(i&63)>>>0),n>=64&&(this._step(),n-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),n}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),qt(this._h0)+qt(this._h1)+qt(this._h2)+qt(this._h3)+qt(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,this._buff.subarray(this._buffLen).fill(0),this._buffLen>56&&(this._step(),this._buff.fill(0));const e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){const e=Vn._bigBlock32,n=this._buffDV;for(let f=0;f<64;f+=4)e.setUint32(f,n.getUint32(f,!1),!1);for(let f=64;f<320;f+=4)e.setUint32(f,Ii(e.getUint32(f-12,!1)^e.getUint32(f-32,!1)^e.getUint32(f-56,!1)^e.getUint32(f-64,!1),1),!1);let i=this._h0,s=this._h1,r=this._h2,a=this._h3,l=this._h4,c,h,d;for(let f=0;f<80;f++)f<20?(c=s&r|~s&a,h=1518500249):f<40?(c=s^r^a,h=1859775393):f<60?(c=s&r|s&a|r&a,h=2400959708):(c=s^r^a,h=3395469782),d=Ii(i,5)+c+l+h+e.getUint32(f*4,!1)&4294967295,l=a,a=r,r=Ii(s,30),s=i,i=d;this._h0=this._h0+i&4294967295,this._h1=this._h1+s&4294967295,this._h2=this._h2+r&4294967295,this._h3=this._h3+a&4294967295,this._h4=this._h4+l&4294967295}};Vn._bigBlock32=new DataView(new ArrayBuffer(320));let Fi=Vn;var Ar,Er,Mr;class zl{constructor(e,n){this.uri=e,this.value=n}}function Hl(t){return Array.isArray(t)}const Ke=class Ke{constructor(e,n){if(this[Ar]="ResourceMap",e instanceof Ke)this.map=new Map(e.map),this.toKey=n??Ke.defaultToKey;else if(Hl(e)){this.map=new Map,this.toKey=n??Ke.defaultToKey;for(const[i,s]of e)this.set(i,s)}else this.map=new Map,this.toKey=e??Ke.defaultToKey}set(e,n){return this.map.set(this.toKey(e),new zl(e,n)),this}get(e){return this.map.get(this.toKey(e))?.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,n){typeof n<"u"&&(e=e.bind(n));for(const[i,s]of this.map)e(s.value,s.uri,this)}*values(){for(const e of this.map.values())yield e.value}*keys(){for(const e of this.map.values())yield e.uri}*entries(){for(const e of this.map.values())yield[e.uri,e.value]}*[(Ar=Symbol.toStringTag,Symbol.iterator)](){for(const[,e]of this.map)yield[e.uri,e.value]}};Ke.defaultToKey=e=>e.toString();let Ut=Ke;class jl{constructor(e,n){this[Er]="ResourceSet",!e||typeof e=="function"?this._map=new Ut(e):(this._map=new Ut(n),e.forEach(this.add,this))}get size(){return this._map.size}add(e){return this._map.set(e,e),this}clear(){this._map.clear()}delete(e){return this._map.delete(e)}forEach(e,n){this._map.forEach((i,s)=>e.call(n,s,s,this))}has(e){return this._map.has(e)}entries(){return this._map.entries()}keys(){return this._map.keys()}values(){return this._map.keys()}[(Er=Symbol.toStringTag,Symbol.iterator)](){return this.keys()}}class Gl{constructor(){this[Mr]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,n=0){const i=this._map.get(e);if(i)return n!==0&&this.touch(i,n),i.value}set(e,n,i=0){let s=this._map.get(e);if(s)s.value=n,i!==0&&this.touch(s,i);else{switch(s={key:e,value:n,next:void 0,previous:void 0},i){case 0:this.addItemLast(s);break;case 1:this.addItemFirst(s);break;case 2:this.addItemLast(s);break;default:this.addItemLast(s);break}this._map.set(e,s),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const n=this._map.get(e);if(n)return this._map.delete(e),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,n){const i=this._state;let s=this._head;for(;s;){if(n?e.bind(n)(s.value,s.key,this):e(s.value,s.key,this),this._state!==i)throw new Error("LinkedMap got modified during iteration.");s=s.next}}keys(){const e=this,n=this._state;let i=this._head;const s={[Symbol.iterator](){return s},[Symbol.dispose](){},next(){if(e._state!==n)throw new Error("LinkedMap got modified during iteration.");if(i){const r={value:i.key,done:!1};return i=i.next,r}else return{value:void 0,done:!0}}};return s}values(){const e=this,n=this._state;let i=this._head;const s={[Symbol.iterator](){return s},[Symbol.dispose](){},next(){if(e._state!==n)throw new Error("LinkedMap got modified during iteration.");if(i){const r={value:i.value,done:!1};return i=i.next,r}else return{value:void 0,done:!0}}};return s}entries(){const e=this,n=this._state;let i=this._head;const s={[Symbol.iterator](){return s},[Symbol.dispose](){},next(){if(e._state!==n)throw new Error("LinkedMap got modified during iteration.");if(i){const r={value:[i.key,i.value],done:!1};return i=i.next,r}else return{value:void 0,done:!0}}};return s}[(Mr=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let n=this._head,i=this.size;for(;n&&i>e;)this._map.delete(n.key),n=n.next,i--;this._head=n,this._size=i,n&&(n.previous=void 0),this._state++}trimNew(e){if(e>=this.size)return;if(e===0){this.clear();return}let n=this._tail,i=this.size;for(;n&&i>e;)this._map.delete(n.key),n=n.previous,i--;this._tail=n,this._size=i,n&&(n.next=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const n=e.next,i=e.previous;if(!n||!i)throw new Error("Invalid list");n.previous=i,i.next=n}e.next=void 0,e.previous=void 0,this._state++}touch(e,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==1&&n!==2)){if(n===1){if(e===this._head)return;const i=e.next,s=e.previous;e===this._tail?(s.next=void 0,this._tail=s):(i.previous=s,s.next=i),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(n===2){if(e===this._tail)return;const i=e.next,s=e.previous;e===this._head?(i.previous=void 0,this._head=i):(i.previous=s,s.next=i),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){const e=[];return this.forEach((n,i)=>{e.push([i,n])}),e}fromJSON(e){this.clear();for(const[n,i]of e)this.set(n,i)}}class Ql extends Gl{constructor(e,n=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,n=2){return super.get(e,n)}peek(e){return super.get(e,0)}set(e,n){return super.set(e,n,2),this}checkTrim(){this.size>this._limit&&this.trim(Math.round(this._limit*this._ratio))}}class kr extends Ql{constructor(e,n=1){super(e,n)}trim(e){this.trimOld(e)}set(e,n){return super.set(e,n),this.checkTrim(),this}}class Xl{constructor(e){if(this._m1=new Map,this._m2=new Map,e)for(const[n,i]of e)this.set(n,i)}clear(){this._m1.clear(),this._m2.clear()}set(e,n){this._m1.set(e,n),this._m2.set(n,e)}get(e){return this._m1.get(e)}getKey(e){return this._m2.get(e)}delete(e){const n=this._m1.get(e);return n===void 0?!1:(this._m1.delete(e),this._m2.delete(n),!0)}keys(){return this._m1.keys()}values(){return this._m1.values()}}class Tr{constructor(){this.map=new Map}add(e,n){let i=this.map.get(e);i||(i=new Set,this.map.set(e,i)),i.add(n)}delete(e,n){const i=this.map.get(e);i&&(i.delete(n),i.size===0&&this.map.delete(e))}forEach(e,n){const i=this.map.get(e);i&&i.forEach(n)}}class Yl{constructor(){this._data=new Map}set(e,...n){let i=this._data;for(let s=0;s{let s="";for(const[r,a]of n)s+=`${" ".repeat(i)}${r}: `,a instanceof Map?s+=` +`+e(a,i+1):s+=`${a} +`;return s};return e(this._data,0)}}const Wt="default",Pr="$initialize";let Ir=!1;function Fr(t){Zn&&(Ir||(Ir=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq")),console.warn(t.message))}class Jl{constructor(e,n,i,s,r){this.vsWorker=e,this.req=n,this.channel=i,this.method=s,this.args=r,this.type=0}}class Dr{constructor(e,n,i,s){this.vsWorker=e,this.seq=n,this.res=i,this.err=s,this.type=1}}class Zl{constructor(e,n,i,s,r){this.vsWorker=e,this.req=n,this.channel=i,this.eventName=s,this.arg=r,this.type=2}}class Kl{constructor(e,n,i){this.vsWorker=e,this.req=n,this.event=i,this.type=3}}class eu{constructor(e,n){this.vsWorker=e,this.req=n,this.type=4}}class Br{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(e){this._workerId=e}async sendMessage(e,n,i){const s=String(++this._lastSentReq);return new Promise((r,a)=>{this._pendingReplies[s]={resolve:r,reject:a},this._send(new Jl(this._workerId,s,e,n,i))})}listen(e,n,i){let s=null;const r=new ie({onWillAddFirstListener:()=>{s=String(++this._lastSentReq),this._pendingEmitters.set(s,r),this._send(new Zl(this._workerId,s,e,n,i))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(s),this._send(new eu(this._workerId,s)),s=null}});return r.event}handleMessage(e){!e||!e.vsWorker||this._workerId!==-1&&e.vsWorker!==this._workerId||this._handleMessage(e)}createProxyToRemoteChannel(e,n){const i={get:(s,r)=>(typeof r=="string"&&!s[r]&&(Bi(r)?s[r]=a=>this.listen(e,r,a):Di(r)?s[r]=this.listen(e,r,void 0):r.charCodeAt(0)===36&&(s[r]=async(...a)=>(await n?.(),this.sendMessage(e,r,a)))),s[r])};return new Proxy(Object.create(null),i)}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq]){console.warn("Got reply to unknown seq");return}const n=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let i=e.err;if(e.err.$isError){const s=new Error;s.name=e.err.name,s.message=e.err.message,s.stack=e.err.stack,i=s}n.reject(i);return}n.resolve(e.res)}_handleRequestMessage(e){const n=e.req;this._handler.handleMessage(e.channel,e.method,e.args).then(s=>{this._send(new Dr(this._workerId,n,s,void 0))},s=>{s.detail instanceof Error&&(s.detail=Hn(s.detail)),this._send(new Dr(this._workerId,n,void 0,Hn(s)))})}_handleSubscribeEventMessage(e){const n=e.req,i=this._handler.handleEvent(e.channel,e.eventName,e.arg)(s=>{this._send(new Kl(this._workerId,n,s))});this._pendingEvents.set(n,i)}_handleEventMessage(e){const n=this._pendingEmitters.get(e.req);if(n===void 0){console.warn("Got event for unknown req");return}n.fire(e.event)}_handleUnsubscribeEventMessage(e){const n=this._pendingEvents.get(e.req);if(n===void 0){console.warn("Got unsubscribe for unknown req");return}n.dispose(),this._pendingEvents.delete(e.req)}_send(e){const n=[];if(e.type===0)for(let i=0;i{this._protocol.handleMessage(n)})),this._register(this._worker.onError(n=>{Fr(n),ze(n)})),this._protocol=new Br({sendMessage:(n,i)=>{this._worker.postMessage(n,i)},handleMessage:(n,i,s)=>this._handleMessage(n,i,s),handleEvent:(n,i,s)=>this._handleEvent(n,i,s)}),this._protocol.setWorkerId(this._worker.getId()),this._onModuleLoaded=this._protocol.sendMessage(Wt,Pr,[this._worker.getId()]).then(()=>{}),this.proxy=this._protocol.createProxyToRemoteChannel(Wt,async()=>{await this._onModuleLoaded}),this._onModuleLoaded.catch(n=>{this._onError("Worker failed to load ",n)})}_handleMessage(e,n,i){const s=this._localChannels.get(e);if(!s)return Promise.reject(new Error(`Missing channel ${e} on main thread`));const r=s[n];if(typeof r!="function")return Promise.reject(new Error(`Missing method ${n} on main thread channel ${e}`));try{return Promise.resolve(r.apply(s,i))}catch(a){return Promise.reject(a)}}_handleEvent(e,n,i){const s=this._localChannels.get(e);if(!s)throw new Error(`Missing channel ${e} on main thread`);if(Bi(n)){const r=s[n];if(typeof r!="function")throw new Error(`Missing dynamic event ${n} on main thread channel ${e}.`);const a=r.call(s,i);if(typeof a!="function")throw new Error(`Missing dynamic event ${n} on main thread channel ${e}.`);return a}if(Di(n)){const r=s[n];if(typeof r!="function")throw new Error(`Missing event ${n} on main thread channel ${e}.`);return r}throw new Error(`Malformed event name ${n}`)}setChannel(e,n){this._localChannels.set(e,n)}_onError(e,n){console.error(e),console.info(n)}}function Di(t){return t[0]==="o"&&t[1]==="n"&&Si(t.charCodeAt(2))}function Bi(t){return/^onDynamic/.test(t)&&Si(t.charCodeAt(9))}class nu{constructor(e,n){this._localChannels=new Map,this._remoteChannels=new Map,this._protocol=new Br({sendMessage:(i,s)=>{e(i,s)},handleMessage:(i,s,r)=>this._handleMessage(i,s,r),handleEvent:(i,s,r)=>this._handleEvent(i,s,r)}),this.requestHandler=n(this)}onmessage(e){this._protocol.handleMessage(e)}_handleMessage(e,n,i){if(e===Wt&&n===Pr)return this.initialize(i[0]);const s=e===Wt?this.requestHandler:this._localChannels.get(e);if(!s)return Promise.reject(new Error(`Missing channel ${e} on worker thread`));const r=s[n];if(typeof r!="function")return Promise.reject(new Error(`Missing method ${n} on worker thread channel ${e}`));try{return Promise.resolve(r.apply(s,i))}catch(a){return Promise.reject(a)}}_handleEvent(e,n,i){const s=e===Wt?this.requestHandler:this._localChannels.get(e);if(!s)throw new Error(`Missing channel ${e} on worker thread`);if(Bi(n)){const r=s[n];if(typeof r!="function")throw new Error(`Missing dynamic event ${n} on request handler.`);const a=r.call(s,i);if(typeof a!="function")throw new Error(`Missing dynamic event ${n} on request handler.`);return a}if(Di(n)){const r=s[n];if(typeof r!="function")throw new Error(`Missing event ${n} on request handler.`);return r}throw new Error(`Malformed event name ${n}`)}getChannel(e){let n=this._remoteChannels.get(e);return n===void 0&&(n=this._protocol.createProxyToRemoteChannel(e),this._remoteChannels.set(e,n)),n}async initialize(e){this._protocol.setWorkerId(e)}}class Ue{constructor(e,n,i,s){this.originalStart=e,this.originalLength=n,this.modifiedStart=i,this.modifiedLength=s}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}class Vi{constructor(e){this.source=e}getElements(){const e=this.source,n=new Int32Array(e.length);for(let i=0,s=e.length;i0||this.m_modifiedCount>0)&&this.m_changes.push(new Ue(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,n){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_originalCount++}AddModifiedElement(e,n){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class Ie{constructor(e,n,i=null){this.ContinueProcessingPredicate=i,this._originalSequence=e,this._modifiedSequence=n;const[s,r,a]=Ie._getElements(e),[l,c,h]=Ie._getElements(n);this._hasStrings=a&&h,this._originalStringElements=s,this._originalElementsOrHash=r,this._modifiedStringElements=l,this._modifiedElementsOrHash=c,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&typeof e[0]=="string"}static _getElements(e){const n=e.getElements();if(Ie._isStringArray(n)){const i=new Int32Array(n.length);for(let s=0,r=n.length;s=e&&s>=i&&this.ElementsAreEqual(n,s);)n--,s--;if(e>n||i>s){let f;return i<=s?(gt.Assert(e===n+1,"originalStart should only be one more than originalEnd"),f=[new Ue(e,0,i,s-i+1)]):e<=n?(gt.Assert(i===s+1,"modifiedStart should only be one more than modifiedEnd"),f=[new Ue(e,n-e+1,i,0)]):(gt.Assert(e===n+1,"originalStart should only be one more than originalEnd"),gt.Assert(i===s+1,"modifiedStart should only be one more than modifiedEnd"),f=[]),f}const a=[0],l=[0],c=this.ComputeRecursionPoint(e,n,i,s,a,l,r),h=a[0],d=l[0];if(c!==null)return c;if(!r[0]){const f=this.ComputeDiffRecursive(e,h,i,d,r);let m=[];return r[0]?m=[new Ue(h+1,n-(h+1)+1,d+1,s-(d+1)+1)]:m=this.ComputeDiffRecursive(h+1,n,d+1,s,r),this.ConcatenateChanges(f,m)}return[new Ue(e,n-e+1,i,s-i+1)]}WALKTRACE(e,n,i,s,r,a,l,c,h,d,f,m,b,p,g,_,x,S){let v=null,k=null,D=new Vr,O=n,y=i,L=b[0]-_[0]-s,R=-1073741824,V=this.m_forwardHistory.length-1;do{const W=L+e;W===O||W=0&&(h=this.m_forwardHistory[V],e=h[0],O=1,y=h.length-1)}while(--V>=-1);if(v=D.getReverseChanges(),S[0]){let W=b[0]+1,q=_[0]+1;if(v!==null&&v.length>0){const A=v[v.length-1];W=Math.max(W,A.getOriginalEnd()),q=Math.max(q,A.getModifiedEnd())}k=[new Ue(W,m-W+1,q,g-q+1)]}else{D=new Vr,O=a,y=l,L=b[0]-_[0]-c,R=1073741824,V=x?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const W=L+r;W===O||W=d[W+1]?(f=d[W+1]-1,p=f-L-c,f>R&&D.MarkNextChange(),R=f+1,D.AddOriginalElement(f+1,p+1),L=W+1-r):(f=d[W-1],p=f-L-c,f>R&&D.MarkNextChange(),R=f,D.AddModifiedElement(f+1,p+1),L=W-1-r),V>=0&&(d=this.m_reverseHistory[V],r=d[0],O=1,y=d.length-1)}while(--V>=-1);k=D.getChanges()}return this.ConcatenateChanges(v,k)}ComputeRecursionPoint(e,n,i,s,r,a,l){let c=0,h=0,d=0,f=0,m=0,b=0;e--,i--,r[0]=0,a[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const p=n-e+(s-i),g=p+1,_=new Int32Array(g),x=new Int32Array(g),S=s-i,v=n-e,k=e-i,D=n-s,y=(v-S)%2===0;_[S]=e,x[v]=n,l[0]=!1;for(let L=1;L<=p/2+1;L++){let R=0,V=0;d=this.ClipDiagonalBound(S-L,L,S,g),f=this.ClipDiagonalBound(S+L,L,S,g);for(let q=d;q<=f;q+=2){q===d||qR+V&&(R=c,V=h),!y&&Math.abs(q-v)<=L-1&&c>=x[q])return r[0]=c,a[0]=h,A<=x[q]&&L<=1448?this.WALKTRACE(S,d,f,k,v,m,b,D,_,x,c,n,r,h,s,a,y,l):null}const W=(R-e+(V-i)-L)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(R,W))return l[0]=!0,r[0]=R,a[0]=V,W>0&&L<=1448?this.WALKTRACE(S,d,f,k,v,m,b,D,_,x,c,n,r,h,s,a,y,l):(e++,i++,[new Ue(e,n-e+1,i,s-i+1)]);m=this.ClipDiagonalBound(v-L,L,v,g),b=this.ClipDiagonalBound(v+L,L,v,g);for(let q=m;q<=b;q+=2){q===m||q=x[q+1]?c=x[q+1]-1:c=x[q-1],h=c-(q-v)-D;const A=c;for(;c>e&&h>i&&this.ElementsAreEqual(c,h);)c--,h--;if(x[q]=c,y&&Math.abs(q-S)<=L&&c<=_[q])return r[0]=c,a[0]=h,A>=_[q]&&L<=1448?this.WALKTRACE(S,d,f,k,v,m,b,D,_,x,c,n,r,h,s,a,y,l):null}if(L<=1447){let q=new Int32Array(f-d+2);q[0]=S-d+1,pt.Copy2(_,d,q,1,f-d+1),this.m_forwardHistory.push(q),q=new Int32Array(b-m+2),q[0]=v-m+1,pt.Copy2(x,m,q,1,b-m+1),this.m_reverseHistory.push(q)}}return this.WALKTRACE(S,d,f,k,v,m,b,D,_,x,c,n,r,h,s,a,y,l)}PrettifyChanges(e){for(let n=0;n0,l=i.modifiedLength>0;for(;i.originalStart+i.originalLength=0;n--){const i=e[n];let s=0,r=0;if(n>0){const f=e[n-1];s=f.originalStart+f.originalLength,r=f.modifiedStart+f.modifiedLength}const a=i.originalLength>0,l=i.modifiedLength>0;let c=0,h=this._boundaryScore(i.originalStart,i.originalLength,i.modifiedStart,i.modifiedLength);for(let f=1;;f++){const m=i.originalStart-f,b=i.modifiedStart-f;if(mh&&(h=g,c=f)}i.originalStart-=c,i.modifiedStart-=c;const d=[null];if(n>0&&this.ChangesOverlap(e[n-1],e[n],d)){e[n-1]=d[0],e.splice(n,1),n++;continue}}if(this._hasStrings)for(let n=1,i=e.length;n0&&b>c&&(c=b,h=f,d=m)}return c>0?[h,d]:null}_contiguousSequenceScore(e,n,i){let s=0;for(let r=0;r=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,n){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(n>0){const i=e+n;if(this._OriginalIsBoundary(i-1)||this._OriginalIsBoundary(i))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,n){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(n>0){const i=e+n;if(this._ModifiedIsBoundary(i-1)||this._ModifiedIsBoundary(i))return!0}return!1}_boundaryScore(e,n,i,s){const r=this._OriginalRegionIsBoundary(e,n)?1:0,a=this._ModifiedRegionIsBoundary(i,s)?1:0;return r+a}ConcatenateChanges(e,n){const i=[];if(e.length===0||n.length===0)return n.length>0?n:e;if(this.ChangesOverlap(e[e.length-1],n[0],i)){const s=new Array(e.length+n.length-1);return pt.Copy(e,0,s,0,e.length-1),s[e.length-1]=i[0],pt.Copy(n,1,s,e.length,n.length-1),s}else{const s=new Array(e.length+n.length);return pt.Copy(e,0,s,0,e.length),pt.Copy(n,0,s,e.length,n.length),s}}ChangesOverlap(e,n,i){if(gt.Assert(e.originalStart<=n.originalStart,"Left change is not less than or equal to right change"),gt.Assert(e.modifiedStart<=n.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=n.originalStart||e.modifiedStart+e.modifiedLength>=n.modifiedStart){const s=e.originalStart;let r=e.originalLength;const a=e.modifiedStart;let l=e.modifiedLength;return e.originalStart+e.originalLength>=n.originalStart&&(r=n.originalStart+n.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=n.modifiedStart&&(l=n.modifiedStart+n.modifiedLength-e.modifiedStart),i[0]=new Ue(s,r,a,l),!0}else return i[0]=null,!1}ClipDiagonalBound(e,n,i,s){if(e>=0&&e255?255:t|0}function bt(t){return t<0?0:t>4294967295?4294967295:t|0}class wt{constructor(e){const n=qi(e);this._defaultValue=n,this._asciiMap=wt._createAsciiMap(n),this._map=new Map}static _createAsciiMap(e){const n=new Uint8Array(256);return n.fill(e),n}set(e,n){const i=qi(n);e>=0&&e<256?this._asciiMap[e]=i:this._map.set(e,i)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}}class su{constructor(){this._actual=new wt(0)}add(e){this._actual.set(e,1)}has(e){return this._actual.get(e)===1}clear(){return this._actual.clear()}}class ru{constructor(e,n,i){const s=new Uint8Array(e*n);for(let r=0,a=e*n;rn&&(n=c),l>i&&(i=l),h>i&&(i=h)}n++,i++;const s=new ru(i,n,0);for(let r=0,a=e.length;r=this._maxCharCode?0:this._states.get(e,n)}}let Ui=null;function ou(){return Ui===null&&(Ui=new au([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),Ui}let $t=null;function lu(){if($t===null){$t=new wt(0);const t=` <>'"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…|`;for(let n=0;ns);if(s>0){const l=n.charCodeAt(s-1),c=n.charCodeAt(a);(l===40&&c===41||l===91&&c===93||l===123&&c===125)&&a--}return{range:{startLineNumber:i,startColumn:s+1,endLineNumber:i,endColumn:a+2},url:n.substring(s,a+1)}}static computeLinks(e,n=ou()){const i=lu(),s=[];for(let r=1,a=e.getLineCount();r<=a;r++){const l=e.getLineContent(r),c=l.length;let h=0,d=0,f=0,m=1,b=!1,p=!1,g=!1,_=!1;for(;h=0?(s+=i?1:-1,s<0?s=e.length-1:s%=e.length,e[s]):null}};qn.INSTANCE=new qn;let Wi=qn;const qr={DateTimeFormat(t,e){return new Te(()=>{try{return new Intl.DateTimeFormat(t,e)}catch{return new Intl.DateTimeFormat(void 0,e)}})},Collator(t,e){return new Te(()=>{try{return new Intl.Collator(t,e)}catch{return new Intl.Collator(void 0,e)}})},Segmenter(t,e){return new Te(()=>{try{return new Intl.Segmenter(t,e)}catch{return new Intl.Segmenter(void 0,e)}})},Locale(t,e){return new Te(()=>{try{return new Intl.Locale(t,e)}catch{return new Intl.Locale(He,e)}})},NumberFormat(t,e){return new Te(()=>{try{return new Intl.NumberFormat(t,e)}catch{return new Intl.NumberFormat(void 0,e)}})}};class cu extends wt{constructor(e,n){super(0),this._segmenter=null,this._cachedLine=null,this._cachedSegments=[],this.intlSegmenterLocales=n,this.intlSegmenterLocales.length>0?this._segmenter=qr.Segmenter(this.intlSegmenterLocales,{granularity:"word"}):this._segmenter=null;for(let i=0,s=e.length;in)break;i=s}return i}findNextIntlWordAtOrAfterOffset(e,n){for(const i of this._getIntlSegmenterWordsOnLine(e))if(!(i.index=0;let n=null;try{n=sr(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch{return null}if(!n)return null;let i=!this.isRegex&&!e;return i&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(i=this.matchCase),new mu(n,this.wordSeparators?Wr(this.wordSeparators,[]):null,i?this.searchString:null)}}function $r(t){if(!t||t.length===0)return!1;for(let e=0,n=t.length;e=n)break;const s=t.charCodeAt(e);if(s===110||s===114||s===87)return!0}}return!1}function _t(t,e,n){if(!n)return new An(t,null);const i=[];for(let s=0,r=e.length;s>0);n[r]>=e?s=r-1:n[r+1]>=e?(i=r,s=r):i=r+1}return i+1}}class _u{static findMatches(e,n,i,s,r){const a=n.parseSearchRequest();return a?a.regex.multiline?this._doFindMatchesMultiline(e,i,new yt(a.wordSeparators,a.regex),s,r):this._doFindMatchesLineByLine(e,i,a,s,r):[]}static _getMultilineMatchRange(e,n,i,s,r,a){let l,c=0;s?(c=s.findLineFeedCountBeforeOffset(r),l=n+r+c):l=n+r;let h;if(s){const b=s.findLineFeedCountBeforeOffset(r+a.length)-c;h=l+a.length+b}else h=l+a.length;const d=e.getPositionAt(l),f=e.getPositionAt(h);return new N(d.lineNumber,d.column,f.lineNumber,f.column)}static _doFindMatchesMultiline(e,n,i,s,r){const a=e.getOffsetAt(n.getStartPosition()),l=e.getValueInRange(n,1),c=e.getEOL()===`\r +`?new Or(l):null,h=[];let d=0,f;for(i.reset(0);f=i.next(l);)if(h[d++]=_t(this._getMultilineMatchRange(e,a,l,c,f.index,f[0]),f,s),d>=r)return h;return h}static _doFindMatchesLineByLine(e,n,i,s,r){const a=[];let l=0;if(n.startLineNumber===n.endLineNumber){const h=e.getLineContent(n.startLineNumber).substring(n.startColumn-1,n.endColumn-1);return l=this._findMatchesInLine(i,h,n.startLineNumber,n.startColumn-1,l,a,s,r),a}const c=e.getLineContent(n.startLineNumber).substring(n.startColumn-1);l=this._findMatchesInLine(i,c,n.startLineNumber,n.startColumn-1,l,a,s,r);for(let h=n.startLineNumber+1;h=c))return r;return r}const d=new yt(e.wordSeparators,e.regex);let f;d.reset(0);do if(f=d.next(n),f&&(a[r++]=_t(new N(i,f.index+1+s,i,f.index+1+f[0].length+s),f,l),r>=c))return r;while(f);return r}static findNextMatch(e,n,i,s){const r=n.parseSearchRequest();if(!r)return null;const a=new yt(r.wordSeparators,r.regex);return r.regex.multiline?this._doFindNextMatchMultiline(e,i,a,s):this._doFindNextMatchLineByLine(e,i,a,s)}static _doFindNextMatchMultiline(e,n,i,s){const r=new U(n.lineNumber,1),a=e.getOffsetAt(r),l=e.getLineCount(),c=e.getValueInRange(new N(r.lineNumber,r.column,l,e.getLineMaxColumn(l)),1),h=e.getEOL()===`\r +`?new Or(c):null;i.reset(n.column-1);const d=i.next(c);return d?_t(this._getMultilineMatchRange(e,a,c,h,d.index,d[0]),d,s):n.lineNumber!==1||n.column!==1?this._doFindNextMatchMultiline(e,new U(1,1),i,s):null}static _doFindNextMatchLineByLine(e,n,i,s){const r=e.getLineCount(),a=n.lineNumber,l=e.getLineContent(a),c=this._findFirstMatchInLine(i,l,a,n.column,s);if(c)return c;for(let h=1;h<=r;h++){const d=(a+h-1)%r,f=e.getLineContent(d+1),m=this._findFirstMatchInLine(i,f,d+1,1,s);if(m)return m}return null}static _findFirstMatchInLine(e,n,i,s,r){e.reset(s-1);const a=e.next(n);return a?_t(new N(i,a.index+1,i,a.index+1+a[0].length),a,r):null}static findPreviousMatch(e,n,i,s){const r=n.parseSearchRequest();if(!r)return null;const a=new yt(r.wordSeparators,r.regex);return r.regex.multiline?this._doFindPreviousMatchMultiline(e,i,a,s):this._doFindPreviousMatchLineByLine(e,i,a,s)}static _doFindPreviousMatchMultiline(e,n,i,s){const r=this._doFindMatchesMultiline(e,new N(1,1,n.lineNumber,n.column),i,s,10*bu);if(r.length>0)return r[r.length-1];const a=e.getLineCount();return n.lineNumber!==a||n.column!==e.getLineMaxColumn(a)?this._doFindPreviousMatchMultiline(e,new U(a,e.getLineMaxColumn(a)),i,s):null}static _doFindPreviousMatchLineByLine(e,n,i,s){const r=e.getLineCount(),a=n.lineNumber,l=e.getLineContent(a).substring(0,n.column-1),c=this._findLastMatchInLine(i,l,a,s);if(c)return c;for(let h=1;h<=r;h++){const d=(r+a-h-1)%r,f=e.getLineContent(d+1),m=this._findLastMatchInLine(i,f,d+1,s);if(m)return m}return null}static _findLastMatchInLine(e,n,i,s){let r=null,a;for(e.reset(0);a=e.next(n);)r=_t(new N(i,a.index+1,i,a.index+1+a[0].length),a,s);return r}}function yu(t,e,n,i,s){if(i===0)return!0;const r=e.charCodeAt(i-1);if(t.get(r)!==0||r===13||r===10)return!0;if(s>0){const a=e.charCodeAt(i);if(t.get(a)!==0)return!0}return!1}function Lu(t,e,n,i,s){if(i+s===n)return!0;const r=e.charCodeAt(i+s);if(t.get(r)!==0||r===13||r===10)return!0;if(s>0){const a=e.charCodeAt(i+s-1);if(t.get(a)!==0)return!0}return!1}function $i(t,e,n,i,s){return yu(t,e,n,i,s)&&Lu(t,e,n,i,s)}class yt{constructor(e,n){this._wordSeparators=e,this._searchRegex=n,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const n=e.length;let i;do{if(this._prevMatchStartIndex+this._prevMatchLength===n||(i=this._searchRegex.exec(e),!i))return null;const s=i.index,r=i[0].length;if(s===this._prevMatchStartIndex&&r===this._prevMatchLength){if(r===0){Ri(e,n,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=s,this._prevMatchLength=r,!this._wordSeparators||$i(this._wordSeparators,e,n,s,r))return i}while(i);return null}}class zr{static computeUnicodeHighlights(e,n,i){const s=i?i.startLineNumber:1,r=i?i.endLineNumber:e.getLineCount(),a=new Hr(n),l=a.getCandidateCodePoints();let c;l==="allNonBasicAscii"?c=new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):c=new RegExp(`${vu(Array.from(l))}`,"g");const h=new yt(null,c),d=[];let f=!1,m,b=0,p=0,g=0;e:for(let _=s,x=r;_<=x;_++){const S=e.getLineContent(_),v=S.length;h.reset(0);do if(m=h.next(S),m){let k=m.index,D=m.index+m[0].length;if(k>0){const R=S.charCodeAt(k-1);ft(R)&&k--}if(D+1=1e3){f=!0;break e}d.push(new N(_,k+1,_,D+1))}}while(m)}return{ranges:d,hasMore:f,ambiguousCharacterCount:b,invisibleCharacterCount:p,nonBasicAsciiCharacterCount:g}}static computeUnicodeHighlightReason(e,n){const i=new Hr(n);switch(i.shouldHighlightNonBasicASCII(e,null)){case 0:return null;case 2:return{kind:1};case 3:{const r=e.codePointAt(0),a=i.ambiguousCharacters.getPrimaryConfusable(r),l=Vt.getLocales().filter(c=>!Vt.getInstance(new Set([...n.allowedLocales,c])).isAmbiguous(r));return{kind:0,confusableWith:String.fromCodePoint(a),notAmbiguousInLocales:l}}case 1:return{kind:2}}}}function vu(t,e){return`[${vi(t.map(i=>String.fromCodePoint(i)).join(""))}]`}class Hr{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=Vt.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const e=new Set;if(this.options.invisibleCharacters)for(const n of mt.codePoints)jr(String.fromCodePoint(n))||e.add(n);if(this.options.ambiguousCharacters)for(const n of this.ambiguousCharacters.getConfusableCodePoints())e.add(n);for(const n of this.allowedCodePoints)e.delete(n);return e}shouldHighlightNonBasicASCII(e,n){const i=e.codePointAt(0);if(this.allowedCodePoints.has(i))return 0;if(this.options.nonBasicASCII)return 1;let s=!1,r=!1;if(n)for(const a of n){const l=a.codePointAt(0),c=dr(a);s=s||c,!c&&!this.ambiguousCharacters.isAmbiguous(l)&&!mt.isInvisibleCharacter(l)&&(r=!0)}return!s&&r?0:this.options.invisibleCharacters&&!jr(e)&&mt.isInvisibleCharacter(i)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(i)?3:0}}function jr(t){return t===" "||t===` +`||t===" "}class Ot{constructor(e,n,i){this.changes=e,this.moves=n,this.hitTimeout=i}}class Oi{constructor(e,n){this.lineRangeMapping=e,this.changes=n}}class I{static fromTo(e,n){return new I(e,n)}static addRange(e,n){let i=0;for(;in))return new I(e,n)}static ofLength(e){return new I(0,e)}static ofStartAndLength(e,n){return new I(e,e+n)}static emptyAt(e){return new I(e,e)}constructor(e,n){if(this.start=e,this.endExclusive=n,e>n)throw new G(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new I(this.start+e,this.endExclusive+e)}deltaStart(e){return new I(this.start+e,this.endExclusive)}deltaEnd(e){return new I(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(e){return this.start===e.start&&this.endExclusive===e.endExclusive}containsRange(e){return this.start<=e.start&&e.endExclusive<=this.endExclusive}contains(e){return this.start<=e&&e=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}substring(e){return e.substring(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new G(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new G(`Invalid clipping range: ${this.toString()}`);return e=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let n=this.start;ne.toString()).join(", ")}intersectsStrict(e){let n=0;for(;ne+n.length,0)}}function xu(t,e,n=t.length-1){const i=Su(t,e,n);if(i!==-1)return t[i]}function Su(t,e,n=t.length-1){for(let i=n;i>=0;i--){const s=t[i];if(e(s,i))return i}return-1}function Lt(t,e){const n=vt(t,e);return n===-1?void 0:t[n]}function vt(t,e,n=0,i=t.length){let s=n,r=i;for(;s0&&(n=s)}return n}function Cu(t,e){if(t.length===0)return;let n=t[0];for(let i=1;i=0&&(n=s)}return n}function Ru(t,e){return Gr(t,(n,i)=>-e(n,i))}function Au(t,e){if(t.length===0)return-1;let n=0;for(let i=1;i0&&(n=i)}return n}function Eu(t,e){for(const n of t){const i=e(n);if(i!==void 0)return i}}const me=class me{static ofLength(e,n){return new me(e,e+n)}static fromRange(e){return new me(e.startLineNumber,e.endLineNumber)}static fromRangeInclusive(e){return new me(e.startLineNumber,e.endLineNumber+1)}static joinMany(e){if(e.length===0)return[];let n=new ye(e[0].slice());for(let i=1;in)throw new G(`startLineNumber ${e} cannot be after endLineNumberExclusive ${n}`);this.startLineNumber=e,this.endLineNumberExclusive=n}contains(e){return this.startLineNumber<=e&&ee.startLineNumber,Oe);let H=me;class ye{constructor(e=[]){this._normalizedRanges=e}get ranges(){return this._normalizedRanges}addRange(e){if(e.length===0)return;const n=En(this._normalizedRanges,s=>s.endLineNumberExclusive>=e.startLineNumber),i=vt(this._normalizedRanges,s=>s.startLineNumber<=e.endLineNumberExclusive)+1;if(n===i)this._normalizedRanges.splice(n,0,e);else if(n===i-1){const s=this._normalizedRanges[n];this._normalizedRanges[n]=s.join(e)}else{const s=this._normalizedRanges[n].join(this._normalizedRanges[i-1]).join(e);this._normalizedRanges.splice(n,i-n,s)}}contains(e){const n=Lt(this._normalizedRanges,i=>i.startLineNumber<=e);return!!n&&n.endLineNumberExclusive>e}intersects(e){const n=Lt(this._normalizedRanges,i=>i.startLineNumbere.startLineNumber}getUnion(e){if(this._normalizedRanges.length===0)return e;if(e._normalizedRanges.length===0)return this;const n=[];let i=0,s=0,r=null;for(;i=a.startLineNumber?r=new H(r.startLineNumber,Math.max(r.endLineNumberExclusive,a.endLineNumberExclusive)):(n.push(r),r=a)}return r!==null&&n.push(r),new ye(n)}subtractFrom(e){const n=En(this._normalizedRanges,a=>a.endLineNumberExclusive>=e.startLineNumber),i=vt(this._normalizedRanges,a=>a.startLineNumber<=e.endLineNumberExclusive)+1;if(n===i)return new ye([e]);const s=[];let r=e.startLineNumber;for(let a=n;ar&&s.push(new H(r,l.startLineNumber)),r=l.endLineNumberExclusive}return re.toString()).join(", ")}getIntersection(e){const n=[];let i=0,s=0;for(;in.delta(e)))}}const Le=class Le{static betweenPositions(e,n){return e.lineNumber===n.lineNumber?new Le(0,n.column-e.column):new Le(n.lineNumber-e.lineNumber,n.column-1)}static fromPosition(e){return new Le(e.lineNumber-1,e.column-1)}static ofRange(e){return Le.betweenPositions(e.getStartPosition(),e.getEndPosition())}static ofText(e){let n=0,i=0;for(const s of e)s===` +`?(n++,i=0):i++;return new Le(n,i)}constructor(e,n){this.lineCount=e,this.columnCount=n}isGreaterThanOrEqualTo(e){return this.lineCount!==e.lineCount?this.lineCount>e.lineCount:this.columnCount>=e.columnCount}add(e){return e.lineCount===0?new Le(this.lineCount,this.columnCount+e.columnCount):new Le(this.lineCount+e.lineCount,e.columnCount)}createRange(e){return this.lineCount===0?new N(e.lineNumber,e.column,e.lineNumber,e.column+this.columnCount):new N(e.lineNumber,e.column,e.lineNumber+this.lineCount,this.columnCount+1)}toRange(){return new N(1,1,this.lineCount+1,this.columnCount+1)}toLineRange(){return H.ofLength(1,this.lineCount+1)}addToPosition(e){return this.lineCount===0?new U(e.lineNumber,e.column+this.columnCount):new U(e.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}};Le.zero=new Le(0,0);let Fe=Le;class Qr{getOffsetRange(e){return new I(this.getOffset(e.getStartPosition()),this.getOffset(e.getEndPosition()))}getRange(e){return N.fromPositions(this.getPosition(e.start),this.getPosition(e.endExclusive))}getStringReplacement(e){return new Xe.deps.StringReplacement(this.getOffsetRange(e.range),e.text)}getTextReplacement(e){return new Xe.deps.TextReplacement(this.getRange(e.replaceRange),e.newText)}getTextEdit(e){const n=e.replacements.map(i=>this.getTextReplacement(i));return new Xe.deps.TextEdit(n)}}const rs=class rs{static get deps(){if(!this._deps)throw new Error("Dependencies not set. Call _setDependencies first.");return this._deps}};rs._deps=void 0;let Xe=rs;function Mu(t){Xe._deps=t}class Hi extends Qr{constructor(e){super(),this.text=e}get lineStartOffsetByLineIdx(){return this._lineStartOffsetByLineIdx||this._computeLineOffsets(),this._lineStartOffsetByLineIdx}get lineEndOffsetByLineIdx(){return this._lineEndOffsetByLineIdx||this._computeLineOffsets(),this._lineEndOffsetByLineIdx}_computeLineOffsets(){this._lineStartOffsetByLineIdx=[],this._lineEndOffsetByLineIdx=[],this._lineStartOffsetByLineIdx.push(0);for(let e=0;e0&&this.text.charAt(e-1)==="\r"?this._lineEndOffsetByLineIdx.push(e-1):this._lineEndOffsetByLineIdx.push(e));this._lineEndOffsetByLineIdx.push(this.text.length)}getOffset(e){const n=this._validatePosition(e);return this.lineStartOffsetByLineIdx[n.lineNumber-1]+n.column-1}_validatePosition(e){if(e.lineNumber<1)return new U(1,1);const n=this.textLength.lineCount+1;if(e.lineNumber>n){const s=this.getLineLength(n);return new U(n,s+1)}if(e.column<1)return new U(e.lineNumber,1);const i=this.getLineLength(e.lineNumber);return e.column-1>i?new U(e.lineNumber,i+1):e}getPosition(e){const n=vt(this.lineStartOffsetByLineIdx,r=>r<=e),i=n+1,s=e-this.lineStartOffsetByLineIdx[n]+1;return new U(i,s)}get textLength(){const e=this.lineStartOffsetByLineIdx.length-1;return new Xe.deps.TextLength(e,this.text.length-this.lineStartOffsetByLineIdx[e])}getLineLength(e){return this.lineEndOffsetByLineIdx[e-1]-this.lineStartOffsetByLineIdx[e-1]}}class ji{constructor(){this._transformer=void 0}get endPositionExclusive(){return this.length.addToPosition(new U(1,1))}get lineRange(){return this.length.toLineRange()}getValue(){return this.getValueOfRange(this.length.toRange())}getValueOfOffsetRange(e){return this.getValueOfRange(this.getTransformer().getRange(e))}getLineLength(e){return this.getValueOfRange(new N(e,1,e,Number.MAX_SAFE_INTEGER)).length}getTransformer(){return this._transformer||(this._transformer=new Hi(this.getValue())),this._transformer}getLineAt(e){return this.getValueOfRange(new N(e,1,e,Number.MAX_SAFE_INTEGER))}}class ku extends ji{constructor(e,n){jn(n>=1),super(),this._getLineContent=e,this._lineCount=n}getValueOfRange(e){if(e.startLineNumber===e.endLineNumber)return this._getLineContent(e.startLineNumber).substring(e.startColumn-1,e.endColumn-1);let n=this._getLineContent(e.startLineNumber).substring(e.startColumn-1);for(let i=e.startLineNumber+1;ie[n-1],e.length)}}class zt extends ji{constructor(e){super(),this.value=e,this._t=new Hi(this.value)}getValueOfRange(e){return this._t.getOffsetRange(e).substring(this.value)}get length(){return this._t.textLength}getTransformer(){return this._t}}class Ht{static fromStringEdit(e,n){const i=e.replacements.map(s=>ge.fromStringReplacement(s,n));return new Ht(i)}static fromParallelReplacementsUnsorted(e){const n=e.slice().sort($e(i=>i.range,N.compareRangesUsingStarts));return new Ht(n)}constructor(e){this.replacements=e,rt(()=>rn(e,(n,i)=>n.range.getEndPosition().isBeforeOrEqual(i.range.getStartPosition())))}mapPosition(e){let n=0,i=0,s=0;for(const r of this.replacements){const a=r.range.getStartPosition();if(e.isBeforeOrEqual(a))break;const l=r.range.getEndPosition(),c=Fe.ofText(r.text);if(e.isBefore(l)){const h=new U(a.lineNumber+n,a.column+(a.lineNumber+n===i?s:0)),d=c.addToPosition(h);return Tn(h,d)}a.lineNumber+n!==i&&(s=0),n+=c.lineCount-(r.range.endLineNumber-r.range.startLineNumber),c.lineCount===0?l.lineNumber!==a.lineNumber?s+=c.columnCount-(l.column-1):s+=c.columnCount-(l.column-a.column):s=c.columnCount,i=l.lineNumber+n}return new U(e.lineNumber+n,e.column+(e.lineNumber+n===i?s:0))}mapRange(e){function n(a){return a instanceof U?a:a.getStartPosition()}function i(a){return a instanceof U?a:a.getEndPosition()}const s=n(this.mapPosition(e.getStartPosition())),r=i(this.mapPosition(e.getEndPosition()));return Tn(s,r)}apply(e){let n="",i=new U(1,1);for(const r of this.replacements){const a=r.range,l=a.getStartPosition(),c=a.getEndPosition(),h=Tn(i,l);h.isEmpty()||(n+=e.getValueOfRange(h)),n+=r.text,i=c}const s=Tn(i,e.endPositionExclusive);return s.isEmpty()||(n+=e.getValueOfRange(s)),n}applyToString(e){const n=new zt(e);return this.apply(n)}getNewRanges(){const e=[];let n=0,i=0,s=0;for(const r of this.replacements){const a=Fe.ofText(r.text),l=U.lift({lineNumber:r.range.startLineNumber+i,column:r.range.startColumn+(r.range.startLineNumber===n?s:0)}),c=a.createRange(l);e.push(c),i=c.endLineNumber-r.range.endLineNumber,s=c.endColumn-r.range.endColumn,n=r.range.endLineNumber}return e}toReplacement(e){if(this.replacements.length===0)throw new G;if(this.replacements.length===1)return this.replacements[0];const n=this.replacements[0].range.getStartPosition(),i=this.replacements[this.replacements.length-1].range.getEndPosition();let s="";for(let r=0;rn.toString()).join(` +`):typeof e=="string"?this.toString(new zt(e)):this.replacements.length===0?"":this.replacements.map(n=>{const s=e.getValueOfRange(n.range),r=N.fromPositions(new U(Math.max(1,n.range.startLineNumber-1),1),n.range.getStartPosition());let a=e.getValueOfRange(r);a.length>10&&(a="..."+a.substring(a.length-10));const l=N.fromPositions(n.range.getEndPosition(),new U(n.range.endLineNumber+1,1));let c=e.getValueOfRange(l);c.length>10&&(c=c.substring(0,10)+"...");let h=s;if(h.length>10){const f=Math.floor(5);h=h.substring(0,f)+"..."+h.substring(h.length-f)}let d=n.text;if(d.length>10){const f=Math.floor(5);d=d.substring(0,f)+"..."+d.substring(d.length-f)}return h.length===0?`${a}❰${d}❱${c}`:`${a}❰${h}↦${d}❱${c}`}).join(` +`)}}class ge{static joinReplacements(e,n){if(e.length===0)throw new G;if(e.length===1)return e[0];const i=e[0].range.getStartPosition(),s=e[e.length-1].range.getEndPosition();let r="";for(let a=0;a ${n.lineNumber},${n.column}): "${this.text}"`}}function Tn(t,e){if(t.lineNumber===e.lineNumber&&t.column===Number.MAX_SAFE_INTEGER)return N.fromPositions(e,e);if(!t.isBeforeOrEqual(e))throw new G("start must be before end");return new N(t.lineNumber,t.column,e.lineNumber,e.column)}class he{static inverse(e,n,i){const s=[];let r=1,a=1;for(const c of e){const h=new he(new H(r,c.original.startLineNumber),new H(a,c.modified.startLineNumber));h.modified.isEmpty||s.push(h),r=c.original.endLineNumberExclusive,a=c.modified.endLineNumberExclusive}const l=new he(new H(r,n+1),new H(a,i+1));return l.modified.isEmpty||s.push(l),s}static clip(e,n,i){const s=[];for(const r of e){const a=r.original.intersect(n),l=r.modified.intersect(i);a&&!a.isEmpty&&l&&!l.isEmpty&&s.push(new he(a,l))}return s}constructor(e,n){this.original=e,this.modified=n}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new he(this.modified,this.original)}join(e){return new he(this.original.join(e.original),this.modified.join(e.modified))}toRangeMapping(){const e=this.original.toInclusiveRange(),n=this.modified.toInclusiveRange();if(e&&n)return new fe(e,n);if(this.original.startLineNumber===1||this.modified.startLineNumber===1){if(!(this.modified.startLineNumber===1&&this.original.startLineNumber===1))throw new G("not a valid diff");return new fe(new N(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new N(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}else return new fe(new N(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new N(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(e,n){if(Xr(this.original.endLineNumberExclusive,e)&&Xr(this.modified.endLineNumberExclusive,n))return new fe(new N(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new N(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new fe(N.fromPositions(new U(this.original.startLineNumber,1),xt(new U(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),N.fromPositions(new U(this.modified.startLineNumber,1),xt(new U(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new fe(N.fromPositions(xt(new U(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),e),xt(new U(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),N.fromPositions(xt(new U(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),n),xt(new U(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));throw new G}}function xt(t,e){if(t.lineNumber<1)return new U(1,1);if(t.lineNumber>e.length)return new U(e.length,e[e.length-1].length+1);const n=e[t.lineNumber-1];return t.column>n.length+1?new U(t.lineNumber,n.length+1):t}function Xr(t,e){return t>=1&&t<=e.length}class Se extends he{static fromRangeMappings(e){const n=H.join(e.map(s=>H.fromRangeInclusive(s.originalRange))),i=H.join(e.map(s=>H.fromRangeInclusive(s.modifiedRange)));return new Se(n,i,e)}constructor(e,n,i){super(e,n),this.innerChanges=i}flip(){return new Se(this.modified,this.original,this.innerChanges?.map(e=>e.flip()))}withInnerChangesFromLineRanges(){return new Se(this.original,this.modified,[this.toRangeMapping()])}}class fe{static fromEdit(e){const n=e.getNewRanges();return e.replacements.map((s,r)=>new fe(s.range,n[r]))}static assertSorted(e){for(let n=1;n${this.modifiedRange.toString()}}`}flip(){return new fe(this.modifiedRange,this.originalRange)}toTextEdit(e){const n=e.getValueOfRange(this.modifiedRange);return new ge(this.originalRange,n)}}function Pn(t,e,n,i=!1){const s=[];for(const r of ls(t.map(a=>Tu(a,e,n)),(a,l)=>a.original.intersectsOrTouches(l.original)||a.modified.intersectsOrTouches(l.modified))){const a=r[0],l=r[r.length-1];s.push(new Se(a.original.join(l.original),a.modified.join(l.modified),r.map(c=>c.innerChanges[0])))}return rt(()=>!i&&s.length>0&&(s[0].modified.startLineNumber!==s[0].original.startLineNumber||n.length.lineCount-s[s.length-1].modified.endLineNumberExclusive!==e.length.lineCount-s[s.length-1].original.endLineNumberExclusive)?!1:rn(s,(r,a)=>a.original.startLineNumber-r.original.endLineNumberExclusive===a.modified.startLineNumber-r.modified.endLineNumberExclusive&&r.original.endLineNumberExclusive=n.getLineLength(t.modifiedRange.startLineNumber)&&t.originalRange.startColumn-1>=e.getLineLength(t.originalRange.startLineNumber)&&t.originalRange.startLineNumber<=t.originalRange.endLineNumber+s&&t.modifiedRange.startLineNumber<=t.modifiedRange.endLineNumber+s&&(i=1);const r=new H(t.originalRange.startLineNumber+i,t.originalRange.endLineNumber+1+s),a=new H(t.modifiedRange.startLineNumber+i,t.modifiedRange.endLineNumber+1+s);return new Se(r,a,[t])}const Pu=3;class Iu{computeDiff(e,n,i){const r=new Bu(e,n,{maxComputationTime:i.maxComputationTimeMs,shouldIgnoreTrimWhitespace:i.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),a=[];let l=null;for(const c of r.changes){let h;c.originalEndLineNumber===0?h=new H(c.originalStartLineNumber+1,c.originalStartLineNumber+1):h=new H(c.originalStartLineNumber,c.originalEndLineNumber+1);let d;c.modifiedEndLineNumber===0?d=new H(c.modifiedStartLineNumber+1,c.modifiedStartLineNumber+1):d=new H(c.modifiedStartLineNumber,c.modifiedEndLineNumber+1);let f=new Se(h,d,c.charChanges?.map(m=>new fe(new N(m.originalStartLineNumber,m.originalStartColumn,m.originalEndLineNumber,m.originalEndColumn),new N(m.modifiedStartLineNumber,m.modifiedStartColumn,m.modifiedEndLineNumber,m.modifiedEndColumn))));l&&(l.modified.endLineNumberExclusive===f.modified.startLineNumber||l.original.endLineNumberExclusive===f.original.startLineNumber)&&(f=new Se(l.original.join(f.original),l.modified.join(f.modified),l.innerChanges&&f.innerChanges?l.innerChanges.concat(f.innerChanges):void 0),a.pop()),a.push(f),l=f}return rt(()=>rn(a,(c,h)=>h.original.startLineNumber-c.original.endLineNumberExclusive===h.modified.startLineNumber-c.modified.endLineNumberExclusive&&c.original.endLineNumberExclusive(e===10?"\\n":String.fromCharCode(e))+`-(${this._lineNumbers[n]},${this._columns[n]})`).join(", ")+"]"}_assertIndex(e,n){if(e<0||e>=n.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(e){return e>0&&e===this._lineNumbers.length?this.getEndLineNumber(e-1):(this._assertIndex(e,this._lineNumbers),this._lineNumbers[e])}getEndLineNumber(e){return e===-1?this.getStartLineNumber(e+1):(this._assertIndex(e,this._lineNumbers),this._charCodes[e]===10?this._lineNumbers[e]+1:this._lineNumbers[e])}getStartColumn(e){return e>0&&e===this._columns.length?this.getEndColumn(e-1):(this._assertIndex(e,this._columns),this._columns[e])}getEndColumn(e){return e===-1?this.getStartColumn(e+1):(this._assertIndex(e,this._columns),this._charCodes[e]===10?1:this._columns[e]+1)}}class St{constructor(e,n,i,s,r,a,l,c){this.originalStartLineNumber=e,this.originalStartColumn=n,this.originalEndLineNumber=i,this.originalEndColumn=s,this.modifiedStartLineNumber=r,this.modifiedStartColumn=a,this.modifiedEndLineNumber=l,this.modifiedEndColumn=c}static createFromDiffChange(e,n,i){const s=n.getStartLineNumber(e.originalStart),r=n.getStartColumn(e.originalStart),a=n.getEndLineNumber(e.originalStart+e.originalLength-1),l=n.getEndColumn(e.originalStart+e.originalLength-1),c=i.getStartLineNumber(e.modifiedStart),h=i.getStartColumn(e.modifiedStart),d=i.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),f=i.getEndColumn(e.modifiedStart+e.modifiedLength-1);return new St(s,r,a,l,c,h,d,f)}}function Du(t){if(t.length<=1)return t;const e=[t[0]];let n=e[0];for(let i=1,s=t.length;i0&&n.originalLength<20&&n.modifiedLength>0&&n.modifiedLength<20&&r()){const b=i.createCharSequence(e,n.originalStart,n.originalStart+n.originalLength-1),p=s.createCharSequence(e,n.modifiedStart,n.modifiedStart+n.modifiedLength-1);if(b.getElements().length>0&&p.getElements().length>0){let g=Yr(b,p,r,!0).changes;l&&(g=Du(g)),m=[];for(let _=0,x=g.length;_1&&g>1;){const _=m.charCodeAt(p-2),x=b.charCodeAt(g-2);if(_!==x)break;p--,g--}(p>1||g>1)&&this._pushTrimWhitespaceCharChange(s,r+1,1,p,a+1,1,g)}{let p=Qi(m,1),g=Qi(b,1);const _=m.length+1,x=b.length+1;for(;p<_&&g!0;const e=Date.now();return()=>Date.now()-e{i.push(J.fromOffsetPairs(s?s.getEndExclusives():Be.zero,r?r.getStarts():new Be(n,(s?s.seq2Range.endExclusive-s.seq1Range.endExclusive:0)+n)))}),i}static fromOffsetPairs(e,n){return new J(new I(e.offset1,n.offset1),new I(e.offset2,n.offset2))}static assertSorted(e){let n;for(const i of e){if(n&&!(n.seq1Range.endExclusive<=i.seq1Range.start&&n.seq2Range.endExclusive<=i.seq2Range.start))throw new G("Sequence diffs must be sorted");n=i}}constructor(e,n){this.seq1Range=e,this.seq2Range=n}swap(){return new J(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(e){return new J(this.seq1Range.join(e.seq1Range),this.seq2Range.join(e.seq2Range))}delta(e){return e===0?this:new J(this.seq1Range.delta(e),this.seq2Range.delta(e))}deltaStart(e){return e===0?this:new J(this.seq1Range.deltaStart(e),this.seq2Range.deltaStart(e))}deltaEnd(e){return e===0?this:new J(this.seq1Range.deltaEnd(e),this.seq2Range.deltaEnd(e))}intersect(e){const n=this.seq1Range.intersect(e.seq1Range),i=this.seq2Range.intersect(e.seq2Range);if(!(!n||!i))return new J(n,i)}getStarts(){return new Be(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new Be(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}}const et=class et{constructor(e,n){this.offset1=e,this.offset2=n}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(e){return e===0?this:new et(this.offset1+e,this.offset2+e)}equals(e){return this.offset1===e.offset1&&this.offset2===e.offset2}};et.zero=new et(0,0),et.max=new et(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER);let Be=et;const Wn=class Wn{isValid(){return!0}};Wn.instance=new Wn;let Gt=Wn;class Vu{constructor(e){if(this.timeout=e,this.startTime=Date.now(),this.valid=!0,e<=0)throw new G("timeout must be positive")}isValid(){return!(Date.now()-this.startTime0&&g>0&&a.get(p-1,g-1)===3&&(S+=l.get(p-1,g-1)),S+=s?s(p,g):1):S=-1;const v=Math.max(_,x,S);if(v===S){const k=p>0&&g>0?l.get(p-1,g-1):0;l.set(p,g,k+1),a.set(p,g,3)}else v===_?(l.set(p,g,0),a.set(p,g,1)):v===x&&(l.set(p,g,0),a.set(p,g,2));r.set(p,g,v)}const c=[];let h=e.length,d=n.length;function f(p,g){(p+1!==h||g+1!==d)&&c.push(new J(new I(p+1,h),new I(g+1,d))),h=p,d=g}let m=e.length-1,b=n.length-1;for(;m>=0&&b>=0;)a.get(m,b)===3?(f(m,b),m--,b--):a.get(m,b)===1?m--:b--;return f(-1,-1),c.reverse(),new De(c,!1)}}class Kr{compute(e,n,i=Gt.instance){if(e.length===0||n.length===0)return De.trivial(e,n);const s=e,r=n;function a(g,_){for(;gs.length||k>r.length)continue;const D=a(v,k);c.set(d,D);const O=v===x?h.get(d+1):h.get(d-1);if(h.set(d,D!==v?new e1(O,v,k,D-v):O),c.get(d)===s.length&&c.get(d)-d===r.length)break e}}let f=h.get(d);const m=[];let b=s.length,p=r.length;for(;;){const g=f?f.x+f.length:0,_=f?f.y+f.length:0;if((g!==b||_!==p)&&m.push(new J(new I(g,b),new I(_,p))),!f)break;b=f.x,p=f.y,f=f.prev}return m.reverse(),new De(m,!1)}}class e1{constructor(e,n,i,s){this.prev=e,this.x=n,this.y=i,this.length=s}}class Uu{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,n){if(e<0){if(e=-e-1,e>=this.negativeArr.length){const i=this.negativeArr;this.negativeArr=new Int32Array(i.length*2),this.negativeArr.set(i)}this.negativeArr[e]=n}else{if(e>=this.positiveArr.length){const i=this.positiveArr;this.positiveArr=new Int32Array(i.length*2),this.positiveArr.set(i)}this.positiveArr[e]=n}}}class Wu{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,n){e<0?(e=-e-1,this.negativeArr[e]=n):this.positiveArr[e]=n}}class Fn{constructor(e,n,i){this.lines=e,this.range=n,this.considerWhitespaceChanges=i,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let s=this.range.startLineNumber;s<=this.range.endLineNumber;s++){let r=e[s-1],a=0;s===this.range.startLineNumber&&this.range.startColumn>1&&(a=this.range.startColumn-1,r=r.substring(a)),this.lineStartOffsets.push(a);let l=0;if(!i){const h=r.trimStart();l=r.length-h.length,r=h.trimEnd()}this.trimmedWsLengthsByLineIdx.push(l);const c=s===this.range.endLineNumber?Math.min(this.range.endColumn-1-a-l,r.length):r.length;for(let h=0;hString.fromCharCode(n)).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){const n=i1(e>0?this.elements[e-1]:-1),i=i1(er<=e),s=e-this.firstElementOffsetByLineIdx[i];return new U(this.range.startLineNumber+i,1+this.lineStartOffsets[i]+s+(s===0&&n==="left"?0:this.trimmedWsLengthsByLineIdx[i]))}translateRange(e){const n=this.translateOffset(e.start,"right"),i=this.translateOffset(e.endExclusive,"left");return i.isBefore(n)?N.fromPositions(i,i):N.fromPositions(n,i)}findWordContaining(e){if(e<0||e>=this.elements.length||!Nt(this.elements[e]))return;let n=e;for(;n>0&&Nt(this.elements[n-1]);)n--;let i=e;for(;i=this.elements.length||!Nt(this.elements[e]))return;let n=e;for(;n>0&&Nt(this.elements[n-1])&&!t1(this.elements[n]);)n--;let i=e;for(;is<=e.start)??0,i=Nu(this.firstElementOffsetByLineIdx,s=>e.endExclusive<=s)??this.elements.length;return new I(n,i)}}function Nt(t){return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57}function t1(t){return t>=65&&t<=90}const $u={0:0,1:0,2:0,3:10,4:2,5:30,6:3,7:10,8:10};function n1(t){return $u[t]}function i1(t){return t===10?8:t===13?7:Yi(t)?6:t>=97&&t<=122?0:t>=65&&t<=90?1:t>=48&&t<=57?2:t===-1?3:t===44||t===59?5:4}function Ou(t,e,n,i,s,r){let{moves:a,excludedChanges:l}=Hu(t,e,n,r);if(!r.isValid())return[];const c=t.filter(d=>!l.has(d)),h=ju(c,i,s,e,n,r);return hs(a,h),a=Gu(a),a=a.filter(d=>{const f=d.original.toOffsetRange().slice(e).map(b=>b.trim());return f.join(` +`).length>=15&&zu(f,b=>b.length>=2)>=2}),a=Qu(t,a),a}function zu(t,e){let n=0;for(const i of t)e(i)&&n++;return n}function Hu(t,e,n,i){const s=[],r=t.filter(c=>c.modified.isEmpty&&c.original.length>=3).map(c=>new In(c.original,e,c)),a=new Set(t.filter(c=>c.original.isEmpty&&c.modified.length>=3).map(c=>new In(c.modified,n,c))),l=new Set;for(const c of r){let h=-1,d;for(const f of a){const m=c.computeSimilarity(f);m>h&&(h=m,d=f)}if(h>.9&&d&&(a.delete(d),s.push(new he(c.range,d.range)),l.add(c.source),l.add(d.source)),!i.isValid())return{moves:s,excludedChanges:l}}return{moves:s,excludedChanges:l}}function ju(t,e,n,i,s,r){const a=[],l=new Tr;for(const m of t)for(let b=m.original.startLineNumber;bm.modified.startLineNumber,Oe));for(const m of t){let b=[];for(let p=m.modified.startLineNumber;p{for(const k of b)if(k.originalLineRange.endLineNumberExclusive+1===S.endLineNumberExclusive&&k.modifiedLineRange.endLineNumberExclusive+1===_.endLineNumberExclusive){k.originalLineRange=new H(k.originalLineRange.startLineNumber,S.endLineNumberExclusive),k.modifiedLineRange=new H(k.modifiedLineRange.startLineNumber,_.endLineNumberExclusive),x.push(k);return}const v={modifiedLineRange:_,originalLineRange:S};c.push(v),x.push(v)}),b=x}if(!r.isValid())return[]}c.sort(ds($e(m=>m.modifiedLineRange.length,Oe)));const h=new ye,d=new ye;for(const m of c){const b=m.modifiedLineRange.startLineNumber-m.originalLineRange.startLineNumber,p=h.subtractFrom(m.modifiedLineRange),g=d.subtractFrom(m.originalLineRange).getWithDelta(b),_=p.getIntersection(g);for(const x of _.ranges){if(x.length<3)continue;const S=x,v=x.delta(-b);a.push(new he(v,S)),h.addRange(S),d.addRange(v)}}a.sort($e(m=>m.original.startLineNumber,Oe));const f=new Mn(t);for(let m=0;mO.original.startLineNumber<=b.original.startLineNumber),g=Lt(t,O=>O.modified.startLineNumber<=b.modified.startLineNumber),_=Math.max(b.original.startLineNumber-p.original.startLineNumber,b.modified.startLineNumber-g.modified.startLineNumber),x=f.findLastMonotonous(O=>O.original.startLineNumberO.modified.startLineNumberi.length||y>s.length||h.contains(y)||d.contains(O)||!s1(i[O-1],s[y-1],r))break}k>0&&(d.addRange(new H(b.original.startLineNumber-k,b.original.startLineNumber)),h.addRange(new H(b.modified.startLineNumber-k,b.modified.startLineNumber)));let D;for(D=0;Di.length||y>s.length||h.contains(y)||d.contains(O)||!s1(i[O-1],s[y-1],r))break}D>0&&(d.addRange(new H(b.original.endLineNumberExclusive,b.original.endLineNumberExclusive+D)),h.addRange(new H(b.modified.endLineNumberExclusive,b.modified.endLineNumberExclusive+D))),(k>0||D>0)&&(a[m]=new he(new H(b.original.startLineNumber-k,b.original.endLineNumberExclusive+D),new H(b.modified.startLineNumber-k,b.modified.endLineNumberExclusive+D)))}return a}function s1(t,e,n){if(t.trim()===e.trim())return!0;if(t.length>300&&e.length>300)return!1;const s=new Kr().compute(new Fn([t],new N(1,1,1,t.length),!1),new Fn([e],new N(1,1,1,e.length),!1),n);let r=0;const a=J.invert(s.diffs,t.length);for(const d of a)d.seq1Range.forEach(f=>{Yi(t.charCodeAt(f))||r++});function l(d){let f=0;for(let m=0;me.length?t:e);return r/c>.6&&c>10}function Gu(t){if(t.length===0)return t;t.sort($e(n=>n.original.startLineNumber,Oe));const e=[t[0]];for(let n=1;n=0&&a>=0&&r+a<=2){e[e.length-1]=i.join(s);continue}e.push(s)}return e}function Qu(t,e){const n=new Mn(t);return e=e.filter(i=>{const s=n.findLastMonotonous(l=>l.original.startLineNumberl.modified.startLineNumber0&&(l=l.delta(h))}s.push(l)}return i.length>0&&s.push(i[i.length-1]),s}function Xu(t,e,n){if(!t.getBoundaryScore||!e.getBoundaryScore)return n;for(let i=0;i0?n[i-1]:void 0,r=n[i],a=i+1=i.start&&t.seq2Range.start-a>=s.start&&n.isStronglyEqual(t.seq2Range.start-a,t.seq2Range.endExclusive-a)&&a<100;)a++;a--;let l=0;for(;t.seq1Range.start+lh&&(h=p,c=d)}return t.delta(c)}function Yu(t,e,n){const i=[];for(const s of n){const r=i[i.length-1];if(!r){i.push(s);continue}s.seq1Range.start-r.seq1Range.endExclusive<=2||s.seq2Range.start-r.seq2Range.endExclusive<=2?i[i.length-1]=new J(r.seq1Range.join(s.seq1Range),r.seq2Range.join(s.seq2Range)):i.push(s)}return i}function l1(t,e,n,i,s=!1){const r=J.invert(n,t.length),a=[];let l=new Be(0,0);function c(d,f){if(d.offset10;){const S=r[0];if(!(S.seq1Range.intersects(p.seq1Range)||S.seq2Range.intersects(p.seq2Range)))break;const k=i(t,S.seq1Range.start),D=i(e,S.seq2Range.start),O=new J(k,D),y=O.intersect(S);if(_+=y.seq1Range.length,x+=y.seq2Range.length,p=p.join(O),p.seq1Range.endExclusive>=S.seq1Range.endExclusive)r.shift();else break}(s&&_+x0;){const d=r.shift();d.seq1Range.isEmpty||(c(d.getStarts(),d),c(d.getEndExclusives().delta(-1),d))}return Ju(n,a)}function Ju(t,e){const n=[];for(;t.length>0||e.length>0;){const i=t[0],s=e[0];let r;i&&(!s||i.seq1Range.start0&&n[n.length-1].seq1Range.endExclusive>=r.seq1Range.start?n[n.length-1]=n[n.length-1].join(r):n.push(r)}return n}function Zu(t,e,n){let i=n;if(i.length===0)return i;let s=0,r;do{r=!1;const a=[i[0]];for(let l=1;l5||b.seq1Range.length+b.seq2Range.length>5)};const c=i[l],h=a[a.length-1];d(h,c)?(r=!0,a[a.length-1]=a[a.length-1].join(c)):a.push(c)}i=a}while(s++<10&&r);return i}function Ku(t,e,n){let i=n;if(i.length===0)return i;let s=0,r;do{r=!1;const l=[i[0]];for(let c=1;c5||g.length>500)return!1;const x=t.getText(g).trim();if(x.length>20||x.split(/\r\n|\r|\n/).length>1)return!1;const S=t.countLinesIn(b.seq1Range),v=b.seq1Range.length,k=e.countLinesIn(b.seq2Range),D=b.seq2Range.length,O=t.countLinesIn(p.seq1Range),y=p.seq1Range.length,L=e.countLinesIn(p.seq2Range),R=p.seq2Range.length,V=130;function W(q){return Math.min(q,V)}return Math.pow(Math.pow(W(S*40+v),1.5)+Math.pow(W(k*40+D),1.5),1.5)+Math.pow(Math.pow(W(O*40+y),1.5)+Math.pow(W(L*40+R),1.5),1.5)>(V**1.5)**1.5*1.3};const h=i[c],d=l[l.length-1];f(d,h)?(r=!0,l[l.length-1]=l[l.length-1].join(h)):l.push(h)}i=l}while(s++<10&&r);const a=[];return S1(i,(l,c,h)=>{let d=c;function f(x){return x.length>0&&x.trim().length<=3&&c.seq1Range.length+c.seq2Range.length>100}const m=t.extendToFullLines(c.seq1Range),b=t.getText(new I(m.start,c.seq1Range.start));f(b)&&(d=d.deltaStart(-b.length));const p=t.getText(new I(c.seq1Range.endExclusive,m.endExclusive));f(p)&&(d=d.deltaEnd(p.length));const g=J.fromOffsetPairs(l?l.getEndExclusives():Be.zero,h?h.getStarts():Be.max),_=d.intersect(g);a.length>0&&_.getStarts().equals(a[a.length-1].getEndExclusives())?a[a.length-1]=a[a.length-1].join(_):a.push(_)}),a}class u1{constructor(e,n){this.trimmedHash=e,this.lines=n}getElement(e){return this.trimmedHash[e]}get length(){return this.trimmedHash.length}getBoundaryScore(e){const n=e===0?0:c1(this.lines[e-1]),i=e===this.lines.length?0:c1(this.lines[e]);return 1e3-(n+i)}getText(e){return this.lines.slice(e.start,e.endExclusive).join(` +`)}isStronglyEqual(e,n){return this.lines[e]===this.lines[n]}}function c1(t){let e=0;for(;ey===L))return new Ot([],[],!1);if(e.length===1&&e[0].length===0||n.length===1&&n[0].length===0)return new Ot([new Se(new H(1,e.length+1),new H(1,n.length+1),[new fe(new N(1,1,e.length,e[e.length-1].length+1),new N(1,1,n.length,n[n.length-1].length+1))])],[],!1);const s=i.maxComputationTimeMs===0?Gt.instance:new Vu(i.maxComputationTimeMs),r=!i.ignoreTrimWhitespace,a=new Map;function l(y){let L=a.get(y);return L===void 0&&(L=a.size,a.set(y,L)),L}const c=e.map(y=>l(y.trim())),h=n.map(y=>l(y.trim())),d=new u1(c,e),f=new u1(h,n),m=d.length+f.length<1700?this.dynamicProgrammingDiffing.compute(d,f,s,(y,L)=>e[y]===n[L]?n[L].length===0?.1:1+Math.log(1+n[L].length):.99):this.myersDiffingAlgorithm.compute(d,f,s);let b=m.diffs,p=m.hitTimeout;b=r1(d,f,b),b=Zu(d,f,b);const g=[],_=y=>{if(r)for(let L=0;Ly.seq1Range.start-x===y.seq2Range.start-S);const L=y.seq1Range.start-x;_(L),x=y.seq1Range.endExclusive,S=y.seq2Range.endExclusive;const R=this.refineDiff(e,n,y,s,r,i);R.hitTimeout&&(p=!0);for(const V of R.mappings)g.push(V)}_(e.length-x);const v=new kn(e),k=new kn(n),D=Pn(g,v,k);let O=[];return i.computeMoves&&(O=this.computeMoves(D,e,n,c,h,s,r,i)),rt(()=>{function y(R,V){if(R.lineNumber<1||R.lineNumber>V.length)return!1;const W=V[R.lineNumber-1];return!(R.column<1||R.column>W.length+1)}function L(R,V){return!(R.startLineNumber<1||R.startLineNumber>V.length+1||R.endLineNumberExclusive<1||R.endLineNumberExclusive>V.length+1)}for(const R of D){if(!R.innerChanges)return!1;for(const V of R.innerChanges)if(!(y(V.modifiedRange.getStartPosition(),n)&&y(V.modifiedRange.getEndPosition(),n)&&y(V.originalRange.getStartPosition(),e)&&y(V.originalRange.getEndPosition(),e)))return!1;if(!L(R.modified,n)||!L(R.original,e))return!1}return!0}),new Ot(D,O,p)}computeMoves(e,n,i,s,r,a,l,c){return Ou(e,n,i,s,r,a).map(f=>{const m=this.refineDiff(n,i,new J(f.original.toOffsetRange(),f.modified.toOffsetRange()),a,l,c),b=Pn(m.mappings,new kn(n),new kn(i),!0);return new Oi(f,b)})}refineDiff(e,n,i,s,r,a){const c=tc(i).toRangeMapping2(e,n),h=new Fn(e,c.originalRange,r),d=new Fn(n,c.modifiedRange,r),f=h.length+d.length<500?this.dynamicProgrammingDiffing.compute(h,d,s):this.myersDiffingAlgorithm.compute(h,d,s);let m=f.diffs;return m=r1(h,d,m),m=l1(h,d,m,(p,g)=>p.findWordContaining(g)),a.extendToSubwords&&(m=l1(h,d,m,(p,g)=>p.findSubWordContaining(g),!0)),m=Yu(h,d,m),m=Ku(h,d,m),{mappings:m.map(p=>new fe(h.translateRange(p.seq1Range),d.translateRange(p.seq2Range))),hitTimeout:f.hitTimeout}}}function tc(t){return new he(new H(t.seq1Range.start+1,t.seq1Range.endExclusive+1),new H(t.seq2Range.start+1,t.seq2Range.endExclusive+1))}function nc(t,e){(globalThis._VSCODE_PRODUCT_JSON??globalThis.vscode?.context?.configuration()?.product)?.commit;const i=`${t}/${e}`,r=`${kl}/${i}`;return Nr.asBrowserUri(r).toString(!0)}class ic{constructor(e){this.replacements=e;let n=-1;for(const i of e){if(!(i.replaceRange.start>=n))throw new G(`Edits must be disjoint and sorted. Found ${i} after ${n}`);n=i.replaceRange.endExclusive}}toString(){return`[${this.replacements.map(n=>n.toString()).join(", ")}]`}normalize(){const e=[];let n;for(const i of this.replacements)if(!(i.getNewLength()===0&&i.replaceRange.length===0)){if(n&&n.replaceRange.endExclusive===i.replaceRange.start){const s=n.tryJoinTouching(i);if(s){n=s;continue}}n&&e.push(n),n=i}return n&&e.push(n),this._createNew(e)}compose(e){const n=this.normalize(),i=e.normalize();if(n.isEmpty())return i;if(i.isEmpty())return n;const s=[...n.replacements],r=[];let a=0;for(const l of i.replacements){for(;;){const f=s[0];if(!f||f.replaceRange.start+a+f.getNewLength()>=l.replaceRange.start)break;s.shift(),r.push(f),a+=f.getNewLength()-f.replaceRange.length}const c=a;let h,d;for(;;){const f=s[0];if(!f||f.replaceRange.start+a>l.replaceRange.endExclusive)break;h||(h=f),d=f,s.shift(),a+=f.getNewLength()-f.replaceRange.length}if(!h)r.push(l.delta(-a));else{const f=Math.min(h.replaceRange.start,l.replaceRange.start-c),m=l.replaceRange.start-(h.replaceRange.start+c);if(m>0){const _=h.slice(I.emptyAt(f),new I(0,m));r.push(_)}if(!d)throw new G("Invariant violation: lastIntersecting is undefined");const b=d.replaceRange.endExclusive+a-l.replaceRange.endExclusive;if(b>0){const _=d.slice(I.ofStartAndLength(d.replaceRange.endExclusive,0),new I(d.getNewLength()-b,d.getNewLength()));s.unshift(_),a-=_.getNewLength()-_.replaceRange.length}const p=new I(f,l.replaceRange.endExclusive-a),g=l.slice(p,new I(0,l.getNewLength()));r.push(g)}}for(;;){const l=s.shift();if(!l)break;r.push(l)}return this._createNew(r).normalize()}getNewRanges(){const e=[];let n=0;for(const i of this.replacements)e.push(I.ofStartAndLength(i.replaceRange.start+n,i.getNewLength())),n+=i.getLengthDelta();return e}isEmpty(){return this.replacements.length===0}applyToOffsetOrUndefined(e){let n=0;for(const i of this.replacements)if(i.replaceRange.start<=e){if(e ${this.getNewLength()} }`}get isEmpty(){return this.getNewLength()===0&&this.replaceRange.length===0}getRangeAfterReplace(){return new I(this.replaceRange.start,this.replaceRange.start+this.getNewLength())}}class rc extends ic{apply(e){const n=[];let i=0;for(const s of this.replacements)n.push(e.substring(i,s.replaceRange.start)),n.push(s.newText),i=s.replaceRange.endExclusive;return n.push(e.substring(i)),n.join("")}removeCommonSuffixPrefix(e){const n=[];for(const i of this.replacements){const s=i.removeCommonSuffixPrefix(e);s.isEmpty||n.push(s)}return new Qt(n)}}class ac extends sc{constructor(e,n){super(e),this.newText=n}getNewLength(){return this.newText.length}toString(){return`${this.replaceRange} -> ${JSON.stringify(this.newText)}`}replace(e){return e.substring(0,this.replaceRange.start)+this.newText+e.substring(this.replaceRange.endExclusive)}removeCommonSuffixPrefix(e){const n=e.substring(this.replaceRange.start,this.replaceRange.endExclusive),i=yn(n,this.newText),s=Math.min(n.length-i,this.newText.length-i,Ln(n,this.newText)),r=new I(this.replaceRange.start+i,this.replaceRange.endExclusive-s),a=this.newText.substring(i,this.newText.length-s);return new Ve(r,a)}removeCommonSuffixAndPrefix(e){return this.removeCommonSuffix(e).removeCommonPrefix(e)}removeCommonPrefix(e){const n=this.replaceRange.substring(e),i=yn(n,this.newText);return i===0?this:this.slice(this.replaceRange.deltaStart(i),new I(i,this.newText.length))}removeCommonSuffix(e){const n=this.replaceRange.substring(e),i=Ln(n,this.newText);return i===0?this:this.slice(this.replaceRange.deltaEnd(-i),new I(0,this.newText.length-i))}toJson(){return{txt:this.newText,pos:this.replaceRange.start,len:this.replaceRange.length}}}const tt=class tt extends rc{static replace(e,n){return new tt([new Ve(e,n)])}static compose(e){if(e.length===0)return tt.empty;let n=e[0];for(let i=1;i=s.replaceRange.start)break;t.shift(),n.push(a.delta(i))}const r=[];for(;;){const a=t[0];if(!a||!a.intersectsOrTouches(s.replaceRange))break;t.shift(),r.push(a)}for(let a=r.length-1;a>=0;a--){let l=r[a];const c=l.intersect(s.replaceRange).length;l=l.deltaEnd(-c+(a===0?s.newText.length:0));const h=l.start-s.replaceRange.start;h>0&&(l=l.delta(-h)),a!==0&&(l=l.delta(s.newText.length)),l=l.delta(-(s.newText.length-s.replaceRange.length)),t.unshift(l)}i+=s.newText.length-s.replaceRange.length}for(;;){const s=t[0];if(!s)break;t.shift(),n.push(s.delta(i))}return n}Mu({StringEdit:Qt,StringReplacement:Ve,TextReplacement:ge,TextEdit:Ht,TextLength:Fe});let Ji,Zi,Ki;function h1(){if(!Ji){const t=nc("@vscode/diff","dist/index.js");Ji=new Promise((e,n)=>w1([`${t}`],i=>e(_1(i)),n))}return Ji}function lc(t){return t?(Ki||(Ki=h1().then(e=>e.createDiffComputer({useWasm:!0}))),Ki):(Zi||(Zi=h1().then(e=>e.createDiffComputer({useWasm:!1}))),Zi)}async function f1(t){const e=await lc(t);return new uc(e)}class uc{constructor(e){this._computer=e}computeDiff(e,n,i){const s=new zt(e.join(` +`)),r=new zt(n.join(` +`)),a=this._computer.computeDiff(s.value,r.value,{ignoreTrimWhitespace:!0,computeMoves:i.computeMoves,extendToSubwords:i.extendToSubwords}),l=s.getTransformer(),c=r.getTransformer(),h=[];let d=0;for(const b of a.edits.replacements){const p=b.range.start+d,g=p+b.newText.length,_=l.getRange(new I(b.range.start,b.range.endExclusive)),x=c.getRange(new I(p,g));h.push(new fe(_,x)),d+=b.newText.length-(b.range.endExclusive-b.range.start)}const f=Pn(h,s,r),m=[];if(i.computeMoves)for(const b of a.moves){const p=l.getPosition(b.range.original.start),g=l.getPosition(b.range.original.endExclusive),_=c.getPosition(b.range.modified.start),x=c.getPosition(b.range.modified.endExclusive),S=new H(p.lineNumber,g.lineNumber),v=new H(_.lineNumber,x.lineNumber);m.push(new Oi(new he(S,v),[]))}return new Ot(f,m,a.hitTimeout)}}const Xt={getLegacy:()=>new Iu,getDefault:()=>new ec,getAdvancedExternal:()=>f1(!1),getAdvancedWasm:()=>f1(!0)};function We(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}class w{constructor(e,n,i,s=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,e))|0,this.g=Math.min(255,Math.max(0,n))|0,this.b=Math.min(255,Math.max(0,i))|0,this.a=We(Math.max(Math.min(1,s),0),3)}static equals(e,n){return e.r===n.r&&e.g===n.g&&e.b===n.b&&e.a===n.a}}class pe{constructor(e,n,i,s){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=We(Math.max(Math.min(1,n),0),3),this.l=We(Math.max(Math.min(1,i),0),3),this.a=We(Math.max(Math.min(1,s),0),3)}static equals(e,n){return e.h===n.h&&e.s===n.s&&e.l===n.l&&e.a===n.a}static fromRGBA(e){const n=e.r/255,i=e.g/255,s=e.b/255,r=e.a,a=Math.max(n,i,s),l=Math.min(n,i,s);let c=0,h=0;const d=(l+a)/2,f=a-l;if(f>0){switch(h=Math.min(d<=.5?f/(2*d):f/(2-2*d),1),a){case n:c=(i-s)/f+(i1&&(i-=1),i<1/6?e+(n-e)*6*i:i<1/2?n:i<2/3?e+(n-e)*(2/3-i)*6:e}static toRGBA(e){const n=e.h/360,{s:i,l:s,a:r}=e;let a,l,c;if(i===0)a=l=c=s;else{const h=s<.5?s*(1+i):s+i-s*i,d=2*s-h;a=pe._hue2rgb(d,h,n+1/3),l=pe._hue2rgb(d,h,n),c=pe._hue2rgb(d,h,n-1/3)}return new w(Math.round(a*255),Math.round(l*255),Math.round(c*255),r)}}class Ye{constructor(e,n,i,s){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=We(Math.max(Math.min(1,n),0),3),this.v=We(Math.max(Math.min(1,i),0),3),this.a=We(Math.max(Math.min(1,s),0),3)}static equals(e,n){return e.h===n.h&&e.s===n.s&&e.v===n.v&&e.a===n.a}static fromRGBA(e){const n=e.r/255,i=e.g/255,s=e.b/255,r=Math.max(n,i,s),a=Math.min(n,i,s),l=r-a,c=r===0?0:l/r;let h;return l===0?h=0:r===n?h=((i-s)/l%6+6)%6:r===i?h=(s-n)/l+2:h=(n-i)/l+4,new Ye(Math.round(h*60),c,r,e.a)}static toRGBA(e){const{h:n,s:i,v:s,a:r}=e,a=s*i,l=a*(1-Math.abs(n/60%2-1)),c=s-a;let[h,d,f]=[0,0,0];return n<60?(h=a,d=l):n<120?(h=l,d=a):n<180?(d=a,f=l):n<240?(d=l,f=a):n<300?(h=l,f=a):n<=360&&(h=a,f=l),h=Math.round((h+c)*255),d=Math.round((d+c)*255),f=Math.round((f+c)*255),new w(h,d,f,r)}}const j=class j{static fromHex(e){return j.Format.CSS.parseHex(e)||j.red}static equals(e,n){return!e&&!n?!0:!e||!n?!1:e.equals(n)}get hsla(){return this._hsla?this._hsla:pe.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:Ye.fromRGBA(this.rgba)}constructor(e){if(e)if(e instanceof w)this.rgba=e;else if(e instanceof pe)this._hsla=e,this.rgba=pe.toRGBA(e);else if(e instanceof Ye)this._hsva=e,this.rgba=Ye.toRGBA(e);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(e){return!!e&&w.equals(this.rgba,e.rgba)&&pe.equals(this.hsla,e.hsla)&&Ye.equals(this.hsva,e.hsva)}getRelativeLuminance(){const e=j._relativeLuminanceForComponent(this.rgba.r),n=j._relativeLuminanceForComponent(this.rgba.g),i=j._relativeLuminanceForComponent(this.rgba.b),s=.2126*e+.7152*n+.0722*i;return We(s,4)}static _relativeLuminanceForComponent(e){const n=e/255;return n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(e){const n=this.getRelativeLuminance(),i=e.getRelativeLuminance();return n>i}isDarkerThan(e){const n=this.getRelativeLuminance(),i=e.getRelativeLuminance();return n>>0),this._toNumber32Bit}static getLighterColor(e,n,i){if(e.isLighterThan(n))return e;i=i||.5;const s=e.getRelativeLuminance(),r=n.getRelativeLuminance();return i=i*(r-s)/r,e.lighten(i)}static getDarkerColor(e,n,i){if(e.isDarkerThan(n))return e;i=i||.5;const s=e.getRelativeLuminance(),r=n.getRelativeLuminance();return i=i*(s-r)/s,e.darken(i)}};j.white=new j(new w(255,255,255,1)),j.black=new j(new w(0,0,0,1)),j.red=new j(new w(255,0,0,1)),j.blue=new j(new w(0,0,255,1)),j.green=new j(new w(0,255,0,1)),j.cyan=new j(new w(0,255,255,1)),j.lightgrey=new j(new w(211,211,211,1)),j.transparent=new j(new w(0,0,0,0));let Je=j;(function(t){(function(e){(function(n){function i(g){return g.rgba.a===1?`rgb(${g.rgba.r}, ${g.rgba.g}, ${g.rgba.b})`:t.Format.CSS.formatRGBA(g)}n.formatRGB=i;function s(g){return`rgba(${g.rgba.r}, ${g.rgba.g}, ${g.rgba.b}, ${+g.rgba.a.toFixed(2)})`}n.formatRGBA=s;function r(g){return g.hsla.a===1?`hsl(${g.hsla.h}, ${Math.round(g.hsla.s*100)}%, ${Math.round(g.hsla.l*100)}%)`:t.Format.CSS.formatHSLA(g)}n.formatHSL=r;function a(g){return`hsla(${g.hsla.h}, ${Math.round(g.hsla.s*100)}%, ${Math.round(g.hsla.l*100)}%, ${g.hsla.a.toFixed(2)})`}n.formatHSLA=a;function l(g){const _=g.toString(16);return _.length!==2?"0"+_:_}function c(g){return`#${l(g.rgba.r)}${l(g.rgba.g)}${l(g.rgba.b)}`}n.formatHex=c;function h(g,_=!1){return _&&g.rgba.a===1?t.Format.CSS.formatHex(g):`#${l(g.rgba.r)}${l(g.rgba.g)}${l(g.rgba.b)}${l(Math.round(g.rgba.a*255))}`}n.formatHexA=h;function d(g){return g.isOpaque()?t.Format.CSS.formatHex(g):t.Format.CSS.formatRGBA(g)}n.format=d;function f(g){if(g==="transparent")return t.transparent;if(g.startsWith("#"))return b(g);if(g.startsWith("rgba(")){const _=g.match(/rgba\((?(?:\+|-)?\d+), *(?(?:\+|-)?\d+), *(?(?:\+|-)?\d+), *(?(?:\+|-)?\d+(\.\d+)?)\)/);if(!_)throw new Error("Invalid color format "+g);const x=parseInt(_.groups?.r??"0"),S=parseInt(_.groups?.g??"0"),v=parseInt(_.groups?.b??"0"),k=parseFloat(_.groups?.a??"0");return new t(new w(x,S,v,k))}if(g.startsWith("rgb(")){const _=g.match(/rgb\((?(?:\+|-)?\d+), *(?(?:\+|-)?\d+), *(?(?:\+|-)?\d+)\)/);if(!_)throw new Error("Invalid color format "+g);const x=parseInt(_.groups?.r??"0"),S=parseInt(_.groups?.g??"0"),v=parseInt(_.groups?.b??"0");return new t(new w(x,S,v))}return m(g)}n.parse=f;function m(g){switch(g){case"aliceblue":return new t(new w(240,248,255,1));case"antiquewhite":return new t(new w(250,235,215,1));case"aqua":return new t(new w(0,255,255,1));case"aquamarine":return new t(new w(127,255,212,1));case"azure":return new t(new w(240,255,255,1));case"beige":return new t(new w(245,245,220,1));case"bisque":return new t(new w(255,228,196,1));case"black":return new t(new w(0,0,0,1));case"blanchedalmond":return new t(new w(255,235,205,1));case"blue":return new t(new w(0,0,255,1));case"blueviolet":return new t(new w(138,43,226,1));case"brown":return new t(new w(165,42,42,1));case"burlywood":return new t(new w(222,184,135,1));case"cadetblue":return new t(new w(95,158,160,1));case"chartreuse":return new t(new w(127,255,0,1));case"chocolate":return new t(new w(210,105,30,1));case"coral":return new t(new w(255,127,80,1));case"cornflowerblue":return new t(new w(100,149,237,1));case"cornsilk":return new t(new w(255,248,220,1));case"crimson":return new t(new w(220,20,60,1));case"cyan":return new t(new w(0,255,255,1));case"darkblue":return new t(new w(0,0,139,1));case"darkcyan":return new t(new w(0,139,139,1));case"darkgoldenrod":return new t(new w(184,134,11,1));case"darkgray":return new t(new w(169,169,169,1));case"darkgreen":return new t(new w(0,100,0,1));case"darkgrey":return new t(new w(169,169,169,1));case"darkkhaki":return new t(new w(189,183,107,1));case"darkmagenta":return new t(new w(139,0,139,1));case"darkolivegreen":return new t(new w(85,107,47,1));case"darkorange":return new t(new w(255,140,0,1));case"darkorchid":return new t(new w(153,50,204,1));case"darkred":return new t(new w(139,0,0,1));case"darksalmon":return new t(new w(233,150,122,1));case"darkseagreen":return new t(new w(143,188,143,1));case"darkslateblue":return new t(new w(72,61,139,1));case"darkslategray":return new t(new w(47,79,79,1));case"darkslategrey":return new t(new w(47,79,79,1));case"darkturquoise":return new t(new w(0,206,209,1));case"darkviolet":return new t(new w(148,0,211,1));case"deeppink":return new t(new w(255,20,147,1));case"deepskyblue":return new t(new w(0,191,255,1));case"dimgray":return new t(new w(105,105,105,1));case"dimgrey":return new t(new w(105,105,105,1));case"dodgerblue":return new t(new w(30,144,255,1));case"firebrick":return new t(new w(178,34,34,1));case"floralwhite":return new t(new w(255,250,240,1));case"forestgreen":return new t(new w(34,139,34,1));case"fuchsia":return new t(new w(255,0,255,1));case"gainsboro":return new t(new w(220,220,220,1));case"ghostwhite":return new t(new w(248,248,255,1));case"gold":return new t(new w(255,215,0,1));case"goldenrod":return new t(new w(218,165,32,1));case"gray":return new t(new w(128,128,128,1));case"green":return new t(new w(0,128,0,1));case"greenyellow":return new t(new w(173,255,47,1));case"grey":return new t(new w(128,128,128,1));case"honeydew":return new t(new w(240,255,240,1));case"hotpink":return new t(new w(255,105,180,1));case"indianred":return new t(new w(205,92,92,1));case"indigo":return new t(new w(75,0,130,1));case"ivory":return new t(new w(255,255,240,1));case"khaki":return new t(new w(240,230,140,1));case"lavender":return new t(new w(230,230,250,1));case"lavenderblush":return new t(new w(255,240,245,1));case"lawngreen":return new t(new w(124,252,0,1));case"lemonchiffon":return new t(new w(255,250,205,1));case"lightblue":return new t(new w(173,216,230,1));case"lightcoral":return new t(new w(240,128,128,1));case"lightcyan":return new t(new w(224,255,255,1));case"lightgoldenrodyellow":return new t(new w(250,250,210,1));case"lightgray":return new t(new w(211,211,211,1));case"lightgreen":return new t(new w(144,238,144,1));case"lightgrey":return new t(new w(211,211,211,1));case"lightpink":return new t(new w(255,182,193,1));case"lightsalmon":return new t(new w(255,160,122,1));case"lightseagreen":return new t(new w(32,178,170,1));case"lightskyblue":return new t(new w(135,206,250,1));case"lightslategray":return new t(new w(119,136,153,1));case"lightslategrey":return new t(new w(119,136,153,1));case"lightsteelblue":return new t(new w(176,196,222,1));case"lightyellow":return new t(new w(255,255,224,1));case"lime":return new t(new w(0,255,0,1));case"limegreen":return new t(new w(50,205,50,1));case"linen":return new t(new w(250,240,230,1));case"magenta":return new t(new w(255,0,255,1));case"maroon":return new t(new w(128,0,0,1));case"mediumaquamarine":return new t(new w(102,205,170,1));case"mediumblue":return new t(new w(0,0,205,1));case"mediumorchid":return new t(new w(186,85,211,1));case"mediumpurple":return new t(new w(147,112,219,1));case"mediumseagreen":return new t(new w(60,179,113,1));case"mediumslateblue":return new t(new w(123,104,238,1));case"mediumspringgreen":return new t(new w(0,250,154,1));case"mediumturquoise":return new t(new w(72,209,204,1));case"mediumvioletred":return new t(new w(199,21,133,1));case"midnightblue":return new t(new w(25,25,112,1));case"mintcream":return new t(new w(245,255,250,1));case"mistyrose":return new t(new w(255,228,225,1));case"moccasin":return new t(new w(255,228,181,1));case"navajowhite":return new t(new w(255,222,173,1));case"navy":return new t(new w(0,0,128,1));case"oldlace":return new t(new w(253,245,230,1));case"olive":return new t(new w(128,128,0,1));case"olivedrab":return new t(new w(107,142,35,1));case"orange":return new t(new w(255,165,0,1));case"orangered":return new t(new w(255,69,0,1));case"orchid":return new t(new w(218,112,214,1));case"palegoldenrod":return new t(new w(238,232,170,1));case"palegreen":return new t(new w(152,251,152,1));case"paleturquoise":return new t(new w(175,238,238,1));case"palevioletred":return new t(new w(219,112,147,1));case"papayawhip":return new t(new w(255,239,213,1));case"peachpuff":return new t(new w(255,218,185,1));case"peru":return new t(new w(205,133,63,1));case"pink":return new t(new w(255,192,203,1));case"plum":return new t(new w(221,160,221,1));case"powderblue":return new t(new w(176,224,230,1));case"purple":return new t(new w(128,0,128,1));case"rebeccapurple":return new t(new w(102,51,153,1));case"red":return new t(new w(255,0,0,1));case"rosybrown":return new t(new w(188,143,143,1));case"royalblue":return new t(new w(65,105,225,1));case"saddlebrown":return new t(new w(139,69,19,1));case"salmon":return new t(new w(250,128,114,1));case"sandybrown":return new t(new w(244,164,96,1));case"seagreen":return new t(new w(46,139,87,1));case"seashell":return new t(new w(255,245,238,1));case"sienna":return new t(new w(160,82,45,1));case"silver":return new t(new w(192,192,192,1));case"skyblue":return new t(new w(135,206,235,1));case"slateblue":return new t(new w(106,90,205,1));case"slategray":return new t(new w(112,128,144,1));case"slategrey":return new t(new w(112,128,144,1));case"snow":return new t(new w(255,250,250,1));case"springgreen":return new t(new w(0,255,127,1));case"steelblue":return new t(new w(70,130,180,1));case"tan":return new t(new w(210,180,140,1));case"teal":return new t(new w(0,128,128,1));case"thistle":return new t(new w(216,191,216,1));case"tomato":return new t(new w(255,99,71,1));case"turquoise":return new t(new w(64,224,208,1));case"violet":return new t(new w(238,130,238,1));case"wheat":return new t(new w(245,222,179,1));case"white":return new t(new w(255,255,255,1));case"whitesmoke":return new t(new w(245,245,245,1));case"yellow":return new t(new w(255,255,0,1));case"yellowgreen":return new t(new w(154,205,50,1));default:return null}}function b(g){const _=g.length;if(_===0||g.charCodeAt(0)!==35)return null;if(_===7){const x=16*p(g.charCodeAt(1))+p(g.charCodeAt(2)),S=16*p(g.charCodeAt(3))+p(g.charCodeAt(4)),v=16*p(g.charCodeAt(5))+p(g.charCodeAt(6));return new t(new w(x,S,v,1))}if(_===9){const x=16*p(g.charCodeAt(1))+p(g.charCodeAt(2)),S=16*p(g.charCodeAt(3))+p(g.charCodeAt(4)),v=16*p(g.charCodeAt(5))+p(g.charCodeAt(6)),k=16*p(g.charCodeAt(7))+p(g.charCodeAt(8));return new t(new w(x,S,v,k/255))}if(_===4){const x=p(g.charCodeAt(1)),S=p(g.charCodeAt(2)),v=p(g.charCodeAt(3));return new t(new w(16*x+x,16*S+S,16*v+v))}if(_===5){const x=p(g.charCodeAt(1)),S=p(g.charCodeAt(2)),v=p(g.charCodeAt(3)),k=p(g.charCodeAt(4));return new t(new w(16*x+x,16*S+S,16*v+v,(16*k+k)/255))}return null}n.parseHex=b;function p(g){switch(g){case 48:return 0;case 49:return 1;case 50:return 2;case 51:return 3;case 52:return 4;case 53:return 5;case 54:return 6;case 55:return 7;case 56:return 8;case 57:return 9;case 97:return 10;case 65:return 10;case 98:return 11;case 66:return 11;case 99:return 12;case 67:return 12;case 100:return 13;case 68:return 13;case 101:return 14;case 69:return 14;case 102:return 15;case 70:return 15}return 0}})(e.CSS||(e.CSS={}))})(t.Format||(t.Format={}))})(Je||(Je={}));function d1(t){const e=[];for(const n of t){const i=Number(n);(i||i===0&&n.replace(/\s/g,"")!=="")&&e.push(i)}return e}function es(t,e,n,i){return{red:t/255,blue:n/255,green:e/255,alpha:i}}function Yt(t,e){const n=e.index,i=e[0].length;if(n===void 0)return;const s=t.positionAt(n);return{startLineNumber:s.lineNumber,startColumn:s.column,endLineNumber:s.lineNumber,endColumn:s.column+i}}function cc(t,e){if(!t)return;const n=Je.Format.CSS.parseHex(e);if(n)return{range:t,color:es(n.rgba.r,n.rgba.g,n.rgba.b,n.rgba.a)}}function m1(t,e,n){if(!t||e.length!==1)return;const s=e[0].values(),r=d1(s);return{range:t,color:es(r[0],r[1],r[2],n?r[3]:1)}}function g1(t,e,n){if(!t||e.length!==1)return;const s=e[0].values(),r=d1(s),a=new Je(new pe(r[0],r[1]/100,r[2]/100,n?r[3]:1));return{range:t,color:es(a.rgba.r,a.rgba.g,a.rgba.b,a.rgba.a)}}function Jt(t,e){return typeof t=="string"?[...t.matchAll(e)]:t.findMatches(e)}function hc(t){const e=[],n=new RegExp(`\\b(rgb|rgba|hsl|hsla)(\\([0-9\\s,.\\%\\/]*\\))|^(#)([A-Fa-f0-9]{3})\\b|^(#)([A-Fa-f0-9]{4})\\b|^(#)([A-Fa-f0-9]{6})\\b|^(#)([A-Fa-f0-9]{8})\\b|(?<=['"\\s])(#)([A-Fa-f0-9]{3})\\b|(?<=['"\\s])(#)([A-Fa-f0-9]{4})\\b|(?<=['"\\s])(#)([A-Fa-f0-9]{6})\\b|(?<=['"\\s])(#)([A-Fa-f0-9]{8})\\b`,"gm"),i=Jt(t,n);if(i.length>0)for(const s of i){const r=s.filter(h=>h!==void 0),a=r[1],l=r[2];if(!l)continue;let c;if(a==="rgb"){const h=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*[\s,]\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*[\s,]\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;c=m1(Yt(t,s),Jt(l,h),!1)}else if(a==="rgba"){const h=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*[\s,]\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*[\s,]\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*(?:[\s,]|[\s]*\/)\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;c=m1(Yt(t,s),Jt(l,h),!0)}else if(a==="hsl"){const h=/^\(\s*((?:360(?:\.0+)?|(?:36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])(?:\.\d+)?))\s*[\s,]\s*(100(?:\.0+)?|\d{1,2}[.]\d*|\d{1,2})%\s*[\s,]\s*(100(?:\.0+)?|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;c=g1(Yt(t,s),Jt(l,h),!1)}else if(a==="hsla"){const h=/^\(\s*((?:360(?:\.0+)?|(?:36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])(?:\.\d+)?))\s*[\s,]\s*(100(?:\.0+)?|\d{1,2}[.]\d*|\d{1,2})%\s*[\s,]\s*(100(?:\.0+)?|\d{1,2}[.]\d*|\d{1,2})%\s*(?:[\s,]|[\s]*\/)\s*(0[.][0-9]+|[.][0-9]+|[01][.]0*|[01])\s*\)$/gm;c=g1(Yt(t,s),Jt(l,h),!0)}else a==="#"&&(c=cc(Yt(t,s),a+l));c&&e.push(c)}return e}function fc(t){return!t||typeof t.getValue!="function"||typeof t.positionAt!="function"?[]:hc(t)}const dc=/^-+|-+$/g,p1=100,mc=5;function gc(t,e){let n=[];if(e.findRegionSectionHeaders&&e.foldingRules?.markers){const i=pc(t,e);n=n.concat(i)}if(e.findMarkSectionHeaders){const i=bc(t,e);n=n.concat(i)}return n}function pc(t,e){const n=[],i=t.getLineCount();for(let s=1;s<=i;s++){const r=t.getLineContent(s),a=r.match(e.foldingRules.markers.start);if(a){const l={startLineNumber:s,startColumn:a[0].length+1,endLineNumber:s,endColumn:r.length+1};if(l.endColumn>l.startColumn){const c={range:l,...wc(r.substring(a[0].length)),shouldBeInComments:!1};(c.text||c.hasSeparatorLine)&&n.push(c)}}}return n}function bc(t,e){const n=[],i=t.getLineCount();if(!e.markSectionHeaderRegex||e.markSectionHeaderRegex.trim()==="")return n;const s=$r(e.markSectionHeaderRegex),r=new RegExp(e.markSectionHeaderRegex,`gdm${s?"s":""}`);if(rr(r))return n;for(let a=1;a<=i;a+=p1-mc){const l=Math.min(a+p1-1,i),c=[];for(let f=a;f<=l;f++)c.push(t.getLineContent(f));const h=c.join(` +`);r.lastIndex=0;let d;for(;(d=r.exec(h))!==null;){const f=h.substring(0,d.index),m=(f.match(/\n/g)||[]).length,b=a+m,p=d[0].split(` +`),g=p.length,_=b+g-1,x=f.lastIndexOf(` +`)+1,S=d.index-x+1,v=p[p.length-1],k=g===1?S+d[0].length:v.length+1,D={startLineNumber:b,startColumn:S,endLineNumber:_,endColumn:k},O=(d.groups??{}).label??"",y=((d.groups??{}).separator??"")!=="",L={range:D,text:O,hasSeparatorLine:y,shouldBeInComments:!0};(L.text||L.hasSeparatorLine)&&(n.length===0||n[n.length-1].range.endLineNumber=0&&this.prefixSum.set(s.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,n){return e=bt(e),n=bt(n),this.values[e]===n?!1:(this.values[e]=n,e-1=i.length)return!1;const r=i.length-e;return n>=r&&(n=r),n===0?!1:(this.values=new Uint32Array(i.length-n),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e+n),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(s.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=bt(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let n=this.prefixSumValidIndex[0]+1;n===0&&(this.prefixSum[0]=this.values[0],n++),e>=this.values.length&&(e=this.values.length-1);for(let i=n;i<=e;i++)this.prefixSum[i]=this.prefixSum[i-1]+this.values[i];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let n=0,i=this.values.length-1,s=0,r=0,a=0;for(;n<=i;)if(s=n+(i-n)/2|0,r=this.prefixSum[s],a=r-this.values[s],e=r)n=s+1;else break;return new ts(s,e-a)}}class yc{constructor(e){this._values=e,this._isValid=!1,this._validEndIndex=-1,this._prefixSum=[],this._indexBySum=[]}getTotalSum(){return this._ensureValid(),this._indexBySum.length}getPrefixSum(e){return this._ensureValid(),e===0?0:this._prefixSum[e-1]}getIndexOf(e){this._ensureValid();const n=this._indexBySum[e];if(n===void 0){const s=Math.max(0,this._values.length-1),r=s>0?this._prefixSum[s-1]:0;return new ts(s,e-r)}const i=n>0?this._prefixSum[n-1]:0;return new ts(n,e-i)}removeValues(e,n){this._values.splice(e,n),this._invalidate(e)}insertValues(e,n){this._values=cs(this._values,e,n),this._invalidate(e)}_invalidate(e){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,e-1)}_ensureValid(){if(!this._isValid){for(let e=this._validEndIndex+1,n=this._values.length;e0?this._prefixSum[e-1]:0;this._prefixSum[e]=s+i;for(let r=0;r0?this._prefixSum[this._values.length-1]:0,this._isValid=!0,this._validEndIndex=this._values.length-1}}setValue(e,n){this._values[e]!==n&&(this._values[e]=n,this._invalidate(e))}}class ts{constructor(e,n){this.index=e,this.remainder=n,this._prefixSumIndexOfResultBrand=void 0,this.index=e,this.remainder=n}}class Lc{constructor(e,n,i,s){this._uri=e,this._lines=n,this._eol=i,this._versionId=s,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);const n=e.changes;for(const i of n)this._acceptDeleteRange(i.range),this._acceptInsertText(new U(i.range.startLineNumber,i.range.startColumn),i.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const e=this._eol.length,n=this._lines.length,i=new Uint32Array(n);for(let s=0;sthis._checkStopModelSync(),Math.round(b1/2)),this._register(s)}}dispose(){for(const e in this._syncedModels)lt(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e,n=!1){for(const i of e){const s=i.toString();this._syncedModels[s]||this._beginModelSync(i,n),this._syncedModels[s]&&(this._syncedModelsLastUsedTime[s]=new Date().getTime())}}_checkStopModelSync(){const e=new Date().getTime(),n=[];for(const i in this._syncedModelsLastUsedTime)e-this._syncedModelsLastUsedTime[i]>b1&&n.push(i);for(const i of n)this._stopModelSync(i)}_beginModelSync(e,n){const i=this._modelService.getModel(e);if(!i||!n&&i.isTooLargeForSyncing())return;const s=e.toString();this._proxy.$acceptNewModel({url:i.uri.toString(),lines:i.getLinesContent(),EOL:i.getEOL(),versionId:i.getVersionId()});const r=new je;r.add(i.onDidChangeContent(a=>{this._proxy.$acceptModelChanged(s.toString(),a)})),r.add(i.onWillDispose(()=>{this._stopModelSync(s)})),r.add(xe(()=>{this._proxy.$acceptRemovedModel(s)})),this._syncedModels[s]=r}_stopModelSync(e){const n=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],lt(n)}}class xc{constructor(){this._models=Object.create(null)}getModel(e){return this._models[e]}getModels(){const e=[];return Object.keys(this._models).forEach(n=>e.push(this._models[n])),e}$acceptNewModel(e){this._models[e.url]=new Sc(re.parse(e.url),e.lines,e.EOL,e.versionId)}$acceptModelChanged(e,n){if(!this._models[e])return;this._models[e].onEvents(n)}$acceptRemovedModel(e){this._models[e]&&delete this._models[e]}}class Sc extends Lc{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(e){const n=[];for(let i=0;ithis._lines.length)n=this._lines.length,i=this._lines[n-1].length+1,s=!0;else{const r=this._lines[n-1].length+1;i<1?(i=1,s=!0):i>r&&(i=r,s=!0)}return s?{lineNumber:n,column:i}:e}}const nt=class nt{constructor(e=null){this._foreignModule=e,this._requestHandlerBrand=void 0,this._workerTextModelSyncServer=new xc}dispose(){}async $ping(){return"pong"}_getModel(e){return this._workerTextModelSyncServer.getModel(e)}getModels(){return this._workerTextModelSyncServer.getModels()}$acceptNewModel(e){this._workerTextModelSyncServer.$acceptNewModel(e)}$acceptModelChanged(e,n){this._workerTextModelSyncServer.$acceptModelChanged(e,n)}$acceptRemovedModel(e){this._workerTextModelSyncServer.$acceptRemovedModel(e)}async $computeUnicodeHighlights(e,n,i){const s=this._getModel(e);return s?zr.computeUnicodeHighlights(s,n,i):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async $findSectionHeaders(e,n){const i=this._getModel(e);return i?gc(i,n):[]}async $computeDiff(e,n,i,s){const r=this._getModel(e),a=this._getModel(n);if(!r||!a)return null;const l=await Nc(s);return nt.computeDiff(r,a,i,l)}static computeDiff(e,n,i,s){const r=e.getLinesContent(),a=n.getLinesContent(),l=s.computeDiff(r,a,i),c=l.changes.length>0?!1:this._modelsAreIdentical(e,n);function h(d){return d.map(f=>[f.original.startLineNumber,f.original.endLineNumberExclusive,f.modified.startLineNumber,f.modified.endLineNumberExclusive,f.innerChanges?.map(m=>[m.originalRange.startLineNumber,m.originalRange.startColumn,m.originalRange.endLineNumber,m.originalRange.endColumn,m.modifiedRange.startLineNumber,m.modifiedRange.startColumn,m.modifiedRange.endLineNumber,m.modifiedRange.endColumn])])}return{identical:c,quitEarly:l.hitTimeout,changes:h(l.changes),moves:l.moves.map(d=>[d.lineRangeMapping.original.startLineNumber,d.lineRangeMapping.original.endLineNumberExclusive,d.lineRangeMapping.modified.startLineNumber,d.lineRangeMapping.modified.endLineNumberExclusive,h(d.changes)])}}static _modelsAreIdentical(e,n){const i=e.getLineCount(),s=n.getLineCount();if(i!==s)return!1;for(let r=1;r<=i;r++){const a=e.getLineContent(r),l=n.getLineContent(r);if(a!==l)return!1}return!0}async $computeMoreMinimalEdits(e,n,i){const s=this._getModel(e);if(!s)return n;const r=[];let a;n=n.slice(0).sort((c,h)=>{if(c.range&&h.range)return N.compareRangesUsingStarts(c.range,h.range);const d=c.range?0:1,f=h.range?0:1;return d-f});let l=0;for(let c=1;cnt._diffLimit){r.push({range:c,text:h});continue}const m=iu(f,h,i),b=s.offsetAt(N.lift(c).getStartPosition());for(const p of m){const g=s.positionAt(b+p.originalStart),_=s.positionAt(b+p.originalStart+p.originalLength),x={text:h.substr(p.modifiedStart,p.modifiedLength),range:{startLineNumber:g.lineNumber,startColumn:g.column,endLineNumber:_.lineNumber,endColumn:_.column}};s.getValueInRange(x.range)!==x.text&&r.push(x)}}return typeof a=="number"&&r.push({eol:a,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),r}async $computeLinks(e){const n=this._getModel(e);return n?uu(n):null}async $computeDefaultDocumentColors(e){const n=this._getModel(e);return n?fc(n):null}async $textualSuggest(e,n,i,s){const r=new Dt,a=new RegExp(i,s),l=new Set;e:for(const c of e){const h=this._getModel(c);if(h){for(const d of h.words(a))if(!(d===n||!isNaN(Number(d)))&&(l.add(d),l.size>nt._suggestionsLimit))break e}}return{words:Array.from(l),duration:r.elapsed()}}async $computeWordRanges(e,n,i,s){const r=this._getModel(e);if(!r)return Object.create(null);const a=new RegExp(i,s),l=Object.create(null);for(let c=n.startLineNumber;c>"}],indentationRules:{increaseIndentPattern:/^\s*(after|else|catch|rescue|fn|[^#]*(do|<\-|\->|\{|\[|\=))\s*$/,decreaseIndentPattern:/^\s*((\}|\])\s*$|(after|else|catch|rescue|end)\b)/}},n={defaultToken:"source",tokenPostfix:".elixir",brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"},{open:"<<",close:">>",token:"delimiter.angle.special"}],declarationKeywords:["def","defp","defn","defnp","defguard","defguardp","defmacro","defmacrop","defdelegate","defcallback","defmacrocallback","defmodule","defprotocol","defexception","defimpl","defstruct"],operatorKeywords:["and","in","not","or","when"],namespaceKeywords:["alias","import","require","use"],otherKeywords:["after","case","catch","cond","do","else","end","fn","for","if","quote","raise","receive","rescue","super","throw","try","unless","unquote_splicing","unquote","with"],constants:["true","false","nil"],nameBuiltin:["__MODULE__","__DIR__","__ENV__","__CALLER__","__STACKTRACE__"],operator:/-[->]?|!={0,2}|\*{1,2}|\/|\\\\|&{1,3}|\.\.?|\^(?:\^\^)?|\+\+?|<(?:-|<<|=|>|\|>|~>?)?|=~|={1,3}|>(?:=|>>)?|\|~>|\|>|\|{1,3}|~>>?|~~~|::/,variableName:/[a-z_][a-zA-Z0-9_]*[?!]?/,atomName:/[a-zA-Z_][a-zA-Z0-9_@]*[?!]?|@specialAtomName|@operator/,specialAtomName:/\.\.\.|<<>>|%\{\}|%|\{\}/,aliasPart:/[A-Z][a-zA-Z0-9_]*/,moduleName:/@aliasPart(?:\.@aliasPart)*/,sigilSymmetricDelimiter:/"""|'''|"|'|\/|\|/,sigilStartDelimiter:/@sigilSymmetricDelimiter|<|\{|\[|\(/,sigilEndDelimiter:/@sigilSymmetricDelimiter|>|\}|\]|\)/,sigilModifiers:/[a-zA-Z0-9]*/,decimal:/\d(?:_?\d)*/,hex:/[0-9a-fA-F](_?[0-9a-fA-F])*/,octal:/[0-7](_?[0-7])*/,binary:/[01](_?[01])*/,escape:/\\u[0-9a-fA-F]{4}|\\x[0-9a-fA-F]{2}|\\./,tokenizer:{root:[{include:"@whitespace"},{include:"@comments"},{include:"@keywordsShorthand"},{include:"@numbers"},{include:"@identifiers"},{include:"@strings"},{include:"@atoms"},{include:"@sigils"},{include:"@attributes"},{include:"@symbols"}],whitespace:[[/\s+/,"white"]],comments:[[/(#)(.*)/,["comment.punctuation","comment"]]],keywordsShorthand:[[/(@atomName)(:)(\s+)/,["constant","constant.punctuation","white"]],[/"(?=([^"]|#\{.*?\}|\\")*":)/,{token:"constant.delimiter",next:"@doubleQuotedStringKeyword"}],[/'(?=([^']|#\{.*?\}|\\')*':)/,{token:"constant.delimiter",next:"@singleQuotedStringKeyword"}]],doubleQuotedStringKeyword:[[/":/,{token:"constant.delimiter",next:"@pop"}],{include:"@stringConstantContentInterpol"}],singleQuotedStringKeyword:[[/':/,{token:"constant.delimiter",next:"@pop"}],{include:"@stringConstantContentInterpol"}],numbers:[[/0b@binary/,"number.binary"],[/0o@octal/,"number.octal"],[/0x@hex/,"number.hex"],[/@decimal\.@decimal([eE]-?@decimal)?/,"number.float"],[/@decimal/,"number"]],identifiers:[[/\b(defp?|defnp?|defmacrop?|defguardp?|defdelegate)(\s+)(@variableName)(?!\s+@operator)/,["keyword.declaration","white",{cases:{unquote:"keyword","@default":"function"}}]],[/(@variableName)(?=\s*\.?\s*\()/,{cases:{"@declarationKeywords":"keyword.declaration","@namespaceKeywords":"keyword","@otherKeywords":"keyword","@default":"function.call"}}],[/(@moduleName)(\s*)(\.)(\s*)(@variableName)/,["type.identifier","white","operator","white","function.call"]],[/(:)(@atomName)(\s*)(\.)(\s*)(@variableName)/,["constant.punctuation","constant","white","operator","white","function.call"]],[/(\|>)(\s*)(@variableName)/,["operator","white",{cases:{"@otherKeywords":"keyword","@default":"function.call"}}]],[/(&)(\s*)(@variableName)/,["operator","white","function.call"]],[/@variableName/,{cases:{"@declarationKeywords":"keyword.declaration","@operatorKeywords":"keyword.operator","@namespaceKeywords":"keyword","@otherKeywords":"keyword","@constants":"constant.language","@nameBuiltin":"variable.language","_.*":"comment.unused","@default":"identifier"}}],[/@moduleName/,"type.identifier"]],strings:[[/"""/,{token:"string.delimiter",next:"@doubleQuotedHeredoc"}],[/'''/,{token:"string.delimiter",next:"@singleQuotedHeredoc"}],[/"/,{token:"string.delimiter",next:"@doubleQuotedString"}],[/'/,{token:"string.delimiter",next:"@singleQuotedString"}]],doubleQuotedHeredoc:[[/"""/,{token:"string.delimiter",next:"@pop"}],{include:"@stringContentInterpol"}],singleQuotedHeredoc:[[/'''/,{token:"string.delimiter",next:"@pop"}],{include:"@stringContentInterpol"}],doubleQuotedString:[[/"/,{token:"string.delimiter",next:"@pop"}],{include:"@stringContentInterpol"}],singleQuotedString:[[/'/,{token:"string.delimiter",next:"@pop"}],{include:"@stringContentInterpol"}],atoms:[[/(:)(@atomName)/,["constant.punctuation","constant"]],[/:"/,{token:"constant.delimiter",next:"@doubleQuotedStringAtom"}],[/:'/,{token:"constant.delimiter",next:"@singleQuotedStringAtom"}]],doubleQuotedStringAtom:[[/"/,{token:"constant.delimiter",next:"@pop"}],{include:"@stringConstantContentInterpol"}],singleQuotedStringAtom:[[/'/,{token:"constant.delimiter",next:"@pop"}],{include:"@stringConstantContentInterpol"}],sigils:[[/~[a-z]@sigilStartDelimiter/,{token:"@rematch",next:"@sigil.interpol"}],[/~([A-Z]+)@sigilStartDelimiter/,{token:"@rematch",next:"@sigil.noInterpol"}]],sigil:[[/~([a-z]|[A-Z]+)\{/,{token:"@rematch",switchTo:"@sigilStart.$S2.$1.{.}"}],[/~([a-z]|[A-Z]+)\[/,{token:"@rematch",switchTo:"@sigilStart.$S2.$1.[.]"}],[/~([a-z]|[A-Z]+)\(/,{token:"@rematch",switchTo:"@sigilStart.$S2.$1.(.)"}],[/~([a-z]|[A-Z]+)\"}],[/~([a-z]|[A-Z]+)(@sigilSymmetricDelimiter)/,{token:"@rematch",switchTo:"@sigilStart.$S2.$1.$2.$2"}]],"sigilStart.interpol.s":[[/~s@sigilStartDelimiter/,{token:"string.delimiter",switchTo:"@sigilContinue.$S2.$S3.$S4.$S5"}]],"sigilContinue.interpol.s":[[/(@sigilEndDelimiter)@sigilModifiers/,{cases:{"$1==$S5":{token:"string.delimiter",next:"@pop"},"@default":"string"}}],{include:"@stringContentInterpol"}],"sigilStart.noInterpol.S":[[/~S@sigilStartDelimiter/,{token:"string.delimiter",switchTo:"@sigilContinue.$S2.$S3.$S4.$S5"}]],"sigilContinue.noInterpol.S":[[/(^|[^\\])\\@sigilEndDelimiter/,"string"],[/(@sigilEndDelimiter)@sigilModifiers/,{cases:{"$1==$S5":{token:"string.delimiter",next:"@pop"},"@default":"string"}}],{include:"@stringContent"}],"sigilStart.interpol.r":[[/~r@sigilStartDelimiter/,{token:"regexp.delimiter",switchTo:"@sigilContinue.$S2.$S3.$S4.$S5"}]],"sigilContinue.interpol.r":[[/(@sigilEndDelimiter)@sigilModifiers/,{cases:{"$1==$S5":{token:"regexp.delimiter",next:"@pop"},"@default":"regexp"}}],{include:"@regexpContentInterpol"}],"sigilStart.noInterpol.R":[[/~R@sigilStartDelimiter/,{token:"regexp.delimiter",switchTo:"@sigilContinue.$S2.$S3.$S4.$S5"}]],"sigilContinue.noInterpol.R":[[/(^|[^\\])\\@sigilEndDelimiter/,"regexp"],[/(@sigilEndDelimiter)@sigilModifiers/,{cases:{"$1==$S5":{token:"regexp.delimiter",next:"@pop"},"@default":"regexp"}}],{include:"@regexpContent"}],"sigilStart.interpol":[[/~([a-z]|[A-Z]+)@sigilStartDelimiter/,{token:"sigil.delimiter",switchTo:"@sigilContinue.$S2.$S3.$S4.$S5"}]],"sigilContinue.interpol":[[/(@sigilEndDelimiter)@sigilModifiers/,{cases:{"$1==$S5":{token:"sigil.delimiter",next:"@pop"},"@default":"sigil"}}],{include:"@sigilContentInterpol"}],"sigilStart.noInterpol":[[/~([a-z]|[A-Z]+)@sigilStartDelimiter/,{token:"sigil.delimiter",switchTo:"@sigilContinue.$S2.$S3.$S4.$S5"}]],"sigilContinue.noInterpol":[[/(^|[^\\])\\@sigilEndDelimiter/,"sigil"],[/(@sigilEndDelimiter)@sigilModifiers/,{cases:{"$1==$S5":{token:"sigil.delimiter",next:"@pop"},"@default":"sigil"}}],{include:"@sigilContent"}],attributes:[[/\@(module|type)?doc (~[sS])?"""/,{token:"comment.block.documentation",next:"@doubleQuotedHeredocDocstring"}],[/\@(module|type)?doc (~[sS])?'''/,{token:"comment.block.documentation",next:"@singleQuotedHeredocDocstring"}],[/\@(module|type)?doc (~[sS])?"/,{token:"comment.block.documentation",next:"@doubleQuotedStringDocstring"}],[/\@(module|type)?doc (~[sS])?'/,{token:"comment.block.documentation",next:"@singleQuotedStringDocstring"}],[/\@(module|type)?doc false/,"comment.block.documentation"],[/\@(@variableName)/,"variable"]],doubleQuotedHeredocDocstring:[[/"""/,{token:"comment.block.documentation",next:"@pop"}],{include:"@docstringContent"}],singleQuotedHeredocDocstring:[[/'''/,{token:"comment.block.documentation",next:"@pop"}],{include:"@docstringContent"}],doubleQuotedStringDocstring:[[/"/,{token:"comment.block.documentation",next:"@pop"}],{include:"@docstringContent"}],singleQuotedStringDocstring:[[/'/,{token:"comment.block.documentation",next:"@pop"}],{include:"@docstringContent"}],symbols:[[/\?(\\.|[^\\\s])/,"number.constant"],[/&\d+/,"operator"],[/<<<|>>>/,"operator"],[/[()\[\]\{\}]|<<|>>/,"@brackets"],[/\.\.\./,"identifier"],[/=>/,"punctuation"],[/@operator/,"operator"],[/[:;,.%]/,"punctuation"]],stringContentInterpol:[{include:"@interpolation"},{include:"@escapeChar"},{include:"@stringContent"}],stringContent:[[/./,"string"]],stringConstantContentInterpol:[{include:"@interpolation"},{include:"@escapeChar"},{include:"@stringConstantContent"}],stringConstantContent:[[/./,"constant"]],regexpContentInterpol:[{include:"@interpolation"},{include:"@escapeChar"},{include:"@regexpContent"}],regexpContent:[[/(\s)(#)(\s.*)$/,["white","comment.punctuation","comment"]],[/./,"regexp"]],sigilContentInterpol:[{include:"@interpolation"},{include:"@escapeChar"},{include:"@sigilContent"}],sigilContent:[[/./,"sigil"]],docstringContent:[[/./,"comment.block.documentation"]],escapeChar:[[/@escape/,"constant.character.escape"]],interpolation:[[/#{/,{token:"delimiter.bracket.embed",next:"@interpolationContinue"}]],interpolationContinue:[[/}/,{token:"delimiter.bracket.embed",next:"@pop"}],{include:"@root"}]}};e.conf=t,e.language=n,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/flow9-DqtmStfK.js b/emrg/gui/vendor/monaco/vs/flow9-DqtmStfK.js new file mode 100644 index 00000000..d7de3000 --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/flow9-DqtmStfK.js @@ -0,0 +1 @@ +define("vs/flow9-DqtmStfK",["exports"],(function(e){"use strict";const o={comments:{blockComment:["/*","*/"],lineComment:"//"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string"]},{open:"[",close:"]",notIn:["string"]},{open:"(",close:")",notIn:["string"]},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}]},n={defaultToken:"",tokenPostfix:".flow",keywords:["import","require","export","forbid","native","if","else","cast","unsafe","switch","default"],types:["io","mutable","bool","int","double","string","flow","void","ref","true","false","with"],operators:["=",">","<","<=",">=","==","!","!=",":=","::=","&&","||","+","-","*","/","@","&","%",":","->","\\","$","??","^"],symbols:/[@$=>](?!@symbols)/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]]}};e.conf=o,e.language=n,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/freemarker2-FWreY7v7.js b/emrg/gui/vendor/monaco/vs/freemarker2-FWreY7v7.js new file mode 100644 index 00000000..121ffed6 --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/freemarker2-FWreY7v7.js @@ -0,0 +1,3 @@ +define("vs/freemarker2-FWreY7v7",["exports","./editor-KLE6jdfb"],(function(i,c){"use strict";const s=["assign","flush","ftl","return","global","import","include","break","continue","local","nested","nt","setting","stop","t","lt","rt","fallback"],d=["attempt","autoesc","autoEsc","compress","comment","escape","noescape","function","if","list","items","sep","macro","noparse","noParse","noautoesc","noAutoEsc","outputformat","switch","visit","recurse"],a={close:">",id:"angle",open:"<"},r={close:"\\]",id:"bracket",open:"\\["},f={close:"[>\\]]",id:"auto",open:"[<\\[]"},p={close:"\\}",id:"dollar",open1:"\\$",open2:"\\{"},g={close:"\\]",id:"bracket",open1:"\\[",open2:"="};function l(t){return{brackets:[["<",">"],["[","]"],["(",")"],["{","}"]],comments:{blockComment:[`${t.open}--`,`--${t.close}`]},autoCloseBefore:` +\r }]),.:;=`,autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],folding:{markers:{start:new RegExp(`${t.open}#(?:${d.join("|")})([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`),end:new RegExp(`${t.open}/#(?:${d.join("|")})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:new RegExp(`${t.open}#(?!(?:${s.join("|")}))([a-zA-Z_]+)([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`),afterText:new RegExp(`^${t.open}/#([a-zA-Z_]+)[\\r\\n\\t ]*${t.close}$`),action:{indentAction:c.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`${t.open}#(?!(?:${s.join("|")}))([a-zA-Z_]+)([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`),action:{indentAction:c.languages.IndentAction.Indent}}]}}function A(){return{brackets:[["<",">"],["[","]"],["(",")"],["{","}"]],autoCloseBefore:` +\r }]),.:;=`,autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],folding:{markers:{start:new RegExp(`[<\\[]#(?:${d.join("|")})([^/>\\]]*(?!/)[>\\]])[^<\\[]*$`),end:new RegExp(`[<\\[]/#(?:${d.join("|")})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:new RegExp(`[<\\[]#(?!(?:${s.join("|")}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),afterText:new RegExp("^[<\\[]/#([a-zA-Z_]+)[\\r\\n\\t ]*[>\\]]$"),action:{indentAction:c.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`[<\\[]#(?!(?:${s.join("|")}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),action:{indentAction:c.languages.IndentAction.Indent}}]}}function _(t,n){const u=`_${t.id}_${n.id}`,e=k=>k.replace(/__id__/g,u),o=k=>{const D=k.source.replace(/__id__/g,u);return new RegExp(D,k.flags)};return{unicode:!0,includeLF:!1,start:e("default__id__"),ignoreCase:!1,defaultToken:"invalid",tokenPostfix:".freemarker2",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],[e("open__id__")]:new RegExp(t.open),[e("close__id__")]:new RegExp(t.close),[e("iOpen1__id__")]:new RegExp(n.open1),[e("iOpen2__id__")]:new RegExp(n.open2),[e("iClose__id__")]:new RegExp(n.close),[e("startTag__id__")]:o(/(@open__id__)(#)/),[e("endTag__id__")]:o(/(@open__id__)(\/#)/),[e("startOrEndTag__id__")]:o(/(@open__id__)(\/?#)/),[e("closeTag1__id__")]:o(/((?:@blank)*)(@close__id__)/),[e("closeTag2__id__")]:o(/((?:@blank)*\/?)(@close__id__)/),blank:/[ \t\n\r]/,keywords:["false","true","in","as","using"],directiveStartCloseTag1:/attempt|recover|sep|auto[eE]sc|no(?:autoe|AutoE)sc|compress|default|no[eE]scape|comment|no[pP]arse/,directiveStartCloseTag2:/else|break|continue|return|stop|flush|t|lt|rt|nt|nested|recurse|fallback|ftl/,directiveStartBlank:/if|else[iI]f|list|for[eE]ach|switch|case|assign|global|local|include|import|function|macro|transform|visit|stop|return|call|setting|output[fF]ormat|nested|recurse|escape|ftl|items/,directiveEndCloseTag1:/if|list|items|sep|recover|attempt|for[eE]ach|local|global|assign|function|macro|output[fF]ormat|auto[eE]sc|no(?:autoe|AutoE)sc|compress|transform|switch|escape|no[eE]scape/,escapedChar:/\\(?:[ntrfbgla\\'"\{=]|(?:x[0-9A-Fa-f]{1,4}))/,asciiDigit:/[0-9]/,integer:/[0-9]+/,nonEscapedIdStartChar:/[\$@-Z_a-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u1FFF\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183-\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3006\u3031-\u3035\u303B-\u303C\u3040-\u318F\u31A0-\u31BA\u31F0-\u31FF\u3300-\u337F\u3400-\u4DB5\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5-\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40-\uFB41\uFB43-\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,escapedIdChar:/\\[\-\.:#]/,idStartChar:/(?:@nonEscapedIdStartChar)|(?:@escapedIdChar)/,id:/(?:@idStartChar)(?:(?:@idStartChar)|(?:@asciiDigit))*/,specialHashKeys:/\*\*|\*|false|true|in|as|using/,namedSymbols:/<=|>=|\\lte|\\lt|<|\\gte|\\gt|>|&&|\\and|->|->|==|!=|\+=|-=|\*=|\/=|%=|\+\+|--|<=|&&|\|\||:|\.\.\.|\.\.\*|\.\.<|\.\.!|\?\?|=|<|\+|-|\*|\/|%|\||\.\.|\?|!|&|\.|,|;/,arrows:["->","->"],delimiters:[";",":",",","."],stringOperators:["lte","lt","gte","gt"],noParseTags:["noparse","noParse","comment"],tokenizer:{[e("default__id__")]:[{include:e("@directive_token__id__")},{include:e("@interpolation_and_text_token__id__")}],[e("fmExpression__id__.directive")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@directive_end_token__id__")},{include:e("@expression_token__id__")}],[e("fmExpression__id__.interpolation")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@expression_token__id__")},{include:e("@greater_operators_token__id__")}],[e("inParen__id__.plain")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@directive_end_token__id__")},{include:e("@expression_token__id__")}],[e("inParen__id__.gt")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@expression_token__id__")},{include:e("@greater_operators_token__id__")}],[e("noSpaceExpression__id__")]:[{include:e("@no_space_expression_end_token__id__")},{include:e("@directive_end_token__id__")},{include:e("@expression_token__id__")}],[e("unifiedCall__id__")]:[{include:e("@unified_call_token__id__")}],[e("singleString__id__")]:[{include:e("@string_single_token__id__")}],[e("doubleString__id__")]:[{include:e("@string_double_token__id__")}],[e("rawSingleString__id__")]:[{include:e("@string_single_raw_token__id__")}],[e("rawDoubleString__id__")]:[{include:e("@string_double_raw_token__id__")}],[e("expressionComment__id__")]:[{include:e("@expression_comment_token__id__")}],[e("noParse__id__")]:[{include:e("@no_parse_token__id__")}],[e("terseComment__id__")]:[{include:e("@terse_comment_token__id__")}],[e("directive_token__id__")]:[[o(/(?:@startTag__id__)(@directiveStartCloseTag1)(?:@closeTag1__id__)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{cases:{"@noParseTags":{token:"tag",next:e("@noParse__id__.$3")},"@default":{token:"tag"}}},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(?:@startTag__id__)(@directiveStartCloseTag2)(?:@closeTag2__id__)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(?:@startTag__id__)(@directiveStartBlank)(@blank)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"",next:e("@fmExpression__id__.directive")}]],[o(/(?:@endTag__id__)(@directiveEndCloseTag1)(?:@closeTag1__id__)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(@open__id__)(@)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive",next:e("@unifiedCall__id__")}]],[o(/(@open__id__)(\/@)((?:(?:@id)(?:\.(?:@id))*)?)(?:@closeTag1__id__)/),[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(@open__id__)#--/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:{token:"comment",next:e("@terseComment__id__")}],[o(/(?:@startOrEndTag__id__)([a-zA-Z_]+)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag.invalid",next:e("@fmExpression__id__.directive")}]]],[e("interpolation_and_text_token__id__")]:[[o(/(@iOpen1__id__)(@iOpen2__id__)/),[{token:n.id==="bracket"?"@brackets.interpolation":"delimiter.interpolation"},{token:n.id==="bracket"?"delimiter.interpolation":"@brackets.interpolation",next:e("@fmExpression__id__.interpolation")}]],[/[\$#<\[\{]|(?:@blank)+|[^\$<#\[\{\n\r\t ]+/,{token:"source"}]],[e("string_single_token__id__")]:[[/[^'\\]/,{token:"string"}],[/@escapedChar/,{token:"string.escape"}],[/'/,{token:"string",next:"@pop"}]],[e("string_double_token__id__")]:[[/[^"\\]/,{token:"string"}],[/@escapedChar/,{token:"string.escape"}],[/"/,{token:"string",next:"@pop"}]],[e("string_single_raw_token__id__")]:[[/[^']+/,{token:"string.raw"}],[/'/,{token:"string.raw",next:"@pop"}]],[e("string_double_raw_token__id__")]:[[/[^"]+/,{token:"string.raw"}],[/"/,{token:"string.raw",next:"@pop"}]],[e("expression_token__id__")]:[[/(r?)(['"])/,{cases:{"r'":[{token:"keyword"},{token:"string.raw",next:e("@rawSingleString__id__")}],'r"':[{token:"keyword"},{token:"string.raw",next:e("@rawDoubleString__id__")}],"'":[{token:"source"},{token:"string",next:e("@singleString__id__")}],'"':[{token:"source"},{token:"string",next:e("@doubleString__id__")}]}}],[/(?:@integer)(?:\.(?:@integer))?/,{cases:{"(?:@integer)":{token:"number"},"@default":{token:"number.float"}}}],[/(\.)(@blank*)(@specialHashKeys)/,[{token:"delimiter"},{token:""},{token:"identifier"}]],[/(?:@namedSymbols)/,{cases:{"@arrows":{token:"meta.arrow"},"@delimiters":{token:"delimiter"},"@default":{token:"operators"}}}],[/@id/,{cases:{"@keywords":{token:"keyword.$0"},"@stringOperators":{token:"operators"},"@default":{token:"identifier"}}}],[/[\[\]\(\)\{\}]/,{cases:{"\\[":{cases:{"$S2==gt":{token:"@brackets",next:e("@inParen__id__.gt")},"@default":{token:"@brackets",next:e("@inParen__id__.plain")}}},"\\]":{cases:{...n.id==="bracket"?{"$S2==interpolation":{token:"@brackets.interpolation",next:"@popall"}}:{},...t.id==="bracket"?{"$S2==directive":{token:"@brackets.directive",next:"@popall"}}:{},[e("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}},"\\(":{token:"@brackets",next:e("@inParen__id__.gt")},"\\)":{cases:{[e("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}},"\\{":{cases:{"$S2==gt":{token:"@brackets",next:e("@inParen__id__.gt")},"@default":{token:"@brackets",next:e("@inParen__id__.plain")}}},"\\}":{cases:{...n.id==="bracket"?{}:{"$S2==interpolation":{token:"@brackets.interpolation",next:"@popall"}},[e("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}}}}],[/\$\{/,{token:"delimiter.invalid"}]],[e("blank_and_expression_comment_token__id__")]:[[/(?:@blank)+/,{token:""}],[/[<\[][#!]--/,{token:"comment",next:e("@expressionComment__id__")}]],[e("directive_end_token__id__")]:[[/>/,t.id==="bracket"?{token:"operators"}:{token:"@brackets.directive",next:"@popall"}],[o(/(\/)(@close__id__)/),[{token:"delimiter.directive"},{token:"@brackets.directive",next:"@popall"}]]],[e("greater_operators_token__id__")]:[[/>/,{token:"operators"}],[/>=/,{token:"operators"}]],[e("no_space_expression_end_token__id__")]:[[/(?:@blank)+/,{token:"",switchTo:e("@fmExpression__id__.directive")}]],[e("unified_call_token__id__")]:[[/(@id)((?:@blank)+)/,[{token:"tag"},{token:"",next:e("@fmExpression__id__.directive")}]],[o(/(@id)(\/?)(@close__id__)/),[{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive",next:"@popall"}]],[/./,{token:"@rematch",next:e("@noSpaceExpression__id__")}]],[e("no_parse_token__id__")]:[[o(/(@open__id__)(\/#?)([a-zA-Z]+)((?:@blank)*)(@close__id__)/),{cases:{"$S2==$3":[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:""},{token:"@brackets.directive",next:"@popall"}],"$S2==comment":[{token:"comment"},{token:"comment"},{token:"comment"},{token:"comment"},{token:"comment"}],"@default":[{token:"source"},{token:"source"},{token:"source"},{token:"source"},{token:"source"}]}}],[/[^<\[\-]+|[<\[\-]/,{cases:{"$S2==comment":{token:"comment"},"@default":{token:"source"}}}]],[e("expression_comment_token__id__")]:[[/--[>\]]/,{token:"comment",next:"@pop"}],[/[^\->\]]+|[>\]\-]/,{token:"comment"}]],[e("terse_comment_token__id__")]:[[o(/--(?:@close__id__)/),{token:"comment",next:"@popall"}],[/[^<\[\-]+|[<\[\-]/,{token:"comment"}]]}}}function m(t){const n=_(a,t),u=_(r,t),e=_(f,t);return{...n,...u,...e,unicode:!0,includeLF:!1,start:`default_auto_${t.id}`,ignoreCase:!1,defaultToken:"invalid",tokenPostfix:".freemarker2",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{...n.tokenizer,...u.tokenizer,...e.tokenizer}}}const F={conf:l(a),language:_(a,p)},b={conf:l(r),language:_(r,p)},x={conf:l(a),language:_(a,g)},$={conf:l(r),language:_(r,g)},B={conf:A(),language:m(p)},E={conf:A(),language:m(g)};i.TagAngleInterpolationBracket=x,i.TagAngleInterpolationDollar=F,i.TagAutoInterpolationBracket=E,i.TagAutoInterpolationDollar=B,i.TagBracketInterpolationBracket=$,i.TagBracketInterpolationDollar=b,Object.defineProperty(i,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/fsharp-BOMdg4U1.js b/emrg/gui/vendor/monaco/vs/fsharp-BOMdg4U1.js new file mode 100644 index 00000000..ac695e97 --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/fsharp-BOMdg4U1.js @@ -0,0 +1 @@ +define("vs/fsharp-BOMdg4U1",["exports"],(function(e){"use strict";const n={comments:{lineComment:"//",blockComment:["(*","*)"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*//\\s*#region\\b|^\\s*\\(\\*\\s*#region(.*)\\*\\)"),end:new RegExp("^\\s*//\\s*#endregion\\b|^\\s*\\(\\*\\s*#endregion\\s*\\*\\)")}}},t={defaultToken:"",tokenPostfix:".fs",keywords:["abstract","and","atomic","as","assert","asr","base","begin","break","checked","component","const","constraint","constructor","continue","class","default","delegate","do","done","downcast","downto","elif","else","end","exception","eager","event","external","extern","false","finally","for","fun","function","fixed","functor","global","if","in","include","inherit","inline","interface","internal","land","lor","lsl","lsr","lxor","lazy","let","match","member","mod","module","mutable","namespace","method","mixin","new","not","null","of","open","or","object","override","private","parallel","process","protected","pure","public","rec","return","static","sealed","struct","sig","then","to","true","tailcall","trait","try","type","upcast","use","val","void","virtual","volatile","when","while","with","yield"],symbols:/[=>\]/,"annotation"],[/^#(if|else|endif)/,"keyword"],[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,"delimiter"],[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/,"number.float"],[/0x[0-9a-fA-F]+LF/,"number.float"],[/0x[0-9a-fA-F]+(@integersuffix)/,"number.hex"],[/0b[0-1]+(@integersuffix)/,"number.bin"],[/\d+(@integersuffix)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"""/,"string",'@string."""'],[/"/,"string",'@string."'],[/\@"/,{token:"string.quote",next:"@litstring"}],[/'[^\\']'B?/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\(\*(?!\))/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^*(]+/,"comment"],[/\*\)/,"comment","@pop"],[/\*/,"comment"],[/\(\*\)/,"comment"],[/\(/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/("""|"B?)/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}]],litstring:[[/[^"]+/,"string"],[/""/,"string.escape"],[/"/,{token:"string.quote",next:"@pop"}]]}};e.conf=n,e.language=t,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/go-D_hbi-Jt.js b/emrg/gui/vendor/monaco/vs/go-D_hbi-Jt.js new file mode 100644 index 00000000..7f58a6be --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/go-D_hbi-Jt.js @@ -0,0 +1 @@ +define("vs/go-D_hbi-Jt",["exports"],(function(e){"use strict";const n={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"`",close:"`",notIn:["string"]},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"`",close:"`"},{open:'"',close:'"'},{open:"'",close:"'"}]},o={defaultToken:"",tokenPostfix:".go",keywords:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var","bool","true","false","uint8","uint16","uint32","uint64","int8","int16","int32","int64","float32","float64","complex64","complex128","byte","rune","uint","int","uintptr","string","nil"],operators:["+","-","*","/","%","&","|","^","<<",">>","&^","+=","-=","*=","/=","%=","&=","|=","^=","<<=",">>=","&^=","&&","||","<-","++","--","==","<",">","=","!","!=","<=",">=",":=","...","(",")","","]","{","}",",",";",".",":"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,"number.hex"],[/0[0-7']*[0-7]/,"number.octal"],[/0[bB][0-1']*[0-1]/,"number.binary"],[/\d[\d']*/,"number"],[/\d/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/`/,"string","@rawstring"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@doccomment"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],doccomment:[[/[^\/*]+/,"comment.doc"],[/\/\*/,"comment.doc.invalid"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],rawstring:[[/[^\`]/,"string"],[/`/,"string","@pop"]]}};e.conf=n,e.language=o,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/graphql-CKUU4kLG.js b/emrg/gui/vendor/monaco/vs/graphql-CKUU4kLG.js new file mode 100644 index 00000000..9139c48e --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/graphql-CKUU4kLG.js @@ -0,0 +1 @@ +define("vs/graphql-CKUU4kLG",["exports"],(function(e){"use strict";const n={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"""',close:'"""',notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"""',close:'"""'},{open:'"',close:'"'}],folding:{offSide:!0}},t={defaultToken:"invalid",tokenPostfix:".gql",keywords:["null","true","false","query","mutation","subscription","extend","schema","directive","scalar","type","interface","union","enum","input","implements","fragment","on"],typeKeywords:["Int","Float","String","Boolean","ID"],directiveLocations:["SCHEMA","SCALAR","OBJECT","FIELD_DEFINITION","ARGUMENT_DEFINITION","INTERFACE","UNION","ENUM","ENUM_VALUE","INPUT_OBJECT","INPUT_FIELD_DEFINITION","QUERY","MUTATION","SUBSCRIPTION","FIELD","FRAGMENT_DEFINITION","FRAGMENT_SPREAD","INLINE_FRAGMENT","VARIABLE_DEFINITION"],operators:["=","!","?",":","&","|"],symbols:/[=!?:&|]+/,escapes:/\\(?:["\\\/bfnrt]|u[0-9A-Fa-f]{4})/,tokenizer:{root:[[/[a-z_][\w$]*/,{cases:{"@keywords":"keyword","@default":"key.identifier"}}],[/[$][\w$]*/,{cases:{"@keywords":"keyword","@default":"argument.identifier"}}],[/[A-Z][\w\$]*/,{cases:{"@typeKeywords":"keyword","@default":"type.identifier"}}],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":""}}],[/@\s*[a-zA-Z_\$][\w\$]*/,{token:"annotation",log:"annotation token: $0"}],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+/,"number.hex"],[/\d+/,"number"],[/[;,.]/,"delimiter"],[/"""/,{token:"string",next:"@mlstring",nextEmbedded:"markdown"}],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,{token:"string.quote",bracket:"@open",next:"@string"}]],mlstring:[[/[^"]+/,"string"],['"""',{token:"string",next:"@pop",nextEmbedded:"@pop"}]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[/#.*$/,"comment"]]}};e.conf=n,e.language=t,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/handlebars-CZi4pHCH.js b/emrg/gui/vendor/monaco/vs/handlebars-CZi4pHCH.js new file mode 100644 index 00000000..475b5801 --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/handlebars-CZi4pHCH.js @@ -0,0 +1 @@ +define("vs/handlebars-CZi4pHCH",["exports","./editor-KLE6jdfb"],(function(e,t){"use strict";const n=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],a={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["{{!--","--}}"]},brackets:[[""],["<",">"],["{{","}}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${n.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:t.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${n.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:t.languages.IndentAction.Indent}}]},r={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/\{\{!--/,"comment.block.start.handlebars","@commentBlock"],[/\{\{!/,"comment.start.handlebars","@comment"],[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.root"}],[/)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)(\w+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/\}\}/,"comment.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentBlock:[[/--\}\}/,"comment.block.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentHtml:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],handlebarsInSimpleState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3"}],{include:"handlebarsRoot"}],handlebarsInEmbeddedState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],{include:"handlebarsRoot"}],handlebarsRoot:[[/"[^"]*"/,"string.handlebars"],[/[#/][^\s}]+/,"keyword.helper.handlebars"],[/else\b/,"keyword.helper.handlebars"],[/[\s]+/],[/[^}]/,"variable.parameter.handlebars"]]}};e.conf=a,e.language=r,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/hcl-DTaboeZW.js b/emrg/gui/vendor/monaco/vs/hcl-DTaboeZW.js new file mode 100644 index 00000000..dbe51317 --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/hcl-DTaboeZW.js @@ -0,0 +1 @@ +define("vs/hcl-DTaboeZW",["exports"],(function(e){"use strict";const t={comments:{lineComment:"#",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}]},s={defaultToken:"",tokenPostfix:".hcl",keywords:["var","local","path","for_each","any","string","number","bool","true","false","null","if ","else ","endif ","for ","in","endfor"],operators:["=",">=","<=","==","!=","+","-","*","/","%","&&","||","!","<",">","?","...",":"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":""}}],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/\d[\d']*/,"number"],[/\d/,"number"],[/[;,.]/,"delimiter"],[/"/,"string","@string"],[/'/,"invalid"]],heredoc:[[/<<[-]*\s*["]?([\w\-]+)["]?/,{token:"string.heredoc.delimiter",next:"@heredocBody.$1"}]],heredocBody:[[/([\w\-]+)$/,{cases:{"$1==$S2":[{token:"string.heredoc.delimiter",next:"@popall"}],"@default":"string.heredoc"}}],[/./,"string.heredoc"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"],[/#.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],string:[[/\$\{/,{token:"delimiter",next:"@stringExpression"}],[/[^\\"\$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@popall"]],stringInsideExpression:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],stringExpression:[[/\}/,{token:"delimiter",next:"@pop"}],[/"/,"string","@stringInsideExpression"],{include:"@terraform"}]}};e.conf=t,e.language=s,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/html-j_7ZTNRU.js b/emrg/gui/vendor/monaco/vs/html-j_7ZTNRU.js new file mode 100644 index 00000000..faf85e44 --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/html-j_7ZTNRU.js @@ -0,0 +1 @@ +define("vs/html-j_7ZTNRU",["exports","./editor-KLE6jdfb"],(function(e,t){"use strict";const n=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],i={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:[""]},brackets:[[""],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${n.join("|")}))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:t.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${n.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:t.languages.IndentAction.Indent}}],folding:{markers:{start:new RegExp("^\\s*"),end:new RegExp("^\\s*")}}},r={defaultToken:"",tokenPostfix:".html",ignoreCase:!0,tokenizer:{root:[[/)/,["delimiter","tag","","delimiter"]],[/(<)(script)/,["delimiter",{token:"tag",next:"@script"}]],[/(<)(style)/,["delimiter",{token:"tag",next:"@style"}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/]+/,"metatag.content"],[/>/,"metatag","@pop"]],comment:[[/-->/,"comment","@pop"],[/[^-]+/,"comment.content"],[/./,"comment.content"]],otherTag:[[/\/?>/,"delimiter","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],scriptAfterType:[[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/"module"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/'module'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/>/,{token:"delimiter",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]],style:[[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],styleAfterType:[[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/>/,{token:"delimiter",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}};e.conf=i,e.language=r,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/html.worker-CA3iAimZ.js b/emrg/gui/vendor/monaco/vs/html.worker-CA3iAimZ.js new file mode 100644 index 00000000..2a2c20eb --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/html.worker-CA3iAimZ.js @@ -0,0 +1 @@ +define("vs/html.worker-CA3iAimZ", ["require", "exports"], (function(require, r){"use strict";const e=""+new URL(require.toUrl("./assets/html.worker-D1SL3iM8.js"),document.baseURI).href;r.__worker_url_0__=e})); diff --git a/emrg/gui/vendor/monaco/vs/htmlMode-27by_KM4.js b/emrg/gui/vendor/monaco/vs/htmlMode-27by_KM4.js new file mode 100644 index 00000000..76ab0f23 --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/htmlMode-27by_KM4.js @@ -0,0 +1 @@ +define("vs/htmlMode-27by_KM4",["exports","./html.worker-CA3iAimZ","./workers-BBttULjf","./lspLanguageFeatures-BIkJOWLw","./editor-KLE6jdfb"],(function(i,_,v,e,n){"use strict";class l{constructor(d){this._defaults=d,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>12e4&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=v.createWebWorker({moduleId:"vs/language/html/htmlWorker",createWorker:()=>new Worker(_.__worker_url_0__,{type:"module"}),createData:{languageSettings:this._defaults.options,languageId:this._defaults.languageId},label:this._defaults.languageId}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...d){let t;return this._getClient().then(r=>{t=r}).then(r=>{if(this._worker)return this._worker.withSyncedResources(d)}).then(r=>t)}}class a extends e.CompletionAdapter{constructor(d){super(d,[".",":","<",'"',"=","/"])}}function u(o){const d=new l(o),t=(...c)=>d.getLanguageServiceWorker(...c);let r=o.languageId;n.languages.registerCompletionItemProvider(r,new a(t)),n.languages.registerHoverProvider(r,new e.HoverAdapter(t)),n.languages.registerDocumentHighlightProvider(r,new e.DocumentHighlightAdapter(t)),n.languages.registerLinkProvider(r,new e.DocumentLinkAdapter(t)),n.languages.registerFoldingRangeProvider(r,new e.FoldingRangeAdapter(t)),n.languages.registerDocumentSymbolProvider(r,new e.DocumentSymbolAdapter(t)),n.languages.registerSelectionRangeProvider(r,new e.SelectionRangeAdapter(t)),n.languages.registerRenameProvider(r,new e.RenameAdapter(t)),r==="html"&&(n.languages.registerDocumentFormattingEditProvider(r,new e.DocumentFormattingEditProvider(t)),n.languages.registerDocumentRangeFormattingEditProvider(r,new e.DocumentRangeFormattingEditProvider(t)))}function w(o){const d=[],t=[],r=new l(o);d.push(r);const c=(...g)=>r.getLanguageServiceWorker(...g);function f(){const{languageId:g,modeConfiguration:m}=o;h(t),m.completionItems&&t.push(n.languages.registerCompletionItemProvider(g,new a(c))),m.hovers&&t.push(n.languages.registerHoverProvider(g,new e.HoverAdapter(c))),m.documentHighlights&&t.push(n.languages.registerDocumentHighlightProvider(g,new e.DocumentHighlightAdapter(c))),m.links&&t.push(n.languages.registerLinkProvider(g,new e.DocumentLinkAdapter(c))),m.documentSymbols&&t.push(n.languages.registerDocumentSymbolProvider(g,new e.DocumentSymbolAdapter(c))),m.rename&&t.push(n.languages.registerRenameProvider(g,new e.RenameAdapter(c))),m.foldingRanges&&t.push(n.languages.registerFoldingRangeProvider(g,new e.FoldingRangeAdapter(c))),m.selectionRanges&&t.push(n.languages.registerSelectionRangeProvider(g,new e.SelectionRangeAdapter(c))),m.documentFormattingEdits&&t.push(n.languages.registerDocumentFormattingEditProvider(g,new e.DocumentFormattingEditProvider(c))),m.documentRangeFormattingEdits&&t.push(n.languages.registerDocumentRangeFormattingEditProvider(g,new e.DocumentRangeFormattingEditProvider(c)))}return f(),d.push(s(t)),s(d)}function s(o){return{dispose:()=>h(o)}}function h(o){for(;o.length;)o.pop().dispose()}i.CompletionAdapter=e.CompletionAdapter,i.DefinitionAdapter=e.DefinitionAdapter,i.DiagnosticsAdapter=e.DiagnosticsAdapter,i.DocumentColorAdapter=e.DocumentColorAdapter,i.DocumentFormattingEditProvider=e.DocumentFormattingEditProvider,i.DocumentHighlightAdapter=e.DocumentHighlightAdapter,i.DocumentLinkAdapter=e.DocumentLinkAdapter,i.DocumentRangeFormattingEditProvider=e.DocumentRangeFormattingEditProvider,i.DocumentSymbolAdapter=e.DocumentSymbolAdapter,i.FoldingRangeAdapter=e.FoldingRangeAdapter,i.HoverAdapter=e.HoverAdapter,i.ReferenceAdapter=e.ReferenceAdapter,i.RenameAdapter=e.RenameAdapter,i.SelectionRangeAdapter=e.SelectionRangeAdapter,i.fromPosition=e.fromPosition,i.fromRange=e.fromRange,i.toRange=e.toRange,i.toTextEdit=e.toTextEdit,i.WorkerManager=l,i.setupMode=w,i.setupMode1=u,Object.defineProperty(i,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/index-049xrXrp.js b/emrg/gui/vendor/monaco/vs/index-049xrXrp.js new file mode 100644 index 00000000..61b7908e --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/index-049xrXrp.js @@ -0,0 +1 @@ +define("vs/index-049xrXrp",["exports"],(function(E){"use strict";function M(...m){const o=m[0];let f,d,a;if(typeof o=="string")f=o,d=o,m.splice(0,1),a=!m||typeof m[0]!="object"?m:m[0];else if(o instanceof Array){const g=m.slice(1);if(o.length!==g.length+1)throw new Error("expected a string as the first argument to l10n.t");let b=o[0];for(let w=1;w0&&(f+=`/${Array.isArray(o.comment)?o.comment.join(""):o.comment}`),a=o.args??{};return Z(d,a)}var W=/{([^}]+)}/g;function Z(m,o){return Object.keys(o).length===0?m:m.replace(W,(f,d)=>o[d]??f)}class L{constructor(o,f,d,a){this._uri=o,this._languageId=f,this._version=d,this._content=a,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(o){if(o){const f=this.offsetAt(o.start),d=this.offsetAt(o.end);return this._content.substring(f,d)}return this._content}update(o,f){for(let d of o)if(L.isIncremental(d)){const a=B(d.range),g=this.offsetAt(a.start),b=this.offsetAt(a.end);this._content=this._content.substring(0,g)+d.text+this._content.substring(b,this._content.length);const w=Math.max(a.start.line,0),t=Math.max(a.end.line,0);let e=this._lineOffsets;const r=z(d.text,!1,g);if(t-w===r.length)for(let s=0,c=r.length;so?a=b:d=b+1}let g=d-1;return{line:g,character:o-f[g]}}offsetAt(o){let f=this.getLineOffsets();if(o.line>=f.length)return this._content.length;if(o.line<0)return 0;let d=f[o.line],a=o.line+1{let s=r.range.start.line-i.range.start.line;return s===0?r.range.start.character-i.range.start.character:s}),t=0;const e=[];for(const r of w){let i=a.offsetAt(r.range.start);if(it&&e.push(b.substring(t,i)),r.newText.length&&e.push(r.newText),t=a.offsetAt(r.range.end)}return e.push(b.substr(t)),e.join("")}m.applyEdits=d})(E.TextDocument||(E.TextDocument={}));function R(m,o){if(m.length<=1)return m;const f=m.length/2|0,d=m.slice(0,f),a=m.slice(f);R(d,o),R(a,o);let g=0,b=0,w=0;for(;gf.line||o.line===f.line&&o.character>f.character?{start:f,end:o}:m}function G(m){const o=B(m.range);return o!==m.range?{newText:m.newText,range:o}:m}var D;(()=>{var m={470:a=>{function g(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function b(t,e){for(var r,i="",s=0,c=-1,p=0,y=0;y<=t.length;++y){if(y2){var x=i.lastIndexOf("/");if(x!==i.length-1){x===-1?(i="",s=0):s=(i=i.slice(0,x)).length-1-i.lastIndexOf("/"),c=y,p=0;continue}}else if(i.length===2||i.length===1){i="",s=0,c=y,p=0;continue}}e&&(i.length>0?i+="/..":i="..",s=2)}else i.length>0?i+="/"+t.slice(c+1,y):i=t.slice(c+1,y),s=y-c-1;c=y,p=0}else r===46&&p!==-1?++p:p=-1}return i}var w={resolve:function(){for(var t,e="",r=!1,i=arguments.length-1;i>=-1&&!r;i--){var s;i>=0?s=arguments[i]:(t===void 0&&(t=process.cwd()),s=t),g(s),s.length!==0&&(e=s+"/"+e,r=s.charCodeAt(0)===47)}return e=b(e,!r),r?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(t){if(g(t),t.length===0)return".";var e=t.charCodeAt(0)===47,r=t.charCodeAt(t.length-1)===47;return(t=b(t,!e)).length!==0||e||(t="."),t.length>0&&r&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return g(t),t.length>0&&t.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var t,e=0;e0&&(t===void 0?t=r:t+="/"+r)}return t===void 0?".":w.normalize(t)},relative:function(t,e){if(g(t),g(e),t===e||(t=w.resolve(t))===(e=w.resolve(e)))return"";for(var r=1;ry){if(e.charCodeAt(c+C)===47)return e.slice(c+C+1);if(C===0)return e.slice(c+C)}else s>y&&(t.charCodeAt(r+C)===47?x=C:C===0&&(x=0));break}var P=t.charCodeAt(r+C);if(P!==e.charCodeAt(c+C))break;P===47&&(x=C)}var j="";for(C=r+x+1;C<=i;++C)C!==i&&t.charCodeAt(C)!==47||(j.length===0?j+="..":j+="/..");return j.length>0?j+e.slice(c+x):(c+=x,e.charCodeAt(c)===47&&++c,e.slice(c))},_makeLong:function(t){return t},dirname:function(t){if(g(t),t.length===0)return".";for(var e=t.charCodeAt(0),r=e===47,i=-1,s=!0,c=t.length-1;c>=1;--c)if((e=t.charCodeAt(c))===47){if(!s){i=c;break}}else s=!1;return i===-1?r?"/":".":r&&i===1?"//":t.slice(0,i)},basename:function(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');g(t);var r,i=0,s=-1,c=!0;if(e!==void 0&&e.length>0&&e.length<=t.length){if(e.length===t.length&&e===t)return"";var p=e.length-1,y=-1;for(r=t.length-1;r>=0;--r){var x=t.charCodeAt(r);if(x===47){if(!c){i=r+1;break}}else y===-1&&(c=!1,y=r+1),p>=0&&(x===e.charCodeAt(p)?--p==-1&&(s=r):(p=-1,s=y))}return i===s?s=y:s===-1&&(s=t.length),t.slice(i,s)}for(r=t.length-1;r>=0;--r)if(t.charCodeAt(r)===47){if(!c){i=r+1;break}}else s===-1&&(c=!1,s=r+1);return s===-1?"":t.slice(i,s)},extname:function(t){g(t);for(var e=-1,r=0,i=-1,s=!0,c=0,p=t.length-1;p>=0;--p){var y=t.charCodeAt(p);if(y!==47)i===-1&&(s=!1,i=p+1),y===46?e===-1?e=p:c!==1&&(c=1):e!==-1&&(c=-1);else if(!s){r=p+1;break}}return e===-1||i===-1||c===0||c===1&&e===i-1&&e===r+1?"":t.slice(e,i)},format:function(t){if(t===null||typeof t!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return(function(e,r){var i=r.dir||r.root,s=r.base||(r.name||"")+(r.ext||"");return i?i===r.root?i+s:i+"/"+s:s})(0,t)},parse:function(t){g(t);var e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;var r,i=t.charCodeAt(0),s=i===47;s?(e.root="/",r=1):r=0;for(var c=-1,p=0,y=-1,x=!0,C=t.length-1,P=0;C>=r;--C)if((i=t.charCodeAt(C))!==47)y===-1&&(x=!1,y=C+1),i===46?c===-1?c=C:P!==1&&(P=1):c!==-1&&(P=-1);else if(!x){p=C+1;break}return c===-1||y===-1||P===0||P===1&&c===y-1&&c===p+1?y!==-1&&(e.base=e.name=p===0&&s?t.slice(1,y):t.slice(p,y)):(p===0&&s?(e.name=t.slice(1,c),e.base=t.slice(1,y)):(e.name=t.slice(p,c),e.base=t.slice(p,y)),e.ext=t.slice(c,y)),p>0?e.dir=t.slice(0,p-1):s&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};w.posix=w,a.exports=w}},o={};function f(a){var g=o[a];if(g!==void 0)return g.exports;var b=o[a]={exports:{}};return m[a](b,b.exports,f),b.exports}f.d=(a,g)=>{for(var b in g)f.o(g,b)&&!f.o(a,b)&&Object.defineProperty(a,b,{enumerable:!0,get:g[b]})},f.o=(a,g)=>Object.prototype.hasOwnProperty.call(a,g),f.r=a=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})};var d={};(()=>{let a;f.r(d),f.d(d,{URI:()=>s,Utils:()=>k}),typeof process=="object"?a=process.platform==="win32":typeof navigator=="object"&&(a=navigator.userAgent.indexOf("Windows")>=0);const g=/^\w[\w\d+.-]*$/,b=/^\//,w=/^\/\//;function t(h,n){if(!h.scheme&&n)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${h.authority}", path: "${h.path}", query: "${h.query}", fragment: "${h.fragment}"}`);if(h.scheme&&!g.test(h.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(h.path){if(h.authority){if(!b.test(h.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(w.test(h.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}const e="",r="/",i=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class s{static isUri(n){return n instanceof s||!!n&&typeof n.authority=="string"&&typeof n.fragment=="string"&&typeof n.path=="string"&&typeof n.query=="string"&&typeof n.scheme=="string"&&typeof n.fsPath=="string"&&typeof n.with=="function"&&typeof n.toString=="function"}scheme;authority;path;query;fragment;constructor(n,u,l,_,A,v=!1){typeof n=="object"?(this.scheme=n.scheme||e,this.authority=n.authority||e,this.path=n.path||e,this.query=n.query||e,this.fragment=n.fragment||e):(this.scheme=(function(U,I){return U||I?U:"file"})(n,v),this.authority=u||e,this.path=(function(U,I){switch(U){case"https":case"http":case"file":I?I[0]!==r&&(I=r+I):I=r}return I})(this.scheme,l||e),this.query=_||e,this.fragment=A||e,t(this,v))}get fsPath(){return P(this)}with(n){if(!n)return this;let{scheme:u,authority:l,path:_,query:A,fragment:v}=n;return u===void 0?u=this.scheme:u===null&&(u=e),l===void 0?l=this.authority:l===null&&(l=e),_===void 0?_=this.path:_===null&&(_=e),A===void 0?A=this.query:A===null&&(A=e),v===void 0?v=this.fragment:v===null&&(v=e),u===this.scheme&&l===this.authority&&_===this.path&&A===this.query&&v===this.fragment?this:new p(u,l,_,A,v)}static parse(n,u=!1){const l=i.exec(n);return l?new p(l[2]||e,q(l[4]||e),q(l[5]||e),q(l[7]||e),q(l[9]||e),u):new p(e,e,e,e,e)}static file(n){let u=e;if(a&&(n=n.replace(/\\/g,r)),n[0]===r&&n[1]===r){const l=n.indexOf(r,2);l===-1?(u=n.substring(2),n=r):(u=n.substring(2,l),n=n.substring(l)||r)}return new p("file",u,n,e,e)}static from(n){const u=new p(n.scheme,n.authority,n.path,n.query,n.fragment);return t(u,!0),u}toString(n=!1){return j(this,n)}toJSON(){return this}static revive(n){if(n){if(n instanceof s)return n;{const u=new p(n);return u._formatted=n.external,u._fsPath=n._sep===c?n.fsPath:null,u}}return n}}const c=a?1:void 0;class p extends s{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=P(this)),this._fsPath}toString(n=!1){return n?j(this,!0):(this._formatted||(this._formatted=j(this,!1)),this._formatted)}toJSON(){const n={$mid:1};return this._fsPath&&(n.fsPath=this._fsPath,n._sep=c),this._formatted&&(n.external=this._formatted),this.path&&(n.path=this.path),this.scheme&&(n.scheme=this.scheme),this.authority&&(n.authority=this.authority),this.query&&(n.query=this.query),this.fragment&&(n.fragment=this.fragment),n}}const y={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function x(h,n,u){let l,_=-1;for(let A=0;A=97&&v<=122||v>=65&&v<=90||v>=48&&v<=57||v===45||v===46||v===95||v===126||n&&v===47||u&&v===91||u&&v===93||u&&v===58)_!==-1&&(l+=encodeURIComponent(h.substring(_,A)),_=-1),l!==void 0&&(l+=h.charAt(A));else{l===void 0&&(l=h.substr(0,A));const U=y[v];U!==void 0?(_!==-1&&(l+=encodeURIComponent(h.substring(_,A)),_=-1),l+=U):_===-1&&(_=A)}}return _!==-1&&(l+=encodeURIComponent(h.substring(_))),l!==void 0?l:h}function C(h){let n;for(let u=0;u1&&h.scheme==="file"?`//${h.authority}${h.path}`:h.path.charCodeAt(0)===47&&(h.path.charCodeAt(1)>=65&&h.path.charCodeAt(1)<=90||h.path.charCodeAt(1)>=97&&h.path.charCodeAt(1)<=122)&&h.path.charCodeAt(2)===58?h.path[1].toLowerCase()+h.path.substr(2):h.path,a&&(u=u.replace(/\//g,"\\")),u}function j(h,n){const u=n?C:x;let l="",{scheme:_,authority:A,path:v,query:U,fragment:I}=h;if(_&&(l+=_,l+=":"),(A||_==="file")&&(l+=r,l+=r),A){let O=A.indexOf("@");if(O!==-1){const $=A.substr(0,O);A=A.substr(O+1),O=$.lastIndexOf(":"),O===-1?l+=u($,!1,!1):(l+=u($.substr(0,O),!1,!1),l+=":",l+=u($.substr(O+1),!1,!0)),l+="@"}A=A.toLowerCase(),O=A.lastIndexOf(":"),O===-1?l+=u(A,!1,!0):(l+=u(A.substr(0,O),!1,!0),l+=A.substr(O))}if(v){if(v.length>=3&&v.charCodeAt(0)===47&&v.charCodeAt(2)===58){const O=v.charCodeAt(1);O>=65&&O<=90&&(v=`/${String.fromCharCode(O+32)}:${v.substr(3)}`)}else if(v.length>=2&&v.charCodeAt(1)===58){const O=v.charCodeAt(0);O>=65&&O<=90&&(v=`${String.fromCharCode(O+32)}:${v.substr(2)}`)}l+=u(v,!0,!1)}return U&&(l+="?",l+=u(U,!1,!1)),I&&(l+="#",l+=n?I:x(I,!1,!1)),l}function F(h){try{return decodeURIComponent(h)}catch{return h.length>3?h.substr(0,3)+F(h.substr(3)):h}}const J=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function q(h){return h.match(J)?h.replace(J,(n=>F(n))):h}var N=f(470);const S=N.posix||N,T="/";var k;(function(h){h.joinPath=function(n,...u){return n.with({path:S.join(n.path,...u)})},h.resolvePath=function(n,...u){let l=n.path,_=!1;l[0]!==T&&(l=T+l,_=!0);let A=S.resolve(l,...u);return _&&A[0]===T&&!n.authority&&(A=A.substring(1)),n.with({path:A})},h.dirname=function(n){if(n.path.length===0||n.path===T)return n;let u=S.dirname(n.path);return u.length===1&&u.charCodeAt(0)===46&&(u=""),n.with({path:u})},h.basename=function(n){return S.basename(n.path)},h.extname=function(n){return S.extname(n.path)}})(k||(k={}))})(),D=d})();const{URI:H,Utils:K}=D;E.URI=H,E.Utils=K,E.t=M})); diff --git a/emrg/gui/vendor/monaco/vs/index-CBVt3dzv.js b/emrg/gui/vendor/monaco/vs/index-CBVt3dzv.js new file mode 100644 index 00000000..5c27cec7 --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/index-CBVt3dzv.js @@ -0,0 +1,5 @@ +define("vs/index-CBVt3dzv",["exports","./editor-KLE6jdfb","./toggleHighContrast-qGX7E9o7","./basic-languages/monaco.contribution","./monaco.contribution-9cKT3C7t","./monaco.contribution-BgRy6xDf","./monaco.contribution-BPhsneLd","./monaco.contribution-BE88ZNGY"],(function(U,s,k,Wn,Pe,He,Le,Ie){"use strict";function Oe(e){return e.method!==void 0}var V;(function(e){function t(n){return n}e.create=t})(V||(V={}));var D;(function(e){e.parseError=-32700,e.invalidRequest=-32600,e.methodNotFound=-32601,e.invalidParams=-32602,e.internalError=-32603;function t(o){return-32099<=o&&o<=-32e3}e.isServerError=t;function n(o){if(!t(o))throw new Error("Invalid range for a server error.");return o}e.serverError=n,e.unexpectedServerError=-32e3;function r(o){return!0}e.isApplicationError=r;function i(o){return o}e.applicationError=i,e.genericApplicationError=-320100})(D||(D={}));var L=class{listeners=new Set;event=e=>(this.listeners.add(e),{dispose:()=>{this.listeners.delete(e)}});fire(e){this.listeners.forEach(t=>t(e))}},Ae=class{_value;eventEmitter;constructor(e){this._value=e,this.eventEmitter=new L}get value(){return this._value}set value(e){this._value!==e&&(this._value=e,this.eventEmitter.fire(e))}get onChange(){return this.eventEmitter.event}};function Ne(e,t){const n=setTimeout(t,e);return{dispose:()=>clearTimeout(n)}}function I(e,t,n){return e instanceof Set?(e.add(t),{dispose:()=>e.delete(t)}):(e.set(t,n),{dispose:()=>e.delete(t)})}var We=class{_state="none";promise;resolve=()=>{};reject=()=>{};constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}get state(){return this._state}},J=class ye{static id=0;_unprocessedMessages=[];_messageListener;id=ye.id++;_state=new Ae({state:"open"});state=this._state;setListener(t){if(this._messageListener=t,!!t)for(;this._unprocessedMessages.length>0&&this._messageListener!==void 0;){const n=this._unprocessedMessages.shift();this._messageListener(n)}}send(t){return this._sendImpl(t)}_dispatchReceivedMessage(t){this._unprocessedMessages.length===0&&this._messageListener?this._messageListener(t):this._unprocessedMessages.push(t)}_onConnectionClosed(){this._state.value={state:"closed",error:void 0}}log(t){return new ze(this,t??new qe)}},ze=class{baseStream;logger;constructor(e,t){this.baseStream=e,this.logger=t}get state(){return this.baseStream.state}setListener(e){if(e===void 0){this.baseStream.setListener(void 0);return}this.baseStream.setListener(t=>{this.logger.log(this.baseStream,"incoming",t),e(t)})}send(e){return this.logger.log(this.baseStream,"outgoing",e),this.baseStream.send(e)}toString(){return`StreamLogger/${this.baseStream.toString()}`}},qe=class{log(e,t,n){console.log(`${t==="incoming"?"<-":"->"} [${e.toString()}] ${JSON.stringify(n)}`)}},Be=class ke{connect;constructor(t){this.connect=t}mapContext(t){return new ke(n=>this.connect(n?je(n,t):void 0))}};function je(e,t){return{handleNotification:(n,r)=>e.handleNotification(n,t(r)),handleRequest:(n,r,i)=>e.handleRequest(n,r,t(i))}}var Ue=class Se{_stream;_listener;_logger;static createChannel(t,n){let r=!1;return new Be(i=>{if(r)throw new Error(`A channel to the stream ${t} was already constructed!`);return r=!0,new Se(t,i,n)})}_unprocessedResponses=new Map;_lastUsedRequestId=0;constructor(t,n,r){this._stream=t,this._listener=n,this._logger=r,this._stream.setListener(i=>{Oe(i)?i.id===void 0?this._processNotification(i):this._processRequest(i):this._processResponse(i)})}get state(){return this._stream.state}async _processNotification(t){if(t.id!==void 0)throw new Error;if(!this._listener){this._logger&&this._logger.debug({text:"Notification ignored",message:t});return}try{await this._listener.handleNotification({method:t.method,params:t.params||null})}catch(n){this._logger&&this._logger.warn({text:`Exception was thrown while handling notification: ${n}`,exception:n,message:t})}}async _processRequest(t){if(t.id===void 0)throw new Error;let n;if(this._listener)try{n=await this._listener.handleRequest({method:t.method,params:t.params||null},t.id)}catch(i){this._logger&&this._logger.warn({text:`Exception was thrown while handling request: ${i}`,message:t,exception:i}),n={error:{code:D.internalError,message:"An unexpected exception was thrown.",data:void 0}}}else this._logger&&this._logger.debug({text:"Received request even though not listening for requests",message:t}),n={error:{code:D.methodNotFound,message:"This endpoint does not listen for requests or notifications.",data:void 0}};let r;"result"in n?r={jsonrpc:"2.0",id:t.id,result:n.result}:r={jsonrpc:"2.0",id:t.id,error:n.error},await this._stream.send(r)}_processResponse(t){const n=""+t.id,r=this._unprocessedResponses.get(n);if(!r){this._logger&&this._logger.debug({text:"Got an unexpected response message",message:t});return}this._unprocessedResponses.delete(n),r(t)}_newRequestId(){return this._lastUsedRequestId++}sendRequest(t,n,r){const i={jsonrpc:"2.0",id:this._newRequestId(),method:t.method,params:t.params||void 0};return r&&r(i.id),new Promise((o,a)=>{const l=""+i.id;this._unprocessedResponses.set(l,g=>{"result"in g?o({result:g.result}):(g.error||a(new Error("Response had neither 'result' nor 'error' field set.")),o({error:g.error}))}),this._stream.send(i).then(void 0,g=>{this._unprocessedResponses.delete(l),a(g)})})}sendNotification(t,n){const r={jsonrpc:"2.0",id:void 0,method:t.method,params:t.params||void 0};return this._stream.send(r)}toString(){return"StreamChannel/"+this._stream.toString()}},S;(function(e){function t(){return{deserializeFromJson:i=>({hasErrors:!1,value:i}),serializeToJson:i=>i}}e.sAny=t;function n(){return{deserializeFromJson:i=>({hasErrors:!1,value:{}}),serializeToJson:i=>({})}}e.sEmptyObject=n;function r(){return{deserializeFromJson:i=>({hasErrors:!1,value:void 0}),serializeToJson:i=>null}}e.sVoidFromNull=r})(S||(S={}));const G=Symbol("OptionalMethodNotFound");var Q=class{contextualize(e){return new Ve(this,e)}},Ve=class extends Q{underylingTypedChannel;converters;constructor(e,t){super(),this.underylingTypedChannel=e,this.converters=t}async request(e,t,n){const r=await this.converters.getSendContext(n);return this.underylingTypedChannel.request(e,t,r)}async notify(e,t,n){const r=await this.converters.getSendContext(n);return this.underylingTypedChannel.notify(e,t,r)}registerNotificationHandler(e,t){return this.underylingTypedChannel.registerNotificationHandler(e,async(n,r)=>await t(n,await this.converters.getNewContext(r)))}registerRequestHandler(e,t){return this.underylingTypedChannel.registerRequestHandler(e,async(n,r,i)=>await t(n,r,await this.converters.getNewContext(i)))}},O=class Ce extends Q{channelCtor;static fromTransport(t,n={}){return new Ce(Ue.createChannel(t,n.logger),n)}_requestSender=void 0;_handler=new Map;_unknownNotificationHandler=new Set;_timeout;sendExceptionDetails=!1;_logger;constructor(t,n={}){super(),this.channelCtor=t,this._logger=n.logger,this.sendExceptionDetails=!!n.sendExceptionDetails,this._timeout=Ne(1e3,()=>{this._requestSender||console.warn(`"${this.startListen.name}" has not been called within 1 second after construction of this channel. Did you forget to call it?`,this)})}listeningDeferred=new We;onListening=this.listeningDeferred.promise;_requestDidErrorEventEmitter=new L;onRequestDidError=this._requestDidErrorEventEmitter.event;startListen(){if(this._requestSender)throw new Error(`"${this.startListen.name}" can be called only once, but it already has been called.`);this._timeout&&(this._timeout.dispose(),this._timeout=void 0),this._requestSender=this.channelCtor.connect({handleRequest:(t,n,r)=>this.handleRequest(t,n,r),handleNotification:(t,n)=>this.handleNotification(t,n)}),this.listeningDeferred.resolve()}checkChannel(t){if(!t)throw new Error(`"${this.startListen.name}" must be called before any messages can be sent or received.`);return!0}async handleRequest(t,n,r){const i=this._handler.get(t.method);if(!i)return this._logger&&this._logger.debug({text:`No request handler for "${t.method}".`,data:{requestObject:t}}),{error:{code:D.methodNotFound,message:`No request handler for "${t.method}".`,data:{method:t.method}}};if(i.kind!="request"){const a=`"${t.method}" is registered as notification, but was sent as request.`;return this._logger&&this._logger.debug({text:a,data:{requestObject:t}}),{error:{code:D.invalidRequest,message:a,data:{method:t.method}}}}const o=i.requestType.paramsSerializer.deserializeFromJson(t.params);if(o.hasErrors){const a=`Got invalid params: ${o.errorMessage}`;return this._logger&&this._logger.debug({text:a,data:{requestObject:t,errorMessage:o.errorMessage}}),{error:{code:D.invalidParams,message:a,data:{errors:o.errorMessage}}}}else{const a=o.value;let l;try{const g=await i.handler(a,n,r);if("error"in g||"errorMessage"in g){const w=g.error?i.requestType.errorSerializer.serializeToJson(g.error):void 0;l={error:{code:g.errorCode||D.genericApplicationError,message:g.errorMessage||"An error was returned",data:w}}}else l={result:i.requestType.resultSerializer.serializeToJson(g.ok)}}catch(g){g instanceof Y?l={error:{code:g.code,message:g.message}}:(this._logger&&this._logger.warn({text:`An exception was thrown while handling a request: ${g}.`,exception:g,data:{requestObject:t}}),l={error:{code:D.unexpectedServerError,message:this.sendExceptionDetails?`An exception was thrown while handling a request: ${g}.`:"Server has thrown an unexpected exception"}})}return l}}async handleNotification(t,n){const r=this._handler.get(t.method);if(!r){for(const a of this._unknownNotificationHandler)a(t);this._unknownNotificationHandler.size===0&&this._logger&&this._logger.debug({text:`Unhandled notification "${t.method}"`,data:{requestObject:t}});return}if(r.kind!="notification"){this._logger&&this._logger.debug({text:`"${t.method}" is registered as request, but was sent as notification.`,data:{requestObject:t}});return}const i=r.notificationType.paramsSerializer.deserializeFromJson(t.params);if(i.hasErrors){this._logger&&this._logger.debug({text:`Got invalid params: ${i}`,data:{requestObject:t,errorMessage:i.errorMessage}});return}const o=i.value;for(const a of r.handlers)try{a(o,n)}catch(l){this._logger&&this._logger.warn({text:`An exception was thrown while handling a notification: ${l}.`,exception:l,data:{requestObject:t}})}}registerUnknownNotificationHandler(t){return I(this._unknownNotificationHandler,t)}registerRequestHandler(t,n){if(this._handler.get(t.method))throw new Error(`Handler with method "${t.method}" already registered.`);return I(this._handler,t.method,{kind:"request",requestType:t,handler:n})}registerNotificationHandler(t,n){let r=this._handler.get(t.method);if(!r)r={kind:"notification",notificationType:t,handlers:new Set},this._handler.set(t.method,r);else{if(r.kind!=="notification")throw new Error(`Method "${t.method}" was already registered as request handler.`);if(r.notificationType!==t)throw new Error(`Method "${t.method}" was registered for a different type.`)}return I(r.handlers,n)}getRegisteredTypes(){const t=[];for(const n of this._handler.values())n.kind==="notification"?t.push(n.notificationType):n.kind==="request"&&t.push(n.requestType);return t}async request(t,n,r){if(!this.checkChannel(this._requestSender))throw new Error("Impossible");const i=t.paramsSerializer.serializeToJson(n);X(i);const o=await this._requestSender.sendRequest({method:t.method,params:i},r);if("error"in o){if(t.isOptional&&o.error.code===D.methodNotFound)return G;let a;if(o.error.data!==void 0){const g=t.errorSerializer.deserializeFromJson(o.error.data);if(g.hasErrors)throw new Error(g.errorMessage);a=g.value}else a=void 0;const l=new Y(o.error.message,a,o.error.code);throw this._requestDidErrorEventEmitter.fire({error:l}),l}else{const a=t.resultSerializer.deserializeFromJson(o.result);if(a.hasErrors)throw new Error("Could not deserialize response: "+a.errorMessage+` + +${JSON.stringify(o,null,2)}`);return a.value}}async notify(t,n,r){if(!this.checkChannel(this._requestSender))throw new Error;const i=t.paramsSerializer.serializeToJson(n);X(i),this._requestSender.sendNotification({method:t.method,params:i},r)}};function X(e){if(e!==null&&Array.isArray(e)&&typeof e!="object")throw new Error("Invalid value! Only null, array and object is allowed.")}var Y=class Re extends Error{data;code;constructor(t,n,r=D.genericApplicationError){super(t),this.data=n,this.code=r,Object.setPrototypeOf(this,Re.prototype)}},Je=class B{method;paramsSerializer;resultSerializer;errorSerializer;isOptional;kind="request";constructor(t,n,r,i,o=!1){this.method=t,this.paramsSerializer=n,this.resultSerializer=r,this.errorSerializer=i,this.isOptional=o}withMethod(t){return new B(t,this.paramsSerializer,this.resultSerializer,this.errorSerializer)}optional(){return new B(this.method,this.paramsSerializer,this.resultSerializer,this.errorSerializer,!0)}},Ge=class Te{method;paramsSerializer;kind="notification";constructor(t,n){this.method=t,this.paramsSerializer=n}withMethod(t){return new Te(t,this.paramsSerializer)}};function c(e){return new Je((e||{}).method,S.sAny(),S.sAny(),S.sAny())}function h(e){return new Ge((e||{}).method,S.sAny())}const Qe=Symbol();var Z=class Me{error;static factory=t=>new Me(t);[Qe];constructor(t){this.error=t}};function Xe(e){const t=K(e.server),n=K(e.client);return new Ye(e.tags||[],t,n)}function K(e){const t={};for(const[n,r]of Object.entries(e)){const i=r.method?r.method:n;t[n]=r.withMethod(i)}return t}var Ye=class Fe{tags;server;client;_onlyDesignTime(){return new Error("This property is not meant to be accessed at runtime")}get TContractObject(){throw this._onlyDesignTime()}get TClientInterface(){throw this._onlyDesignTime()}get TServerInterface(){throw this._onlyDesignTime()}get TClientHandler(){throw this._onlyDesignTime()}get TServerHandler(){throw this._onlyDesignTime()}get TTags(){throw this._onlyDesignTime()}constructor(t=[],n,r){this.tags=t,this.server=n,this.client=r}getInterface(t,n,r,i){const o=this.buildCounterpart(t,r),a=this.registerHandlers(t,n,i,o);return{counterpart:o,dispose:()=>a.dispose()}}buildCounterpart(t,n){const r={};for(const[i,o]of Object.entries(n)){let a;o.kind==="request"?o.isOptional?a=async(l,g)=>{l===void 0&&(l={});try{return await t.request(o,l,g)}catch(w){if(w&&w.code===D.methodNotFound)return G;throw w}}:a=(l,g)=>(l===void 0&&(l={}),t.request(o,l,g)):a=(l,g)=>(l===void 0&&(l={}),t.notify(o,l,g)),r[i]=a}return r}registerHandlers(t,n,r,i){const o=[];for(const[a,l]of Object.entries(n))if(l.kind==="request"){let g=r[a];if(!g)continue;const w=this.createRequestHandler(i,g);o.push(t.registerRequestHandler(l,w))}else{const g=r[a];g&&o.push(t.registerNotificationHandler(l,(w,Nn)=>{g(w,{context:Nn,counterpart:i})}))}return{dispose:()=>o.forEach(a=>a.dispose())}}createRequestHandler(t,n){return async(r,i,o)=>{const a=await n(r,{context:o,counterpart:t,newErr:Z.factory,requestId:i});return a instanceof Z?a.error:{ok:a}}}static getServerFromStream(t,n,r,i){const o=O.fromTransport(n,r),{server:a}=t.getServer(o,i);return o.startListen(),{channel:o,server:a}}static registerServerToStream(t,n,r,i){const o=O.fromTransport(n,r),{client:a}=t.registerServer(o,i);return o.startListen(),{channel:o,client:a}}getServer(t,n){const{counterpart:r,dispose:i}=this.getInterface(t,this.client,this.server,n);return{server:r,dispose:i}}registerServer(t,n){const{counterpart:r,dispose:i}=this.getInterface(t,this.server,this.client,n);return{client:r,dispose:i}}withContext(){return new Fe(this.tags,this.server,this.client)}};let C=(function(e){return e.Comment="comment",e.Imports="imports",e.Region="region",e})({}),m=(function(e){return e[e.File=1]="File",e[e.Module=2]="Module",e[e.Namespace=3]="Namespace",e[e.Package=4]="Package",e[e.Class=5]="Class",e[e.Method=6]="Method",e[e.Property=7]="Property",e[e.Field=8]="Field",e[e.Constructor=9]="Constructor",e[e.Enum=10]="Enum",e[e.Interface=11]="Interface",e[e.Function=12]="Function",e[e.Variable=13]="Variable",e[e.Constant=14]="Constant",e[e.String=15]="String",e[e.Number=16]="Number",e[e.Boolean=17]="Boolean",e[e.Array=18]="Array",e[e.Object=19]="Object",e[e.Key=20]="Key",e[e.Null=21]="Null",e[e.EnumMember=22]="EnumMember",e[e.Struct=23]="Struct",e[e.Event=24]="Event",e[e.Operator=25]="Operator",e[e.TypeParameter=26]="TypeParameter",e})({}),$=(function(e){return e[e.Deprecated=1]="Deprecated",e})({}),ee=(function(e){return e[e.Type=1]="Type",e[e.Parameter=2]="Parameter",e})({}),Ze=(function(e){return e[e.None=0]="None",e[e.Full=1]="Full",e[e.Incremental=2]="Incremental",e})({}),f=(function(e){return e[e.Text=1]="Text",e[e.Method=2]="Method",e[e.Function=3]="Function",e[e.Constructor=4]="Constructor",e[e.Field=5]="Field",e[e.Variable=6]="Variable",e[e.Class=7]="Class",e[e.Interface=8]="Interface",e[e.Module=9]="Module",e[e.Property=10]="Property",e[e.Unit=11]="Unit",e[e.Value=12]="Value",e[e.Enum=13]="Enum",e[e.Keyword=14]="Keyword",e[e.Snippet=15]="Snippet",e[e.Color=16]="Color",e[e.File=17]="File",e[e.Reference=18]="Reference",e[e.Folder=19]="Folder",e[e.EnumMember=20]="EnumMember",e[e.Constant=21]="Constant",e[e.Struct=22]="Struct",e[e.Event=23]="Event",e[e.Operator=24]="Operator",e[e.TypeParameter=25]="TypeParameter",e})({}),Ke=(function(e){return e[e.Deprecated=1]="Deprecated",e})({}),$e=(function(e){return e[e.PlainText=1]="PlainText",e[e.Snippet=2]="Snippet",e})({}),A=(function(e){return e[e.Text=1]="Text",e[e.Read=2]="Read",e[e.Write=3]="Write",e})({}),v=(function(e){return e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll",e})({}),E=(function(e){return e.PlainText="plaintext",e.Markdown="markdown",e})({}),x=(function(e){return e[e.Error=1]="Error",e[e.Warning=2]="Warning",e[e.Information=3]="Information",e[e.Hint=4]="Hint",e})({}),te=(function(e){return e[e.Unnecessary=1]="Unnecessary",e[e.Deprecated=2]="Deprecated",e})({}),P=(function(e){return e[e.Invoked=1]="Invoked",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=3]="TriggerForIncompleteCompletions",e})({}),H=(function(e){return e[e.Invoked=1]="Invoked",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange",e})({}),N=(function(e){return e[e.Invoked=1]="Invoked",e[e.Automatic=2]="Automatic",e})({}),et=(function(e){return e.Relative="relative",e})({});var d=class{constructor(e){this.method=e}};const u={textDocumentImplementation:new d("textDocument/implementation"),textDocumentTypeDefinition:new d("textDocument/typeDefinition"),textDocumentDocumentColor:new d("textDocument/documentColor"),textDocumentColorPresentation:new d("textDocument/colorPresentation"),textDocumentFoldingRange:new d("textDocument/foldingRange"),textDocumentDeclaration:new d("textDocument/declaration"),textDocumentSelectionRange:new d("textDocument/selectionRange"),textDocumentPrepareCallHierarchy:new d("textDocument/prepareCallHierarchy"),textDocumentSemanticTokensFull:new d("textDocument/semanticTokens/full"),textDocumentSemanticTokensFullDelta:new d("textDocument/semanticTokens/full/delta"),textDocumentLinkedEditingRange:new d("textDocument/linkedEditingRange"),workspaceWillCreateFiles:new d("workspace/willCreateFiles"),workspaceWillRenameFiles:new d("workspace/willRenameFiles"),workspaceWillDeleteFiles:new d("workspace/willDeleteFiles"),textDocumentMoniker:new d("textDocument/moniker"),textDocumentPrepareTypeHierarchy:new d("textDocument/prepareTypeHierarchy"),textDocumentInlineValue:new d("textDocument/inlineValue"),textDocumentInlayHint:new d("textDocument/inlayHint"),textDocumentDiagnostic:new d("textDocument/diagnostic"),textDocumentInlineCompletion:new d("textDocument/inlineCompletion"),textDocumentWillSaveWaitUntil:new d("textDocument/willSaveWaitUntil"),textDocumentCompletion:new d("textDocument/completion"),textDocumentHover:new d("textDocument/hover"),textDocumentSignatureHelp:new d("textDocument/signatureHelp"),textDocumentDefinition:new d("textDocument/definition"),textDocumentReferences:new d("textDocument/references"),textDocumentDocumentHighlight:new d("textDocument/documentHighlight"),textDocumentDocumentSymbol:new d("textDocument/documentSymbol"),textDocumentCodeAction:new d("textDocument/codeAction"),workspaceSymbol:new d("workspace/symbol"),textDocumentCodeLens:new d("textDocument/codeLens"),textDocumentDocumentLink:new d("textDocument/documentLink"),textDocumentFormatting:new d("textDocument/formatting"),textDocumentRangeFormatting:new d("textDocument/rangeFormatting"),textDocumentRangesFormatting:new d("textDocument/rangesFormatting"),textDocumentOnTypeFormatting:new d("textDocument/onTypeFormatting"),textDocumentRename:new d("textDocument/rename"),workspaceExecuteCommand:new d("workspace/executeCommand"),workspaceDidCreateFiles:new d("workspace/didCreateFiles"),workspaceDidRenameFiles:new d("workspace/didRenameFiles"),workspaceDidDeleteFiles:new d("workspace/didDeleteFiles"),workspaceDidChangeConfiguration:new d("workspace/didChangeConfiguration"),textDocumentDidOpen:new d("textDocument/didOpen"),textDocumentDidChange:new d("textDocument/didChange"),textDocumentDidClose:new d("textDocument/didClose"),textDocumentDidSave:new d("textDocument/didSave"),textDocumentWillSave:new d("textDocument/willSave"),workspaceDidChangeWatchedFiles:new d("workspace/didChangeWatchedFiles")},M=Xe({server:{textDocumentImplementation:c({method:"textDocument/implementation"}),textDocumentTypeDefinition:c({method:"textDocument/typeDefinition"}),textDocumentDocumentColor:c({method:"textDocument/documentColor"}),textDocumentColorPresentation:c({method:"textDocument/colorPresentation"}),textDocumentFoldingRange:c({method:"textDocument/foldingRange"}),textDocumentDeclaration:c({method:"textDocument/declaration"}),textDocumentSelectionRange:c({method:"textDocument/selectionRange"}),textDocumentPrepareCallHierarchy:c({method:"textDocument/prepareCallHierarchy"}),callHierarchyIncomingCalls:c({method:"callHierarchy/incomingCalls"}),callHierarchyOutgoingCalls:c({method:"callHierarchy/outgoingCalls"}),textDocumentSemanticTokensFull:c({method:"textDocument/semanticTokens/full"}),textDocumentSemanticTokensFullDelta:c({method:"textDocument/semanticTokens/full/delta"}),textDocumentSemanticTokensRange:c({method:"textDocument/semanticTokens/range"}),textDocumentLinkedEditingRange:c({method:"textDocument/linkedEditingRange"}),workspaceWillCreateFiles:c({method:"workspace/willCreateFiles"}),workspaceWillRenameFiles:c({method:"workspace/willRenameFiles"}),workspaceWillDeleteFiles:c({method:"workspace/willDeleteFiles"}),textDocumentMoniker:c({method:"textDocument/moniker"}),textDocumentPrepareTypeHierarchy:c({method:"textDocument/prepareTypeHierarchy"}),typeHierarchySupertypes:c({method:"typeHierarchy/supertypes"}),typeHierarchySubtypes:c({method:"typeHierarchy/subtypes"}),textDocumentInlineValue:c({method:"textDocument/inlineValue"}),textDocumentInlayHint:c({method:"textDocument/inlayHint"}),inlayHintResolve:c({method:"inlayHint/resolve"}),textDocumentDiagnostic:c({method:"textDocument/diagnostic"}),workspaceDiagnostic:c({method:"workspace/diagnostic"}),textDocumentInlineCompletion:c({method:"textDocument/inlineCompletion"}),initialize:c({method:"initialize"}),shutdown:c({method:"shutdown"}),textDocumentWillSaveWaitUntil:c({method:"textDocument/willSaveWaitUntil"}),textDocumentCompletion:c({method:"textDocument/completion"}),completionItemResolve:c({method:"completionItem/resolve"}),textDocumentHover:c({method:"textDocument/hover"}),textDocumentSignatureHelp:c({method:"textDocument/signatureHelp"}),textDocumentDefinition:c({method:"textDocument/definition"}),textDocumentReferences:c({method:"textDocument/references"}),textDocumentDocumentHighlight:c({method:"textDocument/documentHighlight"}),textDocumentDocumentSymbol:c({method:"textDocument/documentSymbol"}),textDocumentCodeAction:c({method:"textDocument/codeAction"}),codeActionResolve:c({method:"codeAction/resolve"}),workspaceSymbol:c({method:"workspace/symbol"}),workspaceSymbolResolve:c({method:"workspaceSymbol/resolve"}),textDocumentCodeLens:c({method:"textDocument/codeLens"}),codeLensResolve:c({method:"codeLens/resolve"}),textDocumentDocumentLink:c({method:"textDocument/documentLink"}),documentLinkResolve:c({method:"documentLink/resolve"}),textDocumentFormatting:c({method:"textDocument/formatting"}),textDocumentRangeFormatting:c({method:"textDocument/rangeFormatting"}),textDocumentRangesFormatting:c({method:"textDocument/rangesFormatting"}),textDocumentOnTypeFormatting:c({method:"textDocument/onTypeFormatting"}),textDocumentRename:c({method:"textDocument/rename"}),textDocumentPrepareRename:c({method:"textDocument/prepareRename"}),workspaceExecuteCommand:c({method:"workspace/executeCommand"}),workspaceDidChangeWorkspaceFolders:h({method:"workspace/didChangeWorkspaceFolders"}),windowWorkDoneProgressCancel:h({method:"window/workDoneProgress/cancel"}),workspaceDidCreateFiles:h({method:"workspace/didCreateFiles"}),workspaceDidRenameFiles:h({method:"workspace/didRenameFiles"}),workspaceDidDeleteFiles:h({method:"workspace/didDeleteFiles"}),notebookDocumentDidOpen:h({method:"notebookDocument/didOpen"}),notebookDocumentDidChange:h({method:"notebookDocument/didChange"}),notebookDocumentDidSave:h({method:"notebookDocument/didSave"}),notebookDocumentDidClose:h({method:"notebookDocument/didClose"}),initialized:h({method:"initialized"}),exit:h({method:"exit"}),workspaceDidChangeConfiguration:h({method:"workspace/didChangeConfiguration"}),textDocumentDidOpen:h({method:"textDocument/didOpen"}),textDocumentDidChange:h({method:"textDocument/didChange"}),textDocumentDidClose:h({method:"textDocument/didClose"}),textDocumentDidSave:h({method:"textDocument/didSave"}),textDocumentWillSave:h({method:"textDocument/willSave"}),workspaceDidChangeWatchedFiles:h({method:"workspace/didChangeWatchedFiles"}),setTrace:h({method:"$/setTrace"}),cancelRequest:h({method:"$/cancelRequest"}),progress:h({method:"$/progress"})},client:{workspaceWorkspaceFolders:c({method:"workspace/workspaceFolders"}).optional(),workspaceConfiguration:c({method:"workspace/configuration"}).optional(),workspaceFoldingRangeRefresh:c({method:"workspace/foldingRange/refresh"}).optional(),windowWorkDoneProgressCreate:c({method:"window/workDoneProgress/create"}).optional(),workspaceSemanticTokensRefresh:c({method:"workspace/semanticTokens/refresh"}).optional(),windowShowDocument:c({method:"window/showDocument"}).optional(),workspaceInlineValueRefresh:c({method:"workspace/inlineValue/refresh"}).optional(),workspaceInlayHintRefresh:c({method:"workspace/inlayHint/refresh"}).optional(),workspaceDiagnosticRefresh:c({method:"workspace/diagnostic/refresh"}).optional(),clientRegisterCapability:c({method:"client/registerCapability"}).optional(),clientUnregisterCapability:c({method:"client/unregisterCapability"}).optional(),windowShowMessageRequest:c({method:"window/showMessageRequest"}).optional(),workspaceCodeLensRefresh:c({method:"workspace/codeLens/refresh"}).optional(),workspaceApplyEdit:c({method:"workspace/applyEdit"}).optional(),windowShowMessage:h({method:"window/showMessage"}),windowLogMessage:h({method:"window/logMessage"}),telemetryEvent:h({method:"telemetry/event"}),textDocumentPublishDiagnostics:h({method:"textDocument/publishDiagnostics"}),logTrace:h({method:"$/logTrace"}),cancelRequest:h({method:"$/cancelRequest"}),progress:h({method:"$/progress"})}});function y(e,t){if(e.textModel!==t)throw new Error(`Expected text model to be ${t}, but got ${e.textModel}`);return e}var p=class{static None=Object.freeze({dispose(){}});_store=new W;constructor(){}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}},W=class{static DISABLE_DISPOSED_WARNING=!1;_toDispose=new Set;_isDisposed=!1;dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}clear(){if(this._toDispose.size!==0)try{for(const t of this._toDispose)t.dispose()}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}};const ne=new Map([[v.Empty,""],[v.QuickFix,"quickfix"],[v.Refactor,"refactor"],[v.RefactorExtract,"refactor.extract"],[v.RefactorInline,"refactor.inline"],[v.RefactorRewrite,"refactor.rewrite"],[v.Source,"source"],[v.SourceOrganizeImports,"source.organizeImports"],[v.SourceFixAll,"source.fixAll"]]);function tt(e){if(e)return ne.get(e)??e}const nt=new Map([[s.languages.CodeActionTriggerType.Invoke,N.Invoked],[s.languages.CodeActionTriggerType.Auto,N.Automatic]]);function rt(e){return nt.get(e)??N.Invoked}const re=new Map([[f.Text,s.languages.CompletionItemKind.Text],[f.Method,s.languages.CompletionItemKind.Method],[f.Function,s.languages.CompletionItemKind.Function],[f.Constructor,s.languages.CompletionItemKind.Constructor],[f.Field,s.languages.CompletionItemKind.Field],[f.Variable,s.languages.CompletionItemKind.Variable],[f.Class,s.languages.CompletionItemKind.Class],[f.Interface,s.languages.CompletionItemKind.Interface],[f.Module,s.languages.CompletionItemKind.Module],[f.Property,s.languages.CompletionItemKind.Property],[f.Unit,s.languages.CompletionItemKind.Unit],[f.Value,s.languages.CompletionItemKind.Value],[f.Enum,s.languages.CompletionItemKind.Enum],[f.Keyword,s.languages.CompletionItemKind.Keyword],[f.Snippet,s.languages.CompletionItemKind.Snippet],[f.Color,s.languages.CompletionItemKind.Color],[f.File,s.languages.CompletionItemKind.File],[f.Reference,s.languages.CompletionItemKind.Reference],[f.Folder,s.languages.CompletionItemKind.Folder],[f.EnumMember,s.languages.CompletionItemKind.EnumMember],[f.Constant,s.languages.CompletionItemKind.Constant],[f.Struct,s.languages.CompletionItemKind.Struct],[f.Event,s.languages.CompletionItemKind.Event],[f.Operator,s.languages.CompletionItemKind.Operator],[f.TypeParameter,s.languages.CompletionItemKind.TypeParameter]]);function it(e){return e?re.get(e)??s.languages.CompletionItemKind.Text:s.languages.CompletionItemKind.Text}const ie=new Map([[Ke.Deprecated,s.languages.CompletionItemTag.Deprecated]]);function ot(e){return ie.get(e)}const st=new Map([[s.languages.CompletionTriggerKind.Invoke,P.Invoked],[s.languages.CompletionTriggerKind.TriggerCharacter,P.TriggerCharacter],[s.languages.CompletionTriggerKind.TriggerForIncompleteCompletions,P.TriggerForIncompleteCompletions]]);function at(e){return st.get(e)??P.Invoked}const ct=new Map([[$e.Snippet,s.languages.CompletionItemInsertTextRule.InsertAsSnippet]]);function lt(e){if(e)return ct.get(e)}const oe=new Map([[m.File,s.languages.SymbolKind.File],[m.Module,s.languages.SymbolKind.Module],[m.Namespace,s.languages.SymbolKind.Namespace],[m.Package,s.languages.SymbolKind.Package],[m.Class,s.languages.SymbolKind.Class],[m.Method,s.languages.SymbolKind.Method],[m.Property,s.languages.SymbolKind.Property],[m.Field,s.languages.SymbolKind.Field],[m.Constructor,s.languages.SymbolKind.Constructor],[m.Enum,s.languages.SymbolKind.Enum],[m.Interface,s.languages.SymbolKind.Interface],[m.Function,s.languages.SymbolKind.Function],[m.Variable,s.languages.SymbolKind.Variable],[m.Constant,s.languages.SymbolKind.Constant],[m.String,s.languages.SymbolKind.String],[m.Number,s.languages.SymbolKind.Number],[m.Boolean,s.languages.SymbolKind.Boolean],[m.Array,s.languages.SymbolKind.Array],[m.Object,s.languages.SymbolKind.Object],[m.Key,s.languages.SymbolKind.Key],[m.Null,s.languages.SymbolKind.Null],[m.EnumMember,s.languages.SymbolKind.EnumMember],[m.Struct,s.languages.SymbolKind.Struct],[m.Event,s.languages.SymbolKind.Event],[m.Operator,s.languages.SymbolKind.Operator],[m.TypeParameter,s.languages.SymbolKind.TypeParameter]]);function se(e){return oe.get(e)??s.languages.SymbolKind.File}const ut=new Map([[$.Deprecated,s.languages.SymbolTag.Deprecated]]);function ae(e){return ut.get(e)}const dt=new Map([[A.Text,s.languages.DocumentHighlightKind.Text],[A.Read,s.languages.DocumentHighlightKind.Read],[A.Write,s.languages.DocumentHighlightKind.Write]]);function gt(e){return e?dt.get(e)??s.languages.DocumentHighlightKind.Text:s.languages.DocumentHighlightKind.Text}const ht=new Map([[C.Comment,s.languages.FoldingRangeKind.Comment],[C.Imports,s.languages.FoldingRangeKind.Imports],[C.Region,s.languages.FoldingRangeKind.Region]]);function mt(e){if(e)return ht.get(e)}const pt=new Map([[s.MarkerSeverity.Error,x.Error],[s.MarkerSeverity.Warning,x.Warning],[s.MarkerSeverity.Info,x.Information],[s.MarkerSeverity.Hint,x.Hint]]);function ft(e){return pt.get(e)??x.Error}const _t=new Map([[x.Error,s.MarkerSeverity.Error],[x.Warning,s.MarkerSeverity.Warning],[x.Information,s.MarkerSeverity.Info],[x.Hint,s.MarkerSeverity.Hint]]);function Dt(e){return e?_t.get(e)??s.MarkerSeverity.Error:s.MarkerSeverity.Error}const ce=new Map([[te.Unnecessary,s.MarkerTag.Unnecessary],[te.Deprecated,s.MarkerTag.Deprecated]]);function vt(e){return ce.get(e)}const xt=new Map([[s.languages.SignatureHelpTriggerKind.Invoke,H.Invoked],[s.languages.SignatureHelpTriggerKind.TriggerCharacter,H.TriggerCharacter],[s.languages.SignatureHelpTriggerKind.ContentChange,H.ContentChange]]);function wt(e){return xt.get(e)??H.Invoked}function R(e){if(e)return{id:e.command,title:e.title,arguments:e.arguments}}const bt=new Map([[ee.Type,s.languages.InlayHintKind.Type],[ee.Parameter,s.languages.InlayHintKind.Parameter]]);function yt(e){return e?bt.get(e)??s.languages.InlayHintKind.Type:s.languages.InlayHintKind.Type}function b(e,t){if("targetUri"in e){const n=t.bridge.translateBackRange({uri:e.targetUri},e.targetRange);return{uri:n.textModel.uri,range:n.range,originSelectionRange:e.originSelectionRange?t.bridge.translateBackRange({uri:e.targetUri},e.originSelectionRange).range:void 0,targetSelectionRange:e.targetSelectionRange?t.bridge.translateBackRange({uri:e.targetUri},e.targetSelectionRange).range:void 0}}else{const n=t.bridge.translateBackRange({uri:e.uri},e.range);return{uri:n.textModel.uri,range:n.range}}}function _(e){return!e||e.length===0?{language:"*"}:e.map(t=>"notebook"in t?typeof t.notebook=="string"?{notebookType:t.notebook,language:t.language}:{notebookType:t.notebook.notebookType,language:t.language,pattern:t.notebook.pattern,scheme:t.notebook.scheme}:{language:t.language,pattern:t.pattern,scheme:t.scheme})}function kt(e,t){if(!t)return!0;const n=e.getLanguageId();if(e.uri.toString(!0),!t||t.length===0)return!0;for(const r of t)if(!(r.language&&r.language!=="*"&&r.language!==n))return!0;return!1}function z(e){const t={severity:Dt(e.severity),startLineNumber:e.range.start.line+1,startColumn:e.range.start.character+1,endLineNumber:e.range.end.line+1,endColumn:e.range.end.character+1,message:e.message,source:e.source,code:typeof e.code=="string"?e.code:e.code?.toString()};return e.tags&&(t.tags=e.tags.map(n=>vt(n)).filter(n=>n!==void 0)),e.relatedInformation&&(t.relatedInformation=e.relatedInformation.map(n=>({resource:s.Uri.parse(n.location.uri),startLineNumber:n.location.range.start.line+1,startColumn:n.location.range.start.character+1,endLineNumber:n.location.range.end.line+1,endColumn:n.location.range.end.character+1,message:n.message}))),t}var St=class extends p{constructor(e){super(),this._connection=e,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{completion:{dynamicRegistration:!0,contextSupport:!0,completionItemKind:{valueSet:Array.from(re.keys())},completionItem:{tagSupport:{valueSet:Array.from(ie.keys())},commitCharactersSupport:!0,deprecatedSupport:!0,preselectSupport:!0}}}})),this._register(this._connection.capabilities.registerCapabilityHandler(u.textDocumentCompletion,!0,t=>s.languages.registerCompletionItemProvider(_(t.documentSelector),new Ct(this._connection,t))))}},Ct=class{resolveCompletionItem;constructor(e,t){this._client=e,this._capabilities=t,t.resolveProvider&&(this.resolveCompletionItem=async(n,r)=>(le(n,await this._client.server.completionItemResolve(n._lspItem),this._client.bridge,n._translated,n._model),n))}get triggerCharacters(){return this._capabilities.triggerCharacters}async provideCompletionItems(e,t,n,r){const i=this._client.bridge.translate(e,t),o=await this._client.server.textDocumentCompletion({textDocument:i.textDocument,position:i.position,context:n.triggerCharacter?{triggerKind:at(n.triggerKind),triggerCharacter:n.triggerCharacter}:void 0});return o?{suggestions:(Array.isArray(o)?o:o.items).map(a=>({...Rt(a,this._client.bridge,i,e,t),_lspItem:a,_translated:i,_model:e}))}:{suggestions:[]}}};function Rt(e,t,n,r,i){let o=e.insertText||e.label,a;e.textEdit&&("range"in e.textEdit?(o=e.textEdit.newText,a=y(t.translateBackRange(n.textDocument,e.textEdit.range),r).range):(o=e.textEdit.newText,a={insert:y(t.translateBackRange(n.textDocument,e.textEdit.insert),r).range,replace:y(t.translateBackRange(n.textDocument,e.textEdit.replace),r).range})),a||(a=s.Range.fromPositions(i,i));const l={label:e.label,kind:it(e.kind),insertText:o,sortText:e.sortText,filterText:e.filterText,preselect:e.preselect,commitCharacters:e.commitCharacters,range:a};return le(l,e,t,n,r),l}function le(e,t,n,r,i){t.detail!==void 0&&(e.detail=t.detail),t.documentation!==void 0&&(e.documentation=Tt(t.documentation)),t.insertTextFormat!==void 0&&(e.insertTextRules=lt(t.insertTextFormat)),t.tags&&t.tags.length>0&&(e.tags=t.tags.map(ot).filter(o=>o!==void 0)),t.additionalTextEdits&&t.additionalTextEdits.length>0&&(e.additionalTextEdits=t.additionalTextEdits.map(o=>({range:y(n.translateBackRange(r.textDocument,o.range),i).range,text:o.newText}))),t.command&&(e.command=R(t.command))}function Tt(e){if(e)return typeof e=="string"?e:{value:e.value}}var Mt=class extends p{constructor(e){super(),this._connection=e,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{hover:{dynamicRegistration:!0,contentFormat:[E.Markdown,E.PlainText]}}})),this._register(this._connection.capabilities.registerCapabilityHandler(u.textDocumentHover,!0,t=>s.languages.registerHoverProvider(_(t.documentSelector),new Ft(this._connection,t))))}},Ft=class{constructor(e,t){this._client=e,this._capabilities=t}async provideHover(e,t,n){const r=this._client.bridge.translate(e,t),i=await this._client.server.textDocumentHover({textDocument:r.textDocument,position:r.position});return!i||!i.contents?null:{contents:Et(i.contents),range:i.range?this._client.bridge.translateBackRange(r.textDocument,i.range).range:void 0}}};function Et(e){return Array.isArray(e)?e.map(t=>ue(t)):[ue(e)]}function ue(e){return typeof e=="string"?{value:e}:"kind"in e?{value:e.value}:{value:`\`\`\`${e.language} +${e.value} +\`\`\``}}var Pt=class extends p{constructor(e){super(),this._connection=e,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{signatureHelp:{dynamicRegistration:!0,contextSupport:!0,signatureInformation:{documentationFormat:[E.Markdown,E.PlainText],parameterInformation:{labelOffsetSupport:!0},activeParameterSupport:!0}}}})),this._register(this._connection.capabilities.registerCapabilityHandler(u.textDocumentSignatureHelp,!0,t=>s.languages.registerSignatureHelpProvider(_(t.documentSelector),new Ht(this._connection,t))))}},Ht=class{signatureHelpTriggerCharacters;signatureHelpRetriggerCharacters;constructor(e,t){this._client=e,this._capabilities=t,this.signatureHelpTriggerCharacters=t.triggerCharacters,this.signatureHelpRetriggerCharacters=t.retriggerCharacters}async provideSignatureHelp(e,t,n,r){const i=this._client.bridge.translate(e,t),o=await this._client.server.textDocumentSignatureHelp({textDocument:i.textDocument,position:i.position,context:{triggerKind:wt(r.triggerKind),triggerCharacter:r.triggerCharacter,isRetrigger:r.isRetrigger}});return o?{value:{signatures:o.signatures.map(a=>({label:a.label,documentation:de(a.documentation),parameters:a.parameters?.map(l=>({label:l.label,documentation:de(l.documentation)}))||[],activeParameter:a.activeParameter})),activeSignature:o.activeSignature||0,activeParameter:o.activeParameter||0},dispose:()=>{}}:null}};function de(e){if(e)return typeof e=="string"?e:{value:e.value}}var Lt=class extends p{constructor(e){super(),this._connection=e,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{definition:{dynamicRegistration:!0,linkSupport:!0}}})),this._register(this._connection.capabilities.registerCapabilityHandler(u.textDocumentDefinition,!0,t=>s.languages.registerDefinitionProvider(_(t.documentSelector),new It(this._connection,t))))}},It=class{constructor(e,t){this._client=e,this._capabilities=t}async provideDefinition(e,t,n){const r=this._client.bridge.translate(e,t),i=await this._client.server.textDocumentDefinition({textDocument:r.textDocument,position:r.position});return i?Array.isArray(i)?i.map(o=>b(o,this._client)):b(i,this._client):null}},Ot=class extends p{constructor(e){super(),this._connection=e,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{declaration:{dynamicRegistration:!0,linkSupport:!0}}})),this._register(this._connection.capabilities.registerCapabilityHandler(u.textDocumentDeclaration,!0,t=>s.languages.registerDeclarationProvider(_(t.documentSelector),new At(this._connection,t))))}},At=class{constructor(e,t){this._client=e,this._capabilities=t}async provideDeclaration(e,t,n){const r=this._client.bridge.translate(e,t),i=await this._client.server.textDocumentDeclaration({textDocument:r.textDocument,position:r.position});return i?Array.isArray(i)?i.map(o=>b(o,this._client)):b(i,this._client):null}},Nt=class extends p{constructor(e){super(),this._connection=e,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{typeDefinition:{dynamicRegistration:!0,linkSupport:!0}}})),this._register(this._connection.capabilities.registerCapabilityHandler(u.textDocumentTypeDefinition,!0,t=>s.languages.registerTypeDefinitionProvider(_(t.documentSelector),new Wt(this._connection,t))))}},Wt=class{constructor(e,t){this._client=e,this._capabilities=t}async provideTypeDefinition(e,t,n){const r=this._client.bridge.translate(e,t),i=await this._client.server.textDocumentTypeDefinition({textDocument:r.textDocument,position:r.position});return i?Array.isArray(i)?i.map(o=>b(o,this._client)):b(i,this._client):null}},zt=class extends p{constructor(e){super(),this._connection=e,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{implementation:{dynamicRegistration:!0,linkSupport:!0}}})),this._register(this._connection.capabilities.registerCapabilityHandler(u.textDocumentImplementation,!0,t=>s.languages.registerImplementationProvider(_(t.documentSelector),new qt(this._connection,t))))}},qt=class{constructor(e,t){this._client=e,this._capabilities=t}async provideImplementation(e,t,n){const r=this._client.bridge.translate(e,t),i=await this._client.server.textDocumentImplementation({textDocument:r.textDocument,position:r.position});return i?Array.isArray(i)?i.map(o=>b(o,this._client)):b(i,this._client):null}},Bt=class extends p{constructor(e){super(),this._connection=e,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{references:{dynamicRegistration:!0}}})),this._register(this._connection.capabilities.registerCapabilityHandler(u.textDocumentReferences,!0,t=>s.languages.registerReferenceProvider(_(t.documentSelector),new jt(this._connection,t))))}},jt=class{constructor(e,t){this._client=e,this._capabilities=t}async provideReferences(e,t,n,r){const i=this._client.bridge.translate(e,t),o=await this._client.server.textDocumentReferences({textDocument:i.textDocument,position:i.position,context:{includeDeclaration:n.includeDeclaration}});return o?o.map(a=>{const l=this._client.bridge.translateBackRange({uri:a.uri},a.range);return{uri:l.textModel.uri,range:l.range}}):null}},Ut=class extends p{constructor(e){super(),this._connection=e,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{documentHighlight:{dynamicRegistration:!0}}})),this._register(this._connection.capabilities.registerCapabilityHandler(u.textDocumentDocumentHighlight,!0,t=>s.languages.registerDocumentHighlightProvider(_(t.documentSelector),new Vt(this._connection,t))))}},Vt=class{constructor(e,t){this._client=e,this._capabilities=t}async provideDocumentHighlights(e,t,n){const r=this._client.bridge.translate(e,t),i=await this._client.server.textDocumentDocumentHighlight({textDocument:r.textDocument,position:r.position});return i?i.map(o=>({range:this._client.bridge.translateBackRange(r.textDocument,o.range).range,kind:gt(o.kind)})):null}},Jt=class extends p{constructor(e){super(),this._connection=e,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{documentSymbol:{dynamicRegistration:!0,hierarchicalDocumentSymbolSupport:!0,symbolKind:{valueSet:Array.from(oe.keys())},tagSupport:{valueSet:[$.Deprecated]}}}})),this._register(this._connection.capabilities.registerCapabilityHandler(u.textDocumentDocumentSymbol,!0,t=>s.languages.registerDocumentSymbolProvider(_(t.documentSelector),new Gt(this._connection,t))))}},Gt=class{constructor(e,t){this._client=e,this._capabilities=t}async provideDocumentSymbols(e,t){const n=this._client.bridge.translate(e,new s.Position(1,1)),r=await this._client.server.textDocumentDocumentSymbol({textDocument:n.textDocument});return r?Array.isArray(r)&&r.length>0?"location"in r[0]?r.map(i=>Qt(i,this._client)):r.map(i=>ge(i,this._client,n.textDocument)):[]:null}};function ge(e,t,n){return{name:e.name,detail:e.detail||"",kind:se(e.kind),tags:e.tags?.map(r=>ae(r)).filter(r=>r!==void 0)||[],range:t.bridge.translateBackRange(n,e.range).range,selectionRange:t.bridge.translateBackRange(n,e.selectionRange).range,children:e.children?.map(r=>ge(r,t,n))||[]}}function Qt(e,t){return{name:e.name,detail:"",kind:se(e.kind),tags:e.tags?.map(n=>ae(n)).filter(n=>n!==void 0)||[],range:t.bridge.translateBackRange({uri:e.location.uri},e.location.range).range,selectionRange:t.bridge.translateBackRange({uri:e.location.uri},e.location.range).range,children:[]}}var Xt=class extends p{constructor(e){super(),this._connection=e,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{rename:{dynamicRegistration:!0,prepareSupport:!0}}})),this._register(this._connection.capabilities.registerCapabilityHandler(u.textDocumentRename,!0,t=>s.languages.registerRenameProvider(_(t.documentSelector),new Yt(this._connection,t))))}},Yt=class{constructor(e,t){this._client=e,this._capabilities=t}async provideRenameEdits(e,t,n,r){const i=this._client.bridge.translate(e,t),o=await this._client.server.textDocumentRename({textDocument:i.textDocument,position:i.position,newName:n});return o?Zt(o,this._client):null}async resolveRenameLocation(e,t,n){if(!this._capabilities.prepareProvider)return null;const r=this._client.bridge.translate(e,t),i=await this._client.server.textDocumentPrepareRename({textDocument:r.textDocument,position:r.position});if(!i)return null;if("range"in i&&"placeholder"in i)return{range:this._client.bridge.translateBackRange(r.textDocument,i.range).range,text:i.placeholder};if("defaultBehavior"in i)return null;if("start"in i&&"end"in i){const o=this._client.bridge.translateBackRange(r.textDocument,i).range;return{range:o,text:e.getValueInRange(o)}}return null}};function Zt(e,t){const n=[];if(e.changes)for(const r in e.changes){const i=e.changes[r];for(const o of i){const a=t.bridge.translateBackRange({uri:r},o.range);n.push({resource:a.textModel.uri,versionId:void 0,textEdit:{range:a.range,text:o.newText}})}}if(e.documentChanges){for(const r of e.documentChanges)if("textDocument"in r){const i=r.textDocument.uri;for(const o of r.edits){const a=t.bridge.translateBackRange({uri:i},o.range);n.push({resource:a.textModel.uri,versionId:r.textDocument.version,textEdit:{range:a.range,text:o.newText}})}}}return{edits:n}}var Kt=class extends p{constructor(e){super(),this._connection=e,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{codeAction:{dynamicRegistration:!0,codeActionLiteralSupport:{codeActionKind:{valueSet:Array.from(ne.keys())}},isPreferredSupport:!0,disabledSupport:!0,dataSupport:!0,resolveSupport:{properties:["edit"]}}}})),this._register(this._connection.capabilities.registerCapabilityHandler(u.textDocumentCodeAction,!0,t=>s.languages.registerCodeActionProvider(_(t.documentSelector),new $t(this._connection,t))))}},$t=class{resolveCodeAction;constructor(e,t){this._client=e,this._capabilities=t,t.resolveProvider&&(this.resolveCodeAction=async(n,r)=>{if(n._lspAction){const i=await this._client.server.codeActionResolve(n._lspAction);i.edit&&(n.edit=he(i.edit,this._client)),i.command&&(n.command=R(i.command))}return n})}async provideCodeActions(e,t,n,r){const i=this._client.bridge.translate(e,t.getStartPosition()),o=await this._client.server.textDocumentCodeAction({textDocument:i.textDocument,range:this._client.bridge.translateRange(e,t),context:{diagnostics:n.markers.map(a=>({range:this._client.bridge.translateRange(e,s.Range.lift(a)),message:a.message,severity:ft(a.severity)})),triggerKind:rt(n.trigger)}});return o?{actions:(Array.isArray(o)?o:[o]).map(a=>{if("title"in a&&!("kind"in a)){const l=a;return{title:l.title,command:R(l)}}else{const l=a;return{title:l.title,kind:tt(l.kind),isPreferred:l.isPreferred,disabled:l.disabled?.reason,edit:l.edit?he(l.edit,this._client):void 0,command:R(l.command),_lspAction:l}}}),dispose:()=>{}}:null}};function he(e,t){const n=[];if(e.changes)for(const r in e.changes){const i=e.changes[r];for(const o of i){const a=t.bridge.translateBackRange({uri:r},o.range);n.push({resource:a.textModel.uri,versionId:void 0,textEdit:{range:a.range,text:o.newText}})}}if(e.documentChanges){for(const r of e.documentChanges)if("textDocument"in r){const i=r.textDocument.uri;for(const o of r.edits){const a=t.bridge.translateBackRange({uri:i},o.range);n.push({resource:a.textModel.uri,versionId:r.textDocument.version??void 0,textEdit:{range:a.range,text:o.newText}})}}}return{edits:n}}var en=class extends p{constructor(e){super(),this._connection=e,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{codeLens:{dynamicRegistration:!0}}})),this._register(this._connection.capabilities.registerCapabilityHandler(u.textDocumentCodeLens,!0,t=>s.languages.registerCodeLensProvider(_(t.documentSelector),new tn(this._connection,t))))}},tn=class{constructor(e,t){this._client=e,this._capabilities=t}async provideCodeLenses(e,t){const n=this._client.bridge.translate(e,new s.Position(1,1)),r=await this._client.server.textDocumentCodeLens({textDocument:n.textDocument});return r?{lenses:r.map(i=>({range:y(this._client.bridge.translateBackRange(n.textDocument,i.range),e).range,command:R(i.command),_lspCodeLens:i})),dispose:()=>{}}:null}async resolveCodeLens(e,t,n){if(!this._capabilities.resolveProvider||!t._lspCodeLens)return t;const r=await this._client.server.codeLensResolve(t._lspCodeLens);return r.command&&(t.command={id:r.command.command,title:r.command.title,arguments:r.command.arguments}),t}},nn=class extends p{constructor(e){super(),this._connection=e,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{documentLink:{dynamicRegistration:!0,tooltipSupport:!0}}})),this._register(this._connection.capabilities.registerCapabilityHandler(u.textDocumentDocumentLink,!0,t=>s.languages.registerLinkProvider(_(t.documentSelector),new rn(this._connection,t))))}},rn=class{constructor(e,t){this._client=e,this._capabilities=t}async provideLinks(e,t){const n=this._client.bridge.translate(e,new s.Position(1,1)),r=await this._client.server.textDocumentDocumentLink({textDocument:n.textDocument});return r?{links:r.map(i=>({range:this._client.bridge.translateBackRange(n.textDocument,i.range).range,url:i.target,tooltip:i.tooltip}))}:null}async resolveLink(e,t){return this._capabilities.resolveProvider,e}},on=class extends p{constructor(e){super(),this._connection=e,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{formatting:{dynamicRegistration:!0}}})),this._register(this._connection.capabilities.registerCapabilityHandler(u.textDocumentFormatting,!0,t=>s.languages.registerDocumentFormattingEditProvider(_(t.documentSelector),new sn(this._connection,t))))}},sn=class{constructor(e,t){this._client=e,this._capabilities=t}async provideDocumentFormattingEdits(e,t,n){const r=this._client.bridge.translate(e,new s.Position(1,1)),i=await this._client.server.textDocumentFormatting({textDocument:r.textDocument,options:{tabSize:t.tabSize,insertSpaces:t.insertSpaces}});return i?i.map(o=>({range:this._client.bridge.translateBackRange(r.textDocument,o.range).range,text:o.newText})):null}},an=class extends p{constructor(e){super(),this._connection=e,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{rangeFormatting:{dynamicRegistration:!0}}})),this._register(this._connection.capabilities.registerCapabilityHandler(u.textDocumentRangeFormatting,!0,t=>s.languages.registerDocumentRangeFormattingEditProvider(_(t.documentSelector),new cn(this._connection,t))))}},cn=class{constructor(e,t){this._client=e,this._capabilities=t}async provideDocumentRangeFormattingEdits(e,t,n,r){const i=this._client.bridge.translate(e,t.getStartPosition()),o=await this._client.server.textDocumentRangeFormatting({textDocument:i.textDocument,range:this._client.bridge.translateRange(e,t),options:{tabSize:n.tabSize,insertSpaces:n.insertSpaces}});return o?o.map(a=>({range:this._client.bridge.translateBackRange(i.textDocument,a.range).range,text:a.newText})):null}},ln=class extends p{constructor(e){super(),this._connection=e,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{onTypeFormatting:{dynamicRegistration:!0}}})),this._register(this._connection.capabilities.registerCapabilityHandler(u.textDocumentOnTypeFormatting,!0,t=>s.languages.registerOnTypeFormattingEditProvider(_(t.documentSelector),new un(this._connection,t))))}},un=class{autoFormatTriggerCharacters;constructor(e,t){this._client=e,this._capabilities=t,this.autoFormatTriggerCharacters=[t.firstTriggerCharacter,...t.moreTriggerCharacter||[]]}async provideOnTypeFormattingEdits(e,t,n,r,i){const o=this._client.bridge.translate(e,t),a=await this._client.server.textDocumentOnTypeFormatting({textDocument:o.textDocument,position:o.position,ch:n,options:{tabSize:r.tabSize,insertSpaces:r.insertSpaces}});return a?a.map(l=>({range:this._client.bridge.translateBackRange(o.textDocument,l.range).range,text:l.newText})):null}},dn=class extends p{constructor(e){super(),this._connection=e,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{foldingRange:{dynamicRegistration:!0,rangeLimit:5e3,lineFoldingOnly:!1,foldingRangeKind:{valueSet:[C.Comment,C.Imports,C.Region]}}}})),this._register(this._connection.capabilities.registerCapabilityHandler(u.textDocumentFoldingRange,!0,t=>s.languages.registerFoldingRangeProvider(_(t.documentSelector),new gn(this._connection,t))))}},gn=class{constructor(e,t){this._client=e,this._capabilities=t}async provideFoldingRanges(e,t,n){const r=this._client.bridge.translate(e,new s.Position(1,1)),i=await this._client.server.textDocumentFoldingRange({textDocument:r.textDocument});return i?i.map(o=>({start:o.startLine+1,end:o.endLine+1,kind:mt(o.kind)})):null}},hn=class extends p{constructor(e){super(),this._connection=e,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{selectionRange:{dynamicRegistration:!0}}})),this._register(this._connection.capabilities.registerCapabilityHandler(u.textDocumentSelectionRange,!0,t=>s.languages.registerSelectionRangeProvider(_(t.documentSelector),new mn(this._connection,t))))}},mn=class{constructor(e,t){this._client=e,this._capabilities=t}async provideSelectionRanges(e,t,n){const r=this._client.bridge.translate(e,t[0]),i=await this._client.server.textDocumentSelectionRange({textDocument:r.textDocument,positions:t.map(o=>this._client.bridge.translate(e,o).position)});return i?i.map(o=>this.convertSelectionRange(o,r.textDocument)):null}convertSelectionRange(e,t){const n=[];let r=e;for(;r;)n.push({range:this._client.bridge.translateBackRange(t,r.range).range}),r=r.parent;return n}},pn=class extends p{_providers=new Set;constructor(e){super(),this._connection=e,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{inlayHint:{dynamicRegistration:!0,resolveSupport:{properties:["tooltip","textEdits","label.tooltip","label.location","label.command"]}}},workspace:{inlayHint:{refreshSupport:!0}}})),this._register(this._connection.connection.registerRequestHandler(M.client.workspaceInlayHintRefresh,async()=>{for(const t of this._providers)t.refresh();return{ok:null}})),this._register(this._connection.capabilities.registerCapabilityHandler(u.textDocumentInlayHint,!0,t=>{const n=new fn(this._connection,t);this._providers.add(n);const r=s.languages.registerInlayHintsProvider(_(t.documentSelector),n);return{dispose:()=>{this._providers.delete(n),r.dispose()}}}))}},fn=class{_onDidChangeInlayHints=new s.Emitter;onDidChangeInlayHints=this._onDidChangeInlayHints.event;resolveInlayHint;constructor(e,t){this._client=e,this._capabilities=t,t.resolveProvider&&(this.resolveInlayHint=async(n,r)=>{const i=await this._client.server.inlayHintResolve(n._lspInlayHint);return i.tooltip&&(n.tooltip=q(i.tooltip)),i.label!==n._lspInlayHint.label&&(n.label=me(i.label)),i.textEdits&&(n.textEdits=i.textEdits.map(o=>({range:this._client.bridge.translateBackRange({uri:n._targetUri},o.range).range,text:o.newText}))),n})}refresh(){this._onDidChangeInlayHints.fire()}async provideInlayHints(e,t,n){const r=this._client.bridge.translate(e,t.getStartPosition()),i=await _n(async()=>await this._client.server.textDocumentInlayHint({textDocument:r.textDocument,range:this._client.bridge.translateRange(e,t)}));return i?{hints:i.map(o=>({label:me(o.label),position:y(this._client.bridge.translateBack(r.textDocument,o.position),e).position,kind:yt(o.kind),tooltip:q(o.tooltip),paddingLeft:o.paddingLeft,paddingRight:o.paddingRight,textEdits:o.textEdits?.map(a=>({range:y(this._client.bridge.translateBackRange(r.textDocument,a.range),e).range,text:a.newText})),_lspInlayHint:o,_targetUri:r.textDocument.uri})),dispose:()=>{}}:null}};async function _n(e){for(let t=3;;t--)try{return await e()}catch(n){if(n.message==="content modified"&&t>0)continue;throw n}}function me(e){return typeof e=="string"?e:e.map(t=>{const n={label:t.value,tooltip:q(t.tooltip),command:R(t.command)};return t.location&&(n.location={uri:s.Uri.parse(t.location.uri),range:new s.Range(t.location.range.start.line+1,t.location.range.start.character+1,t.location.range.end.line+1,t.location.range.end.character+1)}),n})}function q(e){if(e)return typeof e=="string"?e:{value:e.value}}var Dn=class extends p{constructor(e){super(),this._connection=e,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{semanticTokens:{dynamicRegistration:!0,requests:{range:!0,full:{delta:!0}},tokenTypes:["namespace","type","class","enum","interface","struct","typeParameter","parameter","variable","property","enumMember","event","function","method","macro","keyword","modifier","comment","string","number","regexp","operator","decorator"],tokenModifiers:["declaration","definition","readonly","static","deprecated","abstract","async","modification","documentation","defaultLibrary"],formats:[et.Relative],overlappingTokenSupport:!1,multilineTokenSupport:!0}}})),this._register(this._connection.capabilities.registerCapabilityHandler(u.textDocumentSemanticTokensFull,!0,t=>s.languages.registerDocumentSemanticTokensProvider(_(t.documentSelector),new vn(this._connection,t))))}},vn=class{constructor(e,t){this._client=e,this._capabilities=t}getLegend(){return{tokenTypes:this._capabilities.legend.tokenTypes,tokenModifiers:this._capabilities.legend.tokenModifiers}}releaseDocumentSemanticTokens(e){}async provideDocumentSemanticTokens(e,t,n){const r=this._client.bridge.translate(e,e.getPositionAt(0)),i=this._capabilities.full;if(t&&i&&typeof i=="object"&&i.delta){const a=await this._client.server.textDocumentSemanticTokensFullDelta({textDocument:r.textDocument,previousResultId:t});return a?"edits"in a?{resultId:a.resultId,edits:a.edits.map(l=>({start:l.start,deleteCount:l.deleteCount,data:l.data?new Uint32Array(l.data):void 0}))}:{resultId:a.resultId,data:new Uint32Array(a.data)}:null}const o=await this._client.server.textDocumentSemanticTokensFull({textDocument:r.textDocument});return o?{resultId:o.resultId,data:new Uint32Array(o.data)}:null}async provideDocumentSemanticTokensEdits(e,t,n){return this.provideDocumentSemanticTokens(e,t,n)}},xn=class extends p{_diagnosticsMarkerOwner="lsp";_pullDiagnosticProviders=new Map;constructor(e){super(),this._connection=e,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{publishDiagnostics:{relatedInformation:!0,tagSupport:{valueSet:[...ce.keys()]},versionSupport:!0,codeDescriptionSupport:!0,dataSupport:!0},diagnostic:{dynamicRegistration:!0,relatedDocumentSupport:!0}}})),this._register(this._connection.connection.registerNotificationHandler(M.client.textDocumentPublishDiagnostics,t=>this._handlePublishDiagnostics(t))),this._register(this._connection.capabilities.registerCapabilityHandler(u.textDocumentDiagnostic,!0,t=>{const n=new W;for(const r of s.editor.getModels())this._addPullDiagnosticProvider(r,t,n);return n.add(s.editor.onDidCreateModel(r=>{this._addPullDiagnosticProvider(r,t,n)})),n}))}_addPullDiagnosticProvider(e,t,n){if(e.getLanguageId(),!kt(e,t.documentSelector))return;const r=new wn(e,this._connection,this._diagnosticsMarkerOwner,t);this._pullDiagnosticProviders.set(e,r),n.add(r),n.add(e.onWillDispose(()=>{this._pullDiagnosticProviders.delete(e)}))}_handlePublishDiagnostics(e){const t=e.uri;try{const n=this._connection.bridge.translateBack({uri:t},{line:0,character:0}).textModel;if(!n||n.isDisposed())return;const r=e.diagnostics.map(i=>z(i));s.editor.setModelMarkers(n,this._diagnosticsMarkerOwner,r)}catch(n){console.debug(`Could not set diagnostics for ${t}:`,n)}}},wn=class extends p{_updateHandle;_previousResultId;constructor(e,t,n,r){super(),this._model=e,this._connection=t,this._markerOwner=n,this._capability=r,this._register(this._model.onDidChangeContent(()=>{this._scheduleDiagnosticUpdate()})),this._scheduleDiagnosticUpdate()}_scheduleDiagnosticUpdate(){this._updateHandle!==void 0&&clearTimeout(this._updateHandle),this._updateHandle=window.setTimeout(()=>{this._updateHandle=void 0,this._requestDiagnostics()},500)}async _requestDiagnostics(){if(!this._model.isDisposed())try{const e=this._connection.bridge.translate(this._model,new s.Position(1,1)),t=await this._connection.server.textDocumentDiagnostic({textDocument:e.textDocument,identifier:this._capability.identifier,previousResultId:this._previousResultId});if(this._model.isDisposed())return;this._handleDiagnosticReport(t)}catch(e){console.error("Error requesting diagnostics:",e)}}_handleDiagnosticReport(e){if(e.kind==="full"){this._previousResultId=e.resultId;const t=e.items.map(n=>z(n));s.editor.setModelMarkers(this._model,this._markerOwner,t),"relatedDocuments"in e&&e.relatedDocuments&&this._handleRelatedDocuments(e.relatedDocuments)}else e.kind==="unchanged"&&(this._previousResultId=e.resultId)}_handleRelatedDocuments(e){for(const[t,n]of Object.entries(e))try{const r=this._connection.bridge.translateBack({uri:t},{line:0,character:0}).textModel;if(!r||r.isDisposed())continue;if(n.kind==="full"){const i=n.items.map(o=>z(o));s.editor.setModelMarkers(r,this._markerOwner,i)}}catch(r){console.debug(`Could not set related diagnostics for ${t}:`,r)}}dispose(){this._updateHandle!==void 0&&(clearTimeout(this._updateHandle),this._updateHandle=void 0),super.dispose()}},bn=class{constructor(e,t,n,r){this.server=e,this.bridge=t,this.capabilities=n,this.connection=r}},yn=class extends p{_staticCapabilities=new Set;_dynamicFromStatic=Cn.create();_registrations=new Map;_serverCapabilities=void 0;constructor(e){super(),this._connection=e,this._register(this._connection.registerRequestHandler(M.client.clientRegisterCapability,async t=>{for(const n of t.registrations){const r=fe(n.method),i=new pe(n.id,r,n.registerOptions,!1);this._registerCapabilityOptions(i)}return{ok:null}})),this._register(this._connection.registerRequestHandler(M.client.clientUnregisterCapability,async t=>{for(const n of t.unregisterations){const r=fe(n.method),i=this._registrations.get(r),o=i?.registrations.get(n.id);if(!o)throw new Error(`No registration for method ${n.method} with id ${n.id}`);o?.handlerDisposables.forEach(a=>a.dispose()),i?.registrations.delete(n.id)}return{ok:null}}))}_registerCapabilityOptions(e){let t=this._registrations.get(e.capability);if(t||(t=new _e,this._registrations.set(e.capability,t)),t.registrations.has(e.id))throw new Error(`Handler for method ${e.capability.method} with id ${e.id} already registered`);t.registrations.set(e.id,e);for(const n of t.handlers)!n.handleStaticCapability&&e.isFromStatic||e.handlerDisposables.set(n,n.handler(e.options))}setServerCapabilities(e){if(this._serverCapabilities)throw new Error("Server capabilities already set");this._serverCapabilities=e;for(const t of Object.values(u)){const n=this._dynamicFromStatic.getOptions(t,e);n&&this._registerCapabilityOptions(new pe(t.method,t,n,!0))}}getClientCapabilities(){const e={};for(const t of this._staticCapabilities)De(e,t.cap);return e}addStaticClientCapabilities(e){const t={cap:e};return this._staticCapabilities.add(t),{dispose:()=>{this._staticCapabilities.delete(t)}}}registerCapabilityHandler(e,t,n){let r=this._registrations.get(e);r||(r=new _e,this._registrations.set(e,r));const i=new kn(e,t,n);r.handlers.add(i);for(const o of r.registrations.values())!i.handleStaticCapability&&o.isFromStatic||o.handlerDisposables.set(i,n(o.options));return{dispose:()=>{r.handlers.delete(i);for(const o of r.registrations.values()){const a=o.handlerDisposables.get(i);a&&(a.dispose(),o.handlerDisposables.delete(i))}}}}},kn=class{constructor(e,t,n){this.capability=e,this.handleStaticCapability=t,this.handler=n}},pe=class{handlerDisposables=new Map;constructor(e,t,n,r){this.id=e,this.capability=t,this.options=n,this.isFromStatic=r}};const Sn=new Map([...Object.values(u)].map(e=>[e.method,e]));function fe(e){const t=Sn.get(e);if(!t)throw new Error(`No capability found for method ${e}`);return t}var _e=class{handlers=new Set;registrations=new Map},Cn=class Ee{_mappings=new Map;static create(){const t=new Ee;return t.set(u.textDocumentDidChange,n=>{if(n.textDocumentSync!==void 0)return typeof n.textDocumentSync=="object"?{syncKind:n.textDocumentSync.change??Ze.None,documentSelector:null}:{syncKind:n.textDocumentSync,documentSelector:null}}),t.set(u.textDocumentCompletion,n=>n.completionProvider),t.set(u.textDocumentHover,n=>n.hoverProvider),t.set(u.textDocumentSignatureHelp,n=>n.signatureHelpProvider),t.set(u.textDocumentDefinition,n=>n.definitionProvider),t.set(u.textDocumentReferences,n=>n.referencesProvider),t.set(u.textDocumentDocumentHighlight,n=>n.documentHighlightProvider),t.set(u.textDocumentDocumentSymbol,n=>n.documentSymbolProvider),t.set(u.textDocumentCodeAction,n=>n.codeActionProvider),t.set(u.textDocumentCodeLens,n=>n.codeLensProvider),t.set(u.textDocumentDocumentLink,n=>n.documentLinkProvider),t.set(u.textDocumentFormatting,n=>n.documentFormattingProvider),t.set(u.textDocumentRangeFormatting,n=>n.documentRangeFormattingProvider),t.set(u.textDocumentOnTypeFormatting,n=>n.documentOnTypeFormattingProvider),t.set(u.textDocumentRename,n=>n.renameProvider),t.set(u.textDocumentFoldingRange,n=>n.foldingRangeProvider),t.set(u.textDocumentDeclaration,n=>n.declarationProvider),t.set(u.textDocumentTypeDefinition,n=>n.typeDefinitionProvider),t.set(u.textDocumentImplementation,n=>n.implementationProvider),t.set(u.textDocumentDocumentColor,n=>n.colorProvider),t.set(u.textDocumentSelectionRange,n=>n.selectionRangeProvider),t.set(u.textDocumentLinkedEditingRange,n=>n.linkedEditingRangeProvider),t.set(u.textDocumentPrepareCallHierarchy,n=>n.callHierarchyProvider),t.set(u.textDocumentSemanticTokensFull,n=>n.semanticTokensProvider),t.set(u.textDocumentInlayHint,n=>n.inlayHintProvider),t.set(u.textDocumentInlineValue,n=>n.inlineValueProvider),t.set(u.textDocumentDiagnostic,n=>n.diagnosticProvider),t.set(u.textDocumentMoniker,n=>n.monikerProvider),t.set(u.textDocumentPrepareTypeHierarchy,n=>n.typeHierarchyProvider),t.set(u.workspaceSymbol,n=>n.workspaceSymbolProvider),t.set(u.workspaceExecuteCommand,n=>n.executeCommandProvider),t}set(t,n){if(this._mappings.has(t.method))throw new Error(`Capability for method ${t.method} already registered`);this._mappings.set(t.method,n)}getOptions(t,n){const r=this._mappings.get(t.method);if(r)return r(n)}};function De(e,t){for(const n of Object.keys(t)){const r=t[n];if(r===void 0)continue;const i=e[n];if(i===void 0){e[n]=r;continue}if(typeof r!="object"||r===null){e[n]=r;continue}if(typeof i!="object"||i===null){e[n]=r;continue}De(i,r)}}var Rn=class extends p{_managedModels=new Map;_managedModelsReverse=new Map;_started=!1;constructor(e,t){super(),this._server=e,this._capabilities=t,this._register(this._capabilities.addStaticClientCapabilities({textDocument:{synchronization:{dynamicRegistration:!0,willSave:!1,willSaveWaitUntil:!1,didSave:!1}}})),this._register(t.registerCapabilityHandler(u.textDocumentDidChange,!0,n=>{if(this._started)return{dispose:()=>{}};this._started=!0,this._register(s.editor.onDidCreateModel(r=>{this._getOrCreateManagedModel(r)}));for(const r of s.editor.getModels())this._getOrCreateManagedModel(r);return{dispose:()=>{}}}))}_getOrCreateManagedModel(e){if(!this._started)throw new Error("Not started");const t=e.uri.toString(!0).toLowerCase();let n=this._managedModels.get(e);return n||(n=new Tn(e,this._server),this._managedModels.set(e,n),this._managedModelsReverse.set(t,e)),e.onWillDispose(()=>{n.dispose(),this._managedModels.delete(e),this._managedModelsReverse.delete(t)}),n}translateBack(e,t){const n=e.uri.toLowerCase(),r=this._managedModelsReverse.get(n);if(!r)throw new Error(`No text model for uri ${n}`);return{textModel:r,position:new s.Position(t.line+1,t.character+1)}}translateBackRange(e,t){const n=e.uri.toLowerCase(),r=this._managedModelsReverse.get(n);if(!r)throw new Error(`No text model for uri ${n}`);return{textModel:r,range:new s.Range(t.start.line+1,t.start.character+1,t.end.line+1,t.end.character+1)}}translate(e,t){return{textDocument:{uri:e.uri.toString(!0)},position:{line:t.lineNumber-1,character:t.column-1}}}translateRange(e,t){return{start:{line:t.startLineNumber-1,character:t.startColumn-1},end:{line:t.endLineNumber-1,character:t.endColumn-1}}}},Tn=class extends p{constructor(e,t){super(),this._textModel=e,this._api=t;const n=e.uri.toString(!0).toLowerCase();this._api.textDocumentDidOpen({textDocument:{languageId:e.getLanguageId(),uri:n,version:e.getVersionId(),text:e.getValue()}}),this._register(e.onDidChangeContent(r=>{const i=r.changes.map(o=>Mn(o));this._api.textDocumentDidChange({textDocument:{uri:n,version:e.getVersionId()},contentChanges:i})})),this._register({dispose:()=>{this._api.textDocumentDidClose({textDocument:{uri:n}})}})}};function Mn(e){return{range:Fn(e.range),rangeLength:e.rangeLength,text:e.text}}function Fn(e){return{start:{line:e.startLineNumber-1,character:e.startColumn-1},end:{line:e.endLineNumber-1,character:e.endColumn-1}}}var En=class{_connection;_capabilitiesRegistry;_bridge;_initPromise;constructor(e){const t=O.fromTransport(e),n=M.getServer(t,{});t.startListen(),this._capabilitiesRegistry=new yn(t),this._bridge=new Rn(n.server,this._capabilitiesRegistry),this._connection=new bn(n.server,this._bridge,this._capabilitiesRegistry,t),this.createFeatures(),this._initPromise=this._init()}async _init(){const e=await this._connection.server.initialize({processId:null,capabilities:this._capabilitiesRegistry.getClientCapabilities(),rootUri:null});this._connection.server.initialized({}),this._capabilitiesRegistry.setServerCapabilities(e.capabilities)}createFeatures(){const e=new W;return e.add(new St(this._connection)),e.add(new Mt(this._connection)),e.add(new Pt(this._connection)),e.add(new Lt(this._connection)),e.add(new Ot(this._connection)),e.add(new Nt(this._connection)),e.add(new zt(this._connection)),e.add(new Bt(this._connection)),e.add(new Ut(this._connection)),e.add(new Jt(this._connection)),e.add(new Xt(this._connection)),e.add(new Kt(this._connection)),e.add(new en(this._connection)),e.add(new nn(this._connection)),e.add(new on(this._connection)),e.add(new an(this._connection)),e.add(new ln(this._connection)),e.add(new dn(this._connection)),e.add(new hn(this._connection)),e.add(new pn(this._connection)),e.add(new Dn(this._connection)),e.add(new xn(this._connection)),e}},T=null;typeof WebSocket<"u"?T=WebSocket:typeof MozWebSocket<"u"?T=MozWebSocket:typeof global<"u"?T=global.WebSocket||global.MozWebSocket:typeof window<"u"?T=window.WebSocket||window.MozWebSocket:typeof self<"u"&&(T=self.WebSocket||self.MozWebSocket);var Pn=T;function Hn(e){return"host"in e?{address:`${e.forceTls?"wss":"ws"}://${e.host}:${e.port}`}:e}var Ln=class j extends J{socket;static connectTo(t){const n=new Pn(Hn(t).address);return new Promise((r,i)=>{n.onerror=o=>{i(o)},n.onopen=()=>{r(new j(n))}})}static fromWebSocket(t){return new j(t)}errorEmitter=new L;onError=this.errorEmitter;constructor(t){super(),this.socket=t,t.onmessage=n=>{try{const r=n.data;if(typeof r=="string"){const i=JSON.parse(r);this._dispatchReceivedMessage(i)}else throw new Error("Not supported")}catch(r){this.errorEmitter.fire({error:r})}},t.onclose=n=>{this._onConnectionClosed()}}close(){this.socket.close()}dispose(){this.close()}_sendImpl(t){const n=JSON.stringify(t);return new Promise((r,i)=>{this.socket.send(n,o=>{o?i(o):r()})})}toString(){return`${this.id}@${this.socket.url}`}},ve=class extends J{_windowLike;_source;_loadingState;_disposed=!1;constructor(e,t=void 0,n=void 0){super(),this._windowLike=e,this._source=t,this._loadingState=n,this._windowLike.addEventListener("message",this._messageHandler)}_messageHandler=({data:e,source:t})=>{this._source&&t!==this._source||typeof e=="object"&&e&&this._dispatchReceivedMessage(e)};async _sendImpl(e){if(this._disposed)throw new Error("Transport is disposed");this._loadingState&&!this._loadingState.loaded&&await this._loadingState.onLoaded,this._windowLike.postMessage(e)}toString(){return`${this.id}@${this._windowLike}`}dispose(){this._disposed||(this._disposed=!0,this._windowLike.removeEventListener("message",this._messageHandler))}};function In(e){if(typeof window>"u")throw new Error("call this function from the main browser thread");return new ve(e)}function On(e){if(typeof window>"u")throw new Error("call this function from the main browser thread");return new ve(e.contentWindow,e.contentWindow,{loaded:window.document.readyState==="complete",onLoaded:new Promise(t=>{window.addEventListener("load",()=>t())})})}const xe=Object.freeze(Object.defineProperty({__proto__:null,MonacoLspClient:En,WebSocketTransport:Ln,createTransportToIFrame:On,createTransportToWorker:In},Symbol.toStringTag,{value:"Module"})),we="__monacoFindWidgetTabIndexPatchApplied",F="__monacoFindWidgetOriginalTabIndex";function be(e,t){const n=e?._domNode;if(!n)return;const r=n.querySelectorAll('input, textarea, [tabindex], [role="button"], [role="checkbox"]');for(const i of r)if(i instanceof HTMLElement)if(t){if(!(F in i.dataset))continue;const o=i.dataset[F];o===""?i.removeAttribute("tabindex"):i.tabIndex=Number(o),delete i.dataset[F]}else F in i.dataset||(i.dataset[F]=i.getAttribute("tabindex")??""),i.tabIndex=-1}if(!k.FindWidget[we]){const e=k.FindWidget.prototype._reveal,t=k.FindWidget.prototype._hide;k.FindWidget.prototype._reveal=function(...n){e.apply(this,n),be(this,!0)},k.FindWidget.prototype._hide=function(...n){t.apply(this,n),be(this,!1)},k.FindWidget[we]=!0}const An=Object.freeze(Object.defineProperty({__proto__:null,CancellationTokenSource:s.CancellationTokenSource,Emitter:s.Emitter,KeyCode:s.KeyCode,KeyMod:s.KeyMod,MarkerSeverity:s.MarkerSeverity,MarkerTag:s.MarkerTag,Position:s.Position,Range:s.Range,Selection:s.Selection,SelectionDirection:s.SelectionDirection,Token:s.Token,Uri:s.Uri,css:Pe.register,editor:s.editor,html:He.register,json:Le.register,languages:s.languages,lsp:xe,typescript:Ie.register},Symbol.toStringTag,{value:"Module"}));U.index=xe,U.monaco=An})); diff --git a/emrg/gui/vendor/monaco/vs/index.js b/emrg/gui/vendor/monaco/vs/index.js new file mode 100644 index 00000000..be19bc9b --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/index.js @@ -0,0 +1 @@ +define("vs/index",["exports","./index-CBVt3dzv","./basic-languages/monaco.contribution","./monaco.contribution-9cKT3C7t","./monaco.contribution-BgRy6xDf","./monaco.contribution-BPhsneLd","./monaco.contribution-BE88ZNGY","./toggleHighContrast-qGX7E9o7","./editor-KLE6jdfb"],(function(n,e,t,a,c,o,g,l,i){"use strict";n.lsp=e.index,n.css=a.register,n.html=c.register,n.json=o.register,n.typescript=g.register,n.CancellationTokenSource=i.CancellationTokenSource,n.Emitter=i.Emitter,n.KeyCode=i.KeyCode,n.KeyMod=i.KeyMod,n.MarkerSeverity=i.MarkerSeverity,n.MarkerTag=i.MarkerTag,n.Position=i.Position,n.Range=i.Range,n.Selection=i.Selection,n.SelectionDirection=i.SelectionDirection,n.Token=i.Token,n.Uri=i.Uri,n.editor=i.editor,n.languages=i.languages,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/ini-CsNwO04R.js b/emrg/gui/vendor/monaco/vs/ini-CsNwO04R.js new file mode 100644 index 00000000..7d7b45a2 --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/ini-CsNwO04R.js @@ -0,0 +1 @@ +define("vs/ini-CsNwO04R",["exports"],(function(e){"use strict";const n={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},s={defaultToken:"",tokenPostfix:".ini",escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/^\[[^\]]*\]/,"metatag"],[/(^\w+)(\s*)(\=)/,["key","","delimiter"]],{include:"@whitespace"},[/\d+/,"number"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string",'@string."'],[/'/,"string","@string.'"]],whitespace:[[/[ \t\r\n]+/,""],[/^\s*[#;].*$/,"comment"]],string:[[/[^\\"']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}]]}};e.conf=n,e.language=s,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/initialize-DL0l1TGY.js b/emrg/gui/vendor/monaco/vs/initialize-DL0l1TGY.js new file mode 100644 index 00000000..9398390d --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/initialize-DL0l1TGY.js @@ -0,0 +1 @@ +define("vs/initialize-DL0l1TGY",["exports","./editorWorkerHost-fVE1cjcC"],(function(i,n){"use strict";let s=!1;function u(t){if(s)throw new Error("WebWorker already initialized!");s=!0;const r=new n.WebWorkerServer(e=>globalThis.postMessage(e),e=>t(e));return globalThis.onmessage=e=>{r.onmessage(e.data)},r}function a(t){let r;const e=u(c=>{const g=n.EditorWorkerHost.getChannel(c),h={host:new Proxy({},{get(z,o,k){if(o!=="then"){if(typeof o!="string")throw new Error("Not supported");return(...W)=>g.$fhr(o,W)}}}),getMirrorModels:()=>e.requestHandler.getModels()};return r=t(h),new n.EditorWorker(r)});return r}let l=!1;function d(){return l}function f(t){l=!0,self.onmessage=r=>{a(e=>t(e,r.data))}}i.initialize=f,i.isWorkerInitialized=d,i.start=a})); diff --git a/emrg/gui/vendor/monaco/vs/java-CI4ZMsH9.js b/emrg/gui/vendor/monaco/vs/java-CI4ZMsH9.js new file mode 100644 index 00000000..122575d6 --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/java-CI4ZMsH9.js @@ -0,0 +1 @@ +define("vs/java-CI4ZMsH9",["exports"],(function(e){"use strict";const t={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],folding:{markers:{start:new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:))")}}},n={defaultToken:"",tokenPostfix:".java",keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false","yield","record","sealed","non-sealed","permits"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/@\s*[a-zA-Z_\$][\w\$]*/,"annotation"],[/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/,"number.float"],[/0[xX](@hexdigits)[Ll]?/,"number.hex"],[/0(@octaldigits)[Ll]?/,"number.octal"],[/0[bB](@binarydigits)[Ll]?/,"number.binary"],[/(@digits)[fFdD]/,"number.float"],[/(@digits)[lL]?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"""/,"string","@multistring"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@javadoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],javadoc:[[/[^\/*]+/,"comment.doc"],[/\/\*/,"comment.doc.invalid"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],multistring:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"""/,"string","@pop"],[/./,"string"]]}};e.conf=t,e.language=n,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/javascript-DTJl4Jn1.js b/emrg/gui/vendor/monaco/vs/javascript-DTJl4Jn1.js new file mode 100644 index 00000000..b1133e59 --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/javascript-DTJl4Jn1.js @@ -0,0 +1 @@ +define("vs/javascript-DTJl4Jn1",["exports","./typescript-_2t_511t"],(function(a,e){"use strict";const n=e.conf,g={defaultToken:"invalid",tokenPostfix:".js",keywords:["break","case","catch","class","continue","const","constructor","debugger","default","delete","do","else","export","extends","false","finally","for","from","function","get","if","import","in","instanceof","let","new","null","return","set","static","super","switch","symbol","this","throw","true","try","typeof","undefined","var","void","while","with","yield","async","await","of"],typeKeywords:[],operators:e.language.operators,symbols:e.language.symbols,escapes:e.language.escapes,digits:e.language.digits,octaldigits:e.language.octaldigits,binarydigits:e.language.binarydigits,hexdigits:e.language.hexdigits,regexpctl:e.language.regexpctl,regexpesc:e.language.regexpesc,tokenizer:e.language.tokenizer};a.conf=n,a.language=g,Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/json.worker-BizpAl9O.js b/emrg/gui/vendor/monaco/vs/json.worker-BizpAl9O.js new file mode 100644 index 00000000..5cb0ef58 --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/json.worker-BizpAl9O.js @@ -0,0 +1 @@ +define("vs/json.worker-BizpAl9O", ["require", "exports"], (function(require, r){"use strict";const e=""+new URL(require.toUrl("./assets/json.worker-CoJx_OPf.js"),document.baseURI).href;r.__worker_url_0__=e})); diff --git a/emrg/gui/vendor/monaco/vs/jsonMode-DLUiMUrI.js b/emrg/gui/vendor/monaco/vs/jsonMode-DLUiMUrI.js new file mode 100644 index 00000000..c4b0311e --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/jsonMode-DLUiMUrI.js @@ -0,0 +1 @@ +define("vs/jsonMode-DLUiMUrI",["exports","./json.worker-BizpAl9O","./workers-BBttULjf","./lspLanguageFeatures-BIkJOWLw","./main-BEx-Fmlo","./editor-KLE6jdfb"],(function(o,S,P,n,R,l){"use strict";class E{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>12e4&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=P.createWebWorker({moduleId:"vs/language/json/jsonWorker",createWorker:()=>new Worker(S.__worker_url_0__,{type:"module"}),label:this._defaults.languageId,createData:{languageSettings:this._defaults.diagnosticsOptions,languageId:this._defaults.languageId,enableSchemaRequest:this._defaults.diagnosticsOptions.enableSchemaRequest}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...e){let t;return this._getClient().then(a=>{t=a}).then(a=>{if(this._worker)return this._worker.withSyncedResources(e)}).then(a=>t)}}function v(s){return{getInitialState:()=>new g(null,null,!1,null),tokenize:(e,t)=>K(s,e,t)}}const w="delimiter.bracket.json",A="delimiter.array.json",O="delimiter.colon.json",b="delimiter.comma.json",I="keyword.json",T="keyword.json",W="string.value.json",N="number.json",y="string.key.json",M="comment.block.json",j="comment.line.json";class m{constructor(e,t){this.parent=e,this.type=t}static pop(e){return e?e.parent:null}static push(e,t){return new m(e,t)}static equals(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;for(;e&&t;){if(e===t)return!0;if(e.type!==t.type)return!1;e=e.parent,t=t.parent}return!0}}class g{constructor(e,t,a,c){this._state=e,this.scanError=t,this.lastWasColon=a,this.parents=c}clone(){return new g(this._state,this.scanError,this.lastWasColon,this.parents)}equals(e){return e===this?!0:!e||!(e instanceof g)?!1:this.scanError===e.scanError&&this.lastWasColon===e.lastWasColon&&m.equals(this.parents,e.parents)}getStateData(){return this._state}setStateData(e){this._state=e}}function K(s,e,t,a=0){let c=0,_=!1;switch(t.scanError){case 2:e='"'+e,c=1;break;case 1:e="/*"+e,c=2;break}const i=R.createScanner(e);let r=t.lastWasColon,u=t.parents;const f={tokens:[],endState:t.clone()};for(;;){let k=a+i.getPosition(),d="";const p=i.scan();if(p===17)break;if(k===a+i.getPosition())throw new Error("Scanner did not advance, next 3 characters are: "+e.substr(i.getPosition(),3));switch(_&&(k-=c),_=c>0,p){case 1:u=m.push(u,0),d=w,r=!1;break;case 2:u=m.pop(u),d=w,r=!1;break;case 3:u=m.push(u,1),d=A,r=!1;break;case 4:u=m.pop(u),d=A,r=!1;break;case 6:d=O,r=!0;break;case 5:d=b,r=!1;break;case 8:case 9:d=I,r=!1;break;case 7:d=T,r=!1;break;case 10:const V=(u?u.type:0)===1;d=r||V?W:y,r=!1;break;case 11:d=N,r=!1;break}switch(p){case 12:d=j;break;case 13:d=M;break}f.endState=new g(t.getStateData(),i.getTokenError(),r,u),f.tokens.push({startIndex:k,scopes:d})}return f}let h;function U(){return new Promise((s,e)=>{if(!h)return e("JSON not registered!");s(h)})}class H extends n.DiagnosticsAdapter{constructor(e,t,a){super(e,t,a.onDidChange),this._disposables.push(l.editor.onWillDisposeModel(c=>{this._resetSchema(c.uri)})),this._disposables.push(l.editor.onDidChangeModelLanguage(c=>{this._resetSchema(c.model.uri)}))}_resetSchema(e){this._worker().then(t=>{t.resetSchema(e.toString())})}}function q(s){const e=[],t=[],a=new E(s);e.push(a),h=(...i)=>a.getLanguageServiceWorker(...i);function c(){const{languageId:i,modeConfiguration:r}=s;D(t),r.documentFormattingEdits&&t.push(l.languages.registerDocumentFormattingEditProvider(i,new n.DocumentFormattingEditProvider(h))),r.documentRangeFormattingEdits&&t.push(l.languages.registerDocumentRangeFormattingEditProvider(i,new n.DocumentRangeFormattingEditProvider(h))),r.completionItems&&t.push(l.languages.registerCompletionItemProvider(i,new n.CompletionAdapter(h,[" ",":",'"']))),r.hovers&&t.push(l.languages.registerHoverProvider(i,new n.HoverAdapter(h))),r.documentSymbols&&t.push(l.languages.registerDocumentSymbolProvider(i,new n.DocumentSymbolAdapter(h))),r.tokens&&t.push(l.languages.setTokensProvider(i,v(!0))),r.colors&&t.push(l.languages.registerColorProvider(i,new n.DocumentColorAdapter(h))),r.foldingRanges&&t.push(l.languages.registerFoldingRangeProvider(i,new n.FoldingRangeAdapter(h))),r.diagnostics&&t.push(new H(i,h,s)),r.selectionRanges&&t.push(l.languages.registerSelectionRangeProvider(i,new n.SelectionRangeAdapter(h)))}c(),e.push(l.languages.setLanguageConfiguration(s.languageId,B));let _=s.modeConfiguration;return s.onDidChange(i=>{i.modeConfiguration!==_&&(_=i.modeConfiguration,c())}),e.push(C(t)),C(e)}function C(s){return{dispose:()=>D(s)}}function D(s){for(;s.length;)s.pop().dispose()}const B={wordPattern:/(-?\d*\.\d\w*)|([^\[\{\]\}\:\"\,\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string"]},{open:"[",close:"]",notIn:["string"]},{open:'"',close:'"',notIn:["string"]}]};o.CompletionAdapter=n.CompletionAdapter,o.DefinitionAdapter=n.DefinitionAdapter,o.DiagnosticsAdapter=n.DiagnosticsAdapter,o.DocumentColorAdapter=n.DocumentColorAdapter,o.DocumentFormattingEditProvider=n.DocumentFormattingEditProvider,o.DocumentHighlightAdapter=n.DocumentHighlightAdapter,o.DocumentLinkAdapter=n.DocumentLinkAdapter,o.DocumentRangeFormattingEditProvider=n.DocumentRangeFormattingEditProvider,o.DocumentSymbolAdapter=n.DocumentSymbolAdapter,o.FoldingRangeAdapter=n.FoldingRangeAdapter,o.HoverAdapter=n.HoverAdapter,o.ReferenceAdapter=n.ReferenceAdapter,o.RenameAdapter=n.RenameAdapter,o.SelectionRangeAdapter=n.SelectionRangeAdapter,o.fromPosition=n.fromPosition,o.fromRange=n.fromRange,o.toRange=n.toRange,o.toTextEdit=n.toTextEdit,o.WorkerManager=E,o.getWorker=U,o.setupMode=q,Object.defineProperty(o,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/julia-BwzEvaQw.js b/emrg/gui/vendor/monaco/vs/julia-BwzEvaQw.js new file mode 100644 index 00000000..d42154fa --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/julia-BwzEvaQw.js @@ -0,0 +1 @@ +define("vs/julia-BwzEvaQw",["exports"],(function(e){"use strict";const t={brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},r={tokenPostfix:".julia",keywords:["begin","while","if","for","try","return","break","continue","function","macro","quote","let","local","global","const","do","struct","module","baremodule","using","import","export","end","else","elseif","catch","finally","mutable","primitive","abstract","type","in","isa","where","new"],types:["LinRange","LineNumberNode","LinearIndices","LoadError","MIME","Matrix","Method","MethodError","Missing","MissingException","Module","NTuple","NamedTuple","Nothing","Number","OrdinalRange","OutOfMemoryError","OverflowError","Pair","PartialQuickSort","PermutedDimsArray","Pipe","Ptr","QuoteNode","Rational","RawFD","ReadOnlyMemoryError","Real","ReentrantLock","Ref","Regex","RegexMatch","RoundingMode","SegmentationFault","Set","Signed","Some","StackOverflowError","StepRange","StepRangeLen","StridedArray","StridedMatrix","StridedVecOrMat","StridedVector","String","StringIndexError","SubArray","SubString","SubstitutionString","Symbol","SystemError","Task","Text","TextDisplay","Timer","Tuple","Type","TypeError","TypeVar","UInt","UInt128","UInt16","UInt32","UInt64","UInt8","UndefInitializer","AbstractArray","UndefKeywordError","AbstractChannel","UndefRefError","AbstractChar","UndefVarError","AbstractDict","Union","AbstractDisplay","UnionAll","AbstractFloat","UnitRange","AbstractIrrational","Unsigned","AbstractMatrix","AbstractRange","Val","AbstractSet","Vararg","AbstractString","VecElement","AbstractUnitRange","VecOrMat","AbstractVecOrMat","Vector","AbstractVector","VersionNumber","Any","WeakKeyDict","ArgumentError","WeakRef","Array","AssertionError","BigFloat","BigInt","BitArray","BitMatrix","BitSet","BitVector","Bool","BoundsError","CapturedException","CartesianIndex","CartesianIndices","Cchar","Cdouble","Cfloat","Channel","Char","Cint","Cintmax_t","Clong","Clonglong","Cmd","Colon","Complex","ComplexF16","ComplexF32","ComplexF64","CompositeException","Condition","Cptrdiff_t","Cshort","Csize_t","Cssize_t","Cstring","Cuchar","Cuint","Cuintmax_t","Culong","Culonglong","Cushort","Cvoid","Cwchar_t","Cwstring","DataType","DenseArray","DenseMatrix","DenseVecOrMat","DenseVector","Dict","DimensionMismatch","Dims","DivideError","DomainError","EOFError","Enum","ErrorException","Exception","ExponentialBackOff","Expr","Float16","Float32","Float64","Function","GlobalRef","HTML","IO","IOBuffer","IOContext","IOStream","IdDict","IndexCartesian","IndexLinear","IndexStyle","InexactError","InitError","Int","Int128","Int16","Int32","Int64","Int8","Integer","InterruptException","InvalidStateException","Irrational","KeyError"],keywordops:["<:",">:",":","=>","...",".","->","?"],allops:/[^\w\d\s()\[\]{}"'#]+/,constants:["true","false","nothing","missing","undef","Inf","pi","NaN","π","ℯ","ans","PROGRAM_FILE","ARGS","C_NULL","VERSION","DEPOT_PATH","LOAD_PATH"],operators:["!","!=","!==","%","&","*","+","-","/","//","<","<<","<=","==","===","=>",">",">=",">>",">>>","\\","^","|","|>","~","÷","∈","∉","∋","∌","∘","√","∛","∩","∪","≈","≉","≠","≡","≢","≤","≥","⊆","⊇","⊈","⊉","⊊","⊋","⊻"],brackets:[{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"}],ident:/π|ℯ|\b(?!\d)\w+\b/,escape:/(?:[abefnrstv\\"'\n\r]|[0-7]{1,3}|x[0-9A-Fa-f]{1,2}|u[0-9A-Fa-f]{4})/,escapes:/\\(?:C\-(@escape|.)|c(@escape|.)|@escape)/,tokenizer:{root:[[/(::)\s*|\b(isa)\s+/,"keyword","@typeanno"],[/\b(isa)(\s*\(@ident\s*,\s*)/,["keyword",{token:"",next:"@typeanno"}]],[/\b(type|struct)[ \t]+/,"keyword","@typeanno"],[/^\s*:@ident[!?]?/,"metatag"],[/(return)(\s*:@ident[!?]?)/,["keyword","metatag"]],[/(\(|\[|\{|@allops)(\s*:@ident[!?]?)/,["","metatag"]],[/:\(/,"metatag","@quote"],[/r"""/,"regexp.delim","@tregexp"],[/r"/,"regexp.delim","@sregexp"],[/raw"""/,"string.delim","@rtstring"],[/[bv]?"""/,"string.delim","@dtstring"],[/raw"/,"string.delim","@rsstring"],[/[bv]?"/,"string.delim","@dsstring"],[/(@ident)\{/,{cases:{"$1@types":{token:"type",next:"@gen"},"@default":{token:"type",next:"@gen"}}}],[/@ident[!?'']?(?=\.?\()/,{cases:{"@types":"type","@keywords":"keyword","@constants":"variable","@default":"keyword.flow"}}],[/@ident[!?']?/,{cases:{"@types":"type","@keywords":"keyword","@constants":"variable","@default":"identifier"}}],[/\$\w+/,"key"],[/\$\(/,"key","@paste"],[/@@@ident/,"annotation"],{include:"@whitespace"},[/'(?:@escapes|.)'/,"string.character"],[/[()\[\]{}]/,"@brackets"],[/@allops/,{cases:{"@keywordops":"keyword","@operators":"operator"}}],[/[;,]/,"delimiter"],[/0[xX][0-9a-fA-F](_?[0-9a-fA-F])*/,"number.hex"],[/0[_oO][0-7](_?[0-7])*/,"number.octal"],[/0[bB][01](_?[01])*/,"number.binary"],[/[+\-]?\d+(\.\d+)?(im?|[eE][+\-]?\d+(\.\d+)?)?/,"number"]],typeanno:[[/[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*\{/,"type","@gen"],[/([a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*)(\s*<:\s*)/,["type","keyword"]],[/[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*/,"type","@pop"],["","","@pop"]],gen:[[/[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*\{/,"type","@push"],[/[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*/,"type"],[/<:/,"keyword"],[/(\})(\s*<:\s*)/,["type",{token:"keyword",next:"@pop"}]],[/\}/,"type","@pop"],{include:"@root"}],quote:[[/\$\(/,"key","@paste"],[/\(/,"@brackets","@paren"],[/\)/,"metatag","@pop"],{include:"@root"}],paste:[[/:\(/,"metatag","@quote"],[/\(/,"@brackets","@paren"],[/\)/,"key","@pop"],{include:"@root"}],paren:[[/\$\(/,"key","@paste"],[/:\(/,"metatag","@quote"],[/\(/,"@brackets","@push"],[/\)/,"@brackets","@pop"],{include:"@root"}],sregexp:[[/^.*/,"invalid"],[/[^\\"()\[\]{}]/,"regexp"],[/[()\[\]{}]/,"@brackets"],[/\\./,"operator.scss"],[/"[imsx]*/,"regexp.delim","@pop"]],tregexp:[[/[^\\"()\[\]{}]/,"regexp"],[/[()\[\]{}]/,"@brackets"],[/\\./,"operator.scss"],[/"(?!"")/,"string"],[/"""[imsx]*/,"regexp.delim","@pop"]],rsstring:[[/^.*/,"invalid"],[/[^\\"]/,"string"],[/\\./,"string.escape"],[/"/,"string.delim","@pop"]],rtstring:[[/[^\\"]/,"string"],[/\\./,"string.escape"],[/"(?!"")/,"string"],[/"""/,"string.delim","@pop"]],dsstring:[[/^.*/,"invalid"],[/[^\\"\$]/,"string"],[/\$/,"","@interpolated"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string.delim","@pop"]],dtstring:[[/[^\\"\$]/,"string"],[/\$/,"","@interpolated"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"(?!"")/,"string"],[/"""/,"string.delim","@pop"]],interpolated:[[/\(/,{token:"",switchTo:"@interpolated_compound"}],[/[a-zA-Z_]\w*/,"identifier"],["","","@pop"]],interpolated_compound:[[/\)/,"","@pop"],{include:"@root"}],whitespace:[[/[ \t\r\n]+/,""],[/#=/,"comment","@multi_comment"],[/#.*$/,"comment"]],multi_comment:[[/#=/,"comment","@push"],[/=#/,"comment","@pop"],[/=(?!#)|#(?!=)/,"comment"],[/[^#=]+/,"comment"]]}};e.conf=t,e.language=r,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/kotlin-IUYPiTV8.js b/emrg/gui/vendor/monaco/vs/kotlin-IUYPiTV8.js new file mode 100644 index 00000000..04517248 --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/kotlin-IUYPiTV8.js @@ -0,0 +1 @@ +define("vs/kotlin-IUYPiTV8",["exports"],(function(e){"use strict";const n={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],folding:{markers:{start:new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:))")}}},t={defaultToken:"",tokenPostfix:".kt",keywords:["as","as?","break","class","continue","do","else","false","for","fun","if","in","!in","interface","is","!is","null","object","package","return","super","this","throw","true","try","typealias","val","var","when","while","by","catch","constructor","delegate","dynamic","field","file","finally","get","import","init","param","property","receiver","set","setparam","where","actual","abstract","annotation","companion","const","crossinline","data","enum","expect","external","final","infix","inline","inner","internal","lateinit","noinline","open","operator","out","override","private","protected","public","reified","sealed","suspend","tailrec","vararg","field","it"],operators:["+","-","*","/","%","=","+=","-=","*=","/=","%=","++","--","&&","||","!","==","!=","===","!==",">","<","<=",">=","[","]","!!","?.","?:","::","..",":","?","->","@",";","$","_"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/@\s*[a-zA-Z_\$][\w\$]*/,"annotation"],[/(@digits)[eE]([\-+]?(@digits))?[fF]?/,"number.float"],[/(@digits)?\.(@digits)([eE][\-+]?(@digits))?[fF]?/,"number.float"],[/0[xX](@hexdigits)[uU]?L?/,"number.hex"],[/0[bB](@binarydigits)[uU]?L?/,"number.binary"],[/(@digits)[fF]/,"number.float"],[/(@digits)[uU]?L?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"""/,"string","@multistring"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@javadoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\/\*/,"comment","@comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],javadoc:[[/[^\/*]+/,"comment.doc"],[/\/\*/,"comment.doc","@push"],[/\/\*/,"comment.doc.invalid"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],multistring:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"""/,"string","@pop"],[/./,"string"]]}};e.conf=n,e.language=t,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/less-C0eDYdqa.js b/emrg/gui/vendor/monaco/vs/less-C0eDYdqa.js new file mode 100644 index 00000000..8998e873 --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/less-C0eDYdqa.js @@ -0,0 +1,2 @@ +define("vs/less-C0eDYdqa",["exports"],(function(e){"use strict";const t={wordPattern:/(#?-?\d*\.\d\w*%?)|([@#!.:]?[\w-?]+%?)|[@#!.]/g,comments:{blockComment:["/*","*/"],lineComment:"//"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),end:new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")}}},n={defaultToken:"",tokenPostfix:".less",identifier:"-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",identifierPlus:"-?-?([a-zA-Z:.]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-:.]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{root:[{include:"@nestedJSBegin"},["[ \\t\\r\\n]+",""],{include:"@comments"},{include:"@keyword"},{include:"@strings"},{include:"@numbers"},["[*_]?[a-zA-Z\\-\\s]+(?=:.*(;|(\\\\$)))","attribute.name","@attribute"],["url(\\-prefix)?\\(",{token:"tag",next:"@urldeclaration"}],["[{}()\\[\\]]","@brackets"],["[,:;]","delimiter"],["#@identifierPlus","tag.id"],["&","tag"],["\\.@identifierPlus(?=\\()","tag.class","@attribute"],["\\.@identifierPlus","tag.class"],["@identifierPlus","tag"],{include:"@operators"},["@(@identifier(?=[:,\\)]))","variable","@attribute"],["@(@identifier)","variable"],["@","key","@atRules"]],nestedJSBegin:[["``","delimiter.backtick"],["`",{token:"delimiter.backtick",next:"@nestedJSEnd",nextEmbedded:"text/javascript"}]],nestedJSEnd:[["`",{token:"delimiter.backtick",next:"@pop",nextEmbedded:"@pop"}]],operators:[["[<>=\\+\\-\\*\\/\\^\\|\\~]","operator"]],keyword:[["(@[\\s]*import|![\\s]*important|true|false|when|iscolor|isnumber|isstring|iskeyword|isurl|ispixel|ispercentage|isem|hue|saturation|lightness|alpha|lighten|darken|saturate|desaturate|fadein|fadeout|fade|spin|mix|round|ceil|floor|percentage)\\b","keyword"]],urldeclaration:[{include:"@strings"},[`[^)\r +]+`,"string"],["\\)",{token:"tag",next:"@pop"}]],attribute:[{include:"@nestedJSBegin"},{include:"@comments"},{include:"@strings"},{include:"@numbers"},{include:"@keyword"},["[a-zA-Z\\-]+(?=\\()","attribute.value","@attribute"],[">","operator","@pop"],["@identifier","attribute.value"],{include:"@operators"},["@(@identifier)","variable"],["[)\\}]","@brackets","@pop"],["[{}()\\[\\]>]","@brackets"],["[;]","delimiter","@pop"],["[,=:]","delimiter"],["\\s",""],[".","attribute.value"]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[".","comment"]],numbers:[["(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?",{token:"attribute.value.number",next:"@units"}],["#[0-9a-fA-F_]+(?!\\w)","attribute.value.hex"]],units:[["(em|ex|ch|rem|fr|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?","attribute.value.unit","@pop"]],strings:[['~?"',{token:"string.delimiter",next:"@stringsEndDoubleQuote"}],["~?'",{token:"string.delimiter",next:"@stringsEndQuote"}]],stringsEndDoubleQuote:[['\\\\"',"string"],['"',{token:"string.delimiter",next:"@popall"}],[".","string"]],stringsEndQuote:[["\\\\'","string"],["'",{token:"string.delimiter",next:"@popall"}],[".","string"]],atRules:[{include:"@comments"},{include:"@strings"},["[()]","delimiter"],["[\\{;]","delimiter","@pop"],[".","key"]]}};e.conf=t,e.language=n,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/lexon-iON-Kj97.js b/emrg/gui/vendor/monaco/vs/lexon-iON-Kj97.js new file mode 100644 index 00000000..911abe62 --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/lexon-iON-Kj97.js @@ -0,0 +1 @@ +define("vs/lexon-iON-Kj97",["exports"],(function(e){"use strict";const t={comments:{lineComment:"COMMENT"},brackets:[["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:":",close:"."}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"`",close:"`"},{open:'"',close:'"'},{open:"'",close:"'"},{open:":",close:"."}],folding:{markers:{start:new RegExp("^\\s*(::\\s*|COMMENT\\s+)#region"),end:new RegExp("^\\s*(::\\s*|COMMENT\\s+)#endregion")}}},i={tokenPostfix:".lexon",ignoreCase:!0,keywords:["lexon","lex","clause","terms","contracts","may","pay","pays","appoints","into","to"],typeKeywords:["amount","person","key","time","date","asset","text"],operators:["less","greater","equal","le","gt","or","and","add","added","subtract","subtracted","multiply","multiplied","times","divide","divided","is","be","certified"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,"delimiter"],[/\d*\.\d*\.\d*/,"number.semver"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+/,"number.hex"],[/\d+/,"number"],[/[;,.]/,"delimiter"]],quoted_identifier:[[/[^\\"]+/,"identifier"],[/"/,{token:"identifier.quote",bracket:"@close",next:"@pop"}]],space_identifier_until_period:[[":","delimiter"],[" ",{token:"white",next:"@identifier_rest"}]],identifier_until_period:[{include:"@whitespace"},[":",{token:"delimiter",next:"@identifier_rest"}],[/[^\\.]+/,"identifier"],[/\./,{token:"delimiter",bracket:"@close",next:"@pop"}]],identifier_rest:[[/[^\\.]+/,"identifier"],[/\./,{token:"delimiter",bracket:"@close",next:"@pop"}]],semver:[{include:"@whitespace"},[":","delimiter"],[/\d*\.\d*\.\d*/,{token:"number.semver",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,"white"]]}};e.conf=t,e.language=i,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/liquid-CLJYelW6.js b/emrg/gui/vendor/monaco/vs/liquid-CLJYelW6.js new file mode 100644 index 00000000..052580a7 --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/liquid-CLJYelW6.js @@ -0,0 +1 @@ +define("vs/liquid-CLJYelW6",["exports","./editor-KLE6jdfb"],(function(e,t){"use strict";const i=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],n={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,brackets:[[""],["<",">"],["{{","}}"],["{%","%}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"%",close:"%"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${i.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:t.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${i.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:t.languages.IndentAction.Indent}}]},o={defaultToken:"",tokenPostfix:"",builtinTags:["if","else","elseif","endif","render","assign","capture","endcapture","case","endcase","comment","endcomment","cycle","decrement","for","endfor","include","increment","layout","raw","endraw","render","tablerow","endtablerow","unless","endunless"],builtinFilters:["abs","append","at_least","at_most","capitalize","ceil","compact","date","default","divided_by","downcase","escape","escape_once","first","floor","join","json","last","lstrip","map","minus","modulo","newline_to_br","plus","prepend","remove","remove_first","replace","replace_first","reverse","round","rstrip","size","slice","sort","sort_natural","split","strip","strip_html","strip_newlines","times","truncate","truncatewords","uniq","upcase","url_decode","url_encode","where"],constants:["true","false"],operators:["==","!=",">","<",">=","<="],symbol:/[=>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)([\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[//,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],liquidState:[[/\{\{/,"delimiter.output.liquid"],[/\}\}/,{token:"delimiter.output.liquid",switchTo:"@$S2.$S3"}],[/\{\%/,"delimiter.tag.liquid"],[/raw\s*\%\}/,"delimiter.tag.liquid","@liquidRaw"],[/\%\}/,{token:"delimiter.tag.liquid",switchTo:"@$S2.$S3"}],{include:"liquidRoot"}],liquidRaw:[[/^(?!\{\%\s*endraw\s*\%\}).+/],[/\{\%/,"delimiter.tag.liquid"],[/@identifier/],[/\%\}/,{token:"delimiter.tag.liquid",next:"@root"}]],liquidRoot:[[/\d+(\.\d+)?/,"number.liquid"],[/"[^"]*"/,"string.liquid"],[/'[^']*'/,"string.liquid"],[/\s+/],[/@symbol/,{cases:{"@operators":"operator.liquid","@default":""}}],[/\./],[/@identifier/,{cases:{"@constants":"keyword.liquid","@builtinFilters":"predefined.liquid","@builtinTags":"predefined.liquid","@default":"variable.liquid"}}],[/[^}|%]/,"variable.liquid"]]}};e.conf=n,e.language=o,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/loader.js b/emrg/gui/vendor/monaco/vs/loader.js new file mode 100644 index 00000000..d674e530 --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/loader.js @@ -0,0 +1,1368 @@ +'use strict'; +/*!----------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.42.0-dev-20230906(e7d7a5b072e74702a912a4c855a3bda21a7757e7) + * Released under the MIT license + * https://github.com/microsoft/vscode/blob/main/LICENSE.txt + *-----------------------------------------------------------*/ const _amdLoaderGlobal = this, + _commonjsGlobal = typeof global == 'object' ? global : {}; +var AMDLoader; +(function (u) { + u.global = _amdLoaderGlobal; + class y { + get isWindows() { + return this._detect(), this._isWindows; + } + get isNode() { + return this._detect(), this._isNode; + } + get isElectronRenderer() { + return this._detect(), this._isElectronRenderer; + } + get isWebWorker() { + return this._detect(), this._isWebWorker; + } + get isElectronNodeIntegrationWebWorker() { + return this._detect(), this._isElectronNodeIntegrationWebWorker; + } + constructor() { + (this._detected = !1), + (this._isWindows = !1), + (this._isNode = !1), + (this._isElectronRenderer = !1), + (this._isWebWorker = !1), + (this._isElectronNodeIntegrationWebWorker = !1); + } + _detect() { + this._detected || + ((this._detected = !0), + (this._isWindows = y._isWindows()), + (this._isNode = typeof module < 'u' && !!module.exports), + (this._isElectronRenderer = + typeof process < 'u' && + typeof process.versions < 'u' && + typeof process.versions.electron < 'u' && + process.type === 'renderer'), + (this._isWebWorker = typeof u.global.importScripts == 'function'), + (this._isElectronNodeIntegrationWebWorker = + this._isWebWorker && + typeof process < 'u' && + typeof process.versions < 'u' && + typeof process.versions.electron < 'u' && + process.type === 'worker')); + } + static _isWindows() { + return typeof navigator < 'u' && + navigator.userAgent && + navigator.userAgent.indexOf('Windows') >= 0 + ? !0 + : typeof process < 'u' + ? process.platform === 'win32' + : !1; + } + } + u.Environment = y; +})(AMDLoader || (AMDLoader = {})); +var AMDLoader; +(function (u) { + class y { + constructor(r, c, a) { + (this.type = r), (this.detail = c), (this.timestamp = a); + } + } + u.LoaderEvent = y; + class m { + constructor(r) { + this._events = [new y(1, '', r)]; + } + record(r, c) { + this._events.push(new y(r, c, u.Utilities.getHighPerformanceTimestamp())); + } + getEvents() { + return this._events; + } + } + u.LoaderEventRecorder = m; + class p { + record(r, c) {} + getEvents() { + return []; + } + } + (p.INSTANCE = new p()), (u.NullLoaderEventRecorder = p); +})(AMDLoader || (AMDLoader = {})); +var AMDLoader; +(function (u) { + class y { + static fileUriToFilePath(p, h) { + if (((h = decodeURI(h).replace(/%23/g, '#')), p)) { + if (/^file:\/\/\//.test(h)) return h.substr(8); + if (/^file:\/\//.test(h)) return h.substr(5); + } else if (/^file:\/\//.test(h)) return h.substr(7); + return h; + } + static startsWith(p, h) { + return p.length >= h.length && p.substr(0, h.length) === h; + } + static endsWith(p, h) { + return p.length >= h.length && p.substr(p.length - h.length) === h; + } + static containsQueryString(p) { + return /^[^\#]*\?/gi.test(p); + } + static isAbsolutePath(p) { + return /^((http:\/\/)|(https:\/\/)|(file:\/\/)|(\/))/.test(p); + } + static forEachProperty(p, h) { + if (p) { + let r; + for (r in p) p.hasOwnProperty(r) && h(r, p[r]); + } + } + static isEmpty(p) { + let h = !0; + return ( + y.forEachProperty(p, () => { + h = !1; + }), + h + ); + } + static recursiveClone(p) { + if ( + !p || + typeof p != 'object' || + p instanceof RegExp || + (!Array.isArray(p) && Object.getPrototypeOf(p) !== Object.prototype) + ) + return p; + let h = Array.isArray(p) ? [] : {}; + return ( + y.forEachProperty(p, (r, c) => { + c && typeof c == 'object' ? (h[r] = y.recursiveClone(c)) : (h[r] = c); + }), + h + ); + } + static generateAnonymousModule() { + return '===anonymous' + y.NEXT_ANONYMOUS_ID++ + '==='; + } + static isAnonymousModule(p) { + return y.startsWith(p, '===anonymous'); + } + static getHighPerformanceTimestamp() { + return ( + this.PERFORMANCE_NOW_PROBED || + ((this.PERFORMANCE_NOW_PROBED = !0), + (this.HAS_PERFORMANCE_NOW = + u.global.performance && typeof u.global.performance.now == 'function')), + this.HAS_PERFORMANCE_NOW ? u.global.performance.now() : Date.now() + ); + } + } + (y.NEXT_ANONYMOUS_ID = 1), + (y.PERFORMANCE_NOW_PROBED = !1), + (y.HAS_PERFORMANCE_NOW = !1), + (u.Utilities = y); +})(AMDLoader || (AMDLoader = {})); +var AMDLoader; +(function (u) { + function y(h) { + if (h instanceof Error) return h; + const r = new Error(h.message || String(h) || 'Unknown Error'); + return h.stack && (r.stack = h.stack), r; + } + u.ensureError = y; + class m { + static validateConfigurationOptions(r) { + function c(a) { + if (a.phase === 'loading') { + console.error('Loading "' + a.moduleId + '" failed'), + console.error(a), + console.error('Here are the modules that depend on it:'), + console.error(a.neededBy); + return; + } + if (a.phase === 'factory') { + console.error('The factory function of "' + a.moduleId + '" has thrown an exception'), + console.error(a), + console.error('Here are the modules that depend on it:'), + console.error(a.neededBy); + return; + } + } + if ( + ((r = r || {}), + typeof r.baseUrl != 'string' && (r.baseUrl = ''), + typeof r.isBuild != 'boolean' && (r.isBuild = !1), + typeof r.paths != 'object' && (r.paths = {}), + typeof r.config != 'object' && (r.config = {}), + typeof r.catchError > 'u' && (r.catchError = !1), + typeof r.recordStats > 'u' && (r.recordStats = !1), + typeof r.urlArgs != 'string' && (r.urlArgs = ''), + typeof r.onError != 'function' && (r.onError = c), + Array.isArray(r.ignoreDuplicateModules) || (r.ignoreDuplicateModules = []), + r.baseUrl.length > 0 && (u.Utilities.endsWith(r.baseUrl, '/') || (r.baseUrl += '/')), + typeof r.cspNonce != 'string' && (r.cspNonce = ''), + typeof r.preferScriptTags > 'u' && (r.preferScriptTags = !1), + r.nodeCachedData && + typeof r.nodeCachedData == 'object' && + (typeof r.nodeCachedData.seed != 'string' && (r.nodeCachedData.seed = 'seed'), + (typeof r.nodeCachedData.writeDelay != 'number' || r.nodeCachedData.writeDelay < 0) && + (r.nodeCachedData.writeDelay = 1e3 * 7), + !r.nodeCachedData.path || typeof r.nodeCachedData.path != 'string')) + ) { + const a = y(new Error("INVALID cached data configuration, 'path' MUST be set")); + (a.phase = 'configuration'), r.onError(a), (r.nodeCachedData = void 0); + } + return r; + } + static mergeConfigurationOptions(r = null, c = null) { + let a = u.Utilities.recursiveClone(c || {}); + return ( + u.Utilities.forEachProperty(r, (t, e) => { + t === 'ignoreDuplicateModules' && typeof a.ignoreDuplicateModules < 'u' + ? (a.ignoreDuplicateModules = a.ignoreDuplicateModules.concat(e)) + : t === 'paths' && typeof a.paths < 'u' + ? u.Utilities.forEachProperty(e, (i, s) => (a.paths[i] = s)) + : t === 'config' && typeof a.config < 'u' + ? u.Utilities.forEachProperty(e, (i, s) => (a.config[i] = s)) + : (a[t] = u.Utilities.recursiveClone(e)); + }), + m.validateConfigurationOptions(a) + ); + } + } + u.ConfigurationOptionsUtil = m; + class p { + constructor(r, c) { + if ( + ((this._env = r), + (this.options = m.mergeConfigurationOptions(c)), + this._createIgnoreDuplicateModulesMap(), + this._createSortedPathsRules(), + this.options.baseUrl === '' && + this.options.nodeRequire && + this.options.nodeRequire.main && + this.options.nodeRequire.main.filename && + this._env.isNode) + ) { + let a = this.options.nodeRequire.main.filename, + t = Math.max(a.lastIndexOf('/'), a.lastIndexOf('\\')); + this.options.baseUrl = a.substring(0, t + 1); + } + } + _createIgnoreDuplicateModulesMap() { + this.ignoreDuplicateModulesMap = {}; + for (let r = 0; r < this.options.ignoreDuplicateModules.length; r++) + this.ignoreDuplicateModulesMap[this.options.ignoreDuplicateModules[r]] = !0; + } + _createSortedPathsRules() { + (this.sortedPathsRules = []), + u.Utilities.forEachProperty(this.options.paths, (r, c) => { + Array.isArray(c) + ? this.sortedPathsRules.push({ from: r, to: c }) + : this.sortedPathsRules.push({ from: r, to: [c] }); + }), + this.sortedPathsRules.sort((r, c) => c.from.length - r.from.length); + } + cloneAndMerge(r) { + return new p(this._env, m.mergeConfigurationOptions(r, this.options)); + } + getOptionsLiteral() { + return this.options; + } + _applyPaths(r) { + let c; + for (let a = 0, t = this.sortedPathsRules.length; a < t; a++) + if (((c = this.sortedPathsRules[a]), u.Utilities.startsWith(r, c.from))) { + let e = []; + for (let i = 0, s = c.to.length; i < s; i++) e.push(c.to[i] + r.substr(c.from.length)); + return e; + } + return [r]; + } + _addUrlArgsToUrl(r) { + return u.Utilities.containsQueryString(r) + ? r + '&' + this.options.urlArgs + : r + '?' + this.options.urlArgs; + } + _addUrlArgsIfNecessaryToUrl(r) { + return this.options.urlArgs ? this._addUrlArgsToUrl(r) : r; + } + _addUrlArgsIfNecessaryToUrls(r) { + if (this.options.urlArgs) + for (let c = 0, a = r.length; c < a; c++) r[c] = this._addUrlArgsToUrl(r[c]); + return r; + } + moduleIdToPaths(r) { + if ( + this._env.isNode && + this.options.amdModulesPattern instanceof RegExp && + !this.options.amdModulesPattern.test(r) + ) + return this.isBuild() ? ['empty:'] : ['node|' + r]; + let c = r, + a; + if (!u.Utilities.endsWith(c, '.js') && !u.Utilities.isAbsolutePath(c)) { + a = this._applyPaths(c); + for (let t = 0, e = a.length; t < e; t++) + (this.isBuild() && a[t] === 'empty:') || + (u.Utilities.isAbsolutePath(a[t]) || (a[t] = this.options.baseUrl + a[t]), + !u.Utilities.endsWith(a[t], '.js') && + !u.Utilities.containsQueryString(a[t]) && + (a[t] = a[t] + '.js')); + } else + !u.Utilities.endsWith(c, '.js') && !u.Utilities.containsQueryString(c) && (c = c + '.js'), + (a = [c]); + return this._addUrlArgsIfNecessaryToUrls(a); + } + requireToUrl(r) { + let c = r; + return ( + u.Utilities.isAbsolutePath(c) || + ((c = this._applyPaths(c)[0]), + u.Utilities.isAbsolutePath(c) || (c = this.options.baseUrl + c)), + this._addUrlArgsIfNecessaryToUrl(c) + ); + } + isBuild() { + return this.options.isBuild; + } + shouldInvokeFactory(r) { + return !!( + !this.options.isBuild || + u.Utilities.isAnonymousModule(r) || + (this.options.buildForceInvokeFactory && this.options.buildForceInvokeFactory[r]) + ); + } + isDuplicateMessageIgnoredFor(r) { + return this.ignoreDuplicateModulesMap.hasOwnProperty(r); + } + getConfigForModule(r) { + if (this.options.config) return this.options.config[r]; + } + shouldCatchError() { + return this.options.catchError; + } + shouldRecordStats() { + return this.options.recordStats; + } + onError(r) { + this.options.onError(r); + } + } + u.Configuration = p; +})(AMDLoader || (AMDLoader = {})); +var AMDLoader; +(function (u) { + class y { + constructor(e) { + (this._env = e), (this._scriptLoader = null), (this._callbackMap = {}); + } + load(e, i, s, n) { + if (!this._scriptLoader) + if (this._env.isWebWorker) this._scriptLoader = new h(); + else if (this._env.isElectronRenderer) { + const { preferScriptTags: d } = e.getConfig().getOptionsLiteral(); + d ? (this._scriptLoader = new m()) : (this._scriptLoader = new r(this._env)); + } else + this._env.isNode + ? (this._scriptLoader = new r(this._env)) + : (this._scriptLoader = new m()); + let l = { callback: s, errorback: n }; + if (this._callbackMap.hasOwnProperty(i)) { + this._callbackMap[i].push(l); + return; + } + (this._callbackMap[i] = [l]), + this._scriptLoader.load( + e, + i, + () => this.triggerCallback(i), + (d) => this.triggerErrorback(i, d) + ); + } + triggerCallback(e) { + let i = this._callbackMap[e]; + delete this._callbackMap[e]; + for (let s = 0; s < i.length; s++) i[s].callback(); + } + triggerErrorback(e, i) { + let s = this._callbackMap[e]; + delete this._callbackMap[e]; + for (let n = 0; n < s.length; n++) s[n].errorback(i); + } + } + class m { + attachListeners(e, i, s) { + let n = () => { + e.removeEventListener('load', l), e.removeEventListener('error', d); + }, + l = (o) => { + n(), i(); + }, + d = (o) => { + n(), s(o); + }; + e.addEventListener('load', l), e.addEventListener('error', d); + } + load(e, i, s, n) { + if (/^node\|/.test(i)) { + let l = e.getConfig().getOptionsLiteral(), + d = c(e.getRecorder(), l.nodeRequire || u.global.nodeRequire), + o = i.split('|'), + _ = null; + try { + _ = d(o[1]); + } catch (f) { + n(f); + return; + } + e.enqueueDefineAnonymousModule([], () => _), s(); + } else { + let l = document.createElement('script'); + l.setAttribute('async', 'async'), + l.setAttribute('type', 'text/javascript'), + this.attachListeners(l, s, n); + const { trustedTypesPolicy: d } = e.getConfig().getOptionsLiteral(); + d && (i = d.createScriptURL(i)), l.setAttribute('src', i); + const { cspNonce: o } = e.getConfig().getOptionsLiteral(); + o && l.setAttribute('nonce', o), document.getElementsByTagName('head')[0].appendChild(l); + } + } + } + function p(t) { + const { trustedTypesPolicy: e } = t.getConfig().getOptionsLiteral(); + try { + return (e ? self.eval(e.createScript('', 'true')) : new Function('true')).call(self), !0; + } catch { + return !1; + } + } + class h { + constructor() { + this._cachedCanUseEval = null; + } + _canUseEval(e) { + return ( + this._cachedCanUseEval === null && (this._cachedCanUseEval = p(e)), this._cachedCanUseEval + ); + } + load(e, i, s, n) { + if (/^node\|/.test(i)) { + const l = e.getConfig().getOptionsLiteral(), + d = c(e.getRecorder(), l.nodeRequire || u.global.nodeRequire), + o = i.split('|'); + let _ = null; + try { + _ = d(o[1]); + } catch (f) { + n(f); + return; + } + e.enqueueDefineAnonymousModule([], function () { + return _; + }), + s(); + } else { + const { trustedTypesPolicy: l } = e.getConfig().getOptionsLiteral(); + if ( + !( + /^((http:)|(https:)|(file:))/.test(i) && + i.substring(0, self.origin.length) !== self.origin + ) && + this._canUseEval(e) + ) { + fetch(i) + .then((o) => { + if (o.status !== 200) throw new Error(o.statusText); + return o.text(); + }) + .then((o) => { + (o = `${o} +//# sourceURL=${i}`), + (l ? self.eval(l.createScript('', o)) : new Function(o)).call(self), + s(); + }) + .then(void 0, n); + return; + } + try { + l && (i = l.createScriptURL(i)), importScripts(i), s(); + } catch (o) { + n(o); + } + } + } + } + class r { + constructor(e) { + (this._env = e), (this._didInitialize = !1), (this._didPatchNodeRequire = !1); + } + _init(e) { + this._didInitialize || + ((this._didInitialize = !0), + (this._fs = e('fs')), + (this._vm = e('vm')), + (this._path = e('path')), + (this._crypto = e('crypto'))); + } + _initNodeRequire(e, i) { + const { nodeCachedData: s } = i.getConfig().getOptionsLiteral(); + if (!s || this._didPatchNodeRequire) return; + this._didPatchNodeRequire = !0; + const n = this, + l = e('module'); + function d(o) { + const _ = o.constructor; + let f = function (v) { + try { + return o.require(v); + } finally { + } + }; + return ( + (f.resolve = function (v, E) { + return _._resolveFilename(v, o, !1, E); + }), + (f.resolve.paths = function (v) { + return _._resolveLookupPaths(v, o); + }), + (f.main = process.mainModule), + (f.extensions = _._extensions), + (f.cache = _._cache), + f + ); + } + l.prototype._compile = function (o, _) { + const f = l.wrap(o.replace(/^#!.*/, '')), + g = i.getRecorder(), + v = n._getCachedDataPath(s, _), + E = { filename: _ }; + let I; + try { + const D = n._fs.readFileSync(v); + (I = D.slice(0, 16)), (E.cachedData = D.slice(16)), g.record(60, v); + } catch { + g.record(61, v); + } + const C = new n._vm.Script(f, E), + P = C.runInThisContext(E), + w = n._path.dirname(_), + R = d(this), + U = [this.exports, R, this, _, w, process, _commonjsGlobal, Buffer], + b = P.apply(this.exports, U); + return ( + n._handleCachedData(C, f, v, !E.cachedData, i), n._verifyCachedData(C, f, v, I, i), b + ); + }; + } + load(e, i, s, n) { + const l = e.getConfig().getOptionsLiteral(), + d = c(e.getRecorder(), l.nodeRequire || u.global.nodeRequire), + o = + l.nodeInstrumenter || + function (f) { + return f; + }; + this._init(d), this._initNodeRequire(d, e); + let _ = e.getRecorder(); + if (/^node\|/.test(i)) { + let f = i.split('|'), + g = null; + try { + g = d(f[1]); + } catch (v) { + n(v); + return; + } + e.enqueueDefineAnonymousModule([], () => g), s(); + } else { + i = u.Utilities.fileUriToFilePath(this._env.isWindows, i); + const f = this._path.normalize(i), + g = this._getElectronRendererScriptPathOrUri(f), + v = !!l.nodeCachedData, + E = v ? this._getCachedDataPath(l.nodeCachedData, i) : void 0; + this._readSourceAndCachedData(f, E, _, (I, C, P, w) => { + if (I) { + n(I); + return; + } + let R; + C.charCodeAt(0) === r._BOM + ? (R = r._PREFIX + C.substring(1) + r._SUFFIX) + : (R = r._PREFIX + C + r._SUFFIX), + (R = o(R, f)); + const U = { filename: g, cachedData: P }, + b = this._createAndEvalScript(e, R, U, s, n); + this._handleCachedData(b, R, E, v && !P, e), this._verifyCachedData(b, R, E, w, e); + }); + } + } + _createAndEvalScript(e, i, s, n, l) { + const d = e.getRecorder(); + d.record(31, s.filename); + const o = new this._vm.Script(i, s), + _ = o.runInThisContext(s), + f = e.getGlobalAMDDefineFunc(); + let g = !1; + const v = function () { + return (g = !0), f.apply(null, arguments); + }; + return ( + (v.amd = f.amd), + _.call( + u.global, + e.getGlobalAMDRequireFunc(), + v, + s.filename, + this._path.dirname(s.filename) + ), + d.record(32, s.filename), + g ? n() : l(new Error(`Didn't receive define call in ${s.filename}!`)), + o + ); + } + _getElectronRendererScriptPathOrUri(e) { + if (!this._env.isElectronRenderer) return e; + let i = e.match(/^([a-z])\:(.*)/i); + return i ? `file:///${(i[1].toUpperCase() + ':' + i[2]).replace(/\\/g, '/')}` : `file://${e}`; + } + _getCachedDataPath(e, i) { + const s = this._crypto + .createHash('md5') + .update(i, 'utf8') + .update(e.seed, 'utf8') + .update(process.arch, '') + .digest('hex'), + n = this._path.basename(i).replace(/\.js$/, ''); + return this._path.join(e.path, `${n}-${s}.code`); + } + _handleCachedData(e, i, s, n, l) { + e.cachedDataRejected + ? this._fs.unlink(s, (d) => { + l.getRecorder().record(62, s), + this._createAndWriteCachedData(e, i, s, l), + d && l.getConfig().onError(d); + }) + : n && this._createAndWriteCachedData(e, i, s, l); + } + _createAndWriteCachedData(e, i, s, n) { + let l = Math.ceil( + n.getConfig().getOptionsLiteral().nodeCachedData.writeDelay * (1 + Math.random()) + ), + d = -1, + o = 0, + _; + const f = () => { + setTimeout(() => { + _ || (_ = this._crypto.createHash('md5').update(i, 'utf8').digest()); + const g = e.createCachedData(); + if (!(g.length === 0 || g.length === d || o >= 5)) { + if (g.length < d) { + f(); + return; + } + (d = g.length), + this._fs.writeFile(s, Buffer.concat([_, g]), (v) => { + v && n.getConfig().onError(v), n.getRecorder().record(63, s), f(); + }); + } + }, l * Math.pow(4, o++)); + }; + f(); + } + _readSourceAndCachedData(e, i, s, n) { + if (!i) this._fs.readFile(e, { encoding: 'utf8' }, n); + else { + let l, + d, + o, + _ = 2; + const f = (g) => { + g ? n(g) : --_ === 0 && n(void 0, l, d, o); + }; + this._fs.readFile(e, { encoding: 'utf8' }, (g, v) => { + (l = v), f(g); + }), + this._fs.readFile(i, (g, v) => { + !g && v && v.length > 0 + ? ((o = v.slice(0, 16)), (d = v.slice(16)), s.record(60, i)) + : s.record(61, i), + f(); + }); + } + } + _verifyCachedData(e, i, s, n, l) { + n && + (e.cachedDataRejected || + setTimeout(() => { + const d = this._crypto.createHash('md5').update(i, 'utf8').digest(); + n.equals(d) || + (l + .getConfig() + .onError( + new Error( + `FAILED TO VERIFY CACHED DATA, deleting stale '${s}' now, but a RESTART IS REQUIRED` + ) + ), + this._fs.unlink(s, (o) => { + o && l.getConfig().onError(o); + })); + }, Math.ceil(5e3 * (1 + Math.random())))); + } + } + (r._BOM = 65279), + (r._PREFIX = '(function (require, define, __filename, __dirname) { '), + (r._SUFFIX = ` +});`); + function c(t, e) { + if (e.__$__isRecorded) return e; + const i = function (n) { + t.record(33, n); + try { + return e(n); + } finally { + t.record(34, n); + } + }; + return (i.__$__isRecorded = !0), i; + } + u.ensureRecordedNodeRequire = c; + function a(t) { + return new y(t); + } + u.createScriptLoader = a; +})(AMDLoader || (AMDLoader = {})); +var AMDLoader; +(function (u) { + class y { + constructor(t) { + let e = t.lastIndexOf('/'); + e !== -1 ? (this.fromModulePath = t.substr(0, e + 1)) : (this.fromModulePath = ''); + } + static _normalizeModuleId(t) { + let e = t, + i; + for (i = /\/\.\//; i.test(e); ) e = e.replace(i, '/'); + for ( + e = e.replace(/^\.\//g, ''), + i = /\/(([^\/])|([^\/][^\/\.])|([^\/\.][^\/])|([^\/][^\/][^\/]+))\/\.\.\//; + i.test(e); + + ) + e = e.replace(i, '/'); + return ( + (e = e.replace(/^(([^\/])|([^\/][^\/\.])|([^\/\.][^\/])|([^\/][^\/][^\/]+))\/\.\.\//, '')), + e + ); + } + resolveModule(t) { + let e = t; + return ( + u.Utilities.isAbsolutePath(e) || + ((u.Utilities.startsWith(e, './') || u.Utilities.startsWith(e, '../')) && + (e = y._normalizeModuleId(this.fromModulePath + e))), + e + ); + } + } + (y.ROOT = new y('')), (u.ModuleIdResolver = y); + class m { + constructor(t, e, i, s, n, l) { + (this.id = t), + (this.strId = e), + (this.dependencies = i), + (this._callback = s), + (this._errorback = n), + (this.moduleIdResolver = l), + (this.exports = {}), + (this.error = null), + (this.exportsPassedIn = !1), + (this.unresolvedDependenciesCount = this.dependencies.length), + (this._isComplete = !1); + } + static _safeInvokeFunction(t, e) { + try { + return { returnedValue: t.apply(u.global, e), producedError: null }; + } catch (i) { + return { returnedValue: null, producedError: i }; + } + } + static _invokeFactory(t, e, i, s) { + return t.shouldInvokeFactory(e) + ? t.shouldCatchError() + ? this._safeInvokeFunction(i, s) + : { returnedValue: i.apply(u.global, s), producedError: null } + : { returnedValue: null, producedError: null }; + } + complete(t, e, i, s) { + this._isComplete = !0; + let n = null; + if (this._callback) + if (typeof this._callback == 'function') { + t.record(21, this.strId); + let l = m._invokeFactory(e, this.strId, this._callback, i); + (n = l.producedError), + t.record(22, this.strId), + !n && + typeof l.returnedValue < 'u' && + (!this.exportsPassedIn || u.Utilities.isEmpty(this.exports)) && + (this.exports = l.returnedValue); + } else this.exports = this._callback; + if (n) { + let l = u.ensureError(n); + (l.phase = 'factory'), + (l.moduleId = this.strId), + (l.neededBy = s(this.id)), + (this.error = l), + e.onError(l); + } + (this.dependencies = null), + (this._callback = null), + (this._errorback = null), + (this.moduleIdResolver = null); + } + onDependencyError(t) { + return ( + (this._isComplete = !0), (this.error = t), this._errorback ? (this._errorback(t), !0) : !1 + ); + } + isComplete() { + return this._isComplete; + } + } + u.Module = m; + class p { + constructor() { + (this._nextId = 0), + (this._strModuleIdToIntModuleId = new Map()), + (this._intModuleIdToStrModuleId = []), + this.getModuleId('exports'), + this.getModuleId('module'), + this.getModuleId('require'); + } + getMaxModuleId() { + return this._nextId; + } + getModuleId(t) { + let e = this._strModuleIdToIntModuleId.get(t); + return ( + typeof e > 'u' && + ((e = this._nextId++), + this._strModuleIdToIntModuleId.set(t, e), + (this._intModuleIdToStrModuleId[e] = t)), + e + ); + } + getStrModuleId(t) { + return this._intModuleIdToStrModuleId[t]; + } + } + class h { + constructor(t) { + this.id = t; + } + } + (h.EXPORTS = new h(0)), (h.MODULE = new h(1)), (h.REQUIRE = new h(2)), (u.RegularDependency = h); + class r { + constructor(t, e, i) { + (this.id = t), (this.pluginId = e), (this.pluginParam = i); + } + } + u.PluginDependency = r; + class c { + constructor(t, e, i, s, n = 0) { + (this._env = t), + (this._scriptLoader = e), + (this._loaderAvailableTimestamp = n), + (this._defineFunc = i), + (this._requireFunc = s), + (this._moduleIdProvider = new p()), + (this._config = new u.Configuration(this._env)), + (this._hasDependencyCycle = !1), + (this._modules2 = []), + (this._knownModules2 = []), + (this._inverseDependencies2 = []), + (this._inversePluginDependencies2 = new Map()), + (this._currentAnonymousDefineCall = null), + (this._recorder = null), + (this._buildInfoPath = []), + (this._buildInfoDefineStack = []), + (this._buildInfoDependencies = []), + (this._requireFunc.moduleManager = this); + } + reset() { + return new c( + this._env, + this._scriptLoader, + this._defineFunc, + this._requireFunc, + this._loaderAvailableTimestamp + ); + } + getGlobalAMDDefineFunc() { + return this._defineFunc; + } + getGlobalAMDRequireFunc() { + return this._requireFunc; + } + static _findRelevantLocationInStack(t, e) { + let i = (l) => l.replace(/\\/g, '/'), + s = i(t), + n = e.split(/\n/); + for (let l = 0; l < n.length; l++) { + let d = n[l].match(/(.*):(\d+):(\d+)\)?$/); + if (d) { + let o = d[1], + _ = d[2], + f = d[3], + g = Math.max(o.lastIndexOf(' ') + 1, o.lastIndexOf('(') + 1); + if (((o = o.substr(g)), (o = i(o)), o === s)) { + let v = { line: parseInt(_, 10), col: parseInt(f, 10) }; + return v.line === 1 && (v.col -= 53), v; + } + } + } + throw new Error('Could not correlate define call site for needle ' + t); + } + getBuildInfo() { + if (!this._config.isBuild()) return null; + let t = [], + e = 0; + for (let i = 0, s = this._modules2.length; i < s; i++) { + let n = this._modules2[i]; + if (!n) continue; + let l = this._buildInfoPath[n.id] || null, + d = this._buildInfoDefineStack[n.id] || null, + o = this._buildInfoDependencies[n.id]; + t[e++] = { + id: n.strId, + path: l, + defineLocation: l && d ? c._findRelevantLocationInStack(l, d) : null, + dependencies: o, + shim: null, + exports: n.exports + }; + } + return t; + } + getRecorder() { + return ( + this._recorder || + (this._config.shouldRecordStats() + ? (this._recorder = new u.LoaderEventRecorder(this._loaderAvailableTimestamp)) + : (this._recorder = u.NullLoaderEventRecorder.INSTANCE)), + this._recorder + ); + } + getLoaderEvents() { + return this.getRecorder().getEvents(); + } + enqueueDefineAnonymousModule(t, e) { + if (this._currentAnonymousDefineCall !== null) + throw new Error('Can only have one anonymous define call per script file'); + let i = null; + this._config.isBuild() && (i = new Error('StackLocation').stack || null), + (this._currentAnonymousDefineCall = { stack: i, dependencies: t, callback: e }); + } + defineModule(t, e, i, s, n, l = new y(t)) { + let d = this._moduleIdProvider.getModuleId(t); + if (this._modules2[d]) { + this._config.isDuplicateMessageIgnoredFor(t) || + console.warn("Duplicate definition of module '" + t + "'"); + return; + } + let o = new m(d, t, this._normalizeDependencies(e, l), i, s, l); + (this._modules2[d] = o), + this._config.isBuild() && + ((this._buildInfoDefineStack[d] = n), + (this._buildInfoDependencies[d] = (o.dependencies || []).map((_) => + this._moduleIdProvider.getStrModuleId(_.id) + ))), + this._resolve(o); + } + _normalizeDependency(t, e) { + if (t === 'exports') return h.EXPORTS; + if (t === 'module') return h.MODULE; + if (t === 'require') return h.REQUIRE; + let i = t.indexOf('!'); + if (i >= 0) { + let s = e.resolveModule(t.substr(0, i)), + n = e.resolveModule(t.substr(i + 1)), + l = this._moduleIdProvider.getModuleId(s + '!' + n), + d = this._moduleIdProvider.getModuleId(s); + return new r(l, d, n); + } + return new h(this._moduleIdProvider.getModuleId(e.resolveModule(t))); + } + _normalizeDependencies(t, e) { + let i = [], + s = 0; + for (let n = 0, l = t.length; n < l; n++) i[s++] = this._normalizeDependency(t[n], e); + return i; + } + _relativeRequire(t, e, i, s) { + if (typeof e == 'string') return this.synchronousRequire(e, t); + this.defineModule(u.Utilities.generateAnonymousModule(), e, i, s, null, t); + } + synchronousRequire(t, e = new y(t)) { + let i = this._normalizeDependency(t, e), + s = this._modules2[i.id]; + if (!s) + throw new Error( + "Check dependency list! Synchronous require cannot resolve module '" + + t + + "'. This is the first mention of this module!" + ); + if (!s.isComplete()) + throw new Error( + "Check dependency list! Synchronous require cannot resolve module '" + + t + + "'. This module has not been resolved completely yet." + ); + if (s.error) throw s.error; + return s.exports; + } + configure(t, e) { + let i = this._config.shouldRecordStats(); + e + ? (this._config = new u.Configuration(this._env, t)) + : (this._config = this._config.cloneAndMerge(t)), + this._config.shouldRecordStats() && !i && (this._recorder = null); + } + getConfig() { + return this._config; + } + _onLoad(t) { + if (this._currentAnonymousDefineCall !== null) { + let e = this._currentAnonymousDefineCall; + (this._currentAnonymousDefineCall = null), + this.defineModule( + this._moduleIdProvider.getStrModuleId(t), + e.dependencies, + e.callback, + null, + e.stack + ); + } + } + _createLoadError(t, e) { + let i = this._moduleIdProvider.getStrModuleId(t), + s = (this._inverseDependencies2[t] || []).map((l) => + this._moduleIdProvider.getStrModuleId(l) + ); + const n = u.ensureError(e); + return (n.phase = 'loading'), (n.moduleId = i), (n.neededBy = s), n; + } + _onLoadError(t, e) { + const i = this._createLoadError(t, e); + this._modules2[t] || + (this._modules2[t] = new m( + t, + this._moduleIdProvider.getStrModuleId(t), + [], + () => {}, + null, + null + )); + let s = []; + for (let d = 0, o = this._moduleIdProvider.getMaxModuleId(); d < o; d++) s[d] = !1; + let n = !1, + l = []; + for (l.push(t), s[t] = !0; l.length > 0; ) { + let d = l.shift(), + o = this._modules2[d]; + o && (n = o.onDependencyError(i) || n); + let _ = this._inverseDependencies2[d]; + if (_) + for (let f = 0, g = _.length; f < g; f++) { + let v = _[f]; + s[v] || (l.push(v), (s[v] = !0)); + } + } + n || this._config.onError(i); + } + _hasDependencyPath(t, e) { + let i = this._modules2[t]; + if (!i) return !1; + let s = []; + for (let l = 0, d = this._moduleIdProvider.getMaxModuleId(); l < d; l++) s[l] = !1; + let n = []; + for (n.push(i), s[t] = !0; n.length > 0; ) { + let d = n.shift().dependencies; + if (d) + for (let o = 0, _ = d.length; o < _; o++) { + let f = d[o]; + if (f.id === e) return !0; + let g = this._modules2[f.id]; + g && !s[f.id] && ((s[f.id] = !0), n.push(g)); + } + } + return !1; + } + _findCyclePath(t, e, i) { + if (t === e || i === 50) return [t]; + let s = this._modules2[t]; + if (!s) return null; + let n = s.dependencies; + if (n) + for (let l = 0, d = n.length; l < d; l++) { + let o = this._findCyclePath(n[l].id, e, i + 1); + if (o !== null) return o.push(t), o; + } + return null; + } + _createRequire(t) { + let e = (i, s, n) => this._relativeRequire(t, i, s, n); + return ( + (e.toUrl = (i) => this._config.requireToUrl(t.resolveModule(i))), + (e.getStats = () => this.getLoaderEvents()), + (e.hasDependencyCycle = () => this._hasDependencyCycle), + (e.config = (i, s = !1) => { + this.configure(i, s); + }), + (e.__$__nodeRequire = u.global.nodeRequire), + e + ); + } + _loadModule(t) { + if (this._modules2[t] || this._knownModules2[t]) return; + this._knownModules2[t] = !0; + let e = this._moduleIdProvider.getStrModuleId(t), + i = this._config.moduleIdToPaths(e), + s = /^@[^\/]+\/[^\/]+$/; + this._env.isNode && (e.indexOf('/') === -1 || s.test(e)) && i.push('node|' + e); + let n = -1, + l = (d) => { + if ((n++, n >= i.length)) this._onLoadError(t, d); + else { + let o = i[n], + _ = this.getRecorder(); + if (this._config.isBuild() && o === 'empty:') { + (this._buildInfoPath[t] = o), + this.defineModule(this._moduleIdProvider.getStrModuleId(t), [], null, null, null), + this._onLoad(t); + return; + } + _.record(10, o), + this._scriptLoader.load( + this, + o, + () => { + this._config.isBuild() && (this._buildInfoPath[t] = o), + _.record(11, o), + this._onLoad(t); + }, + (f) => { + _.record(12, o), l(f); + } + ); + } + }; + l(null); + } + _loadPluginDependency(t, e) { + if (this._modules2[e.id] || this._knownModules2[e.id]) return; + this._knownModules2[e.id] = !0; + let i = (s) => { + this.defineModule(this._moduleIdProvider.getStrModuleId(e.id), [], s, null, null); + }; + (i.error = (s) => { + this._config.onError(this._createLoadError(e.id, s)); + }), + t.load(e.pluginParam, this._createRequire(y.ROOT), i, this._config.getOptionsLiteral()); + } + _resolve(t) { + let e = t.dependencies; + if (e) + for (let i = 0, s = e.length; i < s; i++) { + let n = e[i]; + if (n === h.EXPORTS) { + (t.exportsPassedIn = !0), t.unresolvedDependenciesCount--; + continue; + } + if (n === h.MODULE) { + t.unresolvedDependenciesCount--; + continue; + } + if (n === h.REQUIRE) { + t.unresolvedDependenciesCount--; + continue; + } + let l = this._modules2[n.id]; + if (l && l.isComplete()) { + if (l.error) { + t.onDependencyError(l.error); + return; + } + t.unresolvedDependenciesCount--; + continue; + } + if (this._hasDependencyPath(n.id, t.id)) { + (this._hasDependencyCycle = !0), + console.warn( + "There is a dependency cycle between '" + + this._moduleIdProvider.getStrModuleId(n.id) + + "' and '" + + this._moduleIdProvider.getStrModuleId(t.id) + + "'. The cyclic path follows:" + ); + let d = this._findCyclePath(n.id, t.id, 0) || []; + d.reverse(), + d.push(n.id), + console.warn( + d.map((o) => this._moduleIdProvider.getStrModuleId(o)).join(` => +`) + ), + t.unresolvedDependenciesCount--; + continue; + } + if ( + ((this._inverseDependencies2[n.id] = this._inverseDependencies2[n.id] || []), + this._inverseDependencies2[n.id].push(t.id), + n instanceof r) + ) { + let d = this._modules2[n.pluginId]; + if (d && d.isComplete()) { + this._loadPluginDependency(d.exports, n); + continue; + } + let o = this._inversePluginDependencies2.get(n.pluginId); + o || ((o = []), this._inversePluginDependencies2.set(n.pluginId, o)), + o.push(n), + this._loadModule(n.pluginId); + continue; + } + this._loadModule(n.id); + } + t.unresolvedDependenciesCount === 0 && this._onModuleComplete(t); + } + _onModuleComplete(t) { + let e = this.getRecorder(); + if (t.isComplete()) return; + let i = t.dependencies, + s = []; + if (i) + for (let o = 0, _ = i.length; o < _; o++) { + let f = i[o]; + if (f === h.EXPORTS) { + s[o] = t.exports; + continue; + } + if (f === h.MODULE) { + s[o] = { id: t.strId, config: () => this._config.getConfigForModule(t.strId) }; + continue; + } + if (f === h.REQUIRE) { + s[o] = this._createRequire(t.moduleIdResolver); + continue; + } + let g = this._modules2[f.id]; + if (g) { + s[o] = g.exports; + continue; + } + s[o] = null; + } + const n = (o) => + (this._inverseDependencies2[o] || []).map((_) => this._moduleIdProvider.getStrModuleId(_)); + t.complete(e, this._config, s, n); + let l = this._inverseDependencies2[t.id]; + if (((this._inverseDependencies2[t.id] = null), l)) + for (let o = 0, _ = l.length; o < _; o++) { + let f = l[o], + g = this._modules2[f]; + g.unresolvedDependenciesCount--, + g.unresolvedDependenciesCount === 0 && this._onModuleComplete(g); + } + let d = this._inversePluginDependencies2.get(t.id); + if (d) { + this._inversePluginDependencies2.delete(t.id); + for (let o = 0, _ = d.length; o < _; o++) this._loadPluginDependency(t.exports, d[o]); + } + } + } + u.ModuleManager = c; +})(AMDLoader || (AMDLoader = {})); +var define, AMDLoader; +(function (u) { + const y = new u.Environment(); + let m = null; + const p = function (a, t, e) { + typeof a != 'string' && ((e = t), (t = a), (a = null)), + (typeof t != 'object' || !Array.isArray(t)) && ((e = t), (t = null)), + t || (t = ['require', 'exports', 'module']), + a ? m.defineModule(a, t, e, null, null) : m.enqueueDefineAnonymousModule(t, e); + }; + p.amd = { jQuery: !0 }; + const h = function (a, t = !1) { + m.configure(a, t); + }, + r = function () { + if (arguments.length === 1) { + if (arguments[0] instanceof Object && !Array.isArray(arguments[0])) { + h(arguments[0]); + return; + } + if (typeof arguments[0] == 'string') return m.synchronousRequire(arguments[0]); + } + if ((arguments.length === 2 || arguments.length === 3) && Array.isArray(arguments[0])) { + m.defineModule( + u.Utilities.generateAnonymousModule(), + arguments[0], + arguments[1], + arguments[2], + null + ); + return; + } + throw new Error('Unrecognized require call'); + }; + (r.config = h), + (r.getConfig = function () { + return m.getConfig().getOptionsLiteral(); + }), + (r.reset = function () { + m = m.reset(); + }), + (r.getBuildInfo = function () { + return m.getBuildInfo(); + }), + (r.getStats = function () { + return m.getLoaderEvents(); + }), + (r.define = p); + function c() { + if (typeof u.global.require < 'u' || typeof require < 'u') { + const a = u.global.require || require; + if (typeof a == 'function' && typeof a.resolve == 'function') { + const t = u.ensureRecordedNodeRequire(m.getRecorder(), a); + (u.global.nodeRequire = t), (r.nodeRequire = t), (r.__$__nodeRequire = t); + } + } + y.isNode && !y.isElectronRenderer && !y.isElectronNodeIntegrationWebWorker + ? (module.exports = r) + : (y.isElectronRenderer || (u.global.define = p), (u.global.require = r)); + } + (u.init = c), + (typeof u.global.define != 'function' || !u.global.define.amd) && + ((m = new u.ModuleManager( + y, + u.createScriptLoader(y), + p, + r, + u.Utilities.getHighPerformanceTimestamp() + )), + typeof u.global.require < 'u' && + typeof u.global.require != 'function' && + r.config(u.global.require), + (define = function () { + return p.apply(null, arguments); + }), + (define.amd = p.amd), + typeof doNotInitLoader > 'u' && c()); +})(AMDLoader || (AMDLoader = {})); + +//# sourceMappingURL=../../min-maps/vs/loader.js.map diff --git a/emrg/gui/vendor/monaco/vs/lspLanguageFeatures-BIkJOWLw.js b/emrg/gui/vendor/monaco/vs/lspLanguageFeatures-BIkJOWLw.js new file mode 100644 index 00000000..92e89eef --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/lspLanguageFeatures-BIkJOWLw.js @@ -0,0 +1,2 @@ +define("vs/lspLanguageFeatures-BIkJOWLw",["exports","./main-DsK8pnKg","./editor-KLE6jdfb"],(function(l,i,u){"use strict";class b{constructor(e,s,a){this._languageId=e,this._worker=s,this._disposables=[],this._listener=Object.create(null);const o=n=>{let c=n.getLanguageId();if(c!==this._languageId)return;let m;this._listener[n.uri.toString()]=n.onDidChangeContent(()=>{window.clearTimeout(m),m=window.setTimeout(()=>this._doValidate(n.uri,c),500)}),this._doValidate(n.uri,c)},r=n=>{u.editor.setModelMarkers(n,this._languageId,[]);let c=n.uri.toString(),m=this._listener[c];m&&(m.dispose(),delete this._listener[c])};this._disposables.push(u.editor.onDidCreateModel(o)),this._disposables.push(u.editor.onWillDisposeModel(r)),this._disposables.push(u.editor.onDidChangeModelLanguage(n=>{r(n.model),o(n.model)})),this._disposables.push(a(n=>{u.editor.getModels().forEach(c=>{c.getLanguageId()===this._languageId&&(r(c),o(c))})})),this._disposables.push({dispose:()=>{u.editor.getModels().forEach(r);for(let n in this._listener)this._listener[n].dispose()}}),u.editor.getModels().forEach(o)}dispose(){this._disposables.forEach(e=>e&&e.dispose()),this._disposables.length=0}_doValidate(e,s){this._worker(e).then(a=>a.doValidation(e.toString())).then(a=>{const o=a.map(n=>I(e,n));let r=u.editor.getModel(e);r&&r.getLanguageId()===s&&u.editor.setModelMarkers(r,s,o)}).then(void 0,a=>{console.error(a)})}}function w(t){switch(t){case i.DiagnosticSeverity.Error:return u.MarkerSeverity.Error;case i.DiagnosticSeverity.Warning:return u.MarkerSeverity.Warning;case i.DiagnosticSeverity.Information:return u.MarkerSeverity.Info;case i.DiagnosticSeverity.Hint:return u.MarkerSeverity.Hint;default:return u.MarkerSeverity.Info}}function I(t,e){let s=typeof e.code=="number"?String(e.code):e.code;return{severity:w(e.severity),startLineNumber:e.range.start.line+1,startColumn:e.range.start.character+1,endLineNumber:e.range.end.line+1,endColumn:e.range.end.character+1,message:e.message,code:s,source:e.source}}class D{constructor(e,s){this._worker=e,this._triggerCharacters=s}get triggerCharacters(){return this._triggerCharacters}provideCompletionItems(e,s,a,o){const r=e.uri;return this._worker(r).then(n=>n.doComplete(r.toString(),h(s))).then(n=>{if(!n)return;const c=e.getWordUntilPosition(s),m=new u.Range(s.lineNumber,c.startColumn,s.lineNumber,c.endColumn),G=n.items.map(d=>{const f={label:d.label,insertText:d.insertText||d.label,sortText:d.sortText,filterText:d.filterText,documentation:d.documentation,detail:d.detail,command:F(d.command),range:m,kind:E(d.kind)};return d.textEdit&&(R(d.textEdit)?f.range={insert:g(d.textEdit.insert),replace:g(d.textEdit.replace)}:f.range=g(d.textEdit.range),f.insertText=d.textEdit.newText),d.additionalTextEdits&&(f.additionalTextEdits=d.additionalTextEdits.map(p)),d.insertTextFormat===i.InsertTextFormat.Snippet&&(f.insertTextRules=u.languages.CompletionItemInsertTextRule.InsertAsSnippet),f});return{isIncomplete:n.isIncomplete,suggestions:G}})}}function h(t){if(t)return{character:t.column-1,line:t.lineNumber-1}}function k(t){if(t)return{start:{line:t.startLineNumber-1,character:t.startColumn-1},end:{line:t.endLineNumber-1,character:t.endColumn-1}}}function g(t){if(t)return new u.Range(t.start.line+1,t.start.character+1,t.end.line+1,t.end.character+1)}function R(t){return typeof t.insert<"u"&&typeof t.replace<"u"}function E(t){const e=u.languages.CompletionItemKind;switch(t){case i.CompletionItemKind.Text:return e.Text;case i.CompletionItemKind.Method:return e.Method;case i.CompletionItemKind.Function:return e.Function;case i.CompletionItemKind.Constructor:return e.Constructor;case i.CompletionItemKind.Field:return e.Field;case i.CompletionItemKind.Variable:return e.Variable;case i.CompletionItemKind.Class:return e.Class;case i.CompletionItemKind.Interface:return e.Interface;case i.CompletionItemKind.Module:return e.Module;case i.CompletionItemKind.Property:return e.Property;case i.CompletionItemKind.Unit:return e.Unit;case i.CompletionItemKind.Value:return e.Value;case i.CompletionItemKind.Enum:return e.Enum;case i.CompletionItemKind.Keyword:return e.Keyword;case i.CompletionItemKind.Snippet:return e.Snippet;case i.CompletionItemKind.Color:return e.Color;case i.CompletionItemKind.File:return e.File;case i.CompletionItemKind.Reference:return e.Reference}return e.Property}function p(t){if(t)return{range:g(t.range),text:t.newText}}function F(t){return t&&t.command==="editor.action.triggerSuggest"?{id:t.command,title:t.title,arguments:t.arguments}:void 0}class A{constructor(e){this._worker=e}provideHover(e,s,a){let o=e.uri;return this._worker(o).then(r=>r.doHover(o.toString(),h(s))).then(r=>{if(r)return{range:g(r.range),contents:T(r.contents)}})}}function M(t){return t&&typeof t=="object"&&typeof t.kind=="string"}function S(t){return typeof t=="string"?{value:t}:M(t)?t.kind==="plaintext"?{value:t.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:t.value}:{value:"```"+t.language+` +`+t.value+"\n```\n"}}function T(t){if(t)return Array.isArray(t)?t.map(S):[S(t)]}class y{constructor(e){this._worker=e}provideDocumentHighlights(e,s,a){const o=e.uri;return this._worker(o).then(r=>r.findDocumentHighlights(o.toString(),h(s))).then(r=>{if(r)return r.map(n=>({range:g(n.range),kind:x(n.kind)}))})}}function x(t){switch(t){case i.DocumentHighlightKind.Read:return u.languages.DocumentHighlightKind.Read;case i.DocumentHighlightKind.Write:return u.languages.DocumentHighlightKind.Write;case i.DocumentHighlightKind.Text:return u.languages.DocumentHighlightKind.Text}return u.languages.DocumentHighlightKind.Text}class H{constructor(e){this._worker=e}provideDefinition(e,s,a){const o=e.uri;return this._worker(o).then(r=>r.findDefinition(o.toString(),h(s))).then(r=>{if(r)return[C(r)]})}}function C(t){return{uri:u.Uri.parse(t.uri),range:g(t.range)}}class L{constructor(e){this._worker=e}provideReferences(e,s,a,o){const r=e.uri;return this._worker(r).then(n=>n.findReferences(r.toString(),h(s))).then(n=>{if(n)return n.map(C)})}}class P{constructor(e){this._worker=e}provideRenameEdits(e,s,a,o){const r=e.uri;return this._worker(r).then(n=>n.doRename(r.toString(),h(s),a)).then(n=>N(n))}}function N(t){if(!t||!t.changes)return;let e=[];for(let s in t.changes){const a=u.Uri.parse(s);for(let o of t.changes[s])e.push({resource:a,versionId:void 0,textEdit:{range:g(o.range),text:o.newText}})}return{edits:e}}class V{constructor(e){this._worker=e}provideDocumentSymbols(e,s){const a=e.uri;return this._worker(a).then(o=>o.findDocumentSymbols(a.toString())).then(o=>{if(o)return o.map(r=>W(r)?K(r):{name:r.name,detail:"",containerName:r.containerName,kind:_(r.kind),range:g(r.location.range),selectionRange:g(r.location.range),tags:[]})})}}function W(t){return"children"in t}function K(t){return{name:t.name,detail:t.detail??"",kind:_(t.kind),range:g(t.range),selectionRange:g(t.selectionRange),tags:t.tags??[],children:(t.children??[]).map(e=>K(e))}}function _(t){let e=u.languages.SymbolKind;switch(t){case i.SymbolKind.File:return e.File;case i.SymbolKind.Module:return e.Module;case i.SymbolKind.Namespace:return e.Namespace;case i.SymbolKind.Package:return e.Package;case i.SymbolKind.Class:return e.Class;case i.SymbolKind.Method:return e.Method;case i.SymbolKind.Property:return e.Property;case i.SymbolKind.Field:return e.Field;case i.SymbolKind.Constructor:return e.Constructor;case i.SymbolKind.Enum:return e.Enum;case i.SymbolKind.Interface:return e.Interface;case i.SymbolKind.Function:return e.Function;case i.SymbolKind.Variable:return e.Variable;case i.SymbolKind.Constant:return e.Constant;case i.SymbolKind.String:return e.String;case i.SymbolKind.Number:return e.Number;case i.SymbolKind.Boolean:return e.Boolean;case i.SymbolKind.Array:return e.Array}return e.Function}class U{constructor(e){this._worker=e}provideLinks(e,s){const a=e.uri;return this._worker(a).then(o=>o.findDocumentLinks(a.toString())).then(o=>{if(o)return{links:o.map(r=>({range:g(r.range),url:r.target}))}})}}class j{constructor(e){this._worker=e}provideDocumentFormattingEdits(e,s,a){const o=e.uri;return this._worker(o).then(r=>r.format(o.toString(),null,v(s)).then(n=>{if(!(!n||n.length===0))return n.map(p)}))}}class z{constructor(e){this._worker=e,this.canFormatMultipleRanges=!1}provideDocumentRangeFormattingEdits(e,s,a,o){const r=e.uri;return this._worker(r).then(n=>n.format(r.toString(),k(s),v(a)).then(c=>{if(!(!c||c.length===0))return c.map(p)}))}}function v(t){return{tabSize:t.tabSize,insertSpaces:t.insertSpaces}}class B{constructor(e){this._worker=e}provideDocumentColors(e,s){const a=e.uri;return this._worker(a).then(o=>o.findDocumentColors(a.toString())).then(o=>{if(o)return o.map(r=>({color:r.color,range:g(r.range)}))})}provideColorPresentations(e,s,a){const o=e.uri;return this._worker(o).then(r=>r.getColorPresentations(o.toString(),s.color,k(s.range))).then(r=>{if(r)return r.map(n=>{let c={label:n.label};return n.textEdit&&(c.textEdit=p(n.textEdit)),n.additionalTextEdits&&(c.additionalTextEdits=n.additionalTextEdits.map(p)),c})})}}class O{constructor(e){this._worker=e}provideFoldingRanges(e,s,a){const o=e.uri;return this._worker(o).then(r=>r.getFoldingRanges(o.toString(),s)).then(r=>{if(r)return r.map(n=>{const c={start:n.startLine+1,end:n.endLine+1};return typeof n.kind<"u"&&(c.kind=$(n.kind)),c})})}}function $(t){switch(t){case i.FoldingRangeKind.Comment:return u.languages.FoldingRangeKind.Comment;case i.FoldingRangeKind.Imports:return u.languages.FoldingRangeKind.Imports;case i.FoldingRangeKind.Region:return u.languages.FoldingRangeKind.Region}}class q{constructor(e){this._worker=e}provideSelectionRanges(e,s,a){const o=e.uri;return this._worker(o).then(r=>r.getSelectionRanges(o.toString(),s.map(h))).then(r=>{if(r)return r.map(n=>{const c=[];for(;n;)c.push({range:g(n.range)}),n=n.parent;return c})})}}l.CompletionAdapter=D,l.DefinitionAdapter=H,l.DiagnosticsAdapter=b,l.DocumentColorAdapter=B,l.DocumentFormattingEditProvider=j,l.DocumentHighlightAdapter=y,l.DocumentLinkAdapter=U,l.DocumentRangeFormattingEditProvider=z,l.DocumentSymbolAdapter=V,l.FoldingRangeAdapter=O,l.HoverAdapter=A,l.ReferenceAdapter=L,l.RenameAdapter=P,l.SelectionRangeAdapter=q,l.fromPosition=h,l.fromRange=k,l.toRange=g,l.toTextEdit=p})); diff --git a/emrg/gui/vendor/monaco/vs/lua-DtygF91M.js b/emrg/gui/vendor/monaco/vs/lua-DtygF91M.js new file mode 100644 index 00000000..73a75d82 --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/lua-DtygF91M.js @@ -0,0 +1 @@ +define("vs/lua-DtygF91M",["exports"],(function(e){"use strict";const n={comments:{lineComment:"--",blockComment:["--[[","]]"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},o={defaultToken:"",tokenPostfix:".lua",keywords:["and","break","do","else","elseif","end","false","for","function","goto","if","in","local","nil","not","or","repeat","return","then","true","until","while"],brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.array",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"}],operators:["+","-","*","/","%","^","#","==","~=","<=",">=","<",">","=",";",":",",",".","..","..."],symbols:/[=>"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]}]},o={defaultToken:"",tokenPostfix:".m3",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["AND","ANY","ARRAY","AS","BEGIN","BITS","BRANDED","BY","CASE","CONST","DIV","DO","ELSE","ELSIF","END","EVAL","EXCEPT","EXCEPTION","EXIT","EXPORTS","FINALLY","FOR","FROM","GENERIC","IF","IMPORT","IN","INTERFACE","LOCK","LOOP","METHODS","MOD","MODULE","NOT","OBJECT","OF","OR","OVERRIDES","PROCEDURE","RAISE","RAISES","READONLY","RECORD","REF","REPEAT","RETURN","REVEAL","SET","THEN","TO","TRY","TYPE","TYPECASE","UNSAFE","UNTIL","UNTRACED","VALUE","VAR","WHILE","WITH"],reservedConstNames:["ABS","ADR","ADRSIZE","BITSIZE","BYTESIZE","CEILING","DEC","DISPOSE","FALSE","FIRST","FLOAT","FLOOR","INC","ISTYPE","LAST","LOOPHOLE","MAX","MIN","NARROW","NEW","NIL","NUMBER","ORD","ROUND","SUBARRAY","TRUE","TRUNC","TYPECODE","VAL"],reservedTypeNames:["ADDRESS","ANY","BOOLEAN","CARDINAL","CHAR","EXTENDED","INTEGER","LONGCARD","LONGINT","LONGREAL","MUTEX","NULL","REAL","REFANY","ROOT","TEXT"],operators:["+","-","*","/","&","^","."],relations:["=","#","<","<=",">",">=","<:",":"],delimiters:["|","..","=>",",",";",":="],symbols:/[>=<#.,:;+\-*/&^]+/,escapes:/\\(?:[\\fnrt"']|[0-7]{3})/,tokenizer:{root:[[/_\w*/,"invalid"],[/[a-zA-Z][a-zA-Z0-9_]*/,{cases:{"@keywords":{token:"keyword.$0"},"@reservedConstNames":{token:"constant.reserved.$0"},"@reservedTypeNames":{token:"type.reserved.$0"},"@default":"identifier"}}],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/[0-9]+\.[0-9]+(?:[DdEeXx][\+\-]?[0-9]+)?/,"number.float"],[/[0-9]+(?:\_[0-9a-fA-F]+)?L?/,"number"],[/@symbols/,{cases:{"@operators":"operators","@relations":"operators","@delimiters":"delimiter","@default":"invalid"}}],[/'[^\\']'/,"string.char"],[/(')(@escapes)(')/,["string.char","string.escape","string.char"]],[/'/,"invalid"],[/"([^"\\]|\\.)*$/,"invalid"],[/"/,"string.text","@text"]],text:[[/[^\\"]+/,"string.text"],[/@escapes/,"string.escape"],[/\\./,"invalid"],[/"/,"string.text","@pop"]],comment:[[/\(\*/,"comment","@push"],[/\*\)/,"comment","@pop"],[/./,"comment"]],pragma:[[/<\*/,"keyword.pragma","@push"],[/\*>/,"keyword.pragma","@pop"],[/./,"keyword.pragma"]],whitespace:[[/[ \t\r\n]+/,"white"],[/\(\*/,"comment","@comment"],[/<\*/,"keyword.pragma","@pragma"]]}};e.conf=t,e.language=o,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/main-BEx-Fmlo.js b/emrg/gui/vendor/monaco/vs/main-BEx-Fmlo.js new file mode 100644 index 00000000..e9a30f75 --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/main-BEx-Fmlo.js @@ -0,0 +1,15 @@ +define("vs/main-BEx-Fmlo",["exports"],(function(U){"use strict";function z(e,l=!1){const t=e.length;let n=0,u="",s=0,g=16,w=0,a=0,v=0,m=0,b=0;function L(f,r){let i=0,k=0;for(;i=48&&c<=57)k=k*16+c-48;else if(c>=65&&c<=70)k=k*16+c-65+10;else if(c>=97&&c<=102)k=k*16+c-97+10;else break;n++,i++}return i=t){f+=e.substring(r,n),b=2;break}const i=e.charCodeAt(n);if(i===34){f+=e.substring(r,n),n++;break}if(i===92){if(f+=e.substring(r,n),n++,n>=t){b=2;break}switch(e.charCodeAt(n++)){case 34:f+='"';break;case 92:f+="\\";break;case 47:f+="/";break;case 98:f+="\b";break;case 102:f+="\f";break;case 110:f+=` +`;break;case 114:f+="\r";break;case 116:f+=" ";break;case 117:const c=L(4);c>=0?f+=String.fromCharCode(c):b=4;break;default:b=5}r=n;continue}if(i>=0&&i<=31)if(y(i)){f+=e.substring(r,n),b=2;break}else b=6;n++}return f}function A(){if(u="",b=0,s=n,a=w,m=v,n>=t)return s=t,g=17;let f=e.charCodeAt(n);if(W(f)){do n++,u+=String.fromCharCode(f),f=e.charCodeAt(n);while(W(f));return g=15}if(y(f))return n++,u+=String.fromCharCode(f),f===13&&e.charCodeAt(n)===10&&(n++,u+=` +`),w++,v=n,g=14;switch(f){case 123:return n++,g=1;case 125:return n++,g=2;case 91:return n++,g=3;case 93:return n++,g=4;case 58:return n++,g=6;case 44:return n++,g=5;case 34:return n++,u=N(),g=10;case 47:const r=n-1;if(e.charCodeAt(n+1)===47){for(n+=2;n=12&&f<=15);return f}return{setPosition:F,getPosition:()=>n,scan:l?I:A,getToken:()=>g,getTokenValue:()=>u,getTokenOffset:()=>s,getTokenLength:()=>n-s,getTokenStartLine:()=>a,getTokenStartCharacter:()=>s-m,getTokenError:()=>b}}function W(e){return e===32||e===9}function y(e){return e===10||e===13}function V(e){return e>=48&&e<=57}var R;(function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"})(R||(R={}));const O=new Array(20).fill(0).map((e,l)=>" ".repeat(l)),E=200,h={" ":{"\n":new Array(E).fill(0).map((e,l)=>` +`+" ".repeat(l)),"\r":new Array(E).fill(0).map((e,l)=>"\r"+" ".repeat(l)),"\r\n":new Array(E).fill(0).map((e,l)=>`\r +`+" ".repeat(l))}," ":{"\n":new Array(E).fill(0).map((e,l)=>` +`+" ".repeat(l)),"\r":new Array(E).fill(0).map((e,l)=>"\r"+" ".repeat(l)),"\r\n":new Array(E).fill(0).map((e,l)=>`\r +`+" ".repeat(l))}},K=[` +`,"\r",`\r +`];function x(e,l,t){let n,u,s,g,w;if(l){for(g=l.offset,w=g+l.length,s=g;s>0&&!q(e,s-1);)s--;let i=w;for(;i1)return j(a,m)+j(L,n+b);const i=L.length*(n+b);return!v||i>h[F][a].length?a+j(L,n+b):i<=0?a:h[F][a][i]}function _(){let i=o.scan();for(m=0;i===15||i===14;)i===14&&t.keepLines?m+=1:i===14&&(m=1),i=o.scan();return N=i===16||o.getTokenError()!==0,i}const I=[];function f(i,k,c){!N&&(!l||kg)&&e.substring(k,c)!==i&&I.push({offset:k,length:c-k,content:i})}let r=_();if(t.keepLines&&m>0&&f(j(a,m),0,0),r!==17){let i=o.getTokenOffset()+s,k=L.length*n<20&&t.insertSpaces?O[L.length*n]:j(L,n);f(k,s,i)}for(;r!==17;){let i=o.getTokenOffset()+o.getTokenLength()+s,k=_(),c="",B=!1;for(;m===0&&(k===12||k===13);){let H=o.getTokenOffset()+s;f(O[1],i,H),i=o.getTokenOffset()+o.getTokenLength()+s,B=k===12,c=B?A():"",k=_()}if(k===2)r!==1&&b--,t.keepLines&&m>0||!t.keepLines&&r!==1?c=A():t.keepLines&&(c=O[1]);else if(k===4)r!==3&&b--,t.keepLines&&m>0||!t.keepLines&&r!==3?c=A():t.keepLines&&(c=O[1]);else{switch(r){case 3:case 1:b++,t.keepLines&&m>0||!t.keepLines?c=A():c=O[1];break;case 5:t.keepLines&&m>0||!t.keepLines?c=A():c=O[1];break;case 12:c=A();break;case 13:m>0?c=A():B||(c=O[1]);break;case 6:t.keepLines&&m>0?c=A():B||(c=O[1]);break;case 10:t.keepLines&&m>0?c=A():k===6&&!B&&(c="");break;case 7:case 8:case 9:case 11:case 2:case 4:t.keepLines&&m>0?c=A():(k===12||k===13)&&!B?c=O[1]:k!==5&&k!==17&&(N=!0);break;case 16:N=!0;break}m>0&&(k===12||k===13)&&(c=A())}k===17&&(t.keepLines&&m>0?c=A():c=t.insertFinalNewline?a:"");const Q=o.getTokenOffset()+s;f(c,i,Q),r=k}return I}function j(e,l){let t="";for(let n=0;n{const a={};g(a),s.push(u),u=a,n=null},onObjectProperty:a=>{n=a},onObjectEnd:()=>{u=s.pop()},onArrayBegin:()=>{const a=[];g(a),s.push(u),u=a,n=null},onArrayEnd:()=>{u=s.pop()},onLiteralValue:g,onError:(a,v,m)=>{l.push({error:a,offset:v,length:m})}},t),u[0]}function G(e){if(!e.parent||!e.parent.children)return[];const l=G(e.parent);if(e.parent.type==="property"){const t=e.parent.children[0].value;l.push(t)}else if(e.parent.type==="array"){const t=e.parent.children.indexOf(e);t!==-1&&l.push(t)}return l}function $(e){switch(e.type){case"array":return e.children.map($);case"object":const l=Object.create(null);for(let t of e.children){const n=t.children[1];n&&(l[t.children[0].value]=$(n))}return l;case"null":case"string":case"number":case"boolean":return e.value;default:return}}function ne(e,l,t=!1){return l>=e.offset&&lp(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}function g(p){return p?()=>p(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>u.slice()):()=>!0}function w(p){return p?T=>p(T,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}function a(p){return p?T=>p(T,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>u.slice()):()=>!0}const v=g(l.onObjectBegin),m=a(l.onObjectProperty),b=s(l.onObjectEnd),L=g(l.onArrayBegin),F=s(l.onArrayEnd),o=a(l.onLiteralValue),N=w(l.onSeparator),A=s(l.onComment),_=w(l.onError),I=t&&t.disallowComments,f=t&&t.allowTrailingComma;function r(){for(;;){const p=n.scan();switch(n.getTokenError()){case 4:i(14);break;case 5:i(15);break;case 3:i(13);break;case 1:I||i(11);break;case 2:i(12);break;case 6:i(16);break}switch(p){case 12:case 13:I?i(10):A();break;case 16:i(1);break;case 15:case 14:break;default:return p}}}function i(p,T=[],P=[]){if(_(p),T.length+P.length>0){let D=n.getToken();for(;D!==17;){if(T.indexOf(D)!==-1){r();break}else if(P.indexOf(D)!==-1)break;D=r()}}}function k(p){const T=n.getTokenValue();return p?o(T):(m(T),u.push(T)),r(),!0}function c(){switch(n.getToken()){case 11:const p=n.getTokenValue();let T=Number(p);isNaN(T)&&(i(2),T=0),o(T);break;case 7:o(null);break;case 8:o(!0);break;case 9:o(!1);break;default:return!1}return r(),!0}function B(){return n.getToken()!==10?(i(3,[],[2,5]),!1):(k(!1),n.getToken()===6?(N(":"),r(),M()||i(4,[],[2,5])):i(5,[],[2,5]),u.pop(),!0)}function Q(){v(),r();let p=!1;for(;n.getToken()!==2&&n.getToken()!==17;){if(n.getToken()===5){if(p||i(4,[],[]),N(","),r(),n.getToken()===2&&f)break}else p&&i(6,[],[]);B()||i(4,[],[2,5]),p=!0}return b(),n.getToken()!==2?i(7,[2],[]):r(),!0}function H(){L(),r();let p=!0,T=!1;for(;n.getToken()!==4&&n.getToken()!==17;){if(n.getToken()===5){if(T||i(4,[],[]),N(","),r(),n.getToken()===4&&f)break}else T&&i(6,[],[]);p?(u.push(0),p=!1):u[u.length-1]++,M()||i(4,[],[4,5]),T=!0}return F(),p||u.pop(),n.getToken()!==4?i(8,[4],[]):r(),!0}function M(){switch(n.getToken()){case 3:return H();case 1:return Q();case 10:return k(!0);default:return c()}}return r(),n.getToken()===17?t.allowEmptyContent?!0:(i(4,[],[]),!1):M()?(n.getToken()!==17&&i(9,[],[]),!0):(i(4,[],[]),!1)}const ie=z;var X;(function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"})(X||(X={}));var Y;(function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"})(Y||(Y={}));const le=ee,fe=J,ue=G,ce=$;var Z;(function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"})(Z||(Z={}));function ke(e,l,t){return x(e,l,t)}U.createScanner=ie,U.findNodeAtOffset=fe,U.format=ke,U.getNodePath=ue,U.getNodeValue=ce,U.parse=le})); diff --git a/emrg/gui/vendor/monaco/vs/main-DsK8pnKg.js b/emrg/gui/vendor/monaco/vs/main-DsK8pnKg.js new file mode 100644 index 00000000..8e93ca69 --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/main-DsK8pnKg.js @@ -0,0 +1,3 @@ +define("vs/main-DsK8pnKg",["exports"],(function(c){"use strict";var F;(function(e){function r(i){return typeof i=="string"}e.is=r})(F||(F={}));var I;(function(e){function r(i){return typeof i=="string"}e.is=r})(I||(I={}));var O;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function r(i){return typeof i=="number"&&e.MIN_VALUE<=i&&i<=e.MAX_VALUE}e.is=r})(O||(O={}));var L;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function r(i){return typeof i=="number"&&e.MIN_VALUE<=i&&i<=e.MAX_VALUE}e.is=r})(L||(L={})),c.Position=void 0,(function(e){function r(t,n){return t===Number.MAX_VALUE&&(t=L.MAX_VALUE),n===Number.MAX_VALUE&&(n=L.MAX_VALUE),{line:t,character:n}}e.create=r;function i(t){let n=t;return a.objectLiteral(n)&&a.uinteger(n.line)&&a.uinteger(n.character)}e.is=i})(c.Position||(c.Position={})),c.Range=void 0,(function(e){function r(t,n,u,d){if(a.uinteger(t)&&a.uinteger(n)&&a.uinteger(u)&&a.uinteger(d))return{start:c.Position.create(t,n),end:c.Position.create(u,d)};if(c.Position.is(t)&&c.Position.is(n))return{start:t,end:n};throw new Error(`Range#create called with invalid arguments[${t}, ${n}, ${u}, ${d}]`)}e.create=r;function i(t){let n=t;return a.objectLiteral(n)&&c.Position.is(n.start)&&c.Position.is(n.end)}e.is=i})(c.Range||(c.Range={})),c.Location=void 0,(function(e){function r(t,n){return{uri:t,range:n}}e.create=r;function i(t){let n=t;return a.objectLiteral(n)&&c.Range.is(n.range)&&(a.string(n.uri)||a.undefined(n.uri))}e.is=i})(c.Location||(c.Location={}));var C;(function(e){function r(t,n,u,d){return{targetUri:t,targetRange:n,targetSelectionRange:u,originSelectionRange:d}}e.create=r;function i(t){let n=t;return a.objectLiteral(n)&&c.Range.is(n.targetRange)&&a.string(n.targetUri)&&c.Range.is(n.targetSelectionRange)&&(c.Range.is(n.originSelectionRange)||a.undefined(n.originSelectionRange))}e.is=i})(C||(C={}));var E;(function(e){function r(t,n,u,d){return{red:t,green:n,blue:u,alpha:d}}e.create=r;function i(t){const n=t;return a.objectLiteral(n)&&a.numberRange(n.red,0,1)&&a.numberRange(n.green,0,1)&&a.numberRange(n.blue,0,1)&&a.numberRange(n.alpha,0,1)}e.is=i})(E||(E={}));var X;(function(e){function r(t,n){return{range:t,color:n}}e.create=r;function i(t){const n=t;return a.objectLiteral(n)&&c.Range.is(n.range)&&E.is(n.color)}e.is=i})(X||(X={}));var $;(function(e){function r(t,n,u){return{label:t,textEdit:n,additionalTextEdits:u}}e.create=r;function i(t){const n=t;return a.objectLiteral(n)&&a.string(n.label)&&(a.undefined(n.textEdit)||c.TextEdit.is(n))&&(a.undefined(n.additionalTextEdits)||a.typedArray(n.additionalTextEdits,c.TextEdit.is))}e.is=i})($||($={})),c.FoldingRangeKind=void 0,(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(c.FoldingRangeKind||(c.FoldingRangeKind={}));var W;(function(e){function r(t,n,u,d,f,l){const s={startLine:t,endLine:n};return a.defined(u)&&(s.startCharacter=u),a.defined(d)&&(s.endCharacter=d),a.defined(f)&&(s.kind=f),a.defined(l)&&(s.collapsedText=l),s}e.create=r;function i(t){const n=t;return a.objectLiteral(n)&&a.uinteger(n.startLine)&&a.uinteger(n.startLine)&&(a.undefined(n.startCharacter)||a.uinteger(n.startCharacter))&&(a.undefined(n.endCharacter)||a.uinteger(n.endCharacter))&&(a.undefined(n.kind)||a.string(n.kind))}e.is=i})(W||(W={}));var y;(function(e){function r(t,n){return{location:t,message:n}}e.create=r;function i(t){let n=t;return a.defined(n)&&c.Location.is(n.location)&&a.string(n.message)}e.is=i})(y||(y={})),c.DiagnosticSeverity=void 0,(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(c.DiagnosticSeverity||(c.DiagnosticSeverity={}));var z;(function(e){e.Unnecessary=1,e.Deprecated=2})(z||(z={}));var H;(function(e){function r(i){const t=i;return a.objectLiteral(t)&&a.string(t.href)}e.is=r})(H||(H={})),c.Diagnostic=void 0,(function(e){function r(t,n,u,d,f,l){let s={range:t,message:n};return a.defined(u)&&(s.severity=u),a.defined(d)&&(s.code=d),a.defined(f)&&(s.source=f),a.defined(l)&&(s.relatedInformation=l),s}e.create=r;function i(t){var n;let u=t;return a.defined(u)&&c.Range.is(u.range)&&a.string(u.message)&&(a.number(u.severity)||a.undefined(u.severity))&&(a.integer(u.code)||a.string(u.code)||a.undefined(u.code))&&(a.undefined(u.codeDescription)||a.string((n=u.codeDescription)===null||n===void 0?void 0:n.href))&&(a.string(u.source)||a.undefined(u.source))&&(a.undefined(u.relatedInformation)||a.typedArray(u.relatedInformation,y.is))}e.is=i})(c.Diagnostic||(c.Diagnostic={})),c.Command=void 0,(function(e){function r(t,n,...u){let d={title:t,command:n};return a.defined(u)&&u.length>0&&(d.arguments=u),d}e.create=r;function i(t){let n=t;return a.defined(n)&&a.string(n.title)&&a.string(n.command)}e.is=i})(c.Command||(c.Command={})),c.TextEdit=void 0,(function(e){function r(u,d){return{range:u,newText:d}}e.replace=r;function i(u,d){return{range:{start:u,end:u},newText:d}}e.insert=i;function t(u){return{range:u,newText:""}}e.del=t;function n(u){const d=u;return a.objectLiteral(d)&&a.string(d.newText)&&c.Range.is(d.range)}e.is=n})(c.TextEdit||(c.TextEdit={}));var _;(function(e){function r(t,n,u){const d={label:t};return n!==void 0&&(d.needsConfirmation=n),u!==void 0&&(d.description=u),d}e.create=r;function i(t){const n=t;return a.objectLiteral(n)&&a.string(n.label)&&(a.boolean(n.needsConfirmation)||n.needsConfirmation===void 0)&&(a.string(n.description)||n.description===void 0)}e.is=i})(_||(_={}));var b;(function(e){function r(i){const t=i;return a.string(t)}e.is=r})(b||(b={}));var k;(function(e){function r(u,d,f){return{range:u,newText:d,annotationId:f}}e.replace=r;function i(u,d,f){return{range:{start:u,end:u},newText:d,annotationId:f}}e.insert=i;function t(u,d){return{range:u,newText:"",annotationId:d}}e.del=t;function n(u){const d=u;return c.TextEdit.is(d)&&(_.is(d.annotationId)||b.is(d.annotationId))}e.is=n})(k||(k={})),c.TextDocumentEdit=void 0,(function(e){function r(t,n){return{textDocument:t,edits:n}}e.create=r;function i(t){let n=t;return a.defined(n)&&M.is(n.textDocument)&&Array.isArray(n.edits)}e.is=i})(c.TextDocumentEdit||(c.TextDocumentEdit={}));var j;(function(e){function r(t,n,u){let d={kind:"create",uri:t};return n!==void 0&&(n.overwrite!==void 0||n.ignoreIfExists!==void 0)&&(d.options=n),u!==void 0&&(d.annotationId=u),d}e.create=r;function i(t){let n=t;return n&&n.kind==="create"&&a.string(n.uri)&&(n.options===void 0||(n.options.overwrite===void 0||a.boolean(n.options.overwrite))&&(n.options.ignoreIfExists===void 0||a.boolean(n.options.ignoreIfExists)))&&(n.annotationId===void 0||b.is(n.annotationId))}e.is=i})(j||(j={}));var w;(function(e){function r(t,n,u,d){let f={kind:"rename",oldUri:t,newUri:n};return u!==void 0&&(u.overwrite!==void 0||u.ignoreIfExists!==void 0)&&(f.options=u),d!==void 0&&(f.annotationId=d),f}e.create=r;function i(t){let n=t;return n&&n.kind==="rename"&&a.string(n.oldUri)&&a.string(n.newUri)&&(n.options===void 0||(n.options.overwrite===void 0||a.boolean(n.options.overwrite))&&(n.options.ignoreIfExists===void 0||a.boolean(n.options.ignoreIfExists)))&&(n.annotationId===void 0||b.is(n.annotationId))}e.is=i})(w||(w={}));var P;(function(e){function r(t,n,u){let d={kind:"delete",uri:t};return n!==void 0&&(n.recursive!==void 0||n.ignoreIfNotExists!==void 0)&&(d.options=n),u!==void 0&&(d.annotationId=u),d}e.create=r;function i(t){let n=t;return n&&n.kind==="delete"&&a.string(n.uri)&&(n.options===void 0||(n.options.recursive===void 0||a.boolean(n.options.recursive))&&(n.options.ignoreIfNotExists===void 0||a.boolean(n.options.ignoreIfNotExists)))&&(n.annotationId===void 0||b.is(n.annotationId))}e.is=i})(P||(P={}));var D;(function(e){function r(i){let t=i;return t&&(t.changes!==void 0||t.documentChanges!==void 0)&&(t.documentChanges===void 0||t.documentChanges.every(n=>a.string(n.kind)?j.is(n)||w.is(n)||P.is(n):c.TextDocumentEdit.is(n)))}e.is=r})(D||(D={}));var q;(function(e){function r(t){return{uri:t}}e.create=r;function i(t){let n=t;return a.defined(n)&&a.string(n.uri)}e.is=i})(q||(q={})),c.VersionedTextDocumentIdentifier=void 0,(function(e){function r(t,n){return{uri:t,version:n}}e.create=r;function i(t){let n=t;return a.defined(n)&&a.string(n.uri)&&a.integer(n.version)}e.is=i})(c.VersionedTextDocumentIdentifier||(c.VersionedTextDocumentIdentifier={}));var M;(function(e){function r(t,n){return{uri:t,version:n}}e.create=r;function i(t){let n=t;return a.defined(n)&&a.string(n.uri)&&(n.version===null||a.integer(n.version))}e.is=i})(M||(M={}));var B;(function(e){function r(t,n,u,d){return{uri:t,languageId:n,version:u,text:d}}e.create=r;function i(t){let n=t;return a.defined(n)&&a.string(n.uri)&&a.string(n.languageId)&&a.integer(n.version)&&a.string(n.text)}e.is=i})(B||(B={})),c.MarkupKind=void 0,(function(e){e.PlainText="plaintext",e.Markdown="markdown";function r(i){const t=i;return t===e.PlainText||t===e.Markdown}e.is=r})(c.MarkupKind||(c.MarkupKind={}));var m;(function(e){function r(i){const t=i;return a.objectLiteral(i)&&c.MarkupKind.is(t.kind)&&a.string(t.value)}e.is=r})(m||(m={})),c.CompletionItemKind=void 0,(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(c.CompletionItemKind||(c.CompletionItemKind={})),c.InsertTextFormat=void 0,(function(e){e.PlainText=1,e.Snippet=2})(c.InsertTextFormat||(c.InsertTextFormat={})),c.CompletionItemTag=void 0,(function(e){e.Deprecated=1})(c.CompletionItemTag||(c.CompletionItemTag={}));var Q;(function(e){function r(t,n,u){return{newText:t,insert:n,replace:u}}e.create=r;function i(t){const n=t;return n&&a.string(n.newText)&&c.Range.is(n.insert)&&c.Range.is(n.replace)}e.is=i})(Q||(Q={}));var G;(function(e){e.asIs=1,e.adjustIndentation=2})(G||(G={}));var J;(function(e){function r(i){const t=i;return t&&(a.string(t.detail)||t.detail===void 0)&&(a.string(t.description)||t.description===void 0)}e.is=r})(J||(J={})),c.CompletionItem=void 0,(function(e){function r(i){return{label:i}}e.create=r})(c.CompletionItem||(c.CompletionItem={}));var Y;(function(e){function r(i,t){return{items:i||[],isIncomplete:!!t}}e.create=r})(Y||(Y={}));var A;(function(e){function r(t){return t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=r;function i(t){const n=t;return a.string(n)||a.objectLiteral(n)&&a.string(n.language)&&a.string(n.value)}e.is=i})(A||(A={}));var Z;(function(e){function r(i){let t=i;return!!t&&a.objectLiteral(t)&&(m.is(t.contents)||A.is(t.contents)||a.typedArray(t.contents,A.is))&&(i.range===void 0||c.Range.is(i.range))}e.is=r})(Z||(Z={}));var p;(function(e){function r(i,t){return t?{label:i,documentation:t}:{label:i}}e.create=r})(p||(p={}));var T;(function(e){function r(i,t,...n){let u={label:i};return a.defined(t)&&(u.documentation=t),a.defined(n)?u.parameters=n:u.parameters=[],u}e.create=r})(T||(T={})),c.DocumentHighlightKind=void 0,(function(e){e.Text=1,e.Read=2,e.Write=3})(c.DocumentHighlightKind||(c.DocumentHighlightKind={}));var S;(function(e){function r(i,t){let n={range:i};return a.number(t)&&(n.kind=t),n}e.create=r})(S||(S={})),c.SymbolKind=void 0,(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(c.SymbolKind||(c.SymbolKind={}));var K;(function(e){e.Deprecated=1})(K||(K={})),c.SymbolInformation=void 0,(function(e){function r(i,t,n,u,d){let f={name:i,kind:t,location:{uri:u,range:n}};return d&&(f.containerName=d),f}e.create=r})(c.SymbolInformation||(c.SymbolInformation={}));var x;(function(e){function r(i,t,n,u){return u!==void 0?{name:i,kind:t,location:{uri:n,range:u}}:{name:i,kind:t,location:{uri:n}}}e.create=r})(x||(x={})),c.DocumentSymbol=void 0,(function(e){function r(t,n,u,d,f,l){let s={name:t,detail:n,kind:u,range:d,selectionRange:f};return l!==void 0&&(s.children=l),s}e.create=r;function i(t){let n=t;return n&&a.string(n.name)&&a.number(n.kind)&&c.Range.is(n.range)&&c.Range.is(n.selectionRange)&&(n.detail===void 0||a.string(n.detail))&&(n.deprecated===void 0||a.boolean(n.deprecated))&&(n.children===void 0||Array.isArray(n.children))&&(n.tags===void 0||Array.isArray(n.tags))}e.is=i})(c.DocumentSymbol||(c.DocumentSymbol={})),c.CodeActionKind=void 0,(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(c.CodeActionKind||(c.CodeActionKind={}));var R;(function(e){e.Invoked=1,e.Automatic=2})(R||(R={}));var nn;(function(e){function r(t,n,u){let d={diagnostics:t};return n!=null&&(d.only=n),u!=null&&(d.triggerKind=u),d}e.create=r;function i(t){let n=t;return a.defined(n)&&a.typedArray(n.diagnostics,c.Diagnostic.is)&&(n.only===void 0||a.typedArray(n.only,a.string))&&(n.triggerKind===void 0||n.triggerKind===R.Invoked||n.triggerKind===R.Automatic)}e.is=i})(nn||(nn={})),c.CodeAction=void 0,(function(e){function r(t,n,u){let d={title:t},f=!0;return typeof n=="string"?(f=!1,d.kind=n):c.Command.is(n)?d.command=n:d.edit=n,f&&u!==void 0&&(d.kind=u),d}e.create=r;function i(t){let n=t;return n&&a.string(n.title)&&(n.diagnostics===void 0||a.typedArray(n.diagnostics,c.Diagnostic.is))&&(n.kind===void 0||a.string(n.kind))&&(n.edit!==void 0||n.command!==void 0)&&(n.command===void 0||c.Command.is(n.command))&&(n.isPreferred===void 0||a.boolean(n.isPreferred))&&(n.edit===void 0||D.is(n.edit))}e.is=i})(c.CodeAction||(c.CodeAction={}));var en;(function(e){function r(t,n){let u={range:t};return a.defined(n)&&(u.data=n),u}e.create=r;function i(t){let n=t;return a.defined(n)&&c.Range.is(n.range)&&(a.undefined(n.command)||c.Command.is(n.command))}e.is=i})(en||(en={}));var tn;(function(e){function r(t,n){return{tabSize:t,insertSpaces:n}}e.create=r;function i(t){let n=t;return a.defined(n)&&a.uinteger(n.tabSize)&&a.boolean(n.insertSpaces)}e.is=i})(tn||(tn={}));var rn;(function(e){function r(t,n,u){return{range:t,target:n,data:u}}e.create=r;function i(t){let n=t;return a.defined(n)&&c.Range.is(n.range)&&(a.undefined(n.target)||a.string(n.target))}e.is=i})(rn||(rn={})),c.SelectionRange=void 0,(function(e){function r(t,n){return{range:t,parent:n}}e.create=r;function i(t){let n=t;return a.objectLiteral(n)&&c.Range.is(n.range)&&(n.parent===void 0||e.is(n.parent))}e.is=i})(c.SelectionRange||(c.SelectionRange={}));var an;(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(an||(an={}));var un;(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(un||(un={}));var cn;(function(e){function r(i){const t=i;return a.objectLiteral(t)&&(t.resultId===void 0||typeof t.resultId=="string")&&Array.isArray(t.data)&&(t.data.length===0||typeof t.data[0]=="number")}e.is=r})(cn||(cn={}));var dn;(function(e){function r(t,n){return{range:t,text:n}}e.create=r;function i(t){const n=t;return n!=null&&c.Range.is(n.range)&&a.string(n.text)}e.is=i})(dn||(dn={}));var fn;(function(e){function r(t,n,u){return{range:t,variableName:n,caseSensitiveLookup:u}}e.create=r;function i(t){const n=t;return n!=null&&c.Range.is(n.range)&&a.boolean(n.caseSensitiveLookup)&&(a.string(n.variableName)||n.variableName===void 0)}e.is=i})(fn||(fn={}));var on;(function(e){function r(t,n){return{range:t,expression:n}}e.create=r;function i(t){const n=t;return n!=null&&c.Range.is(n.range)&&(a.string(n.expression)||n.expression===void 0)}e.is=i})(on||(on={}));var sn;(function(e){function r(t,n){return{frameId:t,stoppedLocation:n}}e.create=r;function i(t){const n=t;return a.defined(n)&&c.Range.is(t.stoppedLocation)}e.is=i})(sn||(sn={}));var U;(function(e){e.Type=1,e.Parameter=2;function r(i){return i===1||i===2}e.is=r})(U||(U={}));var N;(function(e){function r(t){return{value:t}}e.create=r;function i(t){const n=t;return a.objectLiteral(n)&&(n.tooltip===void 0||a.string(n.tooltip)||m.is(n.tooltip))&&(n.location===void 0||c.Location.is(n.location))&&(n.command===void 0||c.Command.is(n.command))}e.is=i})(N||(N={}));var ln;(function(e){function r(t,n,u){const d={position:t,label:n};return u!==void 0&&(d.kind=u),d}e.create=r;function i(t){const n=t;return a.objectLiteral(n)&&c.Position.is(n.position)&&(a.string(n.label)||a.typedArray(n.label,N.is))&&(n.kind===void 0||U.is(n.kind))&&n.textEdits===void 0||a.typedArray(n.textEdits,c.TextEdit.is)&&(n.tooltip===void 0||a.string(n.tooltip)||m.is(n.tooltip))&&(n.paddingLeft===void 0||a.boolean(n.paddingLeft))&&(n.paddingRight===void 0||a.boolean(n.paddingRight))}e.is=i})(ln||(ln={}));var gn;(function(e){function r(i){return{kind:"snippet",value:i}}e.createSnippet=r})(gn||(gn={}));var vn;(function(e){function r(i,t,n,u){return{insertText:i,filterText:t,range:n,command:u}}e.create=r})(vn||(vn={}));var hn;(function(e){function r(i){return{items:i}}e.create=r})(hn||(hn={}));var bn;(function(e){e.Invoked=0,e.Automatic=1})(bn||(bn={}));var mn;(function(e){function r(i,t){return{range:i,text:t}}e.create=r})(mn||(mn={}));var Ln;(function(e){function r(i,t){return{triggerKind:i,selectedCompletionInfo:t}}e.create=r})(Ln||(Ln={}));var An;(function(e){function r(i){const t=i;return a.objectLiteral(t)&&I.is(t.uri)&&a.string(t.name)}e.is=r})(An||(An={}));var Rn;(function(e){function r(u,d,f,l){return new In(u,d,f,l)}e.create=r;function i(u){let d=u;return!!(a.defined(d)&&a.string(d.uri)&&(a.undefined(d.languageId)||a.string(d.languageId))&&a.uinteger(d.lineCount)&&a.func(d.getText)&&a.func(d.positionAt)&&a.func(d.offsetAt))}e.is=i;function t(u,d){let f=u.getText(),l=n(d,(g,v)=>{let h=g.range.start.line-v.range.start.line;return h===0?g.range.start.character-v.range.start.character:h}),s=f.length;for(let g=l.length-1;g>=0;g--){let v=l[g],h=u.offsetAt(v.range.start),o=u.offsetAt(v.range.end);if(o<=s)f=f.substring(0,h)+v.newText+f.substring(o,f.length);else throw new Error("Overlapping edit");s=h}return f}e.applyEdits=t;function n(u,d){if(u.length<=1)return u;const f=u.length/2|0,l=u.slice(0,f),s=u.slice(f);n(l,d),n(s,d);let g=0,v=0,h=0;for(;g0&&r.push(i.length),this._lineOffsets=r}return this._lineOffsets}positionAt(r){r=Math.max(Math.min(r,this._content.length),0);let i=this.getLineOffsets(),t=0,n=i.length;if(n===0)return c.Position.create(0,r);for(;tr?n=d:t=d+1}let u=t-1;return c.Position.create(u,r-i[u])}offsetAt(r){let i=this.getLineOffsets();if(r.line>=i.length)return this._content.length;if(r.line<0)return 0;let t=i[r.line],n=r.line+1"u"}e.undefined=t;function n(o){return o===!0||o===!1}e.boolean=n;function u(o){return r.call(o)==="[object String]"}e.string=u;function d(o){return r.call(o)==="[object Number]"}e.number=d;function f(o,V,En){return r.call(o)==="[object Number]"&&V<=o&&o<=En}e.numberRange=f;function l(o){return r.call(o)==="[object Number]"&&-2147483648<=o&&o<=2147483647}e.integer=l;function s(o){return r.call(o)==="[object Number]"&&0<=o&&o<=2147483647}e.uinteger=s;function g(o){return r.call(o)==="[object Function]"}e.func=g;function v(o){return o!==null&&typeof o=="object"}e.objectLiteral=v;function h(o,V){return Array.isArray(o)&&o.every(V)}e.typedArray=h})(a||(a={}))})); diff --git a/emrg/gui/vendor/monaco/vs/markdown-C_rD0bIw.js b/emrg/gui/vendor/monaco/vs/markdown-C_rD0bIw.js new file mode 100644 index 00000000..44f91979 --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/markdown-C_rD0bIw.js @@ -0,0 +1 @@ +define("vs/markdown-C_rD0bIw",["exports"],(function(e){"use strict";const t={comments:{blockComment:[""]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">",notIn:["string"]}],surroundingPairs:[{open:"(",close:")"},{open:"[",close:"]"},{open:"`",close:"`"}],folding:{markers:{start:new RegExp("^\\s*"),end:new RegExp("^\\s*")}}},n={defaultToken:"",tokenPostfix:".md",control:/[\\`*_\[\]{}()#+\-\.!]/,noncontrol:/[^\\`*_\[\]{}()#+\-\.!]/,escapes:/\\(?:@control)/,jsescapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,empty:["area","base","basefont","br","col","frame","hr","img","input","isindex","link","meta","param"],tokenizer:{root:[[/^\s*\|/,"@rematch","@table_header"],[/^(\s{0,3})(#+)((?:[^\\#]|@escapes)+)((?:#+)?)/,["white","keyword","keyword","keyword"]],[/^\s*(=+|\-+)\s*$/,"keyword"],[/^\s*((\*[ ]?)+)\s*$/,"meta.separator"],[/^\s*>+/,"comment"],[/^\s*([\*\-+:]|\d+\.)\s/,"keyword"],[/^(\t|[ ]{4})[^ ].*$/,"string"],[/^\s*~~~\s*((?:\w|[\/\-#])+)?\s*$/,{token:"string",next:"@codeblock"}],[/^\s*```\s*((?:\w|[\/\-#])+).*$/,{token:"string",next:"@codeblockgh",nextEmbedded:"$1"}],[/^\s*```\s*$/,{token:"string",next:"@codeblock"}],{include:"@linecontent"}],table_header:[{include:"@table_common"},[/[^\|]+/,"keyword.table.header"]],table_body:[{include:"@table_common"},{include:"@linecontent"}],table_common:[[/\s*[\-:]+\s*/,{token:"keyword",switchTo:"table_body"}],[/^\s*\|/,"keyword.table.left"],[/^\s*[^\|]/,"@rematch","@pop"],[/^\s*$/,"@rematch","@pop"],[/\|/,{cases:{"@eos":"keyword.table.right","@default":"keyword.table.middle"}}]],codeblock:[[/^\s*~~~\s*$/,{token:"string",next:"@pop"}],[/^\s*```\s*$/,{token:"string",next:"@pop"}],[/.*$/,"variable.source"]],codeblockgh:[[/```\s*$/,{token:"string",next:"@pop",nextEmbedded:"@pop"}],[/[^`]+/,"variable.source"]],linecontent:[[/&\w+;/,"string.escape"],[/@escapes/,"escape"],[/\b__([^\\_]|@escapes|_(?!_))+__\b/,"strong"],[/\*\*([^\\*]|@escapes|\*(?!\*))+\*\*/,"strong"],[/\b_[^_]+_\b/,"emphasis"],[/\*([^\\*]|@escapes)+\*/,"emphasis"],[/`([^\\`]|@escapes)+`/,"variable"],[/\{+[^}]+\}+/,"string.target"],[/(!?\[)((?:[^\]\\]|@escapes)*)(\]\([^\)]+\))/,["string.link","","string.link"]],[/(!?\[)((?:[^\]\\]|@escapes)*)(\])/,"string.link"],{include:"html"}],html:[[/<(\w+)\/>/,"tag"],[/<(\w+)(\-|\w)*/,{cases:{"@empty":{token:"tag",next:"@tag.$1"},"@default":{token:"tag",next:"@tag.$1"}}}],[/<\/(\w+)(\-|\w)*\s*>/,{token:"tag"}],[//,"comment","@pop"],[//,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],phpInSimpleState:[[/<\?((php)|=)?/,"metatag.php"],[/\?>/,{token:"metatag.php",switchTo:"@$S2.$S3"}],{include:"phpRoot"}],phpInEmbeddedState:[[/<\?((php)|=)?/,"metatag.php"],[/\?>/,{token:"metatag.php",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],{include:"phpRoot"}],phpRoot:[[/[a-zA-Z_]\w*/,{cases:{"@phpKeywords":{token:"keyword.php"},"@phpCompileTimeConstants":{token:"constant.php"},"@default":"identifier.php"}}],[/[$a-zA-Z_]\w*/,{cases:{"@phpPreDefinedVariables":{token:"variable.predefined.php"},"@default":"variable.php"}}],[/[{}]/,"delimiter.bracket.php"],[/[\[\]]/,"delimiter.array.php"],[/[()]/,"delimiter.parenthesis.php"],[/[ \t\r\n]+/],[/(#|\/\/)$/,"comment.php"],[/(#|\/\/)/,"comment.php","@phpLineComment"],[/\/\*/,"comment.php","@phpComment"],[/"/,"string.php","@phpDoubleQuoteString"],[/'/,"string.php","@phpSingleQuoteString"],[/[\+\-\*\%\&\|\^\~\!\=\<\>\/\?\;\:\.\,\@]/,"delimiter.php"],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float.php"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float.php"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,"number.hex.php"],[/0[0-7']*[0-7]/,"number.octal.php"],[/0[bB][0-1']*[0-1]/,"number.binary.php"],[/\d[\d']*/,"number.php"],[/\d/,"number.php"]],phpComment:[[/\*\//,"comment.php","@pop"],[/[^*]+/,"comment.php"],[/./,"comment.php"]],phpLineComment:[[/\?>/,{token:"@rematch",next:"@pop"}],[/.$/,"comment.php","@pop"],[/[^?]+$/,"comment.php","@pop"],[/[^?]+/,"comment.php"],[/./,"comment.php"]],phpDoubleQuoteString:[[/[^\\"]+/,"string.php"],[/@escapes/,"string.escape.php"],[/\\./,"string.escape.invalid.php"],[/"/,"string.php","@pop"]],phpSingleQuoteString:[[/[^\\']+/,"string.php"],[/@escapes/,"string.escape.php"],[/\\./,"string.escape.invalid.php"],[/'/,"string.php","@pop"]]},phpKeywords:["abstract","and","array","as","break","callable","case","catch","cfunction","class","clone","const","continue","declare","default","do","else","elseif","enddeclare","endfor","endforeach","endif","endswitch","endwhile","extends","false","final","for","foreach","function","global","goto","if","implements","interface","instanceof","insteadof","namespace","new","null","object","old_function","or","private","protected","public","resource","static","switch","throw","trait","try","true","use","var","while","xor","die","echo","empty","exit","eval","include","include_once","isset","list","require","require_once","return","print","unset","yield","__construct"],phpCompileTimeConstants:["__CLASS__","__DIR__","__FILE__","__LINE__","__NAMESPACE__","__METHOD__","__FUNCTION__","__TRAIT__"],phpPreDefinedVariables:["$GLOBALS","$_SERVER","$_GET","$_POST","$_FILES","$_REQUEST","$_SESSION","$_ENV","$_COOKIE","$php_errormsg","$HTTP_RAW_POST_DATA","$http_response_header","$argc","$argv"],escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/};e.conf=t,e.language=p,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/pla-VfZjczW0.js b/emrg/gui/vendor/monaco/vs/pla-VfZjczW0.js new file mode 100644 index 00000000..2fd759a9 --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/pla-VfZjczW0.js @@ -0,0 +1 @@ +define("vs/pla-VfZjczW0",["exports"],(function(e){"use strict";const o={comments:{lineComment:"#"},brackets:[["[","]"],["<",">"],["(",")"]],autoClosingPairs:[{open:"[",close:"]"},{open:"<",close:">"},{open:"(",close:")"}],surroundingPairs:[{open:"[",close:"]"},{open:"<",close:">"},{open:"(",close:")"}]},t={defaultToken:"",tokenPostfix:".pla",brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"<",close:">",token:"delimiter.angle"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:[".i",".o",".mv",".ilb",".ob",".label",".type",".phase",".pair",".symbolic",".symbolic-output",".kiss",".p",".e",".end"],comment:/#.*$/,identifier:/[a-zA-Z]+[a-zA-Z0-9_\-]*/,plaContent:/[01\-~\|]+/,tokenizer:{root:[{include:"@whitespace"},[/@comment/,"comment"],[/\.([a-zA-Z_\-]+)/,{cases:{"@eos":{token:"keyword.$1"},"@keywords":{cases:{".type":{token:"keyword.$1",next:"@type"},"@default":{token:"keyword.$1",next:"@keywordArg"}}},"@default":{token:"keyword.$1"}}}],[/@identifier/,"identifier"],[/@plaContent/,"string"]],whitespace:[[/[ \t\r\n]+/,""]],type:[{include:"@whitespace"},[/\w+/,{token:"type",next:"@pop"}]],keywordArg:[[/[ \t\r\n]+/,{cases:{"@eos":{token:"",next:"@pop"},"@default":""}}],[/@comment/,"comment","@pop"],[/[<>()\[\]]/,{cases:{"@eos":{token:"@brackets",next:"@pop"},"@default":"@brackets"}}],[/\-?\d+/,{cases:{"@eos":{token:"number",next:"@pop"},"@default":"number"}}],[/@identifier/,{cases:{"@eos":{token:"identifier",next:"@pop"},"@default":"identifier"}}],[/[;=]/,{cases:{"@eos":{token:"delimiter",next:"@pop"},"@default":"delimiter"}}]]}};e.conf=o,e.language=t,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/postiats-BBSzz8Pk.js b/emrg/gui/vendor/monaco/vs/postiats-BBSzz8Pk.js new file mode 100644 index 00000000..a94ae0c2 --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/postiats-BBSzz8Pk.js @@ -0,0 +1 @@ +define("vs/postiats-BBSzz8Pk",["exports"],(function(e){"use strict";const t={comments:{lineComment:"//",blockComment:["(*","*)"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]}]},n={tokenPostfix:".pats",defaultToken:"invalid",keywords:["abstype","abst0ype","absprop","absview","absvtype","absviewtype","absvt0ype","absviewt0ype","as","and","assume","begin","classdec","datasort","datatype","dataprop","dataview","datavtype","dataviewtype","do","end","extern","extype","extvar","exception","fn","fnx","fun","prfn","prfun","praxi","castfn","if","then","else","ifcase","in","infix","infixl","infixr","prefix","postfix","implmnt","implement","primplmnt","primplement","import","let","local","macdef","macrodef","nonfix","symelim","symintr","overload","of","op","rec","sif","scase","sortdef","sta","stacst","stadef","static","staload","dynload","try","tkindef","typedef","propdef","viewdef","vtypedef","viewtypedef","prval","var","prvar","when","where","with","withtype","withprop","withview","withvtype","withviewtype"],keywords_dlr:["$delay","$ldelay","$arrpsz","$arrptrsize","$d2ctype","$effmask","$effmask_ntm","$effmask_exn","$effmask_ref","$effmask_wrt","$effmask_all","$extern","$extkind","$extype","$extype_struct","$extval","$extfcall","$extmcall","$literal","$myfilename","$mylocation","$myfunction","$lst","$lst_t","$lst_vt","$list","$list_t","$list_vt","$rec","$rec_t","$rec_vt","$record","$record_t","$record_vt","$tup","$tup_t","$tup_vt","$tuple","$tuple_t","$tuple_vt","$break","$continue","$raise","$showtype","$vcopyenv_v","$vcopyenv_vt","$tempenver","$solver_assert","$solver_verify"],keywords_srp:["#if","#ifdef","#ifndef","#then","#elif","#elifdef","#elifndef","#else","#endif","#error","#prerr","#print","#assert","#undef","#define","#include","#require","#pragma","#codegen2","#codegen3"],irregular_keyword_list:["val+","val-","val","case+","case-","case","addr@","addr","fold@","free@","fix@","fix","lam@","lam","llam@","llam","viewt@ype+","viewt@ype-","viewt@ype","viewtype+","viewtype-","viewtype","view+","view-","view@","view","type+","type-","type","vtype+","vtype-","vtype","vt@ype+","vt@ype-","vt@ype","viewt@ype+","viewt@ype-","viewt@ype","viewtype+","viewtype-","viewtype","prop+","prop-","prop","type+","type-","type","t@ype","t@ype+","t@ype-","abst@ype","abstype","absviewt@ype","absvt@ype","for*","for","while*","while"],keywords_types:["bool","double","byte","int","short","char","void","unit","long","float","string","strptr"],keywords_effects:["0","fun","clo","prf","funclo","cloptr","cloref","ref","ntm","1"],operators:["@","!","|","`",":","$",".","=","#","~","..","...","=>","=<>","=/=>","=>>","=/=>>","<",">","><",".<",">.",".<>.","->","-<>"],brackets:[{open:",(",close:")",token:"delimiter.parenthesis"},{open:"`(",close:")",token:"delimiter.parenthesis"},{open:"%(",close:")",token:"delimiter.parenthesis"},{open:"'(",close:")",token:"delimiter.parenthesis"},{open:"'{",close:"}",token:"delimiter.parenthesis"},{open:"@(",close:")",token:"delimiter.parenthesis"},{open:"@{",close:"}",token:"delimiter.brace"},{open:"@[",close:"]",token:"delimiter.square"},{open:"#[",close:"]",token:"delimiter.square"},{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],symbols:/[=>]/,digit:/[0-9]/,digitseq0:/@digit*/,xdigit:/[0-9A-Za-z]/,xdigitseq0:/@xdigit*/,INTSP:/[lLuU]/,FLOATSP:/[fFlL]/,fexponent:/[eE][+-]?[0-9]+/,fexponent_bin:/[pP][+-]?[0-9]+/,deciexp:/\.[0-9]*@fexponent?/,hexiexp:/\.[0-9a-zA-Z]*@fexponent_bin?/,irregular_keywords:/val[+-]?|case[+-]?|addr\@?|fold\@|free\@|fix\@?|lam\@?|llam\@?|prop[+-]?|type[+-]?|view[+-@]?|viewt@?ype[+-]?|t@?ype[+-]?|v(iew)?t@?ype[+-]?|abst@?ype|absv(iew)?t@?ype|for\*?|while\*?/,ESCHAR:/[ntvbrfa\\\?'"\(\[\{]/,start:"root",tokenizer:{root:[{regex:/[ \t\r\n]+/,action:{token:""}},{regex:/\(\*\)/,action:{token:"invalid"}},{regex:/\(\*/,action:{token:"comment",next:"lexing_COMMENT_block_ml"}},{regex:/\(/,action:"@brackets"},{regex:/\)/,action:"@brackets"},{regex:/\[/,action:"@brackets"},{regex:/\]/,action:"@brackets"},{regex:/\{/,action:"@brackets"},{regex:/\}/,action:"@brackets"},{regex:/,\(/,action:"@brackets"},{regex:/,/,action:{token:"delimiter.comma"}},{regex:/;/,action:{token:"delimiter.semicolon"}},{regex:/@\(/,action:"@brackets"},{regex:/@\[/,action:"@brackets"},{regex:/@\{/,action:"@brackets"},{regex:/:/,action:{token:"@rematch",next:"@pop"}}],lexing_EXTCODE:[{regex:/^%}/,action:{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}},{regex:/[^%]+/,action:""}],lexing_DQUOTE:[{regex:/"/,action:{token:"string.quote",next:"@pop"}},{regex:/(\{\$)(@IDENTFST@IDENTRST*)(\})/,action:[{token:"string.escape"},{token:"identifier"},{token:"string.escape"}]},{regex:/\\$/,action:{token:"string.escape"}},{regex:/\\(@ESCHAR|[xX]@xdigit+|@digit+)/,action:{token:"string.escape"}},{regex:/[^\\"]+/,action:{token:"string"}}]}};e.conf=t,e.language=n,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/powerquery-Dt-g_2cc.js b/emrg/gui/vendor/monaco/vs/powerquery-Dt-g_2cc.js new file mode 100644 index 00000000..743db751 --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/powerquery-Dt-g_2cc.js @@ -0,0 +1 @@ +define("vs/powerquery-Dt-g_2cc",["exports"],(function(e){"use strict";const t={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["[","]"],["(",")"],["{","}"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment","identifier"]},{open:"[",close:"]",notIn:["string","comment","identifier"]},{open:"(",close:")",notIn:["string","comment","identifier"]},{open:"{",close:"}",notIn:["string","comment","identifier"]}]},a={defaultToken:"",tokenPostfix:".pq",ignoreCase:!1,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"{",close:"}",token:"delimiter.brackets"},{open:"(",close:")",token:"delimiter.parenthesis"}],operatorKeywords:["and","not","or"],keywords:["as","each","else","error","false","if","in","is","let","meta","otherwise","section","shared","then","true","try","type"],constructors:["#binary","#date","#datetime","#datetimezone","#duration","#table","#time"],constants:["#infinity","#nan","#sections","#shared"],typeKeywords:["action","any","anynonnull","none","null","logical","number","time","date","datetime","datetimezone","duration","text","binary","list","record","table","function"],builtinFunctions:["Access.Database","Action.Return","Action.Sequence","Action.Try","ActiveDirectory.Domains","AdoDotNet.DataSource","AdoDotNet.Query","AdobeAnalytics.Cubes","AnalysisServices.Database","AnalysisServices.Databases","AzureStorage.BlobContents","AzureStorage.Blobs","AzureStorage.Tables","Binary.Buffer","Binary.Combine","Binary.Compress","Binary.Decompress","Binary.End","Binary.From","Binary.FromList","Binary.FromText","Binary.InferContentType","Binary.Length","Binary.ToList","Binary.ToText","BinaryFormat.7BitEncodedSignedInteger","BinaryFormat.7BitEncodedUnsignedInteger","BinaryFormat.Binary","BinaryFormat.Byte","BinaryFormat.ByteOrder","BinaryFormat.Choice","BinaryFormat.Decimal","BinaryFormat.Double","BinaryFormat.Group","BinaryFormat.Length","BinaryFormat.List","BinaryFormat.Null","BinaryFormat.Record","BinaryFormat.SignedInteger16","BinaryFormat.SignedInteger32","BinaryFormat.SignedInteger64","BinaryFormat.Single","BinaryFormat.Text","BinaryFormat.Transform","BinaryFormat.UnsignedInteger16","BinaryFormat.UnsignedInteger32","BinaryFormat.UnsignedInteger64","Byte.From","Character.FromNumber","Character.ToNumber","Combiner.CombineTextByDelimiter","Combiner.CombineTextByEachDelimiter","Combiner.CombineTextByLengths","Combiner.CombineTextByPositions","Combiner.CombineTextByRanges","Comparer.Equals","Comparer.FromCulture","Comparer.Ordinal","Comparer.OrdinalIgnoreCase","Csv.Document","Cube.AddAndExpandDimensionColumn","Cube.AddMeasureColumn","Cube.ApplyParameter","Cube.AttributeMemberId","Cube.AttributeMemberProperty","Cube.CollapseAndRemoveColumns","Cube.Dimensions","Cube.DisplayFolders","Cube.Measures","Cube.Parameters","Cube.Properties","Cube.PropertyKey","Cube.ReplaceDimensions","Cube.Transform","Currency.From","DB2.Database","Date.AddDays","Date.AddMonths","Date.AddQuarters","Date.AddWeeks","Date.AddYears","Date.Day","Date.DayOfWeek","Date.DayOfWeekName","Date.DayOfYear","Date.DaysInMonth","Date.EndOfDay","Date.EndOfMonth","Date.EndOfQuarter","Date.EndOfWeek","Date.EndOfYear","Date.From","Date.FromText","Date.IsInCurrentDay","Date.IsInCurrentMonth","Date.IsInCurrentQuarter","Date.IsInCurrentWeek","Date.IsInCurrentYear","Date.IsInNextDay","Date.IsInNextMonth","Date.IsInNextNDays","Date.IsInNextNMonths","Date.IsInNextNQuarters","Date.IsInNextNWeeks","Date.IsInNextNYears","Date.IsInNextQuarter","Date.IsInNextWeek","Date.IsInNextYear","Date.IsInPreviousDay","Date.IsInPreviousMonth","Date.IsInPreviousNDays","Date.IsInPreviousNMonths","Date.IsInPreviousNQuarters","Date.IsInPreviousNWeeks","Date.IsInPreviousNYears","Date.IsInPreviousQuarter","Date.IsInPreviousWeek","Date.IsInPreviousYear","Date.IsInYearToDate","Date.IsLeapYear","Date.Month","Date.MonthName","Date.QuarterOfYear","Date.StartOfDay","Date.StartOfMonth","Date.StartOfQuarter","Date.StartOfWeek","Date.StartOfYear","Date.ToRecord","Date.ToText","Date.WeekOfMonth","Date.WeekOfYear","Date.Year","DateTime.AddZone","DateTime.Date","DateTime.FixedLocalNow","DateTime.From","DateTime.FromFileTime","DateTime.FromText","DateTime.IsInCurrentHour","DateTime.IsInCurrentMinute","DateTime.IsInCurrentSecond","DateTime.IsInNextHour","DateTime.IsInNextMinute","DateTime.IsInNextNHours","DateTime.IsInNextNMinutes","DateTime.IsInNextNSeconds","DateTime.IsInNextSecond","DateTime.IsInPreviousHour","DateTime.IsInPreviousMinute","DateTime.IsInPreviousNHours","DateTime.IsInPreviousNMinutes","DateTime.IsInPreviousNSeconds","DateTime.IsInPreviousSecond","DateTime.LocalNow","DateTime.Time","DateTime.ToRecord","DateTime.ToText","DateTimeZone.FixedLocalNow","DateTimeZone.FixedUtcNow","DateTimeZone.From","DateTimeZone.FromFileTime","DateTimeZone.FromText","DateTimeZone.LocalNow","DateTimeZone.RemoveZone","DateTimeZone.SwitchZone","DateTimeZone.ToLocal","DateTimeZone.ToRecord","DateTimeZone.ToText","DateTimeZone.ToUtc","DateTimeZone.UtcNow","DateTimeZone.ZoneHours","DateTimeZone.ZoneMinutes","Decimal.From","Diagnostics.ActivityId","Diagnostics.Trace","DirectQueryCapabilities.From","Double.From","Duration.Days","Duration.From","Duration.FromText","Duration.Hours","Duration.Minutes","Duration.Seconds","Duration.ToRecord","Duration.ToText","Duration.TotalDays","Duration.TotalHours","Duration.TotalMinutes","Duration.TotalSeconds","Embedded.Value","Error.Record","Excel.CurrentWorkbook","Excel.Workbook","Exchange.Contents","Expression.Constant","Expression.Evaluate","Expression.Identifier","Facebook.Graph","File.Contents","Folder.Contents","Folder.Files","Function.From","Function.Invoke","Function.InvokeAfter","Function.IsDataSource","GoogleAnalytics.Accounts","Guid.From","HdInsight.Containers","HdInsight.Contents","HdInsight.Files","Hdfs.Contents","Hdfs.Files","Informix.Database","Int16.From","Int32.From","Int64.From","Int8.From","ItemExpression.From","Json.Document","Json.FromValue","Lines.FromBinary","Lines.FromText","Lines.ToBinary","Lines.ToText","List.Accumulate","List.AllTrue","List.Alternate","List.AnyTrue","List.Average","List.Buffer","List.Combine","List.Contains","List.ContainsAll","List.ContainsAny","List.Count","List.Covariance","List.DateTimeZones","List.DateTimes","List.Dates","List.Difference","List.Distinct","List.Durations","List.FindText","List.First","List.FirstN","List.Generate","List.InsertRange","List.Intersect","List.IsDistinct","List.IsEmpty","List.Last","List.LastN","List.MatchesAll","List.MatchesAny","List.Max","List.MaxN","List.Median","List.Min","List.MinN","List.Mode","List.Modes","List.NonNullCount","List.Numbers","List.PositionOf","List.PositionOfAny","List.Positions","List.Product","List.Random","List.Range","List.RemoveFirstN","List.RemoveItems","List.RemoveLastN","List.RemoveMatchingItems","List.RemoveNulls","List.RemoveRange","List.Repeat","List.ReplaceMatchingItems","List.ReplaceRange","List.ReplaceValue","List.Reverse","List.Select","List.Single","List.SingleOrDefault","List.Skip","List.Sort","List.StandardDeviation","List.Sum","List.Times","List.Transform","List.TransformMany","List.Union","List.Zip","Logical.From","Logical.FromText","Logical.ToText","MQ.Queue","MySQL.Database","Number.Abs","Number.Acos","Number.Asin","Number.Atan","Number.Atan2","Number.BitwiseAnd","Number.BitwiseNot","Number.BitwiseOr","Number.BitwiseShiftLeft","Number.BitwiseShiftRight","Number.BitwiseXor","Number.Combinations","Number.Cos","Number.Cosh","Number.Exp","Number.Factorial","Number.From","Number.FromText","Number.IntegerDivide","Number.IsEven","Number.IsNaN","Number.IsOdd","Number.Ln","Number.Log","Number.Log10","Number.Mod","Number.Permutations","Number.Power","Number.Random","Number.RandomBetween","Number.Round","Number.RoundAwayFromZero","Number.RoundDown","Number.RoundTowardZero","Number.RoundUp","Number.Sign","Number.Sin","Number.Sinh","Number.Sqrt","Number.Tan","Number.Tanh","Number.ToText","OData.Feed","Odbc.DataSource","Odbc.Query","OleDb.DataSource","OleDb.Query","Oracle.Database","Percentage.From","PostgreSQL.Database","RData.FromBinary","Record.AddField","Record.Combine","Record.Field","Record.FieldCount","Record.FieldNames","Record.FieldOrDefault","Record.FieldValues","Record.FromList","Record.FromTable","Record.HasFields","Record.RemoveFields","Record.RenameFields","Record.ReorderFields","Record.SelectFields","Record.ToList","Record.ToTable","Record.TransformFields","Replacer.ReplaceText","Replacer.ReplaceValue","RowExpression.Column","RowExpression.From","Salesforce.Data","Salesforce.Reports","SapBusinessWarehouse.Cubes","SapHana.Database","SharePoint.Contents","SharePoint.Files","SharePoint.Tables","Single.From","Soda.Feed","Splitter.SplitByNothing","Splitter.SplitTextByAnyDelimiter","Splitter.SplitTextByDelimiter","Splitter.SplitTextByEachDelimiter","Splitter.SplitTextByLengths","Splitter.SplitTextByPositions","Splitter.SplitTextByRanges","Splitter.SplitTextByRepeatedLengths","Splitter.SplitTextByWhitespace","Sql.Database","Sql.Databases","SqlExpression.SchemaFrom","SqlExpression.ToExpression","Sybase.Database","Table.AddColumn","Table.AddIndexColumn","Table.AddJoinColumn","Table.AddKey","Table.AggregateTableColumn","Table.AlternateRows","Table.Buffer","Table.Column","Table.ColumnCount","Table.ColumnNames","Table.ColumnsOfType","Table.Combine","Table.CombineColumns","Table.Contains","Table.ContainsAll","Table.ContainsAny","Table.DemoteHeaders","Table.Distinct","Table.DuplicateColumn","Table.ExpandListColumn","Table.ExpandRecordColumn","Table.ExpandTableColumn","Table.FillDown","Table.FillUp","Table.FilterWithDataTable","Table.FindText","Table.First","Table.FirstN","Table.FirstValue","Table.FromColumns","Table.FromList","Table.FromPartitions","Table.FromRecords","Table.FromRows","Table.FromValue","Table.Group","Table.HasColumns","Table.InsertRows","Table.IsDistinct","Table.IsEmpty","Table.Join","Table.Keys","Table.Last","Table.LastN","Table.MatchesAllRows","Table.MatchesAnyRows","Table.Max","Table.MaxN","Table.Min","Table.MinN","Table.NestedJoin","Table.Partition","Table.PartitionValues","Table.Pivot","Table.PositionOf","Table.PositionOfAny","Table.PrefixColumns","Table.Profile","Table.PromoteHeaders","Table.Range","Table.RemoveColumns","Table.RemoveFirstN","Table.RemoveLastN","Table.RemoveMatchingRows","Table.RemoveRows","Table.RemoveRowsWithErrors","Table.RenameColumns","Table.ReorderColumns","Table.Repeat","Table.ReplaceErrorValues","Table.ReplaceKeys","Table.ReplaceMatchingRows","Table.ReplaceRelationshipIdentity","Table.ReplaceRows","Table.ReplaceValue","Table.ReverseRows","Table.RowCount","Table.Schema","Table.SelectColumns","Table.SelectRows","Table.SelectRowsWithErrors","Table.SingleRow","Table.Skip","Table.Sort","Table.SplitColumn","Table.ToColumns","Table.ToList","Table.ToRecords","Table.ToRows","Table.TransformColumnNames","Table.TransformColumnTypes","Table.TransformColumns","Table.TransformRows","Table.Transpose","Table.Unpivot","Table.UnpivotOtherColumns","Table.View","Table.ViewFunction","TableAction.DeleteRows","TableAction.InsertRows","TableAction.UpdateRows","Tables.GetRelationships","Teradata.Database","Text.AfterDelimiter","Text.At","Text.BeforeDelimiter","Text.BetweenDelimiters","Text.Clean","Text.Combine","Text.Contains","Text.End","Text.EndsWith","Text.Format","Text.From","Text.FromBinary","Text.Insert","Text.Length","Text.Lower","Text.Middle","Text.NewGuid","Text.PadEnd","Text.PadStart","Text.PositionOf","Text.PositionOfAny","Text.Proper","Text.Range","Text.Remove","Text.RemoveRange","Text.Repeat","Text.Replace","Text.ReplaceRange","Text.Select","Text.Split","Text.SplitAny","Text.Start","Text.StartsWith","Text.ToBinary","Text.ToList","Text.Trim","Text.TrimEnd","Text.TrimStart","Text.Upper","Time.EndOfHour","Time.From","Time.FromText","Time.Hour","Time.Minute","Time.Second","Time.StartOfHour","Time.ToRecord","Time.ToText","Type.AddTableKey","Type.ClosedRecord","Type.Facets","Type.ForFunction","Type.ForRecord","Type.FunctionParameters","Type.FunctionRequiredParameters","Type.FunctionReturn","Type.Is","Type.IsNullable","Type.IsOpenRecord","Type.ListItem","Type.NonNullable","Type.OpenRecord","Type.RecordFields","Type.ReplaceFacets","Type.ReplaceTableKeys","Type.TableColumn","Type.TableKeys","Type.TableRow","Type.TableSchema","Type.Union","Uri.BuildQueryString","Uri.Combine","Uri.EscapeDataString","Uri.Parts","Value.Add","Value.As","Value.Compare","Value.Divide","Value.Equals","Value.Firewall","Value.FromText","Value.Is","Value.Metadata","Value.Multiply","Value.NativeQuery","Value.NullableEquals","Value.RemoveMetadata","Value.ReplaceMetadata","Value.ReplaceType","Value.Subtract","Value.Type","ValueAction.NativeStatement","ValueAction.Replace","Variable.Value","Web.Contents","Web.Page","WebAction.Request","Xml.Document","Xml.Tables"],builtinConstants:["BinaryEncoding.Base64","BinaryEncoding.Hex","BinaryOccurrence.Optional","BinaryOccurrence.Repeating","BinaryOccurrence.Required","ByteOrder.BigEndian","ByteOrder.LittleEndian","Compression.Deflate","Compression.GZip","CsvStyle.QuoteAfterDelimiter","CsvStyle.QuoteAlways","Culture.Current","Day.Friday","Day.Monday","Day.Saturday","Day.Sunday","Day.Thursday","Day.Tuesday","Day.Wednesday","ExtraValues.Error","ExtraValues.Ignore","ExtraValues.List","GroupKind.Global","GroupKind.Local","JoinAlgorithm.Dynamic","JoinAlgorithm.LeftHash","JoinAlgorithm.LeftIndex","JoinAlgorithm.PairwiseHash","JoinAlgorithm.RightHash","JoinAlgorithm.RightIndex","JoinAlgorithm.SortMerge","JoinKind.FullOuter","JoinKind.Inner","JoinKind.LeftAnti","JoinKind.LeftOuter","JoinKind.RightAnti","JoinKind.RightOuter","JoinSide.Left","JoinSide.Right","MissingField.Error","MissingField.Ignore","MissingField.UseNull","Number.E","Number.Epsilon","Number.NaN","Number.NegativeInfinity","Number.PI","Number.PositiveInfinity","Occurrence.All","Occurrence.First","Occurrence.Last","Occurrence.Optional","Occurrence.Repeating","Occurrence.Required","Order.Ascending","Order.Descending","Precision.Decimal","Precision.Double","QuoteStyle.Csv","QuoteStyle.None","RelativePosition.FromEnd","RelativePosition.FromStart","RoundingMode.AwayFromZero","RoundingMode.Down","RoundingMode.ToEven","RoundingMode.TowardZero","RoundingMode.Up","SapHanaDistribution.All","SapHanaDistribution.Connection","SapHanaDistribution.Off","SapHanaDistribution.Statement","SapHanaRangeOperator.Equals","SapHanaRangeOperator.GreaterThan","SapHanaRangeOperator.GreaterThanOrEquals","SapHanaRangeOperator.LessThan","SapHanaRangeOperator.LessThanOrEquals","SapHanaRangeOperator.NotEquals","TextEncoding.Ascii","TextEncoding.BigEndianUnicode","TextEncoding.Unicode","TextEncoding.Utf16","TextEncoding.Utf8","TextEncoding.Windows","TraceLevel.Critical","TraceLevel.Error","TraceLevel.Information","TraceLevel.Verbose","TraceLevel.Warning","WebMethod.Delete","WebMethod.Get","WebMethod.Head","WebMethod.Patch","WebMethod.Post","WebMethod.Put"],builtinTypes:["Action.Type","Any.Type","Binary.Type","BinaryEncoding.Type","BinaryOccurrence.Type","Byte.Type","ByteOrder.Type","Character.Type","Compression.Type","CsvStyle.Type","Currency.Type","Date.Type","DateTime.Type","DateTimeZone.Type","Day.Type","Decimal.Type","Double.Type","Duration.Type","ExtraValues.Type","Function.Type","GroupKind.Type","Guid.Type","Int16.Type","Int32.Type","Int64.Type","Int8.Type","JoinAlgorithm.Type","JoinKind.Type","JoinSide.Type","List.Type","Logical.Type","MissingField.Type","None.Type","Null.Type","Number.Type","Occurrence.Type","Order.Type","Password.Type","Percentage.Type","Precision.Type","QuoteStyle.Type","Record.Type","RelativePosition.Type","RoundingMode.Type","SapHanaDistribution.Type","SapHanaRangeOperator.Type","Single.Type","Table.Type","Text.Type","TextEncoding.Type","Time.Type","TraceLevel.Type","Type.Type","Uri.Type","WebMethod.Type"],tokenizer:{root:[[/#"[\w \.]+"/,"identifier.quote"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+/,"number.hex"],[/\d+([eE][\-+]?\d+)?/,"number"],[/(#?[a-z]+)\b/,{cases:{"@typeKeywords":"type","@keywords":"keyword","@constants":"constant","@constructors":"constructor","@operatorKeywords":"operators","@default":"identifier"}}],[/\b([A-Z][a-zA-Z0-9]+\.Type)\b/,{cases:{"@builtinTypes":"type","@default":"identifier"}}],[/\b([A-Z][a-zA-Z0-9]+\.[A-Z][a-zA-Z0-9]+)\b/,{cases:{"@builtinFunctions":"keyword.function","@builtinConstants":"constant","@default":"identifier"}}],[/\b([a-zA-Z_][\w\.]*)\b/,"identifier"],{include:"@whitespace"},{include:"@comments"},{include:"@strings"},[/[{}()\[\]]/,"@brackets"],[/([=\+<>\-\*&@\?\/!])|([<>]=)|(<>)|(=>)|(\.\.\.)|(\.\.)/,"operators"],[/[,;]/,"delimiter"]],whitespace:[[/\s+/,"white"]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[".","comment"]],strings:[['"',"string","@string"]],string:[['""',"string.escape"],['"',"string","@pop"],[".","string"]]}};e.conf=t,e.language=a,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/powershell-B-7ap1zc.js b/emrg/gui/vendor/monaco/vs/powershell-B-7ap1zc.js new file mode 100644 index 00000000..1a471ae3 --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/powershell-B-7ap1zc.js @@ -0,0 +1 @@ +define("vs/powershell-B-7ap1zc",["exports"],(function(e){"use strict";const n={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"#",blockComment:["<#","#>"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},s={defaultToken:"",ignoreCase:!0,tokenPostfix:".ps1",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.square",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"}],keywords:["begin","break","catch","class","continue","data","define","do","dynamicparam","else","elseif","end","exit","filter","finally","for","foreach","from","function","if","in","param","process","return","switch","throw","trap","try","until","using","var","while","workflow","parallel","sequence","inlinescript","configuration"],helpKeywords:/SYNOPSIS|DESCRIPTION|PARAMETER|EXAMPLE|INPUTS|OUTPUTS|NOTES|LINK|COMPONENT|ROLE|FUNCTIONALITY|FORWARDHELPTARGETNAME|FORWARDHELPCATEGORY|REMOTEHELPRUNSPACE|EXTERNALHELP/,symbols:/[=>/,"comment","@pop"],[/(\.)(@helpKeywords)(?!\w)/,{token:"comment.keyword.$2"}],[/[\.#]/,"comment"]]}};e.conf=n,e.language=s,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/protobuf-BmtuEB1A.js b/emrg/gui/vendor/monaco/vs/protobuf-BmtuEB1A.js new file mode 100644 index 00000000..7d91fd5e --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/protobuf-BmtuEB1A.js @@ -0,0 +1,2 @@ +define("vs/protobuf-BmtuEB1A",["exports"],(function(e){"use strict";const t=["true","false"],n={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],autoCloseBefore:`.,=}])>' + `,indentationRules:{increaseIndentPattern:new RegExp("^((?!\\/\\/).)*(\\{[^}\"'`]*|\\([^)\"'`]*|\\[[^\\]\"'`]*)$"),decreaseIndentPattern:new RegExp("^((?!.*?\\/\\*).*\\*/)?\\s*[\\}\\]].*$")}},i={defaultToken:"",tokenPostfix:".proto",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],symbols:/[=>/,{token:"@brackets",bracket:"@close",switchTo:"identifier"}]],field:[{include:"@whitespace"},["group",{cases:{"$S2==proto2":{token:"keyword",switchTo:"@groupDecl.$S2"}}}],[/(@identifier)(\s*)(=)/,["identifier","white",{token:"delimiter",next:"@pop"}]],[/@fullIdentifier|\./,{cases:{"@builtinTypes":"keyword","@default":"type.identifier"}}]],groupDecl:[{include:"@whitespace"},[/@identifier/,"identifier"],["=","operator"],[/{/,{token:"@brackets",bracket:"@open",switchTo:"@messageBody.$S2"}],{include:"@constant"}],type:[{include:"@whitespace"},[/@identifier/,"type.identifier","@pop"],[/./,"delimiter"]],identifier:[{include:"@whitespace"},[/@identifier/,"identifier","@pop"]],serviceDecl:[{include:"@whitespace"},[/@identifier/,"identifier"],[/{/,{token:"@brackets",bracket:"@open",switchTo:"@serviceBody.$S2"}]],serviceBody:[{include:"@whitespace"},{include:"@constant"},[/;/,"delimiter"],[/option\b/,"keyword","@option.$S2"],[/rpc\b/,"keyword","@rpc.$S2"],[/\[/,{token:"@brackets",bracket:"@open",next:"@options.$S2"}],[/}/,{token:"@brackets",bracket:"@close",next:"@pop"}]],rpc:[{include:"@whitespace"},[/@identifier/,"identifier"],[/\(/,{token:"@brackets",bracket:"@open",switchTo:"@request.$S2"}],[/{/,{token:"@brackets",bracket:"@open",next:"@methodOptions.$S2"}],[/;/,"delimiter","@pop"]],request:[{include:"@whitespace"},[/@messageType/,{cases:{stream:{token:"keyword",next:"@type.$S2"},"@default":"type.identifier"}}],[/\)/,{token:"@brackets",bracket:"@close",switchTo:"@returns.$S2"}]],returns:[{include:"@whitespace"},[/returns\b/,"keyword"],[/\(/,{token:"@brackets",bracket:"@open",switchTo:"@response.$S2"}]],response:[{include:"@whitespace"},[/@messageType/,{cases:{stream:{token:"keyword",next:"@type.$S2"},"@default":"type.identifier"}}],[/\)/,{token:"@brackets",bracket:"@close",switchTo:"@rpc.$S2"}]],methodOptions:[{include:"@whitespace"},{include:"@constant"},[/;/,"delimiter"],["option","keyword"],[/@optionName/,"annotation"],[/[()]/,"annotation.brackets"],[/=/,"operator"],[/}/,{token:"@brackets",bracket:"@close",next:"@pop"}]],comment:[[/[^\/*]+/,"comment"],[/\/\*/,"comment","@push"],["\\*/","comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],stringSingle:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,{token:"string.quote",bracket:"@close",next:"@pop"}]],constant:[["@boolLit","keyword.constant"],["@hexLit","number.hex"],["@octalLit","number.octal"],["@decimalLit","number"],["@floatLit","number.float"],[/("([^"\\]|\\.)*|'([^'\\]|\\.)*)$/,"string.invalid"],[/"/,{token:"string.quote",bracket:"@open",next:"@string"}],[/'/,{token:"string.quote",bracket:"@open",next:"@stringSingle"}],[/{/,{token:"@brackets",bracket:"@open",next:"@prototext"}],[/identifier/,"identifier"]],whitespace:[[/[ \t\r\n]+/,"white"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],prototext:[{include:"@whitespace"},{include:"@constant"},[/@identifier/,"identifier"],[/[:;]/,"delimiter"],[/}/,{token:"@brackets",bracket:"@close",next:"@pop"}]]}};e.conf=n,e.language=i,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/pug-BRpRNeEb.js b/emrg/gui/vendor/monaco/vs/pug-BRpRNeEb.js new file mode 100644 index 00000000..4c85d7de --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/pug-BRpRNeEb.js @@ -0,0 +1 @@ +define("vs/pug-BRpRNeEb",["exports"],(function(e){"use strict";const t={comments:{lineComment:"//"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]}],folding:{offSide:!0}},n={defaultToken:"",tokenPostfix:".pug",ignoreCase:!0,brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.array",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"}],keywords:["append","block","case","default","doctype","each","else","extends","for","if","in","include","mixin","typeof","unless","var","when"],tags:["a","abbr","acronym","address","area","article","aside","audio","b","base","basefont","bdi","bdo","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","datalist","dd","del","details","dfn","div","dl","dt","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","keygen","kbd","label","li","link","map","mark","menu","meta","meter","nav","noframes","noscript","object","ol","optgroup","option","output","p","param","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strike","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","tracks","tt","u","ul","video","wbr"],symbols:/[\+\-\*\%\&\|\!\=\/\.\,\:]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/^(\s*)([a-zA-Z_-][\w-]*)/,{cases:{"$2@tags":{cases:{"@eos":["","tag"],"@default":["",{token:"tag",next:"@tag.$1"}]}},"$2@keywords":["",{token:"keyword.$2"}],"@default":["",""]}}],[/^(\s*)(#[a-zA-Z_-][\w-]*)/,{cases:{"@eos":["","tag.id"],"@default":["",{token:"tag.id",next:"@tag.$1"}]}}],[/^(\s*)(\.[a-zA-Z_-][\w-]*)/,{cases:{"@eos":["","tag.class"],"@default":["",{token:"tag.class",next:"@tag.$1"}]}}],[/^(\s*)(\|.*)$/,""],{include:"@whitespace"},[/[a-zA-Z_$][\w$]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":""}}],[/[{}()\[\]]/,"@brackets"],[/@symbols/,"delimiter"],[/\d+\.\d+([eE][\-+]?\d+)?/,"number.float"],[/\d+/,"number"],[/"/,"string",'@string."'],[/'/,"string","@string.'"]],tag:[[/(\.)(\s*$)/,[{token:"delimiter",next:"@blockText.$S2."},""]],[/\s+/,{token:"",next:"@simpleText"}],[/#[a-zA-Z_-][\w-]*/,{cases:{"@eos":{token:"tag.id",next:"@pop"},"@default":"tag.id"}}],[/\.[a-zA-Z_-][\w-]*/,{cases:{"@eos":{token:"tag.class",next:"@pop"},"@default":"tag.class"}}],[/\(/,{token:"delimiter.parenthesis",next:"@attributeList"}]],simpleText:[[/[^#]+$/,{token:"",next:"@popall"}],[/[^#]+/,{token:""}],[/(#{)([^}]*)(})/,{cases:{"@eos":["interpolation.delimiter","interpolation",{token:"interpolation.delimiter",next:"@popall"}],"@default":["interpolation.delimiter","interpolation","interpolation.delimiter"]}}],[/#$/,{token:"",next:"@popall"}],[/#/,""]],attributeList:[[/\s+/,""],[/(\w+)(\s*=\s*)("|')/,["attribute.name","delimiter",{token:"attribute.value",next:"@value.$3"}]],[/\w+/,"attribute.name"],[/,/,{cases:{"@eos":{token:"attribute.delimiter",next:"@popall"},"@default":"attribute.delimiter"}}],[/\)$/,{token:"delimiter.parenthesis",next:"@popall"}],[/\)/,{token:"delimiter.parenthesis",next:"@pop"}]],whitespace:[[/^(\s*)(\/\/.*)$/,{token:"comment",next:"@blockText.$1.comment"}],[/[ \t\r\n]+/,""],[//,{token:"comment",next:"@pop"}],[/"]},brackets:[[""],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${r.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:t.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${r.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:t.languages.IndentAction.Indent}}]},n={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/@@@@/],[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.root"}],[/)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)([\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],razorInSimpleState:[[/@\*/,"comment.cs","@razorBlockCommentTopLevel"],[/@[{(]/,"metatag.cs","@razorRootTopLevel"],[/(@)(\s*[\w]+)/,["metatag.cs",{token:"identifier.cs",switchTo:"@$S2.$S3"}]],[/[})]/,{token:"metatag.cs",switchTo:"@$S2.$S3"}],[/\*@/,{token:"comment.cs",switchTo:"@$S2.$S3"}]],razorInEmbeddedState:[[/@\*/,"comment.cs","@razorBlockCommentTopLevel"],[/@[{(]/,"metatag.cs","@razorRootTopLevel"],[/(@)(\s*[\w]+)/,["metatag.cs",{token:"identifier.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}]],[/[})]/,{token:"metatag.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],[/\*@/,{token:"comment.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}]],razorBlockCommentTopLevel:[[/\*@/,"@rematch","@pop"],[/[^*]+/,"comment.cs"],[/./,"comment.cs"]],razorBlockComment:[[/\*@/,"comment.cs","@pop"],[/[^*]+/,"comment.cs"],[/./,"comment.cs"]],razorRootTopLevel:[[/\{/,"delimiter.bracket.cs","@razorRoot"],[/\(/,"delimiter.parenthesis.cs","@razorRoot"],[/[})]/,"@rematch","@pop"],{include:"razorCommon"}],razorRoot:[[/\{/,"delimiter.bracket.cs","@razorRoot"],[/\(/,"delimiter.parenthesis.cs","@razorRoot"],[/\}/,"delimiter.bracket.cs","@pop"],[/\)/,"delimiter.parenthesis.cs","@pop"],{include:"razorCommon"}],razorCommon:[[/[a-zA-Z_]\w*/,{cases:{"@razorKeywords":{token:"keyword.cs"},"@default":"identifier.cs"}}],[/[\[\]]/,"delimiter.array.cs"],[/[ \t\r\n]+/],[/\/\/.*$/,"comment.cs"],[/@\*/,"comment.cs","@razorBlockComment"],[/"([^"]*)"/,"string.cs"],[/'([^']*)'/,"string.cs"],[/(<)([\w\-]+)(\/>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)([\w\-]+)(>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<\/)([\w\-]+)(>)/,["delimiter.html","tag.html","delimiter.html"]],[/[\+\-\*\%\&\|\^\~\!\=\<\>\/\?\;\:\.\,]/,"delimiter.cs"],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float.cs"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float.cs"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,"number.hex.cs"],[/0[0-7']*[0-7]/,"number.octal.cs"],[/0[bB][0-1']*[0-1]/,"number.binary.cs"],[/\d[\d']*/,"number.cs"],[/\d/,"number.cs"]]},razorKeywords:["abstract","as","async","await","base","bool","break","by","byte","case","catch","char","checked","class","const","continue","decimal","default","delegate","do","double","descending","explicit","event","extern","else","enum","false","finally","fixed","float","for","foreach","from","goto","group","if","implicit","in","int","interface","internal","into","is","lock","long","nameof","new","null","namespace","object","operator","out","override","orderby","params","private","protected","public","readonly","ref","return","switch","struct","sbyte","sealed","short","sizeof","stackalloc","static","string","select","this","throw","true","try","typeof","uint","ulong","unchecked","unsafe","ushort","using","var","virtual","volatile","void","when","while","where","yield","model","inject"],escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/};e.conf=o,e.language=n,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/redis-fvZQY4PI.js b/emrg/gui/vendor/monaco/vs/redis-fvZQY4PI.js new file mode 100644 index 00000000..8c7e0acc --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/redis-fvZQY4PI.js @@ -0,0 +1 @@ +define("vs/redis-fvZQY4PI",["exports"],(function(E){"use strict";const S={brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},e={defaultToken:"",tokenPostfix:".redis",ignoreCase:!0,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["APPEND","AUTH","BGREWRITEAOF","BGSAVE","BITCOUNT","BITFIELD","BITOP","BITPOS","BLPOP","BRPOP","BRPOPLPUSH","CLIENT","KILL","LIST","GETNAME","PAUSE","REPLY","SETNAME","CLUSTER","ADDSLOTS","COUNT-FAILURE-REPORTS","COUNTKEYSINSLOT","DELSLOTS","FAILOVER","FORGET","GETKEYSINSLOT","INFO","KEYSLOT","MEET","NODES","REPLICATE","RESET","SAVECONFIG","SET-CONFIG-EPOCH","SETSLOT","SLAVES","SLOTS","COMMAND","COUNT","GETKEYS","CONFIG","GET","REWRITE","SET","RESETSTAT","DBSIZE","DEBUG","OBJECT","SEGFAULT","DECR","DECRBY","DEL","DISCARD","DUMP","ECHO","EVAL","EVALSHA","EXEC","EXISTS","EXPIRE","EXPIREAT","FLUSHALL","FLUSHDB","GEOADD","GEOHASH","GEOPOS","GEODIST","GEORADIUS","GEORADIUSBYMEMBER","GETBIT","GETRANGE","GETSET","HDEL","HEXISTS","HGET","HGETALL","HINCRBY","HINCRBYFLOAT","HKEYS","HLEN","HMGET","HMSET","HSET","HSETNX","HSTRLEN","HVALS","INCR","INCRBY","INCRBYFLOAT","KEYS","LASTSAVE","LINDEX","LINSERT","LLEN","LPOP","LPUSH","LPUSHX","LRANGE","LREM","LSET","LTRIM","MGET","MIGRATE","MONITOR","MOVE","MSET","MSETNX","MULTI","PERSIST","PEXPIRE","PEXPIREAT","PFADD","PFCOUNT","PFMERGE","PING","PSETEX","PSUBSCRIBE","PUBSUB","PTTL","PUBLISH","PUNSUBSCRIBE","QUIT","RANDOMKEY","READONLY","READWRITE","RENAME","RENAMENX","RESTORE","ROLE","RPOP","RPOPLPUSH","RPUSH","RPUSHX","SADD","SAVE","SCARD","SCRIPT","FLUSH","LOAD","SDIFF","SDIFFSTORE","SELECT","SETBIT","SETEX","SETNX","SETRANGE","SHUTDOWN","SINTER","SINTERSTORE","SISMEMBER","SLAVEOF","SLOWLOG","SMEMBERS","SMOVE","SORT","SPOP","SRANDMEMBER","SREM","STRLEN","SUBSCRIBE","SUNION","SUNIONSTORE","SWAPDB","SYNC","TIME","TOUCH","TTL","TYPE","UNSUBSCRIBE","UNLINK","UNWATCH","WAIT","WATCH","ZADD","ZCARD","ZCOUNT","ZINCRBY","ZINTERSTORE","ZLEXCOUNT","ZRANGE","ZRANGEBYLEX","ZREVRANGEBYLEX","ZRANGEBYSCORE","ZRANK","ZREM","ZREMRANGEBYLEX","ZREMRANGEBYRANK","ZREMRANGEBYSCORE","ZREVRANGE","ZREVRANGEBYSCORE","ZREVRANK","ZSCORE","ZUNIONSTORE","SCAN","SSCAN","HSCAN","ZSCAN"],operators:[],builtinFunctions:[],builtinVariables:[],pseudoColumns:[],tokenizer:{root:[{include:"@whitespace"},{include:"@pseudoColumns"},{include:"@numbers"},{include:"@strings"},{include:"@scopes"},[/[;,.]/,"delimiter"],[/[()]/,"@brackets"],[/[\w@#$]+/,{cases:{"@keywords":"keyword","@operators":"operator","@builtinVariables":"predefined","@builtinFunctions":"predefined","@default":"identifier"}}],[/[<>=!%&+\-*/|~^]/,"operator"]],whitespace:[[/\s+/,"white"]],pseudoColumns:[[/[$][A-Za-z_][\w@#$]*/,{cases:{"@pseudoColumns":"predefined","@default":"identifier"}}]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/,"number"]],strings:[[/'/,{token:"string",next:"@string"}],[/"/,{token:"string.double",next:"@stringDouble"}]],string:[[/[^']+/,"string"],[/''/,"string"],[/'/,{token:"string",next:"@pop"}]],stringDouble:[[/[^"]+/,"string.double"],[/""/,"string.double"],[/"/,{token:"string.double",next:"@pop"}]],scopes:[]}};E.conf=S,E.language=e,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/redshift-45Et0LQi.js b/emrg/gui/vendor/monaco/vs/redshift-45Et0LQi.js new file mode 100644 index 00000000..a1b15cbc --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/redshift-45Et0LQi.js @@ -0,0 +1 @@ +define("vs/redshift-45Et0LQi",["exports"],(function(e){"use strict";const _={comments:{lineComment:"--",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},t={defaultToken:"",tokenPostfix:".sql",ignoreCase:!0,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["AES128","AES256","ALL","ALLOWOVERWRITE","ANALYSE","ANALYZE","AND","ANY","ARRAY","AS","ASC","AUTHORIZATION","AZ64","BACKUP","BETWEEN","BINARY","BLANKSASNULL","BOTH","BYTEDICT","BZIP2","CASE","CAST","CHECK","COLLATE","COLUMN","CONSTRAINT","CREATE","CREDENTIALS","CROSS","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURRENT_USER_ID","DEFAULT","DEFERRABLE","DEFLATE","DEFRAG","DELTA","DELTA32K","DESC","DISABLE","DISTINCT","DO","ELSE","EMPTYASNULL","ENABLE","ENCODE","ENCRYPT","ENCRYPTION","END","EXCEPT","EXPLICIT","FALSE","FOR","FOREIGN","FREEZE","FROM","FULL","GLOBALDICT256","GLOBALDICT64K","GRANT","GROUP","GZIP","HAVING","IDENTITY","IGNORE","ILIKE","IN","INITIALLY","INNER","INTERSECT","INTO","IS","ISNULL","JOIN","LANGUAGE","LEADING","LEFT","LIKE","LIMIT","LOCALTIME","LOCALTIMESTAMP","LUN","LUNS","LZO","LZOP","MINUS","MOSTLY16","MOSTLY32","MOSTLY8","NATURAL","NEW","NOT","NOTNULL","NULL","NULLS","OFF","OFFLINE","OFFSET","OID","OLD","ON","ONLY","OPEN","OR","ORDER","OUTER","OVERLAPS","PARALLEL","PARTITION","PERCENT","PERMISSIONS","PLACING","PRIMARY","RAW","READRATIO","RECOVER","REFERENCES","RESPECT","REJECTLOG","RESORT","RESTORE","RIGHT","SELECT","SESSION_USER","SIMILAR","SNAPSHOT","SOME","SYSDATE","SYSTEM","TABLE","TAG","TDES","TEXT255","TEXT32K","THEN","TIMESTAMP","TO","TOP","TRAILING","TRUE","TRUNCATECOLUMNS","UNION","UNIQUE","USER","USING","VERBOSE","WALLET","WHEN","WHERE","WITH","WITHOUT"],operators:["AND","BETWEEN","IN","LIKE","NOT","OR","IS","NULL","INTERSECT","UNION","INNER","JOIN","LEFT","OUTER","RIGHT"],builtinFunctions:["current_schema","current_schemas","has_database_privilege","has_schema_privilege","has_table_privilege","age","current_time","current_timestamp","localtime","isfinite","now","ascii","get_bit","get_byte","set_bit","set_byte","to_ascii","approximate percentile_disc","avg","count","listagg","max","median","min","percentile_cont","stddev_samp","stddev_pop","sum","var_samp","var_pop","bit_and","bit_or","bool_and","bool_or","cume_dist","first_value","lag","last_value","lead","nth_value","ratio_to_report","dense_rank","ntile","percent_rank","rank","row_number","case","coalesce","decode","greatest","least","nvl","nvl2","nullif","add_months","at time zone","convert_timezone","current_date","date_cmp","date_cmp_timestamp","date_cmp_timestamptz","date_part_year","dateadd","datediff","date_part","date_trunc","extract","getdate","interval_cmp","last_day","months_between","next_day","sysdate","timeofday","timestamp_cmp","timestamp_cmp_date","timestamp_cmp_timestamptz","timestamptz_cmp","timestamptz_cmp_date","timestamptz_cmp_timestamp","timezone","to_timestamp","trunc","abs","acos","asin","atan","atan2","cbrt","ceil","ceiling","checksum","cos","cot","degrees","dexp","dlog1","dlog10","exp","floor","ln","log","mod","pi","power","radians","random","round","sin","sign","sqrt","tan","to_hex","bpcharcmp","btrim","bttext_pattern_cmp","char_length","character_length","charindex","chr","concat","crc32","func_sha1","initcap","left and rights","len","length","lower","lpad and rpads","ltrim","md5","octet_length","position","quote_ident","quote_literal","regexp_count","regexp_instr","regexp_replace","regexp_substr","repeat","replace","replicate","reverse","rtrim","split_part","strpos","strtol","substring","textlen","translate","trim","upper","cast","convert","to_char","to_date","to_number","json_array_length","json_extract_array_element_text","json_extract_path_text","current_setting","pg_cancel_backend","pg_terminate_backend","set_config","current_database","current_user","current_user_id","pg_backend_pid","pg_last_copy_count","pg_last_copy_id","pg_last_query_id","pg_last_unload_count","session_user","slice_num","user","version","abbrev","acosd","any","area","array_agg","array_append","array_cat","array_dims","array_fill","array_length","array_lower","array_ndims","array_position","array_positions","array_prepend","array_remove","array_replace","array_to_json","array_to_string","array_to_tsvector","array_upper","asind","atan2d","atand","bit","bit_length","bound_box","box","brin_summarize_new_values","broadcast","cardinality","center","circle","clock_timestamp","col_description","concat_ws","convert_from","convert_to","corr","cosd","cotd","covar_pop","covar_samp","current_catalog","current_query","current_role","currval","cursor_to_xml","diameter","div","encode","enum_first","enum_last","enum_range","every","family","format","format_type","generate_series","generate_subscripts","get_current_ts_config","gin_clean_pending_list","grouping","has_any_column_privilege","has_column_privilege","has_foreign_data_wrapper_privilege","has_function_privilege","has_language_privilege","has_sequence_privilege","has_server_privilege","has_tablespace_privilege","has_type_privilege","height","host","hostmask","inet_client_addr","inet_client_port","inet_merge","inet_same_family","inet_server_addr","inet_server_port","isclosed","isempty","isopen","json_agg","json_object","json_object_agg","json_populate_record","json_populate_recordset","json_to_record","json_to_recordset","jsonb_agg","jsonb_object_agg","justify_days","justify_hours","justify_interval","lastval","left","line","localtimestamp","lower_inc","lower_inf","lpad","lseg","make_date","make_interval","make_time","make_timestamp","make_timestamptz","masklen","mode","netmask","network","nextval","npoints","num_nonnulls","num_nulls","numnode","obj_description","overlay","parse_ident","path","pclose","percentile_disc","pg_advisory_lock","pg_advisory_lock_shared","pg_advisory_unlock","pg_advisory_unlock_all","pg_advisory_unlock_shared","pg_advisory_xact_lock","pg_advisory_xact_lock_shared","pg_backup_start_time","pg_blocking_pids","pg_client_encoding","pg_collation_is_visible","pg_column_size","pg_conf_load_time","pg_control_checkpoint","pg_control_init","pg_control_recovery","pg_control_system","pg_conversion_is_visible","pg_create_logical_replication_slot","pg_create_physical_replication_slot","pg_create_restore_point","pg_current_xlog_flush_location","pg_current_xlog_insert_location","pg_current_xlog_location","pg_database_size","pg_describe_object","pg_drop_replication_slot","pg_export_snapshot","pg_filenode_relation","pg_function_is_visible","pg_get_constraintdef","pg_get_expr","pg_get_function_arguments","pg_get_function_identity_arguments","pg_get_function_result","pg_get_functiondef","pg_get_indexdef","pg_get_keywords","pg_get_object_address","pg_get_owned_sequence","pg_get_ruledef","pg_get_serial_sequence","pg_get_triggerdef","pg_get_userbyid","pg_get_viewdef","pg_has_role","pg_identify_object","pg_identify_object_as_address","pg_index_column_has_property","pg_index_has_property","pg_indexam_has_property","pg_indexes_size","pg_is_in_backup","pg_is_in_recovery","pg_is_other_temp_schema","pg_is_xlog_replay_paused","pg_last_committed_xact","pg_last_xact_replay_timestamp","pg_last_xlog_receive_location","pg_last_xlog_replay_location","pg_listening_channels","pg_logical_emit_message","pg_logical_slot_get_binary_changes","pg_logical_slot_get_changes","pg_logical_slot_peek_binary_changes","pg_logical_slot_peek_changes","pg_ls_dir","pg_my_temp_schema","pg_notification_queue_usage","pg_opclass_is_visible","pg_operator_is_visible","pg_opfamily_is_visible","pg_options_to_table","pg_postmaster_start_time","pg_read_binary_file","pg_read_file","pg_relation_filenode","pg_relation_filepath","pg_relation_size","pg_reload_conf","pg_replication_origin_create","pg_replication_origin_drop","pg_replication_origin_oid","pg_replication_origin_progress","pg_replication_origin_session_is_setup","pg_replication_origin_session_progress","pg_replication_origin_session_reset","pg_replication_origin_session_setup","pg_replication_origin_xact_reset","pg_replication_origin_xact_setup","pg_rotate_logfile","pg_size_bytes","pg_size_pretty","pg_sleep","pg_sleep_for","pg_sleep_until","pg_start_backup","pg_stat_file","pg_stop_backup","pg_switch_xlog","pg_table_is_visible","pg_table_size","pg_tablespace_databases","pg_tablespace_location","pg_tablespace_size","pg_total_relation_size","pg_trigger_depth","pg_try_advisory_lock","pg_try_advisory_lock_shared","pg_try_advisory_xact_lock","pg_try_advisory_xact_lock_shared","pg_ts_config_is_visible","pg_ts_dict_is_visible","pg_ts_parser_is_visible","pg_ts_template_is_visible","pg_type_is_visible","pg_typeof","pg_xact_commit_timestamp","pg_xlog_location_diff","pg_xlog_replay_pause","pg_xlog_replay_resume","pg_xlogfile_name","pg_xlogfile_name_offset","phraseto_tsquery","plainto_tsquery","point","polygon","popen","pqserverversion","query_to_xml","querytree","quote_nullable","radius","range_merge","regexp_matches","regexp_split_to_array","regexp_split_to_table","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","right","row_security_active","row_to_json","rpad","scale","set_masklen","setseed","setval","setweight","shobj_description","sind","sprintf","statement_timestamp","stddev","string_agg","string_to_array","strip","substr","table_to_xml","table_to_xml_and_xmlschema","tand","text","to_json","to_regclass","to_regnamespace","to_regoper","to_regoperator","to_regproc","to_regprocedure","to_regrole","to_regtype","to_tsquery","to_tsvector","transaction_timestamp","ts_debug","ts_delete","ts_filter","ts_headline","ts_lexize","ts_parse","ts_rank","ts_rank_cd","ts_rewrite","ts_stat","ts_token_type","tsquery_phrase","tsvector_to_array","tsvector_update_trigger","tsvector_update_trigger_column","txid_current","txid_current_snapshot","txid_snapshot_xip","txid_snapshot_xmax","txid_snapshot_xmin","txid_visible_in_snapshot","unnest","upper_inc","upper_inf","variance","width","width_bucket","xml_is_well_formed","xml_is_well_formed_content","xml_is_well_formed_document","xmlagg","xmlcomment","xmlconcat","xmlelement","xmlexists","xmlforest","xmlparse","xmlpi","xmlroot","xmlserialize","xpath","xpath_exists"],builtinVariables:[],pseudoColumns:[],tokenizer:{root:[{include:"@comments"},{include:"@whitespace"},{include:"@pseudoColumns"},{include:"@numbers"},{include:"@strings"},{include:"@complexIdentifiers"},{include:"@scopes"},[/[;,.]/,"delimiter"],[/[()]/,"@brackets"],[/[\w@#$]+/,{cases:{"@keywords":"keyword","@operators":"operator","@builtinVariables":"predefined","@builtinFunctions":"predefined","@default":"identifier"}}],[/[<>=!%&+\-*/|~^]/,"operator"]],whitespace:[[/\s+/,"white"]],comments:[[/--+.*/,"comment"],[/\/\*/,{token:"comment.quote",next:"@comment"}]],comment:[[/[^*/]+/,"comment"],[/\*\//,{token:"comment.quote",next:"@pop"}],[/./,"comment"]],pseudoColumns:[[/[$][A-Za-z_][\w@#$]*/,{cases:{"@pseudoColumns":"predefined","@default":"identifier"}}]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/,"number"]],strings:[[/'/,{token:"string",next:"@string"}]],string:[[/[^']+/,"string"],[/''/,"string"],[/'/,{token:"string",next:"@pop"}]],complexIdentifiers:[[/"/,{token:"identifier.quote",next:"@quotedIdentifier"}]],quotedIdentifier:[[/[^"]+/,"identifier"],[/""/,"identifier"],[/"/,{token:"identifier.quote",next:"@pop"}]],scopes:[]}};e.conf=_,e.language=t,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/restructuredtext-C7UUFKFD.js b/emrg/gui/vendor/monaco/vs/restructuredtext-C7UUFKFD.js new file mode 100644 index 00000000..64103bd0 --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/restructuredtext-C7UUFKFD.js @@ -0,0 +1 @@ +define("vs/restructuredtext-C7UUFKFD",["exports"],(function(e){"use strict";const n={brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">",notIn:["string"]}],surroundingPairs:[{open:"(",close:")"},{open:"[",close:"]"},{open:"`",close:"`"}],folding:{markers:{start:new RegExp("^\\s*"),end:new RegExp("^\\s*")}}},s={defaultToken:"",tokenPostfix:".rst",control:/[\\`*_\[\]{}()#+\-\.!]/,escapes:/\\(?:@control)/,empty:["area","base","basefont","br","col","frame","hr","img","input","isindex","link","meta","param"],alphanumerics:/[A-Za-z0-9]/,simpleRefNameWithoutBq:/(?:@alphanumerics[-_+:.]*@alphanumerics)+|(?:@alphanumerics+)/,simpleRefName:/(?:`@phrase`|@simpleRefNameWithoutBq)/,phrase:/@simpleRefNameWithoutBq(?:\s@simpleRefNameWithoutBq)*/,citationName:/[A-Za-z][A-Za-z0-9-_.]*/,blockLiteralStart:/(?:[!"#$%&'()*+,-./:;<=>?@\[\]^_`{|}~]|[\s])/,precedingChars:/(?:[ -:/'"<([{])/,followingChars:/(?:[ -.,:;!?/'")\]}>]|$)/,punctuation:/(=|-|~|`|#|"|\^|\+|\*|:|\.|'|_|\+)/,tokenizer:{root:[[/^(@punctuation{3,}$){1,1}?/,"keyword"],[/^\s*([\*\-+‣•]|[a-zA-Z0-9]+\.|\([a-zA-Z0-9]+\)|[a-zA-Z0-9]+\))\s/,"keyword"],[/([ ]::)\s*$/,"keyword","@blankLineOfLiteralBlocks"],[/(::)\s*$/,"keyword","@blankLineOfLiteralBlocks"],{include:"@tables"},{include:"@explicitMarkupBlocks"},{include:"@inlineMarkup"}],explicitMarkupBlocks:[{include:"@citations"},{include:"@footnotes"},[/^(\.\.\s)(@simpleRefName)(::\s)(.*)$/,[{token:"",next:"subsequentLines"},"keyword","",""]],[/^(\.\.)(\s+)(_)(@simpleRefName)(:)(\s+)(.*)/,[{token:"",next:"hyperlinks"},"","","string.link","","","string.link"]],[/^((?:(?:\.\.)(?:\s+))?)(__)(:)(\s+)(.*)/,[{token:"",next:"subsequentLines"},"","","","string.link"]],[/^(__\s+)(.+)/,["","string.link"]],[/^(\.\.)( \|)([^| ]+[^|]*[^| ]*)(\| )(@simpleRefName)(:: .*)/,[{token:"",next:"subsequentLines"},"","string.link","","keyword",""],"@rawBlocks"],[/(\|)([^| ]+[^|]*[^| ]*)(\|_{0,2})/,["","string.link",""]],[/^(\.\.)([ ].*)$/,[{token:"",next:"@comments"},"comment"]]],inlineMarkup:[{include:"@citationsReference"},{include:"@footnotesReference"},[/(@simpleRefName)(_{1,2})/,["string.link",""]],[/(`)([^<`]+\s+)(<)(.*)(>)(`)(_)/,["","string.link","","string.link","","",""]],[/\*\*([^\\*]|\*(?!\*))+\*\*/,"strong"],[/\*[^*]+\*/,"emphasis"],[/(``)((?:[^`]|\`(?!`))+)(``)/,["","keyword",""]],[/(__\s+)(.+)/,["","keyword"]],[/(:)((?:@simpleRefNameWithoutBq)?)(:`)([^`]+)(`)/,["","keyword","","",""]],[/(`)([^`]+)(`:)((?:@simpleRefNameWithoutBq)?)(:)/,["","","","keyword",""]],[/(`)([^`]+)(`)/,""],[/(_`)(@phrase)(`)/,["","string.link",""]]],citations:[[/^(\.\.\s+\[)((?:@citationName))(\]\s+)(.*)/,[{token:"",next:"@subsequentLines"},"string.link","",""]]],citationsReference:[[/(\[)(@citationName)(\]_)/,["","string.link",""]]],footnotes:[[/^(\.\.\s+\[)((?:[0-9]+))(\]\s+.*)/,[{token:"",next:"@subsequentLines"},"string.link",""]],[/^(\.\.\s+\[)((?:#@simpleRefName?))(\]\s+)(.*)/,[{token:"",next:"@subsequentLines"},"string.link","",""]],[/^(\.\.\s+\[)((?:\*))(\]\s+)(.*)/,[{token:"",next:"@subsequentLines"},"string.link","",""]]],footnotesReference:[[/(\[)([0-9]+)(\])(_)/,["","string.link","",""]],[/(\[)(#@simpleRefName?)(\])(_)/,["","string.link","",""]],[/(\[)(\*)(\])(_)/,["","string.link","",""]]],blankLineOfLiteralBlocks:[[/^$/,"","@subsequentLinesOfLiteralBlocks"],[/^.*$/,"","@pop"]],subsequentLinesOfLiteralBlocks:[[/(@blockLiteralStart+)(.*)/,["keyword",""]],[/^(?!blockLiteralStart)/,"","@popall"]],subsequentLines:[[/^[\s]+.*/,""],[/^(?!\s)/,"","@pop"]],hyperlinks:[[/^[\s]+.*/,"string.link"],[/^(?!\s)/,"","@pop"]],comments:[[/^[\s]+.*/,"comment"],[/^(?!\s)/,"","@pop"]],tables:[[/\+-[+-]+/,"keyword"],[/\+=[+=]+/,"keyword"]]}};e.conf=n,e.language=s,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/ruby-CZO8zYTz.js b/emrg/gui/vendor/monaco/vs/ruby-CZO8zYTz.js new file mode 100644 index 00000000..644426b1 --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/ruby-CZO8zYTz.js @@ -0,0 +1 @@ +define("vs/ruby-CZO8zYTz",["exports"],(function(e){"use strict";const t={comments:{lineComment:"#",blockComment:["=begin","=end"]},brackets:[["(",")"],["{","}"],["[","]"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],indentationRules:{increaseIndentPattern:new RegExp(`^\\s*((begin|class|(private|protected)\\s+def|def|else|elsif|ensure|for|if|module|rescue|unless|until|when|while|case)|([^#]*\\sdo\\b)|([^#]*=\\s*(case|if|unless)))\\b([^#\\{;]|("|'|/).*\\4)*(#.*)?$`),decreaseIndentPattern:new RegExp("^\\s*([}\\]]([,)]?\\s*(#|$)|\\.[a-zA-Z_]\\w*\\b)|(end|rescue|ensure|else|elsif|when)\\b)")}},n={tokenPostfix:".ruby",keywords:["__LINE__","__ENCODING__","__FILE__","BEGIN","END","alias","and","begin","break","case","class","def","defined?","do","else","elsif","end","ensure","for","false","if","in","module","next","nil","not","or","redo","rescue","retry","return","self","super","then","true","undef","unless","until","when","while","yield"],keywordops:["::","..","...","?",":","=>"],builtins:["require","public","private","include","extend","attr_reader","protected","private_class_method","protected_class_method","new"],declarations:["module","class","def","case","do","begin","for","if","while","until","unless"],linedecls:["def","case","do","begin","for","if","while","until","unless"],operators:["^","&","|","<=>","==","===","!~","=~",">",">=","<","<=","<<",">>","+","-","*","/","%","**","~","+@","-@","[]","[]=","`","+=","-=","*=","**=","/=","^=","%=","<<=",">>=","&=","&&=","||=","|="],brackets:[{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"}],symbols:/[=>"}],[/%([qws])(@delim)/,{token:"string.$1.delim",switchTo:"@qstring.$1.$2.$2"}],[/%r\(/,{token:"regexp.delim",switchTo:"@pregexp.(.)"}],[/%r\[/,{token:"regexp.delim",switchTo:"@pregexp.[.]"}],[/%r\{/,{token:"regexp.delim",switchTo:"@pregexp.{.}"}],[/%r"}],[/%r(@delim)/,{token:"regexp.delim",switchTo:"@pregexp.$1.$1"}],[/%(x|W|Q?)\(/,{token:"string.$1.delim",switchTo:"@qqstring.$1.(.)"}],[/%(x|W|Q?)\[/,{token:"string.$1.delim",switchTo:"@qqstring.$1.[.]"}],[/%(x|W|Q?)\{/,{token:"string.$1.delim",switchTo:"@qqstring.$1.{.}"}],[/%(x|W|Q?)"}],[/%(x|W|Q?)(@delim)/,{token:"string.$1.delim",switchTo:"@qqstring.$1.$2.$2"}],[/%([rqwsxW]|Q?)./,{token:"invalid",next:"@pop"}],[/./,{token:"invalid",next:"@pop"}]],qstring:[[/\\$/,"string.$S2.escape"],[/\\./,"string.$S2.escape"],[/./,{cases:{"$#==$S4":{token:"string.$S2.delim",next:"@pop"},"$#==$S3":{token:"string.$S2.delim",next:"@push"},"@default":"string.$S2"}}]],qqstring:[[/#/,"string.$S2.escape","@interpolated"],{include:"@qstring"}],whitespace:[[/[ \t\r\n]+/,""],[/^\s*=begin\b/,"comment","@comment"],[/#.*$/,"comment"]],comment:[[/[^=]+/,"comment"],[/^\s*=begin\b/,"comment.invalid"],[/^\s*=end\b.*/,"comment","@pop"],[/[=]/,"comment"]]}};e.conf=t,e.language=n,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/rust-Bfetafyc.js b/emrg/gui/vendor/monaco/vs/rust-Bfetafyc.js new file mode 100644 index 00000000..2f4cf852 --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/rust-Bfetafyc.js @@ -0,0 +1 @@ +define("vs/rust-Bfetafyc",["exports"],(function(e){"use strict";const t={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"[",close:"]"},{open:"{",close:"}"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*#pragma\\s+region\\b"),end:new RegExp("^\\s*#pragma\\s+endregion\\b")}}},n={tokenPostfix:".rust",defaultToken:"invalid",keywords:["as","async","await","box","break","const","continue","crate","dyn","else","enum","extern","false","fn","for","if","impl","in","let","loop","match","mod","move","mut","pub","ref","return","self","static","struct","super","trait","true","try","type","unsafe","use","where","while","catch","default","union","static","abstract","alignof","become","do","final","macro","offsetof","override","priv","proc","pure","sizeof","typeof","unsized","virtual","yield"],typeKeywords:["Self","m32","m64","m128","f80","f16","f128","int","uint","float","char","bool","u8","u16","u32","u64","f32","f64","i8","i16","i32","i64","str","Option","Either","c_float","c_double","c_void","FILE","fpos_t","DIR","dirent","c_char","c_schar","c_uchar","c_short","c_ushort","c_int","c_uint","c_long","c_ulong","size_t","ptrdiff_t","clock_t","time_t","c_longlong","c_ulonglong","intptr_t","uintptr_t","off_t","dev_t","ino_t","pid_t","mode_t","ssize_t"],constants:["true","false","Some","None","Left","Right","Ok","Err"],supportConstants:["EXIT_FAILURE","EXIT_SUCCESS","RAND_MAX","EOF","SEEK_SET","SEEK_CUR","SEEK_END","_IOFBF","_IONBF","_IOLBF","BUFSIZ","FOPEN_MAX","FILENAME_MAX","L_tmpnam","TMP_MAX","O_RDONLY","O_WRONLY","O_RDWR","O_APPEND","O_CREAT","O_EXCL","O_TRUNC","S_IFIFO","S_IFCHR","S_IFBLK","S_IFDIR","S_IFREG","S_IFMT","S_IEXEC","S_IWRITE","S_IREAD","S_IRWXU","S_IXUSR","S_IWUSR","S_IRUSR","F_OK","R_OK","W_OK","X_OK","STDIN_FILENO","STDOUT_FILENO","STDERR_FILENO"],supportMacros:["format!","print!","println!","panic!","format_args!","unreachable!","write!","writeln!"],operators:["!","!=","%","%=","&","&=","&&","*","*=","+","+=","-","-=","->",".","..","...","/","/=",":",";","<<","<<=","<","<=","=","==","=>",">",">=",">>",">>=","@","^","^=","|","|=","||","_","?","#"],escapes:/\\([nrt0\"''\\]|x\h{2}|u\{\h{1,6}\})/,delimiters:/[,]/,symbols:/[\#\!\%\&\*\+\-\.\/\:\;\<\=\>\@\^\|_\?]+/,intSuffixes:/[iu](8|16|32|64|128|size)/,floatSuffixes:/f(32|64)/,tokenizer:{root:[[/r(#*)"/,{token:"string.quote",bracket:"@open",next:"@stringraw.$1"}],[/[a-zA-Z][a-zA-Z0-9_]*!?|_[a-zA-Z0-9_]+/,{cases:{"@typeKeywords":"keyword.type","@keywords":"keyword","@supportConstants":"keyword","@supportMacros":"keyword","@constants":"keyword","@default":"identifier"}}],[/\$/,"identifier"],[/'[a-zA-Z_][a-zA-Z0-9_]*(?=[^\'])/,"identifier"],[/'(\S|@escapes)'/,"string.byteliteral"],[/"/,{token:"string.quote",bracket:"@open",next:"@string"}],{include:"@numbers"},{include:"@whitespace"},[/@delimiters/,{cases:{"@keywords":"keyword","@default":"delimiter"}}],[/[{}()\[\]<>]/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":""}}]],whitespace:[[/[ \t\r\n]+/,"white"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\/\*/,"comment","@push"],["\\*/","comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],stringraw:[[/[^"#]+/,{token:"string"}],[/"(#*)/,{cases:{"$1==$S2":{token:"string.quote",bracket:"@close",next:"@pop"},"@default":{token:"string"}}}],[/["#]/,{token:"string"}]],numbers:[[/(0o[0-7_]+)(@intSuffixes)?/,{token:"number"}],[/(0b[0-1_]+)(@intSuffixes)?/,{token:"number"}],[/[\d][\d_]*(\.[\d][\d_]*)?[eE][+-][\d_]+(@floatSuffixes)?/,{token:"number"}],[/\b(\d\.?[\d_]*)(@floatSuffixes)?\b/,{token:"number"}],[/(0x[\da-fA-F]+)_?(@intSuffixes)?/,{token:"number"}],[/[\d][\d_]*(@intSuffixes?)?/,{token:"number"}]]}};e.conf=t,e.language=n,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/sb-3GYllVck.js b/emrg/gui/vendor/monaco/vs/sb-3GYllVck.js new file mode 100644 index 00000000..2273462f --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/sb-3GYllVck.js @@ -0,0 +1 @@ +define("vs/sb-3GYllVck",["exports"],(function(e){"use strict";const o={comments:{lineComment:"'"},brackets:[["(",")"],["[","]"],["If","EndIf"],["While","EndWhile"],["For","EndFor"],["Sub","EndSub"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]}]},n={defaultToken:"",tokenPostfix:".sb",ignoreCase:!0,brackets:[{token:"delimiter.array",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"keyword.tag-if",open:"If",close:"EndIf"},{token:"keyword.tag-while",open:"While",close:"EndWhile"},{token:"keyword.tag-for",open:"For",close:"EndFor"},{token:"keyword.tag-sub",open:"Sub",close:"EndSub"}],keywords:["Else","ElseIf","EndFor","EndIf","EndSub","EndWhile","For","Goto","If","Step","Sub","Then","To","While"],tagwords:["If","Sub","While","For"],operators:[">","<","<>","<=",">=","And","Or","+","-","*","/","="],identifier:/[a-zA-Z_][\w]*/,symbols:/[=><:+\-*\/%\.,]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[{include:"@whitespace"},[/(@identifier)(?=[.])/,"type"],[/@identifier/,{cases:{"@keywords":{token:"keyword.$0"},"@operators":"operator","@default":"variable.name"}}],[/([.])(@identifier)/,{cases:{$2:["delimiter","type.member"],"@default":""}}],[/\d*\.\d+/,"number.float"],[/\d+/,"number"],[/[()\[\]]/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":"delimiter"}}],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"]],whitespace:[[/[ \t\r\n]+/,""],[/(\').*$/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"C?/,"string","@pop"]]}};e.conf=o,e.language=n,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/scala-foMgrKo1.js b/emrg/gui/vendor/monaco/vs/scala-foMgrKo1.js new file mode 100644 index 00000000..abc494ef --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/scala-foMgrKo1.js @@ -0,0 +1 @@ +define("vs/scala-foMgrKo1",["exports"],(function(e){"use strict";const t={wordPattern:/(unary_[@~!#%^&*()\-=+\\|:<>\/?]+)|([a-zA-Z_$][\w$]*?_=)|(`[^`]+`)|([a-zA-Z_$][\w$]*)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:))")}}},o={tokenPostfix:".scala",keywords:["asInstanceOf","catch","class","classOf","def","do","else","extends","finally","for","foreach","forSome","if","import","isInstanceOf","macro","match","new","object","package","return","throw","trait","try","type","until","val","var","while","with","yield","given","enum","then"],softKeywords:["as","export","extension","end","derives","on"],constants:["true","false","null","this","super"],modifiers:["abstract","final","implicit","lazy","override","private","protected","sealed"],softModifiers:["inline","opaque","open","transparent","using"],name:/(?:[a-z_$][\w$]*|`[^`]+`)/,type:/(?:[A-Z][\w$]*)/,symbols:/[=>))/,["@brackets","white","variable"]],[/@name/,{cases:{"@keywords":"keyword","@softKeywords":"keyword","@modifiers":"keyword.modifier","@softModifiers":"keyword.modifier","@constants":{token:"constant",next:"@allowMethod"},"@default":{token:"identifier",next:"@allowMethod"}}}],[/@type/,"type","@allowMethod"],{include:"@whitespace"},[/@[a-zA-Z_$][\w$]*(?:\.[a-zA-Z_$][\w$]*)*/,"annotation"],[/[{(]/,"@brackets"],[/[})]/,"@brackets","@allowMethod"],[/\[/,"operator.square"],[/](?!\s*(?:va[rl]|def|type)\b)/,"operator.square","@allowMethod"],[/]/,"operator.square"],[/([=-]>|<-|>:|<:|:>|<%)(?=[\s\w()[\]{},\."'`])/,"keyword"],[/@symbols/,"operator"],[/[;,\.]/,"delimiter"],[/'[a-zA-Z$][\w$]*(?!')/,"attribute.name"],[/'[^\\']'/,"string","@allowMethod"],[/(')(@escapes)(')/,["string","string.escape",{token:"string",next:"@allowMethod"}]],[/'/,"string.invalid"]],import:[[/;/,"delimiter","@pop"],[/^|$/,"","@pop"],[/[ \t]+/,"white"],[/[\n\r]+/,"white","@pop"],[/\/\*/,"comment","@comment"],[/@name|@type/,"type"],[/[(){}]/,"@brackets"],[/[[\]]/,"operator.square"],[/[\.,]/,"delimiter"]],allowMethod:[[/^|$/,"","@pop"],[/[ \t]+/,"white"],[/[\n\r]+/,"white","@pop"],[/\/\*/,"comment","@comment"],[/(?==>[\s\w([{])/,"keyword","@pop"],[/(@name|@symbols)(?=[ \t]*[[({"'`]|[ \t]+(?:[+-]?\.?\d|\w))/,{cases:{"@keywords":{token:"keyword",next:"@pop"},"->|<-|>:|<:|<%":{token:"keyword",next:"@pop"},"@default":{token:"@rematch",next:"@pop"}}}],["","","@pop"]],comment:[[/[^\/*]+/,"comment"],[/\/\*/,"comment","@push"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],case:[[/\b_\*/,"key"],[/\b(_|true|false|null|this|super)\b/,"keyword","@allowMethod"],[/\bif\b|=>/,"keyword","@pop"],[/`[^`]+`/,"identifier","@allowMethod"],[/@name/,"variable","@allowMethod"],[/:::?|\||@(?![a-z_$])/,"keyword"],{include:"@root"}],vardef:[[/\b_\*/,"key"],[/\b(_|true|false|null|this|super)\b/,"keyword"],[/@name/,"variable"],[/:::?|\||@(?![a-z_$])/,"keyword"],[/=|:(?!:)/,"operator","@pop"],[/$/,"white","@pop"],{include:"@root"}],string:[[/[^\\"\n\r]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}]],stringt:[[/[^\\"\n\r]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"(?=""")/,"string"],[/"""/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/"/,"string"]],fstring:[[/@escapes/,"string.escape"],[/"/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/\$\$/,"string"],[/(\$)([a-z_]\w*)/,["operator","identifier"]],[/\$\{/,"operator","@interp"],[/%%/,"string"],[/(%)([\-#+ 0,(])(\d+|\.\d+|\d+\.\d+)(@fstring_conv)/,["metatag","keyword.modifier","number","metatag"]],[/(%)(\d+|\.\d+|\d+\.\d+)(@fstring_conv)/,["metatag","number","metatag"]],[/(%)([\-#+ 0,(])(@fstring_conv)/,["metatag","keyword.modifier","metatag"]],[/(%)(@fstring_conv)/,["metatag","metatag"]],[/./,"string"]],fstringt:[[/@escapes/,"string.escape"],[/"(?=""")/,"string"],[/"""/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/\$\$/,"string"],[/(\$)([a-z_]\w*)/,["operator","identifier"]],[/\$\{/,"operator","@interp"],[/%%/,"string"],[/(%)([\-#+ 0,(])(\d+|\.\d+|\d+\.\d+)(@fstring_conv)/,["metatag","keyword.modifier","number","metatag"]],[/(%)(\d+|\.\d+|\d+\.\d+)(@fstring_conv)/,["metatag","number","metatag"]],[/(%)([\-#+ 0,(])(@fstring_conv)/,["metatag","keyword.modifier","metatag"]],[/(%)(@fstring_conv)/,["metatag","metatag"]],[/./,"string"]],sstring:[[/@escapes/,"string.escape"],[/"/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/\$\$/,"string"],[/(\$)([a-z_]\w*)/,["operator","identifier"]],[/\$\{/,"operator","@interp"],[/./,"string"]],sstringt:[[/@escapes/,"string.escape"],[/"(?=""")/,"string"],[/"""/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/\$\$/,"string"],[/(\$)([a-z_]\w*)/,["operator","identifier"]],[/\$\{/,"operator","@interp"],[/./,"string"]],interp:[[/{/,"operator","@push"],[/}/,"operator","@pop"],{include:"@root"}],rawstring:[[/[^"]/,"string"],[/"/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}]],rawstringt:[[/[^"]/,"string"],[/"(?=""")/,"string"],[/"""/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/"/,"string"]],whitespace:[[/[ \t\r\n]+/,"white"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]]}};e.conf=t,e.language=o,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/scheme-CHdMtr7p.js b/emrg/gui/vendor/monaco/vs/scheme-CHdMtr7p.js new file mode 100644 index 00000000..bec21838 --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/scheme-CHdMtr7p.js @@ -0,0 +1 @@ +define("vs/scheme-CHdMtr7p",["exports"],(function(e){"use strict";const o={comments:{lineComment:";",blockComment:["#|","|#"]},brackets:[["(",")"],["{","}"],["[","]"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}]},n={defaultToken:"",ignoreCase:!0,tokenPostfix:".scheme",brackets:[{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"}],keywords:["case","do","let","loop","if","else","when","cons","car","cdr","cond","lambda","lambda*","syntax-rules","format","set!","quote","eval","append","list","list?","member?","load"],constants:["#t","#f"],operators:["eq?","eqv?","equal?","and","or","not","null?"],tokenizer:{root:[[/#[xXoObB][0-9a-fA-F]+/,"number.hex"],[/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?/,"number.float"],[/(?:\b(?:(define|define-syntax|define-macro))\b)(\s+)((?:\w|\-|\!|\?)*)/,["keyword","white","variable"]],{include:"@whitespace"},{include:"@strings"},[/[a-zA-Z_#][a-zA-Z0-9_\-\?\!\*]*/,{cases:{"@keywords":"keyword","@constants":"constant","@operators":"operators","@default":"identifier"}}]],comment:[[/[^\|#]+/,"comment"],[/#\|/,"comment","@push"],[/\|#/,"comment","@pop"],[/[\|#]/,"comment"]],whitespace:[[/[ \t\r\n]+/,"white"],[/#\|/,"comment","@comment"],[/;.*$/,"comment"]],strings:[[/"$/,"string","@popall"],[/"(?=.)/,"string","@multiLineString"]],multiLineString:[[/[^\\"]+$/,"string","@popall"],[/[^\\"]+/,"string"],[/\\./,"string.escape"],[/"/,"string","@popall"],[/\\$/,"string"]]}};e.conf=o,e.language=n,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/scss-C1cmLt9V.js b/emrg/gui/vendor/monaco/vs/scss-C1cmLt9V.js new file mode 100644 index 00000000..40156e95 --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/scss-C1cmLt9V.js @@ -0,0 +1,3 @@ +define("vs/scss-C1cmLt9V",["exports"],(function(e){"use strict";const t={wordPattern:/(#?-?\d*\.\d\w*%?)|([@$#!.:]?[\w-?]+%?)|[@#!.]/g,comments:{blockComment:["/*","*/"],lineComment:"//"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),end:new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")}}},n={defaultToken:"",tokenPostfix:".scss",ws:`[ +\r\f]*`,identifier:"-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{root:[{include:"@selector"}],selector:[{include:"@comments"},{include:"@import"},{include:"@variabledeclaration"},{include:"@warndebug"},["[@](include)",{token:"keyword",next:"@includedeclaration"}],["[@](keyframes|-webkit-keyframes|-moz-keyframes|-o-keyframes)",{token:"keyword",next:"@keyframedeclaration"}],["[@](page|content|font-face|-moz-document)",{token:"keyword"}],["[@](charset|namespace)",{token:"keyword",next:"@declarationbody"}],["[@](function)",{token:"keyword",next:"@functiondeclaration"}],["[@](mixin)",{token:"keyword",next:"@mixindeclaration"}],["url(\\-prefix)?\\(",{token:"meta",next:"@urldeclaration"}],{include:"@controlstatement"},{include:"@selectorname"},["[&\\*]","tag"],["[>\\+,]","delimiter"],["\\[",{token:"delimiter.bracket",next:"@selectorattribute"}],["{",{token:"delimiter.curly",next:"@selectorbody"}]],selectorbody:[["[*_]?@identifier@ws:(?=(\\s|\\d|[^{;}]*[;}]))","attribute.name","@rulevalue"],{include:"@selector"},["[@](extend)",{token:"keyword",next:"@extendbody"}],["[@](return)",{token:"keyword",next:"@declarationbody"}],["}",{token:"delimiter.curly",next:"@pop"}]],selectorname:[["#{",{token:"meta",next:"@variableinterpolation"}],["(\\.|#(?=[^{])|%|(@identifier)|:)+","tag"]],selectorattribute:[{include:"@term"},["]",{token:"delimiter.bracket",next:"@pop"}]],term:[{include:"@comments"},["url(\\-prefix)?\\(",{token:"meta",next:"@urldeclaration"}],{include:"@functioninvocation"},{include:"@numbers"},{include:"@strings"},{include:"@variablereference"},["(and\\b|or\\b|not\\b)","operator"],{include:"@name"},["([<>=\\+\\-\\*\\/\\^\\|\\~,])","operator"],[",","delimiter"],["!default","literal"],["\\(",{token:"delimiter.parenthesis",next:"@parenthizedterm"}]],rulevalue:[{include:"@term"},["!important","literal"],[";","delimiter","@pop"],["{",{token:"delimiter.curly",switchTo:"@nestedproperty"}],["(?=})",{token:"",next:"@pop"}]],nestedproperty:[["[*_]?@identifier@ws:","attribute.name","@rulevalue"],{include:"@comments"},["}",{token:"delimiter.curly",next:"@pop"}]],warndebug:[["[@](warn|debug)",{token:"keyword",next:"@declarationbody"}]],import:[["[@](import)",{token:"keyword",next:"@declarationbody"}]],variabledeclaration:[["\\$@identifier@ws:","variable.decl","@declarationbody"]],urldeclaration:[{include:"@strings"},[`[^)\r +]+`,"string"],["\\)",{token:"meta",next:"@pop"}]],parenthizedterm:[{include:"@term"},["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],declarationbody:[{include:"@term"},[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],extendbody:[{include:"@selectorname"},["!optional","literal"],[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],variablereference:[["\\$@identifier","variable.ref"],["\\.\\.\\.","operator"],["#{",{token:"meta",next:"@variableinterpolation"}]],variableinterpolation:[{include:"@variablereference"},["}",{token:"meta",next:"@pop"}]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[".","comment"]],name:[["@identifier","attribute.value"]],numbers:[["(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?",{token:"number",next:"@units"}],["#[0-9a-fA-F_]+(?!\\w)","number.hex"]],units:[["(em|ex|ch|rem|fr|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?","number","@pop"]],functiondeclaration:[["@identifier@ws\\(",{token:"meta",next:"@parameterdeclaration"}],["{",{token:"delimiter.curly",switchTo:"@functionbody"}]],mixindeclaration:[["@identifier@ws\\(",{token:"meta",next:"@parameterdeclaration"}],["@identifier","meta"],["{",{token:"delimiter.curly",switchTo:"@selectorbody"}]],parameterdeclaration:[["\\$@identifier@ws:","variable.decl"],["\\.\\.\\.","operator"],[",","delimiter"],{include:"@term"},["\\)",{token:"meta",next:"@pop"}]],includedeclaration:[{include:"@functioninvocation"},["@identifier","meta"],[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}],["{",{token:"delimiter.curly",switchTo:"@selectorbody"}]],keyframedeclaration:[["@identifier","meta"],["{",{token:"delimiter.curly",switchTo:"@keyframebody"}]],keyframebody:[{include:"@term"},["{",{token:"delimiter.curly",next:"@selectorbody"}],["}",{token:"delimiter.curly",next:"@pop"}]],controlstatement:[["[@](if|else|for|while|each|media)",{token:"keyword.flow",next:"@controlstatementdeclaration"}]],controlstatementdeclaration:[["(in|from|through|if|to)\\b",{token:"keyword.flow"}],{include:"@term"},["{",{token:"delimiter.curly",switchTo:"@selectorbody"}]],functionbody:[["[@](return)",{token:"keyword"}],{include:"@variabledeclaration"},{include:"@term"},{include:"@controlstatement"},[";","delimiter"],["}",{token:"delimiter.curly",next:"@pop"}]],functioninvocation:[["@identifier\\(",{token:"meta",next:"@functionarguments"}]],functionarguments:[["\\$@identifier@ws:","attribute.name"],["[,]","delimiter"],{include:"@term"},["\\)",{token:"meta",next:"@pop"}]],strings:[['~?"',{token:"string.delimiter",next:"@stringenddoublequote"}],["~?'",{token:"string.delimiter",next:"@stringendquote"}]],stringenddoublequote:[["\\\\.","string"],['"',{token:"string.delimiter",next:"@pop"}],[".","string"]],stringendquote:[["\\\\.","string"],["'",{token:"string.delimiter",next:"@pop"}],[".","string"]]}};e.conf=t,e.language=n,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/shell-ClXCKCEW.js b/emrg/gui/vendor/monaco/vs/shell-ClXCKCEW.js new file mode 100644 index 00000000..7a383133 --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/shell-ClXCKCEW.js @@ -0,0 +1 @@ +define("vs/shell-ClXCKCEW",["exports"],(function(e){"use strict";const r={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}]},t={defaultToken:"",ignoreCase:!0,tokenPostfix:".shell",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["if","then","do","else","elif","while","until","for","in","esac","fi","fin","fil","done","exit","set","unset","export","function"],builtins:["ab","awk","bash","beep","cat","cc","cd","chown","chmod","chroot","clear","cp","curl","cut","diff","echo","find","gawk","gcc","get","git","grep","hg","kill","killall","ln","ls","make","mkdir","openssl","mv","nc","node","npm","ping","ps","restart","rm","rmdir","sed","service","sh","shopt","shred","source","sort","sleep","ssh","start","stop","su","sudo","svn","tee","telnet","top","touch","vi","vim","wall","wc","wget","who","write","yes","zsh"],startingWithDash:/\-+\w+/,identifiersWithDashes:/[a-zA-Z]\w+(?:@startingWithDash)+/,symbols:/[=>"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]}]},i={defaultToken:"",tokenPostfix:".sol",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"},{token:"delimiter.angle",open:"<",close:">"}],keywords:["pragma","solidity","contract","library","using","struct","function","modifier","constructor","address","string","bool","Int","Uint","Byte","Fixed","Ufixed","int","int8","int16","int24","int32","int40","int48","int56","int64","int72","int80","int88","int96","int104","int112","int120","int128","int136","int144","int152","int160","int168","int176","int184","int192","int200","int208","int216","int224","int232","int240","int248","int256","uint","uint8","uint16","uint24","uint32","uint40","uint48","uint56","uint64","uint72","uint80","uint88","uint96","uint104","uint112","uint120","uint128","uint136","uint144","uint152","uint160","uint168","uint176","uint184","uint192","uint200","uint208","uint216","uint224","uint232","uint240","uint248","uint256","byte","bytes","bytes1","bytes2","bytes3","bytes4","bytes5","bytes6","bytes7","bytes8","bytes9","bytes10","bytes11","bytes12","bytes13","bytes14","bytes15","bytes16","bytes17","bytes18","bytes19","bytes20","bytes21","bytes22","bytes23","bytes24","bytes25","bytes26","bytes27","bytes28","bytes29","bytes30","bytes31","bytes32","fixed","fixed0x8","fixed0x16","fixed0x24","fixed0x32","fixed0x40","fixed0x48","fixed0x56","fixed0x64","fixed0x72","fixed0x80","fixed0x88","fixed0x96","fixed0x104","fixed0x112","fixed0x120","fixed0x128","fixed0x136","fixed0x144","fixed0x152","fixed0x160","fixed0x168","fixed0x176","fixed0x184","fixed0x192","fixed0x200","fixed0x208","fixed0x216","fixed0x224","fixed0x232","fixed0x240","fixed0x248","fixed0x256","fixed8x8","fixed8x16","fixed8x24","fixed8x32","fixed8x40","fixed8x48","fixed8x56","fixed8x64","fixed8x72","fixed8x80","fixed8x88","fixed8x96","fixed8x104","fixed8x112","fixed8x120","fixed8x128","fixed8x136","fixed8x144","fixed8x152","fixed8x160","fixed8x168","fixed8x176","fixed8x184","fixed8x192","fixed8x200","fixed8x208","fixed8x216","fixed8x224","fixed8x232","fixed8x240","fixed8x248","fixed16x8","fixed16x16","fixed16x24","fixed16x32","fixed16x40","fixed16x48","fixed16x56","fixed16x64","fixed16x72","fixed16x80","fixed16x88","fixed16x96","fixed16x104","fixed16x112","fixed16x120","fixed16x128","fixed16x136","fixed16x144","fixed16x152","fixed16x160","fixed16x168","fixed16x176","fixed16x184","fixed16x192","fixed16x200","fixed16x208","fixed16x216","fixed16x224","fixed16x232","fixed16x240","fixed24x8","fixed24x16","fixed24x24","fixed24x32","fixed24x40","fixed24x48","fixed24x56","fixed24x64","fixed24x72","fixed24x80","fixed24x88","fixed24x96","fixed24x104","fixed24x112","fixed24x120","fixed24x128","fixed24x136","fixed24x144","fixed24x152","fixed24x160","fixed24x168","fixed24x176","fixed24x184","fixed24x192","fixed24x200","fixed24x208","fixed24x216","fixed24x224","fixed24x232","fixed32x8","fixed32x16","fixed32x24","fixed32x32","fixed32x40","fixed32x48","fixed32x56","fixed32x64","fixed32x72","fixed32x80","fixed32x88","fixed32x96","fixed32x104","fixed32x112","fixed32x120","fixed32x128","fixed32x136","fixed32x144","fixed32x152","fixed32x160","fixed32x168","fixed32x176","fixed32x184","fixed32x192","fixed32x200","fixed32x208","fixed32x216","fixed32x224","fixed40x8","fixed40x16","fixed40x24","fixed40x32","fixed40x40","fixed40x48","fixed40x56","fixed40x64","fixed40x72","fixed40x80","fixed40x88","fixed40x96","fixed40x104","fixed40x112","fixed40x120","fixed40x128","fixed40x136","fixed40x144","fixed40x152","fixed40x160","fixed40x168","fixed40x176","fixed40x184","fixed40x192","fixed40x200","fixed40x208","fixed40x216","fixed48x8","fixed48x16","fixed48x24","fixed48x32","fixed48x40","fixed48x48","fixed48x56","fixed48x64","fixed48x72","fixed48x80","fixed48x88","fixed48x96","fixed48x104","fixed48x112","fixed48x120","fixed48x128","fixed48x136","fixed48x144","fixed48x152","fixed48x160","fixed48x168","fixed48x176","fixed48x184","fixed48x192","fixed48x200","fixed48x208","fixed56x8","fixed56x16","fixed56x24","fixed56x32","fixed56x40","fixed56x48","fixed56x56","fixed56x64","fixed56x72","fixed56x80","fixed56x88","fixed56x96","fixed56x104","fixed56x112","fixed56x120","fixed56x128","fixed56x136","fixed56x144","fixed56x152","fixed56x160","fixed56x168","fixed56x176","fixed56x184","fixed56x192","fixed56x200","fixed64x8","fixed64x16","fixed64x24","fixed64x32","fixed64x40","fixed64x48","fixed64x56","fixed64x64","fixed64x72","fixed64x80","fixed64x88","fixed64x96","fixed64x104","fixed64x112","fixed64x120","fixed64x128","fixed64x136","fixed64x144","fixed64x152","fixed64x160","fixed64x168","fixed64x176","fixed64x184","fixed64x192","fixed72x8","fixed72x16","fixed72x24","fixed72x32","fixed72x40","fixed72x48","fixed72x56","fixed72x64","fixed72x72","fixed72x80","fixed72x88","fixed72x96","fixed72x104","fixed72x112","fixed72x120","fixed72x128","fixed72x136","fixed72x144","fixed72x152","fixed72x160","fixed72x168","fixed72x176","fixed72x184","fixed80x8","fixed80x16","fixed80x24","fixed80x32","fixed80x40","fixed80x48","fixed80x56","fixed80x64","fixed80x72","fixed80x80","fixed80x88","fixed80x96","fixed80x104","fixed80x112","fixed80x120","fixed80x128","fixed80x136","fixed80x144","fixed80x152","fixed80x160","fixed80x168","fixed80x176","fixed88x8","fixed88x16","fixed88x24","fixed88x32","fixed88x40","fixed88x48","fixed88x56","fixed88x64","fixed88x72","fixed88x80","fixed88x88","fixed88x96","fixed88x104","fixed88x112","fixed88x120","fixed88x128","fixed88x136","fixed88x144","fixed88x152","fixed88x160","fixed88x168","fixed96x8","fixed96x16","fixed96x24","fixed96x32","fixed96x40","fixed96x48","fixed96x56","fixed96x64","fixed96x72","fixed96x80","fixed96x88","fixed96x96","fixed96x104","fixed96x112","fixed96x120","fixed96x128","fixed96x136","fixed96x144","fixed96x152","fixed96x160","fixed104x8","fixed104x16","fixed104x24","fixed104x32","fixed104x40","fixed104x48","fixed104x56","fixed104x64","fixed104x72","fixed104x80","fixed104x88","fixed104x96","fixed104x104","fixed104x112","fixed104x120","fixed104x128","fixed104x136","fixed104x144","fixed104x152","fixed112x8","fixed112x16","fixed112x24","fixed112x32","fixed112x40","fixed112x48","fixed112x56","fixed112x64","fixed112x72","fixed112x80","fixed112x88","fixed112x96","fixed112x104","fixed112x112","fixed112x120","fixed112x128","fixed112x136","fixed112x144","fixed120x8","fixed120x16","fixed120x24","fixed120x32","fixed120x40","fixed120x48","fixed120x56","fixed120x64","fixed120x72","fixed120x80","fixed120x88","fixed120x96","fixed120x104","fixed120x112","fixed120x120","fixed120x128","fixed120x136","fixed128x8","fixed128x16","fixed128x24","fixed128x32","fixed128x40","fixed128x48","fixed128x56","fixed128x64","fixed128x72","fixed128x80","fixed128x88","fixed128x96","fixed128x104","fixed128x112","fixed128x120","fixed128x128","fixed136x8","fixed136x16","fixed136x24","fixed136x32","fixed136x40","fixed136x48","fixed136x56","fixed136x64","fixed136x72","fixed136x80","fixed136x88","fixed136x96","fixed136x104","fixed136x112","fixed136x120","fixed144x8","fixed144x16","fixed144x24","fixed144x32","fixed144x40","fixed144x48","fixed144x56","fixed144x64","fixed144x72","fixed144x80","fixed144x88","fixed144x96","fixed144x104","fixed144x112","fixed152x8","fixed152x16","fixed152x24","fixed152x32","fixed152x40","fixed152x48","fixed152x56","fixed152x64","fixed152x72","fixed152x80","fixed152x88","fixed152x96","fixed152x104","fixed160x8","fixed160x16","fixed160x24","fixed160x32","fixed160x40","fixed160x48","fixed160x56","fixed160x64","fixed160x72","fixed160x80","fixed160x88","fixed160x96","fixed168x8","fixed168x16","fixed168x24","fixed168x32","fixed168x40","fixed168x48","fixed168x56","fixed168x64","fixed168x72","fixed168x80","fixed168x88","fixed176x8","fixed176x16","fixed176x24","fixed176x32","fixed176x40","fixed176x48","fixed176x56","fixed176x64","fixed176x72","fixed176x80","fixed184x8","fixed184x16","fixed184x24","fixed184x32","fixed184x40","fixed184x48","fixed184x56","fixed184x64","fixed184x72","fixed192x8","fixed192x16","fixed192x24","fixed192x32","fixed192x40","fixed192x48","fixed192x56","fixed192x64","fixed200x8","fixed200x16","fixed200x24","fixed200x32","fixed200x40","fixed200x48","fixed200x56","fixed208x8","fixed208x16","fixed208x24","fixed208x32","fixed208x40","fixed208x48","fixed216x8","fixed216x16","fixed216x24","fixed216x32","fixed216x40","fixed224x8","fixed224x16","fixed224x24","fixed224x32","fixed232x8","fixed232x16","fixed232x24","fixed240x8","fixed240x16","fixed248x8","ufixed","ufixed0x8","ufixed0x16","ufixed0x24","ufixed0x32","ufixed0x40","ufixed0x48","ufixed0x56","ufixed0x64","ufixed0x72","ufixed0x80","ufixed0x88","ufixed0x96","ufixed0x104","ufixed0x112","ufixed0x120","ufixed0x128","ufixed0x136","ufixed0x144","ufixed0x152","ufixed0x160","ufixed0x168","ufixed0x176","ufixed0x184","ufixed0x192","ufixed0x200","ufixed0x208","ufixed0x216","ufixed0x224","ufixed0x232","ufixed0x240","ufixed0x248","ufixed0x256","ufixed8x8","ufixed8x16","ufixed8x24","ufixed8x32","ufixed8x40","ufixed8x48","ufixed8x56","ufixed8x64","ufixed8x72","ufixed8x80","ufixed8x88","ufixed8x96","ufixed8x104","ufixed8x112","ufixed8x120","ufixed8x128","ufixed8x136","ufixed8x144","ufixed8x152","ufixed8x160","ufixed8x168","ufixed8x176","ufixed8x184","ufixed8x192","ufixed8x200","ufixed8x208","ufixed8x216","ufixed8x224","ufixed8x232","ufixed8x240","ufixed8x248","ufixed16x8","ufixed16x16","ufixed16x24","ufixed16x32","ufixed16x40","ufixed16x48","ufixed16x56","ufixed16x64","ufixed16x72","ufixed16x80","ufixed16x88","ufixed16x96","ufixed16x104","ufixed16x112","ufixed16x120","ufixed16x128","ufixed16x136","ufixed16x144","ufixed16x152","ufixed16x160","ufixed16x168","ufixed16x176","ufixed16x184","ufixed16x192","ufixed16x200","ufixed16x208","ufixed16x216","ufixed16x224","ufixed16x232","ufixed16x240","ufixed24x8","ufixed24x16","ufixed24x24","ufixed24x32","ufixed24x40","ufixed24x48","ufixed24x56","ufixed24x64","ufixed24x72","ufixed24x80","ufixed24x88","ufixed24x96","ufixed24x104","ufixed24x112","ufixed24x120","ufixed24x128","ufixed24x136","ufixed24x144","ufixed24x152","ufixed24x160","ufixed24x168","ufixed24x176","ufixed24x184","ufixed24x192","ufixed24x200","ufixed24x208","ufixed24x216","ufixed24x224","ufixed24x232","ufixed32x8","ufixed32x16","ufixed32x24","ufixed32x32","ufixed32x40","ufixed32x48","ufixed32x56","ufixed32x64","ufixed32x72","ufixed32x80","ufixed32x88","ufixed32x96","ufixed32x104","ufixed32x112","ufixed32x120","ufixed32x128","ufixed32x136","ufixed32x144","ufixed32x152","ufixed32x160","ufixed32x168","ufixed32x176","ufixed32x184","ufixed32x192","ufixed32x200","ufixed32x208","ufixed32x216","ufixed32x224","ufixed40x8","ufixed40x16","ufixed40x24","ufixed40x32","ufixed40x40","ufixed40x48","ufixed40x56","ufixed40x64","ufixed40x72","ufixed40x80","ufixed40x88","ufixed40x96","ufixed40x104","ufixed40x112","ufixed40x120","ufixed40x128","ufixed40x136","ufixed40x144","ufixed40x152","ufixed40x160","ufixed40x168","ufixed40x176","ufixed40x184","ufixed40x192","ufixed40x200","ufixed40x208","ufixed40x216","ufixed48x8","ufixed48x16","ufixed48x24","ufixed48x32","ufixed48x40","ufixed48x48","ufixed48x56","ufixed48x64","ufixed48x72","ufixed48x80","ufixed48x88","ufixed48x96","ufixed48x104","ufixed48x112","ufixed48x120","ufixed48x128","ufixed48x136","ufixed48x144","ufixed48x152","ufixed48x160","ufixed48x168","ufixed48x176","ufixed48x184","ufixed48x192","ufixed48x200","ufixed48x208","ufixed56x8","ufixed56x16","ufixed56x24","ufixed56x32","ufixed56x40","ufixed56x48","ufixed56x56","ufixed56x64","ufixed56x72","ufixed56x80","ufixed56x88","ufixed56x96","ufixed56x104","ufixed56x112","ufixed56x120","ufixed56x128","ufixed56x136","ufixed56x144","ufixed56x152","ufixed56x160","ufixed56x168","ufixed56x176","ufixed56x184","ufixed56x192","ufixed56x200","ufixed64x8","ufixed64x16","ufixed64x24","ufixed64x32","ufixed64x40","ufixed64x48","ufixed64x56","ufixed64x64","ufixed64x72","ufixed64x80","ufixed64x88","ufixed64x96","ufixed64x104","ufixed64x112","ufixed64x120","ufixed64x128","ufixed64x136","ufixed64x144","ufixed64x152","ufixed64x160","ufixed64x168","ufixed64x176","ufixed64x184","ufixed64x192","ufixed72x8","ufixed72x16","ufixed72x24","ufixed72x32","ufixed72x40","ufixed72x48","ufixed72x56","ufixed72x64","ufixed72x72","ufixed72x80","ufixed72x88","ufixed72x96","ufixed72x104","ufixed72x112","ufixed72x120","ufixed72x128","ufixed72x136","ufixed72x144","ufixed72x152","ufixed72x160","ufixed72x168","ufixed72x176","ufixed72x184","ufixed80x8","ufixed80x16","ufixed80x24","ufixed80x32","ufixed80x40","ufixed80x48","ufixed80x56","ufixed80x64","ufixed80x72","ufixed80x80","ufixed80x88","ufixed80x96","ufixed80x104","ufixed80x112","ufixed80x120","ufixed80x128","ufixed80x136","ufixed80x144","ufixed80x152","ufixed80x160","ufixed80x168","ufixed80x176","ufixed88x8","ufixed88x16","ufixed88x24","ufixed88x32","ufixed88x40","ufixed88x48","ufixed88x56","ufixed88x64","ufixed88x72","ufixed88x80","ufixed88x88","ufixed88x96","ufixed88x104","ufixed88x112","ufixed88x120","ufixed88x128","ufixed88x136","ufixed88x144","ufixed88x152","ufixed88x160","ufixed88x168","ufixed96x8","ufixed96x16","ufixed96x24","ufixed96x32","ufixed96x40","ufixed96x48","ufixed96x56","ufixed96x64","ufixed96x72","ufixed96x80","ufixed96x88","ufixed96x96","ufixed96x104","ufixed96x112","ufixed96x120","ufixed96x128","ufixed96x136","ufixed96x144","ufixed96x152","ufixed96x160","ufixed104x8","ufixed104x16","ufixed104x24","ufixed104x32","ufixed104x40","ufixed104x48","ufixed104x56","ufixed104x64","ufixed104x72","ufixed104x80","ufixed104x88","ufixed104x96","ufixed104x104","ufixed104x112","ufixed104x120","ufixed104x128","ufixed104x136","ufixed104x144","ufixed104x152","ufixed112x8","ufixed112x16","ufixed112x24","ufixed112x32","ufixed112x40","ufixed112x48","ufixed112x56","ufixed112x64","ufixed112x72","ufixed112x80","ufixed112x88","ufixed112x96","ufixed112x104","ufixed112x112","ufixed112x120","ufixed112x128","ufixed112x136","ufixed112x144","ufixed120x8","ufixed120x16","ufixed120x24","ufixed120x32","ufixed120x40","ufixed120x48","ufixed120x56","ufixed120x64","ufixed120x72","ufixed120x80","ufixed120x88","ufixed120x96","ufixed120x104","ufixed120x112","ufixed120x120","ufixed120x128","ufixed120x136","ufixed128x8","ufixed128x16","ufixed128x24","ufixed128x32","ufixed128x40","ufixed128x48","ufixed128x56","ufixed128x64","ufixed128x72","ufixed128x80","ufixed128x88","ufixed128x96","ufixed128x104","ufixed128x112","ufixed128x120","ufixed128x128","ufixed136x8","ufixed136x16","ufixed136x24","ufixed136x32","ufixed136x40","ufixed136x48","ufixed136x56","ufixed136x64","ufixed136x72","ufixed136x80","ufixed136x88","ufixed136x96","ufixed136x104","ufixed136x112","ufixed136x120","ufixed144x8","ufixed144x16","ufixed144x24","ufixed144x32","ufixed144x40","ufixed144x48","ufixed144x56","ufixed144x64","ufixed144x72","ufixed144x80","ufixed144x88","ufixed144x96","ufixed144x104","ufixed144x112","ufixed152x8","ufixed152x16","ufixed152x24","ufixed152x32","ufixed152x40","ufixed152x48","ufixed152x56","ufixed152x64","ufixed152x72","ufixed152x80","ufixed152x88","ufixed152x96","ufixed152x104","ufixed160x8","ufixed160x16","ufixed160x24","ufixed160x32","ufixed160x40","ufixed160x48","ufixed160x56","ufixed160x64","ufixed160x72","ufixed160x80","ufixed160x88","ufixed160x96","ufixed168x8","ufixed168x16","ufixed168x24","ufixed168x32","ufixed168x40","ufixed168x48","ufixed168x56","ufixed168x64","ufixed168x72","ufixed168x80","ufixed168x88","ufixed176x8","ufixed176x16","ufixed176x24","ufixed176x32","ufixed176x40","ufixed176x48","ufixed176x56","ufixed176x64","ufixed176x72","ufixed176x80","ufixed184x8","ufixed184x16","ufixed184x24","ufixed184x32","ufixed184x40","ufixed184x48","ufixed184x56","ufixed184x64","ufixed184x72","ufixed192x8","ufixed192x16","ufixed192x24","ufixed192x32","ufixed192x40","ufixed192x48","ufixed192x56","ufixed192x64","ufixed200x8","ufixed200x16","ufixed200x24","ufixed200x32","ufixed200x40","ufixed200x48","ufixed200x56","ufixed208x8","ufixed208x16","ufixed208x24","ufixed208x32","ufixed208x40","ufixed208x48","ufixed216x8","ufixed216x16","ufixed216x24","ufixed216x32","ufixed216x40","ufixed224x8","ufixed224x16","ufixed224x24","ufixed224x32","ufixed232x8","ufixed232x16","ufixed232x24","ufixed240x8","ufixed240x16","ufixed248x8","event","enum","let","mapping","private","public","external","inherited","payable","true","false","var","import","constant","if","else","for","else","for","while","do","break","continue","throw","returns","return","suicide","new","is","this","super"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/,"number.float"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F](@integersuffix)/,"number.hex"],[/0[0-7']*[0-7](@integersuffix)/,"number.octal"],[/0[bB][0-1']*[0-1](@integersuffix)/,"number.binary"],[/\d[\d']*\d(@integersuffix)/,"number"],[/\d(@integersuffix)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@doccomment"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],doccomment:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]]}};x.conf=e,x.language=i,Object.defineProperty(x,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/sophia-DWkuSsPQ.js b/emrg/gui/vendor/monaco/vs/sophia-DWkuSsPQ.js new file mode 100644 index 00000000..9a67fff2 --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/sophia-DWkuSsPQ.js @@ -0,0 +1 @@ +define("vs/sophia-DWkuSsPQ",["exports"],(function(e){"use strict";const t={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]}]},n={defaultToken:"",tokenPostfix:".aes",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"},{token:"delimiter.angle",open:"<",close:">"}],keywords:["contract","library","entrypoint","function","stateful","state","hash","signature","tuple","list","address","string","bool","int","record","datatype","type","option","oracle","oracle_query","Call","Bits","Bytes","Oracle","String","Crypto","Address","Auth","Chain","None","Some","bits","bytes","event","let","map","private","public","true","false","var","if","else","throw"],operators:["=",">","<","!","~","?","::",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/,"number.float"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F](@integersuffix)/,"number.hex"],[/0[0-7']*[0-7](@integersuffix)/,"number.octal"],[/0[bB][0-1']*[0-1](@integersuffix)/,"number.binary"],[/\d[\d']*\d(@integersuffix)/,"number"],[/\d(@integersuffix)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@doccomment"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],doccomment:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]]}};e.conf=t,e.language=n,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/sparql-AUGFYSyk.js b/emrg/gui/vendor/monaco/vs/sparql-AUGFYSyk.js new file mode 100644 index 00000000..50808a77 --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/sparql-AUGFYSyk.js @@ -0,0 +1 @@ +define("vs/sparql-AUGFYSyk",["exports"],(function(e){"use strict";const s={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"'",close:"'",notIn:["string"]},{open:'"',close:'"',notIn:["string"]},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"}]},t={defaultToken:"",tokenPostfix:".rq",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"},{token:"delimiter.angle",open:"<",close:">"}],keywords:["add","as","asc","ask","base","by","clear","construct","copy","create","data","delete","desc","describe","distinct","drop","false","filter","from","graph","group","having","in","insert","limit","load","minus","move","named","not","offset","optional","order","prefix","reduced","select","service","silent","to","true","undef","union","using","values","where","with"],builtinFunctions:["a","abs","avg","bind","bnode","bound","ceil","coalesce","concat","contains","count","datatype","day","encode_for_uri","exists","floor","group_concat","hours","if","iri","isblank","isiri","isliteral","isnumeric","isuri","lang","langmatches","lcase","max","md5","min","minutes","month","now","rand","regex","replace","round","sameterm","sample","seconds","sha1","sha256","sha384","sha512","str","strafter","strbefore","strdt","strends","strlang","strlen","strstarts","struuid","substr","sum","timezone","tz","ucase","uri","uuid","year"],ignoreCase:!0,tokenizer:{root:[[/<[^\s\u00a0>]*>?/,"tag"],{include:"@strings"},[/#.*/,"comment"],[/[{}()\[\]]/,"@brackets"],[/[;,.]/,"delimiter"],[/[_\w\d]+:(\.(?=[\w_\-\\%])|[:\w_-]|\\[-\\_~.!$&'()*+,;=/?#@%]|%[a-f\d][a-f\d])*/,"tag"],[/:(\.(?=[\w_\-\\%])|[:\w_-]|\\[-\\_~.!$&'()*+,;=/?#@%]|%[a-f\d][a-f\d])+/,"tag"],[/[$?]?[_\w\d]+/,{cases:{"@keywords":{token:"keyword"},"@builtinFunctions":{token:"predefined.sql"},"@default":"identifier"}}],[/\^\^/,"operator.sql"],[/\^[*+\-<>=&|^\/!?]*/,"operator.sql"],[/[*+\-<>=&|\/!?]/,"operator.sql"],[/@[a-z\d\-]*/,"metatag.html"],[/\s+/,"white"]],strings:[[/'([^'\\]|\\.)*$/,"string.invalid"],[/'$/,"string.sql","@pop"],[/'/,"string.sql","@stringBody"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"$/,"string.sql","@pop"],[/"/,"string.sql","@dblStringBody"]],stringBody:[[/[^\\']+/,"string.sql"],[/\\./,"string.escape"],[/'/,"string.sql","@pop"]],dblStringBody:[[/[^\\"]+/,"string.sql"],[/\\./,"string.escape"],[/"/,"string.sql","@pop"]]}};e.conf=s,e.language=t,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/sql-32GpJSV2.js b/emrg/gui/vendor/monaco/vs/sql-32GpJSV2.js new file mode 100644 index 00000000..10ba723b --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/sql-32GpJSV2.js @@ -0,0 +1 @@ +define("vs/sql-32GpJSV2",["exports"],(function(E){"use strict";const T={comments:{lineComment:"--",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},R={defaultToken:"",tokenPostfix:".sql",ignoreCase:!0,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["ABORT","ABSOLUTE","ACTION","ADA","ADD","AFTER","ALL","ALLOCATE","ALTER","ALWAYS","ANALYZE","AND","ANY","ARE","AS","ASC","ASSERTION","AT","ATTACH","AUTHORIZATION","AUTOINCREMENT","AVG","BACKUP","BEFORE","BEGIN","BETWEEN","BIT","BIT_LENGTH","BOTH","BREAK","BROWSE","BULK","BY","CASCADE","CASCADED","CASE","CAST","CATALOG","CHAR","CHARACTER","CHARACTER_LENGTH","CHAR_LENGTH","CHECK","CHECKPOINT","CLOSE","CLUSTERED","COALESCE","COLLATE","COLLATION","COLUMN","COMMIT","COMPUTE","CONFLICT","CONNECT","CONNECTION","CONSTRAINT","CONSTRAINTS","CONTAINS","CONTAINSTABLE","CONTINUE","CONVERT","CORRESPONDING","COUNT","CREATE","CROSS","CURRENT","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","DATABASE","DATE","DAY","DBCC","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DEFERRABLE","DEFERRED","DELETE","DENY","DESC","DESCRIBE","DESCRIPTOR","DETACH","DIAGNOSTICS","DISCONNECT","DISK","DISTINCT","DISTRIBUTED","DO","DOMAIN","DOUBLE","DROP","DUMP","EACH","ELSE","END","END-EXEC","ERRLVL","ESCAPE","EXCEPT","EXCEPTION","EXCLUDE","EXCLUSIVE","EXEC","EXECUTE","EXISTS","EXIT","EXPLAIN","EXTERNAL","EXTRACT","FAIL","FALSE","FETCH","FILE","FILLFACTOR","FILTER","FIRST","FLOAT","FOLLOWING","FOR","FOREIGN","FORTRAN","FOUND","FREETEXT","FREETEXTTABLE","FROM","FULL","FUNCTION","GENERATED","GET","GLOB","GLOBAL","GO","GOTO","GRANT","GROUP","GROUPS","HAVING","HOLDLOCK","HOUR","IDENTITY","IDENTITYCOL","IDENTITY_INSERT","IF","IGNORE","IMMEDIATE","IN","INCLUDE","INDEX","INDEXED","INDICATOR","INITIALLY","INNER","INPUT","INSENSITIVE","INSERT","INSTEAD","INT","INTEGER","INTERSECT","INTERVAL","INTO","IS","ISNULL","ISOLATION","JOIN","KEY","KILL","LANGUAGE","LAST","LEADING","LEFT","LEVEL","LIKE","LIMIT","LINENO","LOAD","LOCAL","LOWER","MATCH","MATERIALIZED","MAX","MERGE","MIN","MINUTE","MODULE","MONTH","NAMES","NATIONAL","NATURAL","NCHAR","NEXT","NO","NOCHECK","NONCLUSTERED","NONE","NOT","NOTHING","NOTNULL","NULL","NULLIF","NULLS","NUMERIC","OCTET_LENGTH","OF","OFF","OFFSET","OFFSETS","ON","ONLY","OPEN","OPENDATASOURCE","OPENQUERY","OPENROWSET","OPENXML","OPTION","OR","ORDER","OTHERS","OUTER","OUTPUT","OVER","OVERLAPS","PAD","PARTIAL","PARTITION","PASCAL","PERCENT","PIVOT","PLAN","POSITION","PRAGMA","PRECEDING","PRECISION","PREPARE","PRESERVE","PRIMARY","PRINT","PRIOR","PRIVILEGES","PROC","PROCEDURE","PUBLIC","QUERY","RAISE","RAISERROR","RANGE","READ","READTEXT","REAL","RECONFIGURE","RECURSIVE","REFERENCES","REGEXP","REINDEX","RELATIVE","RELEASE","RENAME","REPLACE","REPLICATION","RESTORE","RESTRICT","RETURN","RETURNING","REVERT","REVOKE","RIGHT","ROLLBACK","ROW","ROWCOUNT","ROWGUIDCOL","ROWS","RULE","SAVE","SAVEPOINT","SCHEMA","SCROLL","SECOND","SECTION","SECURITYAUDIT","SELECT","SEMANTICKEYPHRASETABLE","SEMANTICSIMILARITYDETAILSTABLE","SEMANTICSIMILARITYTABLE","SESSION","SESSION_USER","SET","SETUSER","SHUTDOWN","SIZE","SMALLINT","SOME","SPACE","SQL","SQLCA","SQLCODE","SQLERROR","SQLSTATE","SQLWARNING","STATISTICS","SUBSTRING","SUM","SYSTEM_USER","TABLE","TABLESAMPLE","TEMP","TEMPORARY","TEXTSIZE","THEN","TIES","TIME","TIMESTAMP","TIMEZONE_HOUR","TIMEZONE_MINUTE","TO","TOP","TRAILING","TRAN","TRANSACTION","TRANSLATE","TRANSLATION","TRIGGER","TRIM","TRUE","TRUNCATE","TRY_CONVERT","TSEQUAL","UNBOUNDED","UNION","UNIQUE","UNKNOWN","UNPIVOT","UPDATE","UPDATETEXT","UPPER","USAGE","USE","USER","USING","VACUUM","VALUE","VALUES","VARCHAR","VARYING","VIEW","VIRTUAL","WAITFOR","WHEN","WHENEVER","WHERE","WHILE","WINDOW","WITH","WITHIN GROUP","WITHOUT","WORK","WRITE","WRITETEXT","YEAR","ZONE"],operators:["ALL","AND","ANY","BETWEEN","EXISTS","IN","LIKE","NOT","OR","SOME","EXCEPT","INTERSECT","UNION","APPLY","CROSS","FULL","INNER","JOIN","LEFT","OUTER","RIGHT","CONTAINS","FREETEXT","IS","NULL","PIVOT","UNPIVOT","MATCHED"],builtinFunctions:["AVG","CHECKSUM_AGG","COUNT","COUNT_BIG","GROUPING","GROUPING_ID","MAX","MIN","SUM","STDEV","STDEVP","VAR","VARP","CUME_DIST","FIRST_VALUE","LAG","LAST_VALUE","LEAD","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","COLLATE","COLLATIONPROPERTY","TERTIARY_WEIGHTS","FEDERATION_FILTERING_VALUE","CAST","CONVERT","PARSE","TRY_CAST","TRY_CONVERT","TRY_PARSE","ASYMKEY_ID","ASYMKEYPROPERTY","CERTPROPERTY","CERT_ID","CRYPT_GEN_RANDOM","DECRYPTBYASYMKEY","DECRYPTBYCERT","DECRYPTBYKEY","DECRYPTBYKEYAUTOASYMKEY","DECRYPTBYKEYAUTOCERT","DECRYPTBYPASSPHRASE","ENCRYPTBYASYMKEY","ENCRYPTBYCERT","ENCRYPTBYKEY","ENCRYPTBYPASSPHRASE","HASHBYTES","IS_OBJECTSIGNED","KEY_GUID","KEY_ID","KEY_NAME","SIGNBYASYMKEY","SIGNBYCERT","SYMKEYPROPERTY","VERIFYSIGNEDBYCERT","VERIFYSIGNEDBYASYMKEY","CURSOR_STATUS","DATALENGTH","IDENT_CURRENT","IDENT_INCR","IDENT_SEED","IDENTITY","SQL_VARIANT_PROPERTY","CURRENT_TIMESTAMP","DATEADD","DATEDIFF","DATEFROMPARTS","DATENAME","DATEPART","DATETIME2FROMPARTS","DATETIMEFROMPARTS","DATETIMEOFFSETFROMPARTS","DAY","EOMONTH","GETDATE","GETUTCDATE","ISDATE","MONTH","SMALLDATETIMEFROMPARTS","SWITCHOFFSET","SYSDATETIME","SYSDATETIMEOFFSET","SYSUTCDATETIME","TIMEFROMPARTS","TODATETIMEOFFSET","YEAR","CHOOSE","COALESCE","IIF","NULLIF","ABS","ACOS","ASIN","ATAN","ATN2","CEILING","COS","COT","DEGREES","EXP","FLOOR","LOG","LOG10","PI","POWER","RADIANS","RAND","ROUND","SIGN","SIN","SQRT","SQUARE","TAN","APP_NAME","APPLOCK_MODE","APPLOCK_TEST","ASSEMBLYPROPERTY","COL_LENGTH","COL_NAME","COLUMNPROPERTY","DATABASE_PRINCIPAL_ID","DATABASEPROPERTYEX","DB_ID","DB_NAME","FILE_ID","FILE_IDEX","FILE_NAME","FILEGROUP_ID","FILEGROUP_NAME","FILEGROUPPROPERTY","FILEPROPERTY","FULLTEXTCATALOGPROPERTY","FULLTEXTSERVICEPROPERTY","INDEX_COL","INDEXKEY_PROPERTY","INDEXPROPERTY","OBJECT_DEFINITION","OBJECT_ID","OBJECT_NAME","OBJECT_SCHEMA_NAME","OBJECTPROPERTY","OBJECTPROPERTYEX","ORIGINAL_DB_NAME","PARSENAME","SCHEMA_ID","SCHEMA_NAME","SCOPE_IDENTITY","SERVERPROPERTY","STATS_DATE","TYPE_ID","TYPE_NAME","TYPEPROPERTY","DENSE_RANK","NTILE","RANK","ROW_NUMBER","PUBLISHINGSERVERNAME","OPENDATASOURCE","OPENQUERY","OPENROWSET","OPENXML","CERTENCODED","CERTPRIVATEKEY","CURRENT_USER","HAS_DBACCESS","HAS_PERMS_BY_NAME","IS_MEMBER","IS_ROLEMEMBER","IS_SRVROLEMEMBER","LOGINPROPERTY","ORIGINAL_LOGIN","PERMISSIONS","PWDENCRYPT","PWDCOMPARE","SESSION_USER","SESSIONPROPERTY","SUSER_ID","SUSER_NAME","SUSER_SID","SUSER_SNAME","SYSTEM_USER","USER","USER_ID","USER_NAME","ASCII","CHAR","CHARINDEX","CONCAT","DIFFERENCE","FORMAT","LEFT","LEN","LOWER","LTRIM","NCHAR","PATINDEX","QUOTENAME","REPLACE","REPLICATE","REVERSE","RIGHT","RTRIM","SOUNDEX","SPACE","STR","STUFF","SUBSTRING","UNICODE","UPPER","BINARY_CHECKSUM","CHECKSUM","CONNECTIONPROPERTY","CONTEXT_INFO","CURRENT_REQUEST_ID","ERROR_LINE","ERROR_NUMBER","ERROR_MESSAGE","ERROR_PROCEDURE","ERROR_SEVERITY","ERROR_STATE","FORMATMESSAGE","GETANSINULL","GET_FILESTREAM_TRANSACTION_CONTEXT","HOST_ID","HOST_NAME","ISNULL","ISNUMERIC","MIN_ACTIVE_ROWVERSION","NEWID","NEWSEQUENTIALID","ROWCOUNT_BIG","XACT_STATE","TEXTPTR","TEXTVALID","COLUMNS_UPDATED","EVENTDATA","TRIGGER_NESTLEVEL","UPDATE","CHANGETABLE","CHANGE_TRACKING_CONTEXT","CHANGE_TRACKING_CURRENT_VERSION","CHANGE_TRACKING_IS_COLUMN_IN_MASK","CHANGE_TRACKING_MIN_VALID_VERSION","CONTAINSTABLE","FREETEXTTABLE","SEMANTICKEYPHRASETABLE","SEMANTICSIMILARITYDETAILSTABLE","SEMANTICSIMILARITYTABLE","FILETABLEROOTPATH","GETFILENAMESPACEPATH","GETPATHLOCATOR","PATHNAME","GET_TRANSMISSION_STATUS"],builtinVariables:["@@DATEFIRST","@@DBTS","@@LANGID","@@LANGUAGE","@@LOCK_TIMEOUT","@@MAX_CONNECTIONS","@@MAX_PRECISION","@@NESTLEVEL","@@OPTIONS","@@REMSERVER","@@SERVERNAME","@@SERVICENAME","@@SPID","@@TEXTSIZE","@@VERSION","@@CURSOR_ROWS","@@FETCH_STATUS","@@DATEFIRST","@@PROCID","@@ERROR","@@IDENTITY","@@ROWCOUNT","@@TRANCOUNT","@@CONNECTIONS","@@CPU_BUSY","@@IDLE","@@IO_BUSY","@@PACKET_ERRORS","@@PACK_RECEIVED","@@PACK_SENT","@@TIMETICKS","@@TOTAL_ERRORS","@@TOTAL_READ","@@TOTAL_WRITE"],pseudoColumns:["$ACTION","$IDENTITY","$ROWGUID","$PARTITION"],tokenizer:{root:[{include:"@comments"},{include:"@whitespace"},{include:"@pseudoColumns"},{include:"@numbers"},{include:"@strings"},{include:"@complexIdentifiers"},{include:"@scopes"},[/[;,.]/,"delimiter"],[/[()]/,"@brackets"],[/[\w@#$]+/,{cases:{"@operators":"operator","@builtinVariables":"predefined","@builtinFunctions":"predefined","@keywords":"keyword","@default":"identifier"}}],[/[<>=!%&+\-*/|~^]/,"operator"]],whitespace:[[/\s+/,"white"]],comments:[[/--+.*/,"comment"],[/\/\*/,{token:"comment.quote",next:"@comment"}]],comment:[[/[^*/]+/,"comment"],[/\*\//,{token:"comment.quote",next:"@pop"}],[/./,"comment"]],pseudoColumns:[[/[$][A-Za-z_][\w@#$]*/,{cases:{"@pseudoColumns":"predefined","@default":"identifier"}}]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/,"number"]],strings:[[/N'/,{token:"string",next:"@string"}],[/'/,{token:"string",next:"@string"}]],string:[[/[^']+/,"string"],[/''/,"string"],[/'/,{token:"string",next:"@pop"}]],complexIdentifiers:[[/\[/,{token:"identifier.quote",next:"@bracketedIdentifier"}],[/"/,{token:"identifier.quote",next:"@quotedIdentifier"}]],bracketedIdentifier:[[/[^\]]+/,"identifier"],[/]]/,"identifier"],[/]/,{token:"identifier.quote",next:"@pop"}]],quotedIdentifier:[[/[^"]+/,"identifier"],[/""/,"identifier"],[/"/,{token:"identifier.quote",next:"@pop"}]],scopes:[[/BEGIN\s+(DISTRIBUTED\s+)?TRAN(SACTION)?\b/i,"keyword"],[/BEGIN\s+TRY\b/i,{token:"keyword.try"}],[/END\s+TRY\b/i,{token:"keyword.try"}],[/BEGIN\s+CATCH\b/i,{token:"keyword.catch"}],[/END\s+CATCH\b/i,{token:"keyword.catch"}],[/(BEGIN|CASE)\b/i,{token:"keyword.block"}],[/END\b/i,{token:"keyword.block"}],[/WHEN\b/i,{token:"keyword.choice"}],[/THEN\b/i,{token:"keyword.choice"}]]}};E.conf=T,E.language=R,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/st-CuDFIVZ_.js b/emrg/gui/vendor/monaco/vs/st-CuDFIVZ_.js new file mode 100644 index 00000000..284437ce --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/st-CuDFIVZ_.js @@ -0,0 +1 @@ +define("vs/st-CuDFIVZ_",["exports"],(function(e){"use strict";const n={comments:{lineComment:"//",blockComment:["(*","*)"]},brackets:[["{","}"],["[","]"],["(",")"],["var","end_var"],["var_input","end_var"],["var_output","end_var"],["var_in_out","end_var"],["var_temp","end_var"],["var_global","end_var"],["var_access","end_var"],["var_external","end_var"],["type","end_type"],["struct","end_struct"],["program","end_program"],["function","end_function"],["function_block","end_function_block"],["action","end_action"],["step","end_step"],["initial_step","end_step"],["transaction","end_transaction"],["configuration","end_configuration"],["tcp","end_tcp"],["recource","end_recource"],["channel","end_channel"],["library","end_library"],["folder","end_folder"],["binaries","end_binaries"],["includes","end_includes"],["sources","end_sources"]],autoClosingPairs:[{open:"[",close:"]"},{open:"{",close:"}"},{open:"(",close:")"},{open:"/*",close:"*/"},{open:"'",close:"'",notIn:["string_sq"]},{open:'"',close:'"',notIn:["string_dq"]},{open:"var_input",close:"end_var"},{open:"var_output",close:"end_var"},{open:"var_in_out",close:"end_var"},{open:"var_temp",close:"end_var"},{open:"var_global",close:"end_var"},{open:"var_access",close:"end_var"},{open:"var_external",close:"end_var"},{open:"type",close:"end_type"},{open:"struct",close:"end_struct"},{open:"program",close:"end_program"},{open:"function",close:"end_function"},{open:"function_block",close:"end_function_block"},{open:"action",close:"end_action"},{open:"step",close:"end_step"},{open:"initial_step",close:"end_step"},{open:"transaction",close:"end_transaction"},{open:"configuration",close:"end_configuration"},{open:"tcp",close:"end_tcp"},{open:"recource",close:"end_recource"},{open:"channel",close:"end_channel"},{open:"library",close:"end_library"},{open:"folder",close:"end_folder"},{open:"binaries",close:"end_binaries"},{open:"includes",close:"end_includes"},{open:"sources",close:"end_sources"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"var",close:"end_var"},{open:"var_input",close:"end_var"},{open:"var_output",close:"end_var"},{open:"var_in_out",close:"end_var"},{open:"var_temp",close:"end_var"},{open:"var_global",close:"end_var"},{open:"var_access",close:"end_var"},{open:"var_external",close:"end_var"},{open:"type",close:"end_type"},{open:"struct",close:"end_struct"},{open:"program",close:"end_program"},{open:"function",close:"end_function"},{open:"function_block",close:"end_function_block"},{open:"action",close:"end_action"},{open:"step",close:"end_step"},{open:"initial_step",close:"end_step"},{open:"transaction",close:"end_transaction"},{open:"configuration",close:"end_configuration"},{open:"tcp",close:"end_tcp"},{open:"recource",close:"end_recource"},{open:"channel",close:"end_channel"},{open:"library",close:"end_library"},{open:"folder",close:"end_folder"},{open:"binaries",close:"end_binaries"},{open:"includes",close:"end_includes"},{open:"sources",close:"end_sources"}],folding:{markers:{start:new RegExp("^\\s*#pragma\\s+region\\b"),end:new RegExp("^\\s*#pragma\\s+endregion\\b")}}},o={defaultToken:"",tokenPostfix:".st",ignoreCase:!0,brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["if","end_if","elsif","else","case","of","to","__try","__catch","__finally","do","with","by","while","repeat","end_while","end_repeat","end_case","for","end_for","task","retain","non_retain","constant","with","at","exit","return","interval","priority","address","port","on_channel","then","iec","file","uses","version","packagetype","displayname","copyright","summary","vendor","common_source","from","extends","implements"],constant:["false","true","null"],defineKeywords:["var","var_input","var_output","var_in_out","var_temp","var_global","var_access","var_external","end_var","type","end_type","struct","end_struct","program","end_program","function","end_function","function_block","end_function_block","interface","end_interface","method","end_method","property","end_property","namespace","end_namespace","configuration","end_configuration","tcp","end_tcp","resource","end_resource","channel","end_channel","library","end_library","folder","end_folder","binaries","end_binaries","includes","end_includes","sources","end_sources","action","end_action","step","initial_step","end_step","transaction","end_transaction"],typeKeywords:["int","sint","dint","lint","usint","uint","udint","ulint","real","lreal","time","date","time_of_day","date_and_time","string","bool","byte","word","dword","array","pointer","lword"],operators:["=",">","<",":",":=","<=",">=","<>","&","+","-","*","**","MOD","^","or","and","not","xor","abs","acos","asin","atan","cos","exp","expt","ln","log","sin","sqrt","tan","sel","max","min","limit","mux","shl","shr","rol","ror","indexof","sizeof","adr","adrinst","bitadr","is_valid","ref","ref_to"],builtinVariables:[],builtinFunctions:["sr","rs","tp","ton","tof","eq","ge","le","lt","ne","round","trunc","ctd","сtu","ctud","r_trig","f_trig","move","concat","delete","find","insert","left","len","replace","right","rtc"],symbols:/[=>`?!+*\\\/]/,operatorstart:/[\/=\-+!*%<>&|^~?\u00A1-\u00A7\u00A9\u00AB\u00AC\u00AE\u00B0-\u00B1\u00B6\u00BB\u00BF\u00D7\u00F7\u2016-\u2017\u2020-\u2027\u2030-\u203E\u2041-\u2053\u2055-\u205E\u2190-\u23FF\u2500-\u2775\u2794-\u2BFF\u2E00-\u2E7F\u3001-\u3003\u3008-\u3030]/,operatorend:/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE00-\uFE0F\uFE20-\uFE2F\uE0100-\uE01EF]/,operators:/(@operatorstart)((@operatorstart)|(@operatorend))*/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[{include:"@whitespace"},{include:"@comment"},{include:"@attribute"},{include:"@literal"},{include:"@keyword"},{include:"@invokedmethod"},{include:"@symbol"}],whitespace:[[/\s+/,"white"],[/"""/,"string.quote","@endDblDocString"]],endDblDocString:[[/[^"]+/,"string"],[/\\"/,"string"],[/"""/,"string.quote","@popall"],[/"/,"string"]],symbol:[[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/[.]/,"delimiter"],[/@operators/,"operator"],[/@symbols/,"operator"]],comment:[[/\/\/\/.*$/,"comment.doc"],[/\/\*\*/,"comment.doc","@commentdocbody"],[/\/\/.*$/,"comment"],[/\/\*/,"comment","@commentbody"]],commentdocbody:[[/\/\*/,"comment","@commentbody"],[/\*\//,"comment.doc","@pop"],[/\:[a-zA-Z]+\:/,"comment.doc.param"],[/./,"comment.doc"]],commentbody:[[/\/\*/,"comment","@commentbody"],[/\*\//,"comment","@pop"],[/./,"comment"]],attribute:[[/@@@identifier/,{cases:{"@attributes":"keyword.control","@default":""}}]],literal:[[/"/,{token:"string.quote",next:"@stringlit"}],[/0[b]([01]_?)+/,"number.binary"],[/0[o]([0-7]_?)+/,"number.octal"],[/0[x]([0-9a-fA-F]_?)+([pP][\-+](\d_?)+)?/,"number.hex"],[/(\d_?)*\.(\d_?)+([eE][\-+]?(\d_?)+)?/,"number.float"],[/(\d_?)+/,"number"]],stringlit:[[/\\\(/,{token:"operator",next:"@interpolatedexpression"}],[/@escapes/,"string"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",next:"@pop"}],[/./,"string"]],interpolatedexpression:[[/\(/,{token:"operator",next:"@interpolatedexpression"}],[/\)/,{token:"operator",next:"@pop"}],{include:"@literal"},{include:"@keyword"},{include:"@symbol"}],keyword:[[/`/,{token:"operator",next:"@escapedkeyword"}],[/@identifier/,{cases:{"@keywords":"keyword","[A-Z][a-zA-Z0-9$]*":"type.identifier","@default":"identifier"}}]],escapedkeyword:[[/`/,{token:"operator",next:"@pop"}],[/./,"identifier"]],invokedmethod:[[/([.])(@identifier)/,{cases:{$2:["delimeter","type.identifier"],"@default":""}}]]}};e.conf=o,e.language=t,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/systemverilog-Ch4vA8Yt.js b/emrg/gui/vendor/monaco/vs/systemverilog-Ch4vA8Yt.js new file mode 100644 index 00000000..239fd7e9 --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/systemverilog-Ch4vA8Yt.js @@ -0,0 +1 @@ +define("vs/systemverilog-Ch4vA8Yt",["exports"],(function(e){"use strict";const n={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"],["begin","end"],["case","endcase"],["casex","endcase"],["casez","endcase"],["checker","endchecker"],["class","endclass"],["clocking","endclocking"],["config","endconfig"],["function","endfunction"],["generate","endgenerate"],["group","endgroup"],["interface","endinterface"],["module","endmodule"],["package","endpackage"],["primitive","endprimitive"],["program","endprogram"],["property","endproperty"],["specify","endspecify"],["sequence","endsequence"],["table","endtable"],["task","endtask"]],autoClosingPairs:[{open:"[",close:"]"},{open:"{",close:"}"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{offSide:!1,markers:{start:new RegExp("^(?:\\s*|.*(?!\\/[\\/\\*])[^\\w])(?:begin|case(x|z)?|class|clocking|config|covergroup|function|generate|interface|module|package|primitive|property|program|sequence|specify|table|task)\\b"),end:new RegExp("^(?:\\s*|.*(?!\\/[\\/\\*])[^\\w])(?:end|endcase|endclass|endclocking|endconfig|endgroup|endfunction|endgenerate|endinterface|endmodule|endpackage|endprimitive|endproperty|endprogram|endsequence|endspecify|endtable|endtask)\\b")}}},i={defaultToken:"",tokenPostfix:".sv",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"},{token:"delimiter.angle",open:"<",close:">"}],keywords:["accept_on","alias","always","always_comb","always_ff","always_latch","and","assert","assign","assume","automatic","before","begin","bind","bins","binsof","bit","break","buf","bufif0","bufif1","byte","case","casex","casez","cell","chandle","checker","class","clocking","cmos","config","const","constraint","context","continue","cover","covergroup","coverpoint","cross","deassign","default","defparam","design","disable","dist","do","edge","else","end","endcase","endchecker","endclass","endclocking","endconfig","endfunction","endgenerate","endgroup","endinterface","endmodule","endpackage","endprimitive","endprogram","endproperty","endspecify","endsequence","endtable","endtask","enum","event","eventually","expect","export","extends","extern","final","first_match","for","force","foreach","forever","fork","forkjoin","function","generate","genvar","global","highz0","highz1","if","iff","ifnone","ignore_bins","illegal_bins","implements","implies","import","incdir","include","initial","inout","input","inside","instance","int","integer","interconnect","interface","intersect","join","join_any","join_none","large","let","liblist","library","local","localparam","logic","longint","macromodule","matches","medium","modport","module","nand","negedge","nettype","new","nexttime","nmos","nor","noshowcancelled","not","notif0","notif1","null","or","output","package","packed","parameter","pmos","posedge","primitive","priority","program","property","protected","pull0","pull1","pulldown","pullup","pulsestyle_ondetect","pulsestyle_onevent","pure","rand","randc","randcase","randsequence","rcmos","real","realtime","ref","reg","reject_on","release","repeat","restrict","return","rnmos","rpmos","rtran","rtranif0","rtranif1","s_always","s_eventually","s_nexttime","s_until","s_until_with","scalared","sequence","shortint","shortreal","showcancelled","signed","small","soft","solve","specify","specparam","static","string","strong","strong0","strong1","struct","super","supply0","supply1","sync_accept_on","sync_reject_on","table","tagged","task","this","throughout","time","timeprecision","timeunit","tran","tranif0","tranif1","tri","tri0","tri1","triand","trior","trireg","type","typedef","union","unique","unique0","unsigned","until","until_with","untyped","use","uwire","var","vectored","virtual","void","wait","wait_order","wand","weak","weak0","weak1","while","wildcard","wire","with","within","wor","xnor","xor"],builtin_gates:["and","nand","nor","or","xor","xnor","buf","not","bufif0","bufif1","notif1","notif0","cmos","nmos","pmos","rcmos","rnmos","rpmos","tran","tranif1","tranif0","rtran","rtranif1","rtranif0"],operators:["=","+=","-=","*=","/=","%=","&=","|=","^=","<<=",">>+","<<<=",">>>=","?",":","+","-","!","~","&","~&","|","~|","^","~^","^~","+","-","*","/","%","==","!=","===","!==","==?","!=?","&&","||","**","<","<=",">",">=","&","|","^",">>","<<",">>>","<<<","++","--","->","<->","inside","dist","::","+:","-:","*>","&&&","|->","|=>","#=#"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],{include:"@numbers"},[/[;,.]/,"delimiter"],{include:"@strings"}],identifier_or_keyword:[[/@identifier/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}]],numbers:[[/\d+?[\d_]*(?:\.[\d_]+)?[eE][\-+]?\d+/,"number.float"],[/\d+?[\d_]*\.[\d_]+(?:\s*@timeunits)?/,"number.float"],[/(?:\d+?[\d_]*\s*)?'[sS]?[dD]\s*[0-9xXzZ?]+?[0-9xXzZ?_]*/,"number"],[/(?:\d+?[\d_]*\s*)?'[sS]?[bB]\s*[0-1xXzZ?]+?[0-1xXzZ?_]*/,"number.binary"],[/(?:\d+?[\d_]*\s*)?'[sS]?[oO]\s*[0-7xXzZ?]+?[0-7xXzZ?_]*/,"number.octal"],[/(?:\d+?[\d_]*\s*)?'[sS]?[hH]\s*[0-9a-fA-FxXzZ?]+?[0-9a-fA-FxXzZ?_]*/,"number.hex"],[/1step/,"number"],[/[\dxXzZ]+?[\dxXzZ_]*(?:\s*@timeunits)?/,"number"],[/'[01xXzZ]+/,"number"]],module_instance:[{include:"@whitespace"},[/(#?)(\()/,["",{token:"@brackets",next:"@port_connection"}]],[/@identifier\s*[;={}\[\],]/,{token:"@rematch",next:"@pop"}],[/@symbols|[;={}\[\],]/,{token:"@rematch",next:"@pop"}],[/@identifier/,"type"],[/;/,"delimiter","@pop"]],port_connection:[{include:"@identifier_or_keyword"},{include:"@whitespace"},[/@systemcall/,"variable.predefined"],{include:"@numbers"},{include:"@strings"},[/[,]/,"delimiter"],[/\(/,"@brackets","@port_connection"],[/\)/,"@brackets","@pop"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],strings:[[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],include:[[/(\s*)(")([\w*\/*]*)(.\w*)(")/,["","string.include.identifier","string.include.identifier","string.include.identifier",{token:"string.include.identifier",next:"@pop"}]],[/(\s*)(<)([\w*\/*]*)(.\w*)(>)/,["","string.include.identifier","string.include.identifier","string.include.identifier",{token:"string.include.identifier",next:"@pop"}]]],table:[{include:"@whitespace"},[/[()]/,"@brackets"],[/[:;]/,"delimiter"],[/[01\-*?xXbBrRfFpPnN]/,"variable.predefined"],["endtable","keyword.endtable","@pop"]]}};e.conf=n,e.language=i,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/tcl-D74tq1nH.js b/emrg/gui/vendor/monaco/vs/tcl-D74tq1nH.js new file mode 100644 index 00000000..cdcee247 --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/tcl-D74tq1nH.js @@ -0,0 +1 @@ +define("vs/tcl-D74tq1nH",["exports"],(function(e){"use strict";const t={brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},n={tokenPostfix:".tcl",specialFunctions:["set","unset","rename","variable","proc","coroutine","foreach","incr","append","lappend","linsert","lreplace"],mainFunctions:["if","then","elseif","else","case","switch","while","for","break","continue","return","package","namespace","catch","exit","eval","expr","uplevel","upvar"],builtinFunctions:["file","info","concat","join","lindex","list","llength","lrange","lsearch","lsort","split","array","parray","binary","format","regexp","regsub","scan","string","subst","dict","cd","clock","exec","glob","pid","pwd","close","eof","fblocked","fconfigure","fcopy","fileevent","flush","gets","open","puts","read","seek","socket","tell","interp","after","auto_execok","auto_load","auto_mkindex","auto_reset","bgerror","error","global","history","load","source","time","trace","unknown","unset","update","vwait","winfo","wm","bind","event","pack","place","grid","font","bell","clipboard","destroy","focus","grab","lower","option","raise","selection","send","tk","tkwait","tk_bisque","tk_focusNext","tk_focusPrev","tk_focusFollowsMouse","tk_popup","tk_setPalette"],symbols:/[=>{const r=s.getModifiedEditor(),l=s.getOriginalEditor();return r&&r.getModel()?.uri.toString()===t.toString()&&l&&l.getModel()?.uri.toString()===e.toString()})||null}function Ai(c){const t=c.get(o.ICodeEditorService).listDiffEditors(),i=o.getActiveElement();if(i){for(const n of t)if(n.getContainerDomNode().contains(i))return n}return null}o.registerAction2(uC),o.registerAction2(vf),o.registerAction2(bf),o.MenuRegistry.appendMenuItem(o.MenuId.EditorTitle,{command:{id:new bf().desc.id,title:a.localize(135,"Use Inline View When Space Is Limited"),toggled:o.ContextKeyExpr.has("config.diffEditor.useInlineViewWhenSpaceIsLimited"),precondition:o.ContextKeyExpr.has("isInDiffEditor")},order:11,group:"1_diff",when:o.ContextKeyExpr.and(o.EditorContextKeys.diffEditorRenderSideBySideInlineBreakpointReached,o.ContextKeyExpr.has("isInDiffEditor"))}),o.MenuRegistry.appendMenuItem(o.MenuId.EditorTitle,{command:{id:new vf().desc.id,title:a.localize(136,"Show Moved Code Blocks"),icon:a.Codicon.move,toggled:o.ContextKeyEqualsExpr.create("config.diffEditor.experimental.showMoves",!0),precondition:o.ContextKeyExpr.has("isInDiffEditor")},order:10,group:"1_diff",when:o.ContextKeyExpr.has("isInDiffEditor")}),o.registerAction2(hd);for(const c of[{icon:a.Codicon.arrowRight,key:o.EditorContextKeys.diffEditorInlineMode.toNegated()},{icon:a.Codicon.discard,key:o.EditorContextKeys.diffEditorInlineMode}])o.MenuRegistry.appendMenuItem(o.MenuId.DiffEditorHunkToolbar,{command:{id:new hd().desc.id,title:a.localize(137,"Revert Block"),icon:c.icon},when:o.ContextKeyExpr.and(o.EditorContextKeys.diffEditorModifiedWritable,c.key),order:5,group:"primary"}),o.MenuRegistry.appendMenuItem(o.MenuId.DiffEditorSelectionToolbar,{command:{id:new hd().desc.id,title:a.localize(138,"Revert Selection"),icon:c.icon},when:o.ContextKeyExpr.and(o.EditorContextKeys.diffEditorModifiedWritable,c.key),order:5,group:"primary"});o.registerAction2(gC),o.registerAction2(pC),o.registerAction2(fC),o.registerAction2(mC),o.MenuRegistry.appendMenuItem(o.MenuId.EditorTitle,{command:{id:uo.id,title:a.localize(139,"Open Accessible Diff Viewer"),precondition:o.ContextKeyExpr.has("isInDiffEditor")},order:10,group:"2_diff",when:o.ContextKeyExpr.and(o.EditorContextKeys.accessibleDiffViewerVisible.negate(),o.ContextKeyExpr.has("isInDiffEditor"))}),o.CommandsRegistry.registerCommandAlias("editor.action.diffReview.next",uo.id),o.registerAction2(uo),o.CommandsRegistry.registerCommandAlias("editor.action.diffReview.prev",qr.id),o.registerAction2(qr);var vC=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},bC=function(c,e){return function(t,i){e(t,i,c)}},ud;const Gr=new o.RawContextKey("selectionAnchorSet",!1);let Bt=(pn=class{static get(e){return e.getContribution(ud.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=Gr.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition();this.editor.changeDecorations(t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(a.Selection.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new o.MarkdownString().appendText(a.localize(834,"Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),o.alert(a.localize(835,"Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){const t=this.editor.getPosition();this.editor.setSelection(a.Selection.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const e=this.decorationId;this.editor.changeDecorations(t=>{t.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}},ud=pn,pn.ID="editor.contrib.selectionAnchorController",pn);Bt=ud=vC([bC(1,o.IContextKeyService)],Bt);class CC extends o.EditorAction{constructor(){super({id:"editor.action.setSelectionAnchor",label:a.localize2(836,"Set Selection Anchor"),precondition:void 0,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:a.KeyChord(2089,2080),weight:100}})}async run(e,t){Bt.get(t)?.setSelectionAnchor()}}class SC extends o.EditorAction{constructor(){super({id:"editor.action.goToSelectionAnchor",label:a.localize2(837,"Go to Selection Anchor"),precondition:Gr})}async run(e,t){Bt.get(t)?.goToSelectionAnchor()}}class yC extends o.EditorAction{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:a.localize2(838,"Select from Anchor to Cursor"),precondition:Gr,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:a.KeyChord(2089,2089),weight:100}})}async run(e,t){Bt.get(t)?.selectFromAnchorToCursor()}}class wC extends o.EditorAction{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:a.localize2(839,"Cancel Selection Anchor"),precondition:Gr,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:9,weight:100}})}async run(e,t){Bt.get(t)?.cancelSelectionAnchor()}}o.registerEditorContribution(Bt.ID,Bt,4),o.registerEditorAction(CC),o.registerEditorAction(SC),o.registerEditorAction(yC),o.registerEditorAction(wC);const IC=o.registerColor("editorOverviewRuler.bracketMatchForeground","#A0A0A0",a.localize(840,"Overview ruler marker color for matching brackets."));class xC extends o.EditorAction{constructor(){super({id:"editor.action.jumpToBracket",label:a.localize2(842,"Go to Bracket"),precondition:void 0,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:3165,weight:100}})}run(e,t){Fi.get(t)?.jumpToBracket()}}class EC extends o.EditorAction{constructor(){super({id:"editor.action.selectToBracket",label:a.localize2(843,"Select to Bracket"),precondition:void 0,metadata:{description:a.localize2(844,"Select the text inside and including the brackets or curly braces"),args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,i){let n=!0;i&&i.selectBrackets===!1&&(n=!1),Fi.get(t)?.selectToBracket(n)}}class LC extends o.EditorAction{constructor(){super({id:"editor.action.removeBrackets",label:a.localize2(845,"Remove Brackets"),precondition:void 0,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:2561,weight:100},canTriggerInlineEdits:!0})}run(e,t){Fi.get(t)?.removeBrackets(this.id)}}class DC{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}}const gi=class gi extends a.Disposable{static get(e){return e.getContribution(gi.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new a.RunOnceScheduler(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(80),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(t=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(t=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(80)&&(this._matchBrackets=this._editor.getOption(80),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(e.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}jumpToBracket(){if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getSelections().map(i=>{const n=i.getStartPosition(),s=e.bracketPairs.matchBracket(n);let r=null;if(s)s[0].containsPosition(n)&&!s[1].containsPosition(n)?r=s[1].getStartPosition():s[1].containsPosition(n)&&(r=s[0].getStartPosition());else{const l=e.bracketPairs.findEnclosingBrackets(n);if(l)r=l[1].getStartPosition();else{const d=e.bracketPairs.findNextBracket(n);d&&d.range&&(r=d.range.getStartPosition())}}return r?new a.Selection(r.lineNumber,r.column,r.lineNumber,r.column):new a.Selection(n.lineNumber,n.column,n.lineNumber,n.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=[];this._editor.getSelections().forEach(n=>{const s=n.getStartPosition();let r=t.bracketPairs.matchBracket(s);if(!r&&(r=t.bracketPairs.findEnclosingBrackets(s),!r)){const h=t.bracketPairs.findNextBracket(s);h&&h.range&&(r=t.bracketPairs.matchBracket(h.range.getStartPosition()))}let l=null,d=null;if(r){r.sort(a.Range.compareRangesUsingStarts);const[h,u]=r;if(l=e?h.getStartPosition():h.getEndPosition(),d=e?u.getEndPosition():u.getStartPosition(),u.containsPosition(s)){const g=l;l=d,d=g}}l&&d&&i.push(new a.Selection(l.lineNumber,l.column,d.lineNumber,d.column))}),i.length>0&&(this._editor.setSelections(i),this._editor.revealRange(i[0]))}removeBrackets(e){if(!this._editor.hasModel())return;const t=this._editor.getModel();this._editor.getSelections().forEach(i=>{const n=i.getPosition();let s=t.bracketPairs.matchBracket(n);s||(s=t.bracketPairs.findEnclosingBrackets(n)),s&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:s[0],text:""},{range:s[1],text:""}]),this._editor.pushUndoStop())})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();const e=[];let t=0;for(const i of this._lastBracketsData){const n=i.brackets;n&&(e[t++]={range:n[0],options:i.options},e[t++]={range:n[1],options:i.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}const e=this._editor.getSelections();if(e.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const t=this._editor.getModel(),i=t.getVersionId();let n=[];this._lastVersionId===i&&(n=this._lastBracketsData);const s=[];let r=0;for(let g=0,p=e.length;g1&&s.sort(a.Position.compare);const l=[];let d=0,h=0;const u=n.length;for(let g=0,p=s.length;g{const t=c.getColor(o.editorBracketMatchForeground);t&&e.addRule(`.monaco-editor .bracket-match-inline { color: ${t} !important; }`)});class RC{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const i=this._selection.startLineNumber,n=this._selection.startColumn,s=this._selection.endColumn;if(!(this._isMovingLeft&&n===1)&&!(!this._isMovingLeft&&s===e.getLineMaxColumn(i)))if(this._isMovingLeft){const r=new a.Range(i,n-1,i,n),l=e.getValueInRange(r);t.addEditOperation(r,null),t.addEditOperation(new a.Range(i,s,i,s),l)}else{const r=new a.Range(i,s,i,s+1),l=e.getValueInRange(r);t.addEditOperation(r,null),t.addEditOperation(new a.Range(i,n,i,n),l)}}computeCursorState(e,t){return this._isMovingLeft?new a.Selection(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new a.Selection(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}class Sf extends o.EditorAction{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;const i=[],n=t.getSelections();for(const s of n)i.push(new RC(s,this.left));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}class TC extends Sf{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:a.localize2(846,"Move Selected Text Left"),precondition:o.EditorContextKeys.writable})}}class NC extends Sf{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:a.localize2(847,"Move Selected Text Right"),precondition:o.EditorContextKeys.writable})}}o.registerEditorAction(TC),o.registerEditorAction(NC);class MC extends o.EditorAction{constructor(){super({id:"editor.action.transposeLetters",label:a.localize2(848,"Transpose Letters"),precondition:o.EditorContextKeys.writable,kbOpts:{kbExpr:o.EditorContextKeys.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;const i=t.getModel(),n=[],s=t.getSelections();for(const r of s){if(!r.isEmpty())continue;const l=r.startLineNumber,d=r.startColumn,h=i.getLineMaxColumn(l);if(l===1&&(d===1||d===2&&h===2))continue;const u=d===h?r.getPosition():o.MoveOperations.rightPosition(i,r.getPosition().lineNumber,r.getPosition().column),g=o.MoveOperations.leftPosition(i,u),p=o.MoveOperations.leftPosition(i,g),f=i.getValueInRange(a.Range.fromPositions(p,g)),m=i.getValueInRange(a.Range.fromPositions(g,u)),_=a.Range.fromPositions(p,u);n.push(new o.ReplaceCommand(_,m+f))}n.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())}}o.registerEditorAction(MC);const ft=class ft{constructor(e){this.value=e}equals(e){return this.value===e.value}contains(e){return this.equals(e)||this.value===""||e.value.startsWith(this.value+ft.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(...e){return new ft((this.value?[this.value,...e]:e).join(ft.sep))}};ft.sep=".",ft.None=new ft("@@none@@"),ft.Empty=new ft("");let q=ft;var PC=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},OC=function(c,e){return function(t,i){e(t,i,c)}};const AC=o.ModelDecorationOptions.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:a.noBreakWhitespace,inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0}}),bc=class bc extends a.Disposable{constructor(e,t,i,n,s){super(),this.typeId=e,this.editor=t,this.range=i,this.delegate=s,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(n),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(e){this.domNode=o.$(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=e;const t=o.$("span.icon");this.domNode.append(t),t.classList.add(...o.ThemeIcon.asClassNameArray(a.Codicon.loading),"codicon-modifier-spin");const i=()=>{const n=this.editor.getOption(75);this.domNode.style.height=`${n}px`,this.domNode.style.width=`${Math.ceil(.8*n)}px`};i(),this._register(this.editor.onDidChangeConfiguration(n=>{(n.hasChanged(61)||n.hasChanged(75))&&i()})),this._register(o.addDisposableListener(this.domNode,o.EventType.CLICK,n=>{this.delegate.cancel()}))}getId(){return bc.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:{lineNumber:this.range.startLineNumber,column:this.range.startColumn},preference:[0]}}dispose(){super.dispose(),this.editor.removeContentWidget(this)}};bc.baseId="editor.widget.inlineProgressWidget";let gd=bc,Zr=class extends a.Disposable{constructor(e,t,i){super(),this.id=e,this._editor=t,this._instantiationService=i,this._showDelay=500,this._showPromise=this._register(new a.MutableDisposable),this._currentWidget=this._register(new a.MutableDisposable),this._operationIdPool=0,this._currentDecorations=t.createDecorationsCollection()}dispose(){super.dispose(),this._currentDecorations.clear()}async showWhile(e,t,i,n,s){const r=this._operationIdPool++;this._currentOperation=r,this.clear(),this._showPromise.value=a.disposableTimeout(()=>{const l=a.Range.fromPositions(e);this._currentDecorations.set([{range:l,options:AC}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance(gd,this.id,this._editor,l,t,n))},s??this._showDelay);try{return await i}finally{this._currentOperation===r&&(this.clear(),this._currentOperation=void 0)}}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};Zr=PC([OC(2,o.IInstantiationService)],Zr);var FC=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},yf=function(c,e){return function(t,i){e(t,i,c)}},Xr;let me=(pi=class{static get(e){return e.getContribution(Xr.ID)}constructor(e,t,i){this._openerService=i,this._messageWidget=new a.MutableDisposable,this._messageListeners=new a.DisposableStore,this._mouseOverMessage=!1,this._editor=e,this._visible=Xr.MESSAGE_VISIBLE.bindTo(t)}dispose(){this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){if(o.alert(o.isMarkdownString(e)?e.value:e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),o.isMarkdownString(e)){const n=this._messageListeners.add(o.renderMarkdown(e,{actionHandler:(s,r)=>{this.closeMessage(),o.openLinkFromMarkdown(this._openerService,s,r.isTrusted)}}));this._messageWidget.value=new pd(this._editor,t,n.element)}else this._messageWidget.value=new pd(this._editor,t,e);this._messageListeners.add(a.Event.debounce(this._editor.onDidBlurEditorText,(n,s)=>s,0)(()=>{this._mouseOverMessage||this._messageWidget.value&&o.isAncestor(o.getActiveElement(),this._messageWidget.value.getDomNode())||this.closeMessage()})),this._messageListeners.add(this._editor.onDidChangeCursorPosition(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidDispose(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeModel(()=>this.closeMessage())),this._messageListeners.add(o.addDisposableListener(this._messageWidget.value.getDomNode(),o.EventType.MOUSE_ENTER,()=>this._mouseOverMessage=!0,!0)),this._messageListeners.add(o.addDisposableListener(this._messageWidget.value.getDomNode(),o.EventType.MOUSE_LEAVE,()=>this._mouseOverMessage=!1,!0));let i;this._messageListeners.add(this._editor.onMouseMove(n=>{n.target.position&&(i?i.containsPosition(n.target.position)||this.closeMessage():i=new a.Range(t.lineNumber-3,1,n.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(pd.fadeOut(this._messageWidget.value))}},Xr=pi,pi.ID="editor.contrib.messageController",pi.MESSAGE_VISIBLE=new o.RawContextKey("messageVisible",!1,a.localize(1333,"Whether the editor is currently showing an inline message")),pi);me=Xr=FC([yf(1,o.IContextKeyService),yf(2,o.IOpenerService)],me);const zC=o.EditorCommand.bindToContribution(me.get);o.registerEditorCommand(new zC({id:"leaveEditorMessage",precondition:me.MESSAGE_VISIBLE,handler:c=>c.closeMessage(),kbOpts:{weight:130,primary:9}}));let pd=class{static fadeOut(e){const t=()=>{e.dispose(),clearTimeout(i),e.getDomNode().removeEventListener("animationend",t)},i=setTimeout(t,110);return e.getDomNode().addEventListener("animationend",t),e.getDomNode().classList.add("fadeOut"),{dispose:t}}constructor(e,{lineNumber:t,column:i},n){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:i},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";const s=document.createElement("div");s.classList.add("anchor","top"),this._domNode.appendChild(s);const r=document.createElement("div");typeof n=="string"?(r.classList.add("message"),r.textContent=n):(n.classList.add("message"),r.appendChild(n)),this._domNode.appendChild(r);const l=document.createElement("div");l.classList.add("anchor","below"),this._domNode.appendChild(l),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2],positionAffinity:1}}afterRender(e){this._domNode.classList.toggle("below",e===2)}};o.registerEditorContribution(me.ID,me,4);var fd=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},go=function(c,e){return function(t,i){e(t,i,c)}};class md{constructor(e){this.copyMimeTypes=[],this.kind=e,this.providedDropEditKinds=[this.kind],this.providedPasteEditKinds=[this.kind]}async provideDocumentPasteEdits(e,t,i,n,s){const r=await this.getEdit(i,s);if(r)return{edits:[{insertText:r.insertText,title:r.title,kind:r.kind,handledMimeType:r.handledMimeType,yieldTo:r.yieldTo}],dispose(){}}}async provideDocumentDropEdits(e,t,i,n){const s=await this.getEdit(i,n);if(s)return{edits:[{insertText:s.insertText,title:s.title,kind:s.kind,handledMimeType:s.handledMimeType,yieldTo:s.yieldTo}],dispose(){}}}}const Cc=class Cc extends md{constructor(){super(q.Empty.append("text","plain")),this.id=Cc.id,this.dropMimeTypes=[o.Mimes.text],this.pasteMimeTypes=[o.Mimes.text]}async getEdit(e,t){const i=e.get(o.Mimes.text);if(!i||e.has(o.Mimes.uriList))return;const n=await i.asString();return{handledMimeType:o.Mimes.text,title:a.localize(965,"Insert Plain Text"),insertText:n,kind:this.kind}}};Cc.id="text";let zi=Cc;class wf extends md{constructor(){super(q.Empty.append("uri","path","absolute")),this.dropMimeTypes=[o.Mimes.uriList],this.pasteMimeTypes=[o.Mimes.uriList]}async getEdit(e,t){const i=await If(e);if(!i.length||t.isCancellationRequested)return;let n=0;const s=i.map(({uri:l,originalText:d})=>l.scheme===a.Schemas.file?l.fsPath:(n++,d)).join(" ");let r;return n>0?r=i.length>1?a.localize(966,"Insert Uris"):a.localize(967,"Insert Uri"):r=i.length>1?a.localize(968,"Insert Paths"):a.localize(969,"Insert Path"),{handledMimeType:o.Mimes.uriList,insertText:s,title:r,kind:this.kind}}}let Yr=class extends md{constructor(e){super(q.Empty.append("uri","path","relative")),this._workspaceContextService=e,this.dropMimeTypes=[o.Mimes.uriList],this.pasteMimeTypes=[o.Mimes.uriList]}async getEdit(e,t){const i=await If(e);if(!i.length||t.isCancellationRequested)return;const n=a.coalesce(i.map(({uri:s})=>{const r=this._workspaceContextService.getWorkspaceFolder(s);return r?o.relativePath(r.uri,s):void 0}));if(n.length)return{handledMimeType:o.Mimes.uriList,insertText:n.join(" "),title:i.length>1?a.localize(970,"Insert Relative Paths"):a.localize(971,"Insert Relative Path"),kind:this.kind}}};Yr=fd([go(0,o.IWorkspaceContextService)],Yr);class VC{constructor(){this.kind=new q("html"),this.providedPasteEditKinds=[this.kind],this.copyMimeTypes=[],this.pasteMimeTypes=["text/html"],this._yieldTo=[{mimeType:o.Mimes.text}]}async provideDocumentPasteEdits(e,t,i,n,s){if(n.triggerKind!==a.DocumentPasteTriggerKind.PasteAs&&!n.only?.contains(this.kind))return;const l=await i.get("text/html")?.asString();if(!(!l||s.isCancellationRequested))return{dispose(){},edits:[{insertText:l,yieldTo:this._yieldTo,title:a.localize(972,"Insert HTML"),kind:this.kind}]}}}async function If(c){const e=c.get(o.Mimes.uriList);if(!e)return[];const t=await e.asString(),i=[];for(const n of o.UriList.parse(t))try{i.push({uri:a.URI.parse(n),originalText:n})}catch{}return i}const Vi={scheme:"*",hasAccessToAllModels:!0};let _d=class extends a.Disposable{constructor(e,t){super(),this._register(e.documentDropEditProvider.register(Vi,new zi)),this._register(e.documentDropEditProvider.register(Vi,new wf)),this._register(e.documentDropEditProvider.register(Vi,new Yr(t)))}};_d=fd([go(0,o.ILanguageFeaturesService),go(1,o.IWorkspaceContextService)],_d);let vd=class extends a.Disposable{constructor(e,t){super(),this._register(e.documentPasteEditProvider.register(Vi,new zi)),this._register(e.documentPasteEditProvider.register(Vi,new wf)),this._register(e.documentPasteEditProvider.register(Vi,new Yr(t))),this._register(e.documentPasteEditProvider.register(Vi,new VC))}};vd=fd([go(0,o.ILanguageFeaturesService),go(1,o.IWorkspaceContextService)],vd);const Be=class Be{constructor(){this.value="",this.pos=0}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return e===95||e>=97&&e<=122||e>=65&&e<=90}text(e){this.value=e,this.pos=0}tokenText(e){return this.value.substr(e.pos,e.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};const e=this.pos;let t=0,i=this.value.charCodeAt(e),n;if(n=Be._table[i],typeof n=="number")return this.pos+=1,{type:n,pos:e,len:1};if(Be.isDigitCharacter(i)){n=8;do t+=1,i=this.value.charCodeAt(e+t);while(Be.isDigitCharacter(i));return this.pos+=t,{type:n,pos:e,len:t}}if(Be.isVariableCharacter(i)){n=9;do i=this.value.charCodeAt(e+ ++t);while(Be.isVariableCharacter(i)||Be.isDigitCharacter(i));return this.pos+=t,{type:n,pos:e,len:t}}n=10;do t+=1,i=this.value.charCodeAt(e+t);while(!isNaN(i)&&typeof Be._table[i]>"u"&&!Be.isDigitCharacter(i)&&!Be.isVariableCharacter(i));return this.pos+=t,{type:n,pos:e,len:t}}};Be._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13};let bd=Be;class is{constructor(){this._children=[]}appendChild(e){return e instanceof re&&this._children[this._children.length-1]instanceof re?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){const{parent:i}=e,n=i.children.indexOf(e),s=i.children.slice(0);s.splice(n,1,...t),i._children=s,(function r(l,d){for(const h of l)h.parent=d,r(h.children,h)})(t,i)}get children(){return this._children}get rightMostDescendant(){return this._children.length>0?this._children[this._children.length-1].rightMostDescendant:this}get snippet(){let e=this;for(;;){if(!e)return;if(e instanceof po)return e;e=e.parent}}toString(){return this.children.reduce((e,t)=>e+t.toString(),"")}len(){return 0}}class re extends is{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new re(this.value)}}class xf extends is{}class De extends xf{static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.indext.index?1:0}constructor(e){super(),this.index=e}get isFinalTabstop(){return this.index===0}get choice(){return this._children.length===1&&this._children[0]instanceof ns?this._children[0]:void 0}clone(){const e=new De(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}}class ns extends is{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof re&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){const e=new ns;return this.options.forEach(e.appendChild,e),e}}class Cd extends is{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){const t=this;let i=!1,n=e.replace(this.regexp,function(){return i=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))});return!i&&this._children.some(s=>s instanceof je&&!!s.elseValue)&&(n=this._replace([])),n}_replace(e){let t="";for(const i of this._children)if(i instanceof je){let n=e[i.index]||"";n=i.resolve(n),t+=n}else t+=i.toString();return t}toString(){return""}clone(){const e=new Cd;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map(t=>t.clone()),e}}class je extends is{constructor(e,t,i,n){super(),this.index=e,this.shorthandName=t,this.ifValue=i,this.elseValue=n}resolve(e){return this.shorthandName==="upcase"?e?e.toLocaleUpperCase():"":this.shorthandName==="downcase"?e?e.toLocaleLowerCase():"":this.shorthandName==="capitalize"?e?e[0].toLocaleUpperCase()+e.substr(1):"":this.shorthandName==="pascalcase"?e?this._toPascalCase(e):"":this.shorthandName==="camelcase"?e?this._toCamelCase(e):"":this.shorthandName==="kebabcase"?e?this._toKebabCase(e):"":this.shorthandName==="snakecase"?e?this._toSnakeCase(e):"":e&&typeof this.ifValue=="string"?this.ifValue:!e&&typeof this.elseValue=="string"?this.elseValue:e||""}_toKebabCase(e){if(!e.match(/[\p{L}0-9]+/gu))return e;if(!e.match(/[\p{L}0-9]/u))return e.trim().toLowerCase().replace(/^_+|_+$/g,"").replace(/[\s_]+/g,"-");const i=e.trim().replace(/^_+|_+$/g,""),n=i.match(new RegExp("\\p{Lu}{2,}(?=\\p{Lu}\\p{Ll}+[0-9]*|[\\s_-]|$)|\\p{Lu}?\\p{Ll}+[0-9]*|\\p{Lu}(?=\\p{Lu}\\p{Ll})|\\p{Lu}(?=[\\s_-]|$)|[0-9]+","gu"));return n?n.map(s=>s.toLowerCase()).join("-"):i.split(/[\s_-]+/).filter(s=>s.length>0).map(s=>s.toLowerCase()).join("-")}_toPascalCase(e){const t=e.match(/[\p{L}0-9]+/gu);return t?t.map(i=>i.charAt(0).toUpperCase()+i.substr(1)).join(""):e}_toCamelCase(e){const t=e.match(/[\p{L}0-9]+/gu);return t?t.map((i,n)=>n===0?i.charAt(0).toLowerCase()+i.substr(1):i.charAt(0).toUpperCase()+i.substr(1)).join(""):e}_toSnakeCase(e){return e.replace(new RegExp("(\\p{Ll})(\\p{Lu})","gu"),"$1_$2").replace(/[\s\-]+/g,"_").toLowerCase()}clone(){return new je(this.index,this.shorthandName,this.ifValue,this.elseValue)}}class Bi extends xf{constructor(e){super(),this.name=e}resolve(e){let t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),t!==void 0?(this._children=[new re(t)],!0):!1}clone(){const e=new Bi(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}}function Ef(c,e){const t=[...c];for(;t.length>0;){const i=t.shift();if(!e(i))break;t.unshift(...i.children)}}class po extends is{get placeholderInfo(){if(!this._placeholders){const e=[];let t;this.walk(function(i){return i instanceof De&&(e.push(i),t=!t||t.indexn===e?(i=!0,!1):(t+=n.len(),!0)),i?t:-1}fullLen(e){let t=0;return Ef([e],i=>(t+=i.len(),!0)),t}enclosingPlaceholders(e){const t=[];let{parent:i}=e;for(;i;)i instanceof De&&t.push(i),i=i.parent;return t}resolveVariables(e){return this.walk(t=>(t instanceof Bi&&t.resolve(e)&&(this._placeholders=void 0),!0)),this}appendChild(e){return this._placeholders=void 0,super.appendChild(e)}replace(e,t){return this._placeholders=void 0,super.replace(e,t)}clone(){const e=new po;return e._children=this.children.map(t=>t.clone()),e}walk(e){Ef(this.children,e)}}class Ki{constructor(){this._scanner=new bd,this._token={type:14,pos:0,len:0}}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(e){return/\${?CLIPBOARD/.test(e)}parse(e,t,i){const n=new po;return this.parseFragment(e,n),this.ensureFinalTabstop(n,i??!1,t??!1),n}parseFragment(e,t){const i=t.children.length;for(this._scanner.text(e),this._token=this._scanner.next();this._parse(t););const n=new Map,s=[];t.walk(d=>(d instanceof De&&(d.isFinalTabstop?n.set(0,void 0):!n.has(d.index)&&d.children.length>0?n.set(d.index,d.children):s.push(d)),!0));const r=(d,h)=>{const u=n.get(d.index);if(!u)return;const g=new De(d.index);g.transform=d.transform;for(const p of u){const f=p.clone();g.appendChild(f),f instanceof De&&n.has(f.index)&&!h.has(f.index)&&(h.add(f.index),r(f,h),h.delete(f.index))}t.replace(d,[g])},l=new Set;for(const d of s)r(d,l);return t.children.slice(i)}ensureFinalTabstop(e,t,i){(t||i&&e.placeholders.length>0)&&(e.placeholders.find(s=>s.index===0)||e.appendChild(new De(0)))}_accept(e,t){if(e===void 0||this._token.type===e){const i=t?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),i}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){const t=this._token;for(;this._token.type!==e;){if(this._token.type===14)return!1;if(this._token.type===5){const n=this._scanner.next();if(n.type!==0&&n.type!==4&&n.type!==5)return!1}this._token=this._scanner.next()}const i=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),i}_parse(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let t;return(t=this._accept(5,!0))?(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new re(t)),!0):!1}_parseTabstopOrVariableName(e){let t;const i=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new De(Number(t)):new Bi(t)),!0):this._backTo(i)}_parseComplexPlaceholder(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(i);const s=new De(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(s),!0;if(!this._parse(s))return e.appendChild(new re("${"+t+":")),s.children.forEach(e.appendChild,e),!0}else if(s.index>0&&this._accept(7)){const r=new ns;for(;;){if(this._parseChoiceElement(r)){if(this._accept(2))continue;if(this._accept(7)&&(s.appendChild(r),this._accept(4)))return e.appendChild(s),!0}return this._backTo(i),!1}}else return this._accept(6)?this._parseTransform(s)?(e.appendChild(s),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(s),!0):this._backTo(i)}_parseChoiceElement(e){const t=this._token,i=[];for(;!(this._token.type===2||this._token.type===7);){let n;if((n=this._accept(5,!0))?n=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||n:n=this._accept(void 0,!0),!n)return this._backTo(t),!1;i.push(n)}return i.length===0?(this._backTo(t),!1):(e.appendChild(new re(i.join(""))),!0)}_parseComplexVariable(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(i);const s=new Bi(t);if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(s),!0;if(!this._parse(s))return e.appendChild(new re("${"+t+":")),s.children.forEach(e.appendChild,e),!0}else return this._accept(6)?this._parseTransform(s)?(e.appendChild(s),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(s),!0):this._backTo(i)}_parseTransform(e){const t=new Cd;let i="",n="";for(;!this._accept(6);){let s;if(s=this._accept(5,!0)){s=this._accept(6,!0)||s,i+=s;continue}if(this._token.type!==14){i+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let s;if(s=this._accept(5,!0)){s=this._accept(5,!0)||this._accept(6,!0)||s,t.appendChild(new re(s));continue}if(!(this._parseFormatString(t)||this._parseAnything(t)))return!1}for(;!this._accept(4);){if(this._token.type!==14){n+=this._accept(void 0,!0);continue}return!1}try{t.regexp=new RegExp(i,n)}catch{return!1}return e.transform=t,!0}_parseFormatString(e){const t=this._token;if(!this._accept(0))return!1;let i=!1;this._accept(3)&&(i=!0);const n=this._accept(8,!0);if(n)if(i){if(this._accept(4))return e.appendChild(new je(Number(n))),!0;if(!this._accept(1))return this._backTo(t),!1}else return e.appendChild(new je(Number(n))),!0;else return this._backTo(t),!1;if(this._accept(6)){const s=this._accept(9,!0);return!s||!this._accept(4)?(this._backTo(t),!1):(e.appendChild(new je(Number(n),s)),!0)}else if(this._accept(11)){const s=this._until(4);if(s)return e.appendChild(new je(Number(n),void 0,s,void 0)),!0}else if(this._accept(12)){const s=this._until(4);if(s)return e.appendChild(new je(Number(n),void 0,void 0,s)),!0}else if(this._accept(13)){const s=this._until(1);if(s){const r=this._until(4);if(r)return e.appendChild(new je(Number(n),void 0,s,r)),!0}}else{const s=this._until(4);if(s)return e.appendChild(new je(Number(n),void 0,void 0,s)),!0}return this._backTo(t),!1}_parseAnything(e){return this._token.type!==14?(e.appendChild(new re(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}function Lf(c,e,t){return(typeof t.insertText=="string"?t.insertText==="":t.insertText.snippet==="")?{edits:t.additionalEdit?.edits??[]}:{edits:[...e.map(i=>new o.ResourceTextEdit(c,{range:i,text:typeof t.insertText=="string"?Ki.escape(t.insertText)+"$0":t.insertText.snippet,insertAsSnippet:!0})),...t.additionalEdit?.edits??[]]}}function Df(c){function e(r,l){return"mimeType"in r?r.mimeType===l.handledMimeType:!!l.kind&&r.kind.contains(l.kind)}const t=new Map;for(const r of c)for(const l of r.yieldTo??[])for(const d of c)if(d!==r&&e(l,d)){let h=t.get(r);h||(h=[],t.set(r,h)),h.push(d)}if(!t.size)return Array.from(c);const i=new Set,n=[];function s(r){if(!r.length)return[];const l=r[0];if(n.includes(l))return console.warn("Yield to cycle detected",l),r;if(i.has(l))return s(r.slice(1));let d=[];const h=t.get(l);return h&&(n.push(l),d=s(h),n.pop()),i.add(l),[...d,l,...s(r.slice(1))]}return s(Array.from(c))}function Sd(c,e){return e&&(c.stack||c.stacktrace)?a.localize(33,"{0}: {1}",Tf(c),Rf(c.stack)||Rf(c.stacktrace)):Tf(c)}function Rf(c){return Array.isArray(c)?c.join(` +`):c}function Tf(c){return c.code==="ERR_UNC_HOST_NOT_ALLOWED"?`${c.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`:typeof c.code=="string"&&typeof c.errno=="number"&&typeof c.syscall=="string"?a.localize(34,"A system error occurred ({0})",c.message):c.message||a.localize(35,"An unknown error occurred. Please consult the log for more details.")}function Qr(c=null,e=!1){if(!c)return a.localize(36,"An unknown error occurred. Please consult the log for more details.");if(Array.isArray(c)){const t=a.coalesce(c),i=Qr(t[0],e);return t.length>1?a.localize(37,"{0} ({1} errors in total)",i,t.length):i}if(a.isString(c))return c;if(c.detail){const t=c.detail;if(t.error)return Sd(t.error,e);if(t.exception)return Sd(t.exception,e)}return c.stack?Sd(c,e):c.message?c.message:a.localize(38,"An unknown error occurred. Please consult the log for more details.")}var yd=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Kt=function(c,e){return function(t,i){e(t,i,c)}},wd;const Nf="acceptSelectedCodeAction",Mf="previewSelectedCodeAction";class BC{get templateId(){return"header"}renderTemplate(e){e.classList.add("group-header");const t=document.createElement("span");return e.append(t),{container:e,text:t}}renderElement(e,t,i){i.text.textContent=e.group?.title??e.label??""}disposeTemplate(e){}}class KC{get templateId(){return"separator"}renderTemplate(e){e.classList.add("separator");const t=document.createElement("span");return e.append(t),{container:e,text:t}}renderElement(e,t,i){i.text.textContent=e.label??""}disposeTemplate(e){}}let Id=class{get templateId(){return"action"}constructor(e,t,i,n,s,r,l,d,h){this._supportsPreview=e,this._onRemoveItem=t,this._onShowSubmenu=i,this._hasAnySubmenuActions=n,this._groupTitleByIndex=s,this._linkHandler=r,this._hideDefaultKeybindingTooltip=l,this._keybindingService=d,this._openerService=h}renderTemplate(e){e.classList.add(this.templateId);const t=document.createElement("div");t.className="icon",e.append(t);const i=document.createElement("span");i.className="title",e.append(i);const n=document.createElement("span");n.className="action-item-badge",e.append(n);const s=document.createElement("span");s.className="description",e.append(s);const r=document.createElement("span");r.className="group-title",e.append(r);const l=document.createElement("span");l.className="detail",e.append(l);const d=new o.KeybindingLabel(e,a.OS),h=document.createElement("div");h.className="action-list-item-toolbar",e.append(h);const u=document.createElement("div");u.className="action-list-submenu-indicator",e.append(u);const g=new a.DisposableStore;return{container:e,icon:t,text:i,detail:l,badge:n,description:s,groupTitle:r,keybinding:d,toolbar:h,submenuIndicator:u,elementDisposables:g}}renderElement(e,t,i){if(i.elementDisposables.clear(),e.group?.icon?(i.icon.className=o.ThemeIcon.asClassName(e.group.icon),e.group.icon.color&&(i.icon.style.color=o.asCssVariable(e.group.icon.color.id))):(i.icon.className=o.ThemeIcon.asClassName(a.Codicon.lightBulb),i.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!e.item||!e.label)return;if(o.setVisibility(!e.hideIcon,i.icon),e.isSectionToggle){const d=e.group?.icon===a.Codicon.chevronDown;i.container.setAttribute("aria-expanded",String(d))}else i.container.removeAttribute("aria-expanded");if(i.previousClassName&&i.container.classList.remove(i.previousClassName),i.container.classList.toggle("action-list-custom",!!e.className),e.className&&i.container.classList.add(e.className),i.previousClassName=e.className,i.text.textContent=ot(e.label),e.badge?(i.badge.textContent=e.badge,i.badge.style.display=""):(i.badge.textContent="",i.badge.style.display="none"),e.keybinding)i.description.textContent=e.keybinding.getLabel(),i.description.style.display="inline",i.description.style.letterSpacing="0.5px";else if(e.description){if(o.clearNode(i.description),typeof e.description=="string")i.description.textContent=ot(e.description);else{const d=o.renderMarkdown(e.description,{actionHandler:h=>{const u=a.URI.parse(h);this._linkHandler?this._linkHandler(u,e):this._openerService.open(u,{allowCommands:!0})}});i.elementDisposables.add(d),i.description.appendChild(d.element)}i.description.style.display="inline"}else i.description.textContent="",i.description.style.display="none";const n=this._groupTitleByIndex.get(t);n?(i.groupTitle.textContent=n,i.groupTitle.style.display=""):(i.groupTitle.textContent="",i.groupTitle.style.display="none"),e.detail?(i.detail.textContent=ot(e.detail),i.detail.style.display=""):(i.detail.textContent="",i.detail.style.display="none");const s=this._keybindingService.lookupKeybinding(Nf)?.getLabel(),r=this._keybindingService.lookupKeybinding(Mf)?.getLabel();i.container.classList.toggle("option-disabled",!!e.disabled),e.hover!==void 0?i.container.title="":e.tooltip?i.container.title=e.tooltip:e.disabled?i.container.title=e.label:this._hideDefaultKeybindingTooltip?i.container.title="":s&&r?this._supportsPreview&&e.canPreview?i.container.title=a.localize(1705,"{0} to Apply, {1} to Preview",s,r):i.container.title=a.localize(1706,"{0} to Apply",s):i.container.title="",o.clearNode(i.toolbar);const l=[...e.toolbarActions??[]];if(e.onRemove&&l.push(o.toAction({id:"actionList.remove",label:a.localize(1707,"Remove"),class:o.ThemeIcon.asClassName(a.Codicon.close),run:async()=>{await e.onRemove(),this._onRemoveItem?.(e)}})),i.container.classList.toggle("has-toolbar",l.length>0),l.length>0){const d=new o.ActionBar(i.toolbar);i.elementDisposables.add(d),d.push(l,{icon:!0,label:!1})}e.submenuActions?.length&&!e.hover?.content?(i.submenuIndicator.className="action-list-submenu-indicator has-submenu "+o.ThemeIcon.asClassName(a.Codicon.chevronRight),i.submenuIndicator.style.display="",i.submenuIndicator.style.visibility="",i.elementDisposables.add(o.addDisposableListener(i.submenuIndicator,o.EventType.CLICK,d=>{d.stopPropagation(),this._onShowSubmenu?.(e)}))):this._hasAnySubmenuActions?(i.submenuIndicator.className="action-list-submenu-indicator",i.submenuIndicator.style.display="",i.submenuIndicator.style.visibility="hidden"):(i.submenuIndicator.className="action-list-submenu-indicator",i.submenuIndicator.style.display="none")}disposeTemplate(e){e.keybinding.dispose(),e.elementDisposables.dispose()}};Id=yd([Kt(7,o.IKeybindingService),Kt(8,o.IOpenerService)],Id);class UC extends UIEvent{constructor(){super("acceptSelectedAction")}}class Pf extends UIEvent{constructor(){super("previewSelectedAction")}}function kC(c){if(c.kind==="action")return c.label}let xd=wd=class extends a.Disposable{constructor(e,t,i,n,s,r,l,d,h){if(super(),this._supportsPreview=t,this._delegate=n,this._options=r,this._keybindingService=l,this._openerService=d,this._instantiationService=h,this._headerLineHeight=24,this._separatorLineHeight=8,this.cts=this._register(new a.CancellationTokenSource),this._submenuDisposables=this._register(new a.DisposableStore),this._collapsedSections=new Set,this._filterText="",this._suppressHover=!1,this._hasLaidOut=!1,this._filterCts=this._register(new a.MutableDisposable),this._groupTitleByIndex=new Map,this._onDidRequestLayout=this._register(new a.Emitter),this.onDidRequestLayout=this._onDidRequestLayout.event,this.domNode=document.createElement("div"),this.domNode.classList.add("actionList"),this._options?.inlineDescription&&this.domNode.classList.add("inline-description"),this._options?.className){const f=this._options.className.split(/\s+/).filter(m=>m.length>0);f.length>0&&this.domNode.classList.add(...f)}if(this._actionLineHeight=24,this._submenuContainer=document.createElement("div"),this._submenuContainer.className="action-list-submenu-panel action-widget",this._submenuContainer.style.display="none",this._submenuContainer.tabIndex=-1,this.domNode.append(this._submenuContainer),this._register(o.addDisposableListener(this._submenuContainer,"mouseenter",()=>{this._cancelSubmenuHide()})),this._register(o.addDisposableListener(this._submenuContainer,"mouseleave",()=>{this._scheduleSubmenuHide()})),this._register(a.toDisposable(()=>{this._cancelSubmenuHide(),this._cancelSubmenuShow()})),this._options?.collapsedByDefault)for(const f of this._options.collapsedByDefault)this._collapsedSections.add(f);const u={getHeight:f=>this._getItemHeight(f),getTemplateId:f=>f.kind},p=(this._options?.reserveSubmenuSpace??!0)&&i.some(f=>!!f.submenuActions?.length&&!f.hover?.content);if(this._list=this._register(new o.List(e,this.domNode,u,[new Id(this._supportsPreview,f=>this._removeItem(f),f=>this._showSubmenuForItem(f),p,this._groupTitleByIndex,this._options?.linkHandler,this._options?.hideDefaultKeybindingTooltip??!1,this._keybindingService,this._openerService),new BC,new KC],{keyboardSupport:!1,typeNavigationEnabled:!this._options?.showFilter,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:kC},accessibilityProvider:{getAriaLabel:f=>{if(f.kind==="action"){let m=f.label?ot(f?.label):"";if(f.detail&&(m=m+", "+ot(f.detail)),f.ariaDescription)m=m+", "+ot(f.ariaDescription);else if(f.description){const _=typeof f.description=="string"?f.description:f.description.value;m=m+", "+ot(_)}if(f.hover?.content&&!f.ariaDescription&&!f.description){const _=f.hover.content,v=typeof _=="string"?_:o.isMarkdownString(_)?_.value:o.isHTMLElement(_)?_.textContent??void 0:void 0;v&&(!f.detail||ot(f.detail)!==ot(v))&&(m=m+", "+ot(v))}return f.group?.title&&(m=m+", "+f.group.title),f.disabled&&(m=a.localize(1708,"{0}, Disabled Reason: {1}",m,f.disabled)),f.submenuActions?.length&&(m=a.localize(1709,"{0}, use right arrow to access options",m)),m}return null},getWidgetAriaLabel:()=>a.localize(1710,"Action Widget"),getRole:f=>{switch(f.kind){case"action":return"option";case"separator":return"separator";default:return"separator"}},getWidgetRole:()=>"listbox",...s}})),this._list.style(o.defaultListStyles),this._register(this._list.onMouseClick(f=>this.onListClick(f))),this._register(this._list.onMouseOver(f=>this.onListHover(f))),this._register(this._list.onDidChangeFocus(()=>this.onFocus())),this._register(this._list.onDidChangeSelection(f=>this.onListSelection(f))),this._allMenuItems=[...i],this._options?.showFilter||this._options?.secondaryHeading){this._filterContainer=document.createElement("div"),this._filterContainer.className="action-list-filter";const f=o.append(this._filterContainer,o.$(".action-list-filter-row"));if(this._options?.showFilter){this._filterInput=document.createElement("input"),this._filterInput.type="text",this._filterInput.className="action-list-filter-input",this._filterInput.placeholder=this._options?.filterPlaceholder??a.localize(1711,"Search..."),this._filterInput.setAttribute("aria-label",a.localize(1712,"Filter items")),f.appendChild(this._filterInput);const m=this._options?.filterActions??[];if(m.length>0){const _=o.append(f,o.$(".action-list-filter-actions"));this._register(new o.ActionBar(_)).push(m,{icon:!0,label:!1})}this._register(o.addDisposableListener(this._filterInput,"input",()=>{this._filterText=this._filterInput.value,this._applyOrUpdateFilter()}))}if(this._options?.secondaryHeading){const m=o.append(f,o.$(".action-list-filter-label"));m.textContent=this._options.secondaryHeading}}if(this._options?.footerText&&(this._footerContainer=document.createElement("div"),this._footerContainer.className="action-list-footer",this._footerContainer.textContent=this._options.footerText),this._options?.headerText){if(this._headerContainer=document.createElement("div"),this._headerContainer.className="action-list-header",this._options.headerIcon){const m=o.append(this._headerContainer,o.$("span.action-list-header-icon"));m.classList.add(...o.ThemeIcon.asClassNameArray(this._options.headerIcon)),m.setAttribute("aria-hidden","true")}const f=o.append(this._headerContainer,o.$("span.action-list-header-text"));f.textContent=this._options.headerText}this._applyFilter(),this._list.length&&this._focusCheckedOrFirst(),this._register(o.addDisposableListener(this.domNode,"keydown",f=>{if(f.key==="ArrowRight"){const m=this._list.getFocus();if(m.length>0){const _=this._list.element(m[0]);if(_?.submenuActions?.length){o.EventHelper.stop(f,!0);const v=this._getRowElement(m[0]);v&&(this._showSubmenuForElement(_,v),this._currentSubmenuWidget?.focus())}}}})),this._filterInput&&this._register(o.addDisposableListener(this.domNode,"keydown",f=>{this._filterInput&&!o.isActiveElement(this._filterInput)&&f.key.length===1&&f.key!==" "&&!f.ctrlKey&&!f.metaKey&&!f.altKey&&(this._filterInput.focus(),this._filterInput.value=f.key,this._filterText=f.key,this._applyOrUpdateFilter(),f.preventDefault(),f.stopPropagation())}))}_toggleSection(e){this._collapsedSections.has(e)?this._collapsedSections.delete(e):this._collapsedSections.add(e),this._options?.onDidToggleSection?.(e,this._collapsedSections.has(e)),this._applyFilter()}_applyOrUpdateFilter(){if(!this._delegate.onFilter){this._applyFilter();return}const e=this._filterText;this._filterCts.value?.cancel();const t=new a.CancellationTokenSource;this._filterCts.value=t,this._delegate.onFilter(e,t.token).then(i=>{t.token.isCancellationRequested||(this._allMenuItems=[...i],this._applyFilter(!0))}).catch(()=>{})}_applyFilter(e=!1,t=!0){const i=e?"":this._filterText.toLowerCase(),n=!e&&i.length>0,s=[],r=this._list.getFocus();let l;if(r.length>0&&(l=this._list.element(r[0])),n){let f,m=[],_=!1;const v=()=>{f&&_&&s.push(f),s.push(...m),f=void 0,m=[],_=!1},b=S=>{const w=(S.label??"").toLowerCase(),I=typeof S.description=="string"?S.description:S.description?.value??"";return w.includes(i)||I.toLowerCase().includes(i)};for(const S of this._allMenuItems)if(S.kind!=="header"){if(S.kind==="separator"){v(),f=S.label?S:void 0;continue}if(S.showAlways){m.push(S);continue}S.isSectionToggle||b(S)&&(_=!0,m.push(S))}v()}else for(const f of this._allMenuItems){if(f.kind==="header"){s.push(f);continue}if(f.kind==="separator"){if(f.section&&this._collapsedSections.has(f.section))continue;s.push(f);continue}if(f.isSectionToggle&&f.section){const m=this._collapsedSections.has(f.section);s.push({...f,group:{...f.group,icon:m?a.Codicon.chevronRight:a.Codicon.chevronDown}});continue}f.section&&this._collapsedSections.has(f.section)||s.push(f)}const d=[];let h=!1;for(let f=0;f=0;f--){if(s[f].kind==="action"){g=!0;continue}s[f].kind==="separator"&&(u[f]=g,g=!1)}for(let f=s.length-1;f>=0;f--){const m=s[f];if(m.kind!=="separator")continue;const _=u[f],v=!m.label&&!d[f];(!_||v)&&s.splice(f,1)}this._options?.showGroupTitleOnFirstItem&&this._recomputeGroupTitles(s);const p=this._filterInput&&o.isActiveElement(this._filterInput);if(this._list.splice(0,this._list.length,s),t&&this._onDidRequestLayout.fire(),p)this._filterInput?.focus(),this._focusCheckedOrFirst();else if(this._hasLaidOut&&l){const f=l.item?.id;if(f){for(let m=0;m0)return this._list.element(e[0])}_focusCheckedOrFirst(){this._suppressHover=!0;try{for(let t=0;t0&&this._list.reveal(e[0])}finally{this._suppressHover=!1}}hide(e){this._delegate.onHide(e),this.cts.cancel(),this._filterCts.value?.cancel(),this._filterCts.clear(),this._hideSubmenu()}clearFilter(){return this._filterInput&&this._filterText?(this._filterInput.value="",this._filterText="",this._applyOrUpdateFilter(),!0):!1}get hasDynamicHeight(){return this._options?.showFilter?!0:this._allMenuItems.some(e=>e.isSectionToggle)}get lineHeight(){return this._actionLineHeight}_getItemHeight(e){switch(e.kind){case"header":return this._headerLineHeight;case"separator":return e.label?this._actionLineHeight:this._separatorLineHeight;default:return e.detail?this._options?.detailItemHeight??48:this._actionLineHeight}}computeFullHeight(){let e=0;for(const t of this._allMenuItems)e+=this._getItemHeight(t);return e}computeListHeight(){const e=this._list.length;let t=0;for(let i=0;iMath.min(Math.max(u,i),s);let l=i;const d=this._allMenuItems.length;if(d>=50)return r(380);if(d>t){const u=[];for(let m=0;m0){this._list.focusPrevious(1,!1,void 0,this.focusCondition);const n=this._list.getFocus();n.length>0&&n[0]>=i[0]?this._filterInput.focus():n.length>0&&this._list.reveal(n[0])}else{this._list.focusLast(void 0,this.focusCondition);const n=this._list.getFocus();n.length>0&&this._list.reveal(n[0])}return}const e=this._list.getFocus();this._list.focusPrevious(1,!0,void 0,this.focusCondition);const t=this._list.getFocus();if(t.length>0){if(this._filterInput&&e.length>0&&t[0]>e[0]){this._list.setFocus([]),this._filterInput.focus();return}this._list.reveal(t[0])}}focusNext(){if(this._filterInput&&o.isActiveElement(this._filterInput)){if(this._list.domFocus(),this._list.getFocus().length>0){this._list.focusNext(1,!1,void 0,this.focusCondition);const n=this._list.getFocus();n.length>0&&this._list.reveal(n[0])}else{this._list.focusFirst(void 0,this.focusCondition);const n=this._list.getFocus();n.length>0&&this._list.reveal(n[0])}return}const e=this._list.getFocus();this._list.focusNext(1,!0,void 0,this.focusCondition);const t=this._list.getFocus();if(t.length>0){if(this._filterInput&&e.length>0&&t[0]{this._toggleSection(i)});return}if(o.isMouseEvent(e.browserEvent)){const i=e.browserEvent.target;if(o.isHTMLElement(i)&&(i.closest(".action-list-item-toolbar")||i.closest(".action-list-submenu-indicator"))){this._list.setSelection([]);return}}if(t.item&&this.focusCondition(t)){const i=e.browserEvent instanceof Pf;this._delegate.onSelect(t.item,i&&this._supportsPreview)}else this._list.setSelection([])}onFocus(){const e=this._list.getFocus();if(e.length===0)return;const t=e[0],i=this._list.element(t);this._delegate.onFocus?.(i.item),this._suppressHover||this._showHoverForElement(i,t)}_removeItem(e){const t=this._allMenuItems.indexOf(e);t>=0&&(this._allMenuItems.splice(t,1),this._applyFilter())}_recomputeGroupTitles(e){this._groupTitleByIndex.clear();const t=new Set;for(let i=0;i=0){const i=this._getRowElement(t);i&&this._showSubmenuForElement(e,i)}}_showSubmenuForElement(e,t){if(this._currentSubmenuElement===e)return;this._submenuDisposables.clear(),this._currentSubmenuElement=e,this._clearSubmenuContainer();let i;const n=e.hover?.content;if(n){if(o.isHTMLElement(n))i=n,e.hover?.disposable&&this._register(e.hover.disposable);else{const y=typeof n=="string"?new o.MarkdownString(n):n,x=this._options?.linkHandler,L=o.renderMarkdown(y,{actionHandler:E=>{const R=a.URI.parse(E);x?x(R,e):this._openerService.open(R,{allowCommands:!0})}});this._submenuDisposables.add(L),i=L.element}i.classList.add("action-list-submenu-hover-header"),e.submenuActions?.length&&i.classList.add("has-submenu"),this._submenuContainer.appendChild(i)}const s=!!e.submenuActions?.length;this._submenuContainer.style.display="",this._submenuContainer.style.position="absolute",this._submenuContainer.removeAttribute("role");const r=t.getBoundingClientRect(),l=this.domNode.getBoundingClientRect(),d=o.getWindow(this.domNode);let h=0,u=i?i.offsetWidth:0;if(s){const y=[],L=e.submenuActions.filter(T=>T instanceof o.SubmenuAction).filter(T=>T.actions.length>0);for(let T=0;T{},onSelect:T=>{T.run();const M=this._currentSubmenuElement?.item;this._hideSubmenu(),M&&this._delegate.onSelect(M),this.hide()}},R=this._submenuDisposables.add(this._instantiationService.createInstance(wd,"submenu",!1,y,E,void 0,void 0));this._submenuContainer.appendChild(R.domNode),this._currentSubmenuWidget=R,R.clearFocus(),h=R.computeListHeight(),R.layout(h);const D=R.computeMaxWidth(0);u=Math.max(u,D),R.layout(h,u),R.domNode.style.width=`${u}px`,this._submenuDisposables.add(o.addDisposableListener(R.domNode,"keydown",T=>{if(T.key==="ArrowLeft"||T.key==="Escape")o.EventHelper.stop(T,!0),this._hideSubmenu(),this._list.domFocus();else if(T.key==="Enter"){o.EventHelper.stop(T,!0);const M=R.getFocusedElement();if(M?.item){M.item.run();const A=this._currentSubmenuElement?.item;this._hideSubmenu(),A&&this._delegate.onSelect(A),this.hide()}}else T.key==="ArrowDown"?(o.EventHelper.stop(T,!0),R.focusNext()):T.key==="ArrowUp"&&(o.EventHelper.stop(T,!0),R.focusPrevious())}))}const p=d.innerWidth-r.right,f=l.left,m=u+10,_=4;p>=m||p>=f?this._submenuContainer.style.left=`${l.right-l.left+_}px`:this._submenuContainer.style.left=`${-m-_}px`;const v=i?i.offsetHeight:0,b=h+v,S=d.innerHeight,w=r.height;let I=r.top-l.top+(w-b)/2;const C=l.top+I+b;C>S&&(I-=C-S+8),l.top+I<0&&(I=-l.top),this._submenuContainer.style.top=`${I}px`}_hideSubmenu(){this._cancelSubmenuHide(),this._cancelSubmenuShow(),this._submenuDisposables.clear(),this._currentSubmenuWidget=void 0,this._currentSubmenuElement=void 0,this._clearSubmenuContainer(),this._submenuContainer.style.display="none"}_clearSubmenuContainer(){this._submenuContainer.contains(o.getActiveElement())&&this._list.domFocus(),o.clearNode(this._submenuContainer)}_scheduleSubmenuHide(){this._cancelSubmenuHide(),this._submenuHideTimeout=setTimeout(()=>{this._hideSubmenu()},300)}_cancelSubmenuHide(){this._submenuHideTimeout!==void 0&&(clearTimeout(this._submenuHideTimeout),this._submenuHideTimeout=void 0)}_scheduleSubmenuShow(e,t){this._cancelSubmenuShow(),this._submenuShowTimeout=setTimeout(()=>{this._submenuShowTimeout=void 0;const i=typeof t=="number"?this._getRowElement(t):null;i&&this._showSubmenuForElement(e,i)},500)}_cancelSubmenuShow(){this._submenuShowTimeout!==void 0&&(clearTimeout(this._submenuShowTimeout),this._submenuShowTimeout=void 0)}async onListHover(e){const t=e.element;if(t&&t.item&&this.focusCondition(t)){if(o.isHTMLElement(e.browserEvent.target)&&e.browserEvent.target.closest(".action-list-item-toolbar")!==null){t.submenuActions?.length||this._cancelSubmenuShow(),this._list.setFocus([]);return}const n=!!(t.submenuActions?.length||t.hover?.content);if(n&&(this._suppressHover=!0),this._list.setFocus(typeof e.index=="number"?[e.index]:[]),n&&(this._suppressHover=!1),n){this._currentSubmenuElement===t?(this._cancelSubmenuHide(),this._cancelSubmenuShow()):(this._hideSubmenu(),this._scheduleSubmenuShow(t,e.index));return}if(this._currentSubmenuElement===t?this._cancelSubmenuHide():(this._cancelSubmenuShow(),this._hideSubmenu()),this._delegate.onHover&&!t.disabled&&t.kind==="action"&&this._currentSubmenuElement!==t){const s=await this._delegate.onHover(t.item,this.cts.token),r=s?s.canPreview:void 0;r!==t.canPreview&&(t.canPreview=r,typeof e.index=="number"&&(this._list.splice(e.index,1,[t]),this._list.setFocus([e.index])))}}else t&&t.hover?.content&&typeof e.index=="number"&&(this._currentSubmenuElement===t?(this._cancelSubmenuHide(),this._cancelSubmenuShow()):(this._hideSubmenu(),this._scheduleSubmenuShow(t,e.index)))}onListClick(e){e.element&&this.focusCondition(e.element)&&this._list.setFocus([])}};xd=wd=yd([Kt(6,o.IKeybindingService),Kt(7,o.IOpenerService),Kt(8,o.IInstantiationService)],xd);let Ed=class extends a.Disposable{get domNode(){return this._widget.domNode}get filterContainer(){return this._widget.filterContainer}get footerContainer(){return this._widget.footerContainer}get headerContainer(){return this._widget.headerContainer}get filterInput(){return this._widget.filterInput}get anchorPosition(){if(this._showAbove!==void 0)return this._showAbove?1:0}constructor(e,t,i,n,s,r,l,d,h,u){super(),this._contextViewService=d,this._layoutService=h,this._lastMinWidth=0,this._hasLaidOut=!1,this._anchor=l,this._widget=this._register(u.createInstance(xd,e,t,i,n,s,r)),this._register(this._widget.onDidRequestLayout(()=>{this._hasLaidOut&&(this.layout(this._lastMinWidth),this._contextViewService.layout())}))}focus(){this._widget.focus()}hide(e){this._widget.hide(e),this._contextViewService.hideContextView()}clearFilter(){return this._widget.clearFilter()}focusPrevious(){this._widget.focusPrevious()}focusNext(){this._widget.focusNext()}collapseFocusedSection(){this._widget.collapseFocusedSection()}expandFocusedSection(){this._widget.expandFocusedSection()}toggleFocusedSection(){return this._widget.toggleFocusedSection()}acceptSelected(e){this._widget.acceptSelected(e)}hasDynamicHeight(){return this._widget.hasDynamicHeight}computeActionWidgetVerticalChromeHeight(){const e=this.domNode.parentElement?.closest(".action-widget");if(!e)return 0;const t=o.getWindow(e).getComputedStyle(e),i=n=>Number.parseFloat(n)||0;return i(t.paddingTop)+i(t.paddingBottom)+i(t.borderTopWidth)+i(t.borderBottomWidth)}computeHeight(){const e=this._widget.computeListHeight(),t=this._widget.filterContainer?36:0,i=this._widget.footerContainer?32:0,n=this._widget.headerContainer?this._widget.headerContainer.offsetHeight||36:0,s=t+i+n,r=o.getWindow(this.domNode);let l;if(this.hasDynamicHeight()){const p=r.innerHeight,f=o.getAnchorRect(this._anchor),m=f.top-r.pageYOffset,v=p-m-f.height-30,b=m;if(this._showAbove===void 0){const S=s+this._widget.computeFullHeight();this._showAbove=S>v&&b>v}l=Math.max(0,(this._showAbove?b:v)-this.computeActionWidgetVerticalChromeHeight())}else{const f=this._layoutService.getContainer(r).clientHeight,m=this.domNode.getBoundingClientRect().top;l=m>0?f-m-10:f*.7}const d=Math.floor(r.innerHeight*.6),h=this._widget.lineHeight,u=Math.min(Math.max(l,h*3+s),d);return Math.min(e+s,u)-s}layout(e){this._hasLaidOut=!0,this._lastMinWidth=e;const t=this.computeHeight();this._widget.layout(t);const i=this._widget.computeMaxWidth(e);return this._cachedMaxWidth=i,this._widget.layout(t,this._cachedMaxWidth),this._cachedMaxWidth}};Ed=yd([Kt(7,o.IContextViewService),Kt(8,o.ILayoutService),Kt(9,o.IInstantiationService)],Ed);function ot(c){return c.replace(/\r\n|\r|\n/g," ")}var jC=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ld=function(c,e){return function(t,i){e(t,i,c)}};o.registerColor("actionBar.toggledBackground",o.inputActiveOptionBackground,a.localize(1713,"Background color for toggled action items in action bar."));const he={Visible:new o.RawContextKey("codeActionMenuVisible",!1,a.localize(1714,"Whether the action widget list is visible")),FilterFocused:new o.RawContextKey("codeActionMenuFilterFocused",!1,a.localize(1715,"Whether the action widget filter input is focused"))},Ne=o.createDecorator("actionWidgetService");let $e=class extends a.Disposable{get isVisible(){return he.Visible.getValue(this._contextKeyService)||!1}constructor(e,t,i){super(),this._contextViewService=e,this._contextKeyService=t,this._instantiationService=i,this._list=this._register(new a.MutableDisposable)}show(e,t,i,n,s,r,l,d,h){const u=he.Visible.bindTo(this._contextKeyService),g=this._instantiationService.createInstance(Ed,e,t,i,n,d,h,s);this._contextViewService.showContextView({getAnchor:()=>s,render:p=>(u.set(!0),this._renderWidget(p,g,l??[])),onHide:p=>{u.reset(),this._onWidgetClosed(p)},get anchorPosition(){return g.anchorPosition}},r,!1)}acceptSelected(e){this._list.value?.acceptSelected(e)}focusPrevious(){this._list?.value?.focusPrevious()}focusNext(){this._list?.value?.focusNext()}collapseSection(){this._list?.value?.collapseFocusedSection()}expandSection(){this._list?.value?.expandFocusedSection()}toggleSection(){return this._list?.value?.toggleFocusedSection()??!1}clearFilter(){return this._list?.value?.clearFilter()??!1}hide(e){this._list.value?.hide(e),this._list.clear()}_renderWidget(e,t,i){const n=document.createElement("div");if(n.classList.add("action-widget"),e.appendChild(n),this._list.value=t,this._list.value)this._list.value.headerContainer&&n.appendChild(this._list.value.headerContainer),this._list.value.filterContainer&&n.appendChild(this._list.value.filterContainer),n.appendChild(this._list.value.domNode),this._list.value.footerContainer&&n.appendChild(this._list.value.footerContainer);else throw new Error("List has no value");const s=new a.DisposableStore,r=this._list.value.headerContainer;r&&s.add(o.addDisposableGenericMouseDownListener(r,_=>_.preventDefault()));const l=document.createElement("div"),d=e.appendChild(l);d.classList.add("context-view-block"),s.add(o.addDisposableGenericMouseDownListener(d,_=>_.stopPropagation()));const h=document.createElement("div"),u=e.appendChild(h);u.classList.add("context-view-pointerBlock"),s.add(o.addDisposableListener(u,o.EventType.POINTER_MOVE,()=>u.remove())),s.add(o.addDisposableGenericMouseDownListener(u,()=>u.remove()));let g=0;if(i.length){const _=this._createActionBar(".action-widget-action-bar",i);_&&(n.appendChild(_.getContainer().parentElement),s.add(_),g=_.getContainer().offsetWidth)}const p=this._list.value?.layout(g);n.style.width=`${p}px`,this._list.value?.focus();const f=he.FilterFocused.bindTo(this._contextKeyService);if(s.add({dispose:()=>f.reset()}),this._list.value?.filterInput){const _=this._list.value.filterInput;s.add(o.addDisposableListener(_,"focus",()=>f.set(!0))),s.add(o.addDisposableListener(_,"blur",()=>f.set(!1)))}const m=s.add(o.trackFocus(e));return s.add(m.onDidBlur(()=>{const _=o.getActiveElement();_?.closest(".action-widget-hover")||_?.closest(".action-list-submenu-panel")||this.hide(!0)})),s}_createActionBar(e,t){if(!t.length)return;const i=o.$(e),n=new o.ActionBar(i);return n.push(t,{icon:!1,label:!0}),n}_onWidgetClosed(e){this._list.value?.hide(e)}};$e=jC([Ld(0,o.IContextViewService),Ld(1,o.IContextKeyService),Ld(2,o.IInstantiationService)],$e),o.registerSingleton(Ne,$e,1);const St=1100;o.registerAction2(class extends o.Action2{constructor(){super({id:"hideCodeActionWidget",title:a.localize2(1716,"Hide action widget"),precondition:he.Visible,keybinding:{weight:St,primary:9,secondary:[1033]}})}run(c){c.get(Ne).hide(!0)}}),o.registerAction2(class extends o.Action2{constructor(){super({id:"clearFilterCodeActionWidget",title:a.localize2(1717,"Clear action widget filter"),precondition:o.ContextKeyExpr.and(he.Visible,he.FilterFocused),keybinding:{weight:St+1,primary:9}})}run(c){const e=c.get(Ne);e instanceof $e&&(e.clearFilter()||e.hide(!0))}}),o.registerAction2(class extends o.Action2{constructor(){super({id:"selectPrevCodeAction",title:a.localize2(1718,"Select previous action"),precondition:he.Visible,keybinding:{weight:St,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(c){const e=c.get(Ne);e instanceof $e&&e.focusPrevious()}}),o.registerAction2(class extends o.Action2{constructor(){super({id:"selectNextCodeAction",title:a.localize2(1719,"Select next action"),precondition:he.Visible,keybinding:{weight:St,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(c){const e=c.get(Ne);e instanceof $e&&e.focusNext()}}),o.registerAction2(class extends o.Action2{constructor(){super({id:"collapseSectionCodeAction",title:a.localize2(1720,"Collapse section"),precondition:o.ContextKeyExpr.and(he.Visible,he.FilterFocused.negate()),keybinding:{weight:St,primary:15}})}run(c){const e=c.get(Ne);e instanceof $e&&e.collapseSection()}}),o.registerAction2(class extends o.Action2{constructor(){super({id:"expandSectionCodeAction",title:a.localize2(1721,"Expand section"),precondition:o.ContextKeyExpr.and(he.Visible,he.FilterFocused.negate()),keybinding:{weight:St,primary:17}})}run(c){const e=c.get(Ne);e instanceof $e&&e.expandSection()}}),o.registerAction2(class extends o.Action2{constructor(){super({id:"toggleSectionCodeAction",title:a.localize2(1722,"Toggle section"),precondition:o.ContextKeyExpr.and(he.Visible,he.FilterFocused.negate()),keybinding:{weight:St,primary:10}})}run(c){const e=c.get(Ne);e instanceof $e&&(e.toggleSection()||e.acceptSelected())}}),o.registerAction2(class extends o.Action2{constructor(){super({id:Nf,title:a.localize2(1723,"Accept selected action"),precondition:he.Visible,keybinding:{weight:St,primary:3,secondary:[2137]}})}run(c){const e=c.get(Ne);e instanceof $e&&e.acceptSelected()}}),o.registerAction2(class extends o.Action2{constructor(){super({id:Mf,title:a.localize2(1724,"Preview selected action"),precondition:he.Visible,keybinding:{weight:St,primary:2051}})}run(c){const e=c.get(Ne);e instanceof $e&&e.acceptSelected(!0)}});var Of=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ss=function(c,e){return function(t,i){e(t,i,c)}},Dd;let Rd=(fn=class extends a.Disposable{constructor(e,t,i,n,s,r,l,d,h,u,g){super(),this.typeId=e,this.editor=t,this.showCommand=n,this.range=s,this.edits=r,this.onSelectNewEdit=l,this.additionalActions=d,this._keybindingService=u,this._actionWidgetService=g,this.allowEditorOverflow=!0,this.suppressMouseDown=!0,this.create(),this.visibleContext=i.bindTo(h),this.visibleContext.set(!0),this._register(a.toDisposable(()=>this.visibleContext.reset())),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this),this._register(a.toDisposable((()=>this.editor.removeContentWidget(this)))),this._register(this.editor.onDidChangeCursorPosition(p=>{this.dispose()})),this._register(a.Event.runAndSubscribe(u.onDidUpdateKeybindings,()=>{this._updateButtonTitle()}))}_updateButtonTitle(){this.button.element.title=this._keybindingService.appendKeybinding(this.showCommand.label,this.showCommand.id)}create(){this.domNode=o.$(".post-edit-widget"),this.button=this._register(new o.Button(this.domNode,{supportIcons:!0})),this.button.label="$(insert)",this._register(o.addDisposableListener(this.domNode,o.EventType.CLICK,()=>this.showSelector()))}getId(){return Dd.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:this.range.getEndPosition(),preference:[2]}}showSelector(){const e=o.getDomNodePagePosition(this.button.element),t={x:e.left+e.width,y:e.top+e.height};this._actionWidgetService.show("postEditWidget",!1,this.edits.allEdits.map((i,n)=>({kind:"action",item:i,label:i.title,disabled:!1,canPreview:!1,group:{title:"",icon:o.ThemeIcon.fromId(n===this.edits.activeEditIndex?a.Codicon.check.id:a.Codicon.blank.id)}})),{onHide:()=>{this.editor.focus()},onSelect:i=>{this._actionWidgetService.hide(!1);const n=this.edits.allEdits.findIndex(s=>s===i);if(n!==this.edits.activeEditIndex)return this.onSelectNewEdit(n)}},t,this.editor.getDomNode()??void 0,this.additionalActions)}},Dd=fn,fn.baseId="editor.widget.postEditWidget",fn);Rd=Dd=Of([ss(8,o.IContextKeyService),ss(9,o.IKeybindingService),ss(10,Ne)],Rd);let Jr=class extends a.Disposable{constructor(e,t,i,n,s,r,l,d){super(),this._id=e,this._editor=t,this._visibleContext=i,this._showCommand=n,this._getAdditionalActions=s,this._instantiationService=r,this._bulkEditService=l,this._notificationService=d,this._currentWidget=this._register(new a.MutableDisposable),this._register(a.Event.any(t.onDidChangeModel,t.onDidChangeModelContent)(()=>this.clear()))}async applyEditAndShowIfNeeded(e,t,i,n,s){if(!e.length||!this._editor.hasModel())return;const r=this._editor.getModel(),l=t.allEdits.at(t.activeEditIndex);if(!l)return;const d=async b=>{const S=this._editor.getModel();S&&(await S.undo(),this.applyEditAndShowIfNeeded(e,{activeEditIndex:b,allEdits:t.allEdits},i,n,s))},h=(b,S)=>{a.isCancellationError(b)||(this._notificationService.error(S),i&&this.show(e[0],t,d))},u=new o.EditorStateCancellationTokenSource(this._editor,3,void 0,s);let g;try{g=await a.raceCancellationError(n(l,u.token),u.token)}catch(b){return h(b,a.localize(976,`Error resolving edit '{0}': +{1}`,l.title,Qr(b)))}finally{u.dispose()}if(s.isCancellationRequested)return;const p=Lf(r.uri,e,g),f=e[0],m=r.deltaDecorations([],[{range:f,options:{description:"paste-line-suffix",stickiness:0}}]);this._editor.focus();let _,v;try{_=await this._bulkEditService.apply(p,{editor:this._editor,token:s}),v=r.getDecorationRange(m[0])}catch(b){return h(b,a.localize(977,`Error applying edit '{0}': +{1}`,l.title,Qr(b)))}finally{r.deltaDecorations(m,[])}s.isCancellationRequested||i&&_.isApplied&&t.allEdits.length>1&&this.show(v??f,t,d)}show(e,t,i){this.clear(),this._editor.hasModel()&&(this._currentWidget.value=this._instantiationService.createInstance(Rd,this._id,this._editor,this._visibleContext,this._showCommand,e,t,i,this._getAdditionalActions()))}clear(){this._currentWidget.clear()}tryShowSelector(){this._currentWidget.value?.showSelector()}};Jr=Of([ss(5,o.IInstantiationService),ss(6,o.IBulkEditService),ss(7,o.INotificationService)],Jr);var $C=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},yt=function(c,e){return function(t,i){e(t,i,c)}},Me;const Af="editor.changePasteType",qC="editor.pasteAs.preferences",Td=new o.RawContextKey("pasteWidgetVisible",!1,a.localize(956,"Whether the paste widget is showing")),Nd="application/vnd.code.copymetadata";let wt=(mn=class extends a.Disposable{static get(e){return e.getContribution(Me.ID)}constructor(e,t,i,n,s,r,l,d,h,u){super(),this._logService=i,this._bulkEditService=n,this._clipboardService=s,this._commandService=r,this._configService=l,this._languageFeaturesService=d,this._quickInputService=h,this._progressService=u,this._editor=e,this._register(e.onWillCopy(g=>this.handleCopy(g))),this._register(e.onWillCut(g=>this.handleCopy(g))),this._register(e.onWillPaste(g=>this.handlePaste(g))),this._pasteProgressManager=this._register(new Zr("pasteIntoEditor",e,t)),this._postPasteWidgetManager=this._register(t.createInstance(Jr,"pasteIntoEditor",e,Td,{id:Af,label:a.localize(957,"Show paste options...")},()=>Me._configureDefaultAction?[Me._configureDefaultAction]:[]))}changePasteType(){this._postPasteWidgetManager.tryShowSelector()}async pasteAs(e){this._logService.trace("CopyPasteController.pasteAs"),this._editor.focus();try{this._logService.trace("Before calling editor.action.clipboardPasteAction"),this._pasteAsActionContext={preferred:e},await this._commandService.executeCommand("editor.action.clipboardPasteAction")}finally{this._pasteAsActionContext=void 0}}clearWidgets(){this._postPasteWidgetManager.clear()}isPasteAsEnabled(){return this._editor.getOption(97).enabled}async finishedPaste(){await this._currentPasteOperation}handleCopy(e){if(this._logService.trace("CopyPasteController#handleCopy"),!this._editor.hasTextFocus()||(this._clipboardService.clearInternalState?.(),!this.isPasteAsEnabled()))return;const t=this._editor.getModel(),i=this._editor._getViewModel(),n=this._editor.getSelections();if(!t||!i||!n?.length)return;const s={multicursorText:e.dataToCopy.multicursorText??null,pasteOnNewLine:e.dataToCopy.isFromEmptySelection,mode:null},r=this._languageFeaturesService.documentPasteEditProvider.ordered(t).filter(g=>!!g.prepareDocumentPaste);if(!r.length){this.setCopyMetadata(e.clipboardData,{defaultPastePayload:s});return}const l=new o.VSDataTransfer,d=r.flatMap(g=>g.copyMimeTypes??[]),h=o.generateUuid();this.setCopyMetadata(e.clipboardData,{id:h,providerCopyMimeTypes:d,defaultPastePayload:s});const u=r.map(g=>({providerMimeTypes:g.copyMimeTypes,operation:a.createCancelablePromise(p=>g.prepareDocumentPaste(t,e.dataToCopy.sourceRanges,l,p).catch(f=>{console.error(f)}))}));Me._currentCopyOperation?.operations.forEach(g=>g.operation.cancel()),Me._currentCopyOperation={handle:h,operations:u}}async handlePaste(e){if(this._logService.trace("CopyPasteController#handlePaste for id : ",e.metadata?.id),!this._editor.hasTextFocus())return;const t=e.toExternalVSDataTransfer();if(!t)return;t.delete(Nd),me.get(this._editor)?.closeMessage(),this._currentPasteOperation?.cancel(),this._currentPasteOperation=void 0;const i=this._editor.getModel(),n=this._editor.getSelections();if(!n?.length||!i||this._editor.getOption(104)||!this.isPasteAsEnabled()&&!this._pasteAsActionContext)return;const s=this.fetchCopyMetadata(e);this._logService.trace("CopyPasteController#handlePaste with metadata : ",s?.id," and text.length : ",e.clipboardData.getData("text/plain").length);const r=Array.from(e.clipboardData.files).map(h=>h.type),l=[...e.clipboardData.types,...r,...s?.providerCopyMimeTypes??[],o.Mimes.uriList],d=this._languageFeaturesService.documentPasteEditProvider.ordered(i).filter(h=>{const u=this._pasteAsActionContext?.preferred;return u&&!this.providerMatchesPreference(h,u)?!1:h.pasteMimeTypes?.some(g=>o.matchesMimeType(g,l))});if(!d.length){this._pasteAsActionContext?.preferred&&(this.showPasteAsNoEditMessage(n,this._pasteAsActionContext.preferred),e.setHandled());return}e.setHandled(),this._pasteAsActionContext?this.showPasteAsPick(this._pasteAsActionContext.preferred,d,n,t,s):this.doPasteInline(d,n,t,s,e.browserEvent)}showPasteAsNoEditMessage(e,t){const i="only"in t?t.only.value:"preferences"in t?t.preferences.length?t.preferences.map(n=>n.value).join(", "):a.localize(958,"empty"):t.providerId;me.get(this._editor)?.showMessage(a.localize(959,"No paste edits for '{0}' found",i),e[0].getStartPosition())}doPasteInline(e,t,i,n,s){this._logService.trace("CopyPasteController#doPasteInline");const r=this._editor;if(!r.hasModel())return;const l=new o.EditorStateCancellationTokenSource(r,3,void 0),d=a.createCancelablePromise(async h=>{const u=this._editor;if(!u.hasModel())return;const g=u.getModel(),p=new a.DisposableStore,f=p.add(new a.CancellationTokenSource(h));p.add(l.token.onCancellationRequested(()=>f.cancel()));const m=f.token;try{if(await this.mergeInDataFromCopy(e,i,n,m),m.isCancellationRequested)return;const _=e.filter(S=>this.isSupportedPasteProvider(S,i));if(!_.length||_.length===1&&_[0]instanceof zi)return this.applyDefaultPasteHandler(i,n,m,s);const v={triggerKind:a.DocumentPasteTriggerKind.Automatic},b=await this.getPasteEdits(_,i,g,t,v,m);if(p.add(b),m.isCancellationRequested)return;if(b.edits.length===1&&b.edits[0].provider instanceof zi)return this.applyDefaultPasteHandler(i,n,m,s);if(b.edits.length){const S=u.getOption(97).showPasteSelector==="afterPaste";return this._postPasteWidgetManager.applyEditAndShowIfNeeded(t,{activeEditIndex:this.getInitialActiveEditIndex(g,b.edits),allEdits:b.edits},S,async(w,I)=>{if(!w.provider.resolveDocumentPasteEdit)return w;const C=w.provider.resolveDocumentPasteEdit(w,I),y=new a.DeferredPromise,x=await this._pasteProgressManager.showWhile(t[0].getEndPosition(),a.localize(960,"Resolving paste edit for '{0}'. Click to cancel",w.title),a.raceCancellation(Promise.race([y.p,C]),I),{cancel:()=>y.cancel()},0);return x&&(w.insertText=x.insertText,w.additionalEdit=x.additionalEdit),w},m)}await this.applyDefaultPasteHandler(i,n,m,s)}finally{p.dispose(),this._currentPasteOperation===d&&(this._currentPasteOperation=void 0)}});this._pasteProgressManager.showWhile(t[0].getEndPosition(),a.localize(961,"Running paste handlers. Click to cancel and do basic paste"),d,{cancel:async()=>{d.cancel(),!l.token.isCancellationRequested&&await this.applyDefaultPasteHandler(i,n,l.token,s)}}).finally(()=>{l.dispose()}),this._currentPasteOperation=d}showPasteAsPick(e,t,i,n,s){this._logService.trace("CopyPasteController#showPasteAsPick");const r=a.createCancelablePromise(async l=>{const d=this._editor;if(!d.hasModel())return;const h=d.getModel(),u=new a.DisposableStore,g=u.add(new o.EditorStateCancellationTokenSource(d,3,void 0,l));try{if(await this.mergeInDataFromCopy(t,n,s,g.token),g.token.isCancellationRequested)return;let p=t.filter(b=>this.isSupportedPasteProvider(b,n,e));e&&(p=p.filter(b=>this.providerMatchesPreference(b,e)));const f={triggerKind:a.DocumentPasteTriggerKind.PasteAs,only:e&&"only"in e?e.only:void 0};let m=u.add(await this.getPasteEdits(p,n,h,i,f,g.token));if(g.token.isCancellationRequested)return;if(e&&(m={edits:m.edits.filter(b=>"only"in e?e.only.contains(b.kind):"preferences"in e?e.preferences.some(S=>S.contains(b.kind)):e.providerId===b.provider.id),dispose:m.dispose}),!m.edits.length){e&&this.showPasteAsNoEditMessage(i,e);return}let _;if(e)_=m.edits.at(0);else{const b={id:"editor.pasteAs.default",label:a.localize(962,"Configure default paste action"),edit:void 0},S=await this._quickInputService.pick([...m.edits.map(w=>({label:w.title,description:w.kind?.value,edit:w})),...Me._configureDefaultAction?[a.upcast({type:"separator"}),{label:Me._configureDefaultAction.label,edit:void 0}]:[]],{placeHolder:a.localize(963,"Select Paste Action")});if(S===b){Me._configureDefaultAction?.run();return}_=S?.edit}if(!_)return;const v=Lf(h.uri,i,_);await this._bulkEditService.apply(v,{editor:this._editor})}finally{u.dispose(),this._currentPasteOperation===r&&(this._currentPasteOperation=void 0)}});this._progressService.withProgress({location:10,title:a.localize(964,"Running paste handlers")},()=>r)}setCopyMetadata(e,t){this._logService.trace("CopyPasteController#setCopyMetadata new id : ",t.id),e.setData(Nd,JSON.stringify(t))}fetchCopyMetadata(e){this._logService.trace("CopyPasteController#fetchCopyMetadata");const t=e.clipboardData.getData(Nd);if(t)try{return JSON.parse(t)}catch{return}if(e.metadata)return{defaultPastePayload:{mode:e.metadata.mode,multicursorText:e.metadata.multicursorText??null,pasteOnNewLine:!!e.metadata.isFromEmptySelection}}}async mergeInDataFromCopy(e,t,i,n){if(this._logService.trace("CopyPasteController#mergeInDataFromCopy with metadata : ",i?.id),i?.id&&Me._currentCopyOperation?.handle===i.id){const s=Me._currentCopyOperation.operations.filter(l=>e.some(d=>d.pasteMimeTypes.some(h=>o.matchesMimeType(h,l.providerMimeTypes)))).map(l=>l.operation),r=await Promise.all(s);if(n.isCancellationRequested)return;for(const l of r.reverse())if(l)for(const[d,h]of l)t.replace(d,h)}if(!t.has(o.Mimes.uriList)){const s=await this._clipboardService.readResources();if(n.isCancellationRequested)return;s.length&&t.append(o.Mimes.uriList,o.createStringDataTransferItem(o.UriList.create(s)))}}async getPasteEdits(e,t,i,n,s,r){const l=new a.DisposableStore,d=await a.raceCancellation(Promise.all(e.map(async u=>{try{const g=await u.provideDocumentPasteEdits?.(i,n,t,s,r);return g&&l.add(g),g?.edits?.map(p=>({...p,provider:u}))}catch(g){a.isCancellationError(g)||console.error(g);return}})),r),h=a.coalesce(d??[]).flat().filter(u=>!s.only||s.only.contains(u.kind));return{edits:Df(h),dispose:()=>l.dispose()}}async applyDefaultPasteHandler(e,t,i,n){const r=await(e.get(o.Mimes.text)??e.get("text"))?.asString()??"";if(i.isCancellationRequested)return;const l={clipboardEvent:n,text:r,pasteOnNewLine:t?.defaultPastePayload.pasteOnNewLine??!1,multicursorText:t?.defaultPastePayload.multicursorText??null,mode:null};this._logService.trace("CopyPasteController#applyDefaultPasteHandler for id : ",t?.id),this._editor.trigger("keyboard","paste",l)}isSupportedPasteProvider(e,t,i){return e.pasteMimeTypes?.some(n=>t.matches(n))?!i||this.providerMatchesPreference(e,i):!1}providerMatchesPreference(e,t){return"only"in t?e.providedPasteEditKinds.some(i=>t.only.contains(i)):"preferences"in t?e.providedPasteEditKinds.some(i=>t.preferences.some(n=>n.contains(i))):e.id===t.providerId}getInitialActiveEditIndex(e,t){const i=this._configService.getValue(qC,{resource:e.uri});for(const n of Array.isArray(i)?i:[]){const s=new q(n),r=t.findIndex(l=>s.contains(l.kind));if(r>=0)return r}return 0}},Me=mn,mn.ID="editor.contrib.copyPasteActionController",mn);wt=Me=$C([yt(1,o.IInstantiationService),yt(2,o.ILogService),yt(3,o.IBulkEditService),yt(4,o.IClipboardService),yt(5,o.ICommandService),yt(6,o.IConfigurationService),yt(7,o.ILanguageFeaturesService),yt(8,o.IQuickInputService),yt(9,o.IProgressService)],wt);const Ui="9_cutcopypaste",GC=a.isNative||document.queryCommandSupported("cut"),Ff=a.isNative||document.queryCommandSupported("copy"),ZC=typeof navigator.clipboard>"u"||o.isFirefox?document.queryCommandSupported("paste"):!0;function Md(c){return c.register(),c}const XC=GC?Md(new o.MultiCommand({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:a.isNative?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:o.MenuId.MenubarEditMenu,group:"2_ccp",title:a.localize(849,"Cu&&t"),order:1},{menuId:o.MenuId.EditorContext,group:Ui,title:a.localize(850,"Cut"),when:o.EditorContextKeys.writable,order:1},{menuId:o.MenuId.CommandPalette,group:"",title:a.localize(851,"Cut"),order:1},{menuId:o.MenuId.SimpleEditorContext,group:Ui,title:a.localize(852,"Cut"),when:o.EditorContextKeys.writable,order:1}]})):void 0,YC=Ff?Md(new o.MultiCommand({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:a.isNative?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:o.MenuId.MenubarEditMenu,group:"2_ccp",title:a.localize(853,"&&Copy"),order:2},{menuId:o.MenuId.EditorContext,group:Ui,title:a.localize(854,"Copy"),order:2},{menuId:o.MenuId.CommandPalette,group:"",title:a.localize(855,"Copy"),order:1},{menuId:o.MenuId.SimpleEditorContext,group:Ui,title:a.localize(856,"Copy"),order:2}]})):void 0;o.MenuRegistry.appendMenuItem(o.MenuId.MenubarEditMenu,{submenu:o.MenuId.MenubarCopy,title:a.localize2(861,"Copy As"),group:"2_ccp",order:3}),o.MenuRegistry.appendMenuItem(o.MenuId.EditorContext,{submenu:o.MenuId.EditorContextCopy,title:a.localize2(862,"Copy As"),group:Ui,order:3}),o.MenuRegistry.appendMenuItem(o.MenuId.EditorContext,{submenu:o.MenuId.EditorContextShare,title:a.localize2(863,"Share"),group:"11_share",order:-1,when:o.ContextKeyExpr.and(o.ContextKeyExpr.notEquals("resourceScheme","output"),o.EditorContextKeys.editorTextFocus)}),o.MenuRegistry.appendMenuItem(o.MenuId.ExplorerContext,{submenu:o.MenuId.ExplorerContextShare,title:a.localize2(864,"Share"),group:"11_share",order:-1});const Pd=ZC?Md(new o.MultiCommand({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:a.isNative?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:o.MenuId.MenubarEditMenu,group:"2_ccp",title:a.localize(857,"&&Paste"),order:4},{menuId:o.MenuId.EditorContext,group:Ui,title:a.localize(858,"Paste"),when:o.EditorContextKeys.writable,order:4},{menuId:o.MenuId.CommandPalette,group:"",title:a.localize(859,"Paste"),order:1},{menuId:o.MenuId.SimpleEditorContext,group:Ui,title:a.localize(860,"Paste"),when:o.EditorContextKeys.writable,order:4}]})):void 0;class QC extends o.EditorAction{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:a.localize2(865,"Copy with Syntax Highlighting"),precondition:void 0,kbOpts:{kbExpr:o.EditorContextKeys.textInputFocus,primary:0,weight:100}})}run(e,t){const i=e.get(o.ILogService),n=e.get(o.IClipboardService);i.trace("ExecCommandCopyWithSyntaxHighlightingAction#run"),!(!t.hasModel()||!t.getOption(45)&&t.getSelection().isEmpty())&&(o.CopyOptions.forceCopyWithSyntaxHighlighting=!0,t.focus(),i.trace("ExecCommandCopyWithSyntaxHighlightingAction (before execCommand copy)"),Od(t,n),i.trace("ExecCommandCopyWithSyntaxHighlightingAction (after execCommand copy)"),o.CopyOptions.forceCopyWithSyntaxHighlighting=!1)}}function Od(c,e){if(o.CopyOptions.electronBugWorkaroundCopyEventHasFired=!1,c.getContainerDomNode().ownerDocument.execCommand("copy"),a.isNative&&o.CopyOptions.electronBugWorkaroundCopyEventHasFired===!1){const{dataToCopy:t}=o.generateDataToCopyAndStoreInMemory(c._getViewModel(),void 0,o.isFirefox);e.writeText(t.text)}}function zf(c,e){c&&(c.addImplementation(1e4,"code-editor",(t,i)=>{const n=t.get(o.ILogService),s=t.get(o.IClipboardService);n.trace("registerExecCommandImpl (addImplementation code-editor for : ",e,")");const r=t.get(o.ICodeEditorService).getFocusedCodeEditor();if(r&&r.hasTextFocus()&&r.hasModel()){const l=r.getOption(45),d=r.getSelection();return d&&d.isEmpty()&&!l||(r.getOption(170)&&e==="cut"?(Vf(r),n.trace("registerExecCommandImpl (before execCommand copy)"),Od(r,s),r.trigger(void 0,"cut",void 0),n.trace("registerExecCommandImpl (after execCommand copy)")):(Vf(r),n.trace("registerExecCommandImpl (before execCommand "+e+")"),e==="copy"?Od(r,s):r.getContainerDomNode().ownerDocument.execCommand(e),n.trace("registerExecCommandImpl (after execCommand "+e+")"))),!0}return!1}),c.addImplementation(0,"generic-dom",(t,i)=>{const n=t.get(o.ILogService);return n.trace("registerExecCommandImpl (addImplementation generic-dom for : ",e,")"),n.trace("registerExecCommandImpl (before execCommand "+e+")"),o.getActiveDocument().execCommand(e),n.trace("registerExecCommandImpl (after execCommand "+e+")"),!0}))}function Vf(c){if(c.getOption(170)){const t=o.NativeEditContextRegistry.get(c.getId());t&&t.handleWillCopy()}}zf(XC,"cut"),zf(YC,"copy"),Pd&&(Pd.addImplementation(1e4,"code-editor",(c,e)=>{const t=c.get(o.ILogService);t.trace("registerExecCommandImpl (addImplementation code-editor for : paste)");const i=c.get(o.ICodeEditorService),n=c.get(o.IClipboardService),s=i.getFocusedCodeEditor();if(s&&s.hasModel()&&s.hasTextFocus()){if(s.getOption(170)){const d=o.NativeEditContextRegistry.get(s.getId());d&&d.handleWillPaste()}t.trace("registerExecCommandImpl (before triggerPaste)");const l=n.triggerPaste(o.getActiveWindow().vscodeWindowId);return l?(t.trace("registerExecCommandImpl (triggerPaste defined)"),l.then(async()=>(t.trace("registerExecCommandImpl (after triggerPaste)"),wt.get(s)?.finishedPaste()??Promise.resolve()))):(t.trace("registerExecCommandImpl (triggerPaste undefined)"),a.isWeb?(t.trace("registerExecCommandImpl (Paste handling on web)"),(async()=>{const d=await n.readText();if(d!==""){const h=o.InMemoryClipboardMetadataManager.INSTANCE.get(d);let u=!1,g=null,p=null;h&&(u=s.getOption(45)&&!!h.isFromEmptySelection,g=typeof h.multicursorText<"u"?h.multicursorText:null,p=h.mode),t.trace("registerExecCommandImpl (clipboardText.length : ",d.length," id : ",h?.id,")"),s.trigger("keyboard","paste",{text:d,pasteOnNewLine:u,multicursorText:g,mode:p})}})()):!0)}return!1}),Pd.addImplementation(0,"generic-dom",(c,e)=>(c.get(o.ILogService).trace("registerExecCommandImpl (addImplementation generic-dom for : paste)"),c.get(o.IClipboardService).triggerPaste(o.getActiveWindow().vscodeWindowId)??!1))),Ff&&o.registerEditorAction(QC);const $=new class{constructor(){this.QuickFix=new q("quickfix"),this.Refactor=new q("refactor"),this.RefactorExtract=this.Refactor.append("extract"),this.RefactorInline=this.Refactor.append("inline"),this.RefactorMove=this.Refactor.append("move"),this.RefactorRewrite=this.Refactor.append("rewrite"),this.Notebook=new q("notebook"),this.Source=new q("source"),this.SourceOrganizeImports=this.Source.append("organizeImports"),this.SourceFixAll=this.Source.append("fixAll"),this.SurroundWith=this.Refactor.append("surround")}};var _e;(function(c){c.Refactor="refactor",c.RefactorPreview="refactor preview",c.Lightbulb="lightbulb",c.Default="other (default)",c.SourceAction="source action",c.QuickFix="quick fix action",c.FixAll="fix all",c.OrganizeImports="organize imports",c.AutoFix="auto fix",c.QuickFixHover="quick fix hover window",c.OnSave="save participants",c.ProblemsView="problems view"})(_e||(_e={}));function JC(c,e){return!(c.include&&!c.include.intersects(e)||c.excludes&&c.excludes.some(t=>Bf(e,t,c.include))||!c.includeSourceActions&&$.Source.contains(e))}function WC(c,e){const t=e.kind?new q(e.kind):void 0;return!(c.include&&(!t||!c.include.contains(t))||c.excludes&&t&&c.excludes.some(i=>Bf(t,i,c.include))||!c.includeSourceActions&&t&&$.Source.contains(t)||c.onlyIncludePreferredActions&&!e.isPreferred)}function Bf(c,e,t){return!(!e.contains(c)||t&&e.contains(t))}class rt{static fromUser(e,t){return!e||typeof e!="object"?new rt(t.kind,t.apply,!1):new rt(rt.getKindFromUser(e,t.kind),rt.getApplyFromUser(e,t.apply),rt.getPreferredUser(e))}static getApplyFromUser(e,t){switch(typeof e.apply=="string"?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(e,t){return typeof e.kind=="string"?new q(e.kind):t}static getPreferredUser(e){return typeof e.preferred=="boolean"?e.preferred:!1}constructor(e,t,i){this.kind=e,this.apply=t,this.preferred=i}}class HC{constructor(e,t,i){this.action=e,this.provider=t,this.highlightRange=i}async resolve(e){if(this.provider?.resolveCodeAction&&!this.action.edit){let t;try{t=await this.provider.resolveCodeAction(this.action,e)}catch(i){a.onUnexpectedExternalError(i)}t&&(this.action.edit=t.edit)}return this}}const Kf="editor.action.codeAction",Wr="editor.action.quickFix",Ad="editor.action.autoFix",Uf="editor.action.refactor",kf="editor.action.sourceAction",Fd="editor.action.organizeImports",zd="editor.action.fixAll",eS=1e3;class fo extends a.Disposable{static codeActionsPreferredComparator(e,t){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:0}static codeActionsComparator({action:e},{action:t}){return e.isAI&&!t.isAI?1:!e.isAI&&t.isAI?-1:a.isNonEmptyArray(e.diagnostics)?a.isNonEmptyArray(t.diagnostics)?fo.codeActionsPreferredComparator(e,t):-1:a.isNonEmptyArray(t.diagnostics)?1:fo.codeActionsPreferredComparator(e,t)}constructor(e,t,i){super(),this.documentation=t,this._register(i),this.allActions=[...e].sort(fo.codeActionsComparator),this.validActions=this.allActions.filter(({action:n})=>!n.disabled)}get hasAutoFix(){return this.validActions.some(({action:e})=>!!e.kind&&$.QuickFix.contains(new q(e.kind))&&!!e.isPreferred)}get hasAIFix(){return this.validActions.some(({action:e})=>!!e.isAI)}get allAIFixes(){return this.validActions.every(({action:e})=>!!e.isAI)}}const jf={actions:[],documentation:void 0};async function os(c,e,t,i,n,s){const r=i.filter||{},l={...r,excludes:[...r.excludes||[],$.Notebook]},d={only:r.include?.value,trigger:i.type},h=new o.TextModelCancellationTokenSource(e,s),u=i.type===2,g=tS(c,e,u?l:r),p=new a.DisposableStore,f=g.map(async _=>{const v=setTimeout(()=>n.report(_),1250);try{const b=await _.provideCodeActions(e,t,d,h.token);if(h.token.isCancellationRequested)return b?.dispose(),jf;b&&p.add(b);const S=(b?.actions||[]).filter(I=>I&&WC(r,I)),w=nS(_,S,r.include);return{actions:S.map(I=>new HC(I,_)),documentation:w}}catch(b){if(a.isCancellationError(b))throw b;return a.onUnexpectedExternalError(b),jf}finally{clearTimeout(v)}}),m=c.onDidChange(()=>{const _=c.all(e);a.equals(_,g)||h.cancel()});try{const _=await Promise.all(f),v=_.map(w=>w.actions).flat(),b=[...a.coalesce(_.map(w=>w.documentation)),...iS(c,e,i,v)],S=new fo(v,b,p);return p.add(S),S}catch(_){throw p.dispose(),_}finally{m.dispose(),h.dispose()}}function tS(c,e,t){return c.all(e).filter(i=>i.providedCodeActionKinds?i.providedCodeActionKinds.some(n=>JC(t,new q(n))):!0)}function*iS(c,e,t,i){if(e&&i.length)for(const n of c.all(e))n._getAdditionalMenuItems&&(yield*n._getAdditionalMenuItems?.({trigger:t.type,only:t.filter?.include?.value},i.map(s=>s.action)))}function nS(c,e,t){if(!c.documentation)return;const i=c.documentation.map(n=>({kind:new q(n.kind),command:n.command}));if(t){let n;for(const s of i)s.kind.contains(t)&&(n?n.kind.contains(s.kind)&&(n=s):n=s);if(n)return n?.command}for(const n of e)if(n.kind){for(const s of i)if(s.kind.contains(new q(n.kind)))return s.command}}var Ut;(function(c){c.OnSave="onSave",c.FromProblemsView="fromProblemsView",c.FromCodeActions="fromCodeActions",c.FromAILightbulb="fromAILightbulb",c.FromProblemsHover="fromProblemsHover"})(Ut||(Ut={}));async function sS(c,e,t,i,n=a.CancellationToken.None){const s=c.get(o.IBulkEditService),r=c.get(o.ICommandService),l=c.get(o.ITelemetryService),d=c.get(o.INotificationService),h=c.get(o.IAccessibilitySignalService);if(l.publicLog2("codeAction.applyCodeAction",{codeActionTitle:e.action.title,codeActionKind:e.action.kind,codeActionIsPreferred:!!e.action.isPreferred,reason:t}),h.playSignal(o.AccessibilitySignal.codeActionTriggered),await e.resolve(n),!n.isCancellationRequested&&!(e.action.edit?.edits.length&&!(await s.apply(e.action.edit,{editor:i?.editor,label:e.action.title,quotableLabel:e.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:t!==Ut.OnSave,showPreview:i?.preview,reason:o.EditSources.codeAction({kind:e.action.kind,providerId:a.ProviderId.fromExtensionId(e.provider?.extensionId)})})).isApplied)){if(e.action.command)try{await r.executeCommand(e.action.command.id,...e.action.command.arguments||[])}catch(u){const g=oS(u);d.error(typeof g=="string"?g:a.localize(866,"An unknown error occurred while applying the code action"))}setTimeout(()=>h.playSignal(o.AccessibilitySignal.codeActionApplied),eS)}}function oS(c){return typeof c=="string"?c:c instanceof Error&&typeof c.message=="string"?c.message:void 0}o.CommandsRegistry.registerCommand("_executeCodeActionProvider",async function(c,e,t,i,n){if(!(e instanceof a.URI))throw a.illegalArgument();const{codeActionProvider:s}=c.get(o.ILanguageFeaturesService),r=c.get(o.IModelService).getModel(e);if(!r)throw a.illegalArgument();const l=a.Selection.isISelection(t)?a.Selection.liftSelection(t):a.Range.isIRange(t)?r.validateRange(t):void 0;if(!l)throw a.illegalArgument();const d=typeof i=="string"?new q(i):void 0,h=await os(s,r,l,{type:1,triggerAction:_e.Default,filter:{includeSourceActions:!0,include:d}},o.Progress.None,a.CancellationToken.None),u=[],g=Math.min(h.validActions.length,typeof n=="number"?n:0);for(let p=0;pp.action)}finally{setTimeout(()=>h.dispose(),100)}});var rS=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},aS=function(c,e){return function(t,i){e(t,i,c)}},Vd;let Bd=(_n=class{constructor(e){this.keybindingService=e}getResolver(){const e=new a.Lazy(()=>this.keybindingService.getKeybindings().filter(t=>Vd.codeActionCommands.indexOf(t.command)>=0).filter(t=>t.resolvedKeybinding).map(t=>{let i=t.commandArgs;return t.command===Fd?i={kind:$.SourceOrganizeImports.value}:t.command===zd&&(i={kind:$.SourceFixAll.value}),{resolvedKeybinding:t.resolvedKeybinding,...rt.fromUser(i,{kind:q.None,apply:"never"})}}));return t=>{if(t.kind)return this.bestKeybindingForCodeAction(t,e.value)?.resolvedKeybinding}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;const i=new q(e.kind);return t.filter(n=>n.kind.contains(i)).filter(n=>n.preferred?e.isPreferred:!0).reduceRight((n,s)=>n?n.kind.contains(s.kind)?s:n:s,void 0)}},Vd=_n,_n.codeActionCommands=[Uf,Kf,kf,Fd,zd],_n);Bd=Vd=rS([aS(0,o.IKeybindingService)],Bd),o.registerColor("symbolIcon.arrayForeground",o.foreground,a.localize(1547,"The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),o.registerColor("symbolIcon.booleanForeground",o.foreground,a.localize(1548,"The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),o.registerColor("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},a.localize(1549,"The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),o.registerColor("symbolIcon.colorForeground",o.foreground,a.localize(1550,"The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),o.registerColor("symbolIcon.constantForeground",o.foreground,a.localize(1551,"The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),o.registerColor("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},a.localize(1552,"The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),o.registerColor("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},a.localize(1553,"The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),o.registerColor("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},a.localize(1554,"The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),o.registerColor("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},a.localize(1555,"The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),o.registerColor("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},a.localize(1556,"The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),o.registerColor("symbolIcon.fileForeground",o.foreground,a.localize(1557,"The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),o.registerColor("symbolIcon.folderForeground",o.foreground,a.localize(1558,"The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),o.registerColor("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},a.localize(1559,"The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),o.registerColor("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},a.localize(1560,"The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),o.registerColor("symbolIcon.keyForeground",o.foreground,a.localize(1561,"The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),o.registerColor("symbolIcon.keywordForeground",o.foreground,a.localize(1562,"The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),o.registerColor("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},a.localize(1563,"The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),o.registerColor("symbolIcon.moduleForeground",o.foreground,a.localize(1564,"The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),o.registerColor("symbolIcon.namespaceForeground",o.foreground,a.localize(1565,"The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),o.registerColor("symbolIcon.nullForeground",o.foreground,a.localize(1566,"The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),o.registerColor("symbolIcon.numberForeground",o.foreground,a.localize(1567,"The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),o.registerColor("symbolIcon.objectForeground",o.foreground,a.localize(1568,"The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),o.registerColor("symbolIcon.operatorForeground",o.foreground,a.localize(1569,"The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),o.registerColor("symbolIcon.packageForeground",o.foreground,a.localize(1570,"The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),o.registerColor("symbolIcon.propertyForeground",o.foreground,a.localize(1571,"The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),o.registerColor("symbolIcon.referenceForeground",o.foreground,a.localize(1572,"The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),o.registerColor("symbolIcon.snippetForeground",o.foreground,a.localize(1573,"The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),o.registerColor("symbolIcon.stringForeground",o.foreground,a.localize(1574,"The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),o.registerColor("symbolIcon.structForeground",o.foreground,a.localize(1575,"The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),o.registerColor("symbolIcon.textForeground",o.foreground,a.localize(1576,"The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),o.registerColor("symbolIcon.typeParameterForeground",o.foreground,a.localize(1577,"The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),o.registerColor("symbolIcon.unitForeground",o.foreground,a.localize(1578,"The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),o.registerColor("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},a.localize(1579,"The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));const $f=Object.freeze({kind:q.Empty,title:a.localize(902,"More Actions...")}),lS=Object.freeze([{kind:$.QuickFix,title:a.localize(903,"Quick Fix")},{kind:$.RefactorExtract,title:a.localize(904,"Extract"),icon:a.Codicon.wrench},{kind:$.RefactorInline,title:a.localize(905,"Inline"),icon:a.Codicon.wrench},{kind:$.RefactorRewrite,title:a.localize(906,"Rewrite"),icon:a.Codicon.wrench},{kind:$.RefactorMove,title:a.localize(907,"Move"),icon:a.Codicon.wrench},{kind:$.SurroundWith,title:a.localize(908,"Surround With"),icon:a.Codicon.surroundWith},{kind:$.Source,title:a.localize(909,"Source Action"),icon:a.Codicon.symbolFile},$f]);function cS(c,e,t){if(!e)return c.map(s=>({kind:"action",item:s,group:$f,disabled:!!s.action.disabled,label:s.action.disabled||s.action.title,canPreview:!!s.action.edit?.edits.length}));const i=lS.map(s=>({group:s,actions:[]}));for(const s of c){const r=s.action.kind?new q(s.action.kind):q.None;for(const l of i)if(l.group.kind.contains(r)){l.actions.push(s);break}}const n=[];for(const s of i)if(s.actions.length){n.push({kind:"header",group:s.group});for(const r of s.actions){const l=s.group;n.push({kind:"action",item:r,group:r.action.isAI?{title:l.title,kind:l.kind,icon:a.Codicon.sparkle}:l,label:r.action.title,disabled:!!r.action.disabled,keybinding:t(r.action)})}}return n}const qf=new o.RawContextKey("supportedCodeAction",""),Gf="_typescript.applyFixAllCodeAction";class dS extends a.Disposable{constructor(e,t,i,n=250){super(),this._editor=e,this._markerService=t,this._signalChange=i,this._delay=n,this._autoTriggerTimer=this._register(new a.TimeoutTimer),this.ignoreLightbulbOff=!1,this._register(this._markerService.onMarkerChanged(s=>this._onMarkerChanges(s))),this._register(this._editor.onDidChangeCursorPosition(()=>this._tryAutoTrigger()))}trigger(e){const t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);this._signalChange(t?{trigger:e,selection:t}:void 0)}_onMarkerChanges(e){const t=this._editor.getModel();t&&e.some(i=>o.isEqual(i,t.uri))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:_e.Default})},this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;const t=this._editor.getSelection();if(e.type===1)return t;const i=this._editor.getOption(73).enabled;if(!(i===o.ShowLightbulbIconMode.Off&&!this.ignoreLightbulbOff)){{if(i===o.ShowLightbulbIconMode.Off||i===o.ShowLightbulbIconMode.On)return t;if(i===o.ShowLightbulbIconMode.OnCode){if(!t.isEmpty())return t;const s=this._editor.getModel(),{lineNumber:r,column:l}=t.getPosition(),d=s.getLineContent(r);if(d.length===0)return;if(l===1){if(/\s/.test(d[0]))return}else if(l===s.getLineMaxColumn(r)){if(/\s/.test(d[d.length-1]))return}else if(/\s/.test(d[l-2])&&/\s/.test(d[l-1]))return}}return t}}}var ki;(function(c){c.Empty={type:0};class e{constructor(i,n,s){this.trigger=i,this.position=n,this._cancellablePromise=s,this.type=1,this.actions=s.catch(r=>{if(a.isCancellationError(r))return Kd;throw r})}cancel(){this._cancellablePromise.cancel()}}c.Triggered=e})(ki||(ki={}));const Kd=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1,hasAIFix:!1,allAIFixes:!1});class hS extends a.Disposable{constructor(e,t,i,n,s,r){super(),this._editor=e,this._registry=t,this._markerService=i,this._progressService=s,this._configurationService=r,this._codeActionOracle=this._register(new a.MutableDisposable),this._state=ki.Empty,this._onDidChangeState=this._register(new a.Emitter),this.onDidChangeState=this._onDidChangeState.event,this.codeActionsDisposable=this._register(new a.MutableDisposable),this._disposed=!1,this._ignoreLightbulbOff=!1,this._supportedCodeActions=qf.bindTo(n),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(this._registry.onDidChange(()=>this._update())),this._register(this._editor.onDidChangeConfiguration(l=>{l.hasChanged(73)&&this._update()})),this._update()}dispose(){this._disposed||(this._disposed=!0,super.dispose(),this.setState(ki.Empty,!0))}_settingEnabledNearbyQuickfixes(){const e=this._editor?.getModel();return this._configurationService?this._configurationService.getValue("editor.codeActionWidget.includeNearbyQuickFixes",{resource:e?.uri}):!1}_update(){if(this._disposed)return;this._codeActionOracle.value=void 0,this.setState(ki.Empty);const e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(104)){const t=this._registry.all(e).flatMap(n=>n.providedCodeActionKinds??[]);this._supportedCodeActions.set(t.join(" "));const i=new dS(this._editor,this._markerService,n=>{if(!n){this.setState(ki.Empty);return}const s=n.selection.getStartPosition(),r=a.createCancelablePromise(async h=>{if(this._settingEnabledNearbyQuickfixes()&&n.trigger.type===1&&(n.trigger.triggerAction===_e.QuickFix||n.trigger.filter?.include?.contains($.QuickFix))){const g=await os(this._registry,e,n.selection,n.trigger,o.Progress.None,h);this.codeActionsDisposable.value=g;const p=[...g.allActions];if(h.isCancellationRequested)return g.dispose(),Kd;const f=g.validActions?.some(_=>_.action.kind&&$.QuickFix.contains(new q(_.action.kind))&&!_.action.isAI),m=this._markerService.read({resource:e.uri});if(f){for(const _ of g.validActions)_.action.command?.arguments?.some(v=>typeof v=="string"&&v.includes(Gf))&&(_.action.diagnostics=[...m.filter(v=>v.relatedInformation)]);return{validActions:g.validActions,allActions:p,documentation:g.documentation,hasAutoFix:g.hasAutoFix,hasAIFix:g.hasAIFix,allAIFixes:g.allAIFixes,dispose:()=>{this.codeActionsDisposable.value=g}}}else if(!f&&m.length>0){const _=n.selection.getPosition();let v=_,b=Number.MAX_VALUE;const S=[...g.validActions];for(const I of m){const C=I.endColumn,y=I.endLineNumber,x=I.startLineNumber;if(y===_.lineNumber||x===_.lineNumber){v=new a.Position(y,C);const L={type:n.trigger.type,triggerAction:n.trigger.triggerAction,filter:{include:n.trigger.filter?.include?n.trigger.filter?.include:$.QuickFix},autoApply:n.trigger.autoApply,context:{notAvailableMessage:n.trigger.context?.notAvailableMessage||"",position:v}},E=new a.Selection(v.lineNumber,v.column,v.lineNumber,v.column),R=await os(this._registry,e,E,L,o.Progress.None,h);if(h.isCancellationRequested)return R.dispose(),Kd;if(R.validActions.length!==0){for(const D of R.validActions)D.action.command?.arguments?.some(T=>typeof T=="string"&&T.includes(Gf))&&(D.action.diagnostics=[...m.filter(T=>T.relatedInformation)]);g.allActions.length===0&&p.push(...R.allActions),Math.abs(_.column-C)y.findIndex(x=>x.action.title===I.action.title)===C);return w.sort((I,C)=>I.action.isPreferred&&!C.action.isPreferred?-1:!I.action.isPreferred&&C.action.isPreferred||I.action.isAI&&!C.action.isAI?1:!I.action.isAI&&C.action.isAI?-1:0),{validActions:w,allActions:p,documentation:g.documentation,hasAutoFix:g.hasAutoFix,hasAIFix:g.hasAIFix,allAIFixes:g.allAIFixes,dispose:()=>{this.codeActionsDisposable.value=g}}}}if(n.trigger.type===1){const g=await os(this._registry,e,n.selection,n.trigger,o.Progress.None,h);return this.codeActionsDisposable.value=g,g}const u=await os(this._registry,e,n.selection,n.trigger,o.Progress.None,h);return this.codeActionsDisposable.value=u,u});n.trigger.type===1&&this._progressService?.showWhile(r,250);const l=new ki.Triggered(n.trigger,s,r);let d=!1;this._state.type===1&&(d=this._state.trigger.type===1&&l.type===1&&l.trigger.type===2&&this._state.position!==l.position),d?setTimeout(()=>{this.setState(l)},500):this.setState(l)},void 0);i.ignoreLightbulbOff=this._ignoreLightbulbOff,this._codeActionOracle.value=i,this._codeActionOracle.value.trigger({type:2,triggerAction:_e.Default})}else this._supportedCodeActions.reset()}trigger(e){this._codeActionOracle.value?.trigger(e),this.codeActionsDisposable.dispose()}setState(e,t){e!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=e,!t&&!this._disposed&&this._onDidChangeState.fire(e))}}var uS=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},gS=function(c,e){return function(t,i){e(t,i,c)}},kt;const Zf=o.registerIcon("gutter-lightbulb",a.Codicon.lightBulb,a.localize(910,"Icon which spawns code actions menu from the gutter when there is no space in the editor.")),Xf=o.registerIcon("gutter-lightbulb-auto-fix",a.Codicon.lightbulbAutofix,a.localize(911,"Icon which spawns code actions menu from the gutter when there is no space in the editor and a quick fix is available.")),Yf=o.registerIcon("gutter-lightbulb-sparkle",a.Codicon.lightbulbSparkle,a.localize(912,"Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix is available.")),Qf=o.registerIcon("gutter-lightbulb-aifix-auto-fix",a.Codicon.lightbulbSparkleAutofix,a.localize(913,"Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix and a quick fix is available.")),Jf=o.registerIcon("gutter-lightbulb-sparkle-filled",a.Codicon.sparkleFilled,a.localize(914,"Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix and a quick fix is available."));var qe;(function(c){c.Hidden={type:0};class e{constructor(i,n,s,r){this.actions=i,this.trigger=n,this.editorPosition=s,this.widgetPosition=r,this.type=1}}c.Showing=e})(qe||(qe={}));function Wf(c,e,t,i,n=!1){if(c.validActions.length<=0)return;let s,r=!1;c.allAIFixes?(s=n?Jf:a.Codicon.sparkleFilled,c.validActions.length===1&&(r=!0)):c.hasAutoFix?c.hasAIFix?s=n?Qf:a.Codicon.lightbulbSparkleAutofix:s=n?Xf:a.Codicon.lightbulbAutofix:c.hasAIFix?s=n?Yf:a.Codicon.lightbulbSparkle:s=n?Zf:a.Codicon.lightBulb;let l;return r?l=a.localize(915,"Run: {0}",c.validActions[0].action.title):c.hasAutoFix&&t?l=a.localize(916,"Show Code Actions. Preferred Quick Fix Available ({0})",t):!c.hasAutoFix&&i?l=a.localize(917,"Show Code Actions ({0})",i):l=a.localize(918,"Show Code Actions"),{actions:c,trigger:e,icon:s,autoRun:r,title:l,isGutter:n}}let mo=(zt=class extends a.Disposable{static _computeLightBulbInfo(e,t,i,n){if(e.type===1)return Wf(e.actions,e.trigger,i,n,t)}constructor(e,t){super(),this._editor=e,this._keybindingService=t,this.onlyWithEmptySelection=!1,this._onClick=this._register(new a.Emitter),this.onClick=this._onClick.event,this._state=o.observableValue(this,qe.Hidden),this._gutterState=o.observableValue(this,qe.Hidden),this._combinedInfo=o.derived(this,i=>{const n=this._gutterState.read(i);if(n.type===1)return kt._computeLightBulbInfo(n,!0,this._preferredKbLabel.read(i),this._quickFixKbLabel.read(i));const s=this._state.read(i);if(s.type===1)return kt._computeLightBulbInfo(s,!1,this._preferredKbLabel.read(i),this._quickFixKbLabel.read(i))}),this._iconClasses=[],this.lightbulbClasses=["codicon-"+Zf.id,"codicon-"+Qf.id,"codicon-"+Xf.id,"codicon-"+Yf.id,"codicon-"+Jf.id],this._preferredKbLabel=o.observableValue(this,void 0),this._quickFixKbLabel=o.observableValue(this,void 0),this.gutterDecoration=kt.GUTTER_DECORATION,this._domNode=o.$("div.lightBulbWidget"),this._domNode.role="listbox",this._register(o.Gesture.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(i=>{const n=this._editor.getModel(),s=this._state.get();(s.type!==1||!n||s.editorPosition.lineNumber>=n.getLineCount())&&this.hide();const r=this._gutterState.get();(r.type!==1||!n||r.editorPosition.lineNumber>=n.getLineCount())&&this.gutterHide()})),this._register(o.addStandardDisposableGenericMouseDownListener(this._domNode,i=>{const n=this._state.get();if(n.type!==1)return;this._editor.focus(),i.preventDefault();const{top:s,height:r}=o.getDomNodePagePosition(this._domNode),l=this._editor.getOption(75);let d=Math.floor(l/3);n.widgetPosition.position!==null&&n.widgetPosition.position.lineNumber{(i.buttons&1)===1&&this.hide()})),this._register(a.Event.runAndSubscribe(this._keybindingService.onDidUpdateKeybindings,()=>{this._preferredKbLabel.set(this._keybindingService.lookupKeybinding(Ad)?.getLabel()??void 0,void 0),this._quickFixKbLabel.set(this._keybindingService.lookupKeybinding(Wr)?.getLabel()??void 0,void 0)})),this._register(o.autorun(i=>{const n=this._combinedInfo.read(i);this._updateLightBulbTitleAndIcon(n),this._updateGutterDecorationOptions(n)})),this._register(this._editor.onMouseDown(async i=>{if(!i.target.element||!this.lightbulbClasses.some(h=>i.target.element&&i.target.element.classList.contains(h)))return;const n=this._gutterState.get();if(n.type!==1)return;this._editor.focus();const{top:s,height:r}=o.getDomNodePagePosition(i.target.element),l=this._editor.getOption(75);let d=Math.floor(l/3);n.widgetPosition.position!==null&&n.widgetPosition.position.lineNumber22,m=C=>C>2&&this._editor.getTopForLineNumber(C)===this._editor.getTopForLineNumber(C-1),_=this._editor.getLineDecorations(l);let v=!1;if(_)for(const C of _){const y=C.options.glyphMarginClassName;if(y&&!this.lightbulbClasses.some(x=>y.includes(x))){v=!0;break}}let b=l,S=1;if(!f){const C=y=>{const x=r.getLineContent(y);return/^\s*$|^\s+/.test(x)||x.length<=S};if(l>1&&!m(l-1)){const y=r.getLineCount(),x=l===y,L=l>1&&C(l-1),E=!x&&C(l+1),R=C(l),D=!E&&!L;if(!E&&!L&&!v)return this._gutterState.set(new qe.Showing(e,t,i,{position:{lineNumber:b,column:S},preference:kt._posPref}),void 0),this.renderGutterLightbub(),this.hide();L||x||L&&!R?b-=1:(E||D&&R)&&(b+=1)}else if(l===1&&(l===r.getLineCount()||!C(l+1)&&!C(l)))if(this._gutterState.set(new qe.Showing(e,t,i,{position:{lineNumber:b,column:S},preference:kt._posPref}),void 0),v)this.gutterHide();else return this.renderGutterLightbub(),this.hide();else if(l{this._gutterDecorationID=t.addDecoration(new a.Range(e,0,e,0),this.gutterDecoration)})}_removeGutterDecoration(e){this._editor.changeDecorations(t=>{t.removeDecoration(e),this._gutterDecorationID=void 0})}_updateGutterDecoration(e,t){this._editor.changeDecorations(i=>{i.changeDecoration(e,new a.Range(t,0,t,0)),i.changeDecorationOptions(e,this.gutterDecoration)})}},kt=zt,zt.GUTTER_DECORATION=o.ModelDecorationOptions.register({description:"codicon-gutter-lightbulb-decoration",glyphMarginClassName:o.ThemeIcon.asClassName(a.Codicon.lightBulb),glyphMargin:{position:a.GlyphMarginLane.Left},stickiness:1}),zt.ID="editor.contrib.lightbulbWidget",zt._posPref=[0],zt);mo=kt=uS([gS(1,o.IKeybindingService)],mo);var pS=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ge=function(c,e){return function(t,i){e(t,i,c)}},rs;const fS="quickfix-edit-highlight";let ji=(fi=class extends a.Disposable{static get(e){return e.getContribution(rs.ID)}constructor(e,t,i,n,s,r,l,d,h,u,g,p){super(),this._commandService=l,this._configurationService=d,this._actionWidgetService=h,this._instantiationService=u,this._progressService=g,this._keybindingService=p,this._activeCodeActions=this._register(new a.MutableDisposable),this._showDisabled=!1,this._disposed=!1,this._onlyLightBulbWithEmptySelection=!1,this._lightBulbInfoObs=o.observableValue(this,void 0),this._preferredKbLabel=o.observableValue(this,void 0),this._quickFixKbLabel=o.observableValue(this,void 0),this._editor=e,this._model=this._register(new hS(this._editor,s.codeActionProvider,t,i,r,d)),this._register(this._model.onDidChangeState(f=>this.update(f))),this._register(a.Event.runAndSubscribe(this._keybindingService.onDidUpdateKeybindings,()=>{this._preferredKbLabel.set(this._keybindingService.lookupKeybinding(Ad)?.getLabel()??void 0,void 0),this._quickFixKbLabel.set(this._keybindingService.lookupKeybinding(Wr)?.getLabel()??void 0,void 0)})),this._lightBulbWidget=new a.Lazy(()=>{const f=this._editor.getContribution(mo.ID);return f&&(this._register(f.onClick(m=>this.showCodeActionsFromLightbulb(m.actions,m))),f.onlyWithEmptySelection=this._onlyLightBulbWithEmptySelection),f}),this._resolver=n.createInstance(Bd),this._register(this._editor.onDidLayoutChange(()=>this._actionWidgetService.hide()))}dispose(){this._disposed=!0,super.dispose()}async showCodeActionsFromLightbulb(e,t){if(e.allAIFixes&&e.validActions.length===1){const i=e.validActions[0],n=i.action.command;n&&n.id==="inlineChat.start"&&n.arguments&&n.arguments.length>=1&&n.arguments[0]&&(n.arguments[0]={...n.arguments[0],autoSend:!1}),await this.applyCodeAction(i,!1,!1,Ut.FromAILightbulb);return}await this.showCodeActionList(e,t,{includeDisabledActions:!1,fromLightbulb:!0})}showCodeActions(e,t,i){return this.showCodeActionList(t,i,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(e,t,i,n){if(!this._editor.hasModel())return;me.get(this._editor)?.closeMessage();const s=this._editor.getPosition();this._trigger({type:1,triggerAction:t,filter:i,autoApply:n,context:{notAvailableMessage:e,position:s}})}_trigger(e){return this._model.trigger(e)}async applyCodeAction(e,t,i,n){const s=this._progressService.show(!0,500);try{await this._instantiationService.invokeFunction(sS,e,n,{preview:i,editor:this._editor})}finally{t&&this._trigger({type:2,triggerAction:_e.QuickFix,filter:{}}),s.done()}}hideLightBulbWidget(){this._lightBulbWidget.rawValue?.hide(),this._lightBulbWidget.rawValue?.gutterHide()}async update(e){if(e.type!==1){this.hideLightBulbWidget(),this._lightBulbInfoObs.set(void 0,void 0);return}let t;try{t=await e.actions}catch(n){a.onUnexpectedError(n);return}if(!(this._disposed||this._editor.getSelection()?.startLineNumber!==e.position.lineNumber))if(this._lightBulbWidget.value?.update(t,e.trigger,e.position),this._lightBulbInfoObs.set(Wf(t,e.trigger,this._preferredKbLabel.get(),this._quickFixKbLabel.get()),void 0),e.trigger.type===1){if(e.trigger.filter?.include){const s=this.tryGetValidActionToApply(e.trigger,t);if(s){try{this.hideLightBulbWidget(),await this.applyCodeAction(s,!1,!1,Ut.FromCodeActions)}finally{t.dispose()}return}if(e.trigger.context){const r=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,t);if(r&&r.action.disabled){me.get(this._editor)?.showMessage(r.action.disabled,e.trigger.context.position),t.dispose();return}}}const n=!!e.trigger.filter?.include;if(e.trigger.context&&(!t.allActions.length||!n&&!t.validActions.length)){me.get(this._editor)?.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=t,t.dispose();return}this._activeCodeActions.value=t,this.showCodeActionList(t,this.toCoords(e.position),{includeDisabledActions:n,fromLightbulb:!1})}else this._actionWidgetService.isVisible?t.dispose():this._activeCodeActions.value=t}getInvalidActionThatWouldHaveBeenApplied(e,t){if(t.allActions.length&&(e.autoApply==="first"&&t.validActions.length===0||e.autoApply==="ifSingle"&&t.allActions.length===1))return t.allActions.find(({action:i})=>i.disabled)}tryGetValidActionToApply(e,t){if(t.validActions.length&&(e.autoApply==="first"&&t.validActions.length>0||e.autoApply==="ifSingle"&&t.validActions.length===1))return t.validActions[0]}async showCodeActionList(e,t,i){const n=this._editor.createDecorationsCollection(),s=this._editor.getDomNode();if(!s)return;const r=i.includeDisabledActions&&(this._showDisabled||e.validActions.length===0)?e.allActions:e.validActions;if(!r.length)return;const l=a.Position.isIPosition(t)?this.toCoords(t):t,d={onSelect:async(h,u)=>{this.applyCodeAction(h,!0,!!u,i.fromLightbulb?Ut.FromAILightbulb:Ut.FromCodeActions),this._actionWidgetService.hide(!1),n.clear()},onHide:h=>{this._editor?.focus(),n.clear()},onHover:async(h,u)=>{if(u.isCancellationRequested)return;let g=!1;const p=h.action.kind;if(p){const f=new q(p);g=[$.RefactorExtract,$.RefactorInline,$.RefactorRewrite,$.RefactorMove,$.Source].some(_=>_.contains(f))}return{canPreview:g||!!h.action.edit?.edits.length}},onFocus:h=>{if(h&&h.action){const u=h.action.ranges,g=h.action.diagnostics;if(n.clear(),u&&u.length>0){const p=g&&g?.length>1?g.map(f=>({range:f,options:rs.DECORATION})):u.map(f=>({range:f,options:rs.DECORATION}));n.set(p)}else if(g&&g.length>0){const p=g.map(m=>({range:m,options:rs.DECORATION}));n.set(p);const f=g[0];if(f.startLineNumber&&f.startColumn){const m=this._editor.getModel()?.getWordAtPosition({lineNumber:f.startLineNumber,column:f.startColumn})?.word;o.status(a.localize(899,"Context: {0} at line {1} and column {2}.",m,f.startLineNumber,f.startColumn))}}}else n.clear()}};this._actionWidgetService.show("codeActionWidget",!0,cS(r,this._shouldShowHeaders(),this._resolver.getResolver()),d,l,s,this._getActionBarActions(e,t,i))}toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();const t=this._editor.getScrolledVisiblePosition(e),i=o.getDomNodePagePosition(this._editor.getDomNode()),n=i.left+t.left,s=i.top+t.top+t.height;return{x:n,y:s}}_shouldShowHeaders(){const e=this._editor?.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:e?.uri})}_getActionBarActions(e,t,i){if(i.fromLightbulb)return[];const n=e.documentation.map(s=>({id:s.id,label:s.title,tooltip:s.tooltip??"",class:void 0,enabled:!0,run:()=>this._commandService.executeCommand(s.id,...s.arguments??[])}));return i.includeDisabledActions&&e.validActions.length>0&&e.allActions.length!==e.validActions.length&&n.push(this._showDisabled?{id:"hideMoreActions",label:a.localize(900,"Hide Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(e,t,i))}:{id:"showMoreActions",label:a.localize(901,"Show Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(e,t,i))}),n}},rs=fi,fi.ID="editor.contrib.codeActionController",fi.DECORATION=o.ModelDecorationOptions.register({description:"quickfix-highlight",className:fS}),fi);ji=rs=pS([Ge(1,o.IMarkerService),Ge(2,o.IContextKeyService),Ge(3,o.IInstantiationService),Ge(4,o.ILanguageFeaturesService),Ge(5,o.IEditorProgressService),Ge(6,o.ICommandService),Ge(7,o.IConfigurationService),Ge(8,Ne),Ge(9,o.IInstantiationService),Ge(10,o.IEditorProgressService),Ge(11,o.IKeybindingService)],ji),o.registerThemingParticipant((c,e)=>{((n,s)=>{s&&e.addRule(`.monaco-editor ${n} { background-color: ${s}; }`)})(".quickfix-edit-highlight",c.getColor(o.editorFindMatchHighlight));const i=c.getColor(o.editorFindMatchHighlightBorder);i&&e.addRule(`.monaco-editor .quickfix-edit-highlight { border: 1px ${o.isHighContrast(c.type)?"dotted":"solid"} ${i}; box-sizing: border-box; }`)});function _o(c){return o.ContextKeyExpr.regex(qf.keys()[0],new RegExp("(\\s|^)"+a.escapeRegExpCharacters(c.value)+"\\b"))}const Ud={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:a.localize(867,"Kind of the code action to run.")},apply:{type:"string",description:a.localize(868,"Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[a.localize(869,"Always apply the first returned code action."),a.localize(870,"Apply the first returned code action if it is the only one."),a.localize(871,"Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:a.localize(872,"Controls if only preferred code actions should be returned.")}}};function $i(c,e,t,i,n=_e.Default){c.hasModel()&&ji.get(c)?.manualTriggerAtCurrentPosition(e,n,t,i)}class mS extends o.EditorAction2{constructor(){super({id:Wr,title:a.localize2(889,"Quick Fix..."),precondition:o.ContextKeyExpr.and(o.EditorContextKeys.writable,o.EditorContextKeys.hasCodeActionsProvider),icon:a.Codicon.lightBulb,f1:!0,keybinding:{when:o.EditorContextKeys.textInputFocus,primary:2137,weight:100},menu:{id:o.MenuId.InlineChatEditorAffordance,group:"1_quickfix",order:0,when:o.ContextKeyExpr.and(o.EditorContextKeys.writable,o.EditorContextKeys.hasCodeActionsProvider)}})}runEditorCommand(e,t){return $i(t,a.localize(873,"No code actions available"),void 0,void 0,_e.QuickFix)}}class _S extends o.EditorCommand{constructor(){super({id:Kf,precondition:o.ContextKeyExpr.and(o.EditorContextKeys.writable,o.EditorContextKeys.hasCodeActionsProvider),metadata:{description:"Trigger a code action",args:[{name:"args",schema:Ud}]}})}runEditorCommand(e,t,i){const n=rt.fromUser(i,{kind:q.Empty,apply:"ifSingle"});return $i(t,typeof i?.kind=="string"?n.preferred?a.localize(874,"No preferred code actions for '{0}' available",i.kind):a.localize(875,"No code actions for '{0}' available",i.kind):n.preferred?a.localize(876,"No preferred code actions available"):a.localize(877,"No code actions available"),{include:n.kind,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply)}}class vS extends o.EditorAction{constructor(){super({id:Uf,label:a.localize2(890,"Refactor..."),precondition:o.ContextKeyExpr.and(o.EditorContextKeys.writable,o.EditorContextKeys.hasCodeActionsProvider),kbOpts:{kbExpr:o.EditorContextKeys.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:o.ContextKeyExpr.and(o.EditorContextKeys.writable,_o($.Refactor))},metadata:{description:"Refactor...",args:[{name:"args",schema:Ud}]}})}run(e,t,i){const n=rt.fromUser(i,{kind:$.Refactor,apply:"never"});return $i(t,typeof i?.kind=="string"?n.preferred?a.localize(878,"No preferred refactorings for '{0}' available",i.kind):a.localize(879,"No refactorings for '{0}' available",i.kind):n.preferred?a.localize(880,"No preferred refactorings available"):a.localize(881,"No refactorings available"),{include:$.Refactor.contains(n.kind)?n.kind:q.None,onlyIncludePreferredActions:n.preferred},n.apply,_e.Refactor)}}class bS extends o.EditorAction{constructor(){super({id:kf,label:a.localize2(891,"Source Action..."),precondition:o.ContextKeyExpr.and(o.EditorContextKeys.writable,o.EditorContextKeys.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:o.ContextKeyExpr.and(o.EditorContextKeys.writable,_o($.Source))},metadata:{description:"Source Action...",args:[{name:"args",schema:Ud}]}})}run(e,t,i){const n=rt.fromUser(i,{kind:$.Source,apply:"never"});return $i(t,typeof i?.kind=="string"?n.preferred?a.localize(882,"No preferred source actions for '{0}' available",i.kind):a.localize(883,"No source actions for '{0}' available",i.kind):n.preferred?a.localize(884,"No preferred source actions available"):a.localize(885,"No source actions available"),{include:$.Source.contains(n.kind)?n.kind:q.None,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply,_e.SourceAction)}}class CS extends o.EditorAction{constructor(){super({id:Fd,label:a.localize2(892,"Organize Imports"),precondition:o.ContextKeyExpr.and(o.EditorContextKeys.writable,_o($.SourceOrganizeImports)),kbOpts:{kbExpr:o.EditorContextKeys.textInputFocus,primary:1581,weight:100},metadata:{description:a.localize2(893,"Organize imports in the current file. Also called 'Optimize Imports' by some tools")}})}run(e,t){return $i(t,a.localize(886,"No organize imports action available"),{include:$.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",_e.OrganizeImports)}}class SS extends o.EditorAction{constructor(){super({id:zd,label:a.localize2(894,"Fix All"),precondition:o.ContextKeyExpr.and(o.EditorContextKeys.writable,_o($.SourceFixAll))})}run(e,t){return $i(t,a.localize(887,"No fix all action available"),{include:$.SourceFixAll,includeSourceActions:!0},"ifSingle",_e.FixAll)}}class yS extends o.EditorAction{constructor(){super({id:Ad,label:a.localize2(895,"Auto Fix..."),precondition:o.ContextKeyExpr.and(o.EditorContextKeys.writable,_o($.QuickFix)),kbOpts:{kbExpr:o.EditorContextKeys.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(e,t){return $i(t,a.localize(888,"No auto fixes available"),{include:$.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",_e.AutoFix)}}o.registerEditorContribution(ji.ID,ji,3),o.registerEditorContribution(mo.ID,mo,4),o.registerAction2(mS),o.registerEditorAction(vS),o.registerEditorAction(bS),o.registerEditorAction(CS),o.registerEditorAction(yS),o.registerEditorAction(SS),o.registerEditorCommand(new _S),o.Registry.as(o.Extensions.Configuration).registerConfiguration({...o.editorConfigurationBaseNode,properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:6,description:a.localize(896,"Enable/disable showing group headers in the Code Action menu."),default:!0}}}),o.Registry.as(o.Extensions.Configuration).registerConfiguration({...o.editorConfigurationBaseNode,properties:{"editor.codeActionWidget.includeNearbyQuickFixes":{type:"boolean",scope:6,description:a.localize(897,"Enable/disable showing nearest Quick Fix within a line when not currently on a diagnostic."),default:!0}}}),o.Registry.as(o.Extensions.Configuration).registerConfiguration({...o.editorConfigurationBaseNode,properties:{"editor.codeActions.triggerOnFocusChange":{type:"boolean",scope:6,markdownDescription:a.localize(898,"Enable triggering {0} when {1} is set to {2}. Code Actions must be set to {3} to be triggered for window and focus changes.","`#editor.codeActionsOnSave#`","`#files.autoSave#`","`afterDelay`","`always`"),default:!1}}});const Sc=class Sc{constructor(){this.lenses=[]}dispose(){this._store?.dispose()}get isDisposed(){return this._store?.isDisposed??!1}add(e,t){a.isDisposable(e)&&(this._store??=new a.DisposableStore,this._store.add(e));for(const i of e.lenses)this.lenses.push({symbol:i,provider:t})}};Sc.Empty=new Sc;let as=Sc;async function Hf(c,e,t){const i=c.ordered(e),n=new Map,s=new as,r=i.map(async(l,d)=>{n.set(l,d);try{const h=await Promise.resolve(l.provideCodeLenses(e,t));h&&s.add(h,l)}catch(h){a.onUnexpectedExternalError(h)}});return await Promise.all(r),t.isCancellationRequested?(s.dispose(),as.Empty):(s.lenses=s.lenses.sort((l,d)=>l.symbol.range.startLineNumberd.symbol.range.startLineNumber?1:n.get(l.provider)n.get(d.provider)?1:l.symbol.range.startColumnd.symbol.range.startColumn?1:0),s)}o.CommandsRegistry.registerCommand("_executeCodeLensProvider",function(c,...e){let[t,i]=e;a.assertType(a.URI.isUri(t)),a.assertType(typeof i=="number"||!i);const{codeLensProvider:n}=c.get(o.ILanguageFeaturesService),s=c.get(o.IModelService).getModel(t);if(!s)throw a.illegalArgument();const r=[],l=new a.DisposableStore;return Hf(n,s,a.CancellationToken.None).then(d=>{l.add(d);const h=[];for(const u of d.lenses)i==null||u.symbol.command?r.push(u.symbol):i-- >0&&u.provider.resolveCodeLens&&h.push(Promise.resolve(u.provider.resolveCodeLens(s,u.symbol,a.CancellationToken.None)).then(g=>r.push(g||u.symbol)));return Promise.all(h)}).then(()=>r).finally(()=>{setTimeout(()=>l.dispose(),100)})});var wS=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},IS=function(c,e){return function(t,i){e(t,i,c)}};const em=o.createDecorator("ICodeLensCache");class tm{constructor(e,t){this.lineCount=e,this.data=t}}let kd=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new a.LRUCache(20,.75);const t="codelens/cache";o.runWhenWindowIdle(o.mainWindow,()=>e.remove(t,1));const i="codelens/cache2",n=e.get(i,1,"{}");this._deserialize(n);const s=a.Event.filter(e.onWillSaveState,r=>r.reason===o.WillSaveStateReason.SHUTDOWN);a.Event.once(s)(r=>{e.store(i,this._serialize(),1,1)})}put(e,t){const i=t.lenses.map(r=>({range:r.symbol.range,command:r.symbol.command&&{id:"",title:r.symbol.command?.title}})),n=new as;n.add({lenses:i},this._fakeProvider);const s=new tm(e.getLineCount(),n);this._cache.set(e.uri.toString(),s)}get(e){const t=this._cache.get(e.uri.toString());return t&&t.lineCount===e.getLineCount()?t.data:void 0}delete(e){this._cache.delete(e.uri.toString())}_serialize(){const e=Object.create(null);for(const[t,i]of this._cache){const n=new Set;for(const s of i.data.lenses)n.add(s.symbol.range.startLineNumber);e[t]={lineCount:i.lineCount,lines:[...n.values()]}}return JSON.stringify(e)}_deserialize(e){try{const t=JSON.parse(e);for(const i in t){const n=t[i],s=[];for(const l of n.lines)s.push({range:new a.Range(l,1,l,11)});const r=new as;r.add({lenses:s},this._fakeProvider),this._cache.set(i,new tm(n.lineCount,r))}}catch{}}};kd=wS([IS(0,o.IStorageService)],kd),o.registerSingleton(em,kd,1);class xS{constructor(e,t,i){this.afterColumn=1073741824,this.afterLineNumber=e,this.heightInPx=t,this._onHeight=i,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(e){this._lastHeight===void 0?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())}isVisible(){return this._lastHeight!==0&&this.domNode.hasAttribute("monaco-visible-view-zone")}}const Kr=class Kr{constructor(e,t){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id=`codelens.widget-${Kr._idPool++}`,this.updatePosition(t),this._domNode=document.createElement("span"),this._domNode.className="codelens-decoration"}withCommands(e,t){this._commands.clear();const i=[];let n=!1;for(let s=0;s{h.symbol.command&&d.push(h.symbol),i.addDecoration({range:h.symbol.range,options:im},g=>this._decorationIds[u]=g),l?l=a.Range.plusRange(l,h.symbol.range):l=a.Range.lift(h.symbol.range)}),this._viewZone=new xS(l.startLineNumber-1,s,r),this._viewZoneId=n.addZone(this._viewZone),d.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(d,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new jd(this._editor,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],t?.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0}isDisposed(){return this._isDisposed}isValid(){return this._decorationIds.some((e,t)=>{const i=this._editor.getModel().getDecorationRange(e),n=this._data[t].symbol;return!!(i&&a.Range.isEmpty(n.range)===i.isEmpty())})}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach((i,n)=>{t.addDecoration({range:i.symbol.range,options:im},s=>this._decorationIds[n]=s)})}updateHeight(e,t){this._viewZone.heightInPx=e,t.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(e){if(!this._viewZone.isVisible())return null;for(let t=0;t=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},vo=function(c,e){return function(t,i){e(t,i,c)}};let bo=(Xs=class{constructor(e,t,i,n,s,r){this._editor=e,this._languageFeaturesService=t,this._commandService=n,this._notificationService=s,this._codeLensCache=r,this._disposables=new a.DisposableStore,this._localToDispose=new a.DisposableStore,this._lenses=[],this._oldCodeLensModels=new a.DisposableStore,this._provideCodeLensDebounce=i.for(t.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=i.for(t.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new a.RunOnceScheduler(()=>this._resolveCodeLensesInViewport(),this._resolveCodeLensesDebounce.default()),this._disposables.add(this._editor.onDidChangeModel(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeConfiguration(l=>{(l.hasChanged(59)||l.hasChanged(25)||l.hasChanged(24))&&this._updateLensStyle(),l.hasChanged(23)&&this._onModelChange()})),this._disposables.add(t.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._updateLensStyle()}dispose(){this._localDispose(),this._localToDispose.dispose(),this._disposables.dispose(),this._resolveCodeLensesScheduler.dispose(),this._oldCodeLensModels.dispose(),this._currentCodeLensModel?.dispose()}_getLayoutInfo(){const e=Math.max(1.3,this._editor.getOption(75)/this._editor.getOption(61));let t=this._editor.getOption(25);return(!t||t<5)&&(t=this._editor.getOption(61)*.9|0),{fontSize:t,codeLensHeight:t*e|0}}_updateLensStyle(){const{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),i=this._editor.getOption(24),n=this._editor.getOption(59),{style:s}=this._editor.getContainerDomNode();s.setProperty("--vscode-editorCodeLens-lineHeight",`${e}px`),s.setProperty("--vscode-editorCodeLens-fontSize",`${t}px`),s.setProperty("--vscode-editorCodeLens-fontFeatureSettings",n.fontFeatureSettings),i&&(s.setProperty("--vscode-editorCodeLens-fontFamily",i),s.setProperty("--vscode-editorCodeLens-fontFamilyDefault",o.EDITOR_FONT_DEFAULTS.fontFamily)),this._editor.changeViewZones(r=>{for(const l of this._lenses)l.updateHeight(e,r)})}_localDispose(){this._getCodeLensModelPromise?.cancel(),this._getCodeLensModelPromise=void 0,this._resolveCodeLensesPromise?.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),this._currentCodeLensModel?.dispose()}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e||!this._editor.getOption(23)||e.isTooLargeForTokenization())return;const t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!this._languageFeaturesService.codeLensProvider.has(e)){t&&a.disposableTimeout(()=>{const n=this._codeLensCache.get(e);t===n&&(this._codeLensCache.delete(e),this._onModelChange())},30*1e3,this._localToDispose);return}for(const n of this._languageFeaturesService.codeLensProvider.all(e))if(typeof n.onDidChange=="function"){const s=n.onDidChange(()=>i.schedule());this._localToDispose.add(s)}const i=new a.RunOnceScheduler(()=>{const n=Date.now();this._getCodeLensModelPromise?.cancel(),this._getCodeLensModelPromise=a.createCancelablePromise(s=>Hf(this._languageFeaturesService.codeLensProvider,e,s)),this._getCodeLensModelPromise.then(s=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=s,this._codeLensCache.put(e,s);const r=this._provideCodeLensDebounce.update(e,Date.now()-n);i.delay=r,this._renderCodeLensSymbols(s),this._resolveCodeLensesInViewportSoon()},a.onUnexpectedError)},this._provideCodeLensDebounce.get(e));this._localToDispose.add(i),this._localToDispose.add(a.toDisposable(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._editor.changeDecorations(n=>{this._editor.changeViewZones(s=>{const r=[];let l=-1;this._lenses.forEach(h=>{!h.isValid()||l===h.getLineNumber()?r.push(h):(h.update(s),l=h.getLineNumber())});const d=new $d;r.forEach(h=>{h.dispose(d,s),this._lenses.splice(this._lenses.indexOf(h),1)}),d.commit(n)})}),i.schedule(),this._resolveCodeLensesScheduler.cancel(),this._resolveCodeLensesPromise?.cancel(),this._resolveCodeLensesPromise=void 0})),this._localToDispose.add(this._editor.onDidFocusEditorText(()=>{i.schedule()})),this._localToDispose.add(this._editor.onDidBlurEditorText(()=>{i.cancel()})),this._localToDispose.add(this._editor.onDidScrollChange(n=>{n.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(a.toDisposable(()=>{if(this._editor.getModel()){const n=o.StableEditorScrollState.capture(this._editor);this._editor.changeDecorations(s=>{this._editor.changeViewZones(r=>{this._disposeAllLenses(s,r)})}),n.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(n=>{if(n.target.type!==9)return;let s=n.target.element;if(s?.tagName==="SPAN"&&(s=s.parentElement),s?.tagName==="A")for(const r of this._lenses){const l=r.getCommand(s);if(l){this._commandService.executeCommand(l.id,...l.arguments||[]).catch(d=>this._notificationService.error(d));break}}})),i.schedule()}_disposeAllLenses(e,t){const i=new $d;for(const n of this._lenses)n.dispose(i,t);e&&i.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;const t=this._editor.getModel().getLineCount(),i=[];let n;for(const l of e.lenses){const d=l.symbol.range.startLineNumber;d<1||d>t||(n&&n[n.length-1].symbol.range.startLineNumber===d?n.push(l):(n=[l],i.push(n)))}if(!i.length&&!this._lenses.length)return;const s=o.StableEditorScrollState.capture(this._editor),r=this._getLayoutInfo();this._editor.changeDecorations(l=>{this._editor.changeViewZones(d=>{const h=new $d;let u=0,g=0;for(;gthis._resolveCodeLensesInViewportSoon())),u++,g++)}for(;uthis._resolveCodeLensesInViewportSoon())),g++;h.commit(l)})}),s.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){this._resolveCodeLensesPromise?.cancel(),this._resolveCodeLensesPromise=void 0;const e=this._editor.getModel();if(!e)return;const t=[],i=[];if(this._lenses.forEach(r=>{const l=r.computeIfNecessary(e);l&&(t.push(l),i.push(r))}),t.length===0){this._oldCodeLensModels.clear();return}const n=Date.now(),s=a.createCancelablePromise(r=>{const l=t.map((d,h)=>{const u=new Array(d.length),g=d.map((p,f)=>!p.symbol.command&&typeof p.provider.resolveCodeLens=="function"?Promise.resolve(p.provider.resolveCodeLens(e,p.symbol,r)).then(m=>{u[f]=m},a.onUnexpectedExternalError):(u[f]=p.symbol,Promise.resolve(void 0)));return Promise.all(g).then(()=>{!r.isCancellationRequested&&!i[h].isDisposed()&&i[h].updateCommands(u)})});return Promise.all(l)});this._resolveCodeLensesPromise=s,this._resolveCodeLensesPromise.then(()=>{const r=this._resolveCodeLensesDebounce.update(e,Date.now()-n);this._resolveCodeLensesScheduler.delay=r,this._currentCodeLensModel&&this._codeLensCache.put(e,this._currentCodeLensModel),this._oldCodeLensModels.clear(),s===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},r=>{a.onUnexpectedError(r),s===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}async getModel(){return await this._getCodeLensModelPromise,await this._resolveCodeLensesPromise,this._currentCodeLensModel?.isDisposed?void 0:this._currentCodeLensModel}},Xs.ID="css.editor.codeLens",Xs);bo=ES([vo(1,o.ILanguageFeaturesService),vo(2,o.ILanguageFeatureDebounceService),vo(3,o.ICommandService),vo(4,o.INotificationService),vo(5,em)],bo),o.registerEditorContribution(bo.ID,bo,1),o.registerEditorAction(class extends o.EditorAction{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:o.EditorContextKeys.hasCodeLensProvider,label:a.localize2(920,"Show CodeLens Commands for Current Line")})}async run(e,t){if(!t.hasModel())return;const i=e.get(o.IQuickInputService),n=e.get(o.ICommandService),s=e.get(o.INotificationService),r=t.getSelection().positionLineNumber,l=t.getContribution(bo.ID);if(!l)return;const d=await l.getModel();if(!d)return;const h=[];for(const p of d.lenses)p.symbol.command&&p.symbol.range.startLineNumber===r&&h.push({label:p.symbol.command.title,command:p.symbol.command});if(h.length===0)return;const u=await i.pick(h,{canPickMany:!1,placeHolder:a.localize(919,"Select a command")});if(!u)return;let g=u.command;if(d.isDisposed){const f=(await l.getModel())?.lenses.find(m=>m.symbol.range.startLineNumber===r&&m.symbol.command?.title===g.title);if(!f||!f.symbol.command)return;g=f.symbol.command}try{await n.executeCommand(g.id,...g.arguments||[])}catch(p){s.error(p)}}});class qd{constructor(e,t,i,n){this.priority=e,this.range=t,this.initialMousePosX=i,this.initialMousePosY=n,this.type=1}equals(e){return e.type===1&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,t){return e.type===1&&t.lineNumber===this.range.startLineNumber}}class Co{constructor(e,t,i,n,s,r){this.priority=e,this.owner=t,this.range=i,this.initialMousePosX=n,this.initialMousePosY=s,this.supportsMarkerHover=r,this.type=2}equals(e){return e.type===2&&this.owner===e.owner}canAdoptVisibleHover(e,t){return e.type===2&&this.owner===e.owner}}class qi{constructor(e,t){this.renderedHoverParts=e,this.disposables=t}dispose(){for(const e of this.renderedHoverParts)e.dispose();this.disposables?.dispose()}}const Gi=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}};var sm=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Gd=function(c,e){return function(t,i){e(t,i,c)}};let So=class{constructor(e){this._editorWorkerService=e}async provideDocumentColors(e,t){return this._editorWorkerService.computeDefaultDocumentColors(e.uri)}provideColorPresentations(e,t,i){const n=t.range,s=t.color,r=new a.Color(new a.RGBA(Math.round(255*s.red),Math.round(255*s.green),Math.round(255*s.blue),s.alpha)),l=a.Color.Format.CSS.formatRGB(r),d=a.Color.Format.CSS.formatHSL(r),h=a.Color.Format.CSS.formatHexA(r,!0),u=[];return u.push({label:l,textEdit:{range:n,text:l}}),u.push({label:d,textEdit:{range:n,text:d}}),u.push({label:h,textEdit:{range:n,text:h}}),u}};So=sm([Gd(0,o.IEditorWorkerService)],So);let Zd=class extends a.Disposable{constructor(e,t){super(),this._register(e.colorProvider.register("*",new So(t)))}};Zd=sm([Gd(0,o.ILanguageFeaturesService),Gd(1,o.IEditorWorkerService)],Zd);async function om(c,e,t,i="auto"){return Xd(new LS,c,e,t,i)}function rm(c,e,t,i){return Promise.resolve(t.provideColorPresentations(c,e,i))}class LS{constructor(){}async compute(e,t,i,n){const s=await e.provideDocumentColors(t,i);if(Array.isArray(s))for(const r of s)n.push({colorInfo:r,provider:e});return Array.isArray(s)}}class DS{constructor(){}async compute(e,t,i,n){const s=await e.provideDocumentColors(t,i);if(Array.isArray(s))for(const r of s)n.push({range:r.range,color:[r.color.red,r.color.green,r.color.blue,r.color.alpha]});return Array.isArray(s)}}class RS{constructor(e){this.colorInfo=e}async compute(e,t,i,n){const s=await e.provideColorPresentations(t,this.colorInfo,a.CancellationToken.None);return Array.isArray(s)&&n.push(...s),Array.isArray(s)}}async function Xd(c,e,t,i,n){let s=!1,r;const l=[],d=e.ordered(t);for(let h=d.length-1;h>=0;h--){const u=d[h];if(n!=="always"&&u instanceof So)r=u;else try{await c.compute(u,t,i,l)&&(s=!0)}catch(g){a.onUnexpectedExternalError(g)}}return s?l:r&&n!=="never"?(await c.compute(r,t,i,l),l):[]}function am(c,e){const{colorProvider:t}=c.get(o.ILanguageFeaturesService),i=c.get(o.IModelService).getModel(e);if(!i)throw a.illegalArgument();const n=c.get(o.IConfigurationService).getValue("editor.defaultColorDecorators",{resource:e});return{model:i,colorProviderRegistry:t,defaultColorDecoratorsEnablement:n}}var TS=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Yd=function(c,e){return function(t,i){e(t,i,c)}},Qd;const lm=Object.create({});let ls=(mi=class extends a.Disposable{constructor(e,t,i,n){super(),this._editor=e,this._configurationService=t,this._languageFeaturesService=i,this._localToDispose=this._register(new a.DisposableStore),this._decorationsIds=[],this._colorDatas=new Map,this._decoratorLimitReporter=this._register(new NS),this._colorDecorationClassRefs=this._register(new a.DisposableStore),this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=this._register(new o.DynamicCssRules(this._editor)),this._debounceInformation=n.for(i.colorProvider,"Document Colors",{min:Qd.RECOMPUTE_TIME}),this._register(e.onDidChangeModel(()=>{this._isColorDecoratorsEnabled=this.isEnabled(),this.updateColors()})),this._register(e.onDidChangeModelLanguage(()=>this.updateColors())),this._register(i.colorProvider.onDidChange(()=>this.updateColors())),this._register(e.onDidChangeConfiguration(s=>{const r=this._isColorDecoratorsEnabled;this._isColorDecoratorsEnabled=this.isEnabled(),this._defaultColorDecoratorsEnablement=this._editor.getOption(167);const l=r!==this._isColorDecoratorsEnabled||s.hasChanged(27),d=s.hasChanged(167);(l||d)&&(this._isColorDecoratorsEnabled?this.updateColors():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isColorDecoratorsEnabled=this.isEnabled(),this._defaultColorDecoratorsEnablement=this._editor.getOption(167),this.updateColors()}isEnabled(){const e=this._editor.getModel();if(!e)return!1;const t=e.getLanguageId(),i=this._configurationService.getValue(t);if(i&&typeof i=="object"){const n=i.colorDecorators;if(n&&n.enable!==void 0&&!n.enable)return n.enable}return this._editor.getOption(26)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}updateColors(){if(this.stop(),!this._isColorDecoratorsEnabled)return;const e=this._editor.getModel();!e||!this._languageFeaturesService.colorProvider.has(e)||(this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._timeoutTimer||(this._timeoutTimer=new a.TimeoutTimer,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},this._debounceInformation.get(e)))})),this.beginCompute())}async beginCompute(){this._computePromise=a.createCancelablePromise(async e=>{const t=this._editor.getModel();if(!t)return[];const i=new a.StopWatch(!1),n=await om(this._languageFeaturesService.colorProvider,t,e,this._defaultColorDecoratorsEnablement);return this._debounceInformation.update(t,i.elapsed()),n});try{const e=await this._computePromise;this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null}catch(e){a.onUnexpectedError(e)}}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(e){const t=e.map(i=>({range:{startLineNumber:i.colorInfo.range.startLineNumber,startColumn:i.colorInfo.range.startColumn,endLineNumber:i.colorInfo.range.endLineNumber,endColumn:i.colorInfo.range.endColumn},options:o.ModelDecorationOptions.EMPTY}));this._editor.changeDecorations(i=>{this._decorationsIds=i.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach((n,s)=>this._colorDatas.set(n,e[s]))})}updateColorDecorators(e){this._colorDecorationClassRefs.clear();const t=[],i=this._editor.getOption(27);for(let s=0;sthis._colorDatas.has(n.id));return i.length===0?null:this._colorDatas.get(i[0].id)}isColorDecoration(e){return this._colorDecoratorIds.has(e)}},Qd=mi,mi.ID="editor.contrib.colorDetector",mi.RECOMPUTE_TIME=1e3,mi);ls=Qd=TS([Yd(1,o.IConfigurationService),Yd(2,o.ILanguageFeaturesService),Yd(3,o.ILanguageFeatureDebounceService)],ls);class NS extends a.Disposable{constructor(){super(...arguments),this._onDidChange=this._register(new a.Emitter),this._computed=0,this._limited=!1}update(e,t){(e!==this._computed||t!==this._limited)&&(this._computed=e,this._limited=t,this._onDidChange.fire())}}const cm="editor.action.showHover",MS="editor.action.showDefinitionPreviewHover",PS="editor.action.hideHover",OS="editor.action.scrollUpHover",AS="editor.action.scrollDownHover",FS="editor.action.scrollLeftHover",zS="editor.action.scrollRightHover",VS="editor.action.pageUpHover",BS="editor.action.pageDownHover",KS="editor.action.goToTopHover",US="editor.action.goToBottomHover",Hr="editor.action.increaseHoverVerbosityLevel",kS=a.localize(1145,"Increase Hover Verbosity Level"),ea="editor.action.decreaseHoverVerbosityLevel",jS=a.localize(1146,"Decrease Hover Verbosity Level"),Jd="editor.action.hideLongLineWarningHover",cs="editor.action.inlineSuggest.commit",ta="editor.action.inlineSuggest.commitAlternativeAction",dm="editor.action.inlineSuggest.showPrevious",hm="editor.action.inlineSuggest.showNext",um="editor.action.inlineSuggest.jump",gm="editor.action.inlineSuggest.hide",Wd="editor.action.inlineSuggest.toggleShowCollapsed",pm="editor.action.inlineSuggest.renameSymbol";var Hd=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Pe=function(c,e){return function(t,i){e(t,i,c)}},ia;let eh=class extends a.Disposable{constructor(e,t,i){super(),this.editor=e,this.model=t,this.instantiationService=i,this.alwaysShowToolbar=o.observableFromEvent(this,this.editor.onDidChangeConfiguration,()=>this.editor.getOption(71).showToolbar==="always"),this.sessionPosition=void 0,this.position=o.derived(this,n=>{const s=this.model.read(n)?.primaryGhostText.read(n);if(!this.alwaysShowToolbar.read(n)||!s||s.parts.length===0)return this.sessionPosition=void 0,null;const r=s.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==s.lineNumber&&(this.sessionPosition=void 0);const l=new a.Position(s.lineNumber,Math.min(r,this.sessionPosition?.column??Number.MAX_SAFE_INTEGER));return this.sessionPosition=l,l}),this._register(o.autorunWithStore((n,s)=>{const r=this.model.read(n);if(!r||!this.alwaysShowToolbar.read(n))return;const l=o.derived(h=>{const u=h.store.add(this.instantiationService.createInstance(ds.hot.read(h),this.editor,!0,this.position,r.selectedInlineCompletionIndex,r.inlineCompletionsCount,r.activeCommands,r.warning,()=>{}));return e.addContentWidget(u),h.store.add(a.toDisposable(()=>e.removeContentWidget(u))),h.store.add(o.autorun(g=>{this.position.read(g)&&r.lastTriggerKind.read(g)!==a.InlineCompletionTriggerKind.Explicit&&r.triggerExplicitly()})),u}),d=o.derivedObservableWithCache(this,(h,u)=>!!this.position.read(h)||!!u);s.add(o.autorun(h=>{d.read(h)&&l.read(h)}))}))}};eh=Hd([Pe(2,o.IInstantiationService)],eh);const $S=o.registerIcon("inline-suggestion-hints-next",a.Codicon.chevronRight,a.localize(1250,"Icon for show next parameter hint.")),qS=o.registerIcon("inline-suggestion-hints-previous",a.Codicon.chevronLeft,a.localize(1251,"Icon for show previous parameter hint."));let ds=(mt=class extends a.Disposable{static get dropDownVisible(){return this._dropDownVisible}createCommandAction(e,t,i){const n=new o.Action(e,t,i,!0,()=>this._commandService.executeCommand(e));return n.tooltip=this.keybindingService.appendKeybinding(t,e,this._contextKeyService),n}constructor(e,t,i,n,s,r,l,d,h,u,g,p,f){super(),this.editor=e,this.withBorder=t,this._position=i,this._currentSuggestionIdx=n,this._suggestionCount=s,this._extraCommands=r,this._warning=l,this._relayout=d,this._commandService=h,this.keybindingService=g,this._contextKeyService=p,this._menuService=f,this.id=`InlineSuggestionHintsContentWidget${ia.id++}`,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._warningMessageContentNode=o.derived(m=>{const _=this._warning.read(m);return _?typeof _.message=="string"?_.message:m.store.add(o.renderMarkdown(_.message)).element:void 0}),this._warningMessageNode=o.n.div({class:"warningMessage",style:{maxWidth:400,margin:4,marginBottom:4,display:o.derived(m=>this._warning.read(m)?"block":"none")}},[this._warningMessageContentNode]).keepUpdated(this._store),this.nodes=o.h("div.inlineSuggestionsHints",{className:this.withBorder?"monaco-hover monaco-hover-content":""},[this._warningMessageNode.element,o.h("div@toolBar")]),this.previousAction=this._register(this.createCommandAction(dm,a.localize(1252,"Previous"),o.ThemeIcon.asClassName(qS))),this.availableSuggestionCountAction=this._register(new o.Action("inlineSuggestionHints.availableSuggestionCount","",void 0,!1)),this.nextAction=this._register(this.createCommandAction(hm,a.localize(1253,"Next"),o.ThemeIcon.asClassName($S))),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(o.MenuId.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new a.RunOnceScheduler(()=>{this.availableSuggestionCountAction.label=""},100)),this.disableButtonsDebounced=this._register(new a.RunOnceScheduler(()=>{this.previousAction.enabled=this.nextAction.enabled=!1},100)),this._register(o.autorun(m=>{this._warningMessageContentNode.read(m),this._warningMessageNode.readEffect(m),this._relayout()})),this.toolBar=this._register(u.createInstance(th,this.nodes.toolBar,o.MenuId.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:m=>m.startsWith("primary")},actionViewItemProvider:(m,_)=>{if(m instanceof o.MenuItemAction)return u.createInstance(ZS,m,void 0);if(m===this.availableSuggestionCountAction){const v=new GS(void 0,m,{label:!0,icon:!1});return v.setClass("availableSuggestionCount"),v}},telemetrySource:"InlineSuggestionToolbar"})),this.toolBar.setPrependedPrimaryActions([this.previousAction,this.availableSuggestionCountAction,this.nextAction]),this._register(this.toolBar.onDidChangeDropdownVisibility(m=>{ia._dropDownVisible=m})),this._register(o.autorun(m=>{this._position.read(m),this.editor.layoutContentWidget(this)})),this._register(o.autorun(m=>{const _=this._suggestionCount.read(m),v=this._currentSuggestionIdx.read(m);_!==void 0?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${v+1}/${_}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),_!==void 0&&_>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule()})),this._register(o.autorun(m=>{const v=this._extraCommands.read(m).map(b=>({class:void 0,id:b.command.id,enabled:!0,tooltip:b.command.tooltip||"",label:b.command.title,run:()=>this._commandService.executeCommand(b.command.id,...b.command.arguments??[])}));for(const[b,S]of this.inlineCompletionsActionsMenus.getActions())for(const w of S)w instanceof o.MenuItemAction&&v.push(w);v.length>0&&v.unshift(new o.Separator),this.toolBar.setAdditionalSecondaryActions(v)}))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}},ia=mt,mt.hot=o.createHotClass(mt),mt._dropDownVisible=!1,mt.id=0,mt);ds=ia=Hd([Pe(8,o.ICommandService),Pe(9,o.IInstantiationService),Pe(10,o.IKeybindingService),Pe(11,o.IContextKeyService),Pe(12,o.IMenuService)],ds);class GS extends o.ActionViewItem{constructor(){super(...arguments),this._className=void 0}setClass(e){this._className=e}render(e){super.render(e),this._className&&e.classList.add(this._className)}updateTooltip(){}}class ZS extends o.MenuEntryActionViewItem{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService,!0);if(!e)return super.updateLabel();if(this.label){const t=o.h("div.keybinding").root;this._register(new o.KeybindingLabel(t,a.OS,{disableTitle:!0,...o.unthemedKeybindingLabelOptions})).set(e),this.label.textContent=this._action.label,this.label.appendChild(t),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}updateTooltip(){}}let th=class extends o.WorkbenchToolBar{constructor(e,t,i,n,s,r,l,d,h){super(e,{resetMenu:t,...i},n,s,r,l,d,h),this.menuId=t,this.options2=i,this.menuService=n,this.contextKeyService=s,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this.prependedPrimaryActions=[],this.additionalPrimaryActions=[],this._store.add(this.menu.onDidChange(()=>this.updateToolbar())),this.updateToolbar()}updateToolbar(){const{primary:e,secondary:t}=o.getActionBarActions(this.menu.getActions(this.options2?.menuOptions),this.options2?.toolbarOptions?.primaryGroup,this.options2?.toolbarOptions?.shouldInlineSubmenu,this.options2?.toolbarOptions?.useSeparatorsInPrimaryActions);t.push(...this.additionalActions),e.unshift(...this.prependedPrimaryActions),e.push(...this.additionalPrimaryActions),this.setActions(e,t)}setPrependedPrimaryActions(e){a.equals(this.prependedPrimaryActions,e,(t,i)=>t===i)||(this.prependedPrimaryActions=e,this.updateToolbar())}setAdditionalSecondaryActions(e){a.equals(this.additionalActions,e,(t,i)=>t===i)||(this.additionalActions=e,this.updateToolbar())}};th=Hd([Pe(3,o.IMenuService),Pe(4,o.IContextKeyService),Pe(5,o.IContextMenuService),Pe(6,o.IKeybindingService),Pe(7,o.ICommandService),Pe(8,o.ITelemetryService)],th);function na(c,e,t){const i=o.getDomNodePagePosition(c);return!(ei.left+i.width-3||ti.top+i.height-3)}function fm(c,e,t){return c==="on"?!0:c==="off"?!1:ih(e,t.event)}function ih(c,e){return c==="altKey"?e.ctrlKey||e.metaKey:e.altKey}class XS{constructor(e,t,i,n){this.value=e,this.isComplete=t,this.hasLoadingMessage=i,this.options=n}}class mm extends a.Disposable{constructor(e,t){super(),this._editor=e,this._computer=t,this._onResult=this._register(new a.Emitter),this.onResult=this._onResult.event,this._asyncComputationScheduler=this._register(new nh(i=>this._triggerAsyncComputation(i),0)),this._syncComputationScheduler=this._register(new nh(i=>this._triggerSyncComputation(i),0)),this._loadingMessageScheduler=this._register(new nh(i=>this._triggerLoadingMessage(i),0)),this._state=0,this._asyncIterable=null,this._asyncIterableDone=!1,this._result=[]}dispose(){this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),this._options=void 0,super.dispose()}get _hoverTime(){return this._editor.getOption(69).delay}get _firstWaitTime(){return this._hoverTime/2}get _secondWaitTime(){return this._hoverTime-this._firstWaitTime}get _loadingMessageTime(){return 3*this._hoverTime}_setState(e,t){this._options=t,this._state=e,this._fireResult(t)}_triggerAsyncComputation(e){this._setState(2,e),this._syncComputationScheduler.schedule(e,this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=a.createCancelableAsyncIterableProducer(t=>this._computer.computeAsync(e,t)),(async()=>{try{for await(const t of this._asyncIterable)t&&(this._result.push(t),this._fireResult(e));this._asyncIterableDone=!0,(this._state===3||this._state===4)&&this._setState(0,e)}catch(t){a.onUnexpectedError(t)}})()):this._asyncIterableDone=!0}_triggerSyncComputation(e){this._computer.computeSync&&(this._result=this._result.concat(this._computer.computeSync(e))),this._setState(this._asyncIterableDone?0:3,e)}_triggerLoadingMessage(e){this._state===3&&this._setState(4,e)}_fireResult(e){if(this._state===1||this._state===2)return;const t=this._state===0,i=this._state===4;this._onResult.fire(new XS(this._result.slice(0),t,i,e))}start(e,t){if(e===0)this._state===0&&(this._setState(1,t),this._asyncComputationScheduler.schedule(t,this._firstWaitTime),this._loadingMessageScheduler.schedule(t,this._loadingMessageTime));else switch(this._state){case 0:this._triggerAsyncComputation(t),this._syncComputationScheduler.cancel(),this._triggerSyncComputation(t);break;case 2:this._syncComputationScheduler.cancel(),this._triggerSyncComputation(t);break}}cancel(){this._asyncComputationScheduler.cancel(),this._syncComputationScheduler.cancel(),this._loadingMessageScheduler.cancel(),this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),this._result=[],this._options=void 0,this._state=0}get options(){return this._options}}class nh extends a.Disposable{constructor(e,t){super(),this._scheduler=this._register(new a.RunOnceScheduler(()=>e(this._options),t))}schedule(e,t){this._options=e,this._scheduler.schedule(t)}cancel(){this._scheduler.cancel()}}class sh{get onDidWillResize(){return this._onDidWillResize.event}get onDidResize(){return this._onDidResize.event}constructor(){this._onDidWillResize=new a.Emitter,this._onDidResize=new a.Emitter,this._sashListener=new a.DisposableStore,this._size=new o.Dimension(0,0),this._minSize=new o.Dimension(0,0),this._maxSize=new o.Dimension(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new o.Sash(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new o.Sash(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new o.Sash(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:o.OrthogonalEdge.North}),this._southSash=new o.Sash(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:o.OrthogonalEdge.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let e,t=0,i=0;this._sashListener.add(a.Event.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)(()=>{e===void 0&&(this._onDidWillResize.fire(),e=this._size,t=0,i=0)})),this._sashListener.add(a.Event.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)(()=>{e!==void 0&&(e=void 0,t=0,i=0,this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(this._eastSash.onDidChange(n=>{e&&(i=n.currentX-n.startX,this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))})),this._sashListener.add(this._westSash.onDidChange(n=>{e&&(i=-(n.currentX-n.startX),this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))})),this._sashListener.add(this._northSash.onDidChange(n=>{e&&(t=-(n.currentY-n.startY),this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))})),this._sashListener.add(this._southSash.onDidChange(n=>{e&&(t=n.currentY-n.startY,this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))})),this._sashListener.add(a.Event.any(this._eastSash.onDidReset,this._westSash.onDidReset)(n=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(a.Event.any(this._northSash.onDidReset,this._southSash.onDidReset)(n=>{this._preferredSize&&(this.layout(this._preferredSize.height,this._size.width),this._onDidResize.fire({dimension:this._size,done:!0}))}))}dispose(){this._northSash.dispose(),this._southSash.dispose(),this._eastSash.dispose(),this._westSash.dispose(),this._sashListener.dispose(),this._onDidResize.dispose(),this._onDidWillResize.dispose(),this.domNode.remove()}enableSashes(e,t,i,n){this._northSash.state=e?3:0,this._eastSash.state=t?3:0,this._southSash.state=i?3:0,this._westSash.state=n?3:0}layout(e=this.size.height,t=this.size.width){const{height:i,width:n}=this._minSize,{height:s,width:r}=this._maxSize;e=Math.max(i,Math.min(s,e)),t=Math.max(n,Math.min(r,t));const l=new o.Dimension(t,e);o.Dimension.equals(l,this._size)||(this.domNode.style.height=e+"px",this.domNode.style.width=t+"px",this._size=l,this._northSash.layout(),this._eastSash.layout(),this._southSash.layout(),this._westSash.layout())}clearSashHoverState(){this._eastSash.clearSashHoverState(),this._westSash.clearSashHoverState(),this._northSash.clearSashHoverState(),this._southSash.clearSashHoverState()}get size(){return this._size}set maxSize(e){this._maxSize=e}get maxSize(){return this._maxSize}set minSize(e){this._minSize=e}get minSize(){return this._minSize}set preferredSize(e){this._preferredSize=e}get preferredSize(){return this._preferredSize}}const YS=30,QS=24;class JS extends a.Disposable{constructor(e,t=new o.Dimension(10,10)){super(),this._editor=e,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._resizableNode=this._register(new sh),this._contentPosition=null,this._isResizing=!1,this._resizableNode.domNode.style.position="absolute",this._resizableNode.minSize=o.Dimension.lift(t),this._resizableNode.layout(t.height,t.width),this._resizableNode.enableSashes(!0,!0,!0,!0),this._register(this._resizableNode.onDidResize(i=>{this._resize(new o.Dimension(i.dimension.width,i.dimension.height)),i.done&&(this._isResizing=!1)})),this._register(this._resizableNode.onDidWillResize(()=>{this._isResizing=!0}))}get isResizing(){return this._isResizing}getDomNode(){return this._resizableNode.domNode}getPosition(){return this._contentPosition}get position(){return this._contentPosition?.position?a.Position.lift(this._contentPosition.position):void 0}_availableVerticalSpaceAbove(e){const t=this._editor.getDomNode(),i=this._editor.getScrolledVisiblePosition(e);return!t||!i?void 0:o.getDomNodePagePosition(t).top+i.top-YS}_availableVerticalSpaceBelow(e){const t=this._editor.getDomNode(),i=this._editor.getScrolledVisiblePosition(e);if(!t||!i)return;const n=o.getDomNodePagePosition(t),s=o.getClientArea(t.ownerDocument.body),r=n.top+i.top+i.height;return s.height-r-QS}_findPositionPreference(e,t){const i=Math.min(this._availableVerticalSpaceBelow(t)??1/0,e),n=Math.min(this._availableVerticalSpaceAbove(t)??1/0,e),s=Math.min(Math.max(n,i),e),r=Math.min(e,s);let l;return this._editor.getOption(69).above?l=r<=n?1:2:l=r<=i?2:1,l===1?this._resizableNode.enableSashes(!0,!0,!1,!1):this._resizableNode.enableSashes(!1,!0,!0,!1),l}_resize(e){this._resizableNode.layout(e.height,e.width)}}var WS=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},sa=function(c,e){return function(t,i){e(t,i,c)}},Oe;const _m=30;let oh=(_i=class extends JS{get isVisibleFromKeyboard(){return this._renderedHover?.source===2}get isVisible(){return this._hoverVisibleKey.get()??!1}get isFocused(){return this._hoverFocusedKey.get()??!1}constructor(e,t,i,n,s){const r=e.getOption(75)+8,l=150,d=new o.Dimension(l,r);super(e,d),this._configurationService=i,this._accessibilityService=n,this._keybindingService=s,this._hover=this._register(new o.HoverWidget(!0)),this._onDidResize=this._register(new a.Emitter),this.onDidResize=this._onDidResize.event,this._onDidScroll=this._register(new a.Emitter),this.onDidScroll=this._onDidScroll.event,this._onContentsChanged=this._register(new a.Emitter),this.onContentsChanged=this._onContentsChanged.event,this._minimumSize=d,this._hoverVisibleKey=o.EditorContextKeys.hoverVisible.bindTo(t),this._hoverFocusedKey=o.EditorContextKeys.hoverFocused.bindTo(t),o.append(this._resizableNode.domNode,this._hover.containerDomNode),this._resizableNode.domNode.style.zIndex="50",this._resizableNode.domNode.className="monaco-resizable-hover",this._register(this._editor.onDidLayoutChange(()=>{this.isVisible&&this._updateMaxDimensions()})),this._register(this._editor.onDidChangeConfiguration(u=>{u.hasChanged(59)&&this._updateFont()}));const h=this._register(o.trackFocus(this._resizableNode.domNode));this._register(h.onDidFocus(()=>{this._hoverFocusedKey.set(!0)})),this._register(h.onDidBlur(()=>{this._hoverFocusedKey.set(!1)})),this._register(this._hover.scrollbar.onScroll(u=>{this._onDidScroll.fire(u)})),this._setRenderedHover(void 0),this._editor.addContentWidget(this)}dispose(){super.dispose(),this._renderedHover?.dispose(),this._editor.removeContentWidget(this)}getId(){return Oe.ID}static _applyDimensions(e,t,i){const n=typeof t=="number"?`${t}px`:t,s=typeof i=="number"?`${i}px`:i;e.style.width=n,e.style.height=s}_setContentsDomNodeDimensions(e,t){const i=this._hover.contentsDomNode;return Oe._applyDimensions(i,e,t)}_setContainerDomNodeDimensions(e,t){const i=this._hover.containerDomNode;return Oe._applyDimensions(i,e,t)}_setScrollableElementDimensions(e,t){const i=this._hover.scrollbar.getDomNode();return Oe._applyDimensions(i,e,t)}_setHoverWidgetDimensions(e,t){this._setContainerDomNodeDimensions(e,t),this._setScrollableElementDimensions(e,t),this._setContentsDomNodeDimensions(e,t),this._layoutContentWidget()}static _applyMaxDimensions(e,t,i){const n=typeof t=="number"?`${t}px`:t,s=typeof i=="number"?`${i}px`:i;e.style.maxWidth=n,e.style.maxHeight=s}_setHoverWidgetMaxDimensions(e,t){Oe._applyMaxDimensions(this._hover.contentsDomNode,e,t),Oe._applyMaxDimensions(this._hover.scrollbar.getDomNode(),e,t),Oe._applyMaxDimensions(this._hover.containerDomNode,e,t),this._hover.containerDomNode.style.setProperty("--vscode-hover-maxWidth",typeof e=="number"?`${e}px`:e),this._layoutContentWidget()}_setAdjustedHoverWidgetDimensions(e){this._setHoverWidgetMaxDimensions("none","none"),this._setHoverWidgetDimensions(e.width,e.height)}_updateResizableNodeMaxDimensions(){const e=this._findMaximumRenderingWidth()??1/0,t=this._findMaximumRenderingHeight()??1/0;this._resizableNode.maxSize=new o.Dimension(e,t),this._setHoverWidgetMaxDimensions(e,t)}_resize(e){Oe._lastDimensions=new o.Dimension(e.width,e.height),this._setAdjustedHoverWidgetDimensions(e),this._resizableNode.layout(e.height,e.width),this._updateResizableNodeMaxDimensions(),this._hover.scrollbar.scanDomNode(),this._editor.layoutContentWidget(this),this._onDidResize.fire()}_findAvailableSpaceVertically(){const e=this._renderedHover?.showAtPosition;if(e)return this._positionPreference===1?this._availableVerticalSpaceAbove(e):this._availableVerticalSpaceBelow(e)}_findMaximumRenderingHeight(){const e=this._findAvailableSpaceVertically();if(!e)return;let i=this._hover.contentsDomNode.children.length-1;return Array.from(this._hover.contentsDomNode.children).forEach(n=>{i+=n.clientHeight}),Math.min(e,i)}_isHoverTextOverflowing(){this._hover.containerDomNode.style.setProperty("--vscode-hover-whiteSpace","nowrap"),this._hover.containerDomNode.style.setProperty("--vscode-hover-sourceWhiteSpace","nowrap");const e=Array.from(this._hover.contentsDomNode.children).some(t=>t.scrollWidth>t.clientWidth);return this._hover.containerDomNode.style.removeProperty("--vscode-hover-whiteSpace"),this._hover.containerDomNode.style.removeProperty("--vscode-hover-sourceWhiteSpace"),e}_findMaximumRenderingWidth(){if(!this._editor||!this._editor.hasModel())return;const e=this._isHoverTextOverflowing(),t=typeof this._contentWidth>"u"?0:this._contentWidth;return e||this._hover.containerDomNode.clientWidththis._renderedHover.closestMouseDistance+4?!1:(this._renderedHover.closestMouseDistance=Math.min(this._renderedHover.closestMouseDistance,n),!0)}_setRenderedHover(e){this._renderedHover?.dispose(),this._renderedHover=e,this._hoverVisibleKey.set(!!e),this._hover.containerDomNode.classList.toggle("hidden",!e)}_updateFont(){const{fontSize:e,lineHeight:t}=this._editor.getOption(59),i=this._hover.contentsDomNode;i.style.fontSize=`${e}px`,i.style.lineHeight=`${t/e}`,Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(s=>this._editor.applyFontInfo(s))}_updateContent(e){const t=this._hover.contentsDomNode;t.style.paddingBottom="",t.textContent="",t.appendChild(e)}_layoutContentWidget(){this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}_updateMaxDimensions(){const e=Math.max(this._editor.getLayoutInfo().height/4,250,Oe._lastDimensions.height),t=Math.max(this._editor.getLayoutInfo().width*.66,750,Oe._lastDimensions.width);this._resizableNode.maxSize=new o.Dimension(t,e),this._setHoverWidgetMaxDimensions(t,e)}_render(e){this._setRenderedHover(e),this._updateFont(),this._updateContent(e.domNode),this.handleContentsChanged(),this._editor.render()}getPosition(){return this._renderedHover?{position:this._renderedHover.showAtPosition,secondaryPosition:this._renderedHover.showAtSecondaryPosition,positionAffinity:this._renderedHover.shouldAppearBeforeContent?3:void 0,preference:[this._positionPreference??1]}:null}show(e){if(!this._editor||!this._editor.hasModel())return;this._render(e);const t=o.getTotalHeight(this._hover.containerDomNode),i=e.showAtPosition;this._positionPreference=this._findPositionPreference(t,i)??1,this.handleContentsChanged(),e.shouldFocus&&this._hover.containerDomNode.focus(),this._onDidResize.fire();const s=this._hover.containerDomNode.ownerDocument.activeElement===this._hover.containerDomNode&&o.getHoverAccessibleViewHint(this._configurationService.getValue("accessibility.verbosity.hover")===!0&&this._accessibilityService.isScreenReaderOptimized(),this._keybindingService.lookupKeybinding("editor.action.accessibleView")?.getAriaLabel()??"");s&&(this._hover.contentsDomNode.ariaLabel=this._hover.contentsDomNode.textContent+", "+s)}hide(){if(!this._renderedHover)return;const e=this._renderedHover.shouldFocus||this._hoverFocusedKey.get();this._setRenderedHover(void 0),this._resizableNode.maxSize=new o.Dimension(1/0,1/0),this._resizableNode.clearSashHoverState(),this._hoverFocusedKey.set(!1),this._editor.layoutContentWidget(this),e&&this._editor.focus()}_removeConstraintsRenderNormally(){const e=this._editor.getLayoutInfo();this._resizableNode.layout(e.height,e.width),this._setHoverWidgetDimensions("auto","auto"),this._updateMaxDimensions()}setMinimumDimensions(e){this._minimumSize=new o.Dimension(Math.max(this._minimumSize.width,e.width),Math.max(this._minimumSize.height,e.height)),this._updateMinimumWidth()}_updateMinimumWidth(){const e=typeof this._contentWidth>"u"?this._minimumSize.width:Math.min(this._contentWidth,this._minimumSize.width);this._resizableNode.minSize=new o.Dimension(e,this._minimumSize.height)}handleContentsChanged(){this._removeConstraintsRenderNormally();const e=this._hover.contentsDomNode;let t=o.getTotalHeight(e),i=o.getTotalWidth(e)+2;if(this._resizableNode.layout(t,i),this._setHoverWidgetDimensions(i,t),t=o.getTotalHeight(e),i=o.getTotalWidth(e),this._contentWidth=i,this._updateMinimumWidth(),this._resizableNode.layout(t,i),this._renderedHover?.showAtPosition){const n=o.getTotalHeight(this._hover.containerDomNode);this._positionPreference=this._findPositionPreference(n,this._renderedHover.showAtPosition)}this._layoutContentWidget(),this._onContentsChanged.fire()}focus(){this._hover.containerDomNode.focus()}scrollUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(59);this._hover.scrollbar.setScrollPosition({scrollTop:e-t.lineHeight})}scrollDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(59);this._hover.scrollbar.setScrollPosition({scrollTop:e+t.lineHeight})}scrollLeft(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e-_m})}scrollRight(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e+_m})}pageUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e-t})}pageDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e+t})}goToTop(){this._hover.scrollbar.setScrollPosition({scrollTop:0})}goToBottom(){this._hover.scrollbar.setScrollPosition({scrollTop:this._hover.scrollbar.getScrollDimensions().scrollHeight})}},Oe=_i,_i.ID="editor.contrib.resizableContentHoverWidget",_i._lastDimensions=new o.Dimension(0,0),_i);oh=Oe=WS([sa(1,o.IContextKeyService),sa(2,o.IConfigurationService),sa(3,o.IAccessibilityService),sa(4,o.IKeybindingService)],oh);function vm(c,e,t,i,n,s){const r=t+n/2,l=i+s/2,d=Math.max(Math.abs(c-r)-n/2,0),h=Math.max(Math.abs(e-l)-s/2,0);return Math.sqrt(d*d+h*h)}class oa{constructor(e,t){this._editor=e,this._participants=t}static _getLineDecorations(e,t){if(t.type!==1&&!t.supportsMarkerHover)return[];const i=e.getModel(),n=t.range.startLineNumber;if(n>i.getLineCount())return[];const s=i.getLineMaxColumn(n);return e.getLineDecorations(n).filter(r=>{if(r.options.isWholeLine)return!0;const l=r.range.startLineNumber===n?r.range.startColumn:1,d=r.range.endLineNumber===n?r.range.endColumn:s;if(r.options.showIfCollapsed){if(l>t.range.startColumn+1||t.range.endColumn-1>d)return!1}else if(l>t.range.startColumn||t.range.endColumn>d)return!1;return!0})}computeAsync(e,t){const i=e.anchor;if(!this._editor.hasModel()||!i)return a.AsyncIterableProducer.EMPTY;const n=oa._getLineDecorations(this._editor,i);return a.AsyncIterableProducer.merge(this._participants.map(s=>s.computeAsync?s.computeAsync(i,n,e.source,t):a.AsyncIterableProducer.EMPTY))}computeSync(e){if(!this._editor.hasModel())return[];const t=e.anchor,i=oa._getLineDecorations(this._editor,t);let n=[];for(const s of this._participants)n=n.concat(s.computeSync(t,i,e.source));return a.coalesce(n)}}class bm{constructor(e,t,i){this.hoverParts=e,this.isComplete=t,this.options=i}filter(e){const t=this.hoverParts.filter(i=>i.isValidForHoverAnchor(e));return t.length===this.hoverParts.length?this:new HS(this,t,this.isComplete,this.options)}}class HS extends bm{constructor(e,t,i,n){super(t,i,n),this.original=e}filter(e){return this.original.filter(e)}}var ey=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Cm=function(c,e){return function(t,i){e(t,i,c)}};const Sm=o.$;let ra=class extends a.Disposable{get hasContent(){return this._hasContent}constructor(e,t){super(),this._keybindingService=e,this._hoverService=t,this.actions=[],this._hasContent=!1,this.hoverElement=Sm("div.hover-row.status-bar"),this.hoverElement.tabIndex=0,this.actionsElement=o.append(this.hoverElement,Sm("div.actions"))}addAction(e){const t=this._keybindingService.lookupKeybinding(e.commandId),i=t?t.getLabel():null;this._hasContent=!0;const n=this._register(o.HoverAction.render(this.actionsElement,e,i));return this._register(this._hoverService.setupManagedHover(o.getDefaultHoverDelegate("element"),n.actionContainer,n.actionRenderedLabel)),this.actions.push(n),n}append(e){const t=o.append(this.actionsElement,e);return this._hasContent=!0,t}};ra=ey([Cm(0,o.IKeybindingService),Cm(1,o.IHoverService)],ra);const se=class se{constructor(e){this._editor=e,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.removeDecorations(this._allDecorations()),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationIds[0]?this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]):null}getFindScopes(){if(this._findScopeDecorationIds.length){const e=this._findScopeDecorationIds.map(t=>this._editor.getModel().getDecorationRange(t)).filter(t=>!!t);if(e.length)return e}return null}getStartPosition(){return this._startPosition}setStartPosition(e){this._startPosition=e,this.setCurrentFindMatch(null)}_getDecorationIndex(e){const t=this._decorations.indexOf(e);return t>=0?t+1:1}getDecorationRangeAt(e){const t=e{if(this._highlightedDecorationId!==null&&(n.changeDecorationOptions(this._highlightedDecorationId,se._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),t!==null&&(this._highlightedDecorationId=t,n.changeDecorationOptions(this._highlightedDecorationId,se._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(n.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),t!==null){let s=this._editor.getModel().getDecorationRange(t);if(s.startLineNumber!==s.endLineNumber&&s.endColumn===1){const r=s.endLineNumber-1,l=this._editor.getModel().getLineMaxColumn(r);s=new a.Range(s.startLineNumber,s.startColumn,r,l)}this._rangeHighlightDecorationId=n.addDecoration(s,se._RANGE_HIGHLIGHT_DECORATION)}}),i}set(e,t){this._editor.changeDecorations(i=>{let n=se._FIND_MATCH_DECORATION;const s=[];if(e.length>1e3){n=se._FIND_MATCH_NO_OVERVIEW_DECORATION;const l=this._editor.getModel().getLineCount(),h=this._editor.getLayoutInfo().height/l,u=Math.max(2,Math.ceil(3/h));let g=e[0].range.startLineNumber,p=e[0].range.endLineNumber;for(let f=1,m=e.length;f=_.startLineNumber?_.endLineNumber>p&&(p=_.endLineNumber):(s.push({range:new a.Range(g,1,p,1),options:se._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),g=_.startLineNumber,p=_.endLineNumber)}s.push({range:new a.Range(g,1,p,1),options:se._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}const r=new Array(e.length);for(let l=0,d=e.length;li.removeDecoration(l)),this._findScopeDecorationIds=[]),t?.length&&(this._findScopeDecorationIds=t.map(l=>i.addDecoration(l,se._FIND_SCOPE_DECORATION)))})}matchBeforePosition(e){if(this._decorations.length===0)return null;for(let t=this._decorations.length-1;t>=0;t--){const i=this._decorations[t],n=this._editor.getModel().getDecorationRange(i);if(!(!n||n.endLineNumber>e.lineNumber)){if(n.endLineNumbere.column))return n}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(e){if(this._decorations.length===0)return null;for(let t=0,i=this._decorations.length;te.lineNumber)return s;if(!(s.startColumn0){const i=[];for(let r=0;ra.Range.compareRangesUsingStarts(r.range,l.range));const n=[];let s=i[0];for(let r=1;r0?e[0].toUpperCase()+e.substr(1):c[0][0].toUpperCase()!==c[0][0]&&e.length>0?e[0].toLowerCase()+e.substr(1):e}else return e}function wm(c,e,t){return c[0].indexOf(t)!==-1&&e.indexOf(t)!==-1&&c[0].split(t).length===e.split(t).length}function Im(c,e,t){const i=e.split(t),n=c[0].split(t);let s="";return i.forEach((r,l)=>{s+=ym([n[l]],r)+t}),s.slice(0,-1)}class xm{constructor(e){this.staticValue=e,this.kind=0}}class iy{constructor(e){this.pieces=e,this.kind=1}}class hs{static fromStaticValue(e){return new hs([Zi.staticValue(e)])}get hasReplacementPatterns(){return this._state.kind===1}constructor(e){!e||e.length===0?this._state=new xm(""):e.length===1&&e[0].staticValue!==null?this._state=new xm(e[0].staticValue):this._state=new iy(e)}buildReplaceString(e,t){if(this._state.kind===0)return t?ym(e,this._state.staticValue):this._state.staticValue;let i="";for(let n=0,s=this._state.pieces.length;n0){const d=[],h=r.caseOps.length;let u=0;for(let g=0,p=l.length;g=h){d.push(l.slice(g));break}switch(r.caseOps[u]){case"U":d.push(l[g].toUpperCase());break;case"u":d.push(l[g].toUpperCase()),u++;break;case"L":d.push(l[g].toLowerCase());break;case"l":d.push(l[g].toLowerCase()),u++;break;default:d.push(l[g])}}l=d.join("")}i+=l}return i}static _substitute(e,t){if(t===null)return"";if(e===0)return t[0];let i="";for(;e>0;){if(e=n)break;const r=c.charCodeAt(i);switch(r){case 92:t.emitUnchanged(i-1),t.emitStatic("\\",i+1);break;case 110:t.emitUnchanged(i-1),t.emitStatic(` +`,i+1);break;case 116:t.emitUnchanged(i-1),t.emitStatic(" ",i+1);break;case 117:case 85:case 108:case 76:t.emitUnchanged(i-1),t.emitStatic("",i+1),e.push(String.fromCharCode(r));break}continue}if(s===36){if(i++,i>=n)break;const r=c.charCodeAt(i);if(r===36){t.emitUnchanged(i-1),t.emitStatic("$",i+1);continue}if(r===48||r===38){t.emitUnchanged(i-1),t.emitMatchIndex(0,i+1,e),e.length=0;continue}if(49<=r&&r<=57){let l=r-48;if(i+1{if(this._editor.hasModel())return this.research(!1)},100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition(i=>{(i.reason===3||i.reason===5||i.reason===6)&&this._decorations.setStartPosition(this._editor.getPosition())})),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent(i=>{this._ignoreModelContentChanged||(i.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())})),this._toDispose.add(this._state.onFindReplaceStateChange(i=>this._onStateChanged(i))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,a.dispose(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(e){this._isDisposed||this._editor.hasModel()&&(e.searchString||e.isReplaceRevealed||e.isRegex||e.wholeWord||e.matchCase||e.searchScope)&&(this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet(()=>{e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor)},ry)):e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor))}static _getSearchRange(e,t){return t||e.getFullModelRange()}research(e,t){let i=null;typeof t<"u"?t!==null&&(Array.isArray(t)?i=t:i=[t]):i=this._decorations.getFindScopes(),i!==null&&(i=i.map(l=>{if(l.startLineNumber!==l.endLineNumber){let d=l.endLineNumber;return l.endColumn===1&&(d=d-1),new a.Range(l.startLineNumber,1,d,this._editor.getModel().getLineMaxColumn(d))}return l}));const n=this._findMatches(i,!1,jt);this._decorations.set(n,i);const s=this._editor.getSelection();let r=this._decorations.getCurrentMatchesPosition(s);if(r===0&&n.length>0){const l=a.findFirstIdxMonotonousOrArrLen(n.map(d=>d.range),d=>a.Range.compareRangesUsingStarts(d,s)>=0);r=l>0?l-1+1:r}this._state.changeMatchInfo(r,this._decorations.getCount(),void 0),e&&this._editor.getOption(50).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){const e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1}_setCurrentFindMatch(e){const t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)}_prevSearchPosition(e){const t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:i,column:n}=e;const s=this._editor.getModel();return t||n===1?(i===1?i=s.getLineCount():i--,n=s.getLineMaxColumn(i)):n--,new a.Position(i,n)}_moveToPrevMatch(e,t=!1){if(!this._state.canNavigateBack()){const u=this._decorations.matchAfterPosition(e);u&&this._setCurrentFindMatch(u);return}if(this._decorations.getCount()=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:i,column:n}=e;const s=this._editor.getModel();return t||n===s.getLineMaxColumn(i)?(i===s.getLineCount()?i=1:i++,n=1):n++,new a.Position(i,n)}_moveToNextMatch(e){if(!this._state.canNavigateForward()){const i=this._decorations.matchBeforePosition(e);i&&this._setCurrentFindMatch(i);return}if(this._decorations.getCount()yo._getSearchRange(this._editor.getModel(),s));return this._editor.getModel().findMatches(this._state.searchString,n,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(148):null,t,i)}replaceAll(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();e===null&&this._state.matchesCount>=jt?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}_largeReplaceAll(){const t=new a.SearchParams(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(148):null).parseSearchRequest();if(!t)return;let i=t.regex;if(!i.multiline){let g="mu";i.ignoreCase&&(g+="i"),i.global&&(g+="g"),i=new RegExp(i.source,g)}const n=this._editor.getModel(),s=n.getValue(1),r=n.getFullModelRange(),l=this._getReplacePattern();let d;const h=this._state.preserveCase;l.hasReplacementPatterns||h?d=s.replace(i,function(){return l.buildReplaceString(arguments,h)}):d=s.replace(i,l.buildReplaceString(null,h));const u=new o.ReplaceCommandThatPreservesSelection(r,d,this._editor.getSelection());this._executeEditorCommand("replaceAll",u)}_regularReplaceAll(e){const t=this._getReplacePattern(),i=this._findMatches(e,t.hasReplacementPatterns||this._state.preserveCase,1073741824),n=[];for(let r=0,l=i.length;rr.range),n);this._executeEditorCommand("replaceAll",s)}selectAllMatches(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();let i=this._findMatches(e,!1,1073741824).map(s=>new a.Selection(s.range.startLineNumber,s.range.startColumn,s.range.endLineNumber,s.range.endColumn));const n=this._editor.getSelection();for(let s=0,r=i.length;s{this._onDidOptionChange.fire(p),!p&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.preserveCase.onKeyDown(p=>{this._onPreserveCaseKeyDown.fire(p)})),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;const u=[this.preserveCase.domNode];this.onkeydown(this.domNode,p=>{if(p.equals(15)||p.equals(17)||p.equals(9)){const f=u.indexOf(this.domNode.ownerDocument.activeElement);if(f>=0){let m=-1;p.equals(17)?m=(f+1)%u.length:p.equals(15)&&(f===0?m=u.length-1:m=f-1),p.equals(9)?(u[f].blur(),this.inputBox.focus()):m>=0&&u[m].focus(),o.EventHelper.stop(p,!0)}}});const g=document.createElement("div");g.className="controls",g.style.display=this._showOptionButtons?"block":"none",g.appendChild(this.preserveCase.domNode),this.domNode.appendChild(g),e?.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,p=>this._onKeyDown.fire(p)),this.onkeyup(this.inputBox.inputElement,p=>this._onKeyUp.fire(p)),this.oninput(this.inputBox.inputElement,p=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,p=>this._onMouseDown.fire(p))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.preserveCase.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.preserveCase.disable()}setEnabled(e){e?this.enable():this.disable()}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(e){this.preserveCase.checked=e}focusOnPreserve(){this.preserveCase.focus()}validate(){this.inputBox?.validate()}set width(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.domNode.style.width=e+"px"}}var Em=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Lm=function(c,e){return function(t,i){e(t,i,c)}};const lh=new o.RawContextKey("suggestWidgetVisible",!1,a.localize(1760,"Whether suggestion are visible")),ch="historyNavigationWidgetFocus",Dm="historyNavigationForwardsEnabled",Rm="historyNavigationBackwardsEnabled";let wo;const ga=[];function Tm(c,e){if(ga.includes(e))throw new Error("Cannot register the same widget multiple times");ga.push(e);const t=new a.DisposableStore,i=new o.RawContextKey(ch,!1).bindTo(c),n=new o.RawContextKey(Dm,!0).bindTo(c),s=new o.RawContextKey(Rm,!0).bindTo(c),r=()=>{i.set(!0),wo=e},l=()=>{i.set(!1),wo===e&&(wo=void 0)};return o.isActiveElement(e.element)&&r(),t.add(e.onDidFocus(()=>r())),t.add(e.onDidBlur(()=>l())),t.add(a.toDisposable(()=>{ga.splice(ga.indexOf(e),1),l()})),{historyNavigationForwardsEnablement:n,historyNavigationBackwardsEnablement:s,dispose(){t.dispose()}}}let dh=class extends o.FindInput{constructor(e,t,i,n){super(e,t,i);const s=this._register(n.createScoped(this.inputBox.element));this._register(Tm(s,this.inputBox))}};dh=Em([Lm(3,o.IContextKeyService)],dh);let hh=class extends dy{constructor(e,t,i,n,s=!1){super(e,t,s,i);const r=this._register(n.createScoped(this.inputBox.element));this._register(Tm(r,this.inputBox))}};hh=Em([Lm(3,o.IContextKeyService)],hh),o.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:o.ContextKeyExpr.and(o.ContextKeyExpr.has(ch),o.ContextKeyExpr.equals(Rm,!0),o.ContextKeyExpr.not("isComposing"),lh.isEqualTo(!1)),primary:16,secondary:[528],handler:c=>{wo?.showPreviousValue()}}),o.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:o.ContextKeyExpr.and(o.ContextKeyExpr.has(ch),o.ContextKeyExpr.equals(Dm,!0),o.ContextKeyExpr.not("isComposing"),lh.isEqualTo(!1)),primary:18,secondary:[530],handler:c=>{wo?.showNextValue()}});function Nm(c){return c.lookupKeybinding("history.showPrevious")?.getElectronAccelerator()==="Up"&&c.lookupKeybinding("history.showNext")?.getElectronAccelerator()==="Down"}const Mm=o.registerIcon("find-collapsed",a.Codicon.chevronRight,a.localize(996,"Icon to indicate that the editor find widget is collapsed.")),Pm=o.registerIcon("find-expanded",a.Codicon.chevronDown,a.localize(997,"Icon to indicate that the editor find widget is expanded.")),hy=o.registerIcon("find-selection",a.Codicon.selection,a.localize(998,"Icon for 'Find in Selection' in the editor find widget.")),uy=o.registerIcon("find-replace",a.Codicon.replace,a.localize(999,"Icon for 'Replace' in the editor find widget.")),gy=o.registerIcon("find-replace-all",a.Codicon.replaceAll,a.localize(1e3,"Icon for 'Replace All' in the editor find widget.")),py=o.registerIcon("find-previous-match",a.Codicon.arrowUp,a.localize(1001,"Icon for 'Find Previous' in the editor find widget.")),fy=o.registerIcon("find-next-match",a.Codicon.arrowDown,a.localize(1002,"Icon for 'Find Next' in the editor find widget.")),my=a.localize(1003,"Find / Replace"),uh=a.localize(1004,"Find"),_y=a.localize(1005,"Find"),vy=a.localize(1006,"Previous Match"),by=a.localize(1007,"Next Match"),Cy=a.localize(1008,"Find in Selection"),Sy=a.localize(1009,"Close"),gh=a.localize(1010,"Replace"),yy=a.localize(1011,"Replace"),wy=a.localize(1012,"Replace"),Iy=a.localize(1013,"Replace All"),xy=a.localize(1014,"Toggle Replace"),Ey=a.localize(1015,"Only the first {0} results are highlighted, but all find operations work on the entire text.",jt),Ly=a.localize(1016,"{0} of {1}"),ph=a.localize(1017,"No results"),at=419,Dy=275-54;let Io=69;const Ry=33,Om=a.isMacintosh?256:2048;class fh{constructor(e){this.afterLineNumber=e,this.heightInPx=Ry,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}function Am(c,e,t){const i=!!e.match(/\n/);if(t&&i&&t.selectionStart>0){c.stopPropagation();return}}function Fm(c,e,t){const i=!!e.match(/\n/);if(t&&i&&t.selectionEndthis._updateHistoryDelayer.cancel())),this._register(this._state.onFindReplaceStateChange(p=>this._onStateChanged(p))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration(p=>{if(p.hasChanged(104)&&(this._codeEditor.getOption(104)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),p.hasChanged(165)&&this._tryUpdateWidgetWidth(),p.hasChanged(2)&&this.updateAccessibilitySupport(),p.hasChanged(50)){const f=this._codeEditor.getOption(50).loop;this._state.change({loop:f},!1);const m=this._codeEditor.getOption(50).addExtraSpaceOnTop;m&&!this._viewZone&&(this._viewZone=new fh(0),this._showViewZone()),!m&&this._viewZone&&this._removeViewZone()}})),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection(()=>{this._isVisible&&this._updateToggleSelectionFindButton()})),this._register(this._codeEditor.onDidFocusEditorWidget(async()=>{if(this._isVisible){const p=await this._controller.getGlobalBufferTerm();p&&p!==this._state.searchString&&(this._state.change({searchString:p},!1),this._findInput.select())}})),this._findInputFocused=aa.bindTo(r),this._findFocusTracker=this._register(o.trackFocus(this._findInput.inputBox.inputElement)),this._register(this._findFocusTracker.onDidFocus(()=>{this._findInputFocused.set(!0),this._lastFocusedInputWasReplace=!1,this._updateSearchScope()})),this._register(this._findFocusTracker.onDidBlur(()=>{this._findInputFocused.set(!1)})),this._replaceInputFocused=ah.bindTo(r),this._replaceFocusTracker=this._register(o.trackFocus(this._replaceInput.inputBox.inputElement)),this._register(this._replaceFocusTracker.onDidFocus(()=>{this._replaceInputFocused.set(!0),this._lastFocusedInputWasReplace=!0,this._updateSearchScope()})),this._register(this._replaceFocusTracker.onDidBlur(()=>{this._replaceInputFocused.set(!1)})),this._findWidgetFocused=oy.bindTo(r),this._widgetFocusTracker=this._register(o.trackFocus(this._domNode)),this._register(this._widgetFocusTracker.onDidFocus(()=>{this._findWidgetFocused.set(!0)})),this._register(this._widgetFocusTracker.onDidBlur(()=>{this._findWidgetFocused.set(!1)})),this._register(o.addDisposableListener(this._domNode,"focusin",p=>{o.isHTMLElement(p.target)&&(this._lastFocusedElement=p.target)})),this._codeEditor.addOverlayWidget(this),this._codeEditor.getOption(50).addExtraSpaceOnTop&&(this._viewZone=new fh(0)),this._register(this._codeEditor.onDidChangeModel(()=>{this._isVisible&&(this._viewZoneId=void 0)})),this._register(this._codeEditor.onDidScrollChange(p=>{if(p.scrollTopChanged){this._layoutViewZone();return}setTimeout(()=>{this._layoutViewZone()},0)}))}getId(){return yc.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(e){if(e.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(e.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),e.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),e.isReplaceRevealed&&(this._state.isReplaceRevealed?!this._codeEditor.getOption(104)&&!this._isReplaceVisible&&(this._isReplaceVisible=!0,this._replaceInput.width=o.getTotalWidth(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(e.isRevealed||e.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),e.isRegex&&this._findInput.setRegex(this._state.isRegex),e.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),e.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),e.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),e.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),e.searchString||e.matchesCount||e.matchesPosition){const t=this._state.searchString.length>0&&this._state.matchesCount===0;this._domNode.classList.toggle("no-results",t),this._updateMatchesCount(),this._updateButtons()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory(),e.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,a.onUnexpectedError)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){this._matchesCount.style.minWidth=Io+"px",this._state.matchesCount>=jt?this._matchesCount.title=Ey:this._matchesCount.title="",this._matchesCount.firstChild?.remove();let e;if(this._state.matchesCount>0){let t=String(this._state.matchesCount);this._state.matchesCount>=jt&&(t+="+");let i=String(this._state.matchesPosition);i==="0"&&(i="?"),e=a.format(Ly,i,t)}else e=ph;this._matchesCount.appendChild(document.createTextNode(e)),o.alert(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString)),Io=Math.max(Io,this._matchesCount.clientWidth)}_getAriaLabel(e,t,i){let n;if(e===ph)n=i===""?a.localize(1018,"{0} found",e):a.localize(1019,"{0} found for '{1}'",e,i);else if(t){const s=a.localize(1020,"{0} found for '{1}', at {2}",e,i,t.startLineNumber+":"+t.startColumn),r=this._codeEditor.getModel();r&&t.startLineNumber<=r.getLineCount()&&t.startLineNumber>=1?n=`${r.getLineContent(t.startLineNumber)}, ${s}`:n=s}else n=a.localize(1021,"{0} found for '{1}'",e,i);return n}_updateToggleSelectionFindButton(){const e=this._codeEditor.getSelection(),t=e?e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn:!1,i=this._toggleSelectionFind.checked;this._isVisible&&(i||t)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);const e=this._state.searchString.length>0,t=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);const i=!this._codeEditor.getOption(104);this._toggleReplaceBtn.setEnabled(this._isVisible&&i)}_reveal(){if(this._revealTimeouts.forEach(e=>{clearTimeout(e)}),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;const e=this._codeEditor.getSelection();switch(this._codeEditor.getOption(50).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":{const i=!!e&&e.startLineNumber!==e.endLineNumber;this._toggleSelectionFind.checked=i;break}}this._tryUpdateWidgetWidth(),this._updateButtons(),this._revealTimeouts.push(setTimeout(()=>{this._domNode.classList.add("visible"),this._domNode.setAttribute("aria-hidden","false"),this._updateFindInputAriaLabel()},0)),this._revealTimeouts.push(setTimeout(()=>{this._findInput.validate()},200)),this._codeEditor.layoutOverlayWidget(this);let t=!0;if(this._codeEditor.getOption(50).seedSearchStringFromSelection&&e){const i=this._codeEditor.getDomNode();if(i){const n=o.getDomNodePagePosition(i),s=this._codeEditor.getScrolledVisiblePosition(e.getStartPosition()),r=n.left+(s?s.left:0),l=s?s.top:0;if(this._viewZone&&le.startLineNumber&&(t=!1);const d=o.getTopLeftOffset(this._domNode).left;r>d&&(t=!1);const h=this._codeEditor.getScrolledVisiblePosition(e.getEndPosition());n.left+(h?h.left:0)>d&&(t=!1)}}}this._showViewZone(t)}}_hide(e){this._revealTimeouts.forEach(t=>{clearTimeout(t)}),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._accessibilityHelpHintAnnounced=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(e){if(!this._codeEditor.getOption(50).addExtraSpaceOnTop){this._removeViewZone();return}if(!this._isVisible)return;const i=this._viewZone;this._viewZoneId!==void 0||!i||this._codeEditor.changeViewZones(n=>{i.heightInPx=this._getHeight(),this._viewZoneId=n.addZone(i),this._codeEditor.setScrollTop(e||this._codeEditor.getScrollTop()+i.heightInPx)})}_showViewZone(e=!0){if(!this._isVisible||!this._codeEditor.getOption(50).addExtraSpaceOnTop)return;this._viewZone===void 0&&(this._viewZone=new fh(0));const i=this._viewZone;this._codeEditor.changeViewZones(n=>{if(this._viewZoneId!==void 0){const s=this._getHeight();if(s===i.heightInPx)return;const r=s-i.heightInPx;i.heightInPx=s,n.layoutZone(this._viewZoneId),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+r);return}else{let s=this._getHeight();if(s-=this._codeEditor.getOption(96).top,s<=0)return;i.heightInPx=s,this._viewZoneId=n.addZone(i),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+s)}})}_removeViewZone(){this._codeEditor.changeViewZones(e=>{this._viewZoneId!==void 0&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))})}_tryUpdateWidgetWidth(){if(!this._isVisible||!this._domNode.isConnected)return;const e=this._codeEditor.getLayoutInfo();if(e.contentWidth<=0){this._domNode.classList.add("hiddenEditor");return}else this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");const i=e.width,n=e.minimap.minimapWidth;let s=!1,r=!1,l=!1;if(this._resized&&o.getTotalWidth(this._domNode)>at){this._domNode.style.maxWidth=`${i-28-n-15}px`,this._replaceInput.width=o.getTotalWidth(this._findInput.domNode);return}if(at+28+n>=i&&(r=!0),at+28+n-Io>=i&&(l=!0),at+28+n-Io>=i+50&&(s=!0),this._domNode.classList.toggle("collapsed-find-widget",s),this._domNode.classList.toggle("narrow-find-widget",l),this._domNode.classList.toggle("reduced-find-widget",r),!l&&!s&&(this._domNode.style.maxWidth=`${i-28-n-15}px`),this._findInput.layout({collapsedFindWidget:s,narrowFindWidget:l,reducedFindWidget:r}),this._resized){const d=this._findInput.inputBox.element.clientWidth;d>0&&(this._replaceInput.width=d)}else this._isReplaceVisible&&(this._replaceInput.width=o.getTotalWidth(this._findInput.domNode))}_getHeight(){let e=0;return e+=4,e+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(e+=4,e+=this._replaceInput.inputBox.height+2),e+=4,e}_tryUpdateHeight(){const e=this._getHeight();return this._cachedHeight!==null&&this._cachedHeight===e?!1:(this._cachedHeight=e,this._domNode.style.height=`${e}px`,!0)}focusFindInput(){this._findInput.select(),this._findInput.focus()}focusReplaceInput(){this._replaceInput.select(),this._replaceInput.focus()}highlightFindOptions(){this._findInput.highlightFindOptions()}_updateSearchScope(){if(this._codeEditor.hasModel()&&this._toggleSelectionFind.checked){const e=this._codeEditor.getSelections();e.map(t=>{t.endColumn===1&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(t.endLineNumber-1)));const i=this._state.currentMatch;return t.startLineNumber!==t.endLineNumber&&!a.Range.equalsRange(t,i)?t:null}).filter(t=>!!t),e.length&&this._state.change({searchScope:e},!0)}}_onFindInputMouseDown(e){e.middleButton&&e.stopPropagation()}_onFindInputKeyDown(e){if(e.equals(Om|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{this._findInput.inputBox.insertAtCursor(` +`),e.preventDefault();return}if(e.equals(2)){this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),e.preventDefault();return}if(e.equals(2066)){this._codeEditor.focus(),e.preventDefault();return}if(e.equals(16))return Am(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"));if(e.equals(18))return Fm(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"))}_onReplaceInputKeyDown(e){if(e.equals(Om|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{this._replaceInput.inputBox.insertAtCursor(` +`),e.preventDefault();return}if(e.equals(2)){this._findInput.focusOnCaseSensitive(),e.preventDefault();return}if(e.equals(1026)){this._findInput.focus(),e.preventDefault();return}if(e.equals(2066)){this._codeEditor.focus(),e.preventDefault();return}if(e.equals(16))return Am(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"));if(e.equals(18))return Fm(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"))}getVerticalSashLeft(e){return 0}_keybindingLabelFor(e){return this._keybindingService.appendKeybinding("",e)}_buildDomNode(){const i=this._codeEditor.getOption(50).history,n=this._codeEditor.getOption(50).replaceHistory;this._findInput=this._register(new dh(null,this._contextViewProvider,{width:Dy,label:uh,placeholder:_y,appendCaseSensitiveLabel:this._keybindingLabelFor(j.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(j.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(j.ToggleRegexCommand),validation:g=>{if(g.length===0||!this._findInput.getRegex())return null;try{return new RegExp(g,"gu"),null}catch(p){return{content:p.message}}},flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showCommonFindToggles:!0,showHistoryHint:()=>Nm(this._keybindingService),inputBoxStyles:o.defaultInputBoxStyles,toggleStyles:o.defaultToggleStyles,history:i==="workspace"?this._findWidgetSearchHistory:new Set([])},this._contextKeyService)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown(g=>{g.equals(3)&&!this._codeEditor.getOption(50).findOnType&&this._state.change({searchString:this._findInput.getValue()},!0),this._onFindInputKeyDown(g)})),this._register(this._findInput.inputBox.onDidChange(()=>{this._ignoreChangeEvent||!this._codeEditor.getOption(50).findOnType||this._state.change({searchString:this._findInput.getValue()},!0)})),this._register(this._findInput.onDidOptionChange(()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)})),this._register(this._findInput.onCaseSensitiveKeyDown(g=>{g.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),g.preventDefault())})),this._register(this._findInput.onRegexKeyDown(g=>{g.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),g.preventDefault())})),this._register(this._findInput.inputBox.onDidHeightChange(g=>{this._tryUpdateHeight()&&this._showViewZone()})),a.isLinux&&this._register(this._findInput.onMouseDown(g=>this._onFindInputMouseDown(g))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount();const s={groupId:"find-widget"};this._prevBtn=this._register(new Xi({label:vy+this._keybindingLabelFor(j.PreviousMatchFindAction),icon:py,hoverLifecycleOptions:s,onTrigger:()=>{a.assertReturnsDefined(this._codeEditor.getAction(j.PreviousMatchFindAction)).run().then(void 0,a.onUnexpectedError)}},this._hoverService)),this._nextBtn=this._register(new Xi({label:by+this._keybindingLabelFor(j.NextMatchFindAction),icon:fy,hoverLifecycleOptions:s,onTrigger:()=>{a.assertReturnsDefined(this._codeEditor.getAction(j.NextMatchFindAction)).run().then(void 0,a.onUnexpectedError)}},this._hoverService));const r=document.createElement("div");r.className="find-part",r.appendChild(this._findInput.domNode);const l=document.createElement("div");l.className="find-actions",r.appendChild(l),l.appendChild(this._matchesCount),l.appendChild(this._prevBtn.domNode),l.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new o.Toggle({icon:hy,title:Cy+this._keybindingLabelFor(j.ToggleSearchScopeCommand),isChecked:!1,hoverLifecycleOptions:s,inputActiveOptionBackground:o.asCssVariable(o.inputActiveOptionBackground),inputActiveOptionBorder:o.asCssVariable(o.inputActiveOptionBorder),inputActiveOptionForeground:o.asCssVariable(o.inputActiveOptionForeground)})),this._register(this._toggleSelectionFind.onChange(()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){let g=this._codeEditor.getSelections();g=g.map(p=>(p.endColumn===1&&p.endLineNumber>p.startLineNumber&&(p=p.setEndPosition(p.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(p.endLineNumber-1))),p.isEmpty()?null:p)).filter(p=>!!p),g.length&&this._state.change({searchScope:g},!0)}}else this._state.change({searchScope:null},!0)})),l.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new Xi({label:Sy+this._keybindingLabelFor(j.CloseFindWidgetCommand),icon:o.widgetClose,hoverLifecycleOptions:s,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:g=>{g.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),g.preventDefault())}},this._hoverService)),this._replaceInput=this._register(new hh(null,void 0,{label:gh,placeholder:yy,appendPreserveCaseLabel:this._keybindingLabelFor(j.TogglePreserveCaseCommand),history:n==="workspace"?this._replaceWidgetHistory:new Set([]),flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>Nm(this._keybindingService),inputBoxStyles:o.defaultInputBoxStyles,toggleStyles:o.defaultToggleStyles,hoverLifecycleOptions:s},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown(g=>this._onReplaceInputKeyDown(g))),this._register(this._replaceInput.inputBox.onDidChange(()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)})),this._register(this._replaceInput.inputBox.onDidHeightChange(g=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()})),this._register(this._replaceInput.onDidOptionChange(()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)})),this._register(this._replaceInput.onPreserveCaseKeyDown(g=>{g.equals(2)&&(this._prevBtn.isEnabled()?this._prevBtn.focus():this._nextBtn.isEnabled()?this._nextBtn.focus():this._toggleSelectionFind.enabled?this._toggleSelectionFind.focus():this._closeBtn.isEnabled()&&this._closeBtn.focus(),g.preventDefault())})),this._replaceBtn=this._register(new Xi({label:wy+this._keybindingLabelFor(j.ReplaceOneAction),icon:uy,hoverLifecycleOptions:s,onTrigger:()=>{this._controller.replace()},onKeyDown:g=>{g.equals(1026)&&(this._closeBtn.focus(),g.preventDefault())}},this._hoverService)),this._replaceAllBtn=this._register(new Xi({label:Iy+this._keybindingLabelFor(j.ReplaceAllAction),icon:gy,hoverLifecycleOptions:s,onTrigger:()=>{this._controller.replaceAll()}},this._hoverService));const d=document.createElement("div");d.className="replace-part",d.appendChild(this._replaceInput.domNode);const h=document.createElement("div");h.className="replace-actions",d.appendChild(h),h.appendChild(this._replaceBtn.domNode),h.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new Xi({label:xy,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=o.getTotalWidth(this._findInput.domNode),this._replaceInput.inputBox.layout()),this._showViewZone()}},this._hoverService)),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.ariaLabel=my,this._domNode.role="dialog",this._domNode.style.width=`${at}px`,this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(r),this._domNode.appendChild(this._closeBtn.domNode),this._domNode.appendChild(d),this._resizeSash=this._register(new o.Sash(this._domNode,this,{orientation:0,size:2})),this._resized=!1;let u=at;this._register(this._resizeSash.onDidStart(()=>{u=o.getTotalWidth(this._domNode)})),this._register(this._resizeSash.onDidChange(g=>{this._resized=!0;const p=u+g.startX-g.currentX;if(pf||(this._domNode.style.width=`${p}px`,this._isReplaceVisible&&(this._replaceInput.width=o.getTotalWidth(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())})),this._register(this._resizeSash.onDidReset(()=>{const g=o.getTotalWidth(this._domNode);if(g{this._isVisible&&(this._findInput.inputBox.setAriaLabel(uh),this._replaceInput.inputBox.setAriaLabel(gh))},1e3)}this._findInput.inputBox.setAriaLabel(e),this._replaceInput.inputBox.setAriaLabel(t)}getViewState(){let e=!1;return this._viewZone&&this._viewZoneId&&(e=this._viewZone.heightInPx>this._codeEditor.getScrollTop()),{widgetViewZoneVisible:e,scrollTop:this._codeEditor.getScrollTop()}}setViewState(e){e&&e.widgetViewZoneVisible&&this._layoutViewZone(e.scrollTop)}};yc.ID="editor.contrib.findWidget";let pa=yc;class Xi extends o.Widget{constructor(e,t){super(),this._opts=e;let i="button";this._opts.className&&(i=i+" "+this._opts.className),this._opts.icon&&(i=i+" "+o.ThemeIcon.asClassName(this._opts.icon)),this._domNode=document.createElement("div"),this._domNode.tabIndex=0,this._domNode.className=i,this._domNode.setAttribute("role","button"),this._domNode.setAttribute("aria-label",this._opts.label),this._register(t.setupDelayedHover(this._domNode,{content:this._opts.label,style:1},e.hoverLifecycleOptions)),this.onclick(this._domNode,n=>{this._opts.onTrigger(),n.preventDefault()}),this.onkeydown(this._domNode,n=>{if(n.equals(10)||n.equals(3)){this._opts.onTrigger(),n.preventDefault();return}this._opts.onKeyDown?.(n)})}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(e){this._domNode.classList.toggle("disabled",!e),this._domNode.setAttribute("aria-disabled",String(!e)),this._domNode.tabIndex=e?0:-1}setExpanded(e){this._domNode.setAttribute("aria-expanded",String(!!e)),e?(this._domNode.classList.remove(...o.ThemeIcon.asClassNameArray(Mm)),this._domNode.classList.add(...o.ThemeIcon.asClassNameArray(Pm))):(this._domNode.classList.remove(...o.ThemeIcon.asClassNameArray(Pm)),this._domNode.classList.add(...o.ThemeIcon.asClassNameArray(Mm)))}}o.registerThemingParticipant((c,e)=>{const t=c.getColor(o.editorFindMatchHighlightBorder);t&&e.addRule(`.monaco-editor .findMatch { border: 1px ${o.isHighContrast(c.type)?"dotted":"solid"} ${t}; box-sizing: border-box; }`);const i=c.getColor(o.editorFindRangeHighlightBorder);i&&e.addRule(`.monaco-editor .findScope { border: 1px ${o.isHighContrast(c.type)?"dashed":"solid"} ${i}; }`);const n=c.getColor(o.contrastBorder);n&&e.addRule(`.monaco-editor .find-widget { border: 1px solid ${n}; }`);const s=c.getColor(o.editorFindMatchForeground);s&&e.addRule(`.monaco-editor .findMatchInline { color: ${s}; }`);const r=c.getColor(o.editorFindMatchHighlightForeground);r&&e.addRule(`.monaco-editor .currentFindMatchInline { color: ${r}; }`)});var Ty=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},zm=function(c,e){return function(t,i){e(t,i,c)}};let mh=class extends a.Disposable{constructor(e,t,i,n){super(),this._container=e,this._getContent=t,this._clipboardService=i,this._hoverService=n,this._container.classList.add("hover-row-with-copy"),this._button=this._register(new Xi({label:a.localize(1171,"Copy"),icon:a.Codicon.copy,onTrigger:()=>this._copyContent(),className:"hover-copy-button"},this._hoverService)),this._container.appendChild(this._button.domNode)}async _copyContent(){const e=this._getContent();e&&(await this._clipboardService.writeText(e),o.status(a.localize(1172,"Copied to clipboard")))}};mh=Ty([zm(2,o.IClipboardService),zm(3,o.IHoverService)],mh);class Ny{constructor(e,t,i){this.provider=e,this.hover=t,this.ordinal=i}}async function My(c,e,t,i,n){const s=await Promise.resolve(c.provideHover(t,i,n)).catch(a.onUnexpectedExternalError);if(!(!s||!Py(s)))return new Ny(c,s,e)}function _h(c,e,t,i,n=!1){const r=c.ordered(e,n).map((l,d)=>My(l,d,e,t,i));return a.AsyncIterableProducer.fromPromisesResolveOrder(r).coalesce()}async function Vm(c,e,t,i,n=!1){const s=[];for await(const r of _h(c,e,t,i,n))s.push(r.hover);return s}o.registerModelAndPositionCommand("_executeHoverProvider",(c,e,t)=>{const i=c.get(o.ILanguageFeaturesService);return Vm(i.hoverProvider,e,t,a.CancellationToken.None)}),o.registerModelAndPositionCommand("_executeHoverProvider_recursive",(c,e,t)=>{const i=c.get(o.ILanguageFeaturesService);return Vm(i.hoverProvider,e,t,a.CancellationToken.None,!0)});function Py(c){const e=typeof c.range<"u",t=typeof c.contents<"u"&&c.contents&&c.contents.length>0;return e&&t}var Oy=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},us=function(c,e){return function(t,i){e(t,i,c)}};const Yi=o.$,Ay=o.registerIcon("hover-increase-verbosity",a.Codicon.addSmall,a.localize(1173,"Icon for increaseing hover verbosity.")),Fy=o.registerIcon("hover-decrease-verbosity",a.Codicon.removeSmall,a.localize(1174,"Icon for decreasing hover verbosity."));class Ae{constructor(e,t,i,n,s,r=void 0){this.owner=e,this.range=t,this.contents=i,this.isBeforeContent=n,this.ordinal=s,this.source=r}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}class Bm{constructor(e,t,i){this.hover=e,this.hoverProvider=t,this.hoverPosition=i}supportsVerbosityAction(e){switch(e){case a.HoverVerbosityAction.Increase:return this.hover.canIncreaseVerbosity??!1;case a.HoverVerbosityAction.Decrease:return this.hover.canDecreaseVerbosity??!1}}}let xo=class{constructor(e,t,i,n,s,r,l){this._editor=e,this._markdownRendererService=t,this._configurationService=i,this._languageFeaturesService=n,this._keybindingService=s,this._hoverService=r,this._commandService=l,this.hoverOrdinal=3}createLoadingMessage(e){return new Ae(this,e.range,[new o.MarkdownString().appendText(a.localize(1175,"Loading..."))],!1,2e3)}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,s=i.getLineMaxColumn(n),r=[];let l=1e3;const d=i.getLineLength(n),h=i.getLanguageIdAtPosition(e.range.startLineNumber,e.range.startColumn),u=this._editor.getOption(133),g=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:h}),p=this._editor.getOption(69).showLongLineWarning;let f=!1;u>=0&&d>u&&e.range.startColumn>=u&&(f=!0,p&&r.push(new Ae(this,e.range,[{value:a.localize(1176,"Rendering paused for long line for performance reasons. This can be configured via `editor.stopRenderingLineAfter`. [Don't Show Again](command:{0})",Jd),isTrusted:!0}],!1,l++))),!f&&typeof g=="number"&&d>=g&&p&&r.push(new Ae(this,e.range,[{value:a.localize(1177,"Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`. [Don't Show Again](command:{0})",Jd),isTrusted:!0}],!1,l++));let m=!1;for(const _ of t){const v=_.range.startLineNumber===n?_.range.startColumn:1,b=_.range.endLineNumber===n?_.range.endColumn:s,S=_.options.hoverMessage;if(!S||o.isEmptyMarkdownString(S))continue;_.options.beforeContentClassName&&(m=!0);const w=new a.Range(e.range.startLineNumber,v,e.range.startLineNumber,b);r.push(new Ae(this,w,a.asArray(S),m,l++))}return r}computeAsync(e,t,i,n){if(!this._editor.hasModel()||e.type!==1)return a.AsyncIterableProducer.EMPTY;const s=this._editor.getModel(),r=this._languageFeaturesService.hoverProvider;return r.has(s)?this._getMarkdownHovers(r,s,e,n):a.AsyncIterableProducer.EMPTY}async*_getMarkdownHovers(e,t,i,n){const s=i.range.getStartPosition(),r=_h(e,t,s,n);for await(const l of r)if(!o.isEmptyMarkdownString(l.hover.contents)){const d=l.hover.range?a.Range.lift(l.hover.range):i.range,h=new Bm(l.hover,l.provider,s);yield new Ae(this,d,l.hover.contents,!1,l.ordinal,h)}}renderHoverParts(e,t){return this._renderedHoverParts=new zy(t,e.fragment,this,this._editor,this._commandService,this._keybindingService,this._hoverService,this._configurationService,this._markdownRendererService,e.onContentsChanged),this._renderedHoverParts}handleScroll(e){this._renderedHoverParts?.handleScroll(e)}getAccessibleContent(e){return this._renderedHoverParts?.getAccessibleContent(e)??""}updateMarkdownHoverVerbosityLevel(e,t){return Promise.resolve(this._renderedHoverParts?.updateMarkdownHoverPartVerbosityLevel(e,t))}};xo=Oy([us(1,o.IMarkdownRendererService),us(2,o.IConfigurationService),us(3,o.ILanguageFeaturesService),us(4,o.IKeybindingService),us(5,o.IHoverService),us(6,o.ICommandService)],xo);class fa{constructor(e,t,i,n){this.hoverPart=e,this.hoverElement=t,this.disposables=i,this.actionsContainer=n}dispose(){this.disposables.dispose()}}class zy{constructor(e,t,i,n,s,r,l,d,h,u){this._hoverParticipant=i,this._editor=n,this._commandService=s,this._keybindingService=r,this._hoverService=l,this._configurationService=d,this._markdownRendererService=h,this._onFinishedRendering=u,this._ongoingHoverOperations=new Map,this._disposables=new a.DisposableStore,this.renderedHoverParts=this._renderHoverParts(e,t,this._onFinishedRendering),this._disposables.add(a.toDisposable(()=>{this.renderedHoverParts.forEach(g=>{g.dispose()}),this._ongoingHoverOperations.forEach(g=>{g.tokenSource.dispose(!0)})}))}_renderHoverParts(e,t,i){return e.sort(a.compareBy(n=>n.ordinal,a.numberComparator)),e.map(n=>{const s=this._renderHoverPart(n,i);return t.appendChild(s.hoverElement),s})}_renderHoverPart(e,t){const i=this._renderMarkdownHover(e,t),n=i.hoverElement,s=e.source,r=new a.DisposableStore;if(r.add(i),!s)return new fa(e,n,r);const l=s.supportsVerbosityAction(a.HoverVerbosityAction.Increase),d=s.supportsVerbosityAction(a.HoverVerbosityAction.Decrease);if(!l&&!d)return new fa(e,n,r);const h=Yi("div.verbosity-actions");n.prepend(h);const u=Yi("div.verbosity-actions-inner");return h.append(u),r.add(this._renderHoverExpansionAction(u,a.HoverVerbosityAction.Increase,l)),r.add(this._renderHoverExpansionAction(u,a.HoverVerbosityAction.Decrease,d)),new fa(e,n,r,u)}_renderMarkdownHover(e,t){return Km(this._editor,e,this._markdownRendererService,t)}_renderHoverExpansionAction(e,t,i){const n=new a.DisposableStore,s=t===a.HoverVerbosityAction.Increase,r=o.append(e,Yi(o.ThemeIcon.asCSSSelector(s?Ay:Fy)));r.tabIndex=0;const l=n.add(new o.WorkbenchHoverDelegate("mouse",void 0,{target:e,position:{hoverPosition:0}},this._configurationService,this._hoverService));if(n.add(this._hoverService.setupManagedHover(l,r,By(this._keybindingService,t))),!i)return r.classList.add("disabled"),n;r.classList.add("enabled");const d=()=>this._commandService.executeCommand(t===a.HoverVerbosityAction.Increase?Hr:ea,{focus:!0});return n.add(new o.ClickAction(r,d)),n.add(new o.KeyDownAction(r,d,[3,10])),n}handleScroll(e){this.renderedHoverParts.forEach(t=>{const i=t.actionsContainer;if(!i)return;const n=t.hoverElement,r=e.scrollTop+e.height,l=n.offsetTop,d=n.clientHeight,h=l+d,u=22;let g;h<=r||l>=r?g=d-u:g=r-l-u,i.style.top=`${g}px`})}async updateMarkdownHoverPartVerbosityLevel(e,t){const i=this._editor.getModel();if(!i)return;const n=this._getRenderedHoverPartAtIndex(t),s=n?.hoverPart.source;if(!n||!s?.supportsVerbosityAction(e))return;const r=await this._fetchHover(s,i,e);if(!r)return;const l=new Bm(r,s.hoverProvider,s.hoverPosition),d=n.hoverPart,h=new Ae(this._hoverParticipant,d.range,r.contents,d.isBeforeContent,d.ordinal,l),u=this._updateRenderedHoverPart(t,h);if(u)return{hoverPart:h,hoverElement:u.hoverElement}}getAccessibleContent(e){const t=this.renderedHoverParts.findIndex(r=>r.hoverPart===e);if(t===-1)return;const i=this._getRenderedHoverPartAtIndex(t);return i?i.hoverElement.innerText.replace(/[^\S\n\r]+/gu," "):void 0}async _fetchHover(e,t,i){let n=i===a.HoverVerbosityAction.Increase?1:-1;const s=e.hoverProvider,r=this._ongoingHoverOperations.get(s);r&&(r.tokenSource.cancel(),n+=r.verbosityDelta);const l=new a.CancellationTokenSource;this._ongoingHoverOperations.set(s,{verbosityDelta:n,tokenSource:l});const d={verbosityRequest:{verbosityDelta:n,previousHover:e.hover}};let h;try{h=await Promise.resolve(s.provideHover(t,e.hoverPosition,l.token,d))}catch(u){a.onUnexpectedExternalError(u)}return l.dispose(),this._ongoingHoverOperations.delete(s),h}_updateRenderedHoverPart(e,t){if(e>=this.renderedHoverParts.length||e<0)return;const i=this._renderHoverPart(t,this._onFinishedRendering),n=this.renderedHoverParts[e],s=n.hoverElement,r=i.hoverElement,l=Array.from(r.children);s.replaceChildren(...l);const d=new fa(t,s,i.disposables,i.actionsContainer);return n.dispose(),this.renderedHoverParts[e]=d,d}_getRenderedHoverPartAtIndex(e){return this.renderedHoverParts[e]}dispose(){this._disposables.dispose()}}function Vy(c,e,t,i){e.sort(a.compareBy(s=>s.ordinal,a.numberComparator));const n=[];for(const s of e){const r=Km(t,s,i,c.onContentsChanged);c.fragment.appendChild(r.hoverElement),n.push(r)}return new qi(n)}function Km(c,e,t,i){const n=new a.DisposableStore,s=Yi("div.hover-row"),r=Yi("div.hover-row-contents");s.appendChild(r);const l=e.contents;for(const h of l){if(o.isEmptyMarkdownString(h))continue;const u=Yi("div.markdown-hover"),g=o.append(u,Yi("div.hover-contents")),p=n.add(t.render(h,{context:c,asyncRenderCallback:()=>{g.className="hover-contents code-hover-contents",i()}}));g.appendChild(p.element),r.appendChild(u)}return{hoverPart:e,hoverElement:s,dispose(){n.dispose()}}}function By(c,e){switch(e){case a.HoverVerbosityAction.Increase:return c.appendKeybinding(a.localize(1178,"Increase Hover Verbosity"),Hr);case a.HoverVerbosityAction.Decrease:return c.appendKeybinding(a.localize(1179,"Decrease Hover Verbosity"),ea)}}const Um=o.$;class Ky extends a.Disposable{constructor(e,t,i){super(),this.model=t,this.pixelRatio=i,this._onDidChange=this._register(new a.Emitter),this.onDidChange=this._onDidChange.event,this._onColorFlushed=this._register(new a.Emitter),this.onColorFlushed=this._onColorFlushed.event,this._domNode=Um(".saturation-wrap"),o.append(e,this._domNode),this._canvas=document.createElement("canvas"),this._canvas.className="saturation-box",o.append(this._domNode,this._canvas),this.selection=Um(".saturation-selection"),o.append(this._domNode,this.selection),this.layout(),this._register(o.addDisposableListener(this._domNode,o.EventType.POINTER_DOWN,n=>this.onPointerDown(n))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}get domNode(){return this._domNode}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;this.monitor=this._register(new o.GlobalPointerMoveMonitor);const t=o.getDomNodePagePosition(this._domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.pointerId,e.buttons,n=>this.onDidChangePosition(n.pageX-t.left,n.pageY-t.top),()=>null);const i=o.addDisposableListener(e.target.ownerDocument,o.EventType.POINTER_UP,()=>{this._onColorFlushed.fire(),i.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)},!0)}onDidChangePosition(e,t){const i=Math.max(0,Math.min(1,e/this.width)),n=Math.max(0,Math.min(1,1-t/this.height));this.paintSelection(i,n),this._onDidChange.fire({s:i,v:n})}layout(){this.width=this._domNode.offsetWidth,this.height=this._domNode.offsetHeight,this._canvas.width=this.width*this.pixelRatio,this._canvas.height=this.height*this.pixelRatio,this.paint();const e=this.model.color.hsva;this.paintSelection(e.s,e.v)}paint(){const e=this.model.color.hsva,t=new a.Color(new a.HSVA(e.h,1,1,1)),i=this._canvas.getContext("2d"),n=i.createLinearGradient(0,0,this._canvas.width,0);n.addColorStop(0,"rgba(255, 255, 255, 1)"),n.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),n.addColorStop(1,"rgba(255, 255, 255, 0)");const s=i.createLinearGradient(0,0,0,this._canvas.height);s.addColorStop(0,"rgba(0, 0, 0, 0)"),s.addColorStop(1,"rgba(0, 0, 0, 1)"),i.rect(0,0,this._canvas.width,this._canvas.height),i.fillStyle=a.Color.Format.CSS.format(t),i.fill(),i.fillStyle=n,i.fill(),i.fillStyle=s,i.fill()}paintSelection(e,t){this.selection.style.left=`${e*this.width}px`,this.selection.style.top=`${this.height-t*this.height}px`}onDidChangeColor(e){if(this.monitor&&this.monitor.isMonitoring())return;this.paint();const t=e.hsva;this.paintSelection(t.s,t.v)}}class Uy extends a.Disposable{constructor(e){super(),this._onClicked=this._register(new a.Emitter),this.onClicked=this._onClicked.event,this._button=o.append(e,document.createElement("button")),this._button.classList.add("insert-button"),this._button.textContent="Insert",this._register(o.addDisposableListener(this._button,o.EventType.CLICK,()=>{this._onClicked.fire()}))}get button(){return this._button}}const Eo=o.$;class km extends a.Disposable{constructor(e,t,i){super(),this.model=t,this._onDidChange=this._register(new a.Emitter),this.onDidChange=this._onDidChange.event,this._onColorFlushed=this._register(new a.Emitter),this.onColorFlushed=this._onColorFlushed.event,i==="standalone"?(this.domNode=o.append(e,Eo(".standalone-strip")),this.overlay=o.append(this.domNode,Eo(".standalone-overlay"))):(this.domNode=o.append(e,Eo(".strip")),this.overlay=o.append(this.domNode,Eo(".overlay"))),this.slider=o.append(this.domNode,Eo(".slider")),this.slider.style.top="0px",this._register(o.addDisposableListener(this.domNode,o.EventType.POINTER_DOWN,n=>this.onPointerDown(n))),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const e=this.getValue(this.model.color);this.updateSliderPosition(e)}onDidChangeColor(e){const t=this.getValue(e);this.updateSliderPosition(t)}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;const t=this._register(new o.GlobalPointerMoveMonitor),i=o.getDomNodePagePosition(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),t.startMonitoring(e.target,e.pointerId,e.buttons,s=>this.onDidChangeTop(s.pageY-i.top),()=>null);const n=o.addDisposableListener(e.target.ownerDocument,o.EventType.POINTER_UP,()=>{this._onColorFlushed.fire(),n.dispose(),t.stopMonitoring(!0),this.domNode.classList.remove("grabbing")},!0)}onDidChangeTop(e){const t=Math.max(0,Math.min(1,1-e/this.height));this.updateSliderPosition(t),this._onDidChange.fire(t)}updateSliderPosition(e){this.slider.style.top=`${(1-e)*this.height}px`}}class ky extends km{constructor(e,t,i){super(e,t,i),this.domNode.classList.add("opacity-strip"),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){super.onDidChangeColor(e);const{r:t,g:i,b:n}=e.rgba,s=new a.Color(new a.RGBA(t,i,n,1)),r=new a.Color(new a.RGBA(t,i,n,0));this.overlay.style.background=`linear-gradient(to bottom, ${s} 0%, ${r} 100%)`}getValue(e){return e.hsva.a}}class jy extends km{constructor(e,t,i){super(e,t,i),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}}const $y=o.$;class qy extends a.Disposable{constructor(e,t,i,n){super(),this.model=t,this.pixelRatio=i,this._insertButton=null,this._domNode=$y(".colorpicker-body"),o.append(e,this._domNode),this._saturationBox=new Ky(this._domNode,this.model,this.pixelRatio),this._register(this._saturationBox),this._register(this._saturationBox.onDidChange(this.onDidSaturationValueChange,this)),this._register(this._saturationBox.onColorFlushed(this.flushColor,this)),this._opacityStrip=new ky(this._domNode,this.model,n),this._register(this._opacityStrip),this._register(this._opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this._opacityStrip.onColorFlushed(this.flushColor,this)),this._hueStrip=new jy(this._domNode,this.model,n),this._register(this._hueStrip),this._register(this._hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this._hueStrip.onColorFlushed(this.flushColor,this)),n==="standalone"&&(this._insertButton=this._register(new Uy(this._domNode)),this._domNode.classList.add("standalone-colorpicker"))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:t}){const i=this.model.color.hsva;this.model.color=new a.Color(new a.HSVA(i.h,e,t,i.a))}onDidOpacityChange(e){const t=this.model.color.hsva;this.model.color=new a.Color(new a.HSVA(t.h,t.s,t.v,e))}onDidHueChange(e){const t=this.model.color.hsva,i=(1-e)*360;this.model.color=new a.Color(new a.HSVA(i===360?0:i,t.s,t.v,t.a))}get domNode(){return this._domNode}get saturationBox(){return this._saturationBox}get enterButton(){return this._insertButton}layout(){this._saturationBox.layout(),this._opacityStrip.layout(),this._hueStrip.layout()}}const Gy=o.$;class Zy extends a.Disposable{constructor(e){super(),this._onClicked=this._register(new a.Emitter),this.onClicked=this._onClicked.event,this._button=document.createElement("div"),this._button.classList.add("close-button"),o.append(e,this._button);const t=document.createElement("div");t.classList.add("close-button-inner-div"),o.append(this._button,t),o.append(t,Gy(".button"+o.ThemeIcon.asCSSSelector(o.registerIcon("color-picker-close",a.Codicon.close,a.localize(921,"Icon to close the color picker"))))).classList.add("close-icon"),this._register(o.addDisposableListener(this._button,o.EventType.CLICK,()=>{this._onClicked.fire()}))}}const ma=o.$;class Xy extends a.Disposable{constructor(e,t,i,n){super(),this.model=t,this.type=n,this._closeButton=null,this._domNode=ma(".colorpicker-header"),o.append(e,this._domNode),this._pickedColorNode=o.append(this._domNode,ma(".picked-color")),o.append(this._pickedColorNode,ma("span.codicon.codicon-color-mode")),this._pickedColorPresentation=o.append(this._pickedColorNode,document.createElement("span")),this._pickedColorPresentation.classList.add("picked-color-presentation");const s=a.localize(922,"Click to toggle color options (rgb/hsl/hex)");this._pickedColorNode.setAttribute("title",s),this._originalColorNode=o.append(this._domNode,ma(".original-color")),this._originalColorNode.style.backgroundColor=a.Color.Format.CSS.format(this.model.originalColor)||"",this.backgroundColor=i.getColorTheme().getColor(o.editorHoverBackground)||a.Color.white,this._register(i.onDidColorThemeChange(r=>{this.backgroundColor=r.getColor(o.editorHoverBackground)||a.Color.white})),this._register(o.addDisposableListener(this._pickedColorNode,o.EventType.CLICK,()=>this.model.selectNextColorPresentation())),this._register(o.addDisposableListener(this._originalColorNode,o.EventType.CLICK,()=>{this.model.color=this.model.originalColor,this.model.flushColor()})),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this._register(t.onDidChangePresentation(this.onDidChangePresentation,this)),this._pickedColorNode.style.backgroundColor=a.Color.Format.CSS.format(t.color)||"",this._pickedColorNode.classList.toggle("light",t.color.rgba.a<.5?this.backgroundColor.isLighter():t.color.isLighter()),this.onDidChangeColor(this.model.color),this.type==="standalone"&&(this._domNode.classList.add("standalone-colorpicker"),this._closeButton=this._register(new Zy(this._domNode)))}get closeButton(){return this._closeButton}get pickedColorNode(){return this._pickedColorNode}get originalColorNode(){return this._originalColorNode}onDidChangeColor(e){this._pickedColorNode.style.backgroundColor=a.Color.Format.CSS.format(e)||"",this._pickedColorNode.classList.toggle("light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this._pickedColorPresentation.textContent=this.model.presentation?this.model.presentation.label:""}}const Yy=o.$;class jm extends o.Widget{constructor(e,t,i,n,s){super(),this.model=t,this.pixelRatio=i,this._register(o.PixelRatio.getInstance(o.getWindow(e)).onDidChange(()=>this.layout())),this._domNode=Yy(".colorpicker-widget"),e.appendChild(this._domNode),this.header=this._register(new Xy(this._domNode,this.model,n,s)),this.body=this._register(new qy(this._domNode,this.model,this.pixelRatio,s))}layout(){this.body.layout()}get domNode(){return this._domNode}}class Qy extends a.Disposable{get color(){return this._color}set color(e){this._color.equals(e)||(this._color=e,this._onDidChangeColor.fire(e))}get presentation(){return this.colorPresentations[this.presentationIndex]}get colorPresentations(){return this._colorPresentations}set colorPresentations(e){this._colorPresentations=e,this.presentationIndex>e.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)}constructor(e,t,i){super(),this.presentationIndex=i,this._onColorFlushed=this._register(new a.Emitter),this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=this._register(new a.Emitter),this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=this._register(new a.Emitter),this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(e,t){let i=-1;for(let n=0;n=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Wy=function(c,e){return function(t,i){e(t,i,c)}};class _a{constructor(e,t,i,n){this.owner=e,this.range=t,this.model=i,this.provider=n,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}static fromBaseColor(e,t){return new _a(e,t.range,t.model,t.provider)}}let va=class{constructor(e,t){this._editor=e,this._themeService=t,this.hoverOrdinal=2}computeSync(e,t,i){return[]}computeAsync(e,t,i,n){return a.AsyncIterableProducer.fromPromise(this._computeAsync(e,t,i))}async _computeAsync(e,t,i){if(!this._editor.hasModel())return[];if(!this._isValidRequest(i))return[];const n=ls.get(this._editor);if(!n)return[];for(const s of t){if(!n.isColorDecoration(s))continue;const r=n.getColorData(s.range.getStartPosition());if(r)return[_a.fromBaseColor(this,await $m(this._editor.getModel(),r.colorInfo,r.provider))]}return[]}_isValidRequest(e){const t=this._editor.getOption(168);switch(e){case 0:return t==="hover"||t==="clickAndHover";case 1:return t==="click"||t==="clickAndHover";case 2:return!0}}renderHoverParts(e,t){const i=this._editor;if(t.length===0||!i.hasModel())return new qi([]);const n=i.getOption(75)+8;e.setMinimumDimensions(new o.Dimension(302,n));const s=new a.DisposableStore,r=t[0],l=i.getModel(),d=r.model;this._colorPicker=s.add(new jm(e.fragment,d,i.getOption(163),this._themeService,"hover"));let h=!1,u=new a.Range(r.range.startLineNumber,r.range.startColumn,r.range.endLineNumber,r.range.endColumn);s.add(d.onColorFlushed(async p=>{await Lo(l,d,p,u,r),h=!0,u=qm(i,u,d)})),s.add(d.onDidChangeColor(p=>{Lo(l,d,p,u,r)})),s.add(i.onDidChangeModelContent(p=>{h?h=!1:(e.hide(),i.focus())}));const g={hoverPart:_a.fromBaseColor(this,r),hoverElement:this._colorPicker.domNode,dispose(){s.dispose()}};return new qi([g])}getAccessibleContent(e){return a.localize(923,"There is a color picker here.")}handleResize(){this._colorPicker?.layout()}handleContentsChanged(){this._colorPicker?.layout()}handleHide(){this._colorPicker?.dispose(),this._colorPicker=void 0}isColorPickerVisible(){return!!this._colorPicker}};va=Jy([Wy(1,o.IThemeService)],va);function vh(c,e){return!!c[e]}class bh{constructor(e,t){this.target=e.target,this.isLeftClick=e.event.leftButton,this.isMiddleClick=e.event.middleButton,this.isRightClick=e.event.rightButton,this.mouseMiddleClickAction=t.mouseMiddleClickAction,this.hasTriggerModifier=vh(e.event,t.triggerModifier),this.isMiddleClick&&t.mouseMiddleClickAction==="ctrlLeftClick"&&(this.isMiddleClick=!1,this.isLeftClick=!0,this.hasTriggerModifier=!0),this.hasSideBySideModifier=vh(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}}class Gm{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=vh(e,t.triggerModifier)}}class ba{constructor(e,t,i,n,s){this.mouseMiddleClickAction=s,this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=i,this.triggerSideBySideModifier=n}equals(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier&&this.mouseMiddleClickAction===e.mouseMiddleClickAction}}function Zm(c,e){return c==="altKey"?a.isMacintosh?new ba(57,"metaKey",6,"altKey",e):new ba(5,"ctrlKey",6,"altKey",e):a.isMacintosh?new ba(6,"altKey",57,"metaKey",e):new ba(6,"altKey",5,"ctrlKey",e)}class Ca extends a.Disposable{constructor(e,t){super(),this._onMouseMoveOrRelevantKeyDown=this._register(new a.Emitter),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new a.Emitter),this.onExecute=this._onExecute.event,this._onCancel=this._register(new a.Emitter),this.onCancel=this._onCancel.event,this._editor=e,this._extractLineNumberFromMouseEvent=t?.extractLineNumberFromMouseEvent??(i=>i.target.position?i.target.position.lineNumber:0),this._opts=Zm(this._editor.getOption(86),this._editor.getOption(87)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(i=>{if(i.hasChanged(86)||i.hasChanged(87)){const n=Zm(this._editor.getOption(86),this._editor.getOption(87));if(this._opts.equals(n))return;this._opts=n,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(i=>this._onEditorMouseMove(new bh(i,this._opts)))),this._register(this._editor.onMouseDown(i=>this._onEditorMouseDown(new bh(i,this._opts)))),this._register(this._editor.onMouseUp(i=>this._onEditorMouseUp(new bh(i,this._opts)))),this._register(this._editor.onKeyDown(i=>this._onEditorKeyDown(new Gm(i,this._opts)))),this._register(this._editor.onKeyUp(i=>this._onEditorKeyUp(new Gm(i,this._opts)))),this._register(this._editor.onMouseDrag(()=>this._resetHandler())),this._register(this._editor.onDidChangeCursorSelection(i=>this._onDidChangeCursorSelection(i))),this._register(this._editor.onDidChangeModel(i=>this._resetHandler())),this._register(this._editor.onDidChangeModelContent(()=>this._resetHandler())),this._register(this._editor.onDidScrollChange(i=>{(i.scrollTopChanged||i.scrollLeftChanged)&&this._resetHandler()}))}_onDidChangeCursorSelection(e){e.selection&&e.selection.startColumn!==e.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(e){this._lastMouseMoveEvent=e,this._onMouseMoveOrRelevantKeyDown.fire([e,null])}_onEditorMouseDown(e){this._hasTriggerKeyOnMouseDown=e.hasTriggerModifier,this._lineNumberOnMouseDown=this._extractLineNumberFromMouseEvent(e)}_onEditorMouseUp(e){const t=this._extractLineNumberFromMouseEvent(e);this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===t&&(this._hasTriggerKeyOnMouseDown||e.isMiddleClick&&e.mouseMiddleClickAction==="openLink")&&this._onExecute.fire(e)}_onEditorKeyDown(e){this._lastMouseMoveEvent&&(e.keyCodeIsTriggerKey||e.keyCodeIsSideBySideKey&&e.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,e]):e.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(e){e.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}class Xm{constructor(e,t){this.range=e,this.direction=t}}class Ch{constructor(e,t,i){this.hint=e,this.anchor=t,this.provider=i,this._isResolved=!1}with(e){const t=new Ch(this.hint,e.anchor,this.provider);return t._isResolved=this._isResolved,t._currentResolve=this._currentResolve,t}async resolve(e){if(typeof this.provider.resolveInlayHint=="function"){if(this._currentResolve)return await this._currentResolve,e.isCancellationRequested?void 0:this.resolve(e);this._isResolved||(this._currentResolve=this._doResolve(e).finally(()=>this._currentResolve=void 0)),await this._currentResolve}}async _doResolve(e){try{const t=await Promise.resolve(this.provider.resolveInlayHint(this.hint,e));this.hint.tooltip=t?.tooltip??this.hint.tooltip,this.hint.label=t?.label??this.hint.label,this.hint.textEdits=t?.textEdits??this.hint.textEdits,this._isResolved=!0}catch(t){a.onUnexpectedExternalError(t),this._isResolved=!1}}}const Ys=class Ys{static async create(e,t,i,n){const s=[],r=e.ordered(t).reverse().map(l=>i.map(async d=>{try{const h=await l.provideInlayHints(t,d,n);(h?.hints.length||l.onDidChangeInlayHints)&&s.push([h??Ys._emptyInlayHintList,l])}catch(h){a.onUnexpectedExternalError(h)}}));if(await Promise.all(r.flat()),n.isCancellationRequested||t.isDisposed())throw new a.CancellationError;return new Ys(i,s,t)}constructor(e,t,i){this._disposables=new a.DisposableStore,this.ranges=e,this.provider=new Set;const n=[];for(const[s,r]of t){this._disposables.add(s),this.provider.add(r);for(const l of s.hints){const d=i.validatePosition(l.position);let h="before";const u=Ys._getRangeAtPosition(i,d);let g;u.getStartPosition().isBefore(d)?(g=a.Range.fromPositions(u.getStartPosition(),d),h="after"):(g=a.Range.fromPositions(d,u.getEndPosition()),h="before"),n.push(new Ch(l,new Xm(g,h),r))}}this.items=n.sort((s,r)=>a.Position.compare(s.hint.position,r.hint.position))}dispose(){this._disposables.dispose()}static _getRangeAtPosition(e,t){const i=t.lineNumber,n=e.getWordAtPosition(t);if(n)return new a.Range(i,n.startColumn,i,n.endColumn);e.tokenization.tokenizeIfCheap(i);const s=e.tokenization.getLineTokens(i),r=t.column-1,l=s.findTokenIndexAtOffset(r);let d=s.getStartOffset(l),h=s.getEndOffset(l);return h-d===1&&(d===r&&l>1?(d=s.getStartOffset(l-1),h=s.getEndOffset(l-1)):h===r&&l=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},lt=function(c,e){return function(t,i){e(t,i,c)}};let ct=class extends o.CodeEditorWidget{constructor(e,t,i,n,s,r,l,d,h,u,g,p,f,m){super(e,{...n.getRawOptions(),overflowWidgetsDomNode:n.getOverflowWidgetsDomNode()},i,s,r,l,d,h,u,g,p,f,m),this._parentEditor=n,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(n.onDidChangeConfiguration(_=>this._onParentConfigurationChanged(_)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){a.mixin(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};ct=ew([lt(4,o.IInstantiationService),lt(5,o.ICodeEditorService),lt(6,o.ICommandService),lt(7,o.IContextKeyService),lt(8,o.IThemeService),lt(9,o.INotificationService),lt(10,o.IAccessibilityService),lt(11,o.ILanguageConfigurationService),lt(12,o.ILanguageFeaturesService),lt(13,o.IUserInteractionService)],ct);function Ym(c){const e=c.get(o.ICodeEditorService).getFocusedCodeEditor();return e instanceof ct?e.getParentEditor():e}const Qm=new a.Color(new a.RGBA(0,122,204)),tw={showArrow:!0,showFrame:!0,className:"",frameColor:Qm,arrowColor:Qm,keepEditorSelection:!1},iw="vs.editor.contrib.zoneWidget";class nw{constructor(e,t,i,n,s,r,l,d){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=i,this.heightInLines=n,this.showInHiddenAreas=l,this.ordinal=d,this._onDomNodeTop=s,this._onComputedHeight=r}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}}class sw{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}const wc=class wc{constructor(e){this._editor=e,this._ruleName=wc._IdGenerator.nextId(),this._color=null,this._height=-1,this._decorations=this._editor.createDecorationsCollection()}dispose(){this.hide(),o.removeCSSRulesContainingSelector(this._ruleName)}set color(e){this._color!==e&&(this._color=e,this._updateStyle())}set height(e){this._height!==e&&(this._height=e,this._updateStyle())}_updateStyle(){o.removeCSSRulesContainingSelector(this._ruleName),o.createCSSRule(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px !important; margin-left: -${this._height}px; `)}show(e){e.column===1&&(e={lineNumber:e.lineNumber,column:2}),this._decorations.set([{range:a.Range.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}};wc._IdGenerator=new o.IdGenerator(".arrow-decoration-");let Sh=wc;class ow{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._isSashResizeHeight=!1,this._viewZone=null,this._disposables=new a.DisposableStore,this.container=null,this._isShowing=!1,this.editor=e,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=a.deepClone(t),a.mixin(this.options,tw,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.add(this.editor.onDidLayoutChange(i=>{const n=this._getWidth(i);this.domNode.style.width=n+"px",this.domNode.style.left=this._getLeft(i)+"px",this._onWidth(n)}))}dispose(){this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones(e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._viewZone=null}),this._positionMarkerId.clear(),this._disposables.dispose()}create(){this.domNode.classList.add("zone-widget"),this.options.className&&this.domNode.classList.add(this.options.className),this.container=document.createElement("div"),this.container.classList.add("zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new Sh(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}style(e){e.frameColor&&(this.options.frameColor=e.frameColor),e.arrowColor&&(this.options.arrowColor=e.arrowColor),this._applyStyles()}_applyStyles(){if(this.container&&this.options.frameColor){const e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow&&this.options.arrowColor){const e=this.options.arrowColor.toString();this._arrow.color=e}}_getWidth(e){return e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}_getLeft(e){return e.minimap.minimapWidth>0&&e.minimap.minimapLeft===0?e.minimap.minimapWidth:0}_onViewZoneTop(e){this.domNode.style.top=e+"px"}_onViewZoneHeight(e){if(this.domNode.style.height=`${e}px`,this.container){const t=e-this._decoratingElementsHeight();this.container.style.height=`${t}px`;const i=this.editor.getLayoutInfo();this._doLayout(t,this._getWidth(i))}this._resizeSash?.layout()}get position(){const e=this._positionMarkerId.getRange(0);if(e)return e.getStartPosition()}show(e,t){const i=a.Range.isIRange(e)?a.Range.lift(e):a.Range.fromPositions(e);this._isShowing=!0,this._showImpl(i,t),this._isShowing=!1,this._positionMarkerId.set([{range:i,options:o.ModelDecorationOptions.EMPTY}])}hide(){this._viewZone&&(this.editor.changeViewZones(e=>{this._viewZone&&e.removeZone(this._viewZone.id)}),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._arrow?.hide(),this._positionMarkerId.clear(),this._isSashResizeHeight=!1}_decoratingElementsHeight(){const e=this.editor.getOption(75);let t=0;if(this.options.showArrow){const i=Math.round(e/3);t+=2*i}if(this.options.showFrame){const i=this.options.frameWidth??Math.round(e/9);t+=2*i}return t}_getMaximumHeightInLines(){return Math.max(12,this.editor.getLayoutInfo().height/this.editor.getOption(75)*.8)}_showImpl(e,t){const i=e.getStartPosition(),n=this.editor.getLayoutInfo(),s=this._getWidth(n);this.domNode.style.width=`${s}px`,this.domNode.style.left=this._getLeft(n)+"px";const r=document.createElement("div");r.style.overflow="hidden";const l=this.editor.getOption(75),d=this._getMaximumHeightInLines();d!==void 0&&(t=Math.min(t,d));let h=0,u=0;if(this._arrow&&this.options.showArrow&&(h=Math.round(l/3),this._arrow.height=h,this._arrow.show(i)),this.options.showFrame&&(u=Math.round(l/9)),this.editor.changeViewZones(f=>{this._viewZone&&f.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new nw(r,i.lineNumber,i.column,t,m=>this._onViewZoneTop(m),m=>this._onViewZoneHeight(m),this.options.showInHiddenAreas,this.options.ordinal),this._viewZone.id=f.addZone(this._viewZone),this._overlayWidget=new sw(iw+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this._updateSashEnablement(),this.container&&this.options.showFrame){const f=this.options.frameWidth?this.options.frameWidth:u;this.container.style.borderTopWidth=f+"px",this.container.style.borderBottomWidth=f+"px"}const g=t*l-this._decoratingElementsHeight();this.container&&(this.container.style.top=h+"px",this.container.style.height=g+"px",this.container.style.overflow="hidden"),this._doLayout(g,s),this.options.keepEditorSelection||this.editor.setSelection(e);const p=this.editor.getModel();if(p){const f=p.validateRange(new a.Range(e.startLineNumber,1,e.endLineNumber+1,1));this.revealRange(f,f.startLineNumber===p.getLineCount())}}revealRange(e,t){t?this.editor.revealLineNearTop(e.endLineNumber,0):this.editor.revealRange(e,0)}setCssClass(e,t){this.container&&(t&&this.container.classList.remove(t),this.container.classList.add(e))}_onWidth(e){}_doLayout(e,t){}_relayout(e,t){const i=this._getMaximumHeightInLines(),n=t&&i!==void 0?Math.min(i,e):e;this._viewZone&&this._viewZone.heightInLines!==n&&(this.editor.changeViewZones(s=>{this._viewZone&&(this._viewZone.heightInLines=n,s.layoutZone(this._viewZone.id))}),this._updateSashEnablement())}_initSash(){if(this._resizeSash)return;this._resizeSash=this._disposables.add(new o.Sash(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.state=0);let e;this._disposables.add(this._resizeSash.onDidStart(t=>{this._viewZone&&(e={startY:t.startY,heightInLines:this._viewZone.heightInLines,...this._getResizeBounds()})})),this._disposables.add(this._resizeSash.onDidEnd(()=>{e=void 0})),this._disposables.add(this._resizeSash.onDidChange(t=>{if(e){const i=(t.currentY-e.startY)/this.editor.getOption(75),n=i<0?Math.ceil(i):Math.floor(i),s=e.heightInLines+n;s>e.minLines&&s=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Wm=function(c,e){return function(t,i){e(t,i,c)}};const Hm=o.createDecorator("IPeekViewService");o.registerSingleton(Hm,class{constructor(){this._widgets=new Map}addExclusiveWidget(c,e){const t=this._widgets.get(c);t&&(t.listener.dispose(),t.widget.dispose());const i=()=>{const n=this._widgets.get(c);n&&n.widget===e&&(n.listener.dispose(),this._widgets.delete(c))};this._widgets.set(c,{widget:e,listener:e.onDidClose(i)})}},1);var ue;(function(c){c.inPeekEditor=new o.RawContextKey("inReferenceSearchEditor",!0,a.localize(1362,"Whether the current code editor is embedded inside peek")),c.notInPeekEditor=c.inPeekEditor.toNegated()})(ue||(ue={}));let ya=(Qs=class{constructor(e,t){e instanceof ct&&ue.inPeekEditor.bindTo(t)}dispose(){}},Qs.ID="editor.contrib.referenceController",Qs);ya=Jm([Wm(1,o.IContextKeyService)],ya),o.registerEditorContribution(ya.ID,ya,0);const rw={headerBackgroundColor:a.Color.white,primaryHeadingColor:a.Color.fromHex("#333333"),secondaryHeadingColor:a.Color.fromHex("#6c6c6cb3")};let wa=class extends ow{constructor(e,t,i){super(e,t),this.instantiationService=i,this._onDidClose=new a.Emitter,this.onDidClose=this._onDidClose.event,a.mixin(this.options,rw,!1);const n=o.observableCodeEditor(this.editor);n.openedPeekWidgets.set(n.openedPeekWidgets.get()+1,void 0)}dispose(){if(!this.disposed){this.disposed=!0,super.dispose(),this._onDidClose.fire(this),this._onDidClose.dispose();const e=o.observableCodeEditor(this.editor);e.openedPeekWidgets.set(e.openedPeekWidgets.get()-1,void 0)}}style(e){const t=this.options;e.headerBackgroundColor&&(t.headerBackgroundColor=e.headerBackgroundColor),e.primaryHeadingColor&&(t.primaryHeadingColor=e.primaryHeadingColor),e.secondaryHeadingColor&&(t.secondaryHeadingColor=e.secondaryHeadingColor),super.style(e)}_applyStyles(){super._applyStyles();const e=this.options;this._headElement&&e.headerBackgroundColor&&(this._headElement.style.backgroundColor=e.headerBackgroundColor.toString()),this._primaryHeading&&e.primaryHeadingColor&&(this._primaryHeading.style.color=e.primaryHeadingColor.toString()),this._secondaryHeading&&e.secondaryHeadingColor&&(this._secondaryHeading.style.color=e.secondaryHeadingColor.toString()),this._bodyElement&&e.frameColor&&(this._bodyElement.style.borderColor=e.frameColor.toString())}_fillContainer(e){this.setCssClass("peekview-widget"),this._headElement=o.$(".head"),this._bodyElement=o.$(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){this._titleElement=o.$(".peekview-title"),this.options.supportOnTitleClick&&(this._titleElement.classList.add("clickable"),o.addStandardDisposableListener(this._titleElement,"click",s=>this._onTitleClick(s))),o.append(this._headElement,this._titleElement),this._fillTitleIcon(this._titleElement),this._primaryHeading=o.$("span.filename"),this._secondaryHeading=o.$("span.dirname"),this._metaHeading=o.$("span.meta"),o.append(this._titleElement,this._primaryHeading,this._secondaryHeading,this._metaHeading);const i=o.$(".peekview-actions");o.append(this._headElement,i);const n=this._getActionBarOptions();this._actionbarWidget=new o.ActionBar(i,n),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(this._disposables.add(new o.Action("peekview.close",a.localize(1363,"Close"),o.ThemeIcon.asClassName(a.Codicon.close),!0,()=>(this.dispose(),Promise.resolve()))),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:o.createActionViewItem.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(e){}setTitle(e,t){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=e,this._primaryHeading.setAttribute("title",e),t?this._secondaryHeading.innerText=t:o.clearNode(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,o.show(this._metaHeading)):o.hide(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0){this.dispose();return}const i=Math.ceil(this.editor.getOption(75)*1.2),n=Math.round(e-(i+1));this._doLayoutHead(i,t),this._doLayoutBody(n,t)}_doLayoutHead(e,t){this._headElement&&(this._headElement.style.height=`${e}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(e,t){this._bodyElement&&(this._bodyElement.style.height=`${e}px`)}};wa=Jm([Wm(2,o.IInstantiationService)],wa);const aw=o.registerColor("peekViewTitle.background",{dark:"#252526",light:"#F3F3F3",hcDark:a.Color.black,hcLight:a.Color.white},a.localize(1364,"Background color of the peek view title area.")),e_=o.registerColor("peekViewTitleLabel.foreground",{dark:a.Color.white,light:a.Color.black,hcDark:a.Color.white,hcLight:o.editorForeground},a.localize(1365,"Color of the peek view title.")),t_=o.registerColor("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},a.localize(1366,"Color of the peek view title info.")),lw=o.registerColor("peekView.border",{dark:o.editorInfoForeground,light:o.editorInfoForeground,hcDark:o.contrastBorder,hcLight:o.contrastBorder},a.localize(1367,"Color of the peek view borders and arrow.")),cw=o.registerColor("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:a.Color.black,hcLight:a.Color.white},a.localize(1368,"Background color of the peek view result list."));o.registerColor("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:a.Color.white,hcLight:o.editorForeground},a.localize(1369,"Foreground color for line nodes in the peek view result list.")),o.registerColor("peekViewResult.fileForeground",{dark:a.Color.white,light:"#1E1E1E",hcDark:a.Color.white,hcLight:o.editorForeground},a.localize(1370,"Foreground color for file nodes in the peek view result list.")),o.registerColor("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},a.localize(1371,"Background color of the selected entry in the peek view result list.")),o.registerColor("peekViewResult.selectionForeground",{dark:a.Color.white,light:"#6C6C6C",hcDark:a.Color.white,hcLight:o.editorForeground},a.localize(1372,"Foreground color of the selected entry in the peek view result list."));const yh=o.registerColor("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:a.Color.black,hcLight:a.Color.white},a.localize(1373,"Background color of the peek view editor."));o.registerColor("peekViewEditorGutter.background",yh,a.localize(1374,"Background color of the gutter in the peek view editor.")),o.registerColor("peekViewEditorStickyScroll.background",yh,a.localize(1375,"Background color of sticky scroll in the peek view editor.")),o.registerColor("peekViewEditorStickyScrollGutter.background",yh,a.localize(1376,"Background color of the gutter part of sticky scroll in the peek view editor.")),o.registerColor("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},a.localize(1377,"Match highlight color in the peek view result list.")),o.registerColor("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},a.localize(1378,"Match highlight color in the peek view editor.")),o.registerColor("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:o.activeContrastBorder,hcLight:o.activeContrastBorder},a.localize(1379,"Match highlight border in the peek view editor."));class xt{constructor(e,t,i,n){this.isProviderFirst=e,this.parent=t,this.link=i,this._rangeCallback=n,this.id=o.defaultGenerator.nextId()}get uri(){return this.link.uri}get range(){return this._range??this.link.targetSelectionRange??this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){const e=this.parent.getPreview(this)?.preview(this.range);return e?a.localize(1131,"{0} in {1} on line {2} at column {3}",e.value,o.basename(this.uri),this.range.startLineNumber,this.range.startColumn):a.localize(1130,"in {0} on line {1} at column {2}",o.basename(this.uri),this.range.startLineNumber,this.range.startColumn)}}class dw{constructor(e){this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,t=8){const i=this._modelReference.object.textEditorModel;if(!i)return;const{startLineNumber:n,startColumn:s,endLineNumber:r,endColumn:l}=e,d=i.getWordUntilPosition({lineNumber:n,column:s-t}),h=new a.Range(n,d.startColumn,n,s),u=new a.Range(r,l,r,1073741824),g=i.getValueInRange(h).replace(/^\s+/,""),p=i.getValueInRange(e),f=i.getValueInRange(u).replace(/\s+$/,"");return{value:g+p+f,highlight:{start:g.length,end:g.length+p.length}}}}class gs{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new a.ResourceMap}dispose(){a.dispose(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){const e=this.children.length;return e===1?a.localize(1132,"1 symbol in {0}, full path {1}",o.basename(this.uri),this.uri.fsPath):a.localize(1133,"{0} symbols in {1}, full path {2}",e,o.basename(this.uri),this.uri.fsPath)}async resolve(e){if(this._previews.size!==0)return this;for(const t of this.children)if(!this._previews.has(t.uri))try{const i=await e.createModelReference(t.uri);this._previews.set(t.uri,new dw(i))}catch(i){a.onUnexpectedError(i)}return this}}class ve{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new a.Emitter,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;const[i]=e;e.sort(ve._compareReferences);let n;for(const s of e)if((!n||!o.extUri.isEqual(n.uri,s.uri,!0))&&(n=new gs(this,s.uri),this.groups.push(n)),n.children.length===0||ve._compareReferences(s,n.children[n.children.length-1])!==0){const r=new xt(i===s,n,s,l=>this._onDidChangeReferenceRange.fire(l));this.references.push(r),n.children.push(r)}}dispose(){a.dispose(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new ve(this._links,this._title)}get title(){return this._title}get isEmpty(){return this.groups.length===0}get ariaMessage(){return this.isEmpty?a.localize(1134,"No results found"):this.references.length===1?a.localize(1135,"Found 1 symbol in {0}",this.references[0].uri.fsPath):this.groups.length===1?a.localize(1136,"Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):a.localize(1137,"Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,t){const{parent:i}=e;let n=i.children.indexOf(e);const s=i.children.length,r=i.parent.groups.length;return r===1||t&&n+10?(t?n=(n+1)%s:n=(n+s-1)%s,i.children[n]):(n=i.parent.groups.indexOf(i),t?(n=(n+1)%r,i.parent.groups[n].children[0]):(n=(n+r-1)%r,i.parent.groups[n].children[i.parent.groups[n].children.length-1]))}nearestReference(e,t){const i=this.references.map((n,s)=>({idx:s,prefixLen:a.commonPrefixLength(n.uri.toString(),e.toString()),offsetDist:Math.abs(n.range.startLineNumber-t.lineNumber)*100+Math.abs(n.range.startColumn-t.column)})).sort((n,s)=>n.prefixLen>s.prefixLen?-1:n.prefixLens.offsetDist?1:0)[0];if(i)return this.references[i.idx]}referenceAt(e,t){for(const i of this.references)if(i.uri.toString()===e.toString()&&a.Range.containsPosition(i.range,t))return i}firstReference(){for(const e of this.references)if(e.isProviderFirst)return e;return this.references[0]}static _compareReferences(e,t){return o.extUri.compare(e.uri,t.uri)||a.Range.compareRangesUsingStarts(e.range,t.range)}}var Ia=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},xa=function(c,e){return function(t,i){e(t,i,c)}},wh;let Ih=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof ve||e instanceof gs}getChildren(e){if(e instanceof ve)return e.groups;if(e instanceof gs)return e.resolve(this._resolverService).then(t=>t.children);throw new Error("bad tree")}};Ih=Ia([xa(0,o.ITextModelService)],Ih);class hw{getHeight(){return 23}getTemplateId(e){return e instanceof gs?Ea.id:La.id}}let xh=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){if(e instanceof xt){const t=e.parent.getPreview(e)?.preview(e.range);if(t)return t.value}return o.basename(e.uri)}};xh=Ia([xa(0,o.IKeybindingService)],xh);class uw{getId(e){return e instanceof xt?e.id:e.uri}}let Eh=class extends a.Disposable{constructor(e,t){super(),this._labelService=t;const i=document.createElement("div");i.classList.add("reference-file"),this.file=this._register(new o.IconLabel(i,{supportHighlights:!0})),this.badge=this._register(new o.CountBadge(o.append(i,o.$(".count")),{},o.defaultCountBadgeStyles)),e.appendChild(i)}set(e,t){const i=o.dirname(e.uri);this.file.setLabel(this._labelService.getUriBasenameLabel(e.uri),this._labelService.getUriLabel(i,{relative:!0}),{title:this._labelService.getUriLabel(e.uri),matches:t});const n=e.children.length;this.badge.setCount(n),n>1?this.badge.setTitleFormat(a.localize(1124,"{0} references",n)):this.badge.setTitleFormat(a.localize(1125,"{0} reference",n))}};Eh=Ia([xa(1,o.ILabelService)],Eh);let Ea=(vn=class{constructor(e){this._instantiationService=e,this.templateId=wh.id}renderTemplate(e){return this._instantiationService.createInstance(Eh,e)}renderElement(e,t,i){i.set(e.element,o.createMatches(e.filterData))}disposeTemplate(e){e.dispose()}},wh=vn,vn.id="FileReferencesRenderer",vn);Ea=wh=Ia([xa(0,o.IInstantiationService)],Ea);class gw extends a.Disposable{constructor(e){super(),this.label=this._register(new o.HighlightedLabel(e))}set(e,t){const i=e.parent.getPreview(e)?.preview(e.range);if(!i||!i.value)this.label.set(`${o.basename(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`);else{const{value:n,highlight:s}=i;t&&!o.FuzzyScore.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(n,o.createMatches(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(n,[s]))}}}const Ic=class Ic{constructor(){this.templateId=Ic.id}renderTemplate(e){return new gw(e)}renderElement(e,t,i){i.set(e.element,e.filterData)}disposeTemplate(e){e.dispose()}};Ic.id="OneReferenceRenderer";let La=Ic;class pw{getWidgetAriaLabel(){return a.localize(1126,"References")}getAriaLabel(e){return e.ariaMessage}}var i_=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Qi=function(c,e){return function(t,i){e(t,i,c)}};const xc=class xc{constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new a.DisposableStore,this._callOnModelChange=new a.DisposableStore,this._callOnDispose.add(this._editor.onDidChangeModel(()=>this._onModelChanged())),this._onModelChanged()}dispose(){this._callOnModelChange.dispose(),this._callOnDispose.dispose(),this.removeDecorations()}_onModelChanged(){this._callOnModelChange.clear();const e=this._editor.getModel();if(e){for(const t of this._model.references)if(t.uri.toString()===e.uri.toString()){this._addDecorations(t.parent);return}}}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(()=>this._onDecorationChanged()));const t=[],i=[];for(let n=0,s=e.children.length;n{const s=n.deltaDecorations([],t);for(let r=0;rthis.labelService.getUriBasenameLabel(i.uri)).join(", ")}onDragStart(e,t){if(!t.dataTransfer)return;const n=e.elements.map(s=>this.getDragURI(s)).filter(Boolean);n.length&&(t.dataTransfer.setData(o.DataTransfers.RESOURCES,JSON.stringify(n)),t.dataTransfer.setData(o.DataTransfers.TEXT,n.join(` +`)))}onDragOver(){return!1}drop(){}dispose(){this.disposables.dispose()}};Dh=i_([Qi(0,o.ILabelService)],Dh);let Rh=class extends wa{constructor(e,t,i,n,s,r,l,d,h){super(e,{showFrame:!1,showArrow:!0,isResizeable:!0,isAccessible:!0,supportOnTitleClick:!0},r),this._defaultTreeKeyboardSupport=t,this.layoutData=i,this._textModelResolverService=s,this._instantiationService=r,this._peekViewService=l,this._uriLabel=d,this._keybindingService=h,this._disposeOnNewModel=new a.DisposableStore,this._callOnDispose=new a.DisposableStore,this._onDidSelectReference=this._callOnDispose.add(new a.Emitter),this.onDidSelectReference=this._onDidSelectReference.event,this._dim=new o.Dimension(0,0),this._isClosing=!1,this._applyTheme(n.getColorTheme()),this._callOnDispose.add(n.onDidColorThemeChange(this._applyTheme.bind(this))),this._peekViewService.addExclusiveWidget(e,this),this.create()}get isClosing(){return this._isClosing}dispose(){this._isClosing=!0,this.setModel(void 0),this._callOnDispose.dispose(),this._disposeOnNewModel.dispose(),a.dispose(this._preview),a.dispose(this._previewNotAvailableMessage),a.dispose(this._tree),a.dispose(this._previewModelReference),this._splitView.dispose(),super.dispose()}_applyTheme(e){const t=e.getColor(lw)||a.Color.transparent;this.style({arrowColor:t,frameColor:t,headerBackgroundColor:e.getColor(aw)||a.Color.transparent,primaryHeadingColor:e.getColor(e_),secondaryHeadingColor:e.getColor(t_)})}show(e){super.show(e,this.layoutData.heightInLines||18)}focusOnReferenceTree(){this._tree.domFocus()}focusOnPreviewEditor(){this._preview.focus()}isPreviewEditorFocused(){return this._preview.hasTextFocus()}_onTitleClick(e){this._preview&&this._preview.getModel()&&this._onDidSelectReference.fire({element:this._getFocusedReference(),kind:e.ctrlKey||e.metaKey||e.altKey?"side":"open",source:"title"})}_fillBody(e){this.setCssClass("reference-zone-widget"),this._messageContainer=o.append(e,o.$("div.messages")),o.hide(this._messageContainer),this._splitView=new o.SplitView(e,{orientation:1}),this._previewContainer=o.append(e,o.$("div.preview.inline"));const t={scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,alwaysConsumeMouseWheel:!0},overviewRulerLanes:2,fixedOverflowWidgets:!0,minimap:{enabled:!1}};this._preview=this._instantiationService.createInstance(ct,this._previewContainer,t,{},this.editor),o.hide(this._previewContainer),this._previewNotAvailableMessage=this._instantiationService.createInstance(o.TextModel,a.localize(1127,"no preview available"),o.PLAINTEXT_LANGUAGE_ID,o.TextModel.DEFAULT_CREATION_OPTIONS,null),this._treeContainer=o.append(e,o.$("div.ref-tree.inline"));const i={keyboardSupport:this._defaultTreeKeyboardSupport,accessibilityProvider:new pw,keyboardNavigationLabelProvider:this._instantiationService.createInstance(xh),identityProvider:new uw,openOnSingleClick:!0,selectionNavigation:!0,overrideStyles:{listBackground:cw},dnd:this._instantiationService.createInstance(Dh)};this._defaultTreeKeyboardSupport&&this._callOnDispose.add(o.addStandardDisposableListener(this._treeContainer,"keydown",s=>{s.equals(9)&&(this._keybindingService.dispatchEvent(s,s.target),s.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(mw,"ReferencesWidget",this._treeContainer,new hw,[this._instantiationService.createInstance(Ea),this._instantiationService.createInstance(La)],this._instantiationService.createInstance(Ih),i),this._splitView.addView({onDidChange:a.Event.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:s=>{this._preview.layout({height:this._dim.height,width:s})}},o.Sizing.Distribute),this._splitView.addView({onDidChange:a.Event.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:s=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${s}px`,this._tree.layout(this._dim.height,s)}},o.Sizing.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));const n=(s,r)=>{s instanceof xt&&(r==="show"&&this._revealReference(s,!1),this._onDidSelectReference.fire({element:s,kind:r,source:"tree"}))};this._disposables.add(this._tree.onDidOpen(s=>{s.sideBySide?n(s.element,"side"):s.editorOptions.pinned?n(s.element,"goto"):n(s.element,"show")})),o.hide(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new o.Dimension(t,e),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(t),this._splitView.resizeView(0,t*this.layoutData.ratio)}setSelection(e){return this._revealReference(e,!0).then(()=>{this._model&&(this._tree.setSelection([e]),this._tree.setFocus([e]))})}setModel(e){return this._disposeOnNewModel.clear(),this._model=e,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=a.localize(1128,"No results"),o.show(this._messageContainer),Promise.resolve(void 0)):(o.hide(this._messageContainer),this._decorationsManager=new Lh(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange(e=>this._tree.rerender(e))),this._disposeOnNewModel.add(this._preview.onMouseDown(e=>{const{event:t,target:i}=e;if(t.detail!==2)return;const n=this._getFocusedReference();n&&this._onDidSelectReference.fire({element:{uri:n.uri,range:i.range},kind:t.ctrlKey||t.metaKey||t.altKey?"side":"open",source:"editor"})})),this.container.classList.add("results-loaded"),o.show(this._treeContainer),o.show(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(this._model.groups.length===1?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[e]=this._tree.getFocus();if(e instanceof xt)return e;if(e instanceof gs&&e.children.length>0)return e.children[0]}async revealReference(e){await this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})}async _revealReference(e,t){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==a.Schemas.inMemory?this.setTitle(o.basenameOrAuthority(e.uri),this._uriLabel.getUriLabel(o.dirname(e.uri))):this.setTitle(a.localize(1129,"References"));const i=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent?this._tree.reveal(e):(t&&this._tree.reveal(e.parent),await this._tree.expand(e.parent),this._tree.reveal(e));const n=await i;if(!this._model){n.dispose();return}a.dispose(this._previewModelReference);const s=n.object;if(s){const r=this._preview.getModel()===s.textEditorModel?0:1,l=a.Range.lift(e.range).collapseToStart();this._previewModelReference=n,this._preview.setModel(s.textEditorModel),this._preview.setSelection(l),this._preview.revealRangeInCenter(l,r)}else this._preview.setModel(this._previewNotAvailableMessage),n.dispose()}};Rh=i_([Qi(3,o.IThemeService),Qi(4,o.ITextModelService),Qi(5,o.IInstantiationService),Qi(6,Hm),Qi(7,o.ILabelService),Qi(8,o.IKeybindingService)],Rh);var _w=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ps=function(c,e){return function(t,i){e(t,i,c)}},Da;const Ji=new o.RawContextKey("referenceSearchVisible",!1,a.localize(1121,"Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));let Wi=(bn=class{static get(e){return e.getContribution(Da.ID)}constructor(e,t,i,n,s,r,l,d){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=n,this._notificationService=s,this._instantiationService=r,this._storageService=l,this._configurationService=d,this._disposables=new a.DisposableStore,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=Ji.bindTo(i)}dispose(){this._referenceSearchVisible.reset(),this._disposables.dispose(),this._widget?.dispose(),this._model?.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(e,t,i){let n;if(this._widget&&(n=this._widget.position),this.closeWidget(),n&&e.containsPosition(n))return;this._peekMode=i,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>{this.closeWidget()})),this._disposables.add(this._editor.onDidChangeModel(()=>{this._ignoreModelChangeEvent||this.closeWidget()}));const s="peekViewLayout",r=fw.fromJSON(this._storageService.get(s,0,"{}"));this._widget=this._instantiationService.createInstance(Rh,this._editor,this._defaultTreeKeyboardSupport,r),this._widget.setTitle(a.localize(1122,"Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose(()=>{t.cancel(),this._widget?(this._storageService.store(s,JSON.stringify(this._widget.layoutData),0,1),this._widget.isClosing||this.closeWidget(),this._widget=void 0):this.closeWidget()})),this._disposables.add(this._widget.onDidSelectReference(d=>{const{element:h,kind:u}=d;if(h)switch(u){case"open":(d.source!=="editor"||!this._configurationService.getValue("editor.stablePeek"))&&this.openReference(h,!1,!1);break;case"side":this.openReference(h,!0,!1);break;case"goto":i?this._gotoReference(h,!0):this.openReference(h,!1,!0);break}}));const l=++this._requestIdPool;t.then(d=>{if(l!==this._requestIdPool||!this._widget){d.dispose();return}return this._model?.dispose(),this._model=d,this._widget.setModel(this._model).then(()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(a.localize(1123,"{0} ({1})",this._model.title,this._model.references.length));const h=this._editor.getModel().uri,u=new a.Position(e.startLineNumber,e.startColumn),g=this._model.nearestReference(h,u);if(g)return this._widget.setSelection(g).then(()=>{this._widget&&this._editor.getOption(99)==="editor"&&this._widget.focusOnPreviewEditor()})}})},d=>{this._notificationService.error(d)})}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}async goToNextOrPreviousReference(e){if(!this._editor.hasModel()||!this._model||!this._widget)return;const t=this._widget.position;if(!t)return;const i=this._model.nearestReference(this._editor.getModel().uri,t);if(!i)return;const n=this._model.nextOrPreviousReference(i,e),s=this._editor.hasTextFocus(),r=this._widget.isPreviewEditorFocused();await this._widget.setSelection(n),await this._gotoReference(n,!1),s?this._editor.focus():this._widget&&r&&this._widget.focusOnPreviewEditor()}async revealReference(e){!this._editor.hasModel()||!this._model||!this._widget||await this._widget.revealReference(e)}closeWidget(e=!0){this._widget?.dispose(),this._model?.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,e&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(e,t){this._widget?.hide(),this._ignoreModelChangeEvent=!0;const i=a.Range.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({resource:e.uri,options:{selection:i,selectionSource:"code.jump",pinned:t}},this._editor).then(n=>{if(this._ignoreModelChangeEvent=!1,!n||!this._widget){this.closeWidget();return}if(this._editor===n)this._widget.show(i),this._widget.focusOnReferenceTree();else{const s=Da.get(n),r=this._model.clone();this.closeWidget(),n.focus(),s?.toggleWidget(i,a.createCancelablePromise(l=>Promise.resolve(r)),this._peekMode??!1)}},n=>{this._ignoreModelChangeEvent=!1,a.onUnexpectedError(n)})}openReference(e,t,i){t||this.closeWidget();const{uri:n,range:s}=e;this._editorService.openCodeEditor({resource:n,options:{selection:s,selectionSource:"code.jump",pinned:i}},this._editor,t)}},Da=bn,bn.ID="editor.contrib.referencesController",bn);Wi=Da=_w([ps(2,o.IContextKeyService),ps(3,o.ICodeEditorService),ps(4,o.INotificationService),ps(5,o.IInstantiationService),ps(6,o.IStorageService),ps(7,o.IConfigurationService)],Wi);function Hi(c,e){const t=Ym(c);if(!t)return;const i=Wi.get(t);i&&e(i)}o.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:a.KeyChord(2089,60),when:o.ContextKeyExpr.or(Ji,ue.inPeekEditor),handler(c){Hi(c,e=>{e.changeFocusBetweenPreviewAndReferences()})}}),o.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"goToNextReference",weight:90,primary:62,secondary:[70],when:o.ContextKeyExpr.or(Ji,ue.inPeekEditor),handler(c){Hi(c,e=>{e.goToNextOrPreviousReference(!0)})}}),o.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:90,primary:1086,secondary:[1094],when:o.ContextKeyExpr.or(Ji,ue.inPeekEditor),handler(c){Hi(c,e=>{e.goToNextOrPreviousReference(!1)})}}),o.CommandsRegistry.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference"),o.CommandsRegistry.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference"),o.CommandsRegistry.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch"),o.CommandsRegistry.registerCommand("closeReferenceSearch",c=>Hi(c,e=>e.closeWidget())),o.KeybindingsRegistry.registerKeybindingRule({id:"closeReferenceSearch",weight:-1,primary:9,secondary:[1033],when:o.ContextKeyExpr.and(ue.inPeekEditor,o.ContextKeyExpr.not("config.editor.stablePeek"))}),o.KeybindingsRegistry.registerKeybindingRule({id:"closeReferenceSearch",weight:250,primary:9,secondary:[1033],when:o.ContextKeyExpr.and(Ji,o.ContextKeyExpr.not("config.editor.stablePeek"),o.ContextKeyExpr.or(o.EditorContextKeys.editorTextFocus,o.InputFocusedContext.negate()))}),o.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:o.ContextKeyExpr.and(Ji,o.WorkbenchListFocusContextKey,o.WorkbenchTreeElementCanCollapse.negate(),o.WorkbenchTreeElementCanExpand.negate()),handler(c){const t=c.get(o.IListService).lastFocusedList?.getFocus();Array.isArray(t)&&t[0]instanceof xt&&Hi(c,i=>i.revealReference(t[0]))}}),o.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:o.ContextKeyExpr.and(Ji,o.WorkbenchListFocusContextKey,o.WorkbenchTreeElementCanCollapse.negate(),o.WorkbenchTreeElementCanExpand.negate()),handler(c){const t=c.get(o.IListService).lastFocusedList?.getFocus();Array.isArray(t)&&t[0]instanceof xt&&Hi(c,i=>i.openReference(t[0],!0,!0))}}),o.CommandsRegistry.registerCommand("openReference",c=>{const t=c.get(o.IListService).lastFocusedList?.getFocus();Array.isArray(t)&&t[0]instanceof xt&&Hi(c,i=>i.openReference(t[0],!1,!0))});var n_=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Do=function(c,e){return function(t,i){e(t,i,c)}};const Th=new o.RawContextKey("hasSymbols",!1,a.localize(1138,"Whether there are symbol locations that can be navigated via keyboard-only.")),Ra=o.createDecorator("ISymbolNavigationService");let Nh=class{constructor(e,t,i,n){this._editorService=t,this._notificationService=i,this._keybindingService=n,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=Th.bindTo(e)}reset(){this._ctxHasSymbols.reset(),this._currentState?.dispose(),this._currentMessage?.close(),this._currentModel=void 0,this._currentIdx=-1}put(e){const t=e.parent.parent;if(t.references.length<=1){this.reset();return}this._currentModel=t,this._currentIdx=t.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();const i=new Mh(this._editorService),n=i.onDidChange(s=>{if(this._ignoreEditorChange)return;const r=this._editorService.getActiveCodeEditor();if(!r)return;const l=r.getModel(),d=r.getPosition();if(!l||!d)return;let h=!1,u=!1;for(const g of t.references)if(o.isEqual(g.uri,l.uri))h=!0,u=u||a.Range.containsPosition(g.range,d);else if(h)break;(!h||!u)&&this.reset()});this._currentState=a.combinedDisposable(i,n)}revealNext(e){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const t=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:t.uri,options:{selection:a.Range.collapseToStart(t.range),selectionRevealType:3}},e).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){this._currentMessage?.close();const e=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),t=e?a.localize(1139,"Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,e.getLabel()):a.localize(1140,"Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(t)}};Nh=n_([Do(0,o.IContextKeyService),Do(1,o.ICodeEditorService),Do(2,o.INotificationService),Do(3,o.IKeybindingService)],Nh),o.registerSingleton(Ra,Nh,1),o.registerEditorCommand(new class extends o.EditorCommand{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:Th,kbOpts:{weight:100,primary:70}})}runEditorCommand(c,e){return c.get(Ra).revealNext(e)}}),o.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:Th,primary:9,handler(c){c.get(Ra).reset()}});let Mh=class{constructor(e){this._listener=new Map,this._disposables=new a.DisposableStore,this._onDidChange=new a.Emitter,this.onDidChange=this._onDidChange.event,this._disposables.add(e.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(e.onCodeEditorAdd(this._onDidAddEditor,this)),e.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),a.dispose(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,a.combinedDisposable(e.onDidChangeCursorPosition(t=>this._onDidChange.fire({editor:e})),e.onDidChangeModelContent(t=>this._onDidChange.fire({editor:e}))))}_onDidRemoveEditor(e){this._listener.get(e)?.dispose(),this._listener.delete(e)}};Mh=n_([Do(0,o.ICodeEditorService)],Mh);function Ph(c,e){return e.uri.scheme===c.uri.scheme?!0:!a.matchesSomeScheme(e.uri,a.Schemas.walkThroughSnippet,a.Schemas.vscodeChatCodeBlock,a.Schemas.vscodeChatCodeCompareBlock)}async function Ro(c,e,t,i,n){const r=t.ordered(c,i).map(d=>Promise.resolve(n(d,c,e)).then(void 0,h=>{a.onUnexpectedExternalError(h)})),l=await Promise.all(r);return a.coalesce(l.flat()).filter(d=>Ph(c,d))}function To(c,e,t,i,n){return Ro(e,t,c,i,(s,r,l)=>s.provideDefinition(r,l,n))}function Oh(c,e,t,i,n){return Ro(e,t,c,i,(s,r,l)=>s.provideDeclaration(r,l,n))}function Ah(c,e,t,i,n){return Ro(e,t,c,i,(s,r,l)=>s.provideImplementation(r,l,n))}function Fh(c,e,t,i,n){return Ro(e,t,c,i,(s,r,l)=>s.provideTypeDefinition(r,l,n))}function No(c,e,t,i,n,s){return Ro(e,t,c,n,async(r,l,d)=>{const h=(await r.provideReferences(l,d,{includeDeclaration:!0},s))?.filter(g=>Ph(l,g));if(!i||!h||h.length!==2)return h;const u=(await r.provideReferences(l,d,{includeDeclaration:!1},s))?.filter(g=>Ph(l,g));return u&&u.length===1?u:h})}async function dt(c){const e=await c(),t=new ve(e,""),i=t.references.map(n=>n.link);return t.dispose(),i}o.registerModelAndPositionCommand("_executeDefinitionProvider",(c,e,t)=>{const i=c.get(o.ILanguageFeaturesService),n=To(i.definitionProvider,e,t,!1,a.CancellationToken.None);return dt(()=>n)}),o.registerModelAndPositionCommand("_executeDefinitionProvider_recursive",(c,e,t)=>{const i=c.get(o.ILanguageFeaturesService),n=To(i.definitionProvider,e,t,!0,a.CancellationToken.None);return dt(()=>n)}),o.registerModelAndPositionCommand("_executeTypeDefinitionProvider",(c,e,t)=>{const i=c.get(o.ILanguageFeaturesService),n=Fh(i.typeDefinitionProvider,e,t,!1,a.CancellationToken.None);return dt(()=>n)}),o.registerModelAndPositionCommand("_executeTypeDefinitionProvider_recursive",(c,e,t)=>{const i=c.get(o.ILanguageFeaturesService),n=Fh(i.typeDefinitionProvider,e,t,!0,a.CancellationToken.None);return dt(()=>n)}),o.registerModelAndPositionCommand("_executeDeclarationProvider",(c,e,t)=>{const i=c.get(o.ILanguageFeaturesService),n=Oh(i.declarationProvider,e,t,!1,a.CancellationToken.None);return dt(()=>n)}),o.registerModelAndPositionCommand("_executeDeclarationProvider_recursive",(c,e,t)=>{const i=c.get(o.ILanguageFeaturesService),n=Oh(i.declarationProvider,e,t,!0,a.CancellationToken.None);return dt(()=>n)}),o.registerModelAndPositionCommand("_executeReferenceProvider",(c,e,t)=>{const i=c.get(o.ILanguageFeaturesService),n=No(i.referenceProvider,e,t,!1,!1,a.CancellationToken.None);return dt(()=>n)}),o.registerModelAndPositionCommand("_executeReferenceProvider_recursive",(c,e,t)=>{const i=c.get(o.ILanguageFeaturesService),n=No(i.referenceProvider,e,t,!1,!0,a.CancellationToken.None);return dt(()=>n)}),o.registerModelAndPositionCommand("_executeImplementationProvider",(c,e,t)=>{const i=c.get(o.ILanguageFeaturesService),n=Ah(i.implementationProvider,e,t,!1,a.CancellationToken.None);return dt(()=>n)}),o.registerModelAndPositionCommand("_executeImplementationProvider_recursive",(c,e,t)=>{const i=c.get(o.ILanguageFeaturesService),n=Ah(i.implementationProvider,e,t,!0,a.CancellationToken.None);return dt(()=>n)}),o.MenuRegistry.appendMenuItem(o.MenuId.EditorContext,{submenu:o.MenuId.EditorContextPeek,title:a.localize(1081,"Peek"),group:"navigation",order:100});class fs{static is(e){return!e||typeof e!="object"?!1:!!(e instanceof fs||a.Position.isIPosition(e.position)&&e.model)}constructor(e,t){this.model=e,this.position=t}}const Ke=class Ke extends o.EditorAction2{static all(){return Ke._allSymbolNavigationCommands.values()}static _patchConfig(e){const t={...e,f1:!0};if(t.menu)for(const i of a.Iterable.wrap(t.menu))(i.id===o.MenuId.EditorContext||i.id===o.MenuId.EditorContextPeek)&&(i.when=o.ContextKeyExpr.and(e.precondition,i.when));return t}constructor(e,t){super(Ke._patchConfig(t)),this.configuration=e,Ke._allSymbolNavigationCommands.set(t.id,this)}runEditorCommand(e,t,i,n){if(!t.hasModel())return Promise.resolve(void 0);const s=e.get(o.INotificationService),r=e.get(o.ICodeEditorService),l=e.get(o.IEditorProgressService),d=e.get(Ra),h=e.get(o.ILanguageFeaturesService),u=e.get(o.IInstantiationService),g=t.getModel(),p=t.getPosition(),f=fs.is(i)?i:new fs(g,p),m=new o.EditorStateCancellationTokenSource(t,5),_=a.raceCancellation(this._getLocationModel(h,f.model,f.position,m.token),m.token).then(async v=>{if(!v||m.token.isCancellationRequested)return;o.alert(v.ariaMessage);let b;if(v.referenceAt(g.uri,p)){const w=this._getAlternativeCommand(t);w!==void 0&&!Ke._activeAlternativeCommands.has(w)&&Ke._allSymbolNavigationCommands.has(w)&&(b=Ke._allSymbolNavigationCommands.get(w))}const S=v.references.length;if(S===0){if(!this.configuration.muteMessage){const w=g.getWordAtPosition(p);me.get(t)?.showMessage(this._getNoResultFoundMessage(w),p)}}else if(S===1&&b)Ke._activeAlternativeCommands.add(this.desc.id),u.invokeFunction(w=>b.runEditorCommand(w,t,i,n).finally(()=>{Ke._activeAlternativeCommands.delete(this.desc.id)}));else return this._onResult(r,d,t,v,n)},v=>{s.error(v)}).finally(()=>{m.dispose()});return l.showWhile(_,250),_}async _onResult(e,t,i,n,s){const r=this._getGoToPreference(i);if(!(i instanceof ct)&&(this.configuration.openInPeek||r==="peek"&&n.references.length>1))this._openInPeek(i,n,s);else{const l=n.firstReference(),d=n.references.length>1&&r==="gotoAndPeek",h=await this._openReference(i,e,l,this.configuration.openToSide,!d);d&&h?this._openInPeek(h,n,s):n.dispose(),r==="goto"&&t.put(l)}}async _openReference(e,t,i,n,s){let r;if(a.isLocationLink(i)&&(r=i.targetSelectionRange),r||(r=i.range),!r)return;const l=await t.openCodeEditor({resource:i.uri,options:{selection:a.Range.collapseToStart(r),selectionRevealType:3,selectionSource:"code.jump"}},e,n);if(l){if(s){const d=l.getModel(),h=l.createDecorationsCollection([{range:r,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{l.getModel()===d&&h.clear()},350)}return l}}_openInPeek(e,t,i){const n=Wi.get(e);n&&e.hasModel()?n.toggleWidget(i??e.getSelection(),a.createCancelablePromise(s=>Promise.resolve(t)),this.configuration.openInPeek):t.dispose()}};Ke._allSymbolNavigationCommands=new Map,Ke._activeAlternativeCommands=new Set;let Et=Ke;class Mo extends Et{async _getLocationModel(e,t,i,n){return new ve(await To(e.definitionProvider,t,i,!1,n),a.localize(1082,"Definitions"))}_getNoResultFoundMessage(e){return e&&e.word?a.localize(1083,"No definition found for '{0}'",e.word):a.localize(1084,"No definition found")}_getAlternativeCommand(e){return e.getOption(67).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(67).multipleDefinitions}}o.registerAction2((vi=class extends Mo{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:vi.id,title:{...a.localize2(1108,"Go to Definition"),mnemonicTitle:a.localize(1085,"Go to &&Definition")},precondition:o.EditorContextKeys.hasDefinitionProvider,keybinding:[{when:o.EditorContextKeys.editorTextFocus,primary:70,weight:100},{when:o.ContextKeyExpr.and(o.EditorContextKeys.editorTextFocus,o.IsWebContext),primary:2118,weight:100}],menu:[{id:o.MenuId.EditorContext,group:"navigation",order:1.1},{id:o.MenuId.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:2}]}),o.CommandsRegistry.registerCommandAlias("editor.action.goToDeclaration",vi.id)}},vi.id="editor.action.revealDefinition",vi)),o.registerAction2((bi=class extends Mo{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:bi.id,title:a.localize2(1109,"Open Definition to the Side"),precondition:o.ContextKeyExpr.and(o.EditorContextKeys.hasDefinitionProvider,o.EditorContextKeys.isInEmbeddedEditor.toNegated()),keybinding:[{when:o.EditorContextKeys.editorTextFocus,primary:a.KeyChord(2089,70),weight:100},{when:o.ContextKeyExpr.and(o.EditorContextKeys.editorTextFocus,o.IsWebContext),primary:a.KeyChord(2089,2118),weight:100}]}),o.CommandsRegistry.registerCommandAlias("editor.action.openDeclarationToTheSide",bi.id)}},bi.id="editor.action.revealDefinitionAside",bi)),o.registerAction2((Ci=class extends Mo{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:Ci.id,title:a.localize2(1110,"Peek Definition"),precondition:o.ContextKeyExpr.and(o.EditorContextKeys.hasDefinitionProvider,ue.notInPeekEditor,o.EditorContextKeys.isInEmbeddedEditor.toNegated()),keybinding:{when:o.EditorContextKeys.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:o.MenuId.EditorContextPeek,group:"peek",order:2}}),o.CommandsRegistry.registerCommandAlias("editor.action.previewDeclaration",Ci.id)}},Ci.id="editor.action.peekDefinition",Ci));class s_ extends Et{async _getLocationModel(e,t,i,n){return new ve(await Oh(e.declarationProvider,t,i,!1,n),a.localize(1086,"Declarations"))}_getNoResultFoundMessage(e){return e&&e.word?a.localize(1087,"No declaration found for '{0}'",e.word):a.localize(1088,"No declaration found")}_getAlternativeCommand(e){return e.getOption(67).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(67).multipleDeclarations}}o.registerAction2((Cn=class extends s_{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:Cn.id,title:{...a.localize2(1111,"Go to Declaration"),mnemonicTitle:a.localize(1089,"Go to &&Declaration")},precondition:o.ContextKeyExpr.and(o.EditorContextKeys.hasDeclarationProvider,o.EditorContextKeys.isInEmbeddedEditor.toNegated()),menu:[{id:o.MenuId.EditorContext,group:"navigation",order:1.3},{id:o.MenuId.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}_getNoResultFoundMessage(e){return e&&e.word?a.localize(1090,"No declaration found for '{0}'",e.word):a.localize(1091,"No declaration found")}},Cn.id="editor.action.revealDeclaration",Cn)),o.registerAction2(class extends s_{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",title:a.localize2(1112,"Peek Declaration"),precondition:o.ContextKeyExpr.and(o.EditorContextKeys.hasDeclarationProvider,ue.notInPeekEditor,o.EditorContextKeys.isInEmbeddedEditor.toNegated()),menu:{id:o.MenuId.EditorContextPeek,group:"peek",order:3}})}});class o_ extends Et{async _getLocationModel(e,t,i,n){return new ve(await Fh(e.typeDefinitionProvider,t,i,!1,n),a.localize(1092,"Type Definitions"))}_getNoResultFoundMessage(e){return e&&e.word?a.localize(1093,"No type definition found for '{0}'",e.word):a.localize(1094,"No type definition found")}_getAlternativeCommand(e){return e.getOption(67).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(67).multipleTypeDefinitions}}o.registerAction2((Sn=class extends o_{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:Sn.ID,title:{...a.localize2(1113,"Go to Type Definition"),mnemonicTitle:a.localize(1095,"Go to &&Type Definition")},precondition:o.EditorContextKeys.hasTypeDefinitionProvider,keybinding:{when:o.EditorContextKeys.editorTextFocus,primary:0,weight:100},menu:[{id:o.MenuId.EditorContext,group:"navigation",order:1.4},{id:o.MenuId.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}},Sn.ID="editor.action.goToTypeDefinition",Sn)),o.registerAction2((yn=class extends o_{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:yn.ID,title:a.localize2(1114,"Peek Type Definition"),precondition:o.ContextKeyExpr.and(o.EditorContextKeys.hasTypeDefinitionProvider,ue.notInPeekEditor,o.EditorContextKeys.isInEmbeddedEditor.toNegated()),menu:{id:o.MenuId.EditorContextPeek,group:"peek",order:4}})}},yn.ID="editor.action.peekTypeDefinition",yn));class r_ extends Et{async _getLocationModel(e,t,i,n){return new ve(await Ah(e.implementationProvider,t,i,!1,n),a.localize(1096,"Implementations"))}_getNoResultFoundMessage(e){return e&&e.word?a.localize(1097,"No implementation found for '{0}'",e.word):a.localize(1098,"No implementation found")}_getAlternativeCommand(e){return e.getOption(67).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(67).multipleImplementations}}o.registerAction2((wn=class extends r_{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:wn.ID,title:{...a.localize2(1115,"Go to Implementations"),mnemonicTitle:a.localize(1099,"Go to &&Implementations")},precondition:o.EditorContextKeys.hasImplementationProvider,keybinding:{when:o.EditorContextKeys.editorTextFocus,primary:2118,weight:100},menu:[{id:o.MenuId.EditorContext,group:"navigation",order:1.45},{id:o.MenuId.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:4}]})}},wn.ID="editor.action.goToImplementation",wn)),o.registerAction2((In=class extends r_{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:In.ID,title:a.localize2(1116,"Peek Implementations"),precondition:o.ContextKeyExpr.and(o.EditorContextKeys.hasImplementationProvider,ue.notInPeekEditor,o.EditorContextKeys.isInEmbeddedEditor.toNegated()),keybinding:{when:o.EditorContextKeys.editorTextFocus,primary:3142,weight:100},menu:{id:o.MenuId.EditorContextPeek,group:"peek",order:5}})}},In.ID="editor.action.peekImplementation",In));class a_ extends Et{_getNoResultFoundMessage(e){return e?a.localize(1100,"No references found for '{0}'",e.word):a.localize(1101,"No references found")}_getAlternativeCommand(e){return e.getOption(67).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(67).multipleReferences}}o.registerAction2(class extends a_{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",title:{...a.localize2(1117,"Go to References"),mnemonicTitle:a.localize(1102,"Go to &&References")},precondition:o.ContextKeyExpr.and(o.EditorContextKeys.hasReferenceProvider,ue.notInPeekEditor,o.EditorContextKeys.isInEmbeddedEditor.toNegated()),keybinding:{when:o.EditorContextKeys.editorTextFocus,primary:1094,weight:100},menu:[{id:o.MenuId.EditorContext,group:"navigation",order:1.45},{id:o.MenuId.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:5}]})}async _getLocationModel(e,t,i,n){return new ve(await No(e.referenceProvider,t,i,!0,!1,n),a.localize(1103,"References"))}}),o.registerAction2(class extends a_{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",title:a.localize2(1118,"Peek References"),precondition:o.ContextKeyExpr.and(o.EditorContextKeys.hasReferenceProvider,ue.notInPeekEditor,o.EditorContextKeys.isInEmbeddedEditor.toNegated()),menu:{id:o.MenuId.EditorContextPeek,group:"peek",order:6}})}async _getLocationModel(e,t,i,n){return new ve(await No(e.referenceProvider,t,i,!1,!1,n),a.localize(1104,"References"))}});class vw extends Et{constructor(e,t,i){super(e,{id:"editor.action.goToLocation",title:a.localize2(1119,"Go to Any Symbol"),precondition:o.ContextKeyExpr.and(ue.notInPeekEditor,o.EditorContextKeys.isInEmbeddedEditor.toNegated())}),this._references=t,this._gotoMultipleBehaviour=i}async _getLocationModel(e,t,i,n){return new ve(this._references,a.localize(1105,"Locations"))}_getNoResultFoundMessage(e){return e&&a.localize(1106,"No results for '{0}'",e.word)||""}_getGoToPreference(e){return this._gotoMultipleBehaviour??e.getOption(67).multipleReferences}_getAlternativeCommand(){}}o.CommandsRegistry.registerCommand({id:"editor.action.goToLocations",metadata:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:a.URI},{name:"position",description:"The position at which to start",constraint:a.Position.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto`"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:async(c,e,t,i,n,s,r)=>{a.assertType(a.URI.isUri(e)),a.assertType(a.Position.isIPosition(t)),a.assertType(Array.isArray(i)),a.assertType(typeof n>"u"||typeof n=="string"),a.assertType(typeof r>"u"||typeof r=="boolean");const l=c.get(o.ICodeEditorService),d=await l.openCodeEditor({resource:e},l.getFocusedCodeEditor());if(o.isCodeEditor(d))return d.setPosition(t),d.revealPositionInCenterIfOutsideViewport(t,0),d.invokeWithinContext(h=>{const u=new class extends vw{_getNoResultFoundMessage(g){return s||super._getNoResultFoundMessage(g)}}({muteMessage:!s,openInPeek:!!r,openToSide:!1},i,n);h.get(o.IInstantiationService).invokeFunction(u.run.bind(u),d)})}}),o.CommandsRegistry.registerCommand({id:"editor.action.peekLocations",metadata:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:a.URI},{name:"position",description:"The position at which to start",constraint:a.Position.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto`"}]},handler:async(c,e,t,i,n)=>{c.get(o.ICommandService).executeCommand("editor.action.goToLocations",e,t,i,n,void 0,!0)}}),o.CommandsRegistry.registerCommand({id:"editor.action.findReferences",handler:(c,e,t)=>{a.assertType(a.URI.isUri(e)),a.assertType(a.Position.isIPosition(t));const i=c.get(o.ILanguageFeaturesService),n=c.get(o.ICodeEditorService);return n.openCodeEditor({resource:e},n.getFocusedCodeEditor()).then(s=>{if(!o.isCodeEditor(s)||!s.hasModel())return;const r=Wi.get(s);if(!r)return;const l=a.createCancelablePromise(h=>No(i.referenceProvider,s.getModel(),a.Position.lift(t),!1,!1,h).then(u=>new ve(u,a.localize(1107,"References")))),d=new a.Range(t.lineNumber,t.column,t.lineNumber,t.column);return Promise.resolve(r.toggleWidget(d,l,!1))})}}),o.CommandsRegistry.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations");async function bw(c,e,t,i){const n=c.get(o.ITextModelService),s=c.get(o.IContextMenuService),r=c.get(o.ICommandService),l=c.get(o.IInstantiationService),d=c.get(o.INotificationService);if(await i.item.resolve(a.CancellationToken.None),!i.part.location)return;const h=i.part.location,u=[],g=new Set(o.MenuRegistry.getMenuItems(o.MenuId.EditorContext).map(f=>o.isIMenuItem(f)?f.command.id:o.generateUuid()));for(const f of Et.all())g.has(f.desc.id)&&u.push(new o.Action(f.desc.id,o.MenuItemAction.label(f.desc,{renderShortTitle:!0}),void 0,!0,async()=>{const m=await n.createModelReference(h.uri);try{const _=new fs(m.object.textEditorModel,a.Range.getStartPosition(h.range)),v=i.item.anchor.range;await l.invokeFunction(f.runEditorCommand.bind(f),e,_,v)}finally{m.dispose()}}));if(i.part.command){const{command:f}=i.part;u.push(new o.Separator),u.push(new o.Action(f.id,f.title,void 0,!0,async()=>{try{await r.executeCommand(f.id,...f.arguments??[])}catch(m){d.notify({severity:o.Severity.Error,source:i.item.provider.displayName,message:m})}}))}const p=e.getOption(144);s.showContextMenu({domForShadowRoot:p?e.getDomNode()??void 0:void 0,getAnchor:()=>{const f=o.getDomNodePagePosition(t);return{x:f.left,y:f.top+f.height+8}},getActions:()=>u,onHide:()=>{e.focus()},autoSelectFirstItem:!0})}async function l_(c,e,t,i){const s=await c.get(o.ITextModelService).createModelReference(i.uri);await t.invokeWithinContext(async r=>{const l=e.hasSideBySideModifier,d=r.get(o.IContextKeyService),h=ue.inPeekEditor.getValue(d),u=!l&&t.getOption(101)&&!h;return new Mo({openToSide:l,openInPeek:u,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(r,new fs(s.object.textEditorModel,a.Range.getStartPosition(i.range)),a.Range.lift(i.range))}),s.dispose()}var Cw=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ms=function(c,e){return function(t,i){e(t,i,c)}},_s;class Ta{constructor(){this._entries=new a.LRUCache(50)}get(e){const t=Ta._key(e);return this._entries.get(t)}set(e,t){const i=Ta._key(e);this._entries.set(i,t)}static _key(e){return`${e.uri.toString()}/${e.getVersionId()}`}}const c_=o.createDecorator("IInlayHintsCache");o.registerSingleton(c_,Ta,1);class zh{constructor(e,t){this.item=e,this.index=t}get part(){const e=this.item.hint.label;return typeof e=="string"?{label:e}:e[this.index]}}class Sw{constructor(e,t){this.part=e,this.hasTriggerModifier=t}}class yw{constructor(){this._store=new a.MutableDisposable,this._tokenSource=new a.CancellationTokenSource}dispose(){this._store.dispose(),this._tokenSource.dispose(!0)}reset(){return this._tokenSource.dispose(!0),this._tokenSource=new a.CancellationTokenSource,this._store.value=new a.DisposableStore,{store:this._store.value,token:this._tokenSource.token}}}let Po=(Vt=class{static get(e){return e.getContribution(_s.ID)??void 0}constructor(e,t,i,n,s,r,l){this._editor=e,this._languageFeaturesService=t,this._inlayHintsCache=n,this._commandService=s,this._notificationService=r,this._instaService=l,this._disposables=new a.DisposableStore,this._sessionDisposables=new a.DisposableStore,this._decorationsMetadata=new Map,this._activeRenderMode=0,this._ruleFactory=this._disposables.add(new o.DynamicCssRules(this._editor)),this._debounceInfo=i.for(t.inlayHintsProvider,"InlayHint",{min:25}),this._disposables.add(t.inlayHintsProvider.onDidChange(()=>this._update())),this._disposables.add(e.onDidChangeModel(()=>this._update())),this._disposables.add(e.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(e.onDidChangeConfiguration(d=>{d.hasChanged(159)&&this._update()})),this._update()}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){this._sessionDisposables.clear(),this._removeAllDecorations();const e=this._editor.getOption(159);if(e.enabled==="off")return;const t=this._editor.getModel();if(!t||!this._languageFeaturesService.inlayHintsProvider.has(t))return;if(e.enabled==="on")this._activeRenderMode=0;else{let h,u;e.enabled==="onUnlessPressed"?(h=0,u=1):(h=1,u=0),this._activeRenderMode=h,this._sessionDisposables.add(o.ModifierKeyEmitter.getInstance().event(g=>{if(!this._editor.hasModel())return;const p=g.altKey&&g.ctrlKey&&!(g.shiftKey||g.metaKey)?u:h;if(p!==this._activeRenderMode){this._activeRenderMode=p;const f=this._editor.getModel(),m=this._copyInlayHintsWithCurrentAnchor(f);this._updateHintsDecorators([f.getFullModelRange()],m),l.schedule(0)}}))}const i=this._inlayHintsCache.get(t);i&&this._updateHintsDecorators([t.getFullModelRange()],i),this._sessionDisposables.add(a.toDisposable(()=>{t.isDisposed()||this._cacheHintsForFastRestore(t)}));let n;const s=new Set;this._sessionDisposables.add(t.onWillDispose(()=>n?.cancel()));const r=this._sessionDisposables.add(new yw),l=new a.RunOnceScheduler(async()=>{const h=Date.now(),{store:u,token:g}=r.reset();try{const p=await Sa.create(this._languageFeaturesService.inlayHintsProvider,t,this._getHintsRanges(),g);if(l.delay=this._debounceInfo.update(t,Date.now()-h),g.isCancellationRequested){p.dispose();return}for(const f of p.provider)typeof f.onDidChangeInlayHints=="function"&&!s.has(f)&&(s.add(f),u.add(f.onDidChangeInlayHints(()=>{l.isScheduled()||l.schedule()})));u.add(p),u.add(a.toDisposable(()=>s.clear())),this._updateHintsDecorators(p.ranges,p.items),this._cacheHintsForFastRestore(t)}catch(p){a.onUnexpectedError(p)}},this._debounceInfo.get(t));this._sessionDisposables.add(l),l.schedule(0),this._sessionDisposables.add(this._editor.onDidScrollChange(h=>{(h.scrollTopChanged||!l.isScheduled())&&l.schedule()}));const d=this._sessionDisposables.add(new a.MutableDisposable);this._sessionDisposables.add(this._editor.onDidChangeModelContent(h=>{const u=Math.max(l.delay,800);this._cursorInfo={position:this._editor.getPosition(),notEarlierThan:Date.now()+u},d.value=a.disposableTimeout(()=>l.schedule(0),u),l.schedule()})),this._sessionDisposables.add(this._editor.onDidChangeConfiguration(h=>{h.hasChanged(159)&&l.schedule()})),this._sessionDisposables.add(this._installDblClickGesture(()=>l.schedule(0))),this._sessionDisposables.add(this._installLinkGesture()),this._sessionDisposables.add(this._installContextMenu())}_installLinkGesture(){const e=new a.DisposableStore,t=e.add(new Ca(this._editor)),i=new a.DisposableStore;return e.add(i),e.add(t.onMouseMoveOrRelevantKeyDown(n=>{const[s]=n,r=this._getInlayHintLabelPart(s),l=this._editor.getModel();if(!r||!l){i.clear();return}const d=new a.CancellationTokenSource;i.add(a.toDisposable(()=>d.dispose(!0))),r.item.resolve(d.token),this._activeInlayHintPart=r.part.command||r.part.location?new Sw(r,s.hasTriggerModifier):void 0;const h=l.validatePosition(r.item.hint.position).lineNumber,u=new a.Range(h,1,h,l.getLineMaxColumn(h)),g=this._getInlineHintsForRange(u);this._updateHintsDecorators([u],g),i.add(a.toDisposable(()=>{this._activeInlayHintPart=void 0,this._updateHintsDecorators([u],g)}))})),e.add(t.onCancel(()=>i.clear())),e.add(t.onExecute(async n=>{const s=this._getInlayHintLabelPart(n);if(s){const r=s.part;r.location?this._instaService.invokeFunction(l_,n,this._editor,r.location):a.Command.is(r.command)&&await this._invokeCommand(r.command,s.item)}})),e}_getInlineHintsForRange(e){const t=new Set;for(const i of this._decorationsMetadata.values())e.containsRange(i.item.anchor.range)&&t.add(i.item);return Array.from(t)}_installDblClickGesture(e){return this._editor.onMouseUp(async t=>{if(t.event.detail!==2)return;const i=this._getInlayHintLabelPart(t);if(i&&(t.event.preventDefault(),await i.item.resolve(a.CancellationToken.None),a.isNonEmptyArray(i.item.hint.textEdits))){const n=i.item.hint.textEdits.map(s=>o.EditOperation.replace(a.Range.lift(s.range),s.text));this._editor.executeEdits("inlayHint.default",n),e()}})}_installContextMenu(){return this._editor.onContextMenu(async e=>{if(!o.isHTMLElement(e.event.target))return;const t=this._getInlayHintLabelPart(e);t&&await this._instaService.invokeFunction(bw,this._editor,e.event.target,t)})}_getInlayHintLabelPart(e){if(e.target.type!==6)return;const t=e.target.detail.injectedText?.options;if(t instanceof o.ModelDecorationInjectedTextOptions&&t?.attachedData instanceof zh)return t.attachedData}async _invokeCommand(e,t){try{await this._commandService.executeCommand(e.id,...e.arguments??[])}catch(i){this._notificationService.notify({severity:o.Severity.Error,source:t.provider.displayName,message:i})}}_cacheHintsForFastRestore(e){const t=this._copyInlayHintsWithCurrentAnchor(e);this._inlayHintsCache.set(e,t)}_copyInlayHintsWithCurrentAnchor(e){const t=new Map;for(const[i,n]of this._decorationsMetadata){if(t.has(n.item))continue;const s=e.getDecorationRange(i);if(s){const r=new Xm(s,n.item.anchor.direction),l=n.item.with({anchor:r});t.set(n.item,l)}}return Array.from(t.values())}_getHintsRanges(){const t=this._editor.getModel(),i=this._editor.getVisibleRangesPlusViewportAboveBelow(),n=[];for(const s of i.sort(a.Range.compareRangesUsingStarts)){const r=t.validateRange(new a.Range(s.startLineNumber-30,s.startColumn,s.endLineNumber+30,s.endColumn));n.length===0||!a.Range.areIntersectingOrTouching(n[n.length-1],r)?n.push(r):n[n.length-1]=a.Range.plusRange(n[n.length-1],r)}return n}_updateHintsDecorators(e,t){const i=new Map;if(this._cursorInfo&&this._cursorInfo.notEarlierThan>Date.now()&&e.some(v=>v.containsPosition(this._cursorInfo.position))){const{position:v}=this._cursorInfo;this._cursorInfo=void 0;const b=new Map;for(const C of this._editor.getLineDecorations(v.lineNumber)??[]){const y=this._decorationsMetadata.get(C.id);if(C.range.startColumn>v.column)continue;const x=y?.decoration.options[y.item.anchor.direction];if(x&&x.attachedData!==_s._whitespaceData){const L=b.get(y.item)??0;b.set(y.item,L+x.content.length)}}const S=t.filter(C=>C.anchor.range.startLineNumber===v.lineNumber&&C.anchor.range.endColumn<=v.column),w=Array.from(b.values());let I;for(;;){const C=S.shift(),y=w.shift();if(!y&&!C)break;if(C)i.set(C,y??0),I=C;else if(I&&y){let x=i.get(I);x+=y,x+=w.reduce((L,E)=>L+E,0),w.length=0;break}}}const n=[],s=(v,b,S,w,I)=>{const C={content:S,inlineClassNameAffectsLetterSpacing:!0,inlineClassName:b.className,cursorStops:w,attachedData:I};n.push({item:v,classNameRef:b,decoration:{range:v.anchor.range,options:{description:"InlayHint",showIfCollapsed:v.anchor.range.isEmpty(),collapseOnReplaceEdit:!v.anchor.range.isEmpty(),stickiness:0,[v.anchor.direction]:this._activeRenderMode===0?C:void 0}}})},r=(v,b)=>{const S=this._ruleFactory.createClassNameRef({width:`${l/3|0}px`,display:"inline-block"});s(v,S," ",b?a.InjectedTextCursorStops.Right:a.InjectedTextCursorStops.None,_s._whitespaceData)},{fontSize:l,fontFamily:d,padding:h,isUniform:u}=this._getLayoutInfo(),g=this._editor.getOption(159).maximumLength,p="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(p,d);let f={line:0,totalLen:0};for(let v=0;vg)continue;b.hint.paddingLeft&&r(b,!1);const S=typeof b.hint.label=="string"?[{label:b.hint.label}]:b.hint.label,w=i.get(b);let I=0;for(let C=0;C0&&(R=R.slice(0,-T)+"…",D=!0),I+=R.length,w!==void 0){const M=I-w;M>=0&&(I-=M,R=R.slice(0,-(1+M))+"…",D=!0)}if(h&&(x&&(L||D)?(E.padding=`1px ${Math.max(1,l/4)|0}px`,E.borderRadius=`${l/4|0}px`):x?(E.padding=`1px 0 1px ${Math.max(1,l/4)|0}px`,E.borderRadius=`${l/4|0}px 0 0 ${l/4|0}px`):L||D?(E.padding=`1px ${Math.max(1,l/4)|0}px 1px 0`,E.borderRadius=`0 ${l/4|0}px ${l/4|0}px 0`):E.padding="1px 0 1px 0"),s(b,this._ruleFactory.createClassNameRef(E),ww(R),L&&!b.hint.paddingRight?a.InjectedTextCursorStops.Right:a.InjectedTextCursorStops.None,new zh(b,C)),D)break}if(w!==void 0&&I_s._MAX_DECORATORS)break}const m=[];for(const[v,b]of this._decorationsMetadata){const S=this._editor.getModel()?.getDecorationRange(v);S&&e.some(w=>w.containsRange(S))&&(m.push(v),b.classNameRef.dispose(),this._decorationsMetadata.delete(v))}const _=o.StableEditorScrollState.capture(this._editor);this._editor.changeDecorations(v=>{const b=v.deltaDecorations(m,n.map(S=>S.decoration));for(let S=0;Si)&&(s=i);const r=e.fontFamily||n;return{fontSize:s,fontFamily:r,padding:t,isUniform:!t&&r===n&&s===i}}_removeAllDecorations(){this._editor.removeDecorations(Array.from(this._decorationsMetadata.keys()));for(const e of this._decorationsMetadata.values())e.classNameRef.dispose();this._decorationsMetadata.clear()}},_s=Vt,Vt.ID="editor.contrib.InlayHints",Vt._MAX_DECORATORS=1500,Vt._whitespaceData={},Vt);Po=_s=Cw([ms(1,o.ILanguageFeaturesService),ms(2,o.ILanguageFeatureDebounceService),ms(3,c_),ms(4,o.ICommandService),ms(5,o.INotificationService),ms(6,o.IInstantiationService)],Po);function ww(c){return c.replace(/[ \t]/g," ")}o.CommandsRegistry.registerCommand("_executeInlayHintProvider",async(c,...e)=>{const[t,i]=e;a.assertType(a.URI.isUri(t)),a.assertType(a.Range.isIRange(i));const{inlayHintsProvider:n}=c.get(o.ILanguageFeaturesService),s=await c.get(o.ITextModelService).createModelReference(t);try{const r=await Sa.create(n,s.object.textEditorModel,[a.Range.lift(i)],a.CancellationToken.None),l=r.items.map(d=>d.hint);return setTimeout(()=>r.dispose(),0),l}finally{s.dispose()}});var Iw=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},en=function(c,e){return function(t,i){e(t,i,c)}};class d_ extends Co{constructor(e,t,i,n){super(10,t,e.item.anchor.range,i,n,!0),this.part=e}}let Na=class extends xo{constructor(e,t,i,n,s,r,l,d){super(e,t,s,l,i,n,d),this._resolverService=r,this.hoverOrdinal=6}suggestHoverAnchor(e){if(!Po.get(this._editor)||e.target.type!==6)return null;const i=e.target.detail.injectedText?.options;return i instanceof o.ModelDecorationInjectedTextOptions&&i.attachedData instanceof zh?new d_(i.attachedData,this,e.event.posx,e.event.posy):null}computeSync(){return[]}computeAsync(e,t,i,n){return e instanceof d_?new a.AsyncIterableProducer(async s=>{const{part:r}=e;if(await r.item.resolve(n),n.isCancellationRequested)return;let l;typeof r.item.hint.tooltip=="string"?l=new o.MarkdownString().appendText(r.item.hint.tooltip):r.item.hint.tooltip&&(l=r.item.hint.tooltip),l&&s.emitOne(new Ae(this,e.range,[l],!1,0)),a.isNonEmptyArray(r.item.hint.textEdits)&&s.emitOne(new Ae(this,e.range,[new o.MarkdownString().appendText(a.localize(1205,"Double-click to insert"))],!1,10001));let d;if(typeof r.part.tooltip=="string"?d=new o.MarkdownString().appendText(r.part.tooltip):r.part.tooltip&&(d=r.part.tooltip),d&&s.emitOne(new Ae(this,e.range,[d],!1,1)),r.part.location||r.part.command){let u;const p=this._editor.getOption(86)==="altKey"?a.isMacintosh?a.localize(1206,"cmd + click"):a.localize(1207,"ctrl + click"):a.isMacintosh?a.localize(1208,"option + click"):a.localize(1209,"alt + click");r.part.location&&r.part.command?u=new o.MarkdownString().appendText(a.localize(1210,"Go to Definition ({0}), right click for more",p)):r.part.location?u=new o.MarkdownString().appendText(a.localize(1211,"Go to Definition ({0})",p)):r.part.command&&(u=new o.MarkdownString(`[${a.localize(1212,"Execute Command")}](${Hy(r.part.command)} "${r.part.command.title}") (${p})`,{isTrusted:!0})),u&&s.emitOne(new Ae(this,e.range,[u],!1,1e4))}const h=this._resolveInlayHintLabelPartHover(r,n);for await(const u of h)s.emitOne(u)}):a.AsyncIterableProducer.EMPTY}async*_resolveInlayHintLabelPartHover(e,t){if(!e.part.location)return;const{uri:i,range:n}=e.part.location,s=await this._resolverService.createModelReference(i);try{const r=s.object.textEditorModel;if(!this._languageFeaturesService.hoverProvider.has(r))return;for await(const l of _h(this._languageFeaturesService.hoverProvider,r,new a.Position(n.startLineNumber,n.startColumn),t))o.isEmptyMarkdownString(l.hover.contents)||(yield new Ae(this,e.item.anchor.range,l.hover.contents,!1,2+l.ordinal))}finally{s.dispose()}}};Na=Iw([en(1,o.IMarkdownRendererService),en(2,o.IKeybindingService),en(3,o.IHoverService),en(4,o.IConfigurationService),en(5,o.ITextModelService),en(6,o.ILanguageFeaturesService),en(7,o.ICommandService)],Na);var h_=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},vs=function(c,e){return function(t,i){e(t,i,c)}},Vh,Bh;let Kh=Vh=class extends a.Disposable{constructor(e,t,i,n,s,r,l){super();const d=t.hoverParts;this._renderedHoverParts=this._register(new Uh(e,i,d,n,s,r,l));const h=t.options,u=h.anchor,{showAtPosition:g,showAtSecondaryPosition:p}=Vh.computeHoverPositions(e,u.range,d);this.shouldAppearBeforeContent=d.some(f=>f.isBeforeContent),this.showAtPosition=g,this.showAtSecondaryPosition=p,this.initialMousePosX=u.initialMousePosX,this.initialMousePosY=u.initialMousePosY,this.shouldFocus=h.shouldFocus,this.source=h.source}get domNode(){return this._renderedHoverParts.domNode}get domNodeHasChildren(){return this._renderedHoverParts.domNodeHasChildren}get focusedHoverPartIndex(){return this._renderedHoverParts.focusedHoverPartIndex}get hoverPartsCount(){return this._renderedHoverParts.hoverPartsCount}focusHoverPartWithIndex(e){this._renderedHoverParts.focusHoverPartWithIndex(e)}async updateHoverVerbosityLevel(e,t,i){this._renderedHoverParts.updateHoverVerbosityLevel(e,t,i)}isColorPickerVisible(){return this._renderedHoverParts.isColorPickerVisible()}static computeHoverPositions(e,t,i){let n=1;if(e.hasModel()){const u=e._getViewModel(),g=u.coordinatesConverter,p=g.convertModelRangeToViewRange(t),f=u.getLineMinColumn(p.startLineNumber),m=new a.Position(p.startLineNumber,f);n=g.convertViewPositionToModelPosition(m).column}const s=t.startLineNumber;let r=t.startColumn,l;for(const u of i){const g=u.range,p=g.startLineNumber===s,f=g.endLineNumber===s;if(p&&f){const _=g.startColumn,v=Math.min(r,_);r=Math.max(v,n)}u.forceShowAtRange&&(l=g)}let d,h;if(l){const u=l.getStartPosition();d=u,h=u}else d=t.getStartPosition(),h=new a.Position(s,r);return{showAtPosition:d,showAtSecondaryPosition:h}}};Kh=Vh=h_([vs(4,o.IKeybindingService),vs(5,o.IHoverService),vs(6,o.IClipboardService)],Kh);class xw{constructor(e,t){this._statusBar=t,e.appendChild(this._statusBar.hoverElement)}get hoverElement(){return this._statusBar.hoverElement}get actions(){return this._statusBar.actions}dispose(){this._statusBar.dispose()}}let Uh=(xn=class extends a.Disposable{constructor(e,t,i,n,s,r,l){super(),this._hoverService=r,this._clipboardService=l,this._renderedParts=[],this._focusedHoverPartIndex=-1,this._context=n,this._fragment=document.createDocumentFragment(),this._register(this._renderParts(t,i,n,s,this._hoverService)),this._register(this._registerListenersOnRenderedParts()),this._register(this._createEditorDecorations(e,i)),this._updateMarkdownAndColorParticipantInfo(t)}_createEditorDecorations(e,t){if(t.length===0)return a.Disposable.None;let i=t[0].range;for(const s of t){const r=s.range;i=a.Range.plusRange(i,r)}const n=e.createDecorationsCollection();return n.set([{range:i,options:Bh._DECORATION_OPTIONS}]),a.toDisposable(()=>{n.clear()})}_renderParts(e,t,i,n,s){const r=new ra(n,s),l={fragment:this._fragment,statusBar:r,...i},d=new a.DisposableStore;d.add(r);for(const u of e){const g=this._renderHoverPartsForParticipant(t,u,l);d.add(g);for(const p of g.renderedHoverParts)this._renderedParts.push({type:"hoverPart",participant:u,hoverPart:p.hoverPart,hoverElement:p.hoverElement})}const h=this._renderStatusBar(this._fragment,r);return h&&(d.add(h),this._renderedParts.push({type:"statusBar",hoverElement:h.hoverElement,actions:h.actions})),d}_renderHoverPartsForParticipant(e,t,i){const n=e.filter(r=>r.owner===t);return n.length>0?t.renderHoverParts(i,n):new qi([])}_renderStatusBar(e,t){if(t.hasContent)return new xw(e,t)}_registerListenersOnRenderedParts(){const e=new a.DisposableStore;return this._renderedParts.forEach((t,i)=>{const n=t.hoverElement;n.tabIndex=0,e.add(o.addDisposableListener(n,o.EventType.FOCUS_IN,s=>{s.stopPropagation(),this._focusedHoverPartIndex=i})),e.add(o.addDisposableListener(n,o.EventType.FOCUS_OUT,s=>{s.stopPropagation(),this._focusedHoverPartIndex=-1})),t.type==="hoverPart"&&!t.participant.hideCopyButton&&e.add(new mh(n,()=>t.participant.getAccessibleContent(t.hoverPart),this._clipboardService,this._hoverService))}),e}_updateMarkdownAndColorParticipantInfo(e){const t=e.find(i=>i instanceof xo&&!(i instanceof Na));t&&(this._markdownHoverParticipant=t),this._colorHoverParticipant=e.find(i=>i instanceof va)}focusHoverPartWithIndex(e){e<0||e>=this._renderedParts.length||this._renderedParts[e].hoverElement.focus()}async updateHoverVerbosityLevel(e,t,i){if(!this._markdownHoverParticipant)return;let n;t>=0?n={start:t,endExclusive:t+1}:n=this._findRangeOfMarkdownHoverParts(this._markdownHoverParticipant);for(let s=n.start;s=0?this.focusHoverPartWithIndex(t):this._context.focus()),this._context.onContentsChanged()}isColorPickerVisible(){return this._colorHoverParticipant?.isColorPickerVisible()??!1}_normalizedIndexToMarkdownHoverIndexRange(e,t){const i=this._renderedParts[t];if(!i||i.type!=="hoverPart"||!(i.participant===e))return;const s=this._renderedParts.findIndex(r=>r.type==="hoverPart"&&r.participant===e);if(s===-1)throw new a.BugIndicatingError;return t-s}_findRangeOfMarkdownHoverParts(e){const t=this._renderedParts.slice(),i=t.findIndex(r=>r.type==="hoverPart"&&r.participant===e),n=t.reverse().findIndex(r=>r.type==="hoverPart"&&r.participant===e),s=n>=0?t.length-n:n;return{start:i,endExclusive:s+1}}get domNode(){return this._fragment}get domNodeHasChildren(){return this._fragment.hasChildNodes()}get focusedHoverPartIndex(){return this._focusedHoverPartIndex}get hoverPartsCount(){return this._renderedParts.length}},Bh=xn,xn._DECORATION_OPTIONS=o.ModelDecorationOptions.register({description:"content-hover-highlight",className:"hoverHighlight"}),xn);Uh=Bh=h_([vs(4,o.IKeybindingService),vs(5,o.IHoverService),vs(6,o.IClipboardService)],Uh);var Ew=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ma=function(c,e){return function(t,i){e(t,i,c)}};let kh=class extends a.Disposable{constructor(e,t,i,n,s){super(),this._editor=e,this._instantiationService=t,this._keybindingService=i,this._hoverService=n,this._clipboardService=s,this._currentResult=null,this._renderedContentHover=this._register(new a.MutableDisposable),this._onContentsChanged=this._register(new a.Emitter),this.onContentsChanged=this._onContentsChanged.event,this._contentHoverWidget=this._register(this._instantiationService.createInstance(oh,this._editor)),this._participants=this._initializeHoverParticipants(),this._hoverOperation=this._register(new mm(this._editor,new oa(this._editor,this._participants))),this._registerListeners()}_initializeHoverParticipants(){const e=[];for(const t of Gi.getAll()){const i=this._instantiationService.createInstance(t,this._editor);e.push(i)}return e.sort((t,i)=>t.hoverOrdinal-i.hoverOrdinal),this._register(this._contentHoverWidget.onDidResize(()=>{this._participants.forEach(t=>t.handleResize?.())})),this._register(this._contentHoverWidget.onDidScroll(t=>{this._participants.forEach(i=>i.handleScroll?.(t))})),this._register(this._contentHoverWidget.onContentsChanged(()=>{this._participants.forEach(t=>t.handleContentsChanged?.())})),e}_registerListeners(){this._register(this._hoverOperation.onResult(t=>{const i=t.hasLoadingMessage?this._addLoadingMessage(t):t.value;this._withResult(new bm(i,t.isComplete,t.options))}));const e=this._contentHoverWidget.getDomNode();this._register(o.addStandardDisposableListener(e,"keydown",t=>{t.equals(9)&&this.hide()})),this._register(o.addStandardDisposableListener(e,"mouseleave",t=>{this._onMouseLeave(t)})),this._register(a.TokenizationRegistry.onDidChange(()=>{this._contentHoverWidget.position&&this._currentResult&&this._setCurrentResult(this._currentResult)})),this._register(this._contentHoverWidget.onContentsChanged(()=>{this._onContentsChanged.fire()}))}_startShowingOrUpdateHover(e,t,i,n,s){if(!(this._contentHoverWidget.position&&this._currentResult))return e?(this._startHoverOperationIfNecessary(e,t,i,n,!1),!0):!1;const l=this._editor.getOption(69).sticky,d=s&&this._contentHoverWidget.isMouseGettingCloser(s.event.posx,s.event.posy);return l&&d?(e&&this._startHoverOperationIfNecessary(e,t,i,n,!0),!0):e?this._currentResult&&this._currentResult.options.anchor.equals(e)?!0:this._currentResult&&e.canAdoptVisibleHover(this._currentResult.options.anchor,this._contentHoverWidget.position)?(this._currentResult&&this._setCurrentResult(this._currentResult.filter(e)),this._startHoverOperationIfNecessary(e,t,i,n,!1),!0):(this._setCurrentResult(null),this._startHoverOperationIfNecessary(e,t,i,n,!1),!0):(this._setCurrentResult(null),!1)}_startHoverOperationIfNecessary(e,t,i,n,s){if(this._hoverOperation.options&&this._hoverOperation.options.anchor.equals(e))return;this._hoverOperation.cancel();const l={anchor:e,source:i,shouldFocus:n,insistOnKeepingHoverVisible:s};this._hoverOperation.start(t,l)}_setCurrentResult(e){let t=e;if(this._currentResult===t)return;t&&t.hoverParts.length===0&&(t=null),this._currentResult=t,this._currentResult?this._showHover(this._currentResult):this._hideHover()}_addLoadingMessage(e){for(const t of this._participants){if(!t.createLoadingMessage)continue;const i=t.createLoadingMessage(e.options.anchor);if(i)return e.value.slice(0).concat([i])}return e.value}_withResult(e){if(this._contentHoverWidget.position&&this._currentResult&&this._currentResult.isComplete||this._setCurrentResult(e),!e.isComplete)return;const n=e.hoverParts.length===0,s=e.options.insistOnKeepingHoverVisible;n&&s||this._setCurrentResult(e)}_showHover(e){const t=this._getHoverContext();this._renderedContentHover.value=new Kh(this._editor,e,this._participants,t,this._keybindingService,this._hoverService,this._clipboardService),this._renderedContentHover.value.domNodeHasChildren?this._contentHoverWidget.show(this._renderedContentHover.value):this._renderedContentHover.clear()}_hideHover(){this._contentHoverWidget.hide(),this._participants.forEach(e=>e.handleHide?.())}_getHoverContext(){return{hide:()=>{this.hide()},onContentsChanged:()=>{this._contentHoverWidget.handleContentsChanged()},setMinimumDimensions:s=>{this._contentHoverWidget.setMinimumDimensions(s)},focus:()=>this.focus()}}showsOrWillShow(e){if(this._contentHoverWidget.isResizing)return!0;const i=this._findHoverAnchorCandidates(e);if(!(i.length>0))return this._startShowingOrUpdateHover(null,0,0,!1,e);const s=i[0];return this._startShowingOrUpdateHover(s,0,0,!1,e)}_findHoverAnchorCandidates(e){const t=[];for(const n of this._participants){if(!n.suggestHoverAnchor)continue;const s=n.suggestHoverAnchor(e);s&&t.push(s)}const i=e.target;switch(i.type){case 6:{t.push(new qd(0,i.range,e.event.posx,e.event.posy));break}case 7:{const n=this._editor.getOption(59).typicalHalfwidthCharacterWidth/2;if(!(!i.detail.isAfterLines&&typeof i.detail.horizontalDistanceToText=="number"&&i.detail.horizontalDistanceToTexts.priority-n.priority),t}_onMouseLeave(e){const t=this._editor.getDomNode();(!t||!na(t,e.x,e.y))&&this.hide()}startShowingAtRange(e,t,i,n){this._startShowingOrUpdateHover(new qd(0,e,void 0,void 0),t,i,n,null)}async updateHoverVerbosityLevel(e,t,i){this._renderedContentHover.value?.updateHoverVerbosityLevel(e,t,i)}focusedHoverPartIndex(){return this._renderedContentHover.value?.focusedHoverPartIndex??-1}containsNode(e){return e?this._contentHoverWidget.getDomNode().contains(e):!1}focus(){if(this._renderedContentHover.value?.hoverPartsCount===1){this.focusHoverPartWithIndex(0);return}this._contentHoverWidget.focus()}focusHoverPartWithIndex(e){this._renderedContentHover.value?.focusHoverPartWithIndex(e)}scrollUp(){this._contentHoverWidget.scrollUp()}scrollDown(){this._contentHoverWidget.scrollDown()}scrollLeft(){this._contentHoverWidget.scrollLeft()}scrollRight(){this._contentHoverWidget.scrollRight()}pageUp(){this._contentHoverWidget.pageUp()}pageDown(){this._contentHoverWidget.pageDown()}goToTop(){this._contentHoverWidget.goToTop()}goToBottom(){this._contentHoverWidget.goToBottom()}hide(){this._hoverOperation.cancel(),this._setCurrentResult(null)}getDomNode(){return this._contentHoverWidget.getDomNode()}get isColorPickerVisible(){return this._renderedContentHover.value?.isColorPickerVisible()??!1}get isVisibleFromKeyboard(){return this._contentHoverWidget.isVisibleFromKeyboard}get isVisible(){return this._contentHoverWidget.isVisible}get isFocused(){return this._contentHoverWidget.isFocused}get isResizing(){return this._contentHoverWidget.isResizing}get widget(){return this._contentHoverWidget}};kh=Ew([Ma(1,o.IInstantiationService),Ma(2,o.IKeybindingService),Ma(3,o.IHoverService),Ma(4,o.IClipboardService)],kh);function u_(c){const e=c.target;return!!e&&e.type===6&&e.detail.injectedText?.options.attachedData===lm}var Lw=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},jh=function(c,e){return function(t,i){e(t,i,c)}},$h;let ne=(En=class extends a.Disposable{constructor(e,t,i,n){super(),this._editor=e,this._instantiationService=i,this._keybindingService=n,this._onHoverContentsChanged=this._register(new a.Emitter),this.shouldKeepOpenOnEditorMouseMoveOrLeave=!1,this._listenersStore=new a.DisposableStore,this._isMouseDown=!1,this._ignoreMouseEvents=!1,this._reactToEditorMouseMoveRunner=this._register(new a.RunOnceScheduler(()=>{this._mouseMoveEvent&&this._reactToEditorMouseMove(this._mouseMoveEvent)},0)),this._register(t.onDidShowContextMenu(()=>{this.hideContentHover(),this._ignoreMouseEvents=!0})),this._register(t.onDidHideContextMenu(()=>{this._ignoreMouseEvents=!1})),this._hookListeners(),this._register(this._editor.onDidChangeConfiguration(s=>{s.hasChanged(69)&&(this._unhookListeners(),this._hookListeners())}))}static get(e){return e.getContribution($h.ID)}_hookListeners(){const e=this._editor.getOption(69);this._hoverSettings={enabled:e.enabled,sticky:e.sticky,hidingDelay:e.hidingDelay},e.enabled==="off"&&this._cancelSchedulerAndHide(),this._listenersStore.add(this._editor.onMouseDown(t=>this._onEditorMouseDown(t))),this._listenersStore.add(this._editor.onMouseUp(()=>this._onEditorMouseUp())),this._listenersStore.add(this._editor.onMouseMove(t=>this._onEditorMouseMove(t))),this._listenersStore.add(this._editor.onKeyDown(t=>this._onKeyDown(t))),this._listenersStore.add(this._editor.onMouseLeave(t=>this._onEditorMouseLeave(t))),this._listenersStore.add(this._editor.onDidChangeModel(()=>this._cancelSchedulerAndHide())),this._listenersStore.add(this._editor.onDidChangeModelContent(()=>this._cancelScheduler())),this._listenersStore.add(this._editor.onDidScrollChange(t=>this._onEditorScrollChanged(t)))}_unhookListeners(){this._listenersStore.clear()}_cancelSchedulerAndHide(){this._cancelScheduler(),this.hideContentHover()}_cancelScheduler(){this._mouseMoveEvent=void 0,this._reactToEditorMouseMoveRunner.cancel()}_onEditorScrollChanged(e){this._ignoreMouseEvents||(e.scrollTopChanged||e.scrollLeftChanged)&&this.hideContentHover()}_onEditorMouseDown(e){this._ignoreMouseEvents||(this._isMouseDown=!0,this._shouldKeepHoverWidgetVisible(e))||this.hideContentHover()}_shouldKeepHoverWidgetVisible(e){return this._isMouseOnContentHoverWidget(e)||this._isContentWidgetResizing()||u_(e)}_isMouseOnContentHoverWidget(e){return this._contentWidget?na(this._contentWidget.getDomNode(),e.event.posx,e.event.posy):!1}_onEditorMouseUp(){this._ignoreMouseEvents||(this._isMouseDown=!1)}_onEditorMouseLeave(e){this._ignoreMouseEvents||this.shouldKeepOpenOnEditorMouseMoveOrLeave||(this._cancelScheduler(),this._shouldKeepHoverWidgetVisible(e))||this.hideContentHover()}_shouldKeepCurrentHover(e){const t=this._contentWidget;if(!t)return!1;const i=this._hoverSettings.sticky,n=(u,g)=>{const p=this._isMouseOnContentHoverWidget(u);return g&&p},s=u=>{const g=t.isColorPickerVisible,p=this._isMouseOnContentHoverWidget(u),f=g&&p,m=g&&this._isMouseDown;return f||m},r=(u,g)=>{const p=u.event.browserEvent.view;return p?g&&t.containsNode(p.document.activeElement)&&!p.getSelection()?.isCollapsed:!1},l=t.isFocused,d=t.isResizing,h=this._hoverSettings.sticky&&t.isVisibleFromKeyboard;return this.shouldKeepOpenOnEditorMouseMoveOrLeave||l||d||h||n(e,i)||s(e)||r(e,i)}_onEditorMouseMove(e){if(this._ignoreMouseEvents)return;if(this._mouseMoveEvent=e,this._shouldKeepCurrentHover(e)){this._reactToEditorMouseMoveRunner.cancel();return}if(this._shouldRescheduleHoverComputation()){this._reactToEditorMouseMoveRunner.isScheduled()||this._reactToEditorMouseMoveRunner.schedule(this._hoverSettings.hidingDelay);return}this._reactToEditorMouseMove(e)}_shouldRescheduleHoverComputation(){const e=this._hoverSettings.hidingDelay;return(this._contentWidget?.isVisible??!1)&&this._hoverSettings.sticky&&e>0}_reactToEditorMouseMove(e){fm(this._hoverSettings.enabled,this._editor.getOption(86),e)&&this._getOrCreateContentWidget().showsOrWillShow(e)||this.hideContentHover()}_onKeyDown(e){if(this._ignoreMouseEvents||!this._contentWidget)return;if(this._hoverSettings.enabled==="onKeyboardModifier"&&ih(this._editor.getOption(86),e)&&this._mouseMoveEvent){this._contentWidget.isVisible||this._contentWidget.showsOrWillShow(this._mouseMoveEvent);return}const t=this._isPotentialKeyboardShortcut(e),i=a.isModifierKey(e.keyCode);t||i||this._contentWidget.isFocused&&e.keyCode===2||this.hideContentHover()}_isPotentialKeyboardShortcut(e){if(!this._editor.hasModel()||!this._contentWidget)return!1;const t=this._keybindingService.softDispatch(e,this._editor.getDomNode()),i=t.kind===1,n=t.kind===2&&(t.commandId===cm||t.commandId===Hr||t.commandId===ea)&&this._contentWidget.isVisible;return i||n}hideContentHover(){ds.dropDownVisible||this._contentWidget?.hide()}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(kh,this._editor),this._listenersStore.add(this._contentWidget.onContentsChanged(()=>this._onHoverContentsChanged.fire()))),this._contentWidget}showContentHover(e,t,i,n){this._getOrCreateContentWidget().startShowingAtRange(e,t,i,n)}_isContentWidgetResizing(){return this._contentWidget?.widget.isResizing||!1}focusedHoverPartIndex(){return this._getOrCreateContentWidget().focusedHoverPartIndex()}updateHoverVerbosityLevel(e,t,i){this._getOrCreateContentWidget().updateHoverVerbosityLevel(e,t,i)}focus(){this._contentWidget?.focus()}scrollUp(){this._contentWidget?.scrollUp()}scrollDown(){this._contentWidget?.scrollDown()}scrollLeft(){this._contentWidget?.scrollLeft()}scrollRight(){this._contentWidget?.scrollRight()}pageUp(){this._contentWidget?.pageUp()}pageDown(){this._contentWidget?.pageDown()}goToTop(){this._contentWidget?.goToTop()}goToBottom(){this._contentWidget?.goToBottom()}get isColorPickerVisible(){return this._contentWidget?.isColorPickerVisible}get isHoverVisible(){return this._contentWidget?.isVisible}dispose(){super.dispose(),this._unhookListeners(),this._listenersStore.dispose(),this._contentWidget?.dispose()}},$h=En,En.ID="editor.contrib.contentHover",En);ne=$h=Lw([jh(1,o.IContextMenuService),jh(2,o.IInstantiationService),jh(3,o.IKeybindingService)],ne);const df=class df extends a.Disposable{constructor(e){super(),this._editor=e,this._register(e.onMouseDown(t=>this.onMouseDown(t)))}dispose(){super.dispose()}onMouseDown(e){const t=this._editor.getOption(168);if(t!=="click"&&t!=="clickAndHover"||!u_(e))return;const i=this._editor.getContribution(ne.ID);if(!i||i.isColorPickerVisible)return;const n=e.target.range;if(!n)return;const s=new a.Range(n.startLineNumber,n.startColumn+1,n.endLineNumber,n.endColumn+1);i.showContentHover(s,1,1,!1)}};df.ID="editor.contrib.colorContribution";let Pa=df;var Dw=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Rw=function(c,e){return function(t,i){e(t,i,c)}};class qh{constructor(e,t,i,n){this.owner=e,this.range=t,this.model=i,this.provider=n}static fromBaseColor(e,t){return new qh(e,t.range,t.model,t.provider)}}class Tw extends a.Disposable{constructor(e,t,i,n){super();const s=e.getModel(),r=i.model;this.color=i.model.color,this.colorPicker=this._register(new jm(t.fragment,r,e.getOption(163),n,"standalone")),this._register(r.onColorFlushed(l=>{this.color=l})),this._register(r.onDidChangeColor(l=>{Lo(s,r,l,i.range,i)})),this._register(e.onDidChangeModelContent(l=>{t.hide(),e.focus()})),Lo(s,r,this.color,i.range,i)}}let Gh=class{constructor(e,t){this._editor=e,this._themeService=t}async createColorHover(e,t,i){if(!this._editor.hasModel()||!ls.get(this._editor))return null;const s=await om(i,this._editor.getModel(),a.CancellationToken.None);let r=null,l=null;for(const p of s){const f=p.colorInfo;a.Range.containsRange(f.range,e.range)&&(r=f,l=p.provider)}const d=r??e,h=l??t,u=!!r;return{colorHover:qh.fromBaseColor(this,await $m(this._editor.getModel(),d,h)),foundInEditor:u}}async updateEditorModel(e){if(!this._editor.hasModel())return;const t=e.model;let i=new a.Range(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn);this._color&&(await Lo(this._editor.getModel(),t,this._color,i,e),i=qm(this._editor,i,t))}renderHoverParts(e,t){if(!(t.length===0||!this._editor.hasModel()))return this._setMinimumDimensions(e),this._renderedParts=new Tw(this._editor,e,t[0],this._themeService),this._renderedParts}_setMinimumDimensions(e){const t=this._editor.getOption(75)+8;e.setMinimumDimensions(new o.Dimension(302,t))}get _color(){return this._renderedParts?.color}};Gh=Dw([Rw(1,o.IThemeService)],Gh);var Nw=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Oo=function(c,e){return function(t,i){e(t,i,c)}},Zh;class Mw{constructor(e,t){this.value=e,this.foundInEditor=t}}const g_=8,Pw=22;let Xh=(Ln=class extends a.Disposable{constructor(e,t,i,n,s,r,l,d){super(),this._editor=e,this._standaloneColorPickerVisible=t,this._standaloneColorPickerFocused=i,this._keybindingService=s,this._languageFeaturesService=r,this._editorWorkerService=l,this._hoverService=d,this.allowEditorOverflow=!0,this._position=void 0,this._body=document.createElement("div"),this._colorHover=null,this._selectionSetInEditor=!1,this._onResult=this._register(new a.Emitter),this.onResult=this._onResult.event,this._renderedHoverParts=this._register(new a.MutableDisposable),this._renderedStatusBar=this._register(new a.MutableDisposable),this._standaloneColorPickerVisible.set(!0),this._standaloneColorPickerParticipant=n.createInstance(Gh,this._editor),this._position=this._editor._getViewModel()?.getPrimaryCursorState().modelState.position;const h=this._editor.getSelection(),u=h?{startLineNumber:h.startLineNumber,startColumn:h.startColumn,endLineNumber:h.endLineNumber,endColumn:h.endColumn}:{startLineNumber:0,endLineNumber:0,endColumn:0,startColumn:0},g=this._register(o.trackFocus(this._body));this._register(g.onDidBlur(p=>{this.hide()})),this._register(g.onDidFocus(p=>{this.focus()})),this._register(this._editor.onDidChangeCursorPosition(()=>{this._selectionSetInEditor?this._selectionSetInEditor=!1:this.hide()})),this._register(this._editor.onMouseMove(p=>{const f=p.target.element?.classList;f&&f.contains("colorpicker-color-decoration")&&this.hide()})),this._register(this.onResult(p=>{this._render(p.value,p.foundInEditor)})),this._start(u),this._body.style.zIndex="50",this._editor.addContentWidget(this)}updateEditor(){this._colorHover&&this._standaloneColorPickerParticipant.updateEditorModel(this._colorHover)}getId(){return Zh.ID}getDomNode(){return this._body}getPosition(){if(!this._position)return null;const e=this._editor.getOption(69).above;return{position:this._position,secondaryPosition:this._position,preference:e?[1,2]:[2,1],positionAffinity:2}}hide(){this.dispose(),this._standaloneColorPickerVisible.set(!1),this._standaloneColorPickerFocused.set(!1),this._editor.removeContentWidget(this),this._editor.focus()}focus(){this._standaloneColorPickerFocused.set(!0),this._body.focus()}async _start(e){const t=await this._computeAsync(e);t&&this._onResult.fire(new Mw(t.result,t.foundInEditor))}async _computeAsync(e){if(!this._editor.hasModel())return null;const t={range:e,color:{red:0,green:0,blue:0,alpha:1}},i=await this._standaloneColorPickerParticipant.createColorHover(t,new So(this._editorWorkerService),this._languageFeaturesService.colorProvider);return i?{result:i.colorHover,foundInEditor:i.foundInEditor}:null}_render(e,t){const i=document.createDocumentFragment();this._renderedStatusBar.value=this._register(new ra(this._keybindingService,this._hoverService));const n={fragment:i,statusBar:this._renderedStatusBar.value,onContentsChanged:()=>{},setMinimumDimensions:()=>{},hide:()=>this.hide(),focus:()=>this.focus()};if(this._colorHover=e,this._renderedHoverParts.value=this._standaloneColorPickerParticipant.renderHoverParts(n,[e]),!this._renderedHoverParts.value){this._renderedStatusBar.clear(),this._renderedHoverParts.clear();return}const s=this._renderedHoverParts.value.colorPicker;this._body.classList.add("standalone-colorpicker-body"),this._body.style.maxHeight=Math.max(this._editor.getLayoutInfo().height/4,250)+"px",this._body.style.maxWidth=Math.max(this._editor.getLayoutInfo().width*.66,500)+"px",this._body.tabIndex=0,this._body.appendChild(i),s.layout();const r=s.body,l=r.saturationBox.domNode.clientWidth,d=r.domNode.clientWidth-l-Pw-g_,h=s.body.enterButton;h?.onClicked(()=>{this.updateEditor(),this.hide()});const u=s.header,g=u.pickedColorNode;g.style.width=l+g_+"px";const p=u.originalColorNode;p.style.width=d+"px",s.header.closeButton?.onClicked(()=>{this.hide()}),t&&(h&&(h.button.textContent="Replace"),this._selectionSetInEditor=!0,this._editor.setSelection(e.range)),this._editor.layoutContentWidget(this)}},Zh=Ln,Ln.ID="editor.contrib.standaloneColorPickerWidget",Ln);Xh=Zh=Nw([Oo(3,o.IInstantiationService),Oo(4,o.IKeybindingService),Oo(5,o.ILanguageFeaturesService),Oo(6,o.IEditorWorkerService),Oo(7,o.IHoverService)],Xh);var Ow=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},p_=function(c,e){return function(t,i){e(t,i,c)}},Yh;let tn=(Dn=class extends a.Disposable{constructor(e,t,i){super(),this._editor=e,this._instantiationService=i,this._standaloneColorPickerWidget=null,this._standaloneColorPickerVisible=o.EditorContextKeys.standaloneColorPickerVisible.bindTo(t),this._standaloneColorPickerFocused=o.EditorContextKeys.standaloneColorPickerFocused.bindTo(t)}showOrFocus(){this._editor.hasModel()&&(this._standaloneColorPickerVisible.get()?this._standaloneColorPickerFocused.get()||this._standaloneColorPickerWidget?.focus():this._standaloneColorPickerWidget=this._instantiationService.createInstance(Xh,this._editor,this._standaloneColorPickerVisible,this._standaloneColorPickerFocused))}hide(){this._standaloneColorPickerFocused.set(!1),this._standaloneColorPickerVisible.set(!1),this._standaloneColorPickerWidget?.hide(),this._editor.focus()}insertColor(){this._standaloneColorPickerWidget?.updateEditor(),this.hide()}static get(e){return e.getContribution(Yh.ID)}},Yh=Dn,Dn.ID="editor.contrib.standaloneColorPickerController",Dn);tn=Yh=Ow([p_(1,o.IContextKeyService),p_(2,o.IInstantiationService)],tn);class Aw extends o.EditorAction2{constructor(){super({id:"editor.action.showOrFocusStandaloneColorPicker",title:{...a.localize2(925,"Show or Focus Standalone Color Picker"),mnemonicTitle:a.localize(924,"&&Show or Focus Standalone Color Picker")},precondition:void 0,menu:[{id:o.MenuId.CommandPalette}],metadata:{description:a.localize2(926,"Show or focus a standalone color picker which uses the default color provider. It displays hex/rgb/hsl colors.")}})}runEditorCommand(e,t){tn.get(t)?.showOrFocus()}}class Fw extends o.EditorAction{constructor(){super({id:"editor.action.hideColorPicker",label:a.localize2(927,"Hide the Color Picker"),precondition:o.EditorContextKeys.standaloneColorPickerVisible.isEqualTo(!0),kbOpts:{primary:9,weight:100},metadata:{description:a.localize2(928,"Hide the standalone color picker.")}})}run(e,t){tn.get(t)?.hide()}}class zw extends o.EditorAction{constructor(){super({id:"editor.action.insertColorWithStandaloneColorPicker",label:a.localize2(929,"Insert Color with Standalone Color Picker"),precondition:o.EditorContextKeys.standaloneColorPickerFocused.isEqualTo(!0),kbOpts:{primary:3,weight:100},metadata:{description:a.localize2(930,"Insert hex/rgb/hsl colors with the focused standalone color picker.")}})}run(e,t){tn.get(t)?.insertColor()}}o.registerEditorAction(Fw),o.registerEditorAction(zw),o.registerAction2(Aw),o.registerEditorContribution(Pa.ID,Pa,2),o.registerEditorContribution(tn.ID,tn,1),o.registerEditorContribution(ls.ID,ls,1),o.registerEditorFeature(Zd),Gi.register(va),o.CommandsRegistry.registerCommand("_executeDocumentColorProvider",function(c,...e){const[t]=e;if(!(t instanceof a.URI))throw a.illegalArgument();const{model:i,colorProviderRegistry:n,defaultColorDecoratorsEnablement:s}=am(c,t);return Xd(new DS,n,i,a.CancellationToken.None,s)}),o.CommandsRegistry.registerCommand("_executeColorPresentationProvider",function(c,...e){const[t,i]=e;if(!i)return;const{uri:n,range:s}=i;if(!(n instanceof a.URI)||!Array.isArray(t)||t.length!==4||!a.Range.isIRange(s))throw a.illegalArgument();const{model:r,colorProviderRegistry:l,defaultColorDecoratorsEnablement:d}=am(c,n),[h,u,g,p]=t;return Xd(new RS({range:s,color:{red:h,green:u,blue:g,alpha:p}}),l,r,a.CancellationToken.None,d)});class $t{constructor(e,t,i){this.languageConfigurationService=i,this._selection=e,this._insertSpace=t,this._usedEndToken=null}static _haystackHasNeedleAtOffset(e,t,i){if(i<0)return!1;const n=t.length,s=e.length;if(i+n>s)return!1;for(let r=0;r=65&&l<=90&&l+32===d)&&!(d>=65&&d<=90&&d+32===l))return!1}return!0}_createOperationsForBlockComment(e,t,i,n,s,r){const l=e.startLineNumber,d=e.startColumn,h=e.endLineNumber,u=e.endColumn,g=s.getLineContent(l),p=s.getLineContent(h);let f=g.lastIndexOf(t,d-1+t.length),m=p.indexOf(i,u-1-i.length);if(f!==-1&&m!==-1)if(l===h)g.substring(f+t.length,m).indexOf(i)>=0&&(f=-1,m=-1);else{const v=g.substring(f+t.length),b=p.substring(0,m);(v.indexOf(i)>=0||b.indexOf(i)>=0)&&(f=-1,m=-1)}let _;f!==-1&&m!==-1?(n&&f+t.length0&&p.charCodeAt(m-1)===32&&(i=" "+i,m-=1),_=$t._createRemoveBlockCommentOperations(new a.Range(l,f+t.length+1,h,m+1),t,i)):(_=$t._createAddBlockCommentOperations(e,t,i,this._insertSpace),this._usedEndToken=_.length===1?i:null);for(const v of _)r.addTrackedEditOperation(v.range,v.text)}static _createRemoveBlockCommentOperations(e,t,i){const n=[];return a.Range.isEmpty(e)?n.push(o.EditOperation.delete(new a.Range(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+i.length))):(n.push(o.EditOperation.delete(new a.Range(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),n.push(o.EditOperation.delete(new a.Range(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+i.length)))),n}static _createAddBlockCommentOperations(e,t,i,n){const s=[];return a.Range.isEmpty(e)?s.push(o.EditOperation.replace(new a.Range(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+i)):(s.push(o.EditOperation.insert(new a.Position(e.startLineNumber,e.startColumn),t+(n?" ":""))),s.push(o.EditOperation.insert(new a.Position(e.endLineNumber,e.endColumn),(n?" ":"")+i))),s}getEditOperations(e,t){const i=this._selection.startLineNumber,n=this._selection.startColumn;e.tokenization.tokenizeIfCheap(i);const s=e.getLanguageIdAtPosition(i,n),r=this.languageConfigurationService.getLanguageConfiguration(s).comments;!r||!r.blockCommentStartToken||!r.blockCommentEndToken||this._createOperationsForBlockComment(this._selection,r.blockCommentStartToken,r.blockCommentEndToken,this._insertSpace,e,t)}computeCursorState(e,t){const i=t.getInverseEditOperations();if(i.length===2){const n=i[0],s=i[1];return new a.Selection(n.range.endLineNumber,n.range.endColumn,s.range.startLineNumber,s.range.startColumn)}else{const n=i[0].range,s=this._usedEndToken?-this._usedEndToken.length-1:0;return new a.Selection(n.endLineNumber,n.endColumn+s,n.endLineNumber,n.endColumn+s)}}}class Lt{constructor(e,t,i,n,s,r,l){this.languageConfigurationService=e,this._selection=t,this._indentSize=i,this._type=n,this._insertSpace=s,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=r,this._ignoreFirstLine=l||!1}static _gatherPreflightCommentStrings(e,t,i,n){e.tokenization.tokenizeIfCheap(t);const s=e.getLanguageIdAtPosition(t,1),r=n.getLanguageConfiguration(s).comments,l=r?r.lineCommentToken:null;if(!l)return null;const d=[];for(let h=0,u=i-t+1;hs?t[d].commentStrOffset=r-1:t[d].commentStrOffset=r}}}class Qh extends o.EditorAction{constructor(e,t){super(t),this._type=e}run(e,t){const i=e.get(o.ILanguageConfigurationService);if(!t.hasModel())return;const n=t.getModel(),s=[],r=n.getOptions(),l=t.getOption(29),d=t.getSelections().map((u,g)=>({selection:u,index:g,ignoreFirstLine:!1}));d.sort((u,g)=>a.Range.compareRangesUsingStarts(u.selection,g.selection));let h=d[0];for(let u=1;u=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},nn=function(c,e){return function(t,i){e(t,i,c)}},Jh;let Ao=(Rn=class{static get(e){return e.getContribution(Jh.ID)}constructor(e,t,i,n,s,r,l,d){this._contextMenuService=t,this._contextViewService=i,this._contextKeyService=n,this._keybindingService=s,this._menuService=r,this._configurationService=l,this._workspaceContextService=d,this._toDispose=new a.DisposableStore,this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.add(this._editor.onContextMenu(h=>this._onContextMenu(h))),this._toDispose.add(this._editor.onMouseWheel(h=>{if(this._contextMenuIsBeingShownCount>0){const u=this._contextViewService.getContextViewElement(),g=h.srcElement;g.shadowRoot&&o.getShadowRoot(u)===g.shadowRoot||this._contextViewService.hideContextView()}})),this._toDispose.add(this._editor.onKeyDown(h=>{this._editor.getOption(30)&&h.keyCode===58&&(h.preventDefault(),h.stopPropagation(),this.showContextMenu())}))}_onContextMenu(e){if(!this._editor.hasModel())return;if(!this._editor.getOption(30)){this._editor.focus(),e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position);return}if(e.target.type===12||e.target.type===6&&e.target.detail.injectedText)return;if(e.event.preventDefault(),e.event.stopPropagation(),e.target.type===11)return this._showScrollbarContextMenu(e.event);if(e.target.type!==6&&e.target.type!==7&&e.target.type!==1)return;if(this._editor.focus(),e.target.position){let i=!1;for(const n of this._editor.getSelections())if(n.containsPosition(e.target.position)){i=!0;break}i||this._editor.setPosition(e.target.position)}let t=null;e.target.type!==1&&(t=e.event),this.showContextMenu(t)}showContextMenu(e){if(!this._editor.getOption(30)||!this._editor.hasModel())return;const t=this._getMenuActions(this._editor.getModel(),this._editor.contextMenuId);t.length>0&&this._doShowContextMenu(t,e)}_getMenuActions(e,t){const i=[],n=this._menuService.getMenuActions(t,this._contextKeyService,{arg:e.uri});for(const s of n){const[,r]=s;let l=0;for(const d of r)if(d instanceof o.SubmenuItemAction){const h=this._getMenuActions(e,d.item.submenu);h.length>0&&(i.push(new o.SubmenuAction(d.id,d.label,h)),l++)}else i.push(d),l++;l&&i.push(new o.Separator)}return i.length&&i.pop(),i}_doShowContextMenu(e,t=null){if(!this._editor.hasModel())return;let i=t;if(!i){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const s=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),r=o.getDomNodePagePosition(this._editor.getDomNode()),l=r.left+s.left,d=r.top+s.top+s.height;i={x:l,y:d}}const n=this._editor.getOption(144)&&!a.isIOS;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:n?this._editor.getOverflowWidgetsDomNode()??this._editor.getDomNode():void 0,getAnchor:()=>i,getActions:()=>e,getActionViewItem:s=>{const r=this._keybindingFor(s);if(r)return new o.ActionViewItem(s,s,{label:!0,keybinding:r.getLabel(),isMenu:!0});const l=s;return typeof l.getActionViewItem=="function"?l.getActionViewItem():new o.ActionViewItem(s,s,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:s=>this._keybindingFor(s),onHide:s=>{this._contextMenuIsBeingShownCount--}})}_showScrollbarContextMenu(e){if(!this._editor.hasModel()||o.isStandaloneEditorWorkspace(this._workspaceContextService.getWorkspace()))return;const t=this._editor.getOption(81);let i=0;const n=h=>({id:`menu-action-${++i}`,label:h.label,tooltip:"",class:void 0,enabled:typeof h.enabled>"u"?!0:h.enabled,checked:h.checked,run:h.run}),s=(h,u)=>new o.SubmenuAction(`menu-action-${++i}`,h,u,void 0),r=(h,u,g,p,f)=>{if(!u)return n({label:h,enabled:u,run:()=>{}});const m=v=>()=>{this._configurationService.updateValue(g,v)},_=[];for(const v of f)_.push(n({label:v.label,checked:p===v.value,run:m(v.value)}));return s(h,_)},l=[];l.push(n({label:a.localize(937,"Minimap"),checked:t.enabled,run:()=>{this._configurationService.updateValue("editor.minimap.enabled",!t.enabled)}})),l.push(new o.Separator),l.push(n({label:a.localize(938,"Render Characters"),enabled:t.enabled,checked:t.renderCharacters,run:()=>{this._configurationService.updateValue("editor.minimap.renderCharacters",!t.renderCharacters)}})),l.push(r(a.localize(939,"Vertical size"),t.enabled,"editor.minimap.size",t.size,[{label:a.localize(940,"Proportional"),value:"proportional"},{label:a.localize(941,"Fill"),value:"fill"},{label:a.localize(942,"Fit"),value:"fit"}])),l.push(r(a.localize(943,"Slider"),t.enabled,"editor.minimap.showSlider",t.showSlider,[{label:a.localize(944,"Mouse Over"),value:"mouseover"},{label:a.localize(945,"Always"),value:"always"}])),l.push(r(a.localize(946,"Side"),t.enabled,"editor.minimap.side",t.side,[{label:a.localize(947,"Right"),value:"right"},{label:a.localize(948,"Left"),value:"left"}]));const d=this._editor.getOption(144)&&!a.isIOS;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:d?this._editor.getDomNode():void 0,getAnchor:()=>e,getActions:()=>l,onHide:h=>{this._contextMenuIsBeingShownCount--,this._editor.focus()}})}_keybindingFor(e){return this._keybindingService.lookupKeybinding(e.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}},Jh=Rn,Rn.ID="editor.contrib.contextmenu",Rn);Ao=Jh=kw([nn(1,o.IContextMenuService),nn(2,o.IContextViewService),nn(3,o.IContextKeyService),nn(4,o.IKeybindingService),nn(5,o.IMenuService),nn(6,o.IConfigurationService),nn(7,o.IWorkspaceContextService)],Ao);class jw extends o.EditorAction{constructor(){super({id:"editor.action.showContextMenu",label:a.localize2(949,"Show Editor Context Menu"),precondition:void 0,kbOpts:{kbExpr:o.EditorContextKeys.textInputFocus,primary:1092,weight:100}})}run(e,t){Ao.get(t)?.showContextMenu()}}o.registerEditorContribution(Ao.ID,Ao,2),o.registerEditorAction(jw);class Wh{constructor(e){this.selections=e}equals(e){const t=this.selections.length,i=e.selections.length;if(t!==i)return!1;for(let n=0;n{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeModelContent(t=>{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeCursorSelection(t=>{if(this._isCursorUndoRedo||!t.oldSelections||t.oldModelVersionId!==t.modelVersionId)return;const i=new Wh(t.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(i)||(this._undoStack.push(new Hh(i,e.getScrollTop(),e.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())}))}cursorUndo(){!this._editor.hasModel()||this._undoStack.length===0||(this._redoStack.push(new Hh(new Wh(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){!this._editor.hasModel()||this._redoStack.length===0||(this._undoStack.push(new Hh(new Wh(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}_applyState(e){this._isCursorUndoRedo=!0,this._editor.setSelections(e.cursorState.selections),this._editor.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),this._isCursorUndoRedo=!1}};Ec.ID="editor.contrib.cursorUndoRedoController";let bs=Ec;class $w extends o.EditorAction{constructor(){super({id:"cursorUndo",label:a.localize2(950,"Cursor Undo"),precondition:void 0,kbOpts:{kbExpr:o.EditorContextKeys.textInputFocus,primary:2099,weight:100}})}run(e,t,i){bs.get(t)?.cursorUndo()}}class qw extends o.EditorAction{constructor(){super({id:"cursorRedo",label:a.localize2(951,"Cursor Redo"),precondition:void 0})}run(e,t,i){bs.get(t)?.cursorRedo()}}o.registerEditorContribution(bs.ID,bs,0),o.registerEditorAction($w),o.registerEditorAction(qw);class Gw{constructor(e,t,i){this.selection=e,this.targetPosition=t,this.copy=i,this.targetSelection=null}getEditOperations(e,t){const i=e.getValueInRange(this.selection);if(this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new a.Range(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),i),this.selection.containsPosition(this.targetPosition)&&!(this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition)))){this.targetSelection=this.selection;return}if(this.copy){this.targetSelection=new a.Selection(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumber>this.selection.endLineNumber){this.targetSelection=new a.Selection(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumberthis._onEditorMouseDown(t))),this._register(this._editor.onMouseUp(t=>this._onEditorMouseUp(t))),this._register(this._editor.onMouseDrag(t=>this._onEditorMouseDrag(t))),this._register(this._editor.onMouseDrop(t=>this._onEditorMouseDrop(t))),this._register(this._editor.onMouseDropCanceled(()=>this._onEditorMouseDropCanceled())),this._register(this._editor.onKeyDown(t=>this.onEditorKeyDown(t))),this._register(this._editor.onKeyUp(t=>this.onEditorKeyUp(t))),this._register(this._editor.onDidBlurEditorWidget(()=>this.onEditorBlur())),this._register(this._editor.onDidBlurEditorText(()=>this.onEditorBlur())),this._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(e){!this._editor.getOption(42)||this._editor.getOption(28)||(Cs(e)&&(this._modifierPressed=!0),this._mouseDown&&Cs(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){!this._editor.getOption(42)||this._editor.getOption(28)||(Cs(e)&&(this._modifierPressed=!1),this._mouseDown&&e.keyCode===Si.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}_onEditorMouseDown(e){this._mouseDown=!0}_onEditorMouseUp(e){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(e){const t=e.target;if(this._dragSelection===null){const n=(this._editor.getSelections()||[]).filter(s=>t.position&&s.containsPosition(t.position));if(n.length===1)this._dragSelection=n[0];else return}Cs(e.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),t.position&&(this._dragSelection.containsPosition(t.position)?this._removeDecoration():this.showAt(t.position))}_onEditorMouseDropCanceled(){this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}_onEditorMouseDrop(e){if(e.target&&(this._hitContent(e.target)||this._hitMargin(e.target))&&e.target.position){const t=new a.Position(e.target.position.lineNumber,e.target.position.column);if(this._dragSelection===null){let i=null;if(e.event.shiftKey){const n=this._editor.getSelection();if(n){const{selectionStartLineNumber:s,selectionStartColumn:r}=n;i=[new a.Selection(s,r,t.lineNumber,t.column)]}}else i=(this._editor.getSelections()||[]).map(n=>n.containsPosition(t)?new a.Selection(t.lineNumber,t.column,t.lineNumber,t.column):n);this._editor.setSelections(i||[],"mouse",3)}else(!this._dragSelection.containsPosition(t)||(Cs(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(t)||this._dragSelection.getStartPosition().equals(t)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(Si.ID,new Gw(this._dragSelection,t,Cs(e.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}showAt(e){this._dndDecorationIds.set([{range:new a.Range(e.lineNumber,e.column,e.lineNumber,e.column),options:Si._DECORATION_OPTIONS}]),this._editor.revealPosition(e,1)}_removeDecoration(){this._dndDecorationIds.clear()}_hitContent(e){return e.type===6||e.type===7}_hitMargin(e){return e.type===2||e.type===3||e.type===4}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}};Si.ID="editor.contrib.dragAndDrop",Si.TRIGGER_KEY_VALUE=a.isMacintosh?6:5,Si._DECORATION_OPTIONS=o.ModelDecorationOptions.register({description:"dnd-target",className:"dnd-target"});let Oa=Si;o.registerEditorContribution(Oa.ID,Oa,2);const Zw="editor.action.pasteAs";o.registerEditorContribution(wt.ID,wt,0),o.registerEditorFeature(vd),o.registerEditorCommand(new class extends o.EditorCommand{constructor(){super({id:Af,precondition:Td,kbOpts:{weight:100,primary:2137}})}runEditorCommand(c,e){return wt.get(e)?.changePasteType()}}),o.registerEditorCommand(new class extends o.EditorCommand{constructor(){super({id:"editor.hidePasteWidget",precondition:Td,kbOpts:{weight:100,primary:9}})}runEditorCommand(c,e){wt.get(e)?.clearWidgets()}}),o.registerEditorAction((Tn=class extends o.EditorAction{constructor(){super({id:Zw,label:a.localize2(954,"Paste As..."),precondition:o.EditorContextKeys.writable,metadata:{description:"Paste as",args:[{name:"args",schema:Tn.argsSchema}]},canTriggerInlineEdits:!0})}run(e,t,i){let n;return i&&("kind"in i?n={only:new q(i.kind)}:"preferences"in i&&(n={preferences:i.preferences.map(s=>new q(s))})),wt.get(t)?.pasteAs(n)}},Tn.argsSchema={oneOf:[{type:"object",required:["kind"],properties:{kind:{type:"string",description:a.localize(952,`The kind of the paste edit to try pasting with. +If there are multiple edits for this kind, the editor will show a picker. If there are no edits of this kind, the editor will show an error message.`)}}},{type:"object",required:["preferences"],properties:{preferences:{type:"array",description:a.localize(953,`List of preferred paste edit kind to try applying. +The first edit matching the preferences will be applied.`),items:{type:"string"}}}}]},Tn)),o.registerEditorAction(class extends o.EditorAction{constructor(){super({id:"editor.action.pasteAsText",label:a.localize2(955,"Paste as Text"),precondition:o.EditorContextKeys.writable,canTriggerInlineEdits:!0})}run(c,e){return wt.get(e)?.pasteAs({providerId:zi.id})}});class Xw{constructor(){this._dragOperations=new Map}removeDragOperationTransfer(e){if(e&&this._dragOperations.has(e)){const t=this._dragOperations.get(e);return this._dragOperations.delete(e),t}}}class f_{constructor(e){this.identifier=e}}const m_=o.createDecorator("treeViewsDndService");o.registerSingleton(m_,Xw,1);var Yw=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Aa=function(c,e){return function(t,i){e(t,i,c)}},Dt;const Qw="editor.dropIntoEditor.preferences",__="editor.changeDropType",eu=new o.RawContextKey("dropWidgetVisible",!1,a.localize(973,"Whether the drop widget is showing"));let Ss=(Nn=class extends a.Disposable{static get(e){return e.getContribution(Dt.ID)}constructor(e,t,i,n,s){super(),this._configService=i,this._languageFeaturesService=n,this._treeViewsDragAndDropService=s,this.treeItemsTransfer=o.LocalSelectionTransfer.getInstance(),this._dropProgressManager=this._register(t.createInstance(Zr,"dropIntoEditor",e)),this._postDropWidgetManager=this._register(t.createInstance(Jr,"dropIntoEditor",e,eu,{id:__,label:a.localize(974,"Show drop options...")},()=>Dt._configureDefaultAction?[Dt._configureDefaultAction]:[])),this._register(e.onDropIntoEditor(r=>this.onDropIntoEditor(e,r.position,r.event)))}clearWidgets(){this._postDropWidgetManager.clear()}changeDropType(){this._postDropWidgetManager.tryShowSelector()}async onDropIntoEditor(e,t,i){if(!i.dataTransfer||!e.hasModel())return;Dt._currentDropOperation?.cancel(),e.focus(),e.setPosition(t);const n=a.createCancelablePromise(async s=>{const r=new a.DisposableStore,l=r.add(new o.EditorStateCancellationTokenSource(e,1,void 0,s));try{const d=await this.extractDataTransferData(i);if(d.size===0||l.token.isCancellationRequested)return;const h=e.getModel();if(!h)return;const u=this._languageFeaturesService.documentDropEditProvider.ordered(h).filter(p=>p.dropMimeTypes?p.dropMimeTypes.some(f=>d.matches(f)):!0),g=r.add(await this.getDropEdits(u,h,t,d,l.token));if(l.token.isCancellationRequested)return;if(g.edits.length){const p=this.getInitialActiveEditIndex(h,g.edits),f=e.getOption(43).showDropSelector==="afterDrop";await this._postDropWidgetManager.applyEditAndShowIfNeeded([a.Range.fromPositions(t)],{activeEditIndex:p,allEdits:g.edits},f,async m=>m,s)}}finally{r.dispose(),Dt._currentDropOperation===n&&(Dt._currentDropOperation=void 0)}});this._dropProgressManager.showWhile(t,a.localize(975,"Running drop handlers. Click to cancel"),n,{cancel:()=>n.cancel()}),Dt._currentDropOperation=n}async getDropEdits(e,t,i,n,s){const r=new a.DisposableStore,l=await a.raceCancellation(Promise.all(e.map(async h=>{try{const u=await h.provideDocumentDropEdits(t,i,n,s);return u&&r.add(u),u?.edits.map(g=>({...g,providerId:h.id}))}catch(u){a.isCancellationError(u)||console.error(u),console.error(u)}})),s),d=a.coalesce(l??[]).flat();return{edits:Df(d),dispose:()=>r.dispose()}}getInitialActiveEditIndex(e,t){const i=this._configService.getValue(Qw,{resource:e.uri});for(const n of Array.isArray(i)?i:[]){const s=new q(n),r=t.findIndex(l=>l.kind&&s.contains(l.kind));if(r>=0)return r}return 0}async extractDataTransferData(e){if(!e.dataTransfer)return new o.VSDataTransfer;const t=o.toExternalVSDataTransfer(e.dataTransfer);if(this.treeItemsTransfer.hasData(f_.prototype)){const i=this.treeItemsTransfer.getData(f_.prototype);if(Array.isArray(i))for(const n of i){const s=await this._treeViewsDragAndDropService.removeDragOperationTransfer(n.identifier);if(s)for(const[r,l]of s)t.replace(r,l)}}return t}},Dt=Nn,Nn.ID="editor.contrib.dropIntoEditorController",Nn);Ss=Dt=Yw([Aa(1,o.IInstantiationService),Aa(2,o.IConfigurationService),Aa(3,o.ILanguageFeaturesService),Aa(4,m_)],Ss),o.registerEditorContribution(Ss.ID,Ss,2),o.registerEditorFeature(_d),o.registerEditorCommand(new class extends o.EditorCommand{constructor(){super({id:__,precondition:eu,kbOpts:{weight:100,primary:2137}})}runEditorCommand(c,e,t){Ss.get(e)?.changeDropType()}}),o.registerEditorCommand(new class extends o.EditorCommand{constructor(){super({id:"editor.hideDropWidget",precondition:eu,kbOpts:{weight:100,primary:9}})}runEditorCommand(c,e,t){Ss.get(e)?.clearWidgets()}});const Lc=class Lc extends o.Widget{constructor(e,t,i){super(),this._hideSoon=this._register(new a.RunOnceScheduler(()=>this._hide(),2e3)),this._isVisible=!1,this._editor=e,this._state=t,this._keybindingService=i,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.style.zIndex="12",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");const n={inputActiveOptionBorder:o.asCssVariable(o.inputActiveOptionBorder),inputActiveOptionForeground:o.asCssVariable(o.inputActiveOptionForeground),inputActiveOptionBackground:o.asCssVariable(o.inputActiveOptionBackground)},s={groupId:"find-options-widget"};this.caseSensitive=this._register(new o.CaseSensitiveToggle({appendTitle:this._keybindingLabelFor(j.ToggleCaseSensitiveCommand),isChecked:this._state.matchCase,hoverLifecycleOptions:s,...n})),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange(()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)})),this.wholeWords=this._register(new o.WholeWordsToggle({appendTitle:this._keybindingLabelFor(j.ToggleWholeWordCommand),isChecked:this._state.wholeWord,hoverLifecycleOptions:s,...n})),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange(()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)})),this.regex=this._register(new o.RegexToggle({appendTitle:this._keybindingLabelFor(j.ToggleRegexCommand),isChecked:this._state.isRegex,hoverLifecycleOptions:s,...n})),this._domNode.appendChild(this.regex.domNode),this._register(this.regex.onChange(()=>{this._state.change({isRegex:this.regex.checked},!1)})),this._editor.addOverlayWidget(this),this._register(this._state.onFindReplaceStateChange(r=>{let l=!1;r.isRegex&&(this.regex.checked=this._state.isRegex,l=!0),r.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,l=!0),r.matchCase&&(this.caseSensitive.checked=this._state.matchCase,l=!0),!this._state.isRevealed&&l&&this._revealTemporarily()})),this._register(o.addDisposableListener(this._domNode,o.EventType.MOUSE_LEAVE,r=>this._onMouseLeave())),this._register(o.addDisposableListener(this._domNode,"mouseover",r=>this._onMouseOver()))}_keybindingLabelFor(e){return this._keybindingService.appendKeybinding("",e)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return Lc.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseLeave(){this._hideSoon.schedule()}_onMouseOver(){this._hideSoon.cancel()}_show(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")}_hide(){this._isVisible&&(this._isVisible=!1,this._domNode.style.display="none")}};Lc.ID="editor.contrib.findOptionsWidget";let tu=Lc;function Fa(c,e){return c===1?!0:c===2?!1:e}class Jw extends a.Disposable{get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return Fa(this._isRegexOverride,this._isRegex)}get wholeWord(){return Fa(this._wholeWordOverride,this._wholeWord)}get matchCase(){return Fa(this._matchCaseOverride,this._matchCase)}get preserveCase(){return Fa(this._preserveCaseOverride,this._preserveCase)}get actualIsRegex(){return this._isRegex}get actualWholeWord(){return this._wholeWord}get actualMatchCase(){return this._matchCase}get actualPreserveCase(){return this._preserveCase}get searchScope(){return this._searchScope}get matchesPosition(){return this._matchesPosition}get matchesCount(){return this._matchesCount}get currentMatch(){return this._currentMatch}constructor(){super(),this._onFindReplaceStateChange=this._register(new a.Emitter),this.onFindReplaceStateChange=this._onFindReplaceStateChange.event,this._searchString="",this._replaceString="",this._isRevealed=!1,this._isReplaceRevealed=!1,this._isRegex=!1,this._isRegexOverride=0,this._wholeWord=!1,this._wholeWordOverride=0,this._matchCase=!1,this._matchCaseOverride=0,this._preserveCase=!1,this._preserveCaseOverride=0,this._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._loop=!0,this._isSearching=!1,this._filters=null}changeMatchInfo(e,t,i){const n={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let s=!1;t===0&&(e=0),e>t&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,n.matchesPosition=!0,s=!0),this._matchesCount!==t&&(this._matchesCount=t,n.matchesCount=!0,s=!0),typeof i<"u"&&(a.Range.equalsRange(this._currentMatch,i)||(this._currentMatch=i,n.currentMatch=!0,s=!0)),s&&this._onFindReplaceStateChange.fire(n)}change(e,t,i=!0){const n={moveCursor:t,updateHistory:i,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let s=!1;const r=this.isRegex,l=this.wholeWord,d=this.matchCase,h=this.preserveCase;typeof e.searchString<"u"&&this._searchString!==e.searchString&&(this._searchString=e.searchString,n.searchString=!0,s=!0),typeof e.replaceString<"u"&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,n.replaceString=!0,s=!0),typeof e.isRevealed<"u"&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,n.isRevealed=!0,s=!0),typeof e.isReplaceRevealed<"u"&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,n.isReplaceRevealed=!0,s=!0),typeof e.isRegex<"u"&&(this._isRegex=e.isRegex),typeof e.wholeWord<"u"&&(this._wholeWord=e.wholeWord),typeof e.matchCase<"u"&&(this._matchCase=e.matchCase),typeof e.preserveCase<"u"&&(this._preserveCase=e.preserveCase),typeof e.searchScope<"u"&&(e.searchScope?.every(u=>this._searchScope?.some(g=>!a.Range.equalsRange(g,u)))||(this._searchScope=e.searchScope,n.searchScope=!0,s=!0)),typeof e.loop<"u"&&this._loop!==e.loop&&(this._loop=e.loop,n.loop=!0,s=!0),typeof e.isSearching<"u"&&this._isSearching!==e.isSearching&&(this._isSearching=e.isSearching,n.isSearching=!0,s=!0),typeof e.filters<"u"&&(this._filters?this._filters.update(e.filters):this._filters=e.filters,n.filters=!0,s=!0),this._isRegexOverride=typeof e.isRegexOverride<"u"?e.isRegexOverride:0,this._wholeWordOverride=typeof e.wholeWordOverride<"u"?e.wholeWordOverride:0,this._matchCaseOverride=typeof e.matchCaseOverride<"u"?e.matchCaseOverride:0,this._preserveCaseOverride=typeof e.preserveCaseOverride<"u"?e.preserveCaseOverride:0,r!==this.isRegex&&(s=!0,n.isRegex=!0),l!==this.wholeWord&&(s=!0,n.wholeWord=!0),d!==this.matchCase&&(s=!0,n.matchCase=!0),h!==this.preserveCase&&(s=!0,n.preserveCase=!0),s&&this._onFindReplaceStateChange.fire(n)}canNavigateBack(){return this.canNavigateInLoop()||this.matchesPosition!==1}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition=jt}}var Ww=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Hw=function(c,e){return function(t,i){e(t,i,c)}},qt;let iu=(yi=class{static getOrCreate(e){return qt._instance||(qt._instance=new qt(e)),qt._instance}constructor(e){this.storageService=e,this.inMemoryValues=new Set,this._onDidChangeEmitter=new a.Emitter,this.onDidChange=this._onDidChangeEmitter.event,this.load()}delete(e){const t=this.inMemoryValues.delete(e);return this.save(),t}add(e){return this.inMemoryValues.add(e),this.save(),this}has(e){return this.inMemoryValues.has(e)}forEach(e,t){return this.load(),this.inMemoryValues.forEach(e)}replace(e){this.inMemoryValues=new Set(e),this.save()}load(){let e;const t=this.storageService.get(qt.FIND_HISTORY_KEY,1);if(t)try{e=JSON.parse(t)}catch{}this.inMemoryValues=new Set(e||[])}save(){const e=[];return this.inMemoryValues.forEach(t=>e.push(t)),new Promise(t=>{this.storageService.store(qt.FIND_HISTORY_KEY,JSON.stringify(e),1,0),this._onDidChangeEmitter.fire(e),t()})}},qt=yi,yi.FIND_HISTORY_KEY="workbench.find.history",yi._instance=null,yi);iu=qt=Ww([Hw(0,o.IStorageService)],iu);var eI=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},tI=function(c,e){return function(t,i){e(t,i,c)}},Gt;let nu=(wi=class{static getOrCreate(e){return Gt._instance||(Gt._instance=new Gt(e)),Gt._instance}constructor(e){this.storageService=e,this.inMemoryValues=new Set,this._onDidChangeEmitter=new a.Emitter,this.onDidChange=this._onDidChangeEmitter.event,this.load()}delete(e){const t=this.inMemoryValues.delete(e);return this.save(),t}add(e){return this.inMemoryValues.add(e),this.save(),this}has(e){return this.inMemoryValues.has(e)}forEach(e,t){return this.load(),this.inMemoryValues.forEach(e)}replace(e){this.inMemoryValues=new Set(e),this.save()}load(){let e;const t=this.storageService.get(Gt.FIND_HISTORY_KEY,1);if(t)try{e=JSON.parse(t)}catch{}this.inMemoryValues=new Set(e||[])}save(){const e=[];return this.inMemoryValues.forEach(t=>e.push(t)),new Promise(t=>{this.storageService.store(Gt.FIND_HISTORY_KEY,JSON.stringify(e),1,0),this._onDidChangeEmitter.fire(e),t()})}},Gt=wi,wi.FIND_HISTORY_KEY="workbench.replace.history",wi._instance=null,wi);nu=Gt=eI([tI(0,o.IStorageService)],nu);var v_=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ye=function(c,e){return function(t,i){e(t,i,c)}},su;const iI=524288;function ou(c,e="single",t=!1){if(!c.hasModel())return null;const i=c.getSelection();if(e==="single"&&i.startLineNumber===i.endLineNumber||e==="multiple"){if(i.isEmpty()){const n=c.getConfiguredWordAtPosition(i.getStartPosition());if(n&&t===!1)return n.word}else if(c.getModel().getValueLengthInRange(i)this._onStateChanged(l))),this._model=null,this._register(this._editor.onDidChangeModel(()=>{const l=this._editor.getModel()&&this._state.isRevealed;this.disposeModel(),this._state.change({searchScope:null,matchCase:this._storageService.getBoolean("editor.matchCase",1,!1),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,!1),isRegex:this._storageService.getBoolean("editor.isRegex",1,!1),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,!1)},!1),l&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(50).loop})}))}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(e){this.saveQueryState(e),e.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),e.searchString&&this.setGlobalBufferTerm(this._state.searchString)}saveQueryState(e){e.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,1),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,1),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,1),e.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,1)}loadQueryState(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",1,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",1,this._state.isRegex),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,this._state.preserveCase)},!1)}isFindInputFocused(){return!!aa.getValue(this._contextKeyService)}getState(){return this._state}closeFindWidget(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()}toggleCaseSensitive(){this._state.change({matchCase:!this._state.matchCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleWholeWords(){this._state.change({wholeWord:!this._state.wholeWord},!1),this._state.isRevealed||this.highlightFindOptions()}toggleRegex(){this._state.change({isRegex:!this._state.isRegex},!1),this._state.isRevealed||this.highlightFindOptions()}togglePreserveCase(){this._state.change({preserveCase:!this._state.preserveCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleSearchScope(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){let e=this._editor.getSelections();e=e.map(t=>(t.endColumn===1&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,this._editor.getModel().getLineMaxColumn(t.endLineNumber-1))),t.isEmpty()?null:t)).filter(t=>!!t),e.length&&this._state.change({searchScope:e},!0)}}setSearchString(e){this._state.isRegex&&(e=a.escapeRegExpCharacters(e)),this._state.change({searchString:e},!1)}highlightFindOptions(e=!1){}async _start(e,t){if(this.disposeModel(),!this._editor.hasModel())return;const i={...t,isRevealed:!0};if(e.seedSearchStringFromSelection==="single"){const n=ou(this._editor,e.seedSearchStringFromSelection,e.seedSearchStringFromNonEmptySelection);n&&(this._state.isRegex?i.searchString=a.escapeRegExpCharacters(n):i.searchString=n)}else if(e.seedSearchStringFromSelection==="multiple"&&!e.updateSearchScope){const n=ou(this._editor,e.seedSearchStringFromSelection);n&&(i.searchString=n)}if(!i.searchString&&e.seedSearchStringFromGlobalClipboard){const n=await this.getGlobalBufferTerm();if(!this._editor.hasModel())return;n&&(i.searchString=n)}if(e.forceRevealReplace||i.isReplaceRevealed?i.isReplaceRevealed=!0:this._findWidgetVisible.get()||(i.isReplaceRevealed=!1),e.updateSearchScope){const n=this._editor.getSelections();n.some(s=>!s.isEmpty())&&(i.searchScope=n)}i.loop=e.loop,this._state.change(i,!1),this._model||(this._model=new yo(this._editor,this._state))}start(e,t){return this._start(e,t)}moveToNextMatch(){return this._model?(this._model.moveToNextMatch(),!0):!1}moveToPrevMatch(){return this._model?(this._model.moveToPrevMatch(),!0):!1}goToMatch(e){return this._model?(this._model.moveToMatch(e),!0):!1}replace(){return this._model?(this._model.replace(),!0):!1}replaceAll(){return this._model?this._editor.getModel()?.isTooLargeForHeapOperation()?(this._notificationService.warn(a.localize(979,"The file is too large to perform a replace all operation.")),!1):(this._model.replaceAll(),!0):!1}selectAllMatches(){return this._model?(this._model.selectAllMatches(),this._editor.focus(),!0):!1}async getGlobalBufferTerm(){return this._editor.getOption(50).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""}setGlobalBufferTerm(e){this._editor.getOption(50).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)}},su=Mn,Mn.ID="editor.contrib.findController",Mn);ge=su=v_([ye(1,o.IContextKeyService),ye(2,o.IStorageService),ye(3,o.IClipboardService),ye(4,o.INotificationService),ye(5,o.IHoverService)],ge);let ru=class extends ge{constructor(e,t,i,n,s,r,l,d,h,u){super(e,i,r,l,s,d),this._contextViewService=t,this._keybindingService=n,this._configurationService=h,this._accessibilityService=u,this._widget=null,this._findOptionsWidget=null,this._findWidgetSearchHistory=iu.getOrCreate(r),this._replaceWidgetHistory=nu.getOrCreate(r)}async _start(e,t){this._widget||this._createFindWidget();const i=this._editor.getSelection();let n=!1;switch(this._editor.getOption(50).autoFindInSelection){case"always":n=!0;break;case"never":n=!1;break;case"multiline":{n=!!i&&i.startLineNumber!==i.endLineNumber;break}}e.updateSearchScope=e.updateSearchScope||n,await super._start(e,t),this._widget&&(e.shouldFocus===2?this._widget.focusReplaceInput():e.shouldFocus===1&&this._widget.focusFindInput())}highlightFindOptions(e=!1){this._widget||this._createFindWidget(),this._state.isRevealed&&!e?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){this._widget=this._register(new pa(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._hoverService,this._findWidgetSearchHistory,this._replaceWidgetHistory,this._configurationService,this._accessibilityService)),this._findOptionsWidget=this._register(new tu(this._editor,this._state,this._keybindingService))}saveViewState(){return this._widget?.getViewState()}restoreViewState(e){this._widget?.setViewState(e)}};ru=v_([ye(1,o.IContextViewService),ye(2,o.IContextKeyService),ye(3,o.IKeybindingService),ye(4,o.INotificationService),ye(5,o.IStorageService),ye(6,o.IClipboardService),ye(7,o.IHoverService),ye(8,o.IConfigurationService),ye(9,o.IAccessibilityService)],ru),o.registerMultiEditorAction(new o.MultiEditorAction({id:j.StartFindAction,label:a.localize2(987,"Find"),precondition:o.ContextKeyExpr.or(o.EditorContextKeys.focus,o.ContextKeyExpr.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:o.MenuId.MenubarEditMenu,group:"3_find",title:a.localize(980,"&&Find"),order:1}})).addImplementation(0,(c,e,t)=>{const i=ge.get(e);return i?i.start({forceRevealReplace:!1,seedSearchStringFromSelection:e.getOption(50).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(50).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(50).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(50).loop}):!1});const nI={description:"Open a new In-Editor Find Widget.",args:[{name:"Open a new In-Editor Find Widget args",schema:{properties:{searchString:{type:"string"},replaceString:{type:"string"},isRegex:{type:"boolean"},matchWholeWord:{type:"boolean"},isCaseSensitive:{type:"boolean"},preserveCase:{type:"boolean"},findInSelection:{type:"boolean"}}}}]};class sI extends o.EditorAction{constructor(){super({id:j.StartFindWithArgs,label:a.localize2(988,"Find with Arguments"),precondition:void 0,kbOpts:{kbExpr:null,primary:0,weight:100},metadata:nI})}async run(e,t,i){const n=ge.get(t);if(n){const s=i?{searchString:i.searchString,replaceString:i.replaceString,isReplaceRevealed:i.replaceString!==void 0,isRegex:i.isRegex,wholeWord:i.matchWholeWord,matchCase:i.isCaseSensitive,preserveCase:i.preserveCase}:{};await n.start({forceRevealReplace:!1,seedSearchStringFromSelection:n.getState().searchString.length===0&&t.getOption(50).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:t.getOption(50).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:1,shouldAnimate:!0,updateSearchScope:i?.findInSelection||!1,loop:t.getOption(50).loop},s),n.setGlobalBufferTerm(n.getState().searchString)}}}class oI extends o.EditorAction{constructor(){super({id:j.StartFindWithSelection,label:a.localize2(989,"Find with Selection"),precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}async run(e,t){const i=ge.get(t);i&&(await i.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(50).loop}),i.setGlobalBufferTerm(i.getState().searchString))}}async function b_(c,e){const t=ge.get(c);if(!t)return;const i=c.getOption(50).closeOnResult,n=t.getState().isRevealed,s=()=>{const r=t.editor.getSelection(),l=e?t.moveToNextMatch():t.moveToPrevMatch();let d=!1;if(l){const h=t.editor.getSelection();(!r&&h||r&&h&&!r.equalsSelection(h))&&(d=!0)}return d?(t.editor.pushUndoStop(),i&&n&&t.isFindInputFocused()&&t.closeFindWidget(),!0):!1};if(!s()&&(await t.start({forceRevealReplace:!1,seedSearchStringFromSelection:t.getState().searchString.length===0&&c.getOption(50).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:c.getOption(50).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:c.getOption(50).loop}),!s())){const r=t.getState();n&&r.matchesCount===0&&r.searchString&&o.alert(a.localize(981,"{0} found for '{1}'",ph,r.searchString))}}o.registerMultiEditorAction(new o.MultiEditorAction({id:j.NextMatchFindAction,label:a.localize2(990,"Find Next"),precondition:void 0,kbOpts:[{kbExpr:o.EditorContextKeys.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:o.ContextKeyExpr.and(o.EditorContextKeys.focus,aa),primary:3,weight:100}]})).addImplementation(0,async(c,e,t)=>b_(e,!0)),o.registerMultiEditorAction(new o.MultiEditorAction({id:j.PreviousMatchFindAction,label:a.localize2(991,"Find Previous"),precondition:void 0,kbOpts:[{kbExpr:o.EditorContextKeys.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:o.ContextKeyExpr.and(o.EditorContextKeys.focus,aa),primary:1027,weight:100}]})).addImplementation(0,async(c,e,t)=>b_(e,!1));class rI extends o.EditorAction{constructor(){super({id:j.GoToMatchFindAction,label:a.localize2(992,"Go to Match..."),precondition:It}),this._highlightDecorations=[]}run(e,t){const i=ge.get(t);if(!i)return;const n=i.getState().matchesCount;if(n<1){e.get(o.INotificationService).notify({severity:o.Severity.Warning,message:a.localize(982,"No matches. Try searching for something else.")});return}const s=e.get(o.IQuickInputService),r=new a.DisposableStore,l=r.add(s.createInputBox());l.placeholder=a.localize(983,"Type a number to go to a specific match (between 1 and {0})",n);const d=u=>{const g=parseInt(u);if(isNaN(g))return;const p=i.getState().matchesCount;if(g>0&&g<=p)return g-1;if(g<0&&g>=-p)return p+g},h=u=>{const g=d(u);if(typeof g=="number"){l.validationMessage=void 0,i.goToMatch(g);const p=i.getState().currentMatch;p&&this.addDecorations(t,p)}else l.validationMessage=a.localize(984,"Please type a number between 1 and {0}",i.getState().matchesCount),this.clearDecorations(t)};r.add(l.onDidChangeValue(u=>{h(u)})),r.add(l.onDidAccept(()=>{const u=d(l.value);typeof u=="number"?(i.goToMatch(u),l.hide()):l.validationMessage=a.localize(985,"Please type a number between 1 and {0}",i.getState().matchesCount)})),r.add(l.onDidHide(()=>{this.clearDecorations(t),r.dispose()})),l.show()}clearDecorations(e){e.changeDecorations(t=>{this._highlightDecorations=t.deltaDecorations(this._highlightDecorations,[])})}addDecorations(e,t){e.changeDecorations(i=>{this._highlightDecorations=i.deltaDecorations(this._highlightDecorations,[{range:t,options:{description:"find-match-quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"find-match-quick-access-range-highlight-overview",overviewRuler:{color:o.themeColorFromId(o.overviewRulerRangeHighlight),position:a.OverviewRulerLane.Full}}}])})}}class C_ extends o.EditorAction{async run(e,t){const i=ge.get(t);if(!i)return;const n=ou(t,"single",!1);n&&i.setSearchString(n),this._run(i)||(await i.start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(50).loop}),this._run(i))}}class aI extends C_{constructor(){super({id:j.NextSelectionMatchFindAction,label:a.localize2(993,"Find Next Selection"),precondition:void 0,kbOpts:{kbExpr:o.EditorContextKeys.focus,primary:2109,weight:100}})}_run(e){return e.moveToNextMatch()}}class lI extends C_{constructor(){super({id:j.PreviousSelectionMatchFindAction,label:a.localize2(994,"Find Previous Selection"),precondition:void 0,kbOpts:{kbExpr:o.EditorContextKeys.focus,primary:3133,weight:100}})}_run(e){return e.moveToPrevMatch()}}o.registerMultiEditorAction(new o.MultiEditorAction({id:j.StartFindReplaceAction,label:a.localize2(995,"Replace"),precondition:o.ContextKeyExpr.or(o.EditorContextKeys.focus,o.ContextKeyExpr.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:o.MenuId.MenubarEditMenu,group:"3_find",title:a.localize(986,"&&Replace"),order:2}})).addImplementation(0,(c,e,t)=>{if(!e.hasModel()||e.getOption(104))return!1;const i=ge.get(e);if(!i)return!1;const n=e.getSelection(),s=i.isFindInputFocused(),r=!n.isEmpty()&&n.startLineNumber===n.endLineNumber&&e.getOption(50).seedSearchStringFromSelection!=="never"&&!s,l=s||r?2:1;return i.start({forceRevealReplace:!0,seedSearchStringFromSelection:r?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(50).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(50).seedSearchStringFromSelection!=="never",shouldFocus:l,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(50).loop})}),o.registerEditorContribution(ge.ID,ru,0),o.registerEditorAction(sI),o.registerEditorAction(oI),o.registerEditorAction(rI),o.registerEditorAction(aI),o.registerEditorAction(lI);const Ze=o.EditorCommand.bindToContribution(ge.get);o.registerEditorCommand(new Ze({id:j.CloseFindWidgetCommand,precondition:It,handler:c=>c.closeFindWidget(),kbOpts:{weight:105,kbExpr:o.ContextKeyExpr.and(o.EditorContextKeys.focus,o.ContextKeyExpr.not("isComposing")),primary:9,secondary:[1033]}})),o.registerEditorCommand(new Ze({id:j.ToggleCaseSensitiveCommand,precondition:void 0,handler:c=>c.toggleCaseSensitive(),kbOpts:{weight:105,kbExpr:o.EditorContextKeys.focus,primary:la.primary,mac:la.mac,win:la.win,linux:la.linux}})),o.registerEditorCommand(new Ze({id:j.ToggleWholeWordCommand,precondition:void 0,handler:c=>c.toggleWholeWords(),kbOpts:{weight:105,kbExpr:o.EditorContextKeys.focus,primary:ca.primary,mac:ca.mac,win:ca.win,linux:ca.linux}})),o.registerEditorCommand(new Ze({id:j.ToggleRegexCommand,precondition:void 0,handler:c=>c.toggleRegex(),kbOpts:{weight:105,kbExpr:o.EditorContextKeys.focus,primary:da.primary,mac:da.mac,win:da.win,linux:da.linux}})),o.registerEditorCommand(new Ze({id:j.ToggleSearchScopeCommand,precondition:void 0,handler:c=>c.toggleSearchScope(),kbOpts:{weight:105,kbExpr:o.EditorContextKeys.focus,primary:ha.primary,mac:ha.mac,win:ha.win,linux:ha.linux}})),o.registerEditorCommand(new Ze({id:j.TogglePreserveCaseCommand,precondition:void 0,handler:c=>c.togglePreserveCase(),kbOpts:{weight:105,kbExpr:o.EditorContextKeys.focus,primary:ua.primary,mac:ua.mac,win:ua.win,linux:ua.linux}})),o.registerEditorCommand(new Ze({id:j.ReplaceOneAction,precondition:It,handler:c=>c.replace(),kbOpts:{weight:105,kbExpr:o.EditorContextKeys.focus,primary:3094}})),o.registerEditorCommand(new Ze({id:j.ReplaceOneAction,precondition:It,handler:c=>c.replace(),kbOpts:{weight:105,kbExpr:o.ContextKeyExpr.and(o.EditorContextKeys.focus,ah,o.EditorContextKeys.isComposing.negate()),primary:3}})),o.registerEditorCommand(new Ze({id:j.ReplaceAllAction,precondition:It,handler:c=>c.replaceAll(),kbOpts:{weight:105,kbExpr:o.EditorContextKeys.focus,primary:2563}})),o.registerEditorCommand(new Ze({id:j.ReplaceAllAction,precondition:It,handler:c=>c.replaceAll(),kbOpts:{weight:105,kbExpr:o.ContextKeyExpr.and(o.EditorContextKeys.focus,ah),primary:void 0,mac:{primary:2051}}})),o.registerEditorCommand(new Ze({id:j.SelectAllMatchesAction,precondition:It,handler:c=>c.selectAllMatches(),kbOpts:{weight:105,kbExpr:o.EditorContextKeys.focus,primary:515}}));const cI={0:" ",1:"u",2:"r"},S_=65535,Xe=16777215,y_=4278190080;class au{constructor(e){const t=Math.ceil(e/32);this._states=new Uint32Array(t)}get(e){const t=e/32|0,i=e%32;return(this._states[t]&1<S_)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=t,this._collapseStates=new au(e.length),this._userDefinedStates=new au(e.length),this._recoveredStates=new au(e.length),this._types=i,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;const e=[],t=(i,n)=>{const s=e[e.length-1];return this.getStartLineNumber(s)<=i&&this.getEndLineNumber(s)>=n};for(let i=0,n=this._startIndexes.length;iXe||r>Xe)throw new Error("startLineNumber or endLineNumber must not exceed "+Xe);for(;e.length>0&&!t(s,r);)e.pop();const l=e.length>0?e[e.length-1]:-1;e.push(i),this._startIndexes[i]=s+((l&255)<<24),this._endIndexes[i]=r+((l&65280)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(e){return this._startIndexes[e]&Xe}getEndLineNumber(e){return this._endIndexes[e]&Xe}getType(e){return this._types?this._types[e]:void 0}hasTypes(){return!!this._types}isCollapsed(e){return this._collapseStates.get(e)}setCollapsed(e,t){this._collapseStates.set(e,t)}isUserDefined(e){return this._userDefinedStates.get(e)}setUserDefined(e,t){return this._userDefinedStates.set(e,t)}isRecovered(e){return this._recoveredStates.get(e)}setRecovered(e,t){return this._recoveredStates.set(e,t)}getSource(e){return this.isUserDefined(e)?1:this.isRecovered(e)?2:0}setSource(e,t){t===1?(this.setUserDefined(e,!0),this.setRecovered(e,!1)):t===2?(this.setUserDefined(e,!1),this.setRecovered(e,!0)):(this.setUserDefined(e,!1),this.setRecovered(e,!1))}setCollapsedAllOfType(e,t){let i=!1;if(this._types)for(let n=0;n>>24)+((this._endIndexes[e]&y_)>>>16);return t===S_?-1:t}contains(e,t){return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t}findIndex(e){let t=0,i=this._startIndexes.length;if(i===0)return-1;for(;t=0){if(this.getEndLineNumber(t)>=e)return t;for(t=this.getParentIndex(t);t!==-1;){if(this.contains(t,e))return t;t=this.getParentIndex(t)}}return-1}toString(){const e=[];for(let t=0;tArray.isArray(v)?(S=>SS=g.startLineNumber))u&&u.startLineNumber===g.startLineNumber?(g.source===1?v=g:(v=u,v.isCollapsed=g.isCollapsed&&(u.endLineNumber===g.endLineNumber||!n?.startsInside(u.startLineNumber+1,u.endLineNumber+1)),v.source=0),u=r(++d)):(v=g,g.isCollapsed&&g.source===0&&(v.source=2)),g=l(++h);else{let b=h,S=g;for(;;){if(!S||S.startLineNumber>u.endLineNumber){v=u;break}if(S.source===1&&S.endLineNumber>u.endLineNumber)break;S=l(++b)}u=r(++d)}if(v){for(;f&&f.endLineNumberv.startLineNumber&&v.startLineNumber>m&&v.endLineNumber<=i&&(!f||f.endLineNumber>=v.endLineNumber)&&(_.push(v),m=v.startLineNumber,f&&p.push(f),f=v)}}return _}}class dI{constructor(e,t){this.ranges=e,this.index=t}get startLineNumber(){return this.ranges.getStartLineNumber(this.index)}get endLineNumber(){return this.ranges.getEndLineNumber(this.index)}get regionIndex(){return this.index}get parentIndex(){return this.ranges.getParentIndex(this.index)}get isCollapsed(){return this.ranges.isCollapsed(this.index)}containedBy(e){return e.startLineNumber<=this.startLineNumber&&e.endLineNumber>=this.endLineNumber}containsLine(e){return this.startLineNumber<=e&&e<=this.endLineNumber}}class hI{get regions(){return this._regions}get textModel(){return this._textModel}constructor(e,t){this._updateEventEmitter=new a.Emitter,this.onDidChange=this._updateEventEmitter.event,this._textModel=e,this._decorationProvider=t,this._regions=new we(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[]}toggleCollapseState(e){if(!e.length)return;e=e.sort((i,n)=>i.regionIndex-n.regionIndex);const t={};this._decorationProvider.changeDecorations(i=>{let n=0,s=-1,r=-1;const l=d=>{for(;nr&&(r=h),n++}};for(const d of e){const h=d.regionIndex,u=this._editorDecorationIds[h];if(u&&!t[u]){t[u]=!0,l(h);const g=!this._regions.isCollapsed(h);this._regions.setCollapsed(h,g),s=Math.max(s,this._regions.getEndLineNumber(h))}}l(this._regions.length)}),this._updateEventEmitter.fire({model:this,collapseStateChanged:e})}removeManualRanges(e){const t=new Array,i=n=>{for(const s of e)if(!(s.startLineNumber>n.endLineNumber||n.startLineNumber>s.endLineNumber))return!0;return!1};for(let n=0;ni&&(i=l)}this._decorationProvider.changeDecorations(n=>this._editorDecorationIds=n.deltaDecorations(this._editorDecorationIds,t)),this._regions=e,this._updateEventEmitter.fire({model:this})}_currentFoldedOrManualRanges(e){const t=[];for(let i=0,n=this._regions.length;i=r.endLineNumber||r.startLineNumber<1||r.endLineNumber>i)continue;const l=this._getLinesChecksum(r.startLineNumber+1,r.endLineNumber);t.push({startLineNumber:r.startLineNumber,endLineNumber:r.endLineNumber,isCollapsed:r.isCollapsed,source:r.source,checksum:l})}return t.length>0?t:void 0}applyMemento(e){if(!Array.isArray(e))return;const t=[],i=this._textModel.getLineCount();for(const s of e){if(s.startLineNumber>=s.endLineNumber||s.startLineNumber<1||s.endLineNumber>i)continue;const r=this._getLinesChecksum(s.startLineNumber+1,s.endLineNumber);(!s.checksum||r===s.checksum)&&t.push({startLineNumber:s.startLineNumber,endLineNumber:s.endLineNumber,type:void 0,isCollapsed:s.isCollapsed??!0,source:s.source??0})}const n=we.sanitizeAndMerge(this._regions,t,i);this.updatePost(we.fromFoldRanges(n))}_getLinesChecksum(e,t){return a.hash(this._textModel.getLineContent(e)+this._textModel.getLineContent(t))%1e6}dispose(){this._decorationProvider.removeDecorations(this._editorDecorationIds),this._updateEventEmitter.dispose()}getAllRegionsAtLine(e,t){const i=[];if(this._regions){let n=this._regions.findRange(e),s=1;for(;n>=0;){const r=this._regions.toRegion(n);(!t||t(r,s))&&i.push(r),s++,n=r.parentIndex}}return i}getRegionAtLine(e){if(this._regions){const t=this._regions.findRange(e);if(t>=0)return this._regions.toRegion(t)}return null}getRegionsInside(e,t){const i=[],n=e?e.regionIndex+1:0,s=e?e.endLineNumber:Number.MAX_VALUE;if(t&&t.length===2){const r=[];for(let l=n,d=this._regions.length;l0&&!h.containedBy(r[r.length-1]);)r.pop();r.push(h),t(h,r.length)&&i.push(h)}else break}}else for(let r=n,l=this._regions.length;r1){const l=c.getRegionsInside(s,(d,h)=>d.isCollapsed!==r&&h0)for(const s of i){const r=c.getRegionAtLine(s);if(r&&(r.isCollapsed!==e&&n.push(r),t>1)){const l=c.getRegionsInside(r,(d,h)=>d.isCollapsed!==e&&hr.isCollapsed!==e&&ll.isCollapsed!==e&&d<=t);n.push(...r)}c.toggleCollapseState(n)}function uI(c,e,t){const i=[];for(const n of t){const s=c.getAllRegionsAtLine(n,r=>r.isCollapsed!==e);s.length>0&&i.push(s[0])}c.toggleCollapseState(i)}function gI(c,e,t,i){const n=(r,l)=>l===e&&r.isCollapsed!==t&&!i.some(d=>r.containsLine(d)),s=c.getRegionsInside(null,n);c.toggleCollapseState(s)}function I_(c,e,t){const i=[];for(const r of t){const l=c.getAllRegionsAtLine(r,void 0);l.length>0&&i.push(l[0])}const n=r=>i.every(l=>!l.containedBy(r)&&!r.containedBy(l))&&r.isCollapsed!==e,s=c.getRegionsInside(null,n);c.toggleCollapseState(s)}function cu(c,e,t){const i=c.textModel,n=c.regions,s=[];for(let r=n.length-1;r>=0;r--)if(t!==n.isCollapsed(r)){const l=n.getStartLineNumber(r);e.test(i.getLineContent(l))&&s.push(n.toRegion(r))}c.toggleCollapseState(s)}function du(c,e,t){const i=c.regions,n=[];for(let s=i.length-1;s>=0;s--)t!==i.isCollapsed(s)&&e===i.getType(s)&&n.push(i.toRegion(s));c.toggleCollapseState(n)}function pI(c,e){let t=null;const i=e.getRegionAtLine(c);if(i!==null&&(t=i.startLineNumber,c===t)){const n=i.parentIndex;n!==-1?t=e.regions.getStartLineNumber(n):t=null}return t}function fI(c,e){let t=e.getRegionAtLine(c);if(t!==null&&t.startLineNumber===c){if(c!==t.startLineNumber)return t.startLineNumber;{const i=t.parentIndex;let n=0;for(i!==-1&&(n=e.regions.getStartLineNumber(t.parentIndex));t!==null;)if(t.regionIndex>0){if(t=e.regions.toRegion(t.regionIndex-1),t.startLineNumber<=n)return null;if(t.parentIndex===i)return t.startLineNumber}else return null}}else if(e.regions.length>0)for(t=e.regions.toRegion(e.regions.length-1);t!==null;){if(t.startLineNumber0?t=e.regions.toRegion(t.regionIndex-1):t=null}return null}function mI(c,e){let t=e.getRegionAtLine(c);if(t!==null&&t.startLineNumber===c){const i=t.parentIndex;let n=0;if(i!==-1)n=e.regions.getEndLineNumber(t.parentIndex);else{if(e.regions.length===0)return null;n=e.regions.getEndLineNumber(e.regions.length-1)}for(;t!==null;)if(t.regionIndex=n)return null;if(t.parentIndex===i)return t.startLineNumber}else return null}else if(e.regions.length>0)for(t=e.regions.toRegion(0);t!==null;){if(t.startLineNumber>c)return t.startLineNumber;t.regionIndexthis.updateHiddenRanges()),this._hiddenRanges=[],e.regions.length&&this.updateHiddenRanges()}notifyChangeModelContent(e){this._hiddenRanges.length&&!this._hasLineChanges&&(this._hasLineChanges=e.changes.some(t=>t.range.endLineNumber!==t.range.startLineNumber||o.countEOL(t.text)[0]!==0))}updateHiddenRanges(){let e=!1;const t=[];let i=0,n=0,s=Number.MAX_VALUE,r=-1;const l=this._foldingModel.regions;for(;i0}isHidden(e){return x_(this._hiddenRanges,e)!==null}adjustSelections(e){let t=!1;const i=this._foldingModel.textModel;let n=null;const s=r=>((!n||!vI(r,n))&&(n=x_(this._hiddenRanges,r)),n?n.startLineNumber-1:null);for(let r=0,l=e.length;r0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null),this._updateEventEmitter.dispose()}}function vI(c,e){return c>=e.startLineNumber&&c<=e.endLineNumber}function x_(c,e){const t=a.findFirstIdxMonotonousOrArrLen(c,i=>e=0&&c[t].endLineNumber>=e?c[t]:null}const bI=5e3,CI="indent";class hu{constructor(e,t,i){this.editorModel=e,this.languageConfigurationService=t,this.foldingRangesLimit=i,this.id=CI}dispose(){}compute(e){const t=this.languageConfigurationService.getLanguageConfiguration(this.editorModel.getLanguageId()).foldingRules,i=t&&!!t.offSide,n=t&&t.markers;return Promise.resolve(wI(this.editorModel,i,n,this.foldingRangesLimit))}}let SI=class{constructor(e){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}insertFirst(e,t,i){if(e>Xe||t>Xe)return;const n=this._length;this._startIndexes[n]=e,this._endIndexes[n]=t,this._length++,i<1e3&&(this._indentOccurrences[i]=(this._indentOccurrences[i]||0)+1)}toIndentRanges(e){const t=this._foldingRangesLimit.limit;if(this._length<=t){this._foldingRangesLimit.update(this._length,!1);const i=new Uint32Array(this._length),n=new Uint32Array(this._length);for(let s=this._length-1,r=0;s>=0;s--,r++)i[r]=this._startIndexes[s],n[r]=this._endIndexes[s];return new we(i,n)}else{this._foldingRangesLimit.update(this._length,t);let i=0,n=this._indentOccurrences.length;for(let d=0;dt){n=d;break}i+=h}}const s=e.getOptions().tabSize,r=new Uint32Array(t),l=new Uint32Array(t);for(let d=this._length-1,h=0;d>=0;d--){const u=this._startIndexes[d],g=e.getLineContent(u),p=o.computeIndentLevel(g,s);(p{}};function wI(c,e,t,i=yI){const n=c.getOptions().tabSize,s=new SI(i);let r,l,d;t&&(t.start.flags===t.end.flags?r=new RegExp(`(${t.start.source})|(?:${t.end.source})`,t.start.flags):(l=t.start,d=t.end));const h=[],u=c.getLineCount()+1;h.push({indent:-1,endAbove:u,line:u});for(let g=c.getLineCount();g>0;g--){const p=c.getLineContent(g),f=o.computeIndentLevel(p,n);let m=h[h.length-1];if(f===-1){e&&(m.endAbove=g);continue}let _=!1,v=!1,b;if(r?(r.lastIndex=0,(b=r.exec(p))&&(_=!!b[1],v=!_)):(l&&(l.lastIndex=0,_=l.test(p)),!_&&d&&(d.lastIndex=0,v=d.test(p))),_||v)if(_){let S=h.length-1;for(;S>0&&h[S].indent!==-2;)S--;if(S>0){h.length=S+1,m=h[S],s.insertFirst(g,m.line,f),m.line=g,m.indent=f,m.endAbove=g;continue}}else{h.push({indent:-2,endAbove:g,line:g});continue}if(m.indent>f){do h.pop(),m=h[h.length-1];while(m.indent>f);const S=m.endAbove-1;S-g>=1&&s.insertFirst(g,S,f)}m.indent===f?m.endAbove=g:h.push({indent:f,endAbove:g,line:g})}return s.toIndentRanges(c)}const II=o.registerColor("editor.foldBackground",{light:o.transparent(o.editorSelectionBackground,.3),dark:o.transparent(o.editorSelectionBackground,.3),hcDark:null,hcLight:null},a.localize(1045,"Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations."),!0);o.registerColor("editor.foldPlaceholderForeground",{light:"#808080",dark:"#808080",hcDark:null,hcLight:null},a.localize(1046,"Color of the collapsed text after the first line of a folded range.")),o.registerColor("editorGutter.foldingControlForeground",o.iconForeground,a.localize(1047,"Color of the folding control in the editor gutter."));const za=o.registerIcon("folding-expanded",a.Codicon.chevronDown,a.localize(1048,"Icon for expanded ranges in the editor glyph margin.")),Va=o.registerIcon("folding-collapsed",a.Codicon.chevronRight,a.localize(1049,"Icon for collapsed ranges in the editor glyph margin.")),E_=o.registerIcon("folding-manual-collapsed",Va,a.localize(1050,"Icon for manually collapsed ranges in the editor glyph margin.")),L_=o.registerIcon("folding-manual-expanded",za,a.localize(1051,"Icon for manually expanded ranges in the editor glyph margin.")),uu={color:o.themeColorFromId(II),position:1},ws=a.localize(1052,"Click to expand the range."),Ba=a.localize(1053,"Click to collapse the range."),Q=class Q{constructor(e){this.editor=e,this.showFoldingControls="mouseover",this.showFoldingHighlights=!0}getDecorationOption(e,t,i){return t?Q.HIDDEN_RANGE_DECORATION:this.showFoldingControls==="never"?e?this.showFoldingHighlights?Q.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION:Q.NO_CONTROLS_COLLAPSED_RANGE_DECORATION:Q.NO_CONTROLS_EXPANDED_RANGE_DECORATION:e?i?this.showFoldingHighlights?Q.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:Q.MANUALLY_COLLAPSED_VISUAL_DECORATION:this.showFoldingHighlights?Q.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:Q.COLLAPSED_VISUAL_DECORATION:this.showFoldingControls==="mouseover"?i?Q.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION:Q.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:i?Q.MANUALLY_EXPANDED_VISUAL_DECORATION:Q.EXPANDED_VISUAL_DECORATION}changeDecorations(e){return this.editor.changeDecorations(e)}removeDecorations(e){this.editor.removeDecorations(e)}};Q.COLLAPSED_VISUAL_DECORATION=o.ModelDecorationOptions.register({description:"folding-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,linesDecorationsTooltip:ws,firstLineDecorationClassName:o.ThemeIcon.asClassName(Va)}),Q.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=o.ModelDecorationOptions.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:uu,isWholeLine:!0,linesDecorationsTooltip:ws,firstLineDecorationClassName:o.ThemeIcon.asClassName(Va)}),Q.MANUALLY_COLLAPSED_VISUAL_DECORATION=o.ModelDecorationOptions.register({description:"folding-manually-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,linesDecorationsTooltip:ws,firstLineDecorationClassName:o.ThemeIcon.asClassName(E_)}),Q.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=o.ModelDecorationOptions.register({description:"folding-manually-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:uu,isWholeLine:!0,linesDecorationsTooltip:ws,firstLineDecorationClassName:o.ThemeIcon.asClassName(E_)}),Q.NO_CONTROLS_COLLAPSED_RANGE_DECORATION=o.ModelDecorationOptions.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,linesDecorationsTooltip:ws}),Q.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION=o.ModelDecorationOptions.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:uu,isWholeLine:!0,linesDecorationsTooltip:ws}),Q.EXPANDED_VISUAL_DECORATION=o.ModelDecorationOptions.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+o.ThemeIcon.asClassName(za),linesDecorationsTooltip:Ba}),Q.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=o.ModelDecorationOptions.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:o.ThemeIcon.asClassName(za),linesDecorationsTooltip:Ba}),Q.MANUALLY_EXPANDED_VISUAL_DECORATION=o.ModelDecorationOptions.register({description:"folding-manually-expanded-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+o.ThemeIcon.asClassName(L_),linesDecorationsTooltip:Ba}),Q.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION=o.ModelDecorationOptions.register({description:"folding-manually-expanded-auto-hide-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:o.ThemeIcon.asClassName(L_),linesDecorationsTooltip:Ba}),Q.NO_CONTROLS_EXPANDED_RANGE_DECORATION=o.ModelDecorationOptions.register({description:"folding-no-controls-range-decoration",stickiness:0,isWholeLine:!0}),Q.HIDDEN_RANGE_DECORATION=o.ModelDecorationOptions.register({description:"folding-hidden-range-decoration",stickiness:1});let gu=Q;const xI={},EI="syntax";class pu{constructor(e,t,i,n,s){this.editorModel=e,this.providers=t,this.handleFoldingRangesChange=i,this.foldingRangesLimit=n,this.fallbackRangeProvider=s,this.id=EI,this.disposables=new a.DisposableStore,s&&this.disposables.add(s);for(const r of t)typeof r.onDidChange=="function"&&this.disposables.add(r.onDidChange(i))}compute(e){return LI(this.providers,this.editorModel,e).then(t=>this.editorModel.isDisposed()?null:t?RI(t,this.foldingRangesLimit):this.fallbackRangeProvider?.compute(e)??null)}dispose(){this.disposables.dispose()}}function LI(c,e,t){let i=null;const n=c.map((s,r)=>Promise.resolve(s.provideFoldingRanges(e,xI,t)).then(l=>{if(!t.isCancellationRequested&&Array.isArray(l)){Array.isArray(i)||(i=[]);const d=e.getLineCount();for(const h of l)h.start>0&&h.end>h.start&&h.end<=d&&i.push({start:h.start,end:h.end,rank:r,kind:h.kind})}},a.onUnexpectedExternalError));return Promise.all(n).then(s=>i)}class DI{constructor(e){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=e}add(e,t,i,n){if(e>Xe||t>Xe)return;const s=this._length;this._startIndexes[s]=e,this._endIndexes[s]=t,this._nestingLevels[s]=n,this._types[s]=i,this._length++,n<30&&(this._nestingLevelCounts[n]=(this._nestingLevelCounts[n]||0)+1)}toIndentRanges(){const e=this._foldingRangesLimit.limit;if(this._length<=e){this._foldingRangesLimit.update(this._length,!1);const t=new Uint32Array(this._length),i=new Uint32Array(this._length);for(let n=0;ne){i=l;break}t+=d}}const n=new Uint32Array(e),s=new Uint32Array(e),r=[];for(let l=0,d=0;l{let d=r.start-l.start;return d===0&&(d=r.rank-l.rank),d}),i=new DI(e);let n;const s=[];for(const r of t)if(!n)n=r,i.add(r.start,r.end,r.kind&&r.kind.value,s.length);else if(r.start>n.start)if(r.end<=n.end)s.push(n),n=r,i.add(r.start,r.end,r.kind&&r.kind.value,s.length);else{if(r.start>n.end){do n=s.pop();while(n&&r.start>n.end);n&&s.push(n),n=r}i.add(r.start,r.end,r.kind&&r.kind.value,s.length)}return i.toIndentRanges()}var TI=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Fo=function(c,e){return function(t,i){e(t,i,c)}},zo;const H=new o.RawContextKey("foldingEnabled",!1);let Zt=(Pn=class extends a.Disposable{static get(e){return e.getContribution(zo.ID)}static getFoldingRangeProviders(e,t){const i=e.foldingRangeProvider.ordered(t);return zo._foldingRangeSelector?.(i,t)??i}constructor(e,t,i,n,s,r){super(),this.contextKeyService=t,this.languageConfigurationService=i,this.languageFeaturesService=r,this.localToDispose=this._register(new a.DisposableStore),this.editor=e,this._foldingLimitReporter=this._register(new D_(e));const l=this.editor.getOptions();this._isEnabled=l.get(52),this._useFoldingProviders=l.get(53)!=="indentation",this._unfoldOnClickAfterEndOfLine=l.get(57),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=l.get(55),this.updateDebounceInfo=s.for(r.foldingRangeProvider,"Folding",{min:200}),this.foldingModel=null,this.hiddenRangeModel=null,this.rangeProvider=null,this.foldingRegionPromise=null,this.foldingModelPromise=null,this.updateScheduler=null,this.cursorChangedScheduler=null,this.mouseDownInfo=null,this.foldingDecorationProvider=new gu(e),this.foldingDecorationProvider.showFoldingControls=l.get(126),this.foldingDecorationProvider.showFoldingHighlights=l.get(54),this.foldingEnabled=H.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel(()=>this.onModelChanged())),this._register(this.editor.onDidChangeConfiguration(d=>{if(d.hasChanged(52)&&(this._isEnabled=this.editor.getOptions().get(52),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),d.hasChanged(56)&&this.onModelChanged(),d.hasChanged(126)||d.hasChanged(54)){const h=this.editor.getOptions();this.foldingDecorationProvider.showFoldingControls=h.get(126),this.foldingDecorationProvider.showFoldingHighlights=h.get(54),this.triggerFoldingModelChanged()}d.hasChanged(53)&&(this._useFoldingProviders=this.editor.getOptions().get(53)!=="indentation",this.onFoldingStrategyChanged()),d.hasChanged(57)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(57)),d.hasChanged(55)&&(this._foldingImportsByDefault=this.editor.getOptions().get(55))})),this.onModelChanged()}saveViewState(){const e=this.editor.getModel();if(!e||!this._isEnabled||e.isTooLargeForTokenization())return{};if(this.foldingModel){const t=this.foldingModel.getMemento(),i=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:t,lineCount:e.getLineCount(),provider:i,foldedImports:this._currentModelHasFoldedImports}}}restoreViewState(e){const t=this.editor.getModel();if(!(!t||!this._isEnabled||t.isTooLargeForTokenization()||!this.hiddenRangeModel)&&e&&(this._currentModelHasFoldedImports=!!e.foldedImports,e.collapsedRegions&&e.collapsedRegions.length>0&&this.foldingModel)){this._restoringViewState=!0;try{this.foldingModel.applyMemento(e.collapsedRegions)}finally{this._restoringViewState=!1}}}onModelChanged(){this.localToDispose.clear();const e=this.editor.getModel();!this._isEnabled||!e||e.isTooLargeForTokenization()||(this._currentModelHasFoldedImports=!1,this.foldingModel=new hI(e,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new _I(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange(t=>this.onHiddenRangesChanges(t))),this.updateScheduler=new a.Delayer(this.updateDebounceInfo.get(e)),this.localToDispose.add(this.updateScheduler),this.cursorChangedScheduler=new a.RunOnceScheduler(()=>this.revealCursor(),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(this.languageFeaturesService.foldingRangeProvider.onDidChange(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelContent(t=>this.onDidChangeModelContent(t))),this.localToDispose.add(this.editor.onDidChangeCursorPosition(()=>this.onCursorPositionChanged())),this.localToDispose.add(this.editor.onMouseDown(t=>this.onEditorMouseDown(t))),this.localToDispose.add(this.editor.onMouseUp(t=>this.onEditorMouseUp(t))),this.localToDispose.add({dispose:()=>{this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.updateScheduler?.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,this.rangeProvider?.dispose(),this.rangeProvider=null}}),this.triggerFoldingModelChanged())}onFoldingStrategyChanged(){this.rangeProvider?.dispose(),this.rangeProvider=null,this.triggerFoldingModelChanged()}getRangeProvider(e){if(this.rangeProvider)return this.rangeProvider;const t=new hu(e,this.languageConfigurationService,this._foldingLimitReporter);if(this.rangeProvider=t,this._useFoldingProviders&&this.foldingModel){const i=zo.getFoldingRangeProviders(this.languageFeaturesService,e);i.length>0&&(this.rangeProvider=new pu(e,i,()=>this.triggerFoldingModelChanged(),this._foldingLimitReporter,t))}return this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onDidChangeModelContent(e){this.hiddenRangeModel?.notifyChangeModelContent(e),this.triggerFoldingModelChanged()}triggerFoldingModelChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger(()=>{const e=this.foldingModel;if(!e)return null;const t=new a.StopWatch,i=this.getRangeProvider(e.textModel),n=this.foldingRegionPromise=a.createCancelablePromise(s=>i.compute(s));return n.then(s=>{if(s&&n===this.foldingRegionPromise){let r;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){const h=s.setCollapsedAllOfType(a.FoldingRangeKind.Imports.value,!0);h&&(r=o.StableEditorScrollState.capture(this.editor),this._currentModelHasFoldedImports=h)}const l=this.editor.getSelections();e.update(s,NI(l)),r?.restore(this.editor);const d=this.updateDebounceInfo.update(e.textModel,t.elapsed());this.updateScheduler&&(this.updateScheduler.defaultDelay=d)}return e})}).then(void 0,e=>(a.onUnexpectedError(e),null)))}onHiddenRangesChanges(e){if(this.hiddenRangeModel&&e.length&&!this._restoringViewState){const t=this.editor.getSelections();t&&this.hiddenRangeModel.adjustSelections(t)&&this.editor.setSelections(t)}this.editor.setHiddenAreas(e,this)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){const e=this.getFoldingModel();e&&e.then(t=>{if(t){const i=this.editor.getSelections();if(i&&i.length>0){const n=[];for(const s of i){const r=s.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(r)&&n.push(...t.getAllRegionsAtLine(r,l=>l.isCollapsed&&r>l.startLineNumber))}n.length&&(t.toggleCollapseState(n),this.reveal(i[0].getPosition()))}}}).then(void 0,a.onUnexpectedError)}onEditorMouseDown(e){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!e.target||!e.target.range||!e.event.leftButton&&!e.event.middleButton)return;const t=e.target.range;let i=!1;switch(e.target.type){case 4:{const n=e.target.detail,s=e.target.element.offsetLeft;if(n.offsetX-s<4)return;i=!0;break}case 7:{if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()&&!e.target.detail.isAfterLines)break;return}case 6:{if(this.hiddenRangeModel.hasRanges()){const n=this.editor.getModel();if(n&&t.startColumn===n.getLineMaxColumn(t.startLineNumber))break}return}default:return}this.mouseDownInfo={lineNumber:t.startLineNumber,iconClicked:i}}onEditorMouseUp(e){const t=this.foldingModel;if(!t||!this.mouseDownInfo||!e.target)return;const i=this.mouseDownInfo.lineNumber,n=this.mouseDownInfo.iconClicked,s=e.target.range;if(!s||s.startLineNumber!==i)return;if(n){if(e.target.type!==4)return}else{const l=this.editor.getModel();if(!l||s.startColumn!==l.getLineMaxColumn(i))return}const r=t.getRegionAtLine(i);if(r&&r.startLineNumber===i){const l=r.isCollapsed;if(n||l){const d=e.event.altKey;let h=[];if(d){const u=p=>!p.containedBy(r)&&!r.containedBy(p),g=t.getRegionsInside(null,u);for(const p of g)p.isCollapsed&&h.push(p);h.length===0&&(h=g)}else{const u=e.event.middleButton||e.event.shiftKey;if(u)for(const g of t.getRegionsInside(r))g.isCollapsed===l&&h.push(g);(l||!u||h.length===0)&&h.push(r)}t.toggleCollapseState(h),this.reveal({lineNumber:i,column:1})}}}reveal(e){this.editor.revealPositionInCenterIfOutsideViewport(e,0)}},zo=Pn,Pn.ID="editor.contrib.folding",Pn);Zt=zo=TI([Fo(1,o.IContextKeyService),Fo(2,o.ILanguageConfigurationService),Fo(3,o.INotificationService),Fo(4,o.ILanguageFeatureDebounceService),Fo(5,o.ILanguageFeaturesService)],Zt);class D_ extends a.Disposable{constructor(e){super(),this.editor=e,this._onDidChange=this._register(new a.Emitter),this._computed=0,this._limited=!1}get limit(){return this.editor.getOptions().get(56)}update(e,t){(e!==this._computed||t!==this._limited)&&(this._computed=e,this._limited=t,this._onDidChange.fire())}}class ie extends o.EditorAction{runEditorCommand(e,t,i){const n=e.get(o.ILanguageConfigurationService),s=Zt.get(t);if(!s)return;const r=s.getFoldingModel();if(r)return this.reportTelemetry(e,t),r.then(l=>{if(l){this.invoke(s,l,t,i,n);const d=t.getSelection();d&&s.reveal(d.getStartPosition())}})}getSelectedLines(e){const t=e.getSelections();return t?t.map(i=>i.startLineNumber):[]}getLineNumbers(e,t){return e&&e.selectionLines?e.selectionLines.map(i=>i+1):this.getSelectedLines(t)}run(e,t){}}function NI(c){return!c||c.length===0?{startsInside:()=>!1}:{startsInside(e,t){for(const i of c){const n=i.startLineNumber;if(n>=e&&n<=t)return!0}return!1}}}function R_(c){if(!a.isUndefined(c)){if(!a.isObject(c))return!1;const e=c;if(!a.isUndefined(e.levels)&&!a.isNumber(e.levels)||!a.isUndefined(e.direction)&&!a.isString(e.direction)||!a.isUndefined(e.selectionLines)&&(!Array.isArray(e.selectionLines)||!e.selectionLines.every(a.isNumber)))return!1}return!0}class MI extends ie{constructor(){super({id:"editor.unfold",label:a.localize2(1025,"Unfold"),precondition:H,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:3166,mac:{primary:2654},weight:100},metadata:{description:"Unfold the content in the editor",args:[{name:"Unfold editor argument",description:`Property-value pairs that can be passed through this argument: + * 'levels': Number of levels to unfold. If not set, defaults to 1. + * 'direction': If 'up', unfold given number of levels up otherwise unfolds down. + * 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used. + `,constraint:R_,schema:{type:"object",properties:{levels:{type:"number",default:1},direction:{type:"string",enum:["up","down"],default:"down"},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,i,n){const s=n&&n.levels||1,r=this.getLineNumbers(n,i);n&&n.direction==="up"?w_(t,!1,s,r):ys(t,!1,s,r)}}class PI extends ie{constructor(){super({id:"editor.unfoldRecursively",label:a.localize2(1026,"Unfold Recursively"),precondition:H,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:a.KeyChord(2089,2142),weight:100}})}invoke(e,t,i,n){ys(t,!1,Number.MAX_VALUE,this.getSelectedLines(i))}}class OI extends ie{constructor(){super({id:"editor.fold",label:a.localize2(1027,"Fold"),precondition:H,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:3164,mac:{primary:2652},weight:100},metadata:{description:"Fold the content in the editor",args:[{name:"Fold editor argument",description:`Property-value pairs that can be passed through this argument: + * 'levels': Number of levels to fold. + * 'direction': If 'up', folds given number of levels up otherwise folds down. + * 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used. + If no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead. + `,constraint:R_,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,i,n){const s=this.getLineNumbers(n,i),r=n&&n.levels,l=n&&n.direction;typeof r!="number"&&typeof l!="string"?uI(t,!0,s):l==="up"?w_(t,!0,r||1,s):ys(t,!0,r||1,s)}}class AI extends ie{constructor(){super({id:"editor.toggleFold",label:a.localize2(1028,"Toggle Fold"),precondition:H,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:a.KeyChord(2089,2090),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);lu(t,1,n)}}class FI extends ie{constructor(){super({id:"editor.foldRecursively",label:a.localize2(1029,"Fold Recursively"),precondition:H,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:a.KeyChord(2089,2140),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);ys(t,!0,Number.MAX_VALUE,n)}}class zI extends ie{constructor(){super({id:"editor.toggleFoldRecursively",label:a.localize2(1030,"Toggle Fold Recursively"),precondition:H,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:a.KeyChord(2089,3114),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);lu(t,Number.MAX_VALUE,n)}}class VI extends ie{constructor(){super({id:"editor.foldAllBlockComments",label:a.localize2(1031,"Fold All Block Comments"),precondition:H,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:a.KeyChord(2089,2138),weight:100}})}invoke(e,t,i,n,s){if(t.regions.hasTypes())du(t,a.FoldingRangeKind.Comment.value,!0);else{const r=i.getModel();if(!r)return;const l=s.getLanguageConfiguration(r.getLanguageId()).comments;if(l&&l.blockCommentStartToken){const d=new RegExp("^\\s*"+a.escapeRegExpCharacters(l.blockCommentStartToken));cu(t,d,!0)}}}}class BI extends ie{constructor(){super({id:"editor.foldAllMarkerRegions",label:a.localize2(1032,"Fold All Regions"),precondition:H,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:a.KeyChord(2089,2077),weight:100}})}invoke(e,t,i,n,s){if(t.regions.hasTypes())du(t,a.FoldingRangeKind.Region.value,!0);else{const r=i.getModel();if(!r)return;const l=s.getLanguageConfiguration(r.getLanguageId()).foldingRules;if(l&&l.markers&&l.markers.start){const d=new RegExp(l.markers.start);cu(t,d,!0)}}}}class KI extends ie{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:a.localize2(1033,"Unfold All Regions"),precondition:H,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:a.KeyChord(2089,2078),weight:100}})}invoke(e,t,i,n,s){if(t.regions.hasTypes())du(t,a.FoldingRangeKind.Region.value,!1);else{const r=i.getModel();if(!r)return;const l=s.getLanguageConfiguration(r.getLanguageId()).foldingRules;if(l&&l.markers&&l.markers.start){const d=new RegExp(l.markers.start);cu(t,d,!1)}}}}class UI extends ie{constructor(){super({id:"editor.foldAllExcept",label:a.localize2(1034,"Fold All Except Selected"),precondition:H,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:a.KeyChord(2089,2136),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);I_(t,!0,n)}}class kI extends ie{constructor(){super({id:"editor.unfoldAllExcept",label:a.localize2(1035,"Unfold All Except Selected"),precondition:H,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:a.KeyChord(2089,2134),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);I_(t,!1,n)}}class jI extends ie{constructor(){super({id:"editor.foldAll",label:a.localize2(1036,"Fold All"),precondition:H,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:a.KeyChord(2089,2069),weight:100}})}invoke(e,t,i){ys(t,!0)}}class $I extends ie{constructor(){super({id:"editor.unfoldAll",label:a.localize2(1037,"Unfold All"),precondition:H,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:a.KeyChord(2089,2088),weight:100}})}invoke(e,t,i){ys(t,!1)}}const Js=class Js extends ie{getFoldingLevel(){return parseInt(this.id.substr(Js.ID_PREFIX.length))}invoke(e,t,i){gI(t,this.getFoldingLevel(),!0,this.getSelectedLines(i))}};Js.ID_PREFIX="editor.foldLevel",Js.ID=e=>Js.ID_PREFIX+e;let Ka=Js;class qI extends ie{constructor(){super({id:"editor.gotoParentFold",label:a.localize2(1038,"Go to Parent Fold"),precondition:H,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const s=pI(n[0],t);s!==null&&i.setSelection({startLineNumber:s,startColumn:1,endLineNumber:s,endColumn:1})}}}class GI extends ie{constructor(){super({id:"editor.gotoPreviousFold",label:a.localize2(1039,"Go to Previous Folding Range"),precondition:H,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const s=fI(n[0],t);s!==null&&i.setSelection({startLineNumber:s,startColumn:1,endLineNumber:s,endColumn:1})}}}class ZI extends ie{constructor(){super({id:"editor.gotoNextFold",label:a.localize2(1040,"Go to Next Folding Range"),precondition:H,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const s=mI(n[0],t);s!==null&&i.setSelection({startLineNumber:s,startColumn:1,endLineNumber:s,endColumn:1})}}}class XI extends ie{constructor(){super({id:"editor.createFoldingRangeFromSelection",label:a.localize2(1041,"Create Folding Range from Selection"),precondition:H,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:a.KeyChord(2089,2135),weight:100}})}invoke(e,t,i){const n=[],s=i.getSelections();if(s){for(const r of s){let l=r.endLineNumber;r.endColumn===1&&--l,l>r.startLineNumber&&(n.push({startLineNumber:r.startLineNumber,endLineNumber:l,type:void 0,isCollapsed:!0,source:1}),i.setSelection({startLineNumber:r.startLineNumber,startColumn:1,endLineNumber:r.startLineNumber,endColumn:1}))}if(n.length>0){n.sort((l,d)=>l.startLineNumber-d.startLineNumber);const r=we.sanitizeAndMerge(t.regions,n,i.getModel()?.getLineCount());t.updatePost(we.fromFoldRanges(r))}}}}class YI extends ie{constructor(){super({id:"editor.removeManualFoldingRanges",label:a.localize2(1042,"Remove Manual Folding Ranges"),precondition:H,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:a.KeyChord(2089,2137),weight:100}})}invoke(e,t,i){const n=i.getSelections();if(n){const s=[];for(const r of n){const{startLineNumber:l,endLineNumber:d}=r;s.push(d>=l?{startLineNumber:l,endLineNumber:d}:{endLineNumber:d,startLineNumber:l})}t.removeManualRanges(s),e.triggerFoldingModelChanged()}}}class QI extends ie{constructor(){super({id:"editor.toggleImportFold",label:a.localize2(1043,"Toggle Import Fold"),precondition:H,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,weight:100}})}async invoke(e,t){const i=[],n=t.regions;for(let s=n.length-1;s>=0;s--)n.getType(s)===a.FoldingRangeKind.Imports.value&&i.push(n.toRegion(s));t.toggleCollapseState(i),e.triggerFoldingModelChanged()}}o.registerEditorContribution(Zt.ID,Zt,0),o.registerEditorAction(MI),o.registerEditorAction(PI),o.registerEditorAction(OI),o.registerEditorAction(FI),o.registerEditorAction(zI),o.registerEditorAction(jI),o.registerEditorAction($I),o.registerEditorAction(VI),o.registerEditorAction(BI),o.registerEditorAction(KI),o.registerEditorAction(UI),o.registerEditorAction(kI),o.registerEditorAction(AI),o.registerEditorAction(qI),o.registerEditorAction(GI),o.registerEditorAction(ZI),o.registerEditorAction(XI),o.registerEditorAction(YI),o.registerEditorAction(QI);for(let c=1;c<=7;c++)o.registerInstantiatedEditorAction(new Ka({id:Ka.ID(c),label:a.localize2(1044,"Fold Level {0}",c),precondition:H,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:a.KeyChord(2089,2048|21+c),weight:100}}));o.CommandsRegistry.registerCommand("_executeFoldingRangeProvider",async function(c,...e){const[t]=e;if(!(t instanceof a.URI))throw a.illegalArgument();const i=c.get(o.ILanguageFeaturesService),n=c.get(o.IModelService).getModel(t);if(!n)throw a.illegalArgument();const s=c.get(o.IConfigurationService);if(!s.getValue("editor.folding",{resource:t}))return[];const r=c.get(o.ILanguageConfigurationService),l=s.getValue("editor.foldingStrategy",{resource:t}),d={get limit(){return s.getValue("editor.foldingMaximumRegions",{resource:t})},update:(f,m)=>{}},h=new hu(n,r,d);let u=h;if(l!=="indentation"){const f=Zt.getFoldingRangeProviders(i,n);f.length&&(u=new pu(n,f,()=>{},d,h))}const g=await u.compute(a.CancellationToken.None),p=[];try{if(g)for(let f=0;f=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Vo=function(c,e){return function(t,i){e(t,i,c)}};let Ua=(Ws=class{constructor(e,t,i,n){this._editor=e,this._languageFeaturesService=t,this._workerService=i,this._accessibilitySignalService=n,this._disposables=new a.DisposableStore,this._sessionDisposables=new a.DisposableStore,this._disposables.add(t.onTypeFormattingEditProvider.onDidChange(this._update,this)),this._disposables.add(e.onDidChangeModel(()=>this._update())),this._disposables.add(e.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(e.onDidChangeConfiguration(s=>{s.hasChanged(65)&&this._update()})),this._update()}dispose(){this._disposables.dispose(),this._sessionDisposables.dispose()}_update(){if(this._sessionDisposables.clear(),!this._editor.getOption(65)||!this._editor.hasModel())return;const e=this._editor.getModel(),[t]=this._languageFeaturesService.onTypeFormattingEditProvider.ordered(e);if(!t||!t.autoFormatTriggerCharacters)return;const i=new a.CharacterSet;for(const n of t.autoFormatTriggerCharacters)i.add(n.charCodeAt(0));this._sessionDisposables.add(this._editor.onDidType(n=>{const s=n.charCodeAt(n.length-1);i.has(s)&&this._trigger(String.fromCharCode(s))}))}_trigger(e){if(!this._editor.hasModel()||this._editor.getSelections().length>1||!this._editor.getSelection().isEmpty())return;const t=this._editor.getModel(),i=this._editor.getPosition(),n=new a.CancellationTokenSource,s=this._editor.onDidChangeModelContent(r=>{if(r.isFlush){n.cancel(),s.dispose();return}for(let l=0,d=r.changes.length;l{n.token.isCancellationRequested||a.isNonEmptyArray(r)&&(this._accessibilitySignalService.playSignal(o.AccessibilitySignal.format,{userGesture:!1}),o.FormattingEdit.execute(this._editor,r,!0))}).finally(()=>{s.dispose()})}},Ws.ID="editor.contrib.autoFormat",Ws);Ua=T_([Vo(1,o.ILanguageFeaturesService),Vo(2,o.IEditorWorkerService),Vo(3,o.IAccessibilitySignalService)],Ua);let ka=(Hs=class{constructor(e,t,i){this.editor=e,this._languageFeaturesService=t,this._instantiationService=i,this._callOnDispose=new a.DisposableStore,this._callOnModel=new a.DisposableStore,this._callOnDispose.add(e.onDidChangeConfiguration(()=>this._update())),this._callOnDispose.add(e.onDidChangeModel(()=>this._update())),this._callOnDispose.add(e.onDidChangeModelLanguage(()=>this._update())),this._callOnDispose.add(t.documentRangeFormattingEditProvider.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),this.editor.getOption(64)&&this.editor.hasModel()&&this._languageFeaturesService.documentRangeFormattingEditProvider.has(this.editor.getModel())&&this._callOnModel.add(this.editor.onDidPaste(({range:e})=>this._trigger(e)))}_trigger(e){this.editor.hasModel()&&(this.editor.getSelections().length>1||this._instantiationService.invokeFunction(o.formatDocumentRangesWithSelectedProvider,this.editor,e,2,o.Progress.None,a.CancellationToken.None,!1).catch(a.onUnexpectedError))}},Hs.ID="editor.contrib.formatOnPaste",Hs);ka=T_([Vo(1,o.ILanguageFeaturesService),Vo(2,o.IInstantiationService)],ka);class ex extends o.EditorAction{constructor(){super({id:"editor.action.formatDocument",label:a.localize2(1057,"Format Document"),precondition:o.ContextKeyExpr.and(o.EditorContextKeys.notInCompositeEditor,o.EditorContextKeys.writable,o.EditorContextKeys.hasDocumentFormattingProvider),kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}async run(e,t){if(t.hasModel()){const i=e.get(o.IInstantiationService);await e.get(o.IEditorProgressService).showWhile(i.invokeFunction(o.formatDocumentWithSelectedProvider,t,1,o.Progress.None,a.CancellationToken.None,!0),250)}}}class tx extends o.EditorAction{constructor(){super({id:"editor.action.formatSelection",label:a.localize2(1058,"Format Selection"),precondition:o.ContextKeyExpr.and(o.EditorContextKeys.writable,o.EditorContextKeys.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:a.KeyChord(2089,2084),weight:100},contextMenuOpts:{when:o.EditorContextKeys.hasNonEmptySelection,group:"1_modification",order:1.31}})}async run(e,t){if(!t.hasModel())return;const i=e.get(o.IInstantiationService),n=t.getModel(),s=t.getSelections().map(l=>l.isEmpty()?new a.Range(l.startLineNumber,1,l.startLineNumber,n.getLineMaxColumn(l.startLineNumber)):l);await e.get(o.IEditorProgressService).showWhile(i.invokeFunction(o.formatDocumentRangesWithSelectedProvider,t,s,1,o.Progress.None,a.CancellationToken.None,!0),250)}}o.registerEditorContribution(Ua.ID,Ua,2),o.registerEditorContribution(ka.ID,ka,2),o.registerEditorAction(ex),o.registerEditorAction(tx),o.CommandsRegistry.registerCommand("editor.action.format",async c=>{const e=c.get(o.ICodeEditorService).getFocusedCodeEditor();if(!e||!e.hasModel())return;const t=c.get(o.ICommandService);e.getSelection().isEmpty()?await t.executeCommand("editor.action.formatDocument"):await t.executeCommand("editor.action.formatSelection")});var ix=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},fu=function(c,e){return function(t,i){e(t,i,c)}};class Is{remove(){this.parent?.children.delete(this.id)}static findId(e,t){let i;typeof e=="string"?i=`${t.id}/${e}`:(i=`${t.id}/${e.name}`,t.children.get(i)!==void 0&&(i=`${t.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`));let n=i;for(let s=0;t.children.get(n)!==void 0;s++)n=`${i}_${s}`;return n}static empty(e){return e.children.size===0}}class mu extends Is{constructor(e,t,i){super(),this.id=e,this.parent=t,this.symbol=i,this.children=new Map}}class N_ extends Is{constructor(e,t,i,n){super(),this.id=e,this.parent=t,this.label=i,this.order=n,this.children=new Map}}class Rt extends Is{static create(e,t,i){const n=new a.CancellationTokenSource(i),s=new Rt(t.uri),r=e.ordered(t),l=r.map((h,u)=>{const g=Is.findId(`provider_${u}`,s),p=new N_(g,s,h.displayName??"Unknown Outline Provider",u);return Promise.resolve(h.provideDocumentSymbols(t,n.token)).then(f=>{for(const m of f||[])Rt._makeOutlineElement(m,p);return p},f=>(a.onUnexpectedExternalError(f),p)).then(f=>{Is.empty(f)?f.remove():s._groups.set(g,f)})}),d=e.onDidChange(()=>{const h=e.ordered(t);a.equals(h,r)||n.cancel()});return Promise.all(l).then(()=>n.token.isCancellationRequested&&!i.isCancellationRequested?Rt.create(e,t,i):s._compact()).finally(()=>{n.dispose(),d.dispose(),n.dispose()})}static _makeOutlineElement(e,t){const i=Is.findId(e,t),n=new mu(i,t,e);if(e.children)for(const s of e.children)Rt._makeOutlineElement(s,n);t.children.set(n.id,n)}constructor(e){super(),this.uri=e,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}_compact(){let e=0;for(const[t,i]of this._groups)i.children.size===0?this._groups.delete(t):e+=1;if(e!==1)this.children=this._groups;else{const t=a.Iterable.first(this._groups.values());for(const[,i]of t.children)i.parent=this,this.children.set(i.id,i)}return this}getTopLevelSymbols(){const e=[];for(const t of this.children.values())t instanceof mu?e.push(t.symbol):e.push(...a.Iterable.map(t.children.values(),i=>i.symbol));return e.sort((t,i)=>a.Range.compareRangesUsingStarts(t.range,i.range))}asListOfDocumentSymbols(){const e=this.getTopLevelSymbols(),t=[];return Rt._flattenDocumentSymbols(t,e,""),t.sort((i,n)=>a.Position.compare(a.Range.getStartPosition(i.range),a.Range.getStartPosition(n.range))||a.Position.compare(a.Range.getEndPosition(n.range),a.Range.getEndPosition(i.range)))}static _flattenDocumentSymbols(e,t,i){for(const n of t)e.push({kind:n.kind,tags:n.tags,name:n.name,detail:n.detail,containerName:n.containerName||i,range:n.range,selectionRange:n.selectionRange,children:void 0}),n.children&&Rt._flattenDocumentSymbols(e,n.children,n.name)}}const Bo=o.createDecorator("IOutlineModelService");let _u=class{constructor(e,t,i){this._languageFeaturesService=e,this._disposables=new a.DisposableStore,this._cache=new a.LRUCache(15,.7),this._debounceInformation=t.for(e.documentSymbolProvider,"DocumentSymbols",{min:350}),this._disposables.add(i.onModelRemoved(n=>{this._cache.delete(n.id)}))}dispose(){this._disposables.dispose()}async getOrCreate(e,t){const i=this._languageFeaturesService.documentSymbolProvider,n=i.ordered(e);let s=this._cache.get(e.id);if(!s||s.versionId!==e.getVersionId()||!a.equals(s.provider,n)){const l=new a.CancellationTokenSource;s={versionId:e.getVersionId(),provider:n,promiseCnt:0,source:l,promise:Rt.create(i,e,l.token),model:void 0},this._cache.set(e.id,s);const d=Date.now();s.promise.then(h=>{s.model=h,this._debounceInformation.update(e,Date.now()-d)}).catch(h=>{this._cache.delete(e.id)})}if(s.model)return s.model;s.promiseCnt+=1;const r=t.onCancellationRequested(()=>{--s.promiseCnt===0&&(s.source.cancel(),this._cache.delete(e.id))});try{return await s.promise}finally{r.dispose()}}};_u=ix([fu(0,o.ILanguageFeaturesService),fu(1,o.ILanguageFeatureDebounceService),fu(2,o.IModelService)],_u),o.registerSingleton(Bo,_u,1),o.CommandsRegistry.registerCommand("_executeDocumentSymbolProvider",async function(c,...e){const[t]=e;a.assertType(a.URI.isUri(t));const i=c.get(Bo),s=await c.get(o.ITextModelService).createModelReference(t);try{return(await i.getOrCreate(s.object.textEditorModel,a.CancellationToken.None)).getTopLevelSymbols()}finally{s.dispose()}});const ja=new class{constructor(){this._implementations=[]}register(e){return this._implementations.push(e),{dispose:()=>{const t=this._implementations.indexOf(e);t!==-1&&this._implementations.splice(t,1)}}}getImplementations(){return this._implementations}};var nx=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},sx=function(c,e){return function(t,i){e(t,i,c)}};function ox(c){return c instanceof M_?c._instance:c}let M_=class{constructor(e){this.instantiationService=e}init(...e){}};function rx(c){return c.get()}let P_=class extends M_{constructor(e,t){super(t),this.init(e)}};P_=nx([sx(1,o.IInstantiationService)],P_);class xs{validateOrThrow(e){const t=this.validate(e);if(t.error)throw new Error(t.error.message);return t.content}}class $a extends xs{constructor(e){super(),this.type=e}validate(e){return typeof e!==this.type?{content:void 0,error:{message:`Expected ${this.type}, but got ${typeof e}`}}:{content:e,error:void 0}}getJSONSchema(){return{type:this.type}}}const ax=new $a("string");function lx(){return ax}new $a("number");const cx=new $a("boolean");function O_(){return cx}new $a("object");class dx extends xs{validate(e){return{content:e,error:void 0}}getJSONSchema(){return{}}}function hx(){return new dx}class A_ extends xs{validate(e){return e!==void 0?{content:void 0,error:{message:`Expected undefined, but got ${typeof e}`}}:{content:void 0,error:void 0}}getJSONSchema(){return{}}}function ux(){return new A_}class vu{constructor(e){this.validator=e}}function qa(c){return new vu(c)}class gx extends xs{constructor(e){super(),this.properties=e}validate(e){if(typeof e!="object"||e===null)return{content:void 0,error:{message:"Expected object"}};const t={};for(const i in this.properties){const n=this.properties[i],s=e[i],r=n instanceof vu,l=r?n.validator:n;if(r&&s===void 0)continue;const{content:d,error:h}=l.validate(s);if(h)return{content:void 0,error:{message:`Error in property '${i}': ${h.message}`}};t[i]=d}return{content:t,error:void 0}}getJSONSchema(){const e=[],t={};for(const[n,s]of Object.entries(this.properties)){const r=s instanceof vu,l=r?s.validator:s;t[n]=l.getJSONSchema(),r||e.push(n)}return{type:"object",properties:t,...e.length>0?{required:e}:{}}}}function px(c){return new gx(c)}class fx extends xs{constructor(e){super(),this.validators=e}validate(e){let t;for(const i of this.validators){const{content:n,error:s}=i.validate(e);if(!s)return{content:n,error:void 0};t=s}return{content:void 0,error:t}}getJSONSchema(){return{oneOf:a.mapFilter(this.validators,e=>{if(!(e instanceof A_))return e.getJSONSchema()})}}}function mx(...c){return new fx(c)}class _x extends xs{constructor(e,t){super(),this._ref=e,this._validator=t}validate(e){return this._validator.validate(e)}getJSONSchema(){return{$ref:this._ref}}}function vx(c,e){return new _x(c,e)}const N={Visible:lh,HasFocusedSuggestion:new o.RawContextKey("suggestWidgetHasFocusedSuggestion",!1,a.localize(1505,"Whether any suggestion is focused")),DetailsVisible:new o.RawContextKey("suggestWidgetDetailsVisible",!1,a.localize(1506,"Whether suggestion details are visible")),DetailsFocused:new o.RawContextKey("suggestWidgetDetailsFocused",!1,a.localize(1507,"Whether the details pane of the suggest widget has focus")),MultipleSuggestions:new o.RawContextKey("suggestWidgetMultipleSuggestions",!1,a.localize(1508,"Whether there are multiple suggestions to pick from")),MakesTextEdit:new o.RawContextKey("suggestionMakesTextEdit",!0,a.localize(1509,"Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new o.RawContextKey("acceptSuggestionOnEnter",!0,a.localize(1510,"Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new o.RawContextKey("suggestionHasInsertAndReplaceRange",!1,a.localize(1511,"Whether the current suggestion has insert and replace behaviour")),InsertMode:new o.RawContextKey("suggestionInsertMode",void 0,{type:"string",description:a.localize(1512,"Whether the default behaviour is to insert or replace")}),CanResolve:new o.RawContextKey("suggestionCanResolve",!1,a.localize(1513,"Whether the current suggestion supports to resolve further details"))},Tt=new o.MenuId("suggestWidgetStatusBar");class bx{constructor(e,t,i,n){this.position=e,this.completion=t,this.container=i,this.provider=n,this.isInvalid=!1,this.score=o.FuzzyScore.Default,this.distance=0,this.textLabel=typeof t.label=="string"?t.label:t.label?.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=t.sortText&&t.sortText.toLowerCase(),this.filterTextLow=t.filterText&&t.filterText.toLowerCase(),this.extensionId=t.extensionId,a.Range.isIRange(t.range)?(this.editStart=new a.Position(t.range.startLineNumber,t.range.startColumn),this.editInsertEnd=new a.Position(t.range.endLineNumber,t.range.endColumn),this.editReplaceEnd=new a.Position(t.range.endLineNumber,t.range.endColumn),this.isInvalid=this.isInvalid||a.Range.spansMultipleLines(t.range)||t.range.startLineNumber!==e.lineNumber):(this.editStart=new a.Position(t.range.insert.startLineNumber,t.range.insert.startColumn),this.editInsertEnd=new a.Position(t.range.insert.endLineNumber,t.range.insert.endColumn),this.editReplaceEnd=new a.Position(t.range.replace.endLineNumber,t.range.replace.endColumn),this.isInvalid=this.isInvalid||a.Range.spansMultipleLines(t.range.insert)||a.Range.spansMultipleLines(t.range.replace)||t.range.insert.startLineNumber!==e.lineNumber||t.range.replace.startLineNumber!==e.lineNumber||t.range.insert.startColumn!==t.range.replace.startColumn),typeof n.resolveCompletionItem!="function"&&(this._resolveCache=Promise.resolve(),this._resolveDuration=0)}get isResolved(){return this._resolveDuration!==void 0}get resolveDuration(){return this._resolveDuration!==void 0?this._resolveDuration:-1}async resolve(e){if(!this._resolveCache){const t=e.onCancellationRequested(()=>{this._resolveCache=void 0,this._resolveDuration=void 0}),i=new a.StopWatch(!0);this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then(n=>{Object.assign(this.completion,n),this._resolveDuration=i.elapsed()},n=>{a.isCancellationError(n)&&(this._resolveCache=void 0,this._resolveDuration=void 0)}).finally(()=>{t.dispose()})}return this._resolveCache}}const Dc=class Dc{constructor(e=2,t=new Set,i=new Set,n=new Map,s=!0){this.snippetSortOrder=e,this.kindFilter=t,this.providerFilter=i,this.providerItemsToReuse=n,this.showDeprecated=s}};Dc.default=new Dc;let Ko=Dc;class Cx{constructor(e,t,i,n){this.items=e,this.needsClipboard=t,this.durations=i,this.disposable=n}}async function bu(c,e,t,i=Ko.default,n={triggerKind:0},s=a.CancellationToken.None){const r=new a.StopWatch;t=t.clone();const l=e.getWordAtPosition(t),d=l?new a.Range(t.lineNumber,l.startColumn,t.lineNumber,l.endColumn):a.Range.fromPositions(t),h={replace:d,insert:d.setEndPosition(t.lineNumber,t.column)},u=[],g=new a.DisposableStore,p=[];let f=!1;const m=(v,b,S)=>{let w=!1;if(!b)return w;for(const I of b.suggestions)if(!i.kindFilter.has(I.kind)){if(!i.showDeprecated&&I?.tags?.includes(1))continue;I.range||(I.range=h),I.sortText||(I.sortText=typeof I.label=="string"?I.label:I.label.label),!f&&I.insertTextRules&&I.insertTextRules&4&&(f=Ki.guessNeedsClipboard(I.insertText)),u.push(new bx(t,I,b,v)),w=!0}return a.isDisposable(b)&&g.add(b),p.push({providerName:v._debugDisplayName??"unknown_provider",elapsedProvider:b.duration??-1,elapsedOverall:S.elapsed()}),w},_=(async()=>{})();for(const v of c.orderedGroups(e)){let b=!1;if(await Promise.all(v.map(async S=>{if(i.providerItemsToReuse.has(S)){const w=i.providerItemsToReuse.get(S);w.forEach(I=>u.push(I)),b=b||w.length>0;return}if(!(i.providerFilter.size>0&&!i.providerFilter.has(S)))try{const w=new a.StopWatch,I=await S.provideCompletionItems(e,t,n,s);b=m(S,I,w)||b}catch(w){a.onUnexpectedExternalError(w)}})),b||s.isCancellationRequested)break}return await _,s.isCancellationRequested?(g.dispose(),Promise.reject(new a.CancellationError)):new Cx(u.sort(wx(i.snippetSortOrder)),f,{entries:p,elapsed:r.elapsed()},g)}function Cu(c,e){if(c.sortTextLow&&e.sortTextLow){if(c.sortTextLowe.sortTextLow)return 1}return c.textLabele.textLabel?1:c.completion.kind-e.completion.kind}function Sx(c,e){if(c.completion.kind!==e.completion.kind){if(c.completion.kind===28)return-1;if(e.completion.kind===28)return 1}return Cu(c,e)}function yx(c,e){if(c.completion.kind!==e.completion.kind){if(c.completion.kind===28)return 1;if(e.completion.kind===28)return-1}return Cu(c,e)}const Ga=new Map;Ga.set(0,Sx),Ga.set(2,yx),Ga.set(1,Cu);function wx(c){return Ga.get(c)}o.CommandsRegistry.registerCommand("_executeCompletionItemProvider",async(c,...e)=>{const[t,i,n,s]=e;a.assertType(a.URI.isUri(t)),a.assertType(a.Position.isIPosition(i)),a.assertType(typeof n=="string"||!n),a.assertType(typeof s=="number"||!s);const{completionProvider:r}=c.get(o.ILanguageFeaturesService),l=await c.get(o.ITextModelService).createModelReference(t);try{const d={incomplete:!1,suggestions:[]},h=[],u=l.object.textEditorModel.validatePosition(i),g=await bu(r,l.object.textEditorModel,u,void 0,{triggerCharacter:n??void 0,triggerKind:n?1:0});for(const p of g.items)h.length<(s??0)&&h.push(p.resolve(a.CancellationToken.None)),d.incomplete=d.incomplete||p.container.incomplete,d.suggestions.push(p.completion);try{return await Promise.all(h),d}finally{setTimeout(()=>g.disposable.dispose(),100)}}finally{l.dispose()}});function Ix(c,e){c.getContribution("editor.contrib.suggestController")?.triggerSuggest(new Set().add(e),void 0,!0)}class Es{static isAllOff(e){return e.other==="off"&&e.comments==="off"&&e.strings==="off"}static isAllOn(e){return e.other==="on"&&e.comments==="on"&&e.strings==="on"}static valueFor(e,t){switch(t){case 1:return e.comments;case 2:return e.strings;default:return e.other}}}const Se=class Se{};Se.inlineSuggestionVisible=new o.RawContextKey("inlineSuggestionVisible",!1,a.localize(1234,"Whether an inline suggestion is visible")),Se.inlineSuggestionAlternativeActionVisible=new o.RawContextKey("inlineSuggestionAlternativeActionVisible",!1,a.localize(1235,"Whether an alternative action for the inline suggestion is visible.")),Se.inlineSuggestionHasIndentation=new o.RawContextKey("inlineSuggestionHasIndentation",!1,a.localize(1236,"Whether the inline suggestion starts with whitespace")),Se.inlineSuggestionHasIndentationLessThanTabSize=new o.RawContextKey("inlineSuggestionHasIndentationLessThanTabSize",!0,a.localize(1237,"Whether the inline suggestion starts with whitespace that is less than what would be inserted by tab")),Se.suppressSuggestions=new o.RawContextKey("inlineSuggestionSuppressSuggestions",void 0,a.localize(1238,"Whether suggestions should be suppressed for the current suggestion")),Se.cursorBeforeGhostText=new o.RawContextKey("cursorBeforeGhostText",!1,a.localize(1239,"Whether the cursor is at ghost text")),Se.cursorInIndentation=new o.RawContextKey("cursorInIndentation",!1,a.localize(1240,"Whether the cursor is in indentation")),Se.hasSelection=new o.RawContextKey("editor.hasSelection",!1,a.localize(1241,"Whether the editor has a selection")),Se.cursorAtInlineEdit=new o.RawContextKey("cursorAtInlineEdit",!1,a.localize(1242,"Whether the cursor is at an inline edit")),Se.inlineEditVisible=new o.RawContextKey("inlineEditIsVisible",!1,a.localize(1243,"Whether an inline edit is visible")),Se.tabShouldJumpToInlineEdit=new o.RawContextKey("tabShouldJumpToInlineEdit",!1,a.localize(1244,"Whether tab should jump to an inline edit.")),Se.tabShouldAcceptInlineEdit=new o.RawContextKey("tabShouldAcceptInlineEdit",!1,a.localize(1245,"Whether tab should accept the inline edit.")),Se.inInlineEditsPreviewEditor=new o.RawContextKey("inInlineEditsPreviewEditor",!0,a.localize(1246,"Whether the current code editor is showing an inline edits preview"));let V=Se;var F_=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Za=function(c,e){return function(t,i){e(t,i,c)}};class z_{constructor(e,t,i){this.marker=e,this.index=t,this.total=i}}let Su=class{constructor(e,t,i){this._markerService=t,this._configService=i,this._onDidChange=new a.Emitter,this.onDidChange=this._onDidChange.event,this._dispoables=new a.DisposableStore,this._markers=[],this._nextIdx=-1,a.URI.isUri(e)?this._resourceFilter=l=>l.toString()===e.toString():e&&(this._resourceFilter=e);const n=this._configService.getValue("problems.sortOrder"),s=(l,d)=>{let h=a.compare(l.resource.toString(),d.resource.toString());return h===0&&(n==="position"?h=a.Range.compareRangesUsingStarts(l,d)||o.MarkerSeverity$1.compare(l.severity,d.severity):h=o.MarkerSeverity$1.compare(l.severity,d.severity)||a.Range.compareRangesUsingStarts(l,d)),h},r=()=>{let l=this._markerService.read({resource:a.URI.isUri(e)?e:void 0,severities:o.MarkerSeverity$1.Error|o.MarkerSeverity$1.Warning|o.MarkerSeverity$1.Info});return typeof e=="function"&&(l=l.filter(d=>this._resourceFilter(d.resource))),l.sort(s),a.equals(l,this._markers,(d,h)=>d.resource.toString()===h.resource.toString()&&d.startLineNumber===h.startLineNumber&&d.startColumn===h.startColumn&&d.endLineNumber===h.endLineNumber&&d.endColumn===h.endColumn&&d.severity===h.severity&&d.message===h.message)?!1:(this._markers=l,!0)};r(),this._dispoables.add(t.onMarkerChanged(l=>{(!this._resourceFilter||l.some(d=>this._resourceFilter(d)))&&r()&&(this._nextIdx=-1,this._onDidChange.fire())}))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(e){return!this._resourceFilter&&!e?!0:!this._resourceFilter||!e?!1:this._resourceFilter(e)}get selected(){const e=this._markers[this._nextIdx];return e&&new z_(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,i){let n=this._markers.findIndex(s=>o.isEqual(s.resource,e.uri));if(n<0)n=a.binarySearch2(this._markers.length,s=>a.compare(this._markers[s].resource.toString(),e.uri.toString())),n<0&&(n=~n),i?this._nextIdx=n:this._nextIdx=(this._markers.length+n-1)%this._markers.length;else{let s=!1,r=!1;for(let l=n;ln.resource.toString()===e.toString());if(!(i<0)){for(;i=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ls=function(c,e){return function(t,i){e(t,i,c)}},Iu;class Ex{constructor(e,t,i,n,s){this._openerService=n,this._labelService=s,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new a.DisposableStore,this._editor=t;const r=document.createElement("div");r.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),r.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),r.appendChild(this._relatedBlock),this._disposables.add(o.addStandardDisposableListener(this._relatedBlock,"click",l=>{l.preventDefault();const d=this._relatedDiagnostics.get(l.target);d&&i(d)})),this._scrollable=new o.ScrollableElement(r,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(l=>{r.style.left=`-${l.scrollLeft}px`,r.style.top=`-${l.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){a.dispose(this._disposables)}update(e){const{source:t,message:i,relatedInformation:n,code:s}=e;let r=(t?.length||0)+2;s&&(typeof s=="string"?r+=s.length:r+=s.value.length);const l=a.splitLines(i);this._lines=l.length,this._longestLineLength=0;for(const p of l)this._longestLineLength=Math.max(p.length+r,this._longestLineLength);o.clearNode(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),o.status(this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let d=this._messageBlock;for(const p of l)d=document.createElement("div"),d.innerText=p,p===""&&(d.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(d);if(t||s){const p=document.createElement("span");if(p.classList.add("details"),d.appendChild(p),t){const f=document.createElement("span");f.innerText=t,f.classList.add("source"),p.appendChild(f)}if(s)if(typeof s=="string"){const f=document.createElement("span");f.innerText=`(${s})`,f.classList.add("code"),p.appendChild(f)}else{this._codeLink=o.$("a.code-link"),this._codeLink.setAttribute("href",`${s.target.toString()}`),this._codeLink.onclick=m=>{this._openerService.open(s.target,{allowCommands:!0}),m.preventDefault(),m.stopPropagation()};const f=o.append(this._codeLink,o.$("span"));f.innerText=s.value,p.appendChild(this._codeLink)}}if(o.clearNode(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),a.isNonEmptyArray(n)){const p=this._relatedBlock.appendChild(document.createElement("div"));p.style.paddingTop=`${Math.floor(this._editor.getOption(75)*.66)}px`,this._lines+=1;for(const f of n){const m=document.createElement("div"),_=document.createElement("a");_.classList.add("filename"),_.innerText=`${this._labelService.getUriBasenameLabel(f.resource)}(${f.startLineNumber}, ${f.startColumn}): `,_.title=this._labelService.getUriLabel(f.resource),this._relatedDiagnostics.set(_,f);const v=document.createElement("span");v.innerText=f.message,m.appendChild(_),m.appendChild(v),this._lines+=1,p.appendChild(m)}}const h=this._editor.getOption(59),u=Math.ceil(h.typicalFullwidthCharacterWidth*this._longestLineLength*.75),g=h.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:u,scrollHeight:g})}layout(e,t){this._scrollable.getDomNode().style.height=`${e}px`,this._scrollable.getDomNode().style.width=`${t}px`,this._scrollable.setScrollDimensions({width:t,height:e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(e){let t="";switch(e.severity){case o.MarkerSeverity$1.Error:t=a.localize(1067,"Error");break;case o.MarkerSeverity$1.Warning:t=a.localize(1068,"Warning");break;case o.MarkerSeverity$1.Info:t=a.localize(1069,"Info");break;case o.MarkerSeverity$1.Hint:t=a.localize(1070,"Hint");break}let i=a.localize(1071,"{0}: {1} at {2}. ",t,e.message,e.startLineNumber+":"+e.startColumn);const n=this._editor.getModel();return n&&e.startLineNumber<=n.getLineCount()&&e.startLineNumber>=1&&(i=`${n.getLineContent(e.startLineNumber)}, ${i}`),i}}let Uo=(On=class extends wa{constructor(e,t,i,n,s,r,l){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},s),this._themeService=t,this._openerService=i,this._menuService=n,this._contextKeyService=r,this._labelService=l,this._callOnDispose=new a.DisposableStore,this._onDidSelectRelatedInformation=new a.Emitter,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=o.MarkerSeverity$1.Warning,this._backgroundColor=a.Color.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(Tx);let t=xu,i=Lx;this._severity===o.MarkerSeverity$1.Warning?(t=Xa,i=Dx):this._severity===o.MarkerSeverity$1.Info&&(t=Eu,i=Rx);const n=e.getColor(t),s=e.getColor(i);this.style({arrowColor:n,frameColor:n,headerBackgroundColor:s,primaryHeadingColor:e.getColor(e_),secondaryHeadingColor:e.getColor(t_)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),this._onDidSelectRelatedInformation.dispose(),super.dispose()}_fillHead(e){super._fillHead(e),this._disposables.add(this._actionbarWidget.actionRunner.onWillRun(n=>this.editor.focus()));const t=this._menuService.getMenuActions(Iu.TitleMenu,this._contextKeyService),i=o.getFlatActionBarActions(t);this._actionbarWidget.push(i,{label:!1,icon:!0,index:0})}_fillTitleIcon(e){this._icon=o.append(e,o.$(""))}_fillBody(e){this._parentContainer=e,e.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),e.appendChild(this._container),this._message=new Ex(this._container,this.editor,t=>this._onDidSelectRelatedInformation.fire(t),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(e,t,i){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());const n=a.Range.lift(e),s=this.editor.getPosition(),r=s&&n.containsPosition(s)?s:n.getStartPosition();super.show(r,this.computeRequiredHeight());const l=this.editor.getModel();if(l){const d=i>1?a.localize(1072,"{0} of {1} problems",t,i):a.localize(1073,"{0} of {1} problem",t,i);this.setTitle(o.basename(l.uri),d)}this._icon.className=`codicon ${wu.className(o.MarkerSeverity$1.toSeverity(this._severity))}`,this.editor.revealPositionInCenterIfOutsideViewport(r,0),this.editor.focus()}updateMarker(e){this._container.classList.remove("stale"),this._message.update(e)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._heightInPixel=e,this._message.layout(e,t),this._container.style.height=`${e}px`}_onWidth(e){this._message.layout(this._heightInPixel,e)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}},Iu=On,On.TitleMenu=new o.MenuId("gotoErrorTitleMenu"),On);Uo=Iu=xx([Ls(1,o.IThemeService),Ls(2,o.IOpenerService),Ls(3,o.IMenuService),Ls(4,o.IInstantiationService),Ls(5,o.IContextKeyService),Ls(6,o.ILabelService)],Uo);const B_=o.oneOf(o.editorErrorForeground,o.editorErrorBorder),K_=o.oneOf(o.editorWarningForeground,o.editorWarningBorder),U_=o.oneOf(o.editorInfoForeground,o.editorInfoBorder),xu=o.registerColor("editorMarkerNavigationError.background",{dark:B_,light:B_,hcDark:o.contrastBorder,hcLight:o.contrastBorder},a.localize(1074,"Editor marker navigation widget error color.")),Lx=o.registerColor("editorMarkerNavigationError.headerBackground",{dark:o.transparent(xu,.1),light:o.transparent(xu,.1),hcDark:null,hcLight:null},a.localize(1075,"Editor marker navigation widget error heading background.")),Xa=o.registerColor("editorMarkerNavigationWarning.background",{dark:K_,light:K_,hcDark:o.contrastBorder,hcLight:o.contrastBorder},a.localize(1076,"Editor marker navigation widget warning color.")),Dx=o.registerColor("editorMarkerNavigationWarning.headerBackground",{dark:o.transparent(Xa,.1),light:o.transparent(Xa,.1),hcDark:"#0C141F",hcLight:o.transparent(Xa,.2)},a.localize(1077,"Editor marker navigation widget warning heading background.")),Eu=o.registerColor("editorMarkerNavigationInfo.background",{dark:U_,light:U_,hcDark:o.contrastBorder,hcLight:o.contrastBorder},a.localize(1078,"Editor marker navigation widget info color.")),Rx=o.registerColor("editorMarkerNavigationInfo.headerBackground",{dark:o.transparent(Eu,.1),light:o.transparent(Eu,.1),hcDark:null,hcLight:null},a.localize(1079,"Editor marker navigation widget info heading background.")),Tx=o.registerColor("editorMarkerNavigation.background",o.editorBackground,a.localize(1080,"Editor marker navigation widget background."));var Nx=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ya=function(c,e){return function(t,i){e(t,i,c)}},ko;let sn=(An=class{static get(e){return e.getContribution(ko.ID)}constructor(e,t,i,n,s){this._markerNavigationService=t,this._contextKeyService=i,this._editorService=n,this._instantiationService=s,this._sessionDispoables=new a.DisposableStore,this._editor=e,this._widgetVisible=k_.bindTo(this._contextKeyService)}dispose(){this._cleanUp(),this._sessionDispoables.dispose()}_cleanUp(){this._widgetVisible.reset(),this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}_getOrCreateModel(e){if(this._model&&this._model.matches(e))return this._model;let t=!1;return this._model&&(t=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(e),t&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(Uo,this._editor),this._widget.onDidClose(()=>this.close(),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition(i=>{(!this._model?.selected||!a.Range.containsPosition(this._model?.selected.marker,i.position))&&this._model?.resetIndex()})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!this._widget||!this._widget.position||!this._model)return;const i=this._model.find(this._editor.getModel().uri,this._widget.position);i?this._widget.updateMarker(i.marker):this._widget.showStale()})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(i=>{this._editorService.openCodeEditor({resource:i.resource,options:{pinned:!0,revealIfOpened:!0,selection:a.Range.lift(i).collapseToStart()}},this._editor),this.close(!1)})),this._sessionDispoables.add(this._editor.onDidChangeModel(()=>this._cleanUp())),this._model}close(e=!0){this._cleanUp(),e&&this._editor.focus()}showAtMarker(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=this._getOrCreateModel(t.uri);i.resetIndex(),i.move(!0,t,new a.Position(e.startLineNumber,e.startColumn)),i.selected&&this._widget.showAtMarker(i.selected.marker,i.selected.index,i.selected.total)}async navigate(e,t){if(!this._editor.hasModel())return;const i=this._editor.getModel(),n=this._getOrCreateModel(t?void 0:i.uri);if(n.move(e,i,this._editor.getPosition()),!!n.selected)if(n.selected.marker.resource.toString()!==i.uri.toString()){this._cleanUp();const s=await this._editorService.openCodeEditor({resource:n.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:n.selected.marker}},this._editor);s&&(ko.get(s)?.close(),ko.get(s)?.navigate(e,t))}else this._widget.showAtMarker(n.selected.marker,n.selected.index,n.selected.total)}},ko=An,An.ID="editor.contrib.markerController",An);sn=ko=Nx([Ya(1,V_),Ya(2,o.IContextKeyService),Ya(3,o.ICodeEditorService),Ya(4,o.IInstantiationService)],sn);class Qa extends o.EditorAction{constructor(e,t,i){super(i),this._next=e,this._multiFile=t}async run(e,t){t.hasModel()&&await sn.get(t)?.navigate(this._next,this._multiFile)}}const Fn=class Fn extends Qa{constructor(){super(!0,!1,{id:Fn.ID,label:Fn.LABEL,precondition:void 0,kbOpts:{kbExpr:o.EditorContextKeys.focus,primary:578,weight:100},menuOpts:{menuId:Uo.TitleMenu,title:Fn.LABEL.value,icon:o.registerIcon("marker-navigation-next",a.Codicon.arrowDown,a.localize(1059,"Icon for goto next marker.")),group:"navigation",order:1}})}};Fn.ID="editor.action.marker.next",Fn.LABEL=a.localize2(1063,"Go to Next Problem (Error, Warning, Info)");let jo=Fn;const zn=class zn extends Qa{constructor(){super(!1,!1,{id:zn.ID,label:zn.LABEL,precondition:void 0,kbOpts:{kbExpr:o.EditorContextKeys.focus,primary:1602,weight:100},menuOpts:{menuId:Uo.TitleMenu,title:zn.LABEL.value,icon:o.registerIcon("marker-navigation-previous",a.Codicon.arrowUp,a.localize(1060,"Icon for goto previous marker.")),group:"navigation",order:2}})}};zn.ID="editor.action.marker.prev",zn.LABEL=a.localize2(1064,"Go to Previous Problem (Error, Warning, Info)");let Ja=zn;const Rc=class Rc extends Qa{constructor(){super(!0,!0,{id:Rc.ID,label:a.localize2(1065,"Go to Next Problem in Files (Error, Warning, Info)"),precondition:void 0,kbOpts:{kbExpr:o.EditorContextKeys.focus,primary:66,weight:100},menuOpts:{menuId:o.MenuId.MenubarGoMenu,title:a.localize(1061,"Next &&Problem"),group:"6_problem_nav",order:1}})}};Rc.ID="editor.action.marker.nextInFiles";let Wa=Rc;const Tc=class Tc extends Qa{constructor(){super(!1,!0,{id:Tc.ID,label:a.localize2(1066,"Go to Previous Problem in Files (Error, Warning, Info)"),precondition:void 0,kbOpts:{kbExpr:o.EditorContextKeys.focus,primary:1090,weight:100},menuOpts:{menuId:o.MenuId.MenubarGoMenu,title:a.localize(1062,"Previous &&Problem"),group:"6_problem_nav",order:2}})}};Tc.ID="editor.action.marker.prevInFiles";let Ha=Tc;o.registerEditorContribution(sn.ID,sn,4),o.registerEditorAction(jo),o.registerEditorAction(Ja),o.registerEditorAction(Wa),o.registerEditorAction(Ha);const k_=new o.RawContextKey("markersNavigationVisible",!1),Mx=o.EditorCommand.bindToContribution(sn.get);o.registerEditorCommand(new Mx({id:"closeMarkersNavigation",precondition:k_,handler:c=>c.close(),kbOpts:{weight:150,kbExpr:o.EditorContextKeys.focus,primary:9,secondary:[1033]}}));class Px{constructor(e,t,i){this._selection=e,this._cursors=t,this._selectionId=null,this._trimInRegexesAndStrings=i}getEditOperations(e,t){const i=Ox(e,this._cursors,this._trimInRegexesAndStrings);for(let n=0,s=i.length;nl.lineNumber===d.lineNumber?l.column-d.column:l.lineNumber-d.lineNumber);for(let l=e.length-2;l>=0;l--)e[l].lineNumber===e[l+1].lineNumber&&e.splice(l,1);const i=[];let n=0,s=0;const r=e.length;for(let l=1,d=c.getLineCount();l<=d;l++){const h=c.getLineContent(l),u=h.length+1;let g=0;if(s=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Fx=function(c,e){return function(t,i){e(t,i,c)}};let Lu=class{constructor(e,t,i,n){this._languageConfigurationService=n,this._selection=e,this._isMovingDown=t,this._autoIndent=i,this._selectionId=null,this._moveEndLineSelectionShrink=!1}createVirtualModel(e,t,i){return{tokenization:{getLineTokens:n=>e.tokenization.getLineTokens(t(n)),getLanguageId:()=>e.getLanguageId(),getLanguageIdAtPosition:(n,s)=>e.getLanguageIdAtPosition(n,s)},getLineContent:n=>{const s=i?.(n);return s!==void 0?s:e.getLineContent(t(n))}}}getEditOperations(e,t){const i=e.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===i){this._selectionId=t.trackSelection(this._selection);return}if(!this._isMovingDown&&this._selection.startLineNumber===1){this._selectionId=t.trackSelection(this._selection);return}this._moveEndPositionDown=!1;let n=this._selection;n.startLineNumberv===n.startLineNumber?h:v),_=o.getGoodIndentForLine(this._autoIndent,m,e.getLanguageIdAtPosition(h,1),n.startLineNumber,d,this._languageConfigurationService);if(_!==null){const v=a.getLeadingWhitespace(e.getLineContent(h)),b=be(_,s),S=be(v,s);b!==S&&(g=$o(b,s,l)+this.trimStart(u))}}t.addEditOperation(new a.Range(n.startLineNumber,1,n.startLineNumber,1),g+` +`);const f=this.matchEnterRuleMovingDown(e,d,s,n.startLineNumber,h,g);if(f!==null)f!==0&&this.getIndentEditsOfMovingBlock(e,t,n,s,l,f);else{const m=this.createVirtualModel(e,v=>v===n.startLineNumber?h:v>=n.startLineNumber+1&&v<=n.endLineNumber+1?v-1:v,v=>v===n.startLineNumber?g:void 0),_=o.getGoodIndentForLine(this._autoIndent,m,e.getLanguageIdAtPosition(h,1),n.startLineNumber+1,d,this._languageConfigurationService);if(_!==null){const v=a.getLeadingWhitespace(e.getLineContent(n.startLineNumber)),b=be(_,s),S=be(v,s);if(b!==S){const w=b-S;this.getIndentEditsOfMovingBlock(e,t,n,s,l,w)}}}}else t.addEditOperation(new a.Range(n.startLineNumber,1,n.startLineNumber,1),g+` +`)}else if(h=n.startLineNumber-1,u=e.getLineContent(h),t.addEditOperation(new a.Range(h,1,h+1,1),null),t.addEditOperation(new a.Range(n.endLineNumber,e.getLineMaxColumn(n.endLineNumber),n.endLineNumber,e.getLineMaxColumn(n.endLineNumber)),` +`+u),this.shouldAutoIndent(e,n)){const g=this.createVirtualModel(e,f=>f===h?n.startLineNumber:f),p=this.matchEnterRule(e,d,s,n.startLineNumber,n.startLineNumber-2);if(p!==null)p!==0&&this.getIndentEditsOfMovingBlock(e,t,n,s,l,p);else{const f=o.getGoodIndentForLine(this._autoIndent,g,e.getLanguageIdAtPosition(n.startLineNumber,1),h,d,this._languageConfigurationService);if(f!==null){const m=a.getLeadingWhitespace(e.getLineContent(n.startLineNumber)),_=be(f,s),v=be(m,s);if(_!==v){const b=_-v;this.getIndentEditsOfMovingBlock(e,t,n,s,l,b)}}}}}this._selectionId=t.trackSelection(n)}buildIndentConverter(e,t,i){return{shiftIndent:n=>o.ShiftCommand.shiftIndent(n,n.length+1,e,t,i),unshiftIndent:n=>o.ShiftCommand.unshiftIndent(n,n.length+1,e,t,i)}}parseEnterResult(e,t,i,n,s){if(s){let r=s.indentation;s.indentAction===o.IndentAction.None||s.indentAction===o.IndentAction.Indent?r=s.indentation+s.appendText:s.indentAction===o.IndentAction.IndentOutdent?r=s.indentation:s.indentAction===o.IndentAction.Outdent&&(r=t.unshiftIndent(s.indentation)+s.appendText);const l=e.getLineContent(n);if(this.trimStart(l).indexOf(this.trimStart(r))>=0){const d=a.getLeadingWhitespace(e.getLineContent(n));let h=a.getLeadingWhitespace(r);const u=o.getIndentMetadata(e,n,this._languageConfigurationService);u!==null&&u&2&&(h=t.unshiftIndent(h));const g=be(h,i),p=be(d,i);return g-p}}return null}matchEnterRuleMovingDown(e,t,i,n,s,r){if(a.lastNonWhitespaceIndex(r)>=0){const l=e.getLineMaxColumn(s),d=o.getEnterAction(this._autoIndent,e,new a.Range(s,l,s,l),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,d)}else{let l=n-1;for(;l>=1;){const u=e.getLineContent(l);if(a.lastNonWhitespaceIndex(u)>=0)break;l--}if(l<1||n>e.getLineCount())return null;const d=e.getLineMaxColumn(l),h=o.getEnterAction(this._autoIndent,e,new a.Range(l,d,l,d),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,h)}}matchEnterRule(e,t,i,n,s,r){let l=s;for(;l>=1;){let u;if(l===s&&r!==void 0?u=r:u=e.getLineContent(l),a.lastNonWhitespaceIndex(u)>=0)break;l--}if(l<1||n>e.getLineCount())return null;const d=e.getLineMaxColumn(l),h=o.getEnterAction(this._autoIndent,e,new a.Range(l,d,l,d),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,h)}trimStart(e){return e.replace(/^\s+/,"")}shouldAutoIndent(e,t){if(this._autoIndent<4||!e.tokenization.isCheapToTokenize(t.startLineNumber))return!1;const i=e.getLanguageIdAtPosition(t.startLineNumber,1),n=e.getLanguageIdAtPosition(t.endLineNumber,1);return!(i!==n||this._languageConfigurationService.getLanguageConfiguration(i).indentRulesSupport===null)}getIndentEditsOfMovingBlock(e,t,i,n,s,r){for(let l=i.startLineNumber;l<=i.endLineNumber;l++){const d=e.getLineContent(l),h=a.getLeadingWhitespace(d),g=be(h,n)+r,p=$o(g,n,s);p!==h&&(t.addEditOperation(new a.Range(l,1,l,h.length+1),p),l===i.endLineNumber&&i.endColumn<=h.length+1&&p===""&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(i=i.setEndPosition(i.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&i.startLineNumber=n)return null;const s=[];for(let l=i;l<=n;l++)s.push(c.getLineContent(l));let r=s.slice(0);return r.sort(qo._COLLATOR.value.compare),t===!0&&(r=r.reverse()),{startLineNumber:i,endLineNumber:n,before:s,after:r}}function zx(c,e,t){const i=$_(c,e,t);return i?o.EditOperation.replace(new a.Range(i.startLineNumber,1,i.endLineNumber,c.getLineMaxColumn(i.endLineNumber)),i.after.join(` +`)):null}class q_ extends o.EditorAction{constructor(e,t){super(t),this.down=e}run(e,t){if(!t.hasModel())return;const i=t.getSelections().map((r,l)=>({selection:r,index:l,ignore:!1}));i.sort((r,l)=>a.Range.compareRangesUsingStarts(r.selection,l.selection));let n=i[0];for(let r=1;r=p.startLineNumber;b--)f.push(i.getLineContent(b));const m=o.EditOperation.replace(p,f.join(` +`));r.push(m);const _=function(b){return b<=p.endLineNumber?p.endLineNumber-b+p.startLineNumber:b},v=function(b){if(b.isEmpty())return new a.Selection(_(b.positionLineNumber),b.positionColumn,_(b.positionLineNumber),b.positionColumn);{const S=_(b.selectionStartLineNumber),w=_(b.positionLineNumber),I=b.selectionStartColumn,C=b.positionColumn;return new a.Selection(S,I,w,C)}};l.push(v(u))}t.pushUndoStop(),t.executeEdits(this.id,r,l),t.pushUndoStop()}}const Nc=class Nc extends o.EditorAction{constructor(){super({id:Nc.ID,label:a.localize2(1304,"Trim Trailing Whitespace"),precondition:o.EditorContextKeys.writable,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:a.KeyChord(2089,2102),weight:100}})}run(e,t,i){let n=[];i.reason==="auto-save"&&(n=(t.getSelections()||[]).map(u=>new a.Position(u.positionLineNumber,u.positionColumn)));const s=t.getSelection();if(s===null)return;const r=e.get(o.IConfigurationService),l=t.getModel(),d=r.getValue("files.trimTrailingWhitespaceInRegexAndStrings",{overrideIdentifier:l?.getLanguageId(),resource:l?.uri}),h=new Px(s,n,d);t.pushUndoStop(),t.executeCommands(this.id,[h]),t.pushUndoStop()}};Nc.ID="editor.action.trimTrailingWhitespace";let Du=Nc;class Zx extends o.EditorAction{constructor(){super({id:"editor.action.deleteLines",label:a.localize2(1305,"Delete Line"),precondition:o.EditorContextKeys.writable,kbOpts:{kbExpr:o.EditorContextKeys.textInputFocus,primary:3113,weight:100},canTriggerInlineEdits:!0})}run(e,t){if(!t.hasModel())return;const i=this._getLinesToRemove(t),n=t.getModel();if(n.getLineCount()===1&&n.getLineMaxColumn(1)===1)return;let s=0;const r=[],l=[];for(let d=0,h=i.length;d1&&(g-=1,f=n.getLineMaxColumn(g)),r.push(o.EditOperation.replace(new a.Selection(g,f,p,m),"")),l.push(new a.Selection(g-s,u.positionColumn,g-s,u.positionColumn)),s+=u.endLineNumber-u.startLineNumber+1}t.pushUndoStop(),t.executeEdits(this.id,r,l),t.revealAllCursors(!0),t.pushUndoStop()}_getLinesToRemove(e){const t=e.getSelections().map(s=>{let r=s.endLineNumber;return s.startLineNumbers.startLineNumber===r.startLineNumber?s.endLineNumber-r.endLineNumber:s.startLineNumber-r.startLineNumber);const i=[];let n=t[0];for(let s=1;s=t[s].startLineNumber?n.endLineNumber=t[s].endLineNumber:(i.push(n),n=t[s]);return i.push(n),i}}class Xx extends o.EditorAction{constructor(){super({id:"editor.action.indentLines",label:a.localize2(1306,"Indent Line"),precondition:o.EditorContextKeys.writable,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:2142,weight:100},canTriggerInlineEdits:!0})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,o.TypeOperations.indent(i.cursorConfig,t.getModel(),t.getSelections())),t.pushUndoStop())}}class Yx extends o.EditorAction{constructor(){super({id:"editor.action.outdentLines",label:a.localize2(1307,"Outdent Line"),precondition:o.EditorContextKeys.writable,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:2140,weight:100},canTriggerInlineEdits:!0})}run(e,t){o.CoreEditingCommands.Outdent.runEditorCommand(e,t,null)}}const Mc=class Mc extends o.EditorAction{constructor(){super({id:Mc.ID,label:a.localize2(1308,"Insert Line Above"),precondition:o.EditorContextKeys.writable,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:3075,weight:100},canTriggerInlineEdits:!0})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,o.EnterOperation.lineInsertBefore(i.cursorConfig,t.getModel(),t.getSelections())))}};Mc.ID="editor.action.insertLineBefore";let el=Mc;const Pc=class Pc extends o.EditorAction{constructor(){super({id:Pc.ID,label:a.localize2(1309,"Insert Line Below"),precondition:o.EditorContextKeys.writable,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:2051,weight:100},canTriggerInlineEdits:!0})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,o.EnterOperation.lineInsertAfter(i.cursorConfig,t.getModel(),t.getSelections())))}};Pc.ID="editor.action.insertLineAfter";let tl=Pc;class X_ extends o.EditorAction{run(e,t){if(!t.hasModel())return;const i=t.getSelection(),n=this._getRangesToDelete(t),s=[];for(let d=0,h=n.length-1;do.EditOperation.replace(d,""));t.pushUndoStop(),t.executeEdits(this.id,l,r),t.pushUndoStop()}}class Qx extends X_{constructor(){super({id:"deleteAllLeft",label:a.localize2(1310,"Delete All Left"),precondition:o.EditorContextKeys.writable,kbOpts:{kbExpr:o.EditorContextKeys.textInputFocus,primary:0,mac:{primary:2049},weight:100},canTriggerInlineEdits:!0})}_getEndCursorState(e,t){let i=null;const n=[];let s=0;return t.forEach(r=>{let l;if(r.endColumn===1&&s>0){const d=r.startLineNumber-s;l=new a.Selection(d,r.startColumn,d,r.startColumn)}else l=new a.Selection(r.startLineNumber,r.startColumn,r.startLineNumber,r.startColumn);s+=r.endLineNumber-r.startLineNumber,r.intersectRanges(e)?i=l:n.push(l)}),i&&n.unshift(i),n}_getRangesToDelete(e){const t=e.getSelections();if(t===null)return[];let i=t;const n=e.getModel();return n===null?[]:(i.sort(a.Range.compareRangesUsingStarts),i=i.map(s=>{if(s.isEmpty())if(s.startColumn===1){const r=Math.max(1,s.startLineNumber-1),l=s.startLineNumber===1?1:n.getLineLength(r)+1;return new a.Range(r,l,s.startLineNumber,1)}else return new a.Range(s.startLineNumber,1,s.startLineNumber,s.startColumn);else return new a.Range(s.startLineNumber,1,s.endLineNumber,s.endColumn)}),i)}}class Jx extends X_{constructor(){super({id:"deleteAllRight",label:a.localize2(1311,"Delete All Right"),precondition:o.EditorContextKeys.writable,kbOpts:{kbExpr:o.EditorContextKeys.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100},canTriggerInlineEdits:!0})}_getEndCursorState(e,t){let i=null;const n=[];for(let s=0,r=t.length,l=0;s{if(s.isEmpty()){const r=t.getLineMaxColumn(s.startLineNumber);return s.startColumn===r?new a.Range(s.startLineNumber,s.startColumn,s.startLineNumber+1,1):new a.Range(s.startLineNumber,s.startColumn,s.startLineNumber,r)}return s});return n.sort(a.Range.compareRangesUsingStarts),n}}class Wx extends o.EditorAction{constructor(){super({id:"editor.action.joinLines",label:a.localize2(1312,"Join Lines"),precondition:o.EditorContextKeys.writable,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:0,mac:{primary:296},weight:100},canTriggerInlineEdits:!0})}run(e,t){const i=t.getSelections();if(i===null)return;let n=t.getSelection();if(n===null)return;i.sort(a.Range.compareRangesUsingStarts);const s=[],r=i.reduce((p,f)=>p.isEmpty()?p.endLineNumber===f.startLineNumber?(n.equalsSelection(p)&&(n=f),f):f.startLineNumber>p.endLineNumber+1?(s.push(p),f):new a.Selection(p.startLineNumber,p.startColumn,f.endLineNumber,f.endColumn):f.startLineNumber>p.endLineNumber?(s.push(p),f):new a.Selection(p.startLineNumber,p.startColumn,f.endLineNumber,f.endColumn));s.push(r);const l=t.getModel();if(l===null)return;const d=[],h=[];let u=n,g=0;for(let p=0,f=s.length;p=1){let R=!0;C===""&&(R=!1),R&&(C.charAt(C.length-1)===" "||C.charAt(C.length-1)===" ")&&(R=!1,C=C.replace(/[\s\uFEFF\xA0]+$/g," "));const D=L.substr(E-1);C+=(R?" ":"")+D,R?b=D.length+1:b=D.length}else b=0}const y=new a.Range(_,v,S,w);if(!y.isEmpty()){let x;m.isEmpty()?(d.push(o.EditOperation.replace(y,C)),x=new a.Selection(y.startLineNumber-g,C.length-b+1,_-g,C.length-b+1)):m.startLineNumber===m.endLineNumber?(d.push(o.EditOperation.replace(y,C)),x=new a.Selection(m.startLineNumber-g,m.startColumn,m.endLineNumber-g,m.endColumn)):(d.push(o.EditOperation.replace(y,C)),x=new a.Selection(m.startLineNumber-g,m.startColumn,m.startLineNumber-g,C.length-I)),a.Range.intersectRanges(y,n)!==null?u=x:h.push(x)}g+=y.endLineNumber-y.startLineNumber}h.unshift(u),t.pushUndoStop(),t.executeEdits(this.id,d,h),t.pushUndoStop()}}class Hx extends o.EditorAction{constructor(){super({id:"editor.action.transpose",label:a.localize2(1313,"Transpose Characters around the Cursor"),precondition:o.EditorContextKeys.writable,canTriggerInlineEdits:!0})}run(e,t){const i=t.getSelections();if(i===null)return;const n=t.getModel();if(n===null)return;const s=[];for(let r=0,l=i.length;r=u){if(h.lineNumber===n.getLineCount())continue;const g=new a.Range(h.lineNumber,Math.max(1,h.column-1),h.lineNumber+1,1),p=n.getValueInRange(g).split("").reverse().join("");s.push(new o.ReplaceCommand(new a.Selection(h.lineNumber,Math.max(1,h.column-1),h.lineNumber+1,1),p))}else{const g=new a.Range(h.lineNumber,Math.max(1,h.column-1),h.lineNumber,h.column+1),p=n.getValueInRange(g).split("").reverse().join("");s.push(new o.ReplaceCommandThatPreservesSelection(g,p,new a.Selection(h.lineNumber,h.column+1,h.lineNumber,h.column+1)))}}t.pushUndoStop(),t.executeCommands(this.id,s),t.pushUndoStop()}}class on extends o.EditorAction{run(e,t){const i=t.getSelections();if(i===null)return;const n=t.getModel();if(n===null)return;const s=t.getOption(148),r=[];for(const l of i)if(l.isEmpty()){const d=l.getStartPosition(),h=t.getConfiguredWordAtPosition(d);if(!h)continue;const u=new a.Range(d.lineNumber,h.startColumn,d.lineNumber,h.endColumn),g=n.getValueInRange(u);r.push(o.EditOperation.replace(u,this._modifyText(g,s)))}else{const d=n.getValueInRange(l);r.push(o.EditOperation.replace(l,this._modifyText(d,s)))}t.pushUndoStop(),t.executeEdits(this.id,r),t.pushUndoStop()}}class eE extends on{constructor(){super({id:"editor.action.transformToUppercase",label:a.localize2(1314,"Transform to Uppercase"),precondition:o.EditorContextKeys.writable,canTriggerInlineEdits:!0})}_modifyText(e,t){return e.toLocaleUpperCase()}}class tE extends on{constructor(){super({id:"editor.action.transformToLowercase",label:a.localize2(1315,"Transform to Lowercase"),precondition:o.EditorContextKeys.writable,canTriggerInlineEdits:!0})}_modifyText(e,t){return e.toLocaleLowerCase()}}class Fe{constructor(e,t){this._pattern=e,this._flags=t,this._actual=null,this._evaluated=!1}get(){if(!this._evaluated){this._evaluated=!0;try{this._actual=new RegExp(this._pattern,this._flags)}catch{}}return this._actual}isSupported(){return this.get()!==null}}const Oc=class Oc extends on{constructor(){super({id:"editor.action.transformToTitlecase",label:a.localize2(1316,"Transform to Title Case"),precondition:o.EditorContextKeys.writable,canTriggerInlineEdits:!0})}_modifyText(e,t){const i=Oc.titleBoundary.get();return i?e.toLocaleLowerCase().replace(i,n=>n.toLocaleUpperCase()):e}};Oc.titleBoundary=new Fe("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu");let il=Oc;const eo=class eo extends on{constructor(){super({id:"editor.action.transformToSnakecase",label:a.localize2(1317,"Transform to Snake Case"),precondition:o.EditorContextKeys.writable,canTriggerInlineEdits:!0})}_modifyText(e,t){const i=eo.caseBoundary.get(),n=eo.singleLetters.get();return!i||!n?e:e.replace(i,"$1_$2").replace(n,"$1_$2$3").toLocaleLowerCase()}};eo.caseBoundary=new Fe("(\\p{Ll})(\\p{Lu})","gmu"),eo.singleLetters=new Fe("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu");let Go=eo;const Ii=class Ii extends on{constructor(){super({id:"editor.action.transformToCamelcase",label:a.localize2(1318,"Transform to Camel Case"),precondition:o.EditorContextKeys.writable,canTriggerInlineEdits:!0})}_modifyText(e,t){const i=/\r\n|\r|\n/.test(e)?Ii.multiLineWordBoundary.get():Ii.singleLineWordBoundary.get(),n=Ii.validWordStart.get();if(!i||!n)return e;const s=e.split(i);return s.shift()?.replace(n,l=>l.toLocaleLowerCase())+s.map(l=>l.substring(0,1).toLocaleUpperCase()+l.substring(1)).join("")}};Ii.singleLineWordBoundary=new Fe("[_\\s-]+","gm"),Ii.multiLineWordBoundary=new Fe("[_-]+","gm"),Ii.validWordStart=new Fe("^(\\p{Lu}[^\\p{Lu}])","gmu");let Zo=Ii;const xi=class xi extends on{constructor(){super({id:"editor.action.transformToPascalcase",label:a.localize2(1319,"Transform to Pascal Case"),precondition:o.EditorContextKeys.writable,canTriggerInlineEdits:!0})}_modifyText(e,t){const i=xi.wordBoundary.get(),n=xi.wordBoundaryToMaintain.get(),s=xi.upperCaseWordMatcher.get();return!i||!n||!s?e:e.split(n).map(d=>d.split(i)).flat().map(d=>{const h=d.charAt(0).toLocaleUpperCase()+d.slice(1);return h.length>1&&s.test(h)?h.charAt(0)+h.slice(1).toLocaleLowerCase():h}).join("")}};xi.wordBoundary=new Fe("[_ \\t-]","gm"),xi.wordBoundaryToMaintain=new Fe("(?<=\\.)","gm"),xi.upperCaseWordMatcher=new Fe("^\\p{Lu}+$","mu");let nl=xi;const Ei=class Ei extends on{static isSupported(){return[this.caseBoundary,this.singleLetters,this.underscoreBoundary].every(t=>t.isSupported())}constructor(){super({id:"editor.action.transformToKebabcase",label:a.localize2(1320,"Transform to Kebab Case"),precondition:o.EditorContextKeys.writable,canTriggerInlineEdits:!0})}_modifyText(e,t){const i=Ei.caseBoundary.get(),n=Ei.singleLetters.get(),s=Ei.underscoreBoundary.get();return!i||!n||!s?e:e.replace(s,"$1-$3").replace(i,"$1-$2").replace(n,"$1-$2").toLocaleLowerCase()}};Ei.caseBoundary=new Fe("(\\p{Ll})(\\p{Lu})","gmu"),Ei.singleLetters=new Fe("(\\p{Lu}|\\p{N})(\\p{Lu}\\p{Ll})","gmu"),Ei.underscoreBoundary=new Fe("(\\S)(_)(\\S)","gm");let sl=Ei;o.registerEditorAction(Vx),o.registerEditorAction(Bx),o.registerEditorAction(Kx),o.registerEditorAction(Ux),o.registerEditorAction(kx),o.registerEditorAction(jx),o.registerEditorAction($x),o.registerEditorAction(qx),o.registerEditorAction(Du),o.registerEditorAction(Zx),o.registerEditorAction(Xx),o.registerEditorAction(Yx),o.registerEditorAction(el),o.registerEditorAction(tl),o.registerEditorAction(Qx),o.registerEditorAction(Jx),o.registerEditorAction(Wx),o.registerEditorAction(Hx),o.registerEditorAction(eE),o.registerEditorAction(tE),o.registerEditorAction(Gx),Go.caseBoundary.isSupported()&&Go.singleLetters.isSupported()&&o.registerEditorAction(Go),Zo.singleLineWordBoundary.isSupported()&&Zo.multiLineWordBoundary.isSupported()&&o.registerEditorAction(Zo),nl.wordBoundary.isSupported()&&o.registerEditorAction(nl),il.titleBoundary.isSupported()&&o.registerEditorAction(il),sl.isSupported()&&o.registerEditorAction(sl);var iE=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Y_=function(c,e){return function(t,i){e(t,i,c)}};function nE(c){return c.sourceId+" @@ "+JSON.stringify({...c,modelUri:c.modelUri?.toString(),sourceId:void 0})}let ol=class extends a.Disposable{static cast(){return this}constructor(e,t,i){super(),this._key=e,this._contextKeyService=t,this._dataChannelService=i,this._isEnabledContextKeyValue=sE("structuredLogger.enabled:"+this._key,this._contextKeyService).recomputeInitiallyAndOnChange(this._store),this.isEnabled=this._isEnabledContextKeyValue.map(n=>n!==void 0)}log(e){return this._isEnabledContextKeyValue.get()?(this._dataChannelService.getDataChannel("structuredLogger:"+this._key).sendData(e),!0):!1}};ol=iE([Y_(1,o.IContextKeyService),Y_(2,o.IDataChannelService)],ol);function sE(c,e){return o.observableFromEvent(e.onDidChangeContext,()=>e.getContextKeyValue(c))}var oE=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Q_=function(c,e){return function(t,i){e(t,i,c)}};let Ru=class extends a.Disposable{constructor(e,t,i){super(),this._editor=e,this._instantiationService=t,this._loggerService=i,this._structuredLogger=this._register(this._instantiationService.createInstance(ol.cast(),"editor.inlineSuggest.logChangeReason.commandId"));const n=this._loggerService?.createLogger("textModelChanges",{hidden:!1,name:"Text Model Changes Reason"}),s=o.observableFromEvent(this,n.onDidChangeLogLevel,()=>n.getLevel());this._register(o.autorun(r=>{o.canLog(s.read(r),o.LogLevel.Trace)&&r.store.add(this._editor.onDidChangeModelContent(l=>{this._editor.getModel()?.uri.scheme!=="output"&&n.trace("onDidChangeModelContent: "+l.detailedReasons.map(d=>d.toKey(Number.MAX_VALUE)).join(", "))}))})),this._register(o.autorun(r=>{this._editor instanceof o.CodeEditorWidget&&this._structuredLogger.isEnabled.read(r)&&r.store.add(this._editor.onDidChangeModelContent(l=>{const d=this._editor.getModel();if(!d)return;const h=l.detailedReasons[0],u={...h.metadata,sourceId:"TextModel.setChangeReason",source:h.metadata.source,time:Date.now(),modelUri:d.uri,modelVersion:d.getVersionId()};setTimeout(()=>{this._structuredLogger.log(u)},0)}))}))}};Ru=oE([Q_(1,o.IInstantiationService),Q_(2,o.ILoggerService)],Ru);function J_(c,e=a.isWindows){return o.hasDriveLetter(c,e)?c.charAt(0).toUpperCase()+c.slice(1):c}var rE=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},aE=function(c,e){return function(t,i){e(t,i,c)}};class W_{constructor(e){this._delegates=e}resolve(e){for(const t of this._delegates){const i=t.resolve(e);if(i!==void 0)return i}}}class H_{constructor(e,t,i,n){this._model=e,this._selection=t,this._selectionIdx=i,this._overtypingCapturer=n}resolve(e){const{name:t}=e;if(t==="SELECTION"||t==="TM_SELECTED_TEXT"){let i=this._model.getValueInRange(this._selection)||void 0,n=this._selection.startLineNumber!==this._selection.endLineNumber;if(!i&&this._overtypingCapturer){const s=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);s&&(i=s.value,n=s.multiline)}if(i&&n&&e.snippet){const s=this._model.getLineContent(this._selection.startLineNumber),r=a.getLeadingWhitespace(s,0,this._selection.startColumn-1);let l=r;e.snippet.walk(h=>h===e?!1:(h instanceof re&&(l=a.getLeadingWhitespace(a.splitLines(h.value).pop())),!0));const d=a.commonPrefixLength(l,r);i=i.replace(/(\r\n|\r|\n)(.*)/g,(h,u,g)=>`${u}${l.substr(d)}${g}`)}return i}else{if(t==="TM_CURRENT_LINE")return this._model.getLineContent(this._selection.positionLineNumber);if(t==="TM_CURRENT_WORD"){const i=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return i&&i.word||void 0}else{if(t==="TM_LINE_INDEX")return String(this._selection.positionLineNumber-1);if(t==="TM_LINE_NUMBER")return String(this._selection.positionLineNumber);if(t==="CURSOR_INDEX")return String(this._selectionIdx);if(t==="CURSOR_NUMBER")return String(this._selectionIdx+1)}}}}class ev{constructor(e,t){this._labelService=e,this._model=t}resolve(e){const{name:t}=e;if(t==="TM_FILENAME")return a.basename(this._model.uri.fsPath);if(t==="TM_FILENAME_BASE"){const i=a.basename(this._model.uri.fsPath),n=i.lastIndexOf(".");return n<=0?i:i.slice(0,n)}else{if(t==="TM_DIRECTORY")return a.dirname(this._model.uri.fsPath)==="."?"":this._labelService.getUriLabel(o.dirname(this._model.uri));if(t==="TM_DIRECTORY_BASE")return a.dirname(this._model.uri.fsPath)==="."?"":a.basename(a.dirname(this._model.uri.fsPath));if(t==="TM_FILEPATH")return this._labelService.getUriLabel(this._model.uri);if(t==="RELATIVE_FILEPATH")return this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0})}}}class tv{constructor(e,t,i,n){this._readClipboardText=e,this._selectionIdx=t,this._selectionCount=i,this._spread=n}resolve(e){if(e.name!=="CLIPBOARD")return;const t=this._readClipboardText();if(t){if(this._spread){const i=t.split(/\r\n|\n|\r/).filter(n=>!a.isFalsyOrWhitespace(n));if(i.length===this._selectionCount)return i[this._selectionIdx]}return t}}}let rl=class{constructor(e,t,i){this._model=e,this._selection=t,this._languageConfigurationService=i}resolve(e){const{name:t}=e,i=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),n=this._languageConfigurationService.getLanguageConfiguration(i).comments;if(n){if(t==="LINE_COMMENT")return n.lineCommentToken||void 0;if(t==="BLOCK_COMMENT_START")return n.blockCommentStartToken||void 0;if(t==="BLOCK_COMMENT_END")return n.blockCommentEndToken||void 0}}};rl=rE([aE(2,o.ILanguageConfigurationService)],rl);const _t=class _t{constructor(){this._date=new Date}resolve(e){const{name:t}=e;switch(t){case"CURRENT_YEAR":return String(this._date.getFullYear());case"CURRENT_YEAR_SHORT":return String(this._date.getFullYear()).slice(-2);case"CURRENT_MONTH":return String(this._date.getMonth().valueOf()+1).padStart(2,"0");case"CURRENT_DATE":return String(this._date.getDate().valueOf()).padStart(2,"0");case"CURRENT_HOUR":return String(this._date.getHours().valueOf()).padStart(2,"0");case"CURRENT_MINUTE":return String(this._date.getMinutes().valueOf()).padStart(2,"0");case"CURRENT_SECOND":return String(this._date.getSeconds().valueOf()).padStart(2,"0");case"CURRENT_MILLISECOND":return String(this._date.getMilliseconds().valueOf()).padStart(3,"0");case"CURRENT_DAY_NAME":return _t.dayNames[this._date.getDay()];case"CURRENT_DAY_NAME_SHORT":return _t.dayNamesShort[this._date.getDay()];case"CURRENT_MONTH_NAME":return _t.monthNames[this._date.getMonth()];case"CURRENT_MONTH_NAME_SHORT":return _t.monthNamesShort[this._date.getMonth()];case"CURRENT_SECONDS_UNIX":return String(Math.floor(this._date.getTime()/1e3));case"CURRENT_MILLISECONDS_UNIX":return String(this._date.getTime());case"CURRENT_TIMEZONE_OFFSET":{const i=this._date.getTimezoneOffset(),n=i>0?"-":"+",s=Math.trunc(Math.abs(i/60)),r=s<10?"0"+s:s,l=Math.abs(i)-s*60,d=l<10?"0"+l:l;return n+r+":"+d}case"CURRENT_TIMEZONE_NAME":return this._timezoneName??=Intl.DateTimeFormat().resolvedOptions().timeZone}}};_t.dayNames=[a.localize(1456,"Sunday"),a.localize(1457,"Monday"),a.localize(1458,"Tuesday"),a.localize(1459,"Wednesday"),a.localize(1460,"Thursday"),a.localize(1461,"Friday"),a.localize(1462,"Saturday")],_t.dayNamesShort=[a.localize(1463,"Sun"),a.localize(1464,"Mon"),a.localize(1465,"Tue"),a.localize(1466,"Wed"),a.localize(1467,"Thu"),a.localize(1468,"Fri"),a.localize(1469,"Sat")],_t.monthNames=[a.localize(1470,"January"),a.localize(1471,"February"),a.localize(1472,"March"),a.localize(1473,"April"),a.localize(1474,"May"),a.localize(1475,"June"),a.localize(1476,"July"),a.localize(1477,"August"),a.localize(1478,"September"),a.localize(1479,"October"),a.localize(1480,"November"),a.localize(1481,"December")],_t.monthNamesShort=[a.localize(1482,"Jan"),a.localize(1483,"Feb"),a.localize(1484,"Mar"),a.localize(1485,"Apr"),a.localize(1486,"May"),a.localize(1487,"Jun"),a.localize(1488,"Jul"),a.localize(1489,"Aug"),a.localize(1490,"Sep"),a.localize(1491,"Oct"),a.localize(1492,"Nov"),a.localize(1493,"Dec")];let al=_t;class iv{constructor(e){this._workspaceService=e}resolve(e){if(!this._workspaceService)return;const t=o.toWorkspaceIdentifier(this._workspaceService.getWorkspace());if(!o.isEmptyWorkspaceIdentifier(t)){if(e.name==="WORKSPACE_NAME")return this._resolveWorkspaceName(t);if(e.name==="WORKSPACE_FOLDER")return this._resoveWorkspacePath(t)}}_resolveWorkspaceName(e){if(o.isSingleFolderWorkspaceIdentifier(e))return a.basename(e.uri.path);let t=a.basename(e.configPath.path);return t.endsWith(o.WORKSPACE_EXTENSION)&&(t=t.substr(0,t.length-o.WORKSPACE_EXTENSION.length-1)),t}_resoveWorkspacePath(e){if(o.isSingleFolderWorkspaceIdentifier(e))return J_(e.uri.fsPath);const t=a.basename(e.configPath.path);let i=e.configPath.fsPath;return i.endsWith(t)&&(i=i.substr(0,i.length-t.length-1)),i?J_(i):"/"}}class nv{resolve(e){const{name:t}=e;if(t==="RANDOM")return Math.random().toString().slice(-6);if(t==="RANDOM_HEX")return Math.random().toString(16).slice(-6);if(t==="UUID")return o.generateUuid()}}var lE=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},cE=function(c,e){return function(t,i){e(t,i,c)}},Ye;const Ue=class Ue{constructor(e,t,i){this._editor=e,this._snippet=t,this._snippetLineLeadingWhitespace=i,this._offset=-1,this._nestingLevel=1,this._placeholderGroups=a.groupBy(t.placeholders,De.compareByIndex),this._placeholderGroupsIdx=-1}initialize(e){this._offset=e.newPosition}dispose(){this._placeholderDecorations&&this._editor.removeDecorations([...this._placeholderDecorations.values()]),this._placeholderGroups.length=0}_initDecorations(){if(this._offset===-1)throw new Error("Snippet not initialized!");if(this._placeholderDecorations)return;this._placeholderDecorations=new Map;const e=this._editor.getModel();this._editor.changeDecorations(t=>{for(const i of this._snippet.placeholders){const n=this._snippet.offset(i),s=this._snippet.fullLen(i),r=a.Range.fromPositions(e.getPositionAt(this._offset+n),e.getPositionAt(this._offset+n+s)),l=i.isFinalTabstop?Ue._decor.inactiveFinal:Ue._decor.inactive,d=t.addDecoration(r,l);this._placeholderDecorations.set(i,d)}})}move(e){if(!this._editor.hasModel())return[];this._initDecorations();const t=this._editor.getModel();if(this._placeholderGroupsIdx>=0){const s=[];for(const r of this._placeholderGroups[this._placeholderGroupsIdx])if(r.transform){const l=this._placeholderDecorations.get(r),d=l?t.getDecorationRange(l):null;if(d){const h=t.getValueInRange(d),u=r.transform.resolve(h).split(/\r\n|\r|\n/);for(let g=1;g0&&this._editor.executeEdits("snippet.placeholderTransform",s)}let i=!1;e===!0&&this._placeholderGroupsIdx0&&(this._placeholderGroupsIdx-=1,i=!0);const n=t.changeDecorations(s=>{const r=new Set,l=[];for(const d of this._placeholderGroups[this._placeholderGroupsIdx]){const h=this._placeholderDecorations.get(d),u=h?t.getDecorationRange(h):null;if(i=i&&this._hasPlaceholderBeenCollapsed(d),!(!h||!u)){l.push(new a.Selection(u.startLineNumber,u.startColumn,u.endLineNumber,u.endColumn)),s.changeDecorationOptions(h,d.isFinalTabstop?Ue._decor.activeFinal:Ue._decor.active),r.add(d);for(const g of this._snippet.enclosingPlaceholders(d)){const p=this._placeholderDecorations.get(g);p&&(s.changeDecorationOptions(p,g.isFinalTabstop?Ue._decor.activeFinal:Ue._decor.active),r.add(g))}}}for(const[d,h]of this._placeholderDecorations)r.has(d)||s.changeDecorationOptions(h,d.isFinalTabstop?Ue._decor.inactiveFinal:Ue._decor.inactive);return l});return i?this.move(e):n??[]}_hasPlaceholderBeenCollapsed(e){const t=this._editor.getModel();let i=e;for(;i;){if(i instanceof De){const n=this._placeholderDecorations.get(i),s=n?t.getDecorationRange(n):null;if((!s||s.isEmpty())&&i.toString().length>0)return!0}i=i.parent}return!1}get isAtFirstPlaceholder(){return this._placeholderGroupsIdx<=0||this._placeholderGroups.length===0}get isAtLastPlaceholder(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}get hasPlaceholder(){return this._snippet.placeholders.length>0}get isTrivialSnippet(){if(this._snippet.placeholders.length===0)return!0;if(this._snippet.placeholders.length===1){const[e]=this._snippet.placeholders;if(e.isFinalTabstop&&this._snippet.rightMostDescendant===e)return!0}return!1}computePossibleSelections(){const e=new Map;for(const t of this._placeholderGroups){let i;for(const n of t){if(n.isFinalTabstop)break;i||(i=[],e.set(n.index,i));const s=this._placeholderDecorations.get(n),r=this._editor.getModel().getDecorationRange(s);if(!r){e.delete(n.index);break}i.push(r)}}return e}get activeChoice(){if(!this._placeholderDecorations)return;const e=this._placeholderGroups[this._placeholderGroupsIdx][0];if(!e?.choice)return;const t=this._placeholderDecorations.get(e);if(!t)return;const i=this._editor.getModel().getDecorationRange(t);if(i)return{range:i,choice:e.choice}}get hasChoice(){let e=!1;return this._snippet.walk(t=>(e=t instanceof ns,!e)),e}get activePlaceholderCount(){return this._placeholderGroupsIdx<0?0:this._placeholderGroups[this._placeholderGroupsIdx].length}merge(e){const t=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations(i=>{for(const n of this._placeholderGroups[this._placeholderGroupsIdx]){const s=e.shift();console.assert(s._offset!==-1),console.assert(!s._placeholderDecorations);const r=s._snippet.placeholderInfo.last.index;for(const d of s._snippet.placeholderInfo.all)d.isFinalTabstop?d.index=n.index+(r+1)/this._nestingLevel:d.index=n.index+d.index/this._nestingLevel;this._snippet.replace(n,s._snippet.children);const l=this._placeholderDecorations.get(n);i.removeDecoration(l),this._placeholderDecorations.delete(n);for(const d of s._snippet.placeholders){const h=s._snippet.offset(d),u=s._snippet.fullLen(d),g=a.Range.fromPositions(t.getPositionAt(s._offset+h),t.getPositionAt(s._offset+h+u)),p=i.addDecoration(g,Ue._decor.inactive);this._placeholderDecorations.set(d,p)}}this._renormalizePlaceholderIndices(),this._placeholderGroups=a.groupBy(this._snippet.placeholders,De.compareByIndex)})}_renormalizePlaceholderIndices(){const e=this._snippet.placeholders,t=new Set;for(const s of e)s.isFinalTabstop||t.add(s.index);const i=[...t].sort((s,r)=>s-r),n=new Map;for(let s=0;s{if(!(h instanceof re)||h.parent instanceof ns||s&&!s.has(h))return!0;const u=h.value.split(/\r\n|\r|\n/);if(i){const p=n.offset(h);if(p===0)u[0]=e.normalizeIndentation(u[0]);else{d=d??n.toString();const f=d.charCodeAt(p-1);(f===10||f===13)&&(u[0]=e.normalizeIndentation(l+u[0]))}for(let f=1;fI.get(o.IWorkspaceContextService)),m=e.invokeWithinContext(I=>new ev(I.get(o.ILabelService),p)),_=()=>l,v=p.getValueInRange(Ye.adjustSelection(p,e.getSelection(),i,0)),b=p.getValueInRange(Ye.adjustSelection(p,e.getSelection(),0,n)),S=p.getLineFirstNonWhitespaceColumn(e.getSelection().positionLineNumber),w=e.getSelections().map((I,C)=>({selection:I,idx:C})).sort((I,C)=>a.Range.compareRangesUsingStarts(I.selection,C.selection));for(const{selection:I,idx:C}of w){let y=Ye.adjustSelection(p,I,i,0),x=Ye.adjustSelection(p,I,0,n);v!==p.getValueInRange(y)&&(y=I),b!==p.getValueInRange(x)&&(x=I);const L=I.setStartPosition(y.startLineNumber,y.startColumn).setEndPosition(x.endLineNumber,x.endColumn),E=new Ki().parse(t,!0,s),R=L.getStartPosition(),D=Ye.adjustWhitespace(p,R,r||C>0&&S!==p.getLineFirstNonWhitespaceColumn(I.positionLineNumber),E);E.resolveVariables(new W_([m,new tv(_,C,w.length,e.getOption(88)==="spread"),new H_(p,I,C,d),new rl(p,I,h),new al,new iv(f),new nv])),u[C]=o.EditOperation.replace(L,E.toString()),u[C].identifier={major:C,minor:0},u[C]._isTracked=!0,g[C]=new ll(e,E,D)}return{edits:u,snippets:g}}static createEditsAndSnippetsFromEdits(e,t,i,n,s,r,l){if(!e.hasModel()||t.length===0)return{edits:[],snippets:[]};const d=[],h=e.getModel(),u=new Ki,g=new po,p=e.invokeWithinContext(I=>new ev(I.get(o.ILabelService),h)),f=new al,m=new iv(e.invokeWithinContext(I=>I.get(o.IWorkspaceContextService))),_=new nv,v=()=>s,b=e.getOption(88)==="spread",S=t.map((I,C)=>({edit:I,idx:C})).sort((I,C)=>a.Range.compareRangesUsingStarts(I.edit.range,C.edit.range));let w=0;for(let I=0;I0){const F=S[I-1].edit.range,k=a.Range.fromPositions(F.getEndPosition(),C.getStartPosition()),P=new re(h.getValueInRange(k));g.appendChild(P),w+=P.value.length}const E=new Set;g.walk(F=>(F instanceof Bi&&E.add(F),!0));const R=u.parseFragment(y,g);Ye.adjustWhitespace(h,C.getStartPosition(),x!==void 0?!x:n,g,new Set(R));const D=a.Selection.fromRange(C,0),T=new W_([p,new tv(v,L,S.length,b),new H_(h,D,L,r),new rl(h,D,l),f,m,_]);g.walk(F=>(F instanceof Bi&&!E.has(F)&&F.resolve(T),!0));const M=g.toString(),A=M.slice(w);w=M.length;const U=o.EditOperation.replace(C,A);U.identifier={major:I,minor:0},U._isTracked=!0,d.push(U)}return u.ensureFinalTabstop(g,i,!0),{edits:d,snippets:[new ll(e,g,"")]}}constructor(e,t,i=sv,n){this._editor=e,this._template=t,this._options=i,this._languageConfigurationService=n,this._templateMerges=[],this._snippets=[]}dispose(){a.dispose(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(e){if(!this._editor.hasModel())return;const{edits:t,snippets:i}=typeof this._template=="string"?Ye.createEditsAndSnippetsFromSelections(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService):Ye.createEditsAndSnippetsFromEdits(this._editor,this._template,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService);this._snippets=i,this._editor.executeEdits(e??o.EditSources.snippet(),t,n=>{const s=n.filter(r=>!!r.identifier);for(let r=0;ra.Selection.fromPositions(r.range.getEndPosition()))}),this._editor.revealRange(this._editor.getSelections()[0])}merge(e,t=sv){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,e]);const{edits:i,snippets:n}=Ye.createEditsAndSnippetsFromSelections(this._editor,e,t.overwriteBefore,t.overwriteAfter,!0,t.adjustWhitespace,t.clipboardText,t.overtypingCapturer,this._languageConfigurationService);this._editor.executeEdits("snippet",i,s=>{const r=s.filter(h=>!!h.identifier);for(let h=0;hh+u.activePlaceholderCount,0);if(!l&&d){for(const h of this._snippets)h.merge(n);console.assert(n.length===0)}return this._snippets[0].hasPlaceholder&&!l&&d?this._move(void 0):r.map(h=>a.Selection.fromPositions(h.range.getEndPosition()))})}next(){const e=this._move(!0);e.length>0&&(this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition()))}prev(){const e=this._move(!1);e.length>0&&(this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition()))}_move(e){const t=[];for(const i of this._snippets){const n=i.move(e);t.push(...n)}return t}get isAtFirstPlaceholder(){return this._snippets[0].isAtFirstPlaceholder}get isAtLastPlaceholder(){return this._snippets[0].isAtLastPlaceholder}get hasPlaceholder(){return this._snippets[0].hasPlaceholder}get hasChoice(){return this._snippets[0].hasChoice}get activeChoice(){return this._snippets[0].activeChoice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;const e=this._editor.getSelections();if(e.length{s.push(...n.get(r))})}e.sort(a.Range.compareRangesUsingStarts);for(const[i,n]of t){if(n.length!==e.length){t.delete(i);continue}n.sort(a.Range.compareRangesUsingStarts);for(let s=0;s0}};cl=Ye=lE([cE(3,o.ILanguageConfigurationService)],cl);var dE=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},dl=function(c,e){return function(t,i){e(t,i,c)}},rn;const ov={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let ee=(et=class{static get(e){return e.getContribution(rn.ID)}constructor(e,t,i,n,s){this._editor=e,this._logService=t,this._languageFeaturesService=i,this._languageConfigurationService=s,this._inSnippetObservable=o.observableValue(this,!1),this._snippetListener=new a.DisposableStore,this._modelVersionId=-1,this._inSnippet=rn.InSnippetMode.bindTo(n),this._hasNextTabstop=rn.HasNextTabstop.bindTo(n),this._hasPrevTabstop=rn.HasPrevTabstop.bindTo(n),this._inSnippetChoice=rn.InSnippetChoice.bindTo(n)}dispose(){this._inSnippet.reset(),this._inSnippetObservable.set(!1,void 0),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._inSnippetChoice.reset(),this._session?.dispose(),this._snippetListener.dispose()}insert(e,t){try{this._doInsert(e,typeof t>"u"?ov:{...ov,...t})}catch(i){this.cancel(),this._logService.error(i),this._logService.error("snippet_error"),this._logService.error("insert_template=",e),this._logService.error("existing_template=",this._session?this._session._logInfo():"")}}_doInsert(e,t){if(this._editor.hasModel()){if(this._snippetListener.clear(),t.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session&&typeof e!="string"&&this.cancel(),this._session?(a.assertType(typeof e=="string"),this._session.merge(e,t)):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new cl(this._editor,e,t,this._languageConfigurationService),this._session.insert(t.reason)),t.undoStopAfter&&this._editor.getModel().pushStackElement(),this._session?.hasChoice){const i={_debugDisplayName:"snippetChoiceCompletions",provideCompletionItems:(h,u)=>{if(!this._session||h!==this._editor.getModel()||!a.Position.equals(this._editor.getPosition(),u))return;const{activeChoice:g}=this._session;if(!g||g.choice.options.length===0)return;const p=h.getValueInRange(g.range),f=!!g.choice.options.find(_=>_.value===p),m=[];for(let _=0;_{s?.dispose(),r=!1},d=()=>{r||(s=this._languageFeaturesService.completionProvider.register({language:n.getLanguageId(),pattern:n.uri.fsPath,scheme:n.uri.scheme,exclusive:!0},i),this._snippetListener.add(s),r=!0)};this._choiceCompletions={provider:i,enable:d,disable:l}}this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent(i=>i.isFlush&&this.cancel())),this._snippetListener.add(this._editor.onDidChangeModel(()=>this.cancel())),this._snippetListener.add(this._editor.onDidChangeCursorSelection(()=>this._updateState()))}}_updateState(){if(!(!this._session||!this._editor.hasModel())){if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this._editor.getModel().pushStackElement(),this.cancel();this._inSnippet.set(!0),this._inSnippetObservable.set(!0,void 0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}}_handleChoice(){if(!this._session||!this._editor.hasModel()){this._currentChoice=void 0,this._inSnippetChoice.reset();return}const{activeChoice:e}=this._session;if(!e||!this._choiceCompletions){this._choiceCompletions?.disable(),this._currentChoice=void 0,this._inSnippetChoice.reset();return}this._inSnippetChoice.set(!0),this._currentChoice!==e.choice&&(this._currentChoice=e.choice,this._choiceCompletions.enable(),queueMicrotask(()=>{Ix(this._editor,this._choiceCompletions.provider)}))}finish(){for(;this._inSnippet.get();)this.next()}cancel(e=!1){this._inSnippet.reset(),this._inSnippetObservable.set(!1,void 0),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._inSnippetChoice.reset(),this._snippetListener.clear(),this._currentChoice=void 0,this._session?.dispose(),this._session=void 0,this._modelVersionId=-1,e&&this._editor.setSelections([this._editor.getSelection()])}prev(){this._session?.prev(),this._updateState()}next(){this._session?.next(),this._updateState()}isInSnippet(){return!!this._inSnippet.get()}get isInSnippetObservable(){return this._inSnippetObservable}},rn=et,et.ID="snippetController2",et.InSnippetMode=new o.RawContextKey("inSnippetMode",!1,a.localize(1451,"Whether the editor in current in snippet mode")),et.HasNextTabstop=new o.RawContextKey("hasNextTabstop",!1,a.localize(1452,"Whether there is a next tab stop when in snippet mode")),et.HasPrevTabstop=new o.RawContextKey("hasPrevTabstop",!1,a.localize(1453,"Whether there is a previous tab stop when in snippet mode")),et.InSnippetChoice=new o.RawContextKey("inSnippetChoice",!1,a.localize(1454,"Whether the current snippet tab stop is a choice")),et);ee=rn=dE([dl(1,o.ILogService),dl(2,o.ILanguageFeaturesService),dl(3,o.IContextKeyService),dl(4,o.ILanguageConfigurationService)],ee),o.registerEditorContribution(ee.ID,ee,4);const hl=o.EditorCommand.bindToContribution(ee.get);o.registerEditorCommand(new hl({id:"jumpToNextSnippetPlaceholder",precondition:o.ContextKeyExpr.and(ee.InSnippetMode,ee.HasNextTabstop),handler:c=>c.next(),kbOpts:{weight:130,kbExpr:o.EditorContextKeys.textInputFocus,primary:2}})),o.registerEditorCommand(new hl({id:"jumpToPrevSnippetPlaceholder",precondition:o.ContextKeyExpr.and(ee.InSnippetMode,ee.HasPrevTabstop),handler:c=>c.prev(),kbOpts:{weight:130,kbExpr:o.EditorContextKeys.textInputFocus,primary:1026}})),o.KeybindingsRegistry.registerKeybindingRule({id:"jumpToPrevSnippetPlaceholder",weight:191,when:o.ContextKeyExpr.and(ee.InSnippetMode,ee.HasPrevTabstop,ee.InSnippetChoice,o.EditorContextKeys.textInputFocus),primary:1026}),o.registerEditorCommand(new hl({id:"leaveSnippet",precondition:ee.InSnippetMode,handler:c=>c.cancel(!0),kbOpts:{weight:130,kbExpr:o.EditorContextKeys.textInputFocus,primary:9,secondary:[1033]}})),o.registerEditorCommand(new hl({id:"acceptSnippet",precondition:ee.InSnippetMode,handler:c=>c.finish()}));function ul(c){return new hE(c)}class hE extends a.PositionOffsetTransformerBase{constructor(e){super(),this._textModel=e}getOffset(e){return this._textModel.getOffsetAt(e)}getPosition(e){return this._textModel.getPositionAt(e)}}const uE=[];function gE(){return uE}function rv(c){return pE(c).map(t=>t.getEndPosition())}function pE(c){const e=a.Permutation.createSortPermutation(c,a.compareBy(n=>n.range,a.Range.compareRangesUsingStarts)),i=new a.TextEdit(e.apply(c)).getNewRanges();return e.inverse().apply(i)}function fE(c,e){const t=ul(e),i=e.getValue();return c.map(r=>t.getStringReplacement(r)).map(r=>r.removeCommonSuffixPrefix(i)).map(r=>t.getTextReplacement(r))}function mE(c,e){const t=o.observableValue("result",[]),i=[];return e.add(o.autorun(n=>{const s=c.read(n);o.transaction(r=>{if(s.length!==i.length){i.length=s.length;for(let l=0;ll.set(s[d],r))})})),t}class _E{constructor(e){this._contextKeyService=e}bind(e,t){return o.bindContextKey(e,this._contextKeyService,t instanceof Function?t:i=>t.read(i))}}function av(c,e){return new Promise(t=>{let i;const n=setTimeout(()=>{i&&i.dispose(),t()},c);e&&(i=e.onCancellationRequested(()=>{clearTimeout(n),i&&i.dispose(),t()}))})}class Xo{static message(e){return new Xo(void 0,e)}constructor(e,t=void 0){this.error=e,this.message=t}static is(e){return e instanceof Xo}logError(){this.message?console.error(`ErrorResult: ${this.message}`,this.error):console.error("ErrorResult: An unexpected error-case occurred, usually caused by invalid input.",this.error)}}class Tu{static startNow(e,t,i,n=lv){return new Tu(e,t,i,Date.now(),n)}constructor(e,t,i,n,s=lv){this.startValue=e,this.endValue=t,this.durationMs=i,this.startTimeMs=n,this._interpolationFunction=s,e===t&&(this.durationMs=0)}isFinished(e){return e>=this.startTimeMs+this.durationMs}getValue(e){const t=e-this.startTimeMs;return t>=this.durationMs?this.endValue:this._interpolationFunction(t,this.startValue,this.endValue-this.startValue,this.durationMs)}}function lv(c,e,t,i){return c===i?e+t:t*(-Math.pow(2,-10*c/i)+1)+e}function vE(c,e,t,i){return t*((c=c/i-1)*c*c+1)+e}class bE{constructor(e){this._value=e}getValue(e){const t=Date.now();return this._value.isFinished(t)||Yo.instance.invalidateOnNextAnimationFrame(e),this._value.getValue(t)}isFinished(e){const t=Date.now(),i=this._value.isFinished(t);return i||Yo.instance.invalidateOnNextAnimationFrame(e),i}}const Ac=class Ac{constructor(){this._counter=o.observableSignal(this),this._isScheduled=!1}invalidateOnNextAnimationFrame(e){this._counter.read(e),this._isScheduled||(this._isScheduled=!0,o.getActiveWindow().requestAnimationFrame(()=>{this._isScheduled=!1,this._update()}))}_update(){this._counter.trigger(void 0)}};Ac.instance=new Ac;let Yo=Ac;class Qo{constructor(e,t){this.lineNumber=e,this.parts=t,a.assertFn(()=>a.checkAdjacentItems(t,(i,n)=>i.column<=n.column))}equals(e){return this.lineNumber===e.lineNumber&&this.parts.length===e.parts.length&&this.parts.every((t,i)=>t.equals(e.parts[i]))}renderForScreenReader(e){if(this.parts.length===0)return"";const t=this.parts[this.parts.length-1],i=e.substr(0,t.column-1);return new a.TextEdit([...this.parts.map(s=>new a.TextReplacement(a.Range.fromPositions(new a.Position(1,s.column)),s.lines.map(r=>r.line).join(` +`)))]).applyToString(i).substring(this.parts[0].column-1)}isEmpty(){return this.parts.every(e=>e.lines.length===0)}get lineCount(){return 1+this.parts.reduce((e,t)=>e+t.lines.length-1,0)}}class gl{constructor(e,t,i,n=[]){this.column=e,this.text=t,this.preview=i,this._inlineDecorations=n,this.lines=a.splitLines(this.text).map((s,r)=>({line:s,lineDecorations:o.LineDecoration.filter(this._inlineDecorations,r+1,1,s.length+1)}))}equals(e){return this.column===e.column&&this.lines.length===e.lines.length&&this.lines.every((t,i)=>t.line===e.lines[i].line&&o.LineDecoration.equalsArr(t.lineDecorations,e.lines[i].lineDecorations))}}class Nu{constructor(e,t,i,n=0){this.lineNumber=e,this.columnRange=t,this.text=i,this.additionalReservedLineCount=n,this.parts=[new gl(this.columnRange.endColumnExclusive,this.text,!1)],this.newLines=a.splitLines(this.text)}renderForScreenReader(e){return this.newLines.join(` +`)}get lineCount(){return this.newLines.length}isEmpty(){return this.parts.every(e=>e.lines.length===0)}equals(e){return this.lineNumber===e.lineNumber&&this.columnRange.equals(e.columnRange)&&this.newLines.length===e.newLines.length&&this.newLines.every((t,i)=>t===e.newLines[i])&&this.additionalReservedLineCount===e.additionalReservedLineCount}}function cv(c,e){return a.equals(c,e,dv)}function dv(c,e){return c===e?!0:!c||!e?!1:c instanceof Qo&&e instanceof Qo||c instanceof Nu&&e instanceof Nu?c.equals(e):!1}function Xt(c,e,t){const i=t?c.range.intersectRanges(t):c.range;if(!i)return c;const n=c.text.replaceAll(`\r +`,` +`),s=e.getValueInRange(i,1),r=a.commonPrefixLength(s,n),l=a.TextLength.ofText(s.substring(0,r)).addToPosition(c.range.getStartPosition()),d=n.substring(r),h=a.Range.fromPositions(l,c.range.getEndPosition());return new a.TextReplacement(h,d)}function hv(c,e){return c.text.startsWith(e.text)&&CE(c.range,e.range)}function CE(c,e){return e.getStartPosition().equals(c.getStartPosition())&&e.getEndPosition().isBeforeOrEqual(c.getEndPosition())}function uv(c,e,t,i,n=0){let s=Xt(c,e);if(s.range.endLineNumber!==s.range.startLineNumber)return;const r=e.getLineContent(s.range.startLineNumber),l=a.getLeadingWhitespace(r).length;if(s.range.startColumn-1<=l){const m=a.getLeadingWhitespace(s.text).length,_=r.substring(s.range.startColumn-1,l),[v,b]=[s.range.getStartPosition(),s.range.getEndPosition()],S=v.column+_.length<=b.column?v.delta(0,_.length):b,w=a.Range.fromPositions(S,b),I=s.text.startsWith(_)?s.text.substring(_.length):s.text.substring(m);s=new a.TextReplacement(w,I)}const h=e.getValueInRange(s.range),u=SE(h,s.text);if(!u)return;const g=s.range.startLineNumber,p=new Array;if(t==="prefix"){const m=u.filter(_=>_.originalLength===0);if(m.length>1||m.length===1&&m[0].originalStart!==h.length)return}const f=s.text.length-n;for(const m of u){const _=s.range.startColumn+m.originalStart+m.originalLength;if(t==="subwordSmart"&&i&&i.lineNumber===s.range.startLineNumber&&_0)return;if(m.modifiedLength===0)continue;const v=m.modifiedStart+m.modifiedLength,b=Math.max(m.modifiedStart,Math.min(v,f)),S=s.text.substring(m.modifiedStart,b),w=s.text.substring(b,Math.max(m.modifiedStart,v));S.length>0&&p.push(new gl(_,S,!1)),w.length>0&&p.push(new gl(_,w,!0))}return new Qo(g,p)}let pl;function SE(c,e){if(pl?.originalValue===c&&pl?.newValue===e)return pl?.changes;{let t=pv(c,e,!0);if(t){const i=gv(t);if(i>0){const n=pv(c,e,!1);n&&gv(n)5e3||e.length>5e3)return;function i(h){let u=0;for(let g=0,p=h.length;gu&&(u=f)}return u}const n=Math.max(i(c),i(e));function s(h){if(h<0)throw new Error("unexpected");return n+h+1}function r(h){let u=0,g=0;const p=new Int32Array(h.length);for(let f=0,m=h.length;fl},{getElements:()=>d}).ComputeDiff(!1).changes}function yE(c,e){let t,i=!1;const n=new o.DerivedWithSetter(new o.DebugNameData(c,void 0,e.update),(s,r)=>{i||(t=e.initial instanceof Function?e.initial():e.initial,i=!0);const l=e.update(s,t,r);return t=l,l},e.changeTracker,()=>{i&&(e.disposeFinal?.(t),i=!1)},e.equalityComparer??o.strictEquals,(s,r,l)=>{if(!i)throw new a.BugIndicatingError("Can only set when there is a listener! This is to prevent leaks.");o.subtransaction(r,d=>{t=s,n.setValue(s,d,l)})},o.DebugLocation.ofCaller());return n}var wE=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},fv=function(c,e){return function(t,i){e(t,i,c)}};class IE{constructor(e,t){this._baseService=e,this._intercept=t}publicLog2(e,t){this._intercept(e,t),this._baseService.publicLog2(e,t)}}let Mu=class extends IE{constructor(e,t){super(e,(i,n)=>{let s=!0;n&&Pu in n&&(s=!!n[Pu]),s&&t.getDataChannel("editTelemetry").sendData({eventName:i,data:n??{}})})}};Mu=wE([fv(0,o.ITelemetryService),fv(1,o.IDataChannelService)],Mu);const Pu=Symbol("shouldForwardToChannel");function xE(c){return{[Pu]:c}}function mv(c){if(!c)return!1;const e=c.toLowerCase();return e==="github.copilot"||e==="github.copilot-chat"}function EE(c,e){c.publicLog2("inlineCompletion.endOfLife",e)}const LE=new Set([";",",","=","+","-","*","/","{","}","(",")","[","]","<",">",":",".","!","?","&","|","^","%","@","#","~","`","\\","'",'"',"$"]);function DE(c){return LE.has(c)}function RE(c){return/[a-zA-Z0-9_]/.test(c)}function TE(c){return c===" "||c===" "}function fl(c){const e=c.split(/\r\n|\r|\n/);if(e.length>1)return{kind:"multiLine",lineCount:e.length};const t=c.length===1;let i;t&&(DE(c)?i="syntactical":RE(c)?i="identifier":TE(c)&&(i="whitespace"));const n=c.match(/[ \t]+/g)||[],s=n.some(u=>u.length>1),r=n.some(u=>u.includes(" ")||u.includes(" ")),l=c.split(/\s+/).filter(u=>u.length>0),d=l.length===1&&/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(l[0]),h=l.length>1;return{kind:"singleLine",isSingleCharacter:t,singleCharacterKind:i,isWord:d,isMultipleWords:h,isMultipleWhitespace:s,hasDuplicatedWhitespace:r}}class NE{constructor(e){this.edits=e}toString(){return JSON.stringify({edits:this.edits})}}function _v(c,e,t){if(c.replacements.length!==0)return new NE(c.replacements.map(i=>ME(i,e)))}function Ou(c){return c.length===0?0:c.split(/\r\n|\r|\n/).length-1}function ME(c,e,t){const i=c.replaceRange,n=c.newText,s=i.length,r=n.length,l=Ou(n);switch(i.isEmpty?"insert":n.length===0?"delete":"replace"){case"insert":return{operation:"insert",properties:PE(i.start,n,e),charactersInserted:r,charactersDeleted:0,linesInserted:l,linesDeleted:0};case"delete":{const h=e.getValue().substring(i.start,i.endExclusive);return{operation:"delete",properties:OE(i.start,i.endExclusive,e),charactersInserted:0,charactersDeleted:s,linesInserted:0,linesDeleted:Ou(h)}}case"replace":{const h=e.getValue().substring(i.start,i.endExclusive);return{operation:"replace",properties:AE(h,n),charactersInserted:r,charactersDeleted:s,linesInserted:l,linesDeleted:Ou(h)}}}}function PE(c,e,t,i){const n=fl(e),s=t.getPositionAt(c),r=t.getLineContent(s.lineNumber),l=r.length;let d;const h=r.trim().length===0,u=s.column>l,g=s.column===1;return h?d="emptyLine":u?d="endOfLine":g?d="startOfLine":d="middleOfLine",{textShape:n,locationShape:d,relativeToCursor:void 0}}function OE(c,e,t){const i=t.getValue().substring(c,e),n=fl(i),s=t.getPositionAt(c),r=t.getPositionAt(e),l=t.getLineContent(r.lineNumber),d=r.column>l.length,h=s.lineNumber===r.lineNumber&&s.column===1&&r.column>l.length;return{textShape:n,isAtEndOfLine:d,deletesEntireLineContent:h}}function AE(c,e){const t=fl(c),i=fl(e),n=t.kind==="singleLine"&&t.isWord,s=i.kind==="singleLine"&&i.isWord,r=n&&s,l=e.length>c.length,d=e.length{const p=a.Range.fromPositions(t.getPositionAt(g.replaceRange.start),t.getTransformer().getPosition(g.replaceRange.endExclusive)),f=t.getValueInRange(p);return vl.create(g,f)}),n={kind:"edit",snippetInfo:e.action.snippetInfo,stringEdit:d,textReplacement:u,alternativeAction:e.action.alternativeAction,target:t}}else if(e.action?.kind==="jumpTo")n={kind:"jumpTo",position:e.action.position,offset:t.getTransformer().getOffset(e.action.position),target:t};else if(n=void 0,!e.hint)throw new a.BugIndicatingError("InlineEditItem: action is undefined and no hint is provided");const r=new _l,l=e.hint?Jo.create(e.hint):void 0;return new Ho(n,e,r,s,l,!1,t.getVersionId(),t)}constructor(e,t,i,n,s,r=!1,l,d){super(t,i,s,d),this._action=e,this._edits=n,this._lastChangePartOfInlineEdit=r,this._inlineEditModelVersion=l,this.snippetInfo=void 0,this.additionalTextEdits=[],this.isInlineEdit=!0}get updatedEditModelVersion(){return this._inlineEditModelVersion}get action(){return this._action}withIdentity(e){return new Ho(this._action,this._data,e,this._edits,this.hint,this._lastChangePartOfInlineEdit,this._inlineEditModelVersion,this.originalTextRef)}canBeReused(e,t){return this._lastChangePartOfInlineEdit&&this.updatedEditModelVersion===e.getVersionId()}withEdit(e,t){return this.originalTextRef.targets(t)?this._applyTextModelChanges(e,this._edits,t):this}_applyTextModelChanges(e,t,i){const n=ul(i);let s=!1,r=this._inlineEditModelVersion,l;const d=Ds.snapshot(i);if(this.action?.kind==="edit"){if(t=t.map(f=>f.applyTextModelChanges(e)),t.some(f=>f.edit===void 0))return;const u=i.getVersionId();if(s=t.some(f=>f.lastChangeUpdatedEdit),s&&(r=u??-1),u===null||r+20!f.edit.isEmpty),t.length===0))return;const g=new a.StringEdit(t.map(f=>f.edit));l={kind:"edit",textReplacement:n.getTextEdit(g).toReplacement(new o.TextModelText(i)),snippetInfo:this.snippetInfo,stringEdit:g,alternativeAction:this.action.alternativeAction,target:d}}else if(this.action?.kind==="jumpTo"){const u=this.action.offset,g=e.applyToOffsetOrUndefined(u);if(g===void 0)return;l={kind:"jumpTo",position:n.getPosition(g),offset:g,target:d}}else l=void 0;let h=this.hint;if(!(h&&(h=h.withEdit(e,n),!h)))return new Ho(l,this._data,this.identity,t,h,s,r,d)}computeEditKind(e){const t=this.action?.kind==="edit"?this.action.stringEdit:void 0;if(t)return _v(t,e)}}function zE(c,e,t){const i=c.getEOL(),n=c.getValueOfRange(e),s=t.replace(/\r\n|\r|\n/g,i),d=a.linesDiffComputers.getDefault().computeDiff(a.splitLines(n),a.splitLines(s),{ignoreTrimWhitespace:!1,computeMoves:!1,extendToSubwords:!0,maxComputationTimeMs:50}).changes.flatMap(p=>p.innerChanges??[]);function h(p,f){const m=a.TextLength.fromPosition(f.getStartPosition());return a.TextLength.ofRange(f).createRange(m.addToPosition(p))}const u=new a.StringText(s);return new a.StringEdit(d.map(p=>{const f=h(e.getStartPosition(),p.originalRange),m=c.getTransformer().getOffsetRange(f),_=u.getValueOfRange(p.modifiedRange),v=new a.StringReplacement(m,_),b=c.getValueOfRange(f);return KE(v,b,d.length,c)}))}function VE(c,e,t){return new a.StringEdit([new a.StringReplacement(c.getTransformer().getOffsetRange(e),t)])}class vl{static create(e,t){const i=a.commonPrefixLength(e.newText,t),n=a.commonSuffixLength(e.newText,t),s=e.newText.substring(i,e.newText.length-n);return new vl(e,s,i,n)}get edit(){return this._edit}get lastChangeUpdatedEdit(){return this._lastChangeUpdatedEdit}constructor(e,t,i,n,s=!1){this._edit=e,this._trimmedNewText=t,this._prefixLength=i,this._suffixLength=n,this._lastChangeUpdatedEdit=s}applyTextModelChanges(e){const t=this._clone();return t._applyTextModelChanges(e),t}_clone(){return new vl(this._edit,this._trimmedNewText,this._prefixLength,this._suffixLength,this._lastChangeUpdatedEdit)}_applyTextModelChanges(e){if(this._lastChangeUpdatedEdit=!1,!this._edit)throw new a.BugIndicatingError("UpdatedInnerEdits: No edit to apply changes to");const t=this._applyChanges(this._edit,e);if(!t){this._edit=void 0;return}this._edit=t.edit,this._lastChangeUpdatedEdit=t.editHasChanged}_applyChanges(e,t){let i=e.replaceRange.start,n=e.replaceRange.endExclusive,s=e.newText,r=!1;const l=this._prefixLength>0||this._suffixLength>0;for(let d=t.replacements.length-1;d>=0;d--){const h=t.replacements[d],u=h.newText.length>0&&h.replaceRange.isEmpty;if(u&&!l&&h.replaceRange.start===i&&s.startsWith(h.newText)){i+=h.newText.length,s=s.substring(h.newText.length),n+=h.newText.length,r=!0;continue}if(u&&l&&h.replaceRange.start===i+this._prefixLength&&this._trimmedNewText.startsWith(h.newText)){n+=h.newText.length,r=!0,this._prefixLength+=h.newText.length,this._trimmedNewText=this._trimmedNewText.substring(h.newText.length);continue}if(h.newText.length===0&&h.replaceRange.length>0&&h.replaceRange.start>=i+this._prefixLength&&h.replaceRange.endExclusive<=n-this._suffixLength){n-=h.replaceRange.length,r=!0;continue}if(h.equals(e)){r=!0,i=h.replaceRange.endExclusive,s="";continue}if(!(h.replaceRange.start>n)){if(h.replaceRange.endExclusive1&&c.newText.endsWith(t)&&!c.newText.startsWith(t)?new a.StringReplacement(c.replaceRange.delta(-1),t+c.newText.slice(0,-t.length)):c}function UE(c,e){const t=new o.DenseKeyProvider,i=new o.LanguageAgnosticBracketTokens(t,h=>e.getLanguageConfiguration(h)),n=new o.TextBufferTokenizer(new kE([c]),i),s=o.parseDocument(n,[],void 0,!0);let r="";const l=c.getLineContent();function d(h,u){if(h.kind===2)if(d(h.openingBracket,u),u=o.lengthAdd(u,h.openingBracket.length),h.child&&(d(h.child,u),u=o.lengthAdd(u,h.child.length)),h.closingBracket)d(h.closingBracket,u),u=o.lengthAdd(u,h.closingBracket.length);else{const p=i.getSingleLanguageBracketTokens(h.openingBracket.languageId).findClosingTokenText(h.openingBracket.bracketIds);r+=p}else if(h.kind!==3){if(h.kind===0||h.kind===1)r+=l.substring(o.lengthGetColumnCountIfZeroLineCount(u),o.lengthGetColumnCountIfZeroLineCount(o.lengthAdd(u,h.length)));else if(h.kind===4)for(const g of h.children)d(g,u),u=o.lengthAdd(u,g.length)}}return d(s,o.lengthZero),r}class kE{constructor(e){this.lines=e,this.tokenization={getLineTokens:t=>this.lines[t-1]}}getLineCount(){return this.lines.length}getLineLength(e){return this.lines[e-1].getLineContent().length}}var Y;(function(c){c.Jump="jump",c.Accept="accept",c.Inactive="inactive"})(Y||(Y={}));class Yt{static create(e,t=!1){return new Yt(new o.StandardMouseEvent(o.getWindow(e),e),t)}constructor(e,t=!1){this.event=e,this.alternativeAction=t}}var O;(function(c){c.GhostText="ghostText",c.Custom="custom",c.SideBySide="sideBySide",c.Deletion="deletion",c.InsertionInline="insertionInline",c.InsertionMultiLine="insertionMultiLine",c.WordReplacements="wordReplacements",c.LineReplacement="lineReplacement",c.Collapsed="collapsed",c.JumpTo="jumpTo"})(O||(O={}));class Fu{constructor(e,t,i,n,s,r,l,d){this.cursorColumnDistance=e,this.cursorLineDistance=t,this.lineCountOriginal=i,this.lineCountModified=n,this.characterCountOriginal=s,this.characterCountModified=r,this.disjointReplacements=l,this.sameShapeReplacements=d,this.longDistanceHintVisible=void 0,this.longDistanceHintDistance=void 0}setLongDistanceViewData(e,t){this.longDistanceHintVisible=!0,this.longDistanceHintDistance=Math.abs(t-e)}getData(){return{cursorColumnDistance:this.cursorColumnDistance,cursorLineDistance:this.cursorLineDistance,lineCountOriginal:this.lineCountOriginal,lineCountModified:this.lineCountModified,characterCountOriginal:this.characterCountOriginal,characterCountModified:this.characterCountModified,disjointReplacements:this.disjointReplacements,sameShapeReplacements:this.sameShapeReplacements,longDistanceHintVisible:this.longDistanceHintVisible,longDistanceHintDistance:this.longDistanceHintDistance}}}class zu{constructor(){this._nodes=new Set,this._outgoingEdges=new Map}static from(e,t){const i=new zu;for(const n of e)i._nodes.add(n);for(const n of e){const s=t(n);if(s.length>0){const r=new Set;for(const l of s)r.add(l);i._outgoingEdges.set(n,r)}}return i}removeCycles(){const e=[],t=new Set,i=new Set,n=[],s=r=>{t.add(r),i.add(r);const l=this._outgoingEdges.get(r);if(l)for(const d of l)t.has(d)?i.has(d)&&(e.push(d),n.push({from:r,to:d})):s(d);i.delete(r)};for(const r of this._nodes)t.has(r)||s(r);for(const{from:r,to:l}of n){const d=this._outgoingEdges.get(r);d&&d.delete(l)}return{foundCycles:e}}getOutgoing(e){const t=this._outgoingEdges.get(e);return t?Array.from(t):[]}}function jE(c,e,t,i,n,s){const r=o.prefixedUuid("icr"),l=new a.CancellationTokenSource;let d;const h={...i,requestUuid:r},u=XE(e,t),g=o.groupByMap(c,b=>b.groupId),p=zu.from(c,b=>b.yieldsToGroupIds?.flatMap(S=>g.get(S)??[])??[]),{foundCycles:f}=p.removeCycles();f.length>0&&a.onUnexpectedExternalError(new Error(`Inline completions: cyclic yield-to dependency detected. Path: ${f.map(b=>b.toString?b.toString():""+b).join(" -> ")}`));let m=0;const _=new a.CachedFunction(async b=>{try{if(m++,l.token.isCancellationRequested)return;const S=p.getOutgoing(b);for(const L of S){const E=await _.get(L);if(E)for(const R of E.inlineSuggestions.items){if(R.isInlineEdit||typeof R.insertText!="string"&&R.insertText!==void 0)return;if(R.insertText!==void 0){const D=new a.TextReplacement(a.Range.lift(R.range)??u,R.insertText);if(vv(D,void 0,t,e))return}}}let w;const I=Date.now();try{w=await b.provideInlineCompletions(t,e,h,l.token)}catch(L){a.onUnexpectedExternalError(L);return}const C=Date.now();if(!w)return;const y=[],x=new ZE(w,y,b);if(x.addRef(),Sv(l.token,()=>x.removeRef(d)),l.token.isCancellationRequested)return;for(const L of w.items){const E=$E(L,x,u,t,s,h,n,{startTime:I,endTime:C});if(Xo.is(E)){E.logError();continue}y.push(E)}return x}finally{m--}}),v=a.AsyncIterableProducer.fromPromisesResolveOrder(c.map(b=>_.get(b))).filter(a.isDefined);return{contextWithUuid:h,get didAllProvidersReturn(){return m===0},lists:v,cancelAndDispose:b=>{d===void 0&&(d=b,l.dispose(!0))}}}function Sv(c,e){if(c.isCancellationRequested)return e(),a.Disposable.None;{const t=c.onCancellationRequested(()=>{t.dispose(),e()});return{dispose:()=>t.dispose()}}}function $E(c,e,t,i,n,s,r,l){let d;const h=c.uri?a.URI.revive(c.uri):void 0;if(c.jumpToPosition!==void 0)d={kind:"jumpTo",position:a.Position.lift(c.jumpToPosition),uri:h};else if(c.insertText!==void 0){let u,g,p=c.range?a.Range.lift(c.range):t;if(typeof c.insertText=="string"){if(u=c.insertText,n&&c.completeBracketPairs){u=yv(u,p.getStartPosition(),i,n);const f=u.length-c.insertText.length;f!==0&&(p=new a.Range(p.startLineNumber,p.startColumn,p.endLineNumber,p.endColumn+f))}g=void 0}else if("snippet"in c.insertText){const f=c.insertText.snippet.length;if(n&&c.completeBracketPairs){c.insertText.snippet=yv(c.insertText.snippet,p.getStartPosition(),i,n);const _=c.insertText.snippet.length-f;_!==0&&(p=new a.Range(p.startLineNumber,p.startColumn,p.endLineNumber,p.endColumn+_))}const m=new Ki().parse(c.insertText.snippet);m.children.length===1&&m.children[0]instanceof re?(u=m.children[0].value,g=void 0):(u=m.toString(),g={snippet:c.insertText.snippet,range:p})}else a.assertNever(c.insertText);d={kind:"edit",range:p,insertText:u,snippetInfo:g,uri:h,alternativeAction:void 0}}else if(d=void 0,!c.hint)return Xo.message("Inline completion has no insertText, jumpToPosition nor hint.");return new qE(d,c.hint,c.additionalTextEdits||gE(),c,e,s,c.isInlineEdit??!1,c.supportsRename??!1,r,l,c.correlationId)}class qE{get action(){return this._action}constructor(e,t,i,n,s,r,l,d,h,u,g){this._action=e,this.hint=t,this.additionalTextEdits=i,this.sourceInlineCompletion=n,this.source=s,this.context=r,this.isInlineEdit=l,this.supportsRename=d,this._requestInfo=h,this._providerRequestInfo=u,this._correlationId=g,this._didShow=!1,this._timeUntilShown=void 0,this._timeUntilActuallyShown=void 0,this._showStartTime=void 0,this._shownDuration=0,this._showUncollapsedStartTime=void 0,this._showUncollapsedDuration=0,this._notShownReason=void 0,this._didReportEndOfLife=!1,this._lastSetEndOfLifeReason=void 0,this._isPreceeded=!1,this._partiallyAcceptedCount=0,this._partiallyAcceptedSinceOriginal={characters:0,ratio:0,count:0},this._renameInfo=void 0,this._editKind=void 0,this.performance=new GE,this._viewData={editorType:h.editorType}}get showInlineEditMenu(){return this.sourceInlineCompletion.showInlineEditMenu??!1}get partialAccepts(){return this._partiallyAcceptedSinceOriginal}async reportInlineEditShown(e,t,i,n,s,r){if(this.updateShownDuration(i),this._didShow||this._didReportEndOfLife)return;this.addPerformanceMarker("shown"),this._didShow=!0,this._editKind=s,this._viewData.viewKind=i,this._viewData.renderData=n,this._timeUntilShown=r-this._requestInfo.startTime,this._timeUntilActuallyShown=Date.now()-this._requestInfo.startTime;const l=new o.EditDeltaInfo(n.lineCountModified,n.lineCountOriginal,n.characterCountModified,n.characterCountOriginal);this.source.provider.handleItemDidShow?.(this.source.inlineSuggestions,this.sourceInlineCompletion,t,l),this.sourceInlineCompletion.shownCommand&&await e.executeCommand(this.sourceInlineCompletion.shownCommand.id,...this.sourceInlineCompletion.shownCommand.arguments||[])}reportPartialAccept(e,t,i){this._partiallyAcceptedCount++,this._partiallyAcceptedSinceOriginal.characters+=i.characters,this._partiallyAcceptedSinceOriginal.ratio=Math.min(this._partiallyAcceptedSinceOriginal.ratio+(1-this._partiallyAcceptedSinceOriginal.ratio)*i.ratio,1),this._partiallyAcceptedSinceOriginal.count+=i.count,this.source.provider.handlePartialAccept?.(this.source.inlineSuggestions,this.sourceInlineCompletion,e,t)}reportEndOfLife(e){if(!this._didReportEndOfLife&&(this._didReportEndOfLife=!0,this.reportInlineEditHidden(),e||(e=this._lastSetEndOfLifeReason??{kind:a.InlineCompletionEndOfLifeReasonKind.Ignored,userTypingDisagreed:!1,supersededBy:void 0}),e.kind===a.InlineCompletionEndOfLifeReasonKind.Rejected&&!this._didShow&&(e={kind:a.InlineCompletionEndOfLifeReasonKind.Ignored,userTypingDisagreed:!1,supersededBy:void 0}),e.kind===a.InlineCompletionEndOfLifeReasonKind.Rejected&&this.source.provider.handleRejection&&this.source.provider.handleRejection(this.source.inlineSuggestions,this.sourceInlineCompletion),this.source.provider.handleEndOfLifetime)){const t={requestUuid:this.context.requestUuid,correlationId:this._correlationId,selectedSuggestionInfo:!!this.context.selectedSuggestionInfo,partiallyAccepted:this._partiallyAcceptedCount,partiallyAcceptedCountSinceOriginal:this._partiallyAcceptedSinceOriginal.count,partiallyAcceptedRatioSinceOriginal:this._partiallyAcceptedSinceOriginal.ratio,partiallyAcceptedCharactersSinceOriginal:this._partiallyAcceptedSinceOriginal.characters,shown:this._didShow,shownDuration:this._shownDuration,shownDurationUncollapsed:this._showUncollapsedDuration,editKind:this._editKind?.toString(),preceeded:this._isPreceeded,timeUntilShown:this._timeUntilShown,timeUntilActuallyShown:this._timeUntilActuallyShown,timeUntilProviderRequest:this._providerRequestInfo.startTime-this._requestInfo.startTime,timeUntilProviderResponse:this._providerRequestInfo.endTime-this._requestInfo.startTime,editorType:this._viewData.editorType,languageId:this._requestInfo.languageId,requestReason:this._requestInfo.reason,viewKind:this._viewData.viewKind,notShownReason:this._notShownReason,performanceMarkers:this.performance.toString(),renameCreated:this._renameInfo?.createdRename,renameDuration:this._renameInfo?.duration,renameTimedOut:this._renameInfo?.timedOut,renameDroppedOtherEdits:this._renameInfo?.droppedOtherEdits,renameDroppedRenameEdits:this._renameInfo?.droppedRenameEdits,typingInterval:this._requestInfo.typingInterval,typingIntervalCharacterCount:this._requestInfo.typingIntervalCharacterCount,skuPlan:this._requestInfo.sku?.plan,skuType:this._requestInfo.sku?.type,availableProviders:this._requestInfo.availableProviders.map(i=>i.toString()).join(","),...this._viewData.renderData?.getData()};this.source.provider.handleEndOfLifetime(this.source.inlineSuggestions,this.sourceInlineCompletion,e,t)}}setIsPreceeded(e){this._isPreceeded=!0,(this._partiallyAcceptedSinceOriginal.characters!==0||this._partiallyAcceptedSinceOriginal.ratio!==0||this._partiallyAcceptedSinceOriginal.count!==0)&&console.warn("Expected partiallyAcceptedCountSinceOriginal to be { characters: 0, rate: 0, partialAcceptances: 0 } before setIsPreceeded."),this._partiallyAcceptedSinceOriginal=e}setNotShownReason(e){this._notShownReason??=e}setEndOfLifeReason(e){this.reportInlineEditHidden(),this._lastSetEndOfLifeReason=e}updateShownDuration(e){const t=Date.now();this._showStartTime||(this._showStartTime=t);const i=e===O.Collapsed;!i&&this._showUncollapsedStartTime===void 0&&(this._showUncollapsedStartTime=t),i&&this._showUncollapsedStartTime!==void 0&&(this._showUncollapsedDuration+=t-this._showUncollapsedStartTime)}reportInlineEditHidden(){if(this._showStartTime===void 0)return;const e=Date.now();this._shownDuration+=e-this._showStartTime,this._showStartTime=void 0,this._showUncollapsedStartTime!==void 0&&(this._showUncollapsedDuration+=e-this._showUncollapsedStartTime,this._showUncollapsedStartTime=void 0)}setRenameProcessingInfo(e){if(this._renameInfo)throw new a.BugIndicatingError("Rename info has already been set.");this._renameInfo=e}withAction(e){return this._action=e,this}addPerformanceMarker(e){this.performance.mark(e)}}class GE{constructor(){this.markers=[],this.markers.push({name:"start",timeStamp:Date.now()})}mark(e){this.markers.push({name:e,timeStamp:Date.now()})}toString(){const e=[];for(let t=1;t=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},bl=function(c,e){return function(t,i){e(t,i,c)}};const Rs=new o.RawContextKey("renameInputVisible",!1,a.localize(1440,"Whether the rename input widget is visible"));new o.RawContextKey("renameInputFocused",!1,a.localize(1441,"Whether the rename input widget is focused"));let Vu=class{constructor(e,t,i,n,s,r){this._editor=e,this._acceptKeybindings=t,this._themeService=i,this._keybindingService=n,this._logService=r,this.allowEditorOverflow=!0,this._disposables=new a.DisposableStore,this._visibleContextKey=Rs.bindTo(s),this._isEditingRenameCandidate=!1,this._nRenameSuggestionsInvocations=0,this._hadAutomaticRenameSuggestionsInvocation=!1,this._candidates=new Set,this._beforeFirstInputFieldEditSW=new a.StopWatch,this._inputWithButton=new QE,this._disposables.add(this._inputWithButton),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration(l=>{l.hasChanged(59)&&this._updateFont()})),this._disposables.add(i.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){return this._domNode||(this._domNode=document.createElement("div"),this._domNode.className="monaco-editor rename-box",this._domNode.appendChild(this._inputWithButton.domNode),this._renameCandidateListView=this._disposables.add(new Bu(this._domNode,{fontInfo:this._editor.getOption(59),onFocusChange:e=>{this._inputWithButton.input.value=e,this._isEditingRenameCandidate=!1},onSelectionChange:()=>{this._isEditingRenameCandidate=!1,this.acceptInput(!1)}})),this._disposables.add(this._inputWithButton.onDidInputChange(()=>{this._renameCandidateListView?.focusedCandidate!==void 0&&(this._isEditingRenameCandidate=!0),this._timeBeforeFirstInputFieldEdit??=this._beforeFirstInputFieldEditSW.elapsed(),this._renameCandidateProvidersCts?.token.isCancellationRequested===!1&&this._renameCandidateProvidersCts.cancel(),this._renameCandidateListView?.clearFocus()})),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())),this._domNode}_updateStyles(e){if(!this._domNode)return;const t=e.getColor(o.widgetShadow),i=e.getColor(o.widgetBorder);this._domNode.style.backgroundColor=String(e.getColor(o.editorWidgetBackground)??""),this._domNode.style.boxShadow=t?` 0 0 8px 2px ${t}`:"",this._domNode.style.border=i?`1px solid ${i}`:"",this._domNode.style.color=String(e.getColor(o.inputForeground)??"");const n=e.getColor(o.inputBorder);this._inputWithButton.domNode.style.backgroundColor=String(e.getColor(o.inputBackground)??""),this._inputWithButton.input.style.backgroundColor=String(e.getColor(o.inputBackground)??""),this._inputWithButton.domNode.style.borderWidth=n?"1px":"0px",this._inputWithButton.domNode.style.borderStyle=n?"solid":"none",this._inputWithButton.domNode.style.borderColor=n?.toString()??"none"}_updateFont(){if(this._domNode===void 0)return;a.assertType(this._label!==void 0,"RenameWidget#_updateFont: _label must not be undefined given _domNode is defined"),this._editor.applyFontInfo(this._inputWithButton.input);const e=this._editor.getOption(59);this._label.style.fontSize=`${this._computeLabelFontSize(e.fontSize)}px`}_computeLabelFontSize(e){return e*.8}getPosition(){if(!this._visible||!this._editor.hasModel()||!this._editor.getDomNode())return null;const e=o.getClientArea(this.getDomNode().ownerDocument.body),t=o.getDomNodePagePosition(this._editor.getDomNode()),i=this._getTopForPosition();this._nPxAvailableAbove=i+t.top,this._nPxAvailableBelow=e.height-this._nPxAvailableAbove;const n=this._editor.getOption(75),{totalHeight:s}=er.getLayoutInfo({lineHeight:n}),r=this._nPxAvailableBelow>s*6?[2,1]:[1,2];return{position:this._position,preference:r}}beforeRender(){const[e,t]=this._acceptKeybindings;return this._label.innerText=a.localize(1442,"{0} to Rename, {1} to Preview",this._keybindingService.lookupKeybinding(e)?.getLabel(),this._keybindingService.lookupKeybinding(t)?.getLabel()),this._domNode.style.minWidth="200px",null}afterRender(e){if(e===null){this.cancelInput(!0,"afterRender (because position is null)");return}if(!this._editor.hasModel()||!this._editor.getDomNode())return;a.assertType(this._renameCandidateListView),a.assertType(this._nPxAvailableAbove!==void 0),a.assertType(this._nPxAvailableBelow!==void 0);const t=o.getTotalHeight(this._inputWithButton.domNode),i=o.getTotalHeight(this._label);let n;e===2?n=this._nPxAvailableBelow:n=this._nPxAvailableAbove,this._renameCandidateListView.layout({height:n-i-t,width:o.getTotalWidth(this._inputWithButton.domNode)})}acceptInput(e){this._trace("invoking acceptInput"),this._currentAcceptInput?.(e)}cancelInput(e,t){this._currentCancelInput?.(e)}focusNextRenameSuggestion(){this._renameCandidateListView?.focusNext()||(this._inputWithButton.input.value=this._currentName)}focusPreviousRenameSuggestion(){this._renameCandidateListView?.focusPrevious()||(this._inputWithButton.input.value=this._currentName)}getInput(e,t,i,n,s){const{start:r,end:l}=this._getSelection(e,t);this._renameCts=s;const d=new a.DisposableStore;this._nRenameSuggestionsInvocations=0,this._hadAutomaticRenameSuggestionsInvocation=!1,n===void 0?this._inputWithButton.button.style.display="none":(this._inputWithButton.button.style.display="flex",this._requestRenameCandidatesOnce=n,this._requestRenameCandidates(t,!1),d.add(o.addDisposableListener(this._inputWithButton.button,"click",()=>this._requestRenameCandidates(t,!0))),d.add(o.addDisposableListener(this._inputWithButton.button,o.EventType.KEY_DOWN,u=>{const g=new o.StandardKeyboardEvent(u);(g.equals(3)||g.equals(10))&&(g.stopPropagation(),g.preventDefault(),this._requestRenameCandidates(t,!0))}))),this._isEditingRenameCandidate=!1,this._domNode.classList.toggle("preview",i),this._position=new a.Position(e.startLineNumber,e.startColumn),this._currentName=t,this._inputWithButton.input.value=t,this._inputWithButton.input.setAttribute("selectionStart",r.toString()),this._inputWithButton.input.setAttribute("selectionEnd",l.toString()),this._inputWithButton.input.size=Math.max((e.endColumn-e.startColumn)*1.1,20),this._beforeFirstInputFieldEditSW.reset(),d.add(a.toDisposable(()=>{this._renameCts=void 0,s.dispose(!0)})),d.add(a.toDisposable(()=>{this._renameCandidateProvidersCts!==void 0&&(this._renameCandidateProvidersCts.dispose(!0),this._renameCandidateProvidersCts=void 0)})),d.add(a.toDisposable(()=>this._candidates.clear()));const h=new a.DeferredPromise;return h.p.finally(()=>{d.dispose(),this._hide()}),this._currentCancelInput=u=>(this._trace("invoking _currentCancelInput"),this._currentAcceptInput=void 0,this._currentCancelInput=void 0,this._renameCandidateListView?.clearCandidates(),h.complete(u),!0),this._currentAcceptInput=u=>{this._trace("invoking _currentAcceptInput"),a.assertType(this._renameCandidateListView!==void 0);const g=this._renameCandidateListView.nCandidates;let p,f;const m=this._renameCandidateListView.focusedCandidate;if(m!==void 0?(this._trace("using new name from renameSuggestion"),p=m,f={k:"renameSuggestion"}):(this._trace("using new name from inputField"),p=this._inputWithButton.input.value,f=this._isEditingRenameCandidate?{k:"userEditedRenameSuggestion"}:{k:"inputField"}),p===t||p.trim().length===0){this.cancelInput(!0,"_currentAcceptInput (because newName === value || newName.trim().length === 0)");return}this._currentAcceptInput=void 0,this._currentCancelInput=void 0,this._renameCandidateListView.clearCandidates(),h.complete({newName:p,wantsPreview:i&&u,stats:{source:f,nRenameSuggestions:g,timeBeforeFirstInputFieldEdit:this._timeBeforeFirstInputFieldEdit,nRenameSuggestionsInvocations:this._nRenameSuggestionsInvocations,hadAutomaticRenameSuggestionsInvocation:this._hadAutomaticRenameSuggestionsInvocation}})},d.add(s.token.onCancellationRequested(()=>this.cancelInput(!0,"cts.token.onCancellationRequested"))),d.add(this._editor.onDidBlurEditorWidget(()=>this.cancelInput(!this._domNode?.ownerDocument.hasFocus(),"editor.onDidBlurEditorWidget"))),this._show(),h.p}_requestRenameCandidates(e,t){if(this._requestRenameCandidatesOnce!==void 0&&(this._renameCandidateProvidersCts!==void 0&&this._renameCandidateProvidersCts.dispose(!0),a.assertType(this._renameCts),this._inputWithButton.buttonState!=="stop")){this._renameCandidateProvidersCts=new a.CancellationTokenSource;const i=t?a.NewSymbolNameTriggerKind.Invoke:a.NewSymbolNameTriggerKind.Automatic,n=this._requestRenameCandidatesOnce(i,this._renameCandidateProvidersCts.token);if(n.length===0){this._inputWithButton.setSparkleButton();return}t||(this._hadAutomaticRenameSuggestionsInvocation=!0),this._nRenameSuggestionsInvocations+=1,this._inputWithButton.setStopButton(),this._updateRenameCandidates(n,e,this._renameCts.token)}}_getSelection(e,t){a.assertType(this._editor.hasModel());const i=this._editor.getSelection();let n=0,s=t.length;return!a.Range.isEmpty(i)&&!a.Range.spansMultipleLines(i)&&a.Range.containsRange(e,i)&&(n=Math.max(0,i.startColumn-e.startColumn),s=Math.min(e.endColumn,i.endColumn)-e.startColumn),{start:n,end:s}}_show(){this._trace("invoking _show"),this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._visibleContextKey.set(!0),this._editor.layoutContentWidget(this),setTimeout(()=>{this._inputWithButton.input.focus(),this._inputWithButton.input.setSelectionRange(parseInt(this._inputWithButton.input.getAttribute("selectionStart")),parseInt(this._inputWithButton.input.getAttribute("selectionEnd")))},100)}async _updateRenameCandidates(e,t,i){const n=(...h)=>this._trace("_updateRenameCandidates",...h);n("start");const s=await a.raceCancellation(Promise.allSettled(e),i);if(this._inputWithButton.setSparkleButton(),s===void 0){n("returning early - received updateRenameCandidates results - undefined");return}const r=s.flatMap(h=>h.status==="fulfilled"&&a.isDefined(h.value)?h.value:[]);n(`received updateRenameCandidates results - total (unfiltered) ${r.length} candidates.`);const l=a.distinct(r,h=>h.newSymbolName);n(`distinct candidates - ${l.length} candidates.`);const d=l.filter(({newSymbolName:h})=>h.trim().length>0&&h!==this._inputWithButton.input.value&&h!==t&&!this._candidates.has(h));if(n(`valid distinct candidates - ${r.length} candidates.`),d.forEach(h=>this._candidates.add(h.newSymbolName)),d.length<1){n("returning early - no valid distinct candidates");return}n("setting candidates"),this._renameCandidateListView.setCandidates(d),n("asking editor to re-layout"),this._editor.layoutContentWidget(this)}_hide(){this._trace("invoked _hide"),this._visible=!1,this._visibleContextKey.reset(),this._editor.layoutContentWidget(this)}_getTopForPosition(){const e=this._editor.getVisibleRanges();let t;return e.length>0?t=e[0].startLineNumber:(this._logService.warn("RenameWidget#_getTopForPosition: this should not happen - visibleRanges is empty"),t=Math.max(1,this._position.lineNumber-5)),this._editor.getTopForLineNumber(this._position.lineNumber)-this._editor.getTopForLineNumber(t)}_trace(...e){this._logService.trace("RenameWidget",...e)}};Vu=YE([bl(2,o.IThemeService),bl(3,o.IKeybindingService),bl(4,o.IContextKeyService),bl(5,o.ILogService)],Vu);class Bu{constructor(e,t){this._disposables=new a.DisposableStore,this._availableHeight=0,this._minimumWidth=0,this._lineHeight=t.fontInfo.lineHeight,this._typicalHalfwidthCharacterWidth=t.fontInfo.typicalHalfwidthCharacterWidth,this._listContainer=document.createElement("div"),this._listContainer.className="rename-box rename-candidate-list-container",e.appendChild(this._listContainer),this._listWidget=Bu._createListWidget(this._listContainer,this._candidateViewHeight,t.fontInfo),this._disposables.add(this._listWidget.onDidChangeFocus(i=>{i.elements.length===1&&t.onFocusChange(i.elements[0].newSymbolName)},this._disposables)),this._disposables.add(this._listWidget.onDidChangeSelection(i=>{i.elements.length===1&&t.onSelectionChange()},this._disposables)),this._disposables.add(this._listWidget.onDidBlur(i=>{this._listWidget.setFocus([])})),this._listWidget.style(o.getListStyles({listInactiveFocusForeground:o.quickInputListFocusForeground,listInactiveFocusBackground:o.quickInputListFocusBackground}))}dispose(){this._listWidget.dispose(),this._disposables.dispose()}layout({height:e,width:t}){this._availableHeight=e,this._minimumWidth=t}setCandidates(e){this._listWidget.splice(0,0,e);const t=this._pickListHeight(this._listWidget.length),i=this._pickListWidth(e);this._listWidget.layout(t,i),this._listContainer.style.height=`${t}px`,this._listContainer.style.width=`${i}px`,o.status(a.localize(1443,"Received {0} rename suggestions",e.length))}clearCandidates(){this._listContainer.style.height="0px",this._listContainer.style.width="0px",this._listWidget.splice(0,this._listWidget.length,[])}get nCandidates(){return this._listWidget.length}get focusedCandidate(){if(this._listWidget.length===0)return;const e=this._listWidget.getSelectedElements()[0];if(e!==void 0)return e.newSymbolName;const t=this._listWidget.getFocusedElements()[0];if(t!==void 0)return t.newSymbolName}focusNext(){if(this._listWidget.length===0)return!1;const e=this._listWidget.getFocus();if(e.length===0)return this._listWidget.focusFirst(),this._listWidget.reveal(0),!0;if(e[0]===this._listWidget.length-1)return this._listWidget.setFocus([]),this._listWidget.reveal(0),!1;{this._listWidget.focusNext();const t=this._listWidget.getFocus()[0];return this._listWidget.reveal(t),!0}}focusPrevious(){if(this._listWidget.length===0)return!1;const e=this._listWidget.getFocus();if(e.length===0){this._listWidget.focusLast();const t=this._listWidget.getFocus()[0];return this._listWidget.reveal(t),!0}else{if(e[0]===0)return this._listWidget.setFocus([]),!1;{this._listWidget.focusPrevious();const t=this._listWidget.getFocus()[0];return this._listWidget.reveal(t),!0}}}clearFocus(){this._listWidget.setFocus([])}get _candidateViewHeight(){const{totalHeight:e}=er.getLayoutInfo({lineHeight:this._lineHeight});return e}_pickListHeight(e){const t=this._candidateViewHeight*e;return Math.min(t,this._availableHeight,this._candidateViewHeight*7)}_pickListWidth(e){const t=Math.ceil(Math.max(...e.map(n=>n.newSymbolName.length))*this._typicalHalfwidthCharacterWidth);return Math.max(this._minimumWidth,25+t+10)}static _createListWidget(e,t,i){const n=new class{getTemplateId(r){return"candidate"}getHeight(r){return t}},s=new class{constructor(){this.templateId="candidate"}renderTemplate(r){return new er(r,i)}renderElement(r,l,d){d.populate(r)}disposeTemplate(r){r.dispose()}};return new o.List("NewSymbolNameCandidates",e,n,[s],{keyboardSupport:!1,mouseSupport:!0,multipleSelectionSupport:!1})}}class QE{constructor(){this._buttonHoverContent="",this._disposables=new a.DisposableStore,this._onDidInputChange=this._disposables.add(new a.Emitter),this.onDidInputChange=this._onDidInputChange.event}get domNode(){return this._domNode||(this._domNode=document.createElement("div"),this._domNode.className="rename-input-with-button",this._domNode.style.display="flex",this._domNode.style.flexDirection="row",this._domNode.style.alignItems="center",this._inputNode=document.createElement("input"),this._inputNode.className="rename-input",this._inputNode.type="text",this._inputNode.style.border="none",this._inputNode.setAttribute("aria-label",a.localize(1444,"Rename input. Type new name and press Enter to commit.")),this._domNode.appendChild(this._inputNode),this._buttonNode=document.createElement("div"),this._buttonNode.className="rename-suggestions-button",this._buttonNode.setAttribute("tabindex","0"),this._buttonGenHoverText=a.localize(1445,"Generate New Name Suggestions"),this._buttonCancelHoverText=a.localize(1446,"Cancel"),this._buttonHoverContent=this._buttonGenHoverText,this._disposables.add(o.getBaseLayerHoverDelegate().setupDelayedHover(this._buttonNode,()=>({content:this._buttonHoverContent,style:1}))),this._domNode.appendChild(this._buttonNode),this._disposables.add(o.addDisposableListener(this.input,o.EventType.INPUT,()=>this._onDidInputChange.fire())),this._disposables.add(o.addDisposableListener(this.input,o.EventType.KEY_DOWN,e=>{const t=new o.StandardKeyboardEvent(e);(t.keyCode===15||t.keyCode===17)&&this._onDidInputChange.fire()})),this._disposables.add(o.addDisposableListener(this.input,o.EventType.CLICK,()=>this._onDidInputChange.fire())),this._disposables.add(o.addDisposableListener(this.input,o.EventType.FOCUS,()=>{this.domNode.style.outlineWidth="1px",this.domNode.style.outlineStyle="solid",this.domNode.style.outlineOffset="-1px",this.domNode.style.outlineColor="var(--vscode-focusBorder)"})),this._disposables.add(o.addDisposableListener(this.input,o.EventType.BLUR,()=>{this.domNode.style.outline="none"}))),this._domNode}get input(){return a.assertType(this._inputNode),this._inputNode}get button(){return a.assertType(this._buttonNode),this._buttonNode}get buttonState(){return this._buttonState}setSparkleButton(){this._buttonState="sparkle",this._sparkleIcon??=o.renderIcon(a.Codicon.sparkle),o.clearNode(this.button),this.button.appendChild(this._sparkleIcon),this.button.setAttribute("aria-label","Generating new name suggestions"),this._buttonHoverContent=this._buttonGenHoverText,this.input.focus()}setStopButton(){this._buttonState="stop",this._stopIcon??=o.renderIcon(a.Codicon.stopCircle),o.clearNode(this.button),this.button.appendChild(this._stopIcon),this.button.setAttribute("aria-label","Cancel generating new name suggestions"),this._buttonHoverContent=this._buttonCancelHoverText,this.input.focus()}dispose(){this._disposables.dispose()}}const Ur=class Ur{constructor(e,t){this._domNode=document.createElement("div"),this._domNode.className="rename-box rename-candidate",this._domNode.style.display="flex",this._domNode.style.columnGap="5px",this._domNode.style.alignItems="center",this._domNode.style.height=`${t.lineHeight}px`,this._domNode.style.padding=`${Ur._PADDING}px`;const i=document.createElement("div");i.style.display="flex",i.style.alignItems="center",i.style.width=i.style.height=`${t.lineHeight*.8}px`,this._domNode.appendChild(i),this._icon=o.renderIcon(a.Codicon.sparkle),this._icon.style.display="none",i.appendChild(this._icon),this._label=document.createElement("div"),o.applyFontInfo(this._label,t),this._domNode.appendChild(this._label),e.appendChild(this._domNode)}populate(e){this._updateIcon(e),this._updateLabel(e)}_updateIcon(e){const t=!!e.tags?.includes(a.NewSymbolNameTag.AIGenerated);this._icon.style.display=t?"inherit":"none"}_updateLabel(e){this._label.innerText=e.newSymbolName}static getLayoutInfo({lineHeight:e}){return{totalHeight:e+Ur._PADDING*2}}dispose(){}};Ur._PADDING=2;let er=Ur;var JE=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},an=function(c,e){return function(t,i){e(t,i,c)}},Ku;class Cl{constructor(e,t,i){this.model=e,this.position=t,this._providerRenameIdx=0,this._providers=i.ordered(e)}hasProvider(){return this._providers.length>0}async resolveRenameLocation(e){const t=[];for(this._providerRenameIdx=0;this._providerRenameIdx0?t.join(` +`):void 0}:{range:a.Range.fromPositions(this.position),text:"",rejectReason:t.length>0?t.join(` +`):void 0}}async provideRenameEdits(e,t){return this._provideRenameEdits(e,this._providerRenameIdx,[],t)}async _provideRenameEdits(e,t,i,n){const s=this._providers[t];if(!s)return{edits:[],rejectReason:i.join(` +`)};const r=await s.provideRenameEdits(this.model,this.position,e,n);if(r){if(r.rejectReason)return this._provideRenameEdits(e,t+1,i.concat(r.rejectReason),n)}else return this._provideRenameEdits(e,t+1,i.concat(a.localize(1429,"No result.")),n);return r}}function WE(c,e){return c.ordered(e).length>0}async function HE(c,e,t,i,n){return new Cl(e,t,c).provideRenameEdits(i,n??a.CancellationToken.None)}async function eL(c,e,t,i){const n=new Cl(e,t,c),s=await n.resolveRenameLocation(a.CancellationToken.None);return s?.rejectReason?{edits:[],rejectReason:s.rejectReason}:n.provideRenameEdits(i,a.CancellationToken.None)}let Qt=(Vn=class{static get(e){return e.getContribution(Ku.ID)}constructor(e,t,i,n,s,r,l,d){this.editor=e,this._instaService=t,this._notificationService=i,this._bulkEditService=n,this._progressService=s,this._logService=r,this._configService=l,this._languageFeaturesService=d,this._disposableStore=new a.DisposableStore,this._cts=new a.CancellationTokenSource,this._renameWidget=this._disposableStore.add(this._instaService.createInstance(Vu,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}async run(){const e=this._logService.trace.bind(this._logService,"[rename]");if(this._cts.dispose(!0),this._cts=new a.CancellationTokenSource,!this.editor.hasModel()){e("editor has no model");return}const t=this.editor.getPosition(),i=new Cl(this.editor.getModel(),t,this._languageFeaturesService.renameProvider);if(!i.hasProvider()){e("skeleton has no provider");return}const n=new o.EditorStateCancellationTokenSource(this.editor,5,void 0,this._cts.token);let s;try{e("resolving rename location");const m=i.resolveRenameLocation(n.token);this._progressService.showWhile(m,250),s=await m,e("resolved rename location")}catch(m){m instanceof a.CancellationError?e("resolve rename location cancelled",JSON.stringify(m,null," ")):(e("resolve rename location failed",m instanceof Error?m:JSON.stringify(m,null," ")),(typeof m=="string"||o.isMarkdownString(m))&&me.get(this.editor)?.showMessage(m||a.localize(1430,"An unknown error occurred while resolving rename location"),t));return}finally{n.dispose()}if(!s){e("returning early - no loc");return}if(s.rejectReason){e(`returning early - rejected with reason: ${s.rejectReason}`,s.rejectReason),me.get(this.editor)?.showMessage(s.rejectReason,t);return}if(n.token.isCancellationRequested){e("returning early - cts1 cancelled");return}const r=new o.EditorStateCancellationTokenSource(this.editor,5,s.range,this._cts.token),l=this.editor.getModel(),d=this._languageFeaturesService.newSymbolNamesProvider.all(l),h=await Promise.all(d.map(async m=>[m,await m.supportsAutomaticNewSymbolNamesTriggerKind??!1])),u=(m,_)=>{let v=h.slice();return m===a.NewSymbolNameTriggerKind.Automatic&&(v=v.filter(([b,S])=>S)),v.map(([b])=>b.provideNewSymbolNames(l,s.range,m,_))};e("creating rename input field and awaiting its result");const g=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),p=await this._renameWidget.getInput(s.range,s.text,g,d.length>0?u:void 0,r);if(e("received response from rename input field"),typeof p=="boolean"){e(`returning early - rename input field response - ${p}`),p&&this.editor.focus(),r.dispose();return}this.editor.focus(),e("requesting rename edits");const f=a.raceCancellation(i.provideRenameEdits(p.newName,r.token),r.token).then(async m=>{if(!m){e("returning early - no rename edits result");return}if(!this.editor.hasModel()){e("returning early - no model after rename edits are provided");return}if(m.rejectReason){e(`returning early - rejected with reason: ${m.rejectReason}`),this._notificationService.info(m.rejectReason);return}this.editor.setSelection(a.Range.fromPositions(this.editor.getSelection().getPosition())),e("applying edits"),this._bulkEditService.apply(m,{editor:this.editor,showPreview:p.wantsPreview,label:a.localize(1431,"Renaming '{0}' to '{1}'",s?.text,p.newName),code:"undoredo.rename",quotableLabel:a.localize(1432,"Renaming {0} to {1}",s?.text,p.newName),respectAutoSaveConfig:!0,reason:o.EditSources.rename(s?.text,p.newName)}).then(_=>{e("edits applied"),_.ariaSummary&&o.alert(a.localize(1433,"Successfully renamed '{0}' to '{1}'. Summary: {2}",s.text,p.newName,_.ariaSummary))}).catch(_=>{e(`error when applying edits ${JSON.stringify(_,null," ")}`),this._notificationService.error(a.localize(1434,"Rename failed to apply edits")),this._logService.error(_)})},m=>{e("error when providing rename edits",JSON.stringify(m,null," ")),this._notificationService.error(a.localize(1435,"Rename failed to compute edits")),this._logService.error(m)}).finally(()=>{r.dispose()});return e("returning rename operation"),this._progressService.showWhile(f,250),f}acceptRenameInput(e){this._renameWidget.acceptInput(e)}cancelRenameInput(){this._renameWidget.cancelInput(!0,"cancelRenameInput command")}focusNextRenameSuggestion(){this._renameWidget.focusNextRenameSuggestion()}focusPreviousRenameSuggestion(){this._renameWidget.focusPreviousRenameSuggestion()}},Ku=Vn,Vn.ID="editor.contrib.renameController",Vn);Qt=Ku=JE([an(1,o.IInstantiationService),an(2,o.INotificationService),an(3,o.IBulkEditService),an(4,o.IEditorProgressService),an(5,o.ILogService),an(6,o.ITextResourceConfigurationService),an(7,o.ILanguageFeaturesService)],Qt);class tL extends o.EditorAction{constructor(){super({id:"editor.action.rename",label:a.localize2(1437,"Rename Symbol"),precondition:o.ContextKeyExpr.and(o.EditorContextKeys.writable,o.EditorContextKeys.hasRenameProvider),kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1},canTriggerInlineEdits:!0})}runCommand(e,t){const i=e.get(o.ICodeEditorService),[n,s]=Array.isArray(t)&&t||[void 0,void 0];return a.URI.isUri(n)&&a.Position.isIPosition(s)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then(r=>{r&&(r.setPosition(s),r.invokeWithinContext(l=>(this.reportTelemetry(l,r),this.run(l,r))))},a.onUnexpectedError):super.runCommand(e,t)}run(e,t){const i=e.get(o.ILogService),n=Qt.get(t);return n?(i.trace("[RenameAction] got controller, running..."),n.run()):(i.trace("[RenameAction] returning early - controller missing"),Promise.resolve())}}o.registerEditorContribution(Qt.ID,Qt,4),o.registerEditorAction(tL);const Uu=o.EditorCommand.bindToContribution(Qt.get);o.registerEditorCommand(new Uu({id:"acceptRenameInput",precondition:Rs,handler:c=>c.acceptRenameInput(!1),kbOpts:{weight:199,kbExpr:o.ContextKeyExpr.and(o.EditorContextKeys.focus,o.ContextKeyExpr.not("isComposing")),primary:3}})),o.registerEditorCommand(new Uu({id:"acceptRenameInputWithPreview",precondition:o.ContextKeyExpr.and(Rs,o.ContextKeyExpr.has("config.editor.rename.enablePreview")),handler:c=>c.acceptRenameInput(!0),kbOpts:{weight:199,kbExpr:o.ContextKeyExpr.and(o.EditorContextKeys.focus,o.ContextKeyExpr.not("isComposing")),primary:2051}})),o.registerEditorCommand(new Uu({id:"cancelRenameInput",precondition:Rs,handler:c=>c.cancelRenameInput(),kbOpts:{weight:199,kbExpr:o.EditorContextKeys.focus,primary:9,secondary:[1033]}})),o.registerAction2(class extends o.Action2{constructor(){super({id:"focusNextRenameSuggestion",title:{...a.localize2(1438,"Focus Next Rename Suggestion")},precondition:Rs,keybinding:[{primary:18,weight:199}]})}run(e){const t=e.get(o.ICodeEditorService).getFocusedCodeEditor();if(!t)return;const i=Qt.get(t);i&&i.focusNextRenameSuggestion()}}),o.registerAction2(class extends o.Action2{constructor(){super({id:"focusPreviousRenameSuggestion",title:{...a.localize2(1439,"Focus Previous Rename Suggestion")},precondition:Rs,keybinding:[{primary:16,weight:199}]})}run(e){const t=e.get(o.ICodeEditorService).getFocusedCodeEditor();if(!t)return;const i=Qt.get(t);i&&i.focusPreviousRenameSuggestion()}}),o.registerModelAndPositionCommand("_executeDocumentRenameProvider",function(c,e,t,...i){const[n]=i;a.assertType(typeof n=="string");const{renameProvider:s}=c.get(o.ILanguageFeaturesService);return eL(s,e,t,n)}),o.registerModelAndPositionCommand("_executePrepareRename",async function(c,e,t){const{renameProvider:i}=c.get(o.ILanguageFeaturesService),s=await new Cl(e,t,i).resolveRenameLocation(a.CancellationToken.None);if(s?.rejectReason)throw new Error(s.rejectReason);return s}),o.Registry.as(o.Extensions.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:6,description:a.localize(1436,"Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}});var iL=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ts=function(c,e){return function(t,i){e(t,i,c)}},Nt;(function(c){c.no="no",c.yes="yes",c.maybe="maybe"})(Nt||(Nt={})),(function(c){function e(t){switch(t){case"no":return c.no;case"yes":return c.yes;case"maybe":return c.maybe;default:return c.no}}c.fromString=e})(Nt||(Nt={}));class nL{constructor(){}inferRename(e,t,i,n){const s=new a.Range(t.startLineNumber,1,t.endLineNumber,e.getLineMaxColumn(t.endLineNumber)),r=t.startColumn-s.startColumn,l=s.endColumn-t.endColumn,d=e.getValueInRange(s),h=e.getValueInRange(new a.Range(s.startLineNumber,s.startColumn,s.startLineNumber,s.startColumn+r))+i+e.getValueInRange(new a.Range(s.endLineNumber,s.endColumn-l,s.endLineNumber,s.endColumn)),u=[],g=[];let p,f,m;const _=e.getOffsetAt(s.getStartPosition()),{changes:v}=new a.LcsDiff(new a.StringDiffSequence(d),new a.StringDiffSequence(h)).ComputeDiff(!0);if(v.length===0)return;const b=[];for(const I of v){if(b.length===0){b.push(I);continue}const C=b[b.length-1],y=I.originalStart-(C.originalStart+C.originalLength);if(y>0){const x=_+C.originalStart+C.originalLength,L=e.getPositionAt(x),E=e.getWordAtPosition(L);if(E){const R=e.getOffsetAt(new a.Position(L.lineNumber,E.startColumn)),D=e.getOffsetAt(new a.Position(L.lineNumber,E.endColumn)),T=x+y;if(R<=x&&T<=D&&R<=T&&T<=D){C.originalLength=I.originalStart+I.originalLength-C.originalStart,C.modifiedLength=I.modifiedStart+I.modifiedLength-C.modifiedStart;continue}}}b.push(I)}let S=0;for(const I of b){const C=d.substring(I.originalStart,I.originalStart+I.originalLength),y=h.substring(I.modifiedStart,I.modifiedStart+I.modifiedLength),x=_+I.originalStart,L=e.getPositionAt(x),E=x+I.originalLength,R=e.getPositionAt(E),D=a.Range.fromPositions(L,R),T=y.length-I.originalLength;if(/\s/.test(C)){u.push(new a.TextReplacement(D,y)),S+=T;continue}if(C.length>0){n.lastIndex=0;const k=n.exec(C);if(k===null||k.index!==0||k[0].length!==C.length){u.push(new a.TextReplacement(D,y)),S+=T;continue}}if(/\s/.test(y)){u.push(new a.TextReplacement(D,y)),S+=T;continue}if(y.length>0){n.lastIndex=0;const k=n.exec(y);if(k===null||k.index!==0||k[0].length!==y.length){u.push(new a.TextReplacement(D,y)),S+=T;continue}}const M=e.getWordAtPosition(L);if(M===null){u.push(new a.TextReplacement(D,y)),S+=T;continue}const A=I.originalStart+1,U=I.originalLength===0&&I.modifiedLength>0;let F;if(U&&A===M.endColumn&&M.endColumn>M.startColumn?F=this.getTokenAtPosition(e,new a.Position(L.lineNumber,M.startColumn)):F=this.getTokenAtPosition(e,L),M.startColumn!==F.range.startColumn||M.endColumn!==F.range.endColumn){u.push(new a.TextReplacement(D,y)),S+=T;continue}if(F.type===0){let k=e.getValueInRange(F.range);if(k.length===0){u.push(new a.TextReplacement(D,y)),S+=T;continue}if(p===void 0)p=k;else if(p!==k){u.push(new a.TextReplacement(D,y)),S+=T;continue}const P=e.getOffsetAt(F.range.getStartPosition())-_+S,z=e.getOffsetAt(F.range.getEndPosition())-_+S;if(k=h.substring(P,z+T),k.length===0){u.push(new a.TextReplacement(D,y)),S+=T;continue}if(f===void 0)f=k;else if(f!==k){u.push(new a.TextReplacement(D,y)),S+=T;continue}m===void 0&&(m=F.range.getStartPosition()),p!==void 0&&f!==void 0&&p.length>0&&f.length>0&&p!==f?g.push(new a.TextReplacement(F.range,f)):g.push(new a.TextReplacement(D,y)),S+=T}else u.push(new a.TextReplacement(D,y)),S+=y.length-I.originalLength}if(p===void 0||f===void 0||m===void 0||p.length===0||f.length===0||p===f)return;n.lastIndex=0;let w=n.exec(p);if(!(w===null||w.index!==0||w[0].length!==p.length)&&(n.lastIndex=0,w=n.exec(f),!(w===null||w.index!==0||w[0].length!==f.length)))return{renames:{edits:g,position:m,oldName:p,newName:f},others:{edits:u}}}getTokenAtPosition(e,t){e.tokenization.tokenizeIfCheap(t.lineNumber);const i=e.tokenization.getLineTokens(t.lineNumber),n=i.findTokenIndexAtOffset(t.column-1);return{type:i.getStandardTokenType(n),range:new a.Range(t.lineNumber,1+i.getStartOffset(n),t.lineNumber,1+i.getEndOffset(n))}}}class tr{static create(e,t){const i=e.getFocusedCodeEditor();if(i!==null&&i.getModel()===t)return new tr(i,t.getVersionId())}constructor(e,t){this.editor=e,this.versionId=t}equals(e){return e===void 0?!1:this.editor===e.editor&&this.versionId===e.versionId}}class sL{constructor(e,t,i,n,s,r,l,d,h){if(this._result=void 0,this._commandService=t,this._textModel=n,this._state=s,this._requestUuid=i,this._cancellationTokenSource=new a.CancellationTokenSource,d===void 0||h===void 0){this._promise=HE(e.renameProvider,n,r,l,this._cancellationTokenSource.token);return}else this._promise=this.sendNesRenameRequest(n,r,h,l,d)}get requestUuid(){return this._requestUuid}isValid(e){return this._state.equals(tr.create(e,this._textModel))}cancel(){this._cancellationTokenSource.cancel()}async getCount(){if(this._cancellationTokenSource.token.isCancellationRequested)return 0;const e=await this.getResult();return e===void 0||this._cancellationTokenSource.token.isCancellationRequested?0:e.edits.length}async getWorkspaceEdit(){return this.getResult()}async getResult(){if(!this._cancellationTokenSource.token.isCancellationRequested&&(this._result===void 0&&(this._result=await this._promise),!(this._result.rejectReason||this._cancellationTokenSource.token.isCancellationRequested)))return this._result}async sendNesRenameRequest(e,t,i,n,s){try{const r=await this._commandService.executeCommand("github.copilot.nes.postRename",e.uri,t,i,n,s);if(r===void 0)return{rejectReason:"Rename failed",edits:[]};const l=[];for(const d of r)for(const h of d.changes){const u=new a.Range(h.range.start.line+1,h.range.start.character+1,h.range.end.line+1,h.range.end.character+1),g=new o.ResourceTextEdit(d.file,new a.TextReplacement(u,h.newText??n));l.push(g)}return{edits:l}}catch{return{rejectReason:"Rename failed",edits:[]}}}}let ku=class extends a.Disposable{constructor(e,t,i,n,s,r){super(),this._commandService=e,this._languageFeaturesService=t,this._languageConfigurationService=i,this._renameSymbolTrackerService=s,this._codeEditorService=r,this._renameInferenceEngine=new nL,this._renameRunnable=void 0,this._register(o.CommandsRegistry.registerCommand(pm,async(l,d,h)=>{if(!(h===void 0||!h.isValid(this._codeEditorService)))try{const u=await h.getWorkspaceEdit();if(u===void 0)return;n.apply(u,{reason:d})}finally{this._renameRunnable===h&&(this._renameRunnable=void 0)}}))}async proposeRenameRefactoring(e,t,i){if(!t.supportsRename||t.action?.kind!=="edit"||i.selectedSuggestionInfo||!WE(this._languageFeaturesService.renameProvider,e))return t;const n=tr.create(this._codeEditorService,e);if(n===void 0)return t;const s=Date.now(),r=t.action.textReplacement,l=this._languageConfigurationService.getLanguageConfiguration(e.getLanguageId()),d=this._renameInferenceEngine.inferRename(e,r.range,r.text,l.wordDefinition);if(d===void 0||d.renames.edits.length===0)return t;const{oldName:h,newName:u,position:g,edits:p}=d.renames,f=this._renameSymbolTrackerService.trackedWord.get();let m;f!==void 0&&f.model===e&&f.originalWord===h&&f.currentWord===u&&(m=f.currentRange);let _=!1;const v=await a.raceTimeout(this.checkRenamePrecondition(t,e,g,h,u,m),100,()=>{_=!0}),b=this.isRenamePossible(t,v,n,e);if(t.setRenameProcessingInfo({createdRename:b,duration:Date.now()-s,timedOut:_,droppedOtherEdits:b?d.others.edits.length:void 0,droppedRenameEdits:b?p.length-1:void 0}),!b)return t;this._renameRunnable===void 0&&(this._renameRunnable=new sL(this._languageFeaturesService,this._commandService,t.requestUuid,e,n,g,u,m,m!==void 0?h:void 0));const S=o.EditSources.inlineCompletionAccept({nes:t.isInlineEdit,requestUuid:t.requestUuid,providerId:t.source.provider.providerId,languageId:e.getLanguageId(),correlationId:t.getSourceCompletion().correlationId}),w={id:pm,title:a.localize(1254,"Rename"),arguments:[S,this._renameRunnable]},I={label:a.localize(1255,"Rename"),icon:a.Codicon.replaceAll,command:w,count:this._renameRunnable.getCount()},C={kind:"edit",range:p[0].range,insertText:p[0].text,snippetInfo:t.snippetInfo,alternativeAction:I,uri:e.uri},y=Ds.snapshot(e);return ml.create(t.withAction(C),y,!1)}async checkRenamePrecondition(e,t,i,n,s,r){const l={canRename:Nt.no,timedOut:!1};try{const d=await this._commandService.executeCommand("github.copilot.nes.prepareRename",t.uri,i,n,s,e.requestUuid,r);if(d===void 0)return l;if(typeof d=="string"){const h=Nt.fromString(d);return h===Nt.yes||h===Nt.maybe?{canRename:h,oldName:n,onOldState:!1}:{canRename:h,timedOut:!1}}else return d}catch{return l}}isRenamePossible(e,t,i,n){return t===void 0||t.canRename===Nt.no||!i.equals(tr.create(this._codeEditorService,n))?!1:this._renameRunnable===void 0?!0:this._renameRunnable.requestUuid===e.requestUuid?!1:(this._renameRunnable.cancel(),this._renameRunnable=void 0,!0)}};ku=iL([Ts(0,o.ICommandService),Ts(1,o.ILanguageFeaturesService),Ts(2,o.ILanguageConfigurationService),Ts(3,o.IBulkEditService),Ts(4,o.IRenameSymbolTrackerService),Ts(5,o.ICodeEditorService)],ku);var oL=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ns=function(c,e){return function(t,i){e(t,i,c)}},ju;let $u=(Bn=class extends a.Disposable{constructor(e,t,i,n,s,r,l,d,h,u){super(),this._textModel=e,this._versionId=t,this._debounceValue=i,this._cursorPosition=n,this._languageConfigurationService=s,this._logService=r,this._configurationService=l,this._instantiationService=d,this._contextKeyService=h,this._textModelService=u,this._updateOperation=this._register(new a.MutableDisposable),this._state=yE(this,{initial:()=>({inlineCompletions:Ie.createEmpty(),suggestWidgetInlineCompletions:Ie.createEmpty()}),disposeFinal:p=>{p.inlineCompletions.dispose(),p.suggestWidgetInlineCompletions.dispose()},changeTracker:o.recordChangesLazy(()=>({versionId:this._versionId})),update:(p,f,m)=>{const _=a.StringEdit.compose(m.changes.map(v=>v.change?o.offsetEditFromContentChanges(v.change.changes):a.StringEdit.empty).filter(a.isDefined));if(_.isEmpty())return f;try{return{inlineCompletions:f.inlineCompletions.createStateWithAppliedEdit(_,this._textModel),suggestWidgetInlineCompletions:f.suggestWidgetInlineCompletions.createStateWithAppliedEdit(_,this._textModel)}}finally{f.inlineCompletions.dispose(),f.suggestWidgetInlineCompletions.dispose()}}}),this.inlineCompletions=this._state.map(this,p=>p.inlineCompletions),this.suggestWidgetInlineCompletions=this._state.map(this,p=>p.suggestWidgetInlineCompletions),this._completionsEnabled=void 0,this.clearOperationOnTextModelChange=o.derived(this,p=>{this._versionId.read(p),this._updateOperation.clear()}),this._loadingCount=o.observableValue(this,0),this.loading=this._loadingCount.map(this,p=>p>0),this._loggingEnabled=o.observableConfigValue("editor.inlineSuggest.logFetch",!1,this._configurationService).recomputeInitiallyAndOnChange(this._store),this._sendRequestData=o.observableConfigValue("editor.inlineSuggest.emptyResponseInformation",!0,this._configurationService).recomputeInitiallyAndOnChange(this._store),this._structuredFetchLogger=this._register(this._instantiationService.createInstance(ol.cast(),"editor.inlineSuggest.logFetch.commandId")),this._renameProcessor=this._store.add(this._instantiationService.createInstance(ku)),this.clearOperationOnTextModelChange.recomputeInitiallyAndOnChange(this._store);const g=o.product.defaultChatAgent?.completionsEnablementSetting??void 0;g&&(this._updateCompletionsEnablement(g),this._register(this._configurationService.onDidChangeConfiguration(p=>{p.affectsConfiguration(g)&&this._updateCompletionsEnablement(g)}))),this._state.recomputeInitiallyAndOnChange(this._store)}_updateCompletionsEnablement(e){const t=this._configurationService.getValue(e);a.isObject(t)?this._completionsEnabled=t:this._completionsEnabled=void 0}_log(e){this._loggingEnabled.get()&&this._logService.info(nE(e)),this._structuredFetchLogger.log(e)}fetch(e,t,i,n,s,r,l){const d=this._cursorPosition.get(),h=new rL(d,i,this._textModel.getVersionId(),new Set(e)),u=i.selectedSuggestionInfo?this.suggestWidgetInlineCompletions.get():this.inlineCompletions.get();if(this._updateOperation.value?.request.satisfies(h))return this._updateOperation.value.promise;if(u?.request?.satisfies(h))return Promise.resolve(!0);const g=!!this._updateOperation.value;this._updateOperation.clear();const p=new a.CancellationTokenSource,f=(async()=>{const _=new a.DisposableStore;this._loadingCount.set(this._loadingCount.get()+1,void 0);let v=!1;const b=()=>{v||(v=!0,this._loadingCount.set(this._loadingCount.get()-1,void 0))};_.add(new a.RunOnceScheduler(()=>b(),10*1e3)).schedule();const w=e.filter(C=>C.providerId),I=new aL(i,l,w);try{const C=this._debounceValue.get(this._textModel),y=a.findLastMax(e.map(P=>P.debounceDelayMs),a.compareUndefinedSmallest(a.numberComparator))??C;if((g||s&&i.triggerKind===a.InlineCompletionTriggerKind.Automatic)&&await av(y,p.token),p.token.isCancellationRequested||this._store.isDisposed||this._textModel.getVersionId()!==h.versionId)return I.setNoSuggestionReasonIfNotSet("canceled:beforeFetch"),!1;const L=ju._requestId++;(this._loggingEnabled.get()||this._structuredFetchLogger.isEnabled.get())&&this._log({sourceId:"InlineCompletions.fetch",kind:"start",requestId:L,modelUri:this._textModel.uri,modelVersion:this._textModel.getVersionId(),context:{triggerKind:i.triggerKind,suggestInfo:i.selectedSuggestionInfo?!0:void 0},time:Date.now(),provider:t});const E=new Date,R=jE(e,this._cursorPosition.get(),this._textModel,i,l,this._languageConfigurationService);Sv(p.token,()=>R.cancelAndDispose({kind:"tokenCancellation"}));let D=!1,T=!1;const M=[];for await(const P of R.lists)if(P){P.addRef(),_.add(a.toDisposable(()=>P.removeRef(P.inlineSuggestionsData.length===0?{kind:"empty"}:{kind:"notTaken"})));for(const z of P.inlineSuggestionsData){if(T=!0,!i.includeInlineEdits&&(z.isInlineEdit||z.showInlineEditMenu)){z.setNotShownReason("notInlineEditRequested");continue}if(!i.includeInlineCompletions&&!(z.isInlineEdit||z.showInlineEditMenu)){z.setNotShownReason("notInlineCompletionRequested");continue}z.addPerformanceMarker("providerReturned");const Le=z.action?.uri;let W,B;if(Le&&Le.toString()!==this._textModel.uri.toString()){const Z=await this._textModelService.createModelReference(Le);W=Z.object.textEditorModel,B=Z}else W=this._textModel,B=void 0;const ke=Ds.snapshot(W),oe=ml.create(z,ke);if(B){const Z=o.runOnChange(oe.identity.onDispose,()=>{B?.dispose(),Z.dispose()})}z.addPerformanceMarker("itemCreated"),M.push(oe),!oe.isInlineEdit&&!oe.showInlineEditMenu&&i.triggerKind===a.InlineCompletionTriggerKind.Automatic&&oe.isVisible(this._textModel,this._cursorPosition.get())&&(D=!0)}if(D)break}M.forEach(P=>P.addPerformanceMarker("providersResolved"));const A=await Promise.all(M.map(async P=>this._renameProcessor.proposeRenameRefactoring(this._textModel,P,i)));if(A.forEach(P=>P.addPerformanceMarker("renameProcessed")),R.cancelAndDispose({kind:"lostRace"}),this._loggingEnabled.get()||this._structuredFetchLogger.isEnabled.get()){const P=R.didAllProvidersReturn;let z;(p.token.isCancellationRequested||this._store.isDisposed||this._textModel.getVersionId()!==h.versionId)&&(z="canceled");const Le=A.map(W=>{const B=W.getSourceCompletion();if(B.doNotLog)return;const ke={insertText:B.insertText,range:B.range,additionalTextEdits:B.additionalTextEdits,uri:B.uri,command:B.command,gutterMenuLinkAction:B.gutterMenuLinkAction,shownCommand:B.shownCommand,completeBracketPairs:B.completeBracketPairs,isInlineEdit:B.isInlineEdit,showInlineEditMenu:B.showInlineEditMenu,showRange:B.showRange,warning:B.warning,hint:B.hint,supportsRename:B.supportsRename,correlationId:B.correlationId,jumpToPosition:B.jumpToPosition};return{...a.cloneAndChange(ke,oe=>a.Range.isIRange(oe)?a.Range.lift(oe).toString():a.Position.isIPosition(oe)?a.Position.lift(oe).toString():a.Command.is(oe)?{$commandId:oe.id}:oe),$providerId:W.source.provider.providerId?.toString()}}).filter(W=>W!==void 0);this._log({sourceId:"InlineCompletions.fetch",kind:"end",requestId:L,durationMs:Date.now()-E.getTime(),error:z,result:Le,time:Date.now(),didAllProvidersReturn:P})}if(I.setRequestUuid(R.contextWithUuid.requestUuid),T)I.setHasProducedSuggestion(),A.length>0&&p.token.isCancellationRequested&&A.forEach(P=>P.setNotShownReasonIfNotSet("canceled:whileAwaitingOtherProviders"));else if(p.token.isCancellationRequested)I.setNoSuggestionReasonIfNotSet("canceled:whileFetching");else{const P=this._contextKeyService.getContextKeyValue("completionsQuotaExceeded");I.setNoSuggestionReasonIfNotSet(P?"completionsQuotaExceeded":"noSuggestion")}const U=i.earliestShownDateTime-Date.now();if(U>0&&await av(U,p.token),A.forEach(P=>P.addPerformanceMarker("minShowDelayPassed")),p.token.isCancellationRequested||this._store.isDisposed||this._textModel.getVersionId()!==h.versionId||r.get()){const P=p.token.isCancellationRequested?"canceled:afterMinShowDelay":this._store.isDisposed?"canceled:disposed":this._textModel.getVersionId()!==h.versionId?"canceled:documentChanged":r.get()?"canceled:userJumped":"unknown";return A.forEach(z=>z.setNotShownReasonIfNotSet(P)),!1}const F=new Date;this._debounceValue.update(this._textModel,F.getTime()-E.getTime());const k=this._cursorPosition.get();this._updateOperation.clear(),o.transaction(P=>{const z=this._state.get();i.selectedSuggestionInfo?this._state.set({inlineCompletions:Ie.createEmpty(),suggestWidgetInlineCompletions:z.suggestWidgetInlineCompletions.createStateWithAppliedResults(A,h,this._textModel,k,n)},P):this._state.set({inlineCompletions:z.inlineCompletions.createStateWithAppliedResults(A,h,this._textModel,k,n),suggestWidgetInlineCompletions:Ie.createEmpty()},P),z.inlineCompletions.dispose(),z.suggestWidgetInlineCompletions.dispose()})}finally{_.dispose(),b(),this._sendInlineCompletionsRequestTelemetry(I)}return!0})(),m=new cL(h,p,f);return this._updateOperation.value=m,f}clear(e){if(this._store.isDisposed)return;this._updateOperation.clear();const t=this._state.get();this._state.set({inlineCompletions:Ie.createEmpty(),suggestWidgetInlineCompletions:Ie.createEmpty()},e),t.inlineCompletions.dispose(),t.suggestWidgetInlineCompletions.dispose()}seedInlineCompletionsWithSuggestWidget(){const e=this.inlineCompletions.get(),t=this.suggestWidgetInlineCompletions.get();t&&o.transaction(i=>{if(!e||(t.request?.versionId??-1)>(e.request?.versionId??-1)){e?.dispose();const n=this._state.get();this._state.set({inlineCompletions:t.clone(),suggestWidgetInlineCompletions:Ie.createEmpty()},i),n.inlineCompletions.dispose(),n.suggestWidgetInlineCompletions.dispose()}this.clearSuggestWidgetInlineCompletions(i)})}seedWithCompletion(e,t){const i=this._state.get();this._state.set({inlineCompletions:new Ie([e],void 0),suggestWidgetInlineCompletions:Ie.createEmpty()},t),i.inlineCompletions.dispose(),i.suggestWidgetInlineCompletions.dispose()}_sendInlineCompletionsRequestTelemetry(e){if(!this._sendRequestData.get()&&!this._contextKeyService.getContextKeyValue("isRunningUnificationExperiment")||e.requestUuid===void 0||e.hasProducedSuggestion||!o.isCompletionsEnabledFromObject(this._completionsEnabled,this._textModel.getLanguageId())||!e.providers.some(n=>mv(n.providerId?.extensionId)))return;const t={opportunityId:e.requestUuid,noSuggestionReason:e.noSuggestionReason??"unknown",extensionId:"vscode-core",extensionVersion:"0.0.0",groupId:"empty",shown:!1,skuPlan:e.requestInfo.sku?.plan,skuType:e.requestInfo.sku?.type,editorType:e.requestInfo.editorType,requestReason:e.requestInfo.reason,typingInterval:e.requestInfo.typingInterval,typingIntervalCharacterCount:e.requestInfo.typingIntervalCharacterCount,languageId:e.requestInfo.languageId,selectedSuggestionInfo:!!e.context.selectedSuggestionInfo,availableProviders:e.providers.map(n=>n.providerId?.toString()).filter(a.isDefined).join(","),...xE(e.providers.some(n=>mv(n.providerId?.extensionId))),timeUntilProviderRequest:void 0,timeUntilProviderResponse:void 0,viewKind:void 0,preceeded:void 0,superseded:void 0,reason:void 0,acceptedAlternativeAction:void 0,correlationId:void 0,shownDuration:void 0,shownDurationUncollapsed:void 0,timeUntilShown:void 0,partiallyAccepted:void 0,partiallyAcceptedCountSinceOriginal:void 0,partiallyAcceptedRatioSinceOriginal:void 0,partiallyAcceptedCharactersSinceOriginal:void 0,cursorColumnDistance:void 0,cursorLineDistance:void 0,lineCountOriginal:void 0,lineCountModified:void 0,characterCountOriginal:void 0,characterCountModified:void 0,disjointReplacements:void 0,sameShapeReplacements:void 0,longDistanceHintVisible:void 0,longDistanceHintDistance:void 0,notShownReason:void 0,renameCreated:!1,renameDuration:void 0,renameTimedOut:!1,renameDroppedOtherEdits:void 0,renameDroppedRenameEdits:void 0,performanceMarkers:void 0,editKind:void 0},i=this._instantiationService.createInstance(Mu);EE(i,t)}clearSuggestWidgetInlineCompletions(e){this._updateOperation.value?.request.context.selectedSuggestionInfo&&this._updateOperation.clear()}cancelUpdate(){this._updateOperation.clear()}},ju=Bn,Bn._requestId=0,Bn);$u=ju=oL([Ns(4,o.ILanguageConfigurationService),Ns(5,o.ILogService),Ns(6,o.IConfigurationService),Ns(7,o.IInstantiationService),Ns(8,o.IContextKeyService),Ns(9,o.ITextModelService)],$u);class rL{constructor(e,t,i,n){this.position=e,this.context=t,this.versionId=i,this.providers=n}satisfies(e){return this.position.equals(e.position)&&o.equalsIfDefined(this.context.selectedSuggestionInfo,e.context.selectedSuggestionInfo,o.thisEqualsC())&&(e.context.triggerKind===a.InlineCompletionTriggerKind.Automatic||this.context.triggerKind===a.InlineCompletionTriggerKind.Explicit)&&this.versionId===e.versionId&&lL(e.providers,this.providers)}}class aL{constructor(e,t,i){this.context=e,this.requestInfo=t,this.providers=i,this.hasProducedSuggestion=!1}setRequestUuid(e){this.requestUuid=e}setNoSuggestionReasonIfNotSet(e){this.noSuggestionReason??=e}setHasProducedSuggestion(){this.hasProducedSuggestion=!0}}function lL(c,e){return[...c].every(t=>e.has(t))}class cL{constructor(e,t,i){this.request=e,this.cancellationTokenSource=t,this.promise=i}dispose(){this.cancellationTokenSource.cancel()}}class Ie extends a.Disposable{static createEmpty(){return new Ie([],void 0)}constructor(e,t){super(),this.inlineCompletions=e,this.request=t;for(const i of this.inlineCompletions)i.addRef();this._register({dispose:()=>{for(const i of this.inlineCompletions)i.removeRef()}})}_findById(e){return this.inlineCompletions.find(t=>t.identity===e)}_findByHash(e){return this.inlineCompletions.find(t=>t.hash===e)}createStateWithAppliedEdit(e,t){const i=this.inlineCompletions.map(n=>n.withEdit(e,t)).filter(a.isDefined);return new Ie(i,this.request)}createStateWithAppliedResults(e,t,i,n,s){let r;if(s){const h=this._findById(s);if(h&&h.canBeReused(i,t.position)){r=h;const u=e.find(g=>g.hash===h.hash);u?e=hL(u,e):e=[h,...e]}}const l=r?!r.isInlineEdit:e.some(h=>!h.isInlineEdit&&h.isVisible(i,n));let d=[];for(const h of e){const u=this._findByHash(h.hash);let g;u&&u!==h?(g=h.withIdentity(u.identity),h.setIsPreceeded(u),u.setEndOfLifeReason({kind:a.InlineCompletionEndOfLifeReasonKind.Ignored,userTypingDisagreed:!1,supersededBy:h.getSourceCompletion()})):g=h,l!==g.isInlineEdit&&d.push(g)}return d.sort(a.compareBy(h=>h.showInlineEditMenu,a.booleanComparator)),d=dL(d,h=>h.semanticId),new Ie(d,t)}clone(){return new Ie(this.inlineCompletions,this.request)}}function dL(c,e){const t=new Set;return c.filter(i=>{const n=e(i);return t.has(n)?!1:(t.add(n),!0)})}function hL(c,e){const t=e.indexOf(c);return t>-1?[c,...e.slice(0,t),...e.slice(t+1)]:e}const Re=class Re extends a.Disposable{getTypingInterval(){return(this._cacheInvalidated||this._cachedTypingIntervalResult===null)&&(this._cachedTypingIntervalResult=this._calculateTypingInterval(),this._cacheInvalidated=!1),this._cachedTypingIntervalResult}constructor(e){super(),this._textModel=e,this._typingSessions=[],this._currentSession=null,this._lastChangeTime=0,this._cachedTypingIntervalResult=null,this._cacheInvalidated=!0,this._register(this._textModel.onDidChangeContent(t=>this._updateTypingSpeed(t)))}_updateTypingSpeed(e){const t=Date.now();if(!this._isUserTyping(e)){this._finalizeCurrentSession();return}this._currentSession&&t-this._lastChangeTime>Re.MAX_SESSION_GAP_MS&&this._finalizeCurrentSession(),this._currentSession||(this._currentSession={startTime:t,endTime:t,characterCount:0}),this._currentSession.endTime=t,this._currentSession.characterCount+=this._getActualCharacterCount(e),this._lastChangeTime=t,this._cacheInvalidated=!0}_getActualCharacterCount(e){let t=0;for(const i of e.changes)t+=Math.max(i.text.length,i.rangeLength);return t}_isUserTyping(e){if(!e.detailedReasons||e.detailedReasons.length===0)return!1;for(const t of e.detailedReasons)if(this._isUserTypingReason(t))return!0;return!1}_isUserTypingReason(e){if(e.metadata.isUndoing||e.metadata.isRedoing)return!1;if(e.metadata.source==="cursor"){const t=e.metadata.kind;return t==="type"||t==="compositionType"||t==="compositionEnd"}else return!1}_finalizeCurrentSession(){if(!this._currentSession)return;this._currentSession.endTime-this._currentSession.startTime>=Re.MIN_SESSION_DURATION_MS&&this._currentSession.characterCount>0&&(this._typingSessions.push(this._currentSession),this._typingSessions.length>Re.SESSION_HISTORY_LIMIT&&this._typingSessions.shift()),this._currentSession=null}_calculateTypingInterval(){if(this._currentSession){const e={...this._currentSession};if(e.endTime-e.startTime>=Re.MIN_SESSION_DURATION_MS&&e.characterCount>0){const i=[...this._typingSessions,e];return this._calculateSpeedFromSessions(i)}}return this._calculateSpeedFromSessions(this._typingSessions)}_calculateSpeedFromSessions(e){if(e.length===0)return{averageInterval:0,characterCount:0};const t=[...e].sort((u,g)=>g.endTime-u.endTime),i=Date.now()-Re.TYPING_SPEED_WINDOW_MS,n=t.filter(u=>u.endTime>i),s=t.splice(n.length);let r=a.sum(n.map(u=>u.characterCount));for(let u=0;uu.endTime-u.startTime));if(l===0||r<=1)return{averageInterval:0,characterCount:r};const d=Math.max(1,r-1),h=l/d;return{averageInterval:Math.round(h),characterCount:r}}dispose(){this._finalizeCurrentSession(),super.dispose()}};Re.MAX_SESSION_GAP_MS=3e3,Re.MIN_SESSION_DURATION_MS=1e3,Re.SESSION_HISTORY_LIMIT=50,Re.TYPING_SPEED_WINDOW_MS=3e5,Re.MIN_CHARS_FOR_RELIABLE_SPEED=20;let qu=Re,wv;function Iv(c){return wv?.(c)??null}function uL(c){wv=c}var gL=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Jt=function(c,e){return function(t,i){e(t,i,c)}};let Gu=class extends a.Disposable{get isAcceptingPartially(){return this._isAcceptingPartially}get editor(){return this._editor}constructor(e,t,i,n,s,r,l,d,h,u,g,p,f,m,_){super(),this.textModel=e,this._selectedSuggestItem=t,this._textModelVersionId=i,this._positions=n,this._debounceValue=s,this._enabled=r,this._editor=l,this._instantiationService=d,this._commandService=h,this._languageConfigurationService=u,this._accessibilityService=g,this._languageFeaturesService=p,this._codeEditorService=f,this._inlineCompletionsService=m,this._isActive=o.observableValue(this,!1),this._onlyRequestInlineEditsSignal=o.observableSignal(this),this._forceUpdateExplicitlySignal=o.observableSignal(this),this._noDelaySignal=o.observableSignal(this),this._fetchSpecificProviderSignal=o.observableSignal(this),this._selectedInlineCompletionId=o.observableValue(this,void 0),this.primaryPosition=o.derived(this,C=>this._positions.read(C)[0]??new a.Position(1,1)),this.allPositions=o.derived(this,C=>this._positions.read(C)),this.sku=o.observableValue(this,void 0),this._isAcceptingPartially=!1,this._appearedInsideViewport=o.derived(this,C=>{const y=this.state.read(C);return!y||!y.inlineSuggestion?!1:xv(this._editor,y.inlineSuggestion,C)}),this._onDidAccept=this._register(new a.Emitter),this.onDidAccept=this._onDidAccept.event,this._lastShownInlineCompletionInfo=void 0,this._lastAcceptedInlineCompletionInfo=void 0,this._didUndoInlineEdits=o.derivedHandleChanges({owner:this,changeTracker:{createChangeSummary:()=>({didUndo:!1}),handleChange:(C,y)=>(y.didUndo=C.didChange(this._textModelVersionId)&&!!C.change?.isUndoing,!0)}},(C,y)=>{const x=this._textModelVersionId.read(C);return x!==null&&this._lastAcceptedInlineCompletionInfo&&this._lastAcceptedInlineCompletionInfo.textModelVersionIdAfter===x-1&&this._lastAcceptedInlineCompletionInfo.inlineCompletion.isInlineEdit&&y.didUndo?(this._lastAcceptedInlineCompletionInfo=void 0,!0):!1}),this._preserveCurrentCompletionReasons=new Set([Mt.Redo,Mt.Undo,Mt.AcceptWord]),this.dontRefetchSignal=o.observableSignal(this),this._fetchInlineCompletionsPromise=o.derivedHandleChanges({owner:this,changeTracker:{createChangeSummary:()=>({dontRefetch:!1,preserveCurrentCompletion:!1,inlineCompletionTriggerKind:a.InlineCompletionTriggerKind.Automatic,onlyRequestInlineEdits:!1,shouldDebounce:!0,provider:void 0,changeHint:void 0,textChange:!1,changeReason:""}),handleChange:(C,y)=>{if(C.didChange(this._textModelVersionId)){this._preserveCurrentCompletionReasons.has(this._getReason(C.change))&&(y.preserveCurrentCompletion=!0);const x=C.change?.detailedReasons??[];y.changeReason=x.length>0?x[0].getType():"",y.textChange=!0}else C.didChange(this._forceUpdateExplicitlySignal)?(y.preserveCurrentCompletion=!0,y.inlineCompletionTriggerKind=a.InlineCompletionTriggerKind.Explicit):C.didChange(this.dontRefetchSignal)?y.dontRefetch=!0:C.didChange(this._onlyRequestInlineEditsSignal)?y.onlyRequestInlineEdits=!0:C.didChange(this._fetchSpecificProviderSignal)&&(y.provider=C.change?.provider,y.changeHint=C.change?.changeHint);return!0}}},(C,y)=>{if(this._source.clearOperationOnTextModelChange.read(C),this._noDelaySignal.read(C),this.dontRefetchSignal.read(C),this._onlyRequestInlineEditsSignal.read(C),this._forceUpdateExplicitlySignal.read(C),this._fetchSpecificProviderSignal.read(C),!((this._enabled.read(C)&&this._selectedSuggestItem.read(C)||this._isActive.read(C))&&(!this._inlineCompletionsService.isSnoozing()||y.inlineCompletionTriggerKind===a.InlineCompletionTriggerKind.Explicit))){this._source.cancelUpdate();return}this._textModelVersionId.read(C);const L=this._source.suggestWidgetInlineCompletions.read(void 0);let E=this._selectedSuggestItem.read(C);if(this._shouldShowOnSuggestConflict.read(void 0)&&(E=void 0),L&&!E&&this._source.seedInlineCompletionsWithSuggestWidget(),y.dontRefetch)return Promise.resolve(!0);if(this._didUndoInlineEdits.read(C)&&y.inlineCompletionTriggerKind!==a.InlineCompletionTriggerKind.Explicit){o.transaction(z=>{this._source.clear(z)});return}let R="";y.provider?R+="providerOnDidChange":y.inlineCompletionTriggerKind===a.InlineCompletionTriggerKind.Explicit&&(R+="explicit"),y.changeReason&&(R+=R.length>0?`:${y.changeReason}`:y.changeReason);const D=this._typing.getTypingInterval(),T={editorType:this.editorType,startTime:Date.now(),languageId:this.textModel.getLanguageId(),reason:R,typingInterval:D.averageInterval,typingIntervalCharacterCount:D.characterCount,availableProviders:[],sku:this.sku.read(void 0)};let M={triggerKind:y.inlineCompletionTriggerKind,selectedSuggestionInfo:E?.toSelectedSuggestionInfo(),includeInlineCompletions:!y.onlyRequestInlineEdits,includeInlineEdits:this._inlineEditsEnabled.read(C),requestIssuedDateTime:T.startTime,earliestShownDateTime:T.startTime+(y.inlineCompletionTriggerKind===a.InlineCompletionTriggerKind.Explicit||this.inAcceptFlow.read(void 0)?0:this._minShowDelay.read(void 0)),changeHint:y.changeHint};M.triggerKind===a.InlineCompletionTriggerKind.Automatic&&y.textChange&&this.textModel.getAlternativeVersionId()===this._lastShownInlineCompletionInfo?.alternateTextModelVersionId&&(M={...M,includeInlineCompletions:!this._lastShownInlineCompletionInfo.inlineCompletion.isInlineEdit,includeInlineEdits:this._lastShownInlineCompletionInfo.inlineCompletion.isInlineEdit});const A=this.selectedInlineCompletion.read(void 0)??this._inlineSuggestionItems.read(void 0)?.inlineEdit,U=y.preserveCurrentCompletion||A?.forwardStable?A:void 0,F=this._jumpedToId.map(z=>!!z&&z===this._inlineSuggestionItems.read(void 0)?.inlineEdit?.semanticId),k=y.provider?{providers:[y.provider],label:"single:"+y.provider.providerId?.toString()}:{providers:this._languageFeaturesService.inlineCompletionsProvider.all(this.textModel),label:void 0},P=this.getAvailableProviders(k.providers);return T.availableProviders=P.map(z=>z.providerId).filter(a.isDefined),this._source.fetch(P,k.label,M,U?.identity,y.shouldDebounce,F,T)}),this._inlineSuggestionItems=o.derivedOpts({owner:this},C=>{const y=this._source.inlineCompletions.read(C);if(!y)return;const x=this.primaryPosition.read(C);let L;const E=[];for(const R of y.inlineCompletions)R.isInlineEdit?L=R:R.isVisible(this.textModel,x)&&E.push(R);return E.length!==0&&(L=void 0),{inlineCompletions:E,inlineEdit:L}}),this._inlineCompletionItems=o.derivedOpts({owner:this,equalsFn:o.arrayEqualsC()},C=>this._inlineSuggestionItems.read(C)?.inlineCompletions??[]),this.selectedInlineCompletionIndex=o.derived(this,C=>{const y=this._selectedInlineCompletionId.read(C),x=this._inlineCompletionItems.read(C),L=this._selectedInlineCompletionId===void 0?-1:x.findIndex(E=>E.semanticId===y);return L===-1?(this._selectedInlineCompletionId.set(void 0,void 0),0):L}),this.selectedInlineCompletion=o.derived(this,C=>{const y=this._inlineCompletionItems.read(C),x=this.selectedInlineCompletionIndex.read(C);return y[x]}),this.activeCommands=o.derivedOpts({owner:this,equalsFn:o.arrayEqualsC()},C=>this.selectedInlineCompletion.read(C)?.source.inlineSuggestions.commands??[]),this.inlineCompletionsCount=o.derived(this,C=>{if(this.lastTriggerKind.read(C)===a.InlineCompletionTriggerKind.Explicit)return this._inlineCompletionItems.read(C).length}),this._hasVisiblePeekWidgets=o.derived(this,C=>this._editorObs.openedPeekWidgets.read(C)>0),this._shouldShowOnSuggestConflict=o.derived(this,C=>{const y=this._showOnSuggestConflict.read(C);if(y!=="never"&&!!this.selectedInlineCompletion.read(C)){const L=this._selectedSuggestItem.read(C);return L?y==="whenSuggestListIsIncomplete"?L.listIncomplete:!0:!1}return!1}),this.state=o.derivedOpts({owner:this,equalsFn:(C,y)=>!C||!y?C===y:C.kind==="ghostText"&&y.kind==="ghostText"?cv(C.ghostTexts,y.ghostTexts)&&C.inlineSuggestion===y.inlineSuggestion&&C.suggestItem===y.suggestItem:C.kind==="inlineEdit"&&y.kind==="inlineEdit"?C.inlineSuggestion===y.inlineSuggestion:!1},C=>{const y=this.textModel;if(this._suppressInSnippetMode.read(C)&&this._isInSnippetMode.read(C))return;const x=this._inlineSuggestionItems.read(C),L=x?.inlineEdit;if(L){if(this._hasVisiblePeekWidgets.read(C))return;const R=this.primaryPosition.map(A=>a.LineRange.fromRangeInclusive(L.targetRange).addMargin(1,1).contains(A.lineNumber)),D=L.action?.kind==="edit"?L.action.stringEdit:void 0,T=D?a.TextEdit.fromStringEdit(D,new o.TextModelText(this.textModel)).replacements:[];let M=(x.inlineEdit?.command?.id==="vscode.open"||x.inlineEdit?.command?.id==="_workbench.open")&&x.inlineEdit?.command.arguments?.length?a.URI.from(x.inlineEdit?.command.arguments[0]):void 0;return L.originalTextRef.targets(this.textModel)||(M=L.originalTextRef.uri),{kind:"inlineEdit",inlineSuggestion:L,edits:T,cursorAtInlineEdit:R,nextEditUri:M}}const E=this._selectedSuggestItem.read(C);if(!this._shouldShowOnSuggestConflict.read(C)&&E){const R=Xt(E.getSingleTextEdit(),y),D=this._computeAugmentation(R,C);if(!this._suggestPreviewEnabled.read(C)&&!D)return;const M=D?.edit??R,A=D?D.edit.text.length-R.text.length:0,U=this._suggestPreviewMode.read(C),F=this._positions.read(C),P=[M,...Zu(this.textModel,F,M)].map((B,ke)=>({edit:B,ghostText:B?uv(B,y,U,F[ke],A):void 0})).filter(({edit:B,ghostText:ke})=>B!==void 0&&ke!==void 0),z=P.map(({edit:B})=>B),Le=P.map(({ghostText:B})=>B),W=Le[0]??new Qo(M.range.endLineNumber,[]);return{kind:"ghostText",edits:z,primaryGhostText:W,ghostTexts:Le,inlineSuggestion:D?.completion,suggestItem:E}}else{if(!this._isActive.read(C))return;const R=this.selectedInlineCompletion.read(C);if(!R)return;const D=R.getSingleTextEdit(),T=this._inlineSuggestMode.read(C),M=this._positions.read(C),U=[D,...Zu(this.textModel,M,D)].map((P,z)=>({edit:P,ghostText:P?uv(P,y,T,M[z],0):void 0})).filter(({edit:P,ghostText:z})=>P!==void 0&&z!==void 0),F=U.map(({edit:P})=>P),k=U.map(({ghostText:P})=>P);return k[0]?{kind:"ghostText",edits:F,primaryGhostText:k[0],ghostTexts:k,inlineSuggestion:R,suggestItem:void 0}:void 0}}),this.status=o.derived(this,C=>{if(this._source.loading.read(C))return"loading";const y=this.state.read(C);return y?.kind==="ghostText"?"ghostText":y?.kind==="inlineEdit"?"inlineEdit":"noSuggestion"}),this.inlineCompletionState=o.derived(this,C=>{const y=this.state.read(C);if(!(!y||y.kind!=="ghostText")&&!this._editorObs.inComposition.read(C))return y}),this.inlineEditState=o.derived(this,C=>{const y=this.state.read(C);if(!(!y||y.kind!=="inlineEdit"))return y}),this.inlineEditAvailable=o.derived(this,C=>!!this.inlineEditState.read(C)),this.warning=o.derived(this,C=>this.inlineCompletionState.read(C)?.inlineSuggestion?.warning),this.ghostTexts=o.derivedOpts({owner:this,equalsFn:cv},C=>{const y=this.inlineCompletionState.read(C);if(y)return y.ghostTexts}),this.primaryGhostText=o.derivedOpts({owner:this,equalsFn:dv},C=>{const y=this.inlineCompletionState.read(C);if(y)return y?.primaryGhostText}),this.showCollapsed=o.derived(this,C=>{const y=this.state.read(C);if(!y||y.kind!=="inlineEdit"||y.inlineSuggestion.hint||y.inlineSuggestion.action?.kind==="jumpTo")return!1;const x=y.inlineSuggestion.updatedEditModelVersion===this._textModelVersionId.read(C);return(this._inlineEditsShowCollapsedEnabled.read(C)||!x)&&this._jumpedToId.read(C)!==y.inlineSuggestion.semanticId&&!this._inAcceptFlow.read(C)}),this._tabShouldIndent=o.derived(this,C=>{if(this._inAcceptFlow.read(C))return!1;function y(E){return E.startLineNumber!==E.endLineNumber}function x(E,R){const D=E.getLineIndentColumn(R),T=E.getLineLastNonWhitespaceColumn(R),M=Math.max(T,D);return new a.Range(R,D,R,M)}return this._editorObs.selections.read(C)?.some(E=>E.isEmpty()?this.textModel.getLineLength(E.startLineNumber)===0:y(E)||E.containsRange(x(this.textModel,E.startLineNumber)))}),this.tabShouldJumpToInlineEdit=o.derived(this,C=>{if(this._tabShouldIndent.read(C))return!1;const y=this.inlineEditState.read(C);return y?y.inlineSuggestion.action?.kind==="jumpTo"||this.showCollapsed.read(C)?!0:this._inAcceptFlow.read(C)&&this._appearedInsideViewport.read(C)?!1:!y.cursorAtInlineEdit.read(C):!1}),this.tabShouldAcceptInlineEdit=o.derived(this,C=>{const y=this.inlineEditState.read(C);return!y||y.inlineSuggestion.action?.kind==="jumpTo"||this.showCollapsed.read(C)||this._tabShouldIndent.read(C)?!1:this._inAcceptFlow.read(C)&&this._appearedInsideViewport.read(C)||y.inlineSuggestion.targetRange.startLineNumber===this._editorObs.cursorLineNumber.read(C)||this._jumpedToId.read(C)===y.inlineSuggestion.semanticId?!0:y.cursorAtInlineEdit.read(C)}),this._jumpedToId=o.observableValue(this,void 0),this._inAcceptFlow=o.observableValue(this,!1),this.inAcceptFlow=this._inAcceptFlow,this._source=this._register(this._instantiationService.createInstance($u,this.textModel,this._textModelVersionId,this._debounceValue,this.primaryPosition)),this.lastTriggerKind=this._source.inlineCompletions.map(this,C=>C?.request?.context.triggerKind),this._editorObs=o.observableCodeEditor(this._editor);const v=this._editorObs.getOption(134);this._suggestPreviewEnabled=v.map(C=>C.preview),this._suggestPreviewMode=v.map(C=>C.previewMode);const b=this._editorObs.getOption(71);this._inlineSuggestMode=b.map(C=>C.mode),this._suppressedInlineCompletionGroupIds=b.map(C=>new Set(C.experimental.suppressInlineSuggestions.split(","))),this._inlineEditsEnabled=b.map(C=>!!C.edits.enabled),this._inlineEditsShowCollapsedEnabled=b.map(C=>C.edits.showCollapsed),this._triggerCommandOnProviderChange=b.map(C=>C.triggerCommandOnProviderChange),this._minShowDelay=b.map(C=>C.minShowDelay),this._showOnSuggestConflict=b.map(C=>C.experimental.showOnSuggestConflict),this._suppressInSnippetMode=b.map(C=>C.suppressInSnippetMode);const S=ee.get(this._editor);this._isInSnippetMode=S?.isInSnippetObservable??o.constObservable(!1),_.getDefaultAccount().then(mL(C=>this.sku.set(Ev(C),void 0),this._store)),this._register(_.onDidChangeDefaultAccount(C=>this.sku.set(Ev(C),void 0))),this._typing=this._register(new qu(this.textModel)),this._register(this._inlineCompletionsService.onDidChangeIsSnoozing(C=>{C&&this.stop()}));{const C=this.textModel.uri.scheme===a.Schemas.vscodeNotebookCell,[y]=this._codeEditorService.listDiffEditors().filter(x=>x.getOriginalEditor().getId()===this._editor.getId()||x.getModifiedEditor().getId()===this._editor.getId());this.isInDiffEditor=!!y,this.editorType=C?J.Notebook:this.isInDiffEditor?J.DiffEditor:J.TextEditor}this._register(o.recomputeInitiallyAndOnChange(this.state,C=>{C&&C.inlineSuggestion&&this._inlineCompletionsService.reportNewCompletion(C.inlineSuggestion.requestUuid)})),this._register(o.recomputeInitiallyAndOnChange(this._fetchInlineCompletionsPromise)),this._register(o.autorun(C=>{this._editorObs.versionId.read(C),this._inAcceptFlow.set(!1,void 0)})),this._register(o.autorun(C=>{this.state.map((x,L)=>!x||x.kind==="inlineEdit"&&!x.cursorAtInlineEdit.read(L)).read(C)&&this._jumpedToId.set(void 0,void 0)})),this._register(o.autorun(C=>{const y=this.state.map(x=>x?.inlineSuggestion).read(C);y&&y.addPerformanceMarker("activeSuggestion")}));const w=this.inlineEditState.map(C=>C?.inlineSuggestion.semanticId);this._register(o.autorun(C=>{w.read(C)&&(this._editor.pushUndoStop(),this._lastShownInlineCompletionInfo={alternateTextModelVersionId:this.textModel.getAlternativeVersionId(),inlineCompletion:this.state.get().inlineSuggestion})}));const I=o.observableFromEvent(this._languageFeaturesService.inlineCompletionsProvider.onDidChange,()=>this._languageFeaturesService.inlineCompletionsProvider.all(e));o.mapObservableArrayCached(this,I,(C,y)=>{C.onDidChangeInlineCompletions&&y.add(C.onDidChangeInlineCompletions(x=>{if(!this._enabled.get()||(this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor())!==this._editor)return;if(this._triggerCommandOnProviderChange.get()){this.trigger(void 0,{onlyFetchInlineEdits:!0});return}const E=this.state.get();E&&(E.inlineSuggestion||E.edits)&&E.inlineSuggestion?.source.provider!==C||o.transaction(R=>{this._fetchSpecificProviderSignal.trigger(R,{provider:C,changeHint:x??void 0}),this.trigger(R)})}))}).recomputeInitiallyAndOnChange(this._store),this._didUndoInlineEdits.recomputeInitiallyAndOnChange(this._store)}getIndentationInfo(e){let t=!1,i=!0;const n=this?.primaryGhostText.read(e);if(this?._selectedSuggestItem&&n&&n.parts.length>0){const{column:s,lines:r}=n.parts[0],l=r[0].line,d=this.textModel.getLineIndentColumn(n.lineNumber);if(s<=d){let u=a.firstNonWhitespaceIndex(l);u===-1&&(u=l.length-1),t=u>0;const g=this.textModel.getOptions().tabSize;i=o.CursorColumns.visibleColumnFromColumn(l,u+1,g)!(r.groupId&&t.has(r.groupId))),n=new Set;for(const r of i)r.excludesGroupIds?.forEach(l=>n.add(l));const s=[];for(const r of i)r.groupId&&n.has(r.groupId)||s.push(r);return s}async trigger(e,t={}){o.subtransaction(e,i=>{t.onlyFetchInlineEdits&&this._onlyRequestInlineEditsSignal.trigger(i),t.noDelay&&this._noDelaySignal.trigger(i),this._isActive.set(!0,i),t.explicit&&(this._inAcceptFlow.set(!0,i),this._forceUpdateExplicitlySignal.trigger(i)),t.provider&&this._fetchSpecificProviderSignal.trigger(i,{provider:t.provider,changeHint:t.changeHint})}),await this._fetchInlineCompletionsPromise.get()}async triggerExplicitly(e,t=!1){return this.trigger(e,{onlyFetchInlineEdits:t,explicit:!0})}stop(e="automatic",t){o.subtransaction(t,i=>{if(e==="explicitCancel"){const n=this.state.get()?.inlineSuggestion;n&&n.reportEndOfLife({kind:a.InlineCompletionEndOfLifeReasonKind.Rejected})}this._isActive.set(!1,i),this._source.clear(i)})}_computeAugmentation(e,t){const i=this.textModel,n=this._source.suggestWidgetInlineCompletions.read(t),s=n?n.inlineCompletions.filter(l=>!l.isInlineEdit):[this.selectedInlineCompletion.read(t)].filter(a.isDefined);return a.mapFindFirst(s,l=>{let d=l.getSingleTextEdit();return d=Xt(d,i,a.Range.fromPositions(d.range.getStartPosition(),e.range.getEndPosition())),hv(d,e)?{completion:l,edit:d}:void 0})}async _deltaSelectedInlineCompletionIndex(e){await this.triggerExplicitly();const t=this._inlineCompletionItems.get()||[];if(t.length>0){const i=(this.selectedInlineCompletionIndex.get()+e+t.length)%t.length;this._selectedInlineCompletionId.set(t[i].semanticId,void 0)}else this._selectedInlineCompletionId.set(void 0,void 0)}async next(){await this._deltaSelectedInlineCompletionIndex(1)}async previous(){await this._deltaSelectedInlineCompletionIndex(-1)}_getMetadata(e,t,i=void 0){return i?o.EditSources.inlineCompletionPartialAccept({nes:e.isInlineEdit,requestUuid:e.requestUuid,providerId:e.source.provider.providerId,languageId:t,type:i,correlationId:e.getSourceCompletion().correlationId}):o.EditSources.inlineCompletionAccept({nes:e.isInlineEdit,requestUuid:e.requestUuid,correlationId:e.getSourceCompletion().correlationId,providerId:e.source.provider.providerId,languageId:t})}async accept(e=this._editor,t=!1){if(e.getModel()!==this.textModel)throw new a.BugIndicatingError;let i,n=!1;const s=this.state.get();if(s?.kind==="ghostText"){if(!s||s.primaryGhostText.isEmpty()||!s.inlineSuggestion)return;i=s.inlineSuggestion}else if(s?.kind==="inlineEdit")i=s.inlineSuggestion,n=!!s.nextEditUri;else return;i.addRef();try{let r=!1;if(e.pushUndoStop(),i.originalTextRef.targets(this.textModel)){if(!n){if(i.action?.kind==="edit"){const l=i.action;if(t&&l.alternativeAction){r=!0;const d=l.alternativeAction.command;await this._commandService.executeCommand(d.id,...d.arguments||[]).then(void 0,a.onUnexpectedExternalError)}else if(l.snippetInfo){const d=a.TextReplacement.delete(l.textReplacement.range),h=i.additionalTextEdits.map(g=>new a.TextReplacement(a.Range.lift(g.range),g.text??"")),u=a.TextEdit.fromParallelReplacementsUnsorted([d,...h]);e.edit(u,this._getMetadata(i,this.textModel.getLanguageId())),e.setPosition(l.snippetInfo.range.getStartPosition(),"inlineCompletionAccept"),ee.get(e)?.insert(l.snippetInfo.snippet,{undoStopBefore:!1})}else{const d=s.edits;let h=d;s.kind==="ghostText"&&(h=fE(d,this.textModel));const u=rv(h).map(f=>a.Selection.fromPositions(f)),g=i.additionalTextEdits.map(f=>new a.TextReplacement(a.Range.lift(f.range),f.text??"")),p=a.TextEdit.fromParallelReplacementsUnsorted([...d,...g]);if(e.edit(p,this._getMetadata(i,this.textModel.getLanguageId())),i.hint===void 0&&e.setSelections(s.kind==="inlineEdit"?u.slice(-1):u,"inlineCompletionAccept"),s.kind==="inlineEdit"&&!this._accessibilityService.isMotionReduced()){const f=p.getNewRanges(),m=this._store.add(new pL(e,f,()=>{this._store.delete(m)}))}}}}}else{const l=await this._codeEditorService.openCodeEditor({resource:i.originalTextRef.uri},this._editor);if(l){const h=Iv(l)?.model.get();l.focus(),h?.transplantCompletion(i),l.revealLineInCenter(i.targetRange.startLineNumber)}}this._onDidAccept.fire(),this.stop(),i.command&&await this._commandService.executeCommand(i.command.id,...i.command.arguments||[]).then(void 0,a.onUnexpectedExternalError),r&&this.trigger(void 0),i.reportEndOfLife({kind:a.InlineCompletionEndOfLifeReasonKind.Accepted,alternativeAction:t})}finally{i.removeRef(),this._inAcceptFlow.set(!0,void 0),this._lastAcceptedInlineCompletionInfo={textModelVersionIdAfter:this.textModel.getVersionId(),inlineCompletion:i}}}async acceptNextWord(){await this._acceptNext(this._editor,"word",(e,t)=>{const i=this.textModel.getLanguageIdAtPosition(e.lineNumber,e.column),n=this._languageConfigurationService.getLanguageConfiguration(i),s=new RegExp(n.wordDefinition.source,n.wordDefinition.flags.replace("g","")),r=t.match(s);let l=0;r&&r.index!==void 0?r.index===0?l=r[0].length:l=r.index:l=t.length;const h=/\s+/g.exec(t);return h&&h.index!==void 0&&h.index+h[0].length{const i=t.match(/\n/);return i&&i.index!==void 0?i.index+1:t.length},1)}async _acceptNext(e,t,i,n){if(e.getModel()!==this.textModel)throw new a.BugIndicatingError;const s=this.inlineCompletionState.get();if(!s||s.primaryGhostText.isEmpty()||!s.inlineSuggestion)return;const r=s.primaryGhostText,l=s.inlineSuggestion;if(l.snippetInfo){await this.accept(e);return}const d=r.parts[0],h=new a.Position(r.lineNumber,d.column),u=d.text,g=i(h,u);if(g===u.length&&r.parts.length===1){this.accept(e);return}const p=u.substring(0,g),f=this._positions.get(),m=f[0];l.addRef();try{this._isAcceptingPartially=!0;try{e.pushUndoStop();const S=a.Range.fromPositions(m,h),w=e.getModel().getValueInRange(S)+p,I=new a.TextReplacement(S,w),C=[I,...Zu(this.textModel,f,I)].filter(a.isDefined),y=rv(C).map(x=>a.Selection.fromPositions(x));e.edit(a.TextEdit.fromParallelReplacementsUnsorted(C),this._getMetadata(l,t)),e.setSelections(y,"inlineCompletionPartialAccept"),e.revealPositionInCenterIfOutsideViewport(e.getPosition(),0)}finally{this._isAcceptingPartially=!1}const _=a.Range.fromPositions(l.editRange.getStartPosition(),a.TextLength.ofText(p).addToPosition(h)),b=e.getModel().getValueInRange(_,1).length;l.reportPartialAccept(b,{kind:n,acceptedLength:b},{characters:g,ratio:g/u.length,count:1})}finally{l.removeRef()}}handleSuggestAccepted(e){const t=Xt(e.getSingleTextEdit(),this.textModel),i=this._computeAugmentation(t,void 0);if(!i)return;const s=this.textModel.getValueInRange(i.completion.editRange,1).length+t.text.length;i.completion.reportPartialAccept(t.text.length,{kind:2,acceptedLength:s},{characters:t.text.length,count:1,ratio:1})}extractReproSample(){const e=this.textModel.getValue(),t=this.state.get()?.inlineSuggestion;return{documentValue:e,inlineCompletion:t?.getSourceCompletion()}}jump(){const e=this.inlineEditState.get();if(!e)return;const t=e.inlineSuggestion;if(!t.originalTextRef.targets(this.textModel)){this.accept(this._editor);return}t.addRef();try{o.transaction(i=>{t.action?.kind==="jumpTo"&&(this.stop(void 0,i),t.reportEndOfLife({kind:a.InlineCompletionEndOfLifeReasonKind.Accepted,alternativeAction:!1})),this._jumpedToId.set(e.inlineSuggestion.semanticId,i),this.dontRefetchSignal.trigger(i);const n=e.inlineSuggestion.targetRange,s=n.getStartPosition();if(this._editor.setPosition(s,"inlineCompletions.jump"),n.isSingleLine()&&(e.inlineSuggestion.hint||e.inlineSuggestion.action?.kind==="edit"&&!e.inlineSuggestion.action.textReplacement.text.includes(` +`))||e.inlineSuggestion.action?.kind==="jumpTo")this._editor.revealPosition(s,0);else{const l=new a.Range(n.startLineNumber-1,1,n.endLineNumber+1,1);this._editor.revealRange(l,0)}e.inlineSuggestion.identity.setJumpTo(i),this._editor.focus()})}finally{t.removeRef()}}async handleInlineSuggestionShown(e,t,i,n){await e.reportInlineEditShown(this._commandService,t,i,this.textModel,n)}transplantCompletion(e){o.transaction(t=>{this._source.seedWithCompletion(e,t),this._isActive.set(!0,t),this._inAcceptFlow.set(!0,t),this.dontRefetchSignal.trigger(t)})}};Gu=gL([Jt(7,o.IInstantiationService),Jt(8,o.ICommandService),Jt(9,o.ILanguageConfigurationService),Jt(10,o.IAccessibilityService),Jt(11,o.ILanguageFeaturesService),Jt(12,o.ICodeEditorService),Jt(13,o.IInlineCompletionsService),Jt(14,o.IDefaultAccountService)],Gu);var Mt;(function(c){c[c.Undo=0]="Undo",c[c.Redo=1]="Redo",c[c.AcceptWord=2]="AcceptWord",c[c.Other=3]="Other"})(Mt||(Mt={}));function Zu(c,e,t){if(e.length===1)return[];const i=new o.TextModelText(c),n=i.getTransformer(),s=n.getOffset(e[0]),r=e.slice(1).map(p=>n.getOffset(p));t=t.removeCommonPrefixAndSuffix(i);const l=n.getStringReplacement(t),d=l.replaceRange.start-s,h=l.replaceRange.join(a.OffsetRange.emptyAt(s)),u=i.getValueOfOffsetRange(h);return r.map(p=>{const f=p+d,m=f+l.replaceRange.length,_=new a.OffsetRange(f,m),v=_.join(a.OffsetRange.emptyAt(p));if(i.getValueOfOffsetRange(v)!==u)return;const S=new a.StringReplacement(_,l.newText);return n.getTextReplacement(S)}).filter(a.isDefined)}class pL extends a.Disposable{constructor(e,t,i){super(),i&&this._register({dispose:()=>i()}),this._register(o.observableCodeEditor(e).setDecorations(o.constObservable(t.map(s=>({range:s,options:{description:"animation",className:"edits-fadeout-decoration",zIndex:1}})))));const n=new bE(Tu.startNow(1,0,1e3,vE));this._register(o.autorun(s=>{const r=n.getValue(s);e.getContainerDomNode().style.setProperty("--animation-opacity",r.toString()),n.isFinished(s)&&this.dispose()}))}}function xv(c,e,t=void 0){const i=e.targetRange;o.observableCodeEditor(c).scrollTop.read(t);const n=c.getVisibleRanges();return n.length<1?!1:new a.Range(n[0].startLineNumber,n[0].startColumn,n[n.length-1].endLineNumber,n[n.length-1].endColumn).containsRange(i)}function Ev(c){if(c?.entitlementsData?.access_type_sku&&c?.entitlementsData?.copilot_plan)return{type:c.entitlementsData.access_type_sku,plan:c.entitlementsData.copilot_plan}}class fL{constructor(e){this.handler=t=>this._cb?.(t),this._cb=e}dispose(){this._cb=void 0}}function mL(c,e){const t=new fL(c);return e.add(t),t.handler}var _L=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Lv=function(c,e){return function(t,i){e(t,i,c)}},ir;class Xu{constructor(e){this.name=e}select(e,t,i){if(i.length===0)return 0;const n=i[0].score[0];for(let s=0;sd&&g.type===i[h].completion.kind&&g.insertText===i[h].completion.insertText&&(d=g.touch,l=h),i[h].completion.preselect&&r===-1)return r=h}return l!==-1?l:r!==-1?r:0}toJSON(){return this._cache.toJSON()}fromJSON(e){this._cache.clear();const t=0;for(const[i,n]of e)n.touch=t,n.type=typeof n.type=="number"?n.type:a.CompletionItemKinds.fromString(n.type),this._cache.set(i,n);this._seq=this._cache.size}}class bL extends Xu{constructor(){super("recentlyUsedByPrefix"),this._trie=o.TernarySearchTree.forStrings(),this._seq=0}memorize(e,t,i){const{word:n}=e.getWordUntilPosition(t),s=`${e.getLanguageId()}/${n}`;this._trie.set(s,{type:i.completion.kind,insertText:i.completion.insertText,touch:this._seq++})}select(e,t,i){const{word:n}=e.getWordUntilPosition(t);if(!n)return super.select(e,t,i);const s=`${e.getLanguageId()}/${n}`;let r=this._trie.get(s);if(r||(r=this._trie.findSubstr(s)),r)for(let l=0;le.push([i,t])),e.sort((t,i)=>-(t[1].touch-i[1].touch)).forEach((t,i)=>t[1].touch=i),e.slice(0,200)}fromJSON(e){if(this._trie.clear(),e.length>0){this._seq=e[0][1].touch+1;for(const[t,i]of e)i.type=typeof i.type=="number"?i.type:a.CompletionItemKinds.fromString(i.type),this._trie.set(t,i)}}}let Yu=(Li=class{constructor(e,t){this._storageService=e,this._configService=t,this._disposables=new a.DisposableStore,this._persistSoon=new a.RunOnceScheduler(()=>this._saveState(),500),this._disposables.add(e.onWillSaveState(i=>{i.reason===o.WillSaveStateReason.SHUTDOWN&&this._saveState()}))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(e,t,i){this._withStrategy(e,t).memorize(e,t,i),this._persistSoon.schedule()}select(e,t,i){return this._withStrategy(e,t).select(e,t,i)}_withStrategy(e,t){const i=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:e.getLanguageIdAtPosition(t.lineNumber,t.column),resource:e.uri});if(this._strategy?.name!==i){this._saveState();const n=ir._strategyCtors.get(i)||Dv;this._strategy=new n;try{const r=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,l=this._storageService.get(`${ir._storagePrefix}/${i}`,r);l&&this._strategy.fromJSON(JSON.parse(l))}catch{}}return this._strategy}_saveState(){if(this._strategy){const t=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,i=JSON.stringify(this._strategy);this._storageService.store(`${ir._storagePrefix}/${this._strategy.name}`,i,t,1)}}},ir=Li,Li._strategyCtors=new Map([["recentlyUsedByPrefix",bL],["recentlyUsed",vL],["first",Dv]]),Li._storagePrefix="suggest/memories",Li);Yu=ir=_L([Lv(0,o.IStorageService),Lv(1,o.IConfigurationService)],Yu);const Sl=o.createDecorator("ISuggestMemories");o.registerSingleton(Sl,Yu,1);var CL=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},SL=function(c,e){return function(t,i){e(t,i,c)}},Qu;let yl=(Kn=class{constructor(e,t){this._editor=e,this._enabled=!1,this._ckAtEnd=Qu.AtEnd.bindTo(t),this._configListener=this._editor.onDidChangeConfiguration(i=>i.hasChanged(139)&&this._update()),this._update()}dispose(){this._configListener.dispose(),this._selectionListener?.dispose(),this._ckAtEnd.reset()}_update(){const e=this._editor.getOption(139)==="on";if(this._enabled!==e)if(this._enabled=e,this._enabled){const t=()=>{if(!this._editor.hasModel()){this._ckAtEnd.set(!1);return}const i=this._editor.getModel(),n=this._editor.getSelection(),s=i.getWordAtPosition(n.getStartPosition());if(!s){this._ckAtEnd.set(!1);return}this._ckAtEnd.set(s.endColumn===n.getStartPosition().column&&n.getStartPosition().lineNumber===n.getEndPosition().lineNumber)};this._selectionListener=this._editor.onDidChangeCursorSelection(t),t()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}},Qu=Kn,Kn.AtEnd=new o.RawContextKey("atEndOfWord",!1,{type:"boolean",description:a.localize(1546,"A context key that is true when at the end of a word. Note that this is only defined when tab-completions are enabled")}),Kn);yl=Qu=CL([SL(1,o.IContextKeyService)],yl);var yL=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},wL=function(c,e){return function(t,i){e(t,i,c)}},nr;let Ms=(Un=class{constructor(e,t){this._editor=e,this._index=0,this._ckOtherSuggestions=nr.OtherSuggestions.bindTo(t)}dispose(){this.reset()}reset(){this._ckOtherSuggestions.reset(),this._listener?.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:e,index:t},i){if(e.items.length===0){this.reset();return}if(nr._moveIndex(!0,e,t)===t){this.reset();return}this._acceptNext=i,this._model=e,this._index=t,this._listener=this._editor.onDidChangeCursorPosition(()=>{this._ignore||this.reset()}),this._ckOtherSuggestions.set(!0)}static _moveIndex(e,t,i){let n=i;for(let s=t.items.length;s>0&&(n=(n+t.items.length+(e?1:-1))%t.items.length,!(n===i||!t.items[n].completion.additionalTextEdits));s--);return n}next(){this._move(!0)}prev(){this._move(!1)}_move(e){if(this._model)try{this._ignore=!0,this._index=nr._moveIndex(e,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}},nr=Un,Un.OtherSuggestions=new o.RawContextKey("hasOtherSuggestions",!1),Un);Ms=nr=yL([wL(1,o.IContextKeyService)],Ms);class IL{constructor(e,t,i,n){this._disposables=new a.DisposableStore,this._disposables.add(i.onDidSuggest(s=>{s.completionModel.items.length===0&&this.reset()})),this._disposables.add(i.onDidCancel(s=>{this.reset()})),this._disposables.add(t.onDidShow(()=>this._onItem(t.getFocusedItem()))),this._disposables.add(t.onDidFocus(this._onItem,this)),this._disposables.add(t.onDidHide(this.reset,this)),this._disposables.add(e.onWillType(s=>{if(this._active&&!t.isFrozen()&&i.state!==0){const r=s.charCodeAt(s.length-1);this._active.acceptCharacters.has(r)&&e.getOption(0)&&n(this._active.item)}}))}_onItem(e){if(!e||!a.isNonEmptyArray(e.item.completion.commitCharacters)){this.reset();return}if(this._active&&this._active.item.item===e.item)return;const t=new a.CharacterSet;for(const i of e.item.completion.commitCharacters)i.length>0&&t.add(i.charCodeAt(0));this._active={acceptCharacters:t,item:e}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}let Rv=class{constructor(e,t){this.leadingLineContent=e,this.characterCountDelta=t}};class Wt{constructor(e,t,i,n,s,r,l=o.FuzzyScoreOptions.default,d=void 0){this.clipboardText=d,this._snippetCompareFn=Wt._compareCompletionItems,this._items=e,this._column=t,this._wordDistance=n,this._options=s,this._refilterKind=1,this._lineContext=i,this._fuzzyScoreOptions=l,r==="top"?this._snippetCompareFn=Wt._compareCompletionItemsSnippetsUp:r==="bottom"&&(this._snippetCompareFn=Wt._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(e){(this._lineContext.leadingLineContent!==e.leadingLineContent||this._lineContext.characterCountDelta!==e.characterCountDelta)&&(this._refilterKind=this._lineContext.characterCountDelta0&&i[0].container.incomplete&&e.add(t);return e}get stats(){return this._ensureCachedState(),this._stats}_ensureCachedState(){this._refilterKind!==0&&this._createCachedState()}_createCachedState(){this._itemsByProvider=new Map;const e=[],{leadingLineContent:t,characterCountDelta:i}=this._lineContext;let n="",s="";const r=this._refilterKind===1?this._items:this._filteredItems,l=[],d=!this._options.filterGraceful||r.length>2e3?o.fuzzyScore:o.fuzzyScoreGracefulAggressive;for(let h=0;h=f)u.score=o.FuzzyScore.Default;else if(typeof u.completion.filterText=="string"){const _=d(n,s,m,u.completion.filterText,u.filterTextLow,0,this._fuzzyScoreOptions);if(!_)continue;a.compareIgnoreCase(u.completion.filterText,u.textLabel)===0?u.score=_:(u.score=o.anyScore(n,s,m,u.textLabel,u.labelLow,0),u.score[0]=_[0])}else{const _=d(n,s,m,u.textLabel,u.labelLow,0,this._fuzzyScoreOptions);if(!_)continue;u.score=_}}u.idx=h,u.distance=this._wordDistance.distance(u.position,u.completion),l.push(u),e.push(u.textLabel.length)}this._filteredItems=l.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:e.length?a.quickSelect(e.length-.85,e,(h,u)=>h-u):0}}static _compareCompletionItems(e,t){return e.score[0]>t.score[0]?-1:e.score[0]t.distance?1:e.idxt.idx?1:0}static _compareCompletionItemsSnippetsDown(e,t){if(e.completion.kind!==t.completion.kind){if(e.completion.kind===28)return 1;if(t.completion.kind===28)return-1}return Wt._compareCompletionItems(e,t)}static _compareCompletionItemsSnippetsUp(e,t){if(e.completion.kind!==t.completion.kind){if(e.completion.kind===28)return-1;if(t.completion.kind===28)return 1}return Wt._compareCompletionItems(e,t)}}const Te=class Te{async provideSelectionRanges(e,t){const i=[];for(const n of t){const s=[];i.push(s);const r=new Map;await new Promise(l=>Te._bracketsRightYield(l,0,e,n,r)),await new Promise(l=>Te._bracketsLeftYield(l,0,e,n,r,s))}return i}static _bracketsRightYield(e,t,i,n,s){const r=new Map,l=Date.now();for(;;){if(t>=Te._maxRounds){e();break}if(!n){e();break}const d=i.bracketPairs.findNextBracket(n);if(!d){e();break}if(Date.now()-l>Te._maxDuration){setTimeout(()=>Te._bracketsRightYield(e,t+1,i,n,s));break}if(d.bracketInfo.isOpeningBracket){const u=d.bracketInfo.bracketText,g=r.has(u)?r.get(u):0;r.set(u,g+1)}else{const u=d.bracketInfo.getOpeningBrackets()[0].bracketText;let g=r.has(u)?r.get(u):0;if(g-=1,r.set(u,Math.max(0,g)),g<0){let p=s.get(u);p||(p=new a.LinkedList,s.set(u,p)),p.push(d.range)}}n=d.range.getEndPosition()}}static _bracketsLeftYield(e,t,i,n,s,r){const l=new Map,d=Date.now();for(;;){if(t>=Te._maxRounds&&s.size===0){e();break}if(!n){e();break}const h=i.bracketPairs.findPrevBracket(n);if(!h){e();break}if(Date.now()-d>Te._maxDuration){setTimeout(()=>Te._bracketsLeftYield(e,t+1,i,n,s,r));break}if(h.bracketInfo.isOpeningBracket){const g=h.bracketInfo.bracketText;let p=l.has(g)?l.get(g):0;if(p-=1,l.set(g,Math.max(0,p)),p<0){const f=s.get(g);if(f){const m=f.shift();f.size===0&&s.delete(g);const _=a.Range.fromPositions(h.range.getEndPosition(),m.getStartPosition()),v=a.Range.fromPositions(h.range.getStartPosition(),m.getEndPosition());r.push({range:_}),r.push({range:v}),Te._addBracketLeading(i,v,r)}}}else{const g=h.bracketInfo.getOpeningBrackets()[0].bracketText,p=l.has(g)?l.get(g):0;l.set(g,p+1)}n=h.range.getStartPosition()}}static _addBracketLeading(e,t,i){if(t.startLineNumber===t.endLineNumber)return;const n=t.startLineNumber,s=e.getLineFirstNonWhitespaceColumn(n);s!==0&&s!==t.startColumn&&(i.push({range:a.Range.fromPositions(new a.Position(n,s),t.getEndPosition())}),i.push({range:a.Range.fromPositions(new a.Position(n,1),t.getEndPosition())}));const r=n-1;if(r>0){const l=e.getLineFirstNonWhitespaceColumn(r);l===t.startColumn&&l!==e.getLineLastNonWhitespaceColumn(r)&&(i.push({range:a.Range.fromPositions(new a.Position(r,l),t.getEndPosition())}),i.push({range:a.Range.fromPositions(new a.Position(r,1),t.getEndPosition())}))}}};Te._maxDuration=30,Te._maxRounds=2;let wl=Te;const vt=class vt{static async create(e,t){if(!t.getOption(134).localityBonus||!t.hasModel())return vt.None;const i=t.getModel(),n=t.getPosition();if(!e.canComputeWordRanges(i.uri))return vt.None;const[s]=await new wl().provideSelectionRanges(i,[n]);if(s.length===0)return vt.None;const r=await e.computeWordRanges(i.uri,s[0].range);if(!r)return vt.None;const l=i.getWordUntilPosition(n);return delete r[l.word],new class extends vt{distance(d,h){if(!n.equals(t.getPosition()))return 0;if(h.kind===17)return 2<<20;const u=typeof h.label=="string"?h.label:h.label.label,g=r[u];if(a.isFalsyOrEmpty(g))return 2<<20;const p=a.binarySearch(g,a.Range.fromPositions(d),a.Range.compareRangesUsingStarts),f=p>=0?g[p]:g[Math.max(0,~p-1)];let m=s.length;for(const _ of s){if(!a.Range.containsRange(_.range,f))break;m-=1}return m}}}};vt.None=new class extends vt{distance(){return 0}};let Il=vt;var xL=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ht=function(c,e){return function(t,i){e(t,i,c)}},Ju;class ln{static shouldAutoTrigger(e){if(!e.hasModel())return!1;const t=e.getModel(),i=e.getPosition();t.tokenization.tokenizeIfCheap(i.lineNumber);const n=t.getWordAtPosition(i);return!(!n||n.endColumn!==i.column&&n.startColumn+1!==i.column||!isNaN(Number(n.word)))}constructor(e,t,i){this.leadingLineContent=e.getLineContent(t.lineNumber).substr(0,t.column-1),this.leadingWord=e.getWordUntilPosition(t),this.lineNumber=t.lineNumber,this.column=t.column,this.triggerOptions=i}}function EL(c,e,t){if(!e.getContextKeyValue(V.inlineSuggestionVisible.key))return!0;const i=e.getContextKeyValue(V.suppressSuggestions.key);return i!==void 0?!i:!c.getOption(71).suppressSuggestions}function LL(c,e,t){if(!e.getContextKeyValue("inlineSuggestionVisible"))return!0;const i=e.getContextKeyValue(V.suppressSuggestions.key);return i!==void 0?!i:!c.getOption(71).suppressSuggestions}let xl=Ju=class{constructor(e,t,i,n,s,r,l,d,h){this._editor=e,this._editorWorkerService=t,this._clipboardService=i,this._telemetryService=n,this._logService=s,this._contextKeyService=r,this._configurationService=l,this._languageFeaturesService=d,this._envService=h,this._toDispose=new a.DisposableStore,this._triggerCharacterListener=new a.DisposableStore,this._triggerQuickSuggest=new a.TimeoutTimer,this._triggerState=void 0,this._completionDisposables=new a.DisposableStore,this._onDidCancel=new a.Emitter,this._onDidTrigger=new a.Emitter,this._onDidSuggest=new a.Emitter,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._currentSelection=this._editor.getSelection()||new a.Selection(1,1,1,1),this._toDispose.add(this._editor.onDidChangeModel(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeModelLanguage(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeConfiguration(()=>{this._updateTriggerCharacters()})),this._toDispose.add(this._languageFeaturesService.completionProvider.onDidChange(()=>{this._updateTriggerCharacters(),this._updateActiveSuggestSession()}));let u=!1;this._toDispose.add(this._editor.onDidCompositionStart(()=>{u=!0})),this._toDispose.add(this._editor.onDidCompositionEnd(()=>{u=!1,this._onCompositionEnd()})),this._toDispose.add(this._editor.onDidChangeCursorSelection(g=>{u||this._onCursorChange(g)})),this._toDispose.add(this._editor.onDidChangeModelContent(()=>{!u&&this._triggerState!==void 0&&this._refilterCompletionItems()})),this._updateTriggerCharacters()}dispose(){a.dispose(this._triggerCharacterListener),a.dispose([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._waitForInlineCompletions?.dispose(),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(104)||!this._editor.hasModel()||!this._editor.getOption(137))return;const e=new Map;for(const i of this._languageFeaturesService.completionProvider.all(this._editor.getModel()))for(const n of i.triggerCharacters||[]){let s=e.get(n);s||(s=new Set,e.set(n,s)),s.add(i)}const t=i=>{if(!LL(this._editor,this._contextKeyService,this._configurationService)||ln.shouldAutoTrigger(this._editor))return;if(!i){const r=this._editor.getPosition();i=this._editor.getModel().getLineContent(r.lineNumber).substr(0,r.column-1)}let n="";a.isLowSurrogate(i.charCodeAt(i.length-1))?a.isHighSurrogate(i.charCodeAt(i.length-2))&&(n=i.substr(i.length-2)):n=i.charAt(i.length-1);const s=e.get(n);if(s){const r=new Map;if(this._completionModel)for(const[l,d]of this._completionModel.getItemsByProvider())s.has(l)||r.set(l,d);this.trigger({auto:!0,triggerKind:1,triggerCharacter:n,retrigger:!!this._completionModel,clipboardText:this._completionModel?.clipboardText,completionOptions:{providerFilter:s,providerItemsToReuse:r}})}};this._triggerCharacterListener.add(this._editor.onDidType(t)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(()=>t()))}get state(){return this._triggerState?this._triggerState.auto?2:1:0}cancel(e=!1){this._triggerQuickSuggest.cancel(),this._waitForInlineCompletions?.dispose(),this._waitForInlineCompletions=void 0,this._triggerState!==void 0&&(this._requestToken?.cancel(),this._requestToken=void 0,this._triggerState=void 0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:e}))}clear(){this._completionDisposables.clear()}_updateActiveSuggestSession(){this._triggerState!==void 0&&(!this._editor.hasModel()||!this._languageFeaturesService.completionProvider.has(this._editor.getModel())?this.cancel():this.trigger({auto:this._triggerState.auto,retrigger:!0}))}_onCursorChange(e){if(!this._editor.hasModel())return;const t=this._currentSelection;if(this._currentSelection=this._editor.getSelection(),!e.selection.isEmpty()||e.reason!==0&&e.reason!==3||e.source!=="keyboard"&&e.source!=="deleteLeft"){this.cancel();return}this._triggerState===void 0&&e.reason===0?(t.containsRange(this._currentSelection)||t.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))&&this._doTriggerQuickSuggest():this._triggerState!==void 0&&e.reason===3&&this._refilterCompletionItems()}_onCompositionEnd(){this._triggerState===void 0?this._doTriggerQuickSuggest():this._refilterCompletionItems()}_doTriggerQuickSuggest(){Es.isAllOff(this._editor.getOption(102))||this._editor.getOption(134).snippetsPreventQuickSuggestions&&ee.get(this._editor)?.isInSnippet()||(this.cancel(),this._waitForInlineCompletions?.dispose(),this._waitForInlineCompletions=void 0,this._triggerQuickSuggest.cancelAndSet(()=>{if(this._triggerState!==void 0||!ln.shouldAutoTrigger(this._editor)||!this._editor.hasModel()||!this._editor.hasWidgetFocus())return;const e=this._editor.getModel(),t=this._editor.getPosition(),i=this._editor.getOption(102);if(Es.isAllOff(i))return;let n=!1;if(!Es.isAllOn(i)){e.tokenization.tokenizeIfCheap(t.lineNumber);const s=e.tokenization.getLineTokens(t.lineNumber),r=s.getStandardTokenType(s.findTokenIndexAtOffset(Math.max(t.column-1-1,0))),l=Es.valueFor(i,r);if(l==="off"||l==="inline")return;l==="offWhenInlineCompletions"&&(n=this._languageFeaturesService.inlineCompletionsProvider.has(e)&&this._editor.getOption(71).enabled)}EL(this._editor,this._contextKeyService,this._configurationService)&&this._languageFeaturesService.completionProvider.has(e)&&(n?this._waitForInlineCompletionsAndTrigger(e,t):this.trigger({auto:!0}))},this._editor.getOption(103)))}_waitForInlineCompletionsAndTrigger(e,t){const i=e.getVersionId(),n=Iv(this._editor),s=n?.model.get();if(!n||!s){this.trigger({auto:!0});return}if(s.state.get()?.inlineSuggestion)return;const l=new a.DisposableStore;this._waitForInlineCompletions=l;const d=h=>{if(l.dispose(),this._waitForInlineCompletions===l&&(this._waitForInlineCompletions=void 0),this._triggerState!==void 0||!h)return;const u=this._editor.getModel(),g=this._editor.getPosition();u===e&&u.getVersionId()===i&&g?.equals(t)&&this._editor.hasWidgetFocus()&&this.trigger({auto:!0})};a.disposableTimeout(()=>{d(!0),s.stop("automatic")},750,l),l.add(o.autorun(h=>{if(n.model.read(h)!==s){d(!1);return}const g=s.status.read(h),p=s.state.read(h);!p&&g==="loading"||d(!p)}))}_refilterCompletionItems(){a.assertType(this._editor.hasModel()),a.assertType(this._triggerState!==void 0);const e=this._editor.getModel(),t=this._editor.getPosition(),i=new ln(e,t,{...this._triggerState,refilter:!0});this._onNewContext(i)}trigger(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=new ln(t,this._editor.getPosition(),e);this.cancel(e.retrigger),this._triggerState=e,this._onDidTrigger.fire({auto:e.auto,shy:e.shy??!1,position:this._editor.getPosition()}),this._context=i;let n={triggerKind:e.triggerKind??0};e.triggerCharacter&&(n={triggerKind:1,triggerCharacter:e.triggerCharacter}),this._requestToken=new a.CancellationTokenSource;const s=this._editor.getOption(128);let r=1;switch(s){case"top":r=0;break;case"bottom":r=2;break}const{itemKind:l,showDeprecated:d}=Ju.createSuggestFilter(this._editor),h=new Ko(r,e.completionOptions?.kindFilter??l,e.completionOptions?.providerFilter,e.completionOptions?.providerItemsToReuse,d),u=Il.create(this._editorWorkerService,this._editor),g=bu(this._languageFeaturesService.completionProvider,t,this._editor.getPosition(),h,n,this._requestToken.token);Promise.all([g,u]).then(async([p,f])=>{if(this._requestToken?.dispose(),!this._editor.hasModel()){p.disposable.dispose();return}let m=e?.clipboardText;if(!m&&p.needsClipboard&&(m=await this._clipboardService.readText()),this._triggerState===void 0){p.disposable.dispose();return}const _=this._editor.getModel(),v=new ln(_,this._editor.getPosition(),e),b={...o.FuzzyScoreOptions.default,firstMatchCanBeWeak:!this._editor.getOption(134).matchOnWordStartOnly};if(this._completionModel=new Wt(p.items,this._context.column,{leadingLineContent:v.leadingLineContent,characterCountDelta:v.column-this._context.column},f,this._editor.getOption(134),this._editor.getOption(128),b,m),this._completionDisposables.add(p.disposable),this._onNewContext(v),this._reportDurationsTelemetry(p.durations),!this._envService.isBuilt||this._envService.isExtensionDevelopment)for(const S of p.items)S.isInvalid&&this._logService.warn(`[suggest] did IGNORE invalid completion item from ${S.provider._debugDisplayName}`,S.completion)}).catch(a.onUnexpectedError)}_reportDurationsTelemetry(e){Math.random()>1e-4||setTimeout(()=>{this._telemetryService.publicLog2("suggest.durations.json",{data:JSON.stringify(e)}),this._logService.debug("suggest.durations.json",e)})}static createSuggestFilter(e){const t=new Set;e.getOption(128)==="none"&&t.add(28);const n=e.getOption(134);return n.showMethods||t.add(0),n.showFunctions||t.add(1),n.showConstructors||t.add(2),n.showFields||t.add(3),n.showVariables||t.add(4),n.showClasses||t.add(5),n.showStructs||t.add(6),n.showInterfaces||t.add(7),n.showModules||t.add(8),n.showProperties||t.add(9),n.showEvents||t.add(10),n.showOperators||t.add(11),n.showUnits||t.add(12),n.showValues||t.add(13),n.showConstants||t.add(14),n.showEnums||t.add(15),n.showEnumMembers||t.add(16),n.showKeywords||t.add(17),n.showWords||t.add(18),n.showColors||t.add(19),n.showFiles||t.add(20),n.showReferences||t.add(21),n.showColors||t.add(22),n.showFolders||t.add(23),n.showTypeParameters||t.add(24),n.showSnippets||t.add(28),n.showUsers||t.add(25),n.showIssues||t.add(26),{itemKind:t,showDeprecated:n.showDeprecated}}_onNewContext(e){if(this._context){if(e.lineNumber!==this._context.lineNumber){this.cancel();return}if(a.getLeadingWhitespace(e.leadingLineContent)!==a.getLeadingWhitespace(this._context.leadingLineContent)){this.cancel();return}if(e.columnthis._context.leadingWord.startColumn){if(ln.shouldAutoTrigger(this._editor)&&this._context){const i=this._completionModel.getItemsByProvider();this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerItemsToReuse:i}})}return}if(e.column>this._context.column&&this._completionModel.getIncompleteProvider().size>0&&e.leadingWord.word.length!==0){const t=new Map,i=new Set;for(const[n,s]of this._completionModel.getItemsByProvider())s.length>0&&s[0].container.incomplete?i.add(n):t.set(n,s);this.trigger({auto:this._context.triggerOptions.auto,triggerKind:2,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerFilter:i,providerItemsToReuse:t}})}else{const t=this._completionModel.lineContext;let i=!1;if(this._completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},this._completionModel.items.length===0){const n=ln.shouldAutoTrigger(this._editor);if(!this._context){this.cancel();return}if(n&&this._context.leadingWord.endColumn0,i&&e.leadingWord.word.length===0){this.cancel();return}}this._onDidSuggest.fire({completionModel:this._completionModel,triggerOptions:e.triggerOptions,isFrozen:i})}}}}};xl=Ju=xL([Ht(1,o.IEditorWorkerService),Ht(2,o.IClipboardService),Ht(3,o.ITelemetryService),Ht(4,o.ILogService),Ht(5,o.IContextKeyService),Ht(6,o.IConfigurationService),Ht(7,o.ILanguageFeaturesService),Ht(8,o.IEnvironmentService)],xl);const zc=class zc{constructor(e,t){this._disposables=new a.DisposableStore,this._lastOvertyped=[],this._locked=!1,this._disposables.add(e.onWillType(()=>{if(this._locked||!e.hasModel())return;const i=e.getSelections(),n=i.length;let s=!1;for(let l=0;lzc._maxSelectionLength)return;this._lastOvertyped[l]={value:r.getValueInRange(d),multiline:d.startLineNumber!==d.endLineNumber}}})),this._disposables.add(t.onDidTrigger(i=>{this._locked=!0})),this._disposables.add(t.onDidCancel(i=>{this._locked=!1}))}getLastOvertypedInfo(e){if(e>=0&&e=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Hu=function(c,e){return function(t,i){e(t,i,c)}};let eg=class{constructor(e,t,i,n,s,r){this._menuId=t,this._menuService=s,this._contextKeyService=r,this._menuDisposables=new a.DisposableStore,this.element=o.append(e,o.$(".suggest-status-bar"));const l=(d=>i?.showIconsNoKeybindings?d instanceof o.MenuItemAction?n.createInstance(o.MenuEntryActionViewItem,d,void 0):void 0:d instanceof o.MenuItemAction?n.createInstance(o.TextOnlyMenuEntryActionViewItem,d,{useComma:!1}):void 0);this._leftActions=new o.ActionBar(this.element,{actionViewItemProvider:l}),this._rightActions=new o.ActionBar(this.element,{actionViewItemProvider:l}),this._leftActions.domNode.classList.add("left"),this._rightActions.domNode.classList.add("right")}dispose(){this._menuDisposables.dispose(),this._leftActions.dispose(),this._rightActions.dispose(),this.element.remove()}show(){const e=this._menuService.createMenu(this._menuId,this._contextKeyService),t=()=>{const i=[],n=[];for(const[s,r]of e.getActions())s==="left"?i.push(...r):n.push(...r);this._leftActions.clear(),this._leftActions.push(i),this._rightActions.clear(),this._rightActions.push(n)};this._menuDisposables.add(e.onDidChange(()=>t())),this._menuDisposables.add(e)}hide(){this._menuDisposables.clear()}};eg=DL([Hu(3,o.IInstantiationService),Hu(4,o.IMenuService),Hu(5,o.IContextKeyService)],eg);var RL=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Tv=function(c,e){return function(t,i){e(t,i,c)}};function tg(c){return!!c&&!!(c.completion.documentation||c.completion.detail&&c.completion.detail!==c.completion.label)}let ig=class{constructor(e,t,i){this._editor=e,this._themeService=t,this._markdownRendererService=i,this._onDidClose=new a.Emitter,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new a.Emitter,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new a.DisposableStore,this._renderDisposeable=new a.DisposableStore,this._size=new o.Dimension(330,0),this.domNode=o.$(".suggest-details"),this.domNode.classList.add("no-docs"),this._body=o.$(".body"),this._scrollbar=new o.DomScrollableElement(this._body,{alwaysConsumeMouseWheel:!0}),o.append(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=o.append(this._body,o.$(".header")),this._close=o.append(this._header,o.$("span"+o.ThemeIcon.asCSSSelector(a.Codicon.close))),this._close.title=a.localize(1542,"Close"),this._close.role="button",this._close.tabIndex=-1,this._type=o.append(this._header,o.$("p.type")),this._docs=o.append(this._body,o.$("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(59)&&this._configureFont()}))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose(),this._onDidClose.dispose(),this._onDidChangeContents.dispose()}_configureFont(){const e=this._editor.getOptions(),t=e.get(59),i=t.getMassagedFontFamily(),n=e.get(135)||t.fontSize,s=e.get(136)||t.lineHeight,r=t.fontWeight,l=`${n}px`,d=`${s}px`;this.domNode.style.fontSize=l,this.domNode.style.lineHeight=`${s/n}`,this.domNode.style.fontWeight=r,this.domNode.style.fontFeatureSettings=t.fontFeatureSettings,this._type.style.fontFamily=i,this._close.style.height=d,this._close.style.width=d}getLayoutInfo(){const e=this._editor.getOption(136)||this._editor.getOption(59).lineHeight,t=o.isHighContrast(this._themeService.getColorTheme().type)?2:1,i=t*2;return{lineHeight:e,borderWidth:t,borderHeight:i,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=a.localize(1543,"Loading..."),this._docs.textContent="",this.domNode.classList.remove("no-docs","no-type"),this.layout(this.size.width,this.getLayoutInfo().lineHeight*2),this._onDidChangeContents.fire(this)}renderItem(e,t){this._renderDisposeable.clear();let{detail:i,documentation:n}=e.completion;if(t){let s="";s+=`score: ${e.score[0]} +`,s+=`prefix: ${e.word??"(no prefix)"} +`,s+=`word: ${e.completion.filterText?e.completion.filterText+" (filterText)":e.textLabel} +`,s+=`distance: ${e.distance} (localityBonus-setting) +`,s+=`index: ${e.idx}, based on ${e.completion.sortText&&`sortText: "${e.completion.sortText}"`||"label"} +`,s+=`commit_chars: ${e.completion.commitCharacters?.join("")} +`,n=new o.MarkdownString().appendCodeblock("empty",s),i=`Provider: ${e.provider._debugDisplayName}`}if(!t&&!tg(e)){this.clearContents();return}if(this.domNode.classList.remove("no-docs","no-type"),i){const s=i.length>1e5?`${i.substr(0,1e5)}…`:i;this._type.textContent=s,this._type.title=s,o.show(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gmi.test(s))}else o.clearNode(this._type),this._type.title="",o.hide(this._type),this.domNode.classList.add("no-type");if(o.clearNode(this._docs),typeof n=="string")this._docs.classList.remove("markdown-docs"),this._docs.textContent=n;else if(n){this._docs.classList.add("markdown-docs"),o.clearNode(this._docs);const s=this._markdownRendererService.render(n,{context:this._editor,asyncRenderCallback:()=>{this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}});this._docs.appendChild(s.element),this._renderDisposeable.add(s)}this.domNode.classList.toggle("detail-and-doc",!!i&&!!n),this.domNode.style.userSelect="text",this.domNode.tabIndex=-1,this._close.onmousedown=s=>{s.preventDefault(),s.stopPropagation()},this._close.onclick=s=>{s.preventDefault(),s.stopPropagation(),this._onDidClose.fire()},this._body.scrollTop=0,this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}clearContents(){this.domNode.classList.add("no-docs"),this._type.textContent="",this._docs.textContent=""}get isEmpty(){return this.domNode.classList.contains("no-docs")}get size(){return this._size}layout(e,t){const i=new o.Dimension(e,t);o.Dimension.equals(i,this._size)||(this._size=i,o.size(this.domNode,e,t)),this._scrollbar.scanDomNode()}scrollDown(e=8){this._body.scrollTop+=e}scrollUp(e=8){this._body.scrollTop-=e}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}focus(){this.domNode.focus()}};ig=RL([Tv(1,o.IThemeService),Tv(2,o.IMarkdownRendererService)],ig);class TL{constructor(e,t){this.widget=e,this._editor=t,this.allowEditorOverflow=!0,this._disposables=new a.DisposableStore,this._added=!1,this._preferAlignAtTop=!0,this._resizable=new sh,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(e.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let i,n,s=0,r=0;this._disposables.add(this._resizable.onDidWillResize(()=>{i=this._topLeft,n=this._resizable.size})),this._disposables.add(this._resizable.onDidResize(l=>{if(i&&n){this.widget.layout(l.dimension.width,l.dimension.height);let d=!1;l.west&&(r=n.width-l.dimension.width,d=!0),l.north&&(s=n.height-l.dimension.height,d=!0),d&&this._applyTopLeft({top:i.top+s,left:i.left+r})}l.done&&(i=void 0,n=void 0,s=0,r=0,this._userSize=l.dimension)})),this._disposables.add(this.widget.onDidChangeContents(()=>{this._anchorBox&&this._placeAtAnchor(this._anchorBox,this._userSize??this.widget.size,this._preferAlignAtTop)}))}dispose(){this._resizable.dispose(),this._disposables.dispose(),this.hide()}getId(){return"suggest.details"}getDomNode(){return this._resizable.domNode}getPosition(){return this._topLeft?{preference:this._topLeft}:null}show(){this._added||(this._editor.addOverlayWidget(this),this._added=!0)}hide(e=!1){this._resizable.clearSashHoverState(),this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),e&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(e,t){const i=e.getBoundingClientRect();this._anchorBox=i,this._preferAlignAtTop=t,this._placeAtAnchor(this._anchorBox,this._userSize??this.widget.size,t)}_placeAtAnchor(e,t,i){const n=o.getClientArea(this.getDomNode().ownerDocument.body),s=this.widget.getLayoutInfo(),r=new o.Dimension(220,2*s.lineHeight),l=e.top,d=(function(){const x=n.width-(e.left+e.width+s.borderWidth+s.horizontalPadding),L=-s.borderWidth+e.left+e.width,E=new o.Dimension(x,n.height-e.top-s.borderHeight-s.verticalPadding),R=E.with(void 0,e.top+e.height-s.borderHeight-s.verticalPadding);return{top:l,left:L,fit:x-t.width,maxSizeTop:E,maxSizeBottom:R,minSize:r.with(Math.min(x,r.width))}})(),h=(function(){const x=e.left-s.borderWidth-s.horizontalPadding,L=Math.max(s.horizontalPadding,e.left-t.width-s.borderWidth),E=new o.Dimension(x,n.height-e.top-s.borderHeight-s.verticalPadding),R=E.with(void 0,e.top+e.height-s.borderHeight-s.verticalPadding);return{top:l,left:L,fit:x-t.width,maxSizeTop:E,maxSizeBottom:R,minSize:r.with(Math.min(x,r.width))}})(),u=(function(){const x=e.left,L=-s.borderWidth+e.top+e.height,E=new o.Dimension(e.width-s.borderHeight,n.height-e.top-e.height-s.verticalPadding);return{top:L,left:x,fit:E.height-t.height,maxSizeBottom:E,maxSizeTop:E,minSize:r.with(E.width)}})(),g=(function(){const x=e.left,L=new o.Dimension(e.width-s.borderHeight,e.top-s.verticalPadding);return{top:Math.max(s.verticalPadding,e.top-t.height),left:x,fit:L.height-t.height,maxSizeTop:L,maxSizeBottom:L,minSize:r.with(L.width)}})(),f=[d,h,i?u:g],m=f.find(x=>x.fit>=0)??f.sort((x,L)=>L.fit-x.fit)[0],_=e.top+e.height-s.borderHeight;let v,b=t.height;const S=Math.max(m.maxSizeTop.height,m.maxSizeBottom.height);b>S&&(b=S);let w;i?b<=m.maxSizeTop.height?(v=!0,w=m.maxSizeTop):(v=!1,w=m.maxSizeBottom):b<=m.maxSizeBottom.height?(v=!1,w=m.maxSizeBottom):(v=!0,w=m.maxSizeTop);let{top:I,left:C}=m;m===g?I=e.top-b+s.borderWidth:!v&&b>e.height&&(I=_-b);const y=this._editor.getDomNode();if(y){const x=y.getBoundingClientRect();I-=x.top,C-=x.left}this._applyTopLeft({left:C,top:I}),m===g?this._resizable.enableSashes(!0,!1,!1,!0):this._resizable.enableSashes(!v,m===d,v,m!==d),this._resizable.minSize=m.minSize,this._resizable.maxSize=w,this._resizable.layout(b,Math.min(w.width,t.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}_applyTopLeft(e){this._topLeft=e,this._editor.layoutOverlayWidget(this)}}const Nv=o.createDecorator("fileService");var Qe;(function(c){c[c.FILE=0]="FILE",c[c.FOLDER=1]="FOLDER",c[c.ROOT_FOLDER=2]="ROOT_FOLDER"})(Qe||(Qe={}));const NL=/(?:\/|^)(?:([^\/]+)\/)?([^\/]+)$/;function sr(c,e,t,i,n){if(o.ThemeIcon.isThemeIcon(n))return[`codicon-${n.id}`,"predefined-file-icon"];if(a.URI.isUri(n))return[];const s=i===Qe.ROOT_FOLDER?["rootfolder-icon"]:i===Qe.FOLDER?["folder-icon"]:["file-icon"];if(t){let r;if(t.scheme===a.Schemas.data)r=o.DataUri.parseMetaData(t).get(o.DataUri.META_DATA_LABEL);else{const l=t.path.match(NL);l?(r=El(l[2].toLowerCase()),l[1]&&s.push(`${El(l[1].toLowerCase())}-name-dir-icon`)):r=El(t.authority.toLowerCase())}if(i===Qe.ROOT_FOLDER)s.push(`${r}-root-name-folder-icon`);else if(i===Qe.FOLDER)s.push(`${r}-name-folder-icon`);else{if(r){if(s.push(`${r}-name-file-icon`),s.push("name-file-icon"),r.length<=255){const d=r.split(".");for(let h=1;h=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ng=function(c,e){return function(t,i){e(t,i,c)}};const OL=o.registerIcon("suggest-more-info",a.Codicon.chevronRight,a.localize(1544,"Icon for more information in the suggest widget.")),AL=new(tt=class{extract(e,t){if(e.textLabel.match(tt._regexStrict))return t[0]=e.textLabel,!0;if(e.completion.detail&&e.completion.detail.match(tt._regexStrict))return t[0]=e.completion.detail,!0;if(e.completion.documentation){const i=typeof e.completion.documentation=="string"?e.completion.documentation:e.completion.documentation.value,n=tt._regexRelaxed.exec(i);if(n&&(n.index===0||n.index+n[0].length===i.length))return t[0]=n[0],!0}return!1}},tt._regexRelaxed=/(#([\da-fA-F]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))/,tt._regexStrict=new RegExp(`^${tt._regexRelaxed.source}$`,"i"),tt);let sg=class{constructor(e,t,i,n){this._editor=e,this._modelService=t,this._languageService=i,this._themeService=n,this._onDidToggleDetails=new a.Emitter,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(e){const t=new a.DisposableStore,i=e;i.classList.add("show-file-icons");const n=o.append(e,o.$(".icon")),s=o.append(n,o.$("span.colorspan")),r=o.append(e,o.$(".contents")),l=o.append(r,o.$(".main")),d=o.append(l,o.$(".icon-label.codicon")),h=o.append(l,o.$("span.left")),u=o.append(l,o.$("span.right")),g=new o.IconLabel(h,{supportHighlights:!0,supportIcons:!0});t.add(g);const p=o.append(h,o.$("span.signature-label")),f=o.append(h,o.$("span.qualifier-label")),m=o.append(u,o.$("span.details-label")),_=o.append(u,o.$("span.readMore"+o.ThemeIcon.asCSSSelector(OL)));return _.title=a.localize(1545,"Read More"),{root:i,left:h,right:u,icon:n,colorspan:s,iconLabel:g,iconContainer:d,parametersLabel:p,qualifierLabel:f,detailsLabel:m,readMore:_,disposables:t,configureFont:()=>{const b=this._editor.getOptions(),S=b.get(59),w=S.getMassagedFontFamily(),I=S.fontFeatureSettings,C=S.fontVariationSettings,y=b.get(135)||S.fontSize,x=b.get(136)||S.lineHeight,L=S.fontWeight,E=S.letterSpacing,R=`${y}px`,D=`${x}px`,T=`${E}px`;i.style.fontSize=R,i.style.fontWeight=L,i.style.letterSpacing=T,l.style.fontFamily=w,l.style.fontFeatureSettings=I,l.style.fontVariationSettings=C,l.style.lineHeight=D,n.style.height=D,n.style.width=D,_.style.height=D,_.style.width=D}}}renderElement(e,t,i){i.configureFont();const{completion:n}=e;i.colorspan.style.backgroundColor="";const s={labelEscapeNewLines:!0,matches:o.createMatches(e.score)},r=[];if(n.kind===19&&AL.extract(e,r))i.icon.className="icon customcolor",i.iconContainer.className="icon hide",i.colorspan.style.backgroundColor=r[0];else if(n.kind===20&&this._themeService.getFileIconTheme().hasFileIcons){i.icon.className="icon hide",i.iconContainer.className="icon hide";const l=sr(this._modelService,this._languageService,a.URI.from({scheme:"fake",path:e.textLabel}),Qe.FILE),d=sr(this._modelService,this._languageService,a.URI.from({scheme:"fake",path:n.detail}),Qe.FILE);s.extraClasses=l.length>d.length?l:d}else n.kind===23&&this._themeService.getFileIconTheme().hasFolderIcons?(i.icon.className="icon hide",i.iconContainer.className="icon hide",s.extraClasses=[sr(this._modelService,this._languageService,a.URI.from({scheme:"fake",path:e.textLabel}),Qe.FOLDER),sr(this._modelService,this._languageService,a.URI.from({scheme:"fake",path:n.detail}),Qe.FOLDER)].flat()):(i.icon.className="icon hide",i.iconContainer.className="",i.iconContainer.classList.add("suggest-icon",...o.ThemeIcon.asClassNameArray(a.CompletionItemKinds.toIcon(n.kind))));n.tags&&n.tags.indexOf(1)>=0&&(s.extraClasses=(s.extraClasses||[]).concat(["deprecated"]),s.matches=[]),i.iconLabel.setLabel(e.textLabel,void 0,s),typeof n.label=="string"?(i.parametersLabel.textContent="",i.detailsLabel.textContent=og(n.detail||""),i.root.classList.add("string-label")):(i.parametersLabel.textContent=og(n.label.detail||""),i.detailsLabel.textContent=og(n.label.description||""),i.root.classList.remove("string-label")),this._editor.getOption(134).showInlineDetails?o.show(i.detailsLabel):o.hide(i.detailsLabel),tg(e)?(i.right.classList.add("can-expand-details"),o.show(i.readMore),i.readMore.onmousedown=l=>{l.stopPropagation(),l.preventDefault()},i.readMore.onclick=l=>{l.stopPropagation(),l.preventDefault(),this._onDidToggleDetails.fire()}):(i.right.classList.remove("can-expand-details"),o.hide(i.readMore),i.readMore.onmousedown=null,i.readMore.onclick=null)}disposeTemplate(e){e.disposables.dispose()}};sg=PL([ng(1,o.IModelService),ng(2,o.ILanguageService),ng(3,o.IThemeService)],sg);function og(c){return c.replace(/\r\n|\r|\n/g,"")}var FL=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ll=function(c,e){return function(t,i){e(t,i,c)}},Ps;o.registerColor("editorSuggestWidget.background",o.editorWidgetBackground,a.localize(1525,"Background color of the suggest widget.")),o.registerColor("editorSuggestWidget.border",o.editorWidgetBorder,a.localize(1526,"Border color of the suggest widget."));const zL=o.registerColor("editorSuggestWidget.foreground",o.editorForeground,a.localize(1527,"Foreground color of the suggest widget."));o.registerColor("editorSuggestWidget.selectedForeground",o.quickInputListFocusForeground,a.localize(1528,"Foreground color of the selected entry in the suggest widget.")),o.registerColor("editorSuggestWidget.selectedIconForeground",o.quickInputListFocusIconForeground,a.localize(1529,"Icon foreground color of the selected entry in the suggest widget."));const VL=o.registerColor("editorSuggestWidget.selectedBackground",o.quickInputListFocusBackground,a.localize(1530,"Background color of the selected entry in the suggest widget."));o.registerColor("editorSuggestWidget.highlightForeground",o.listHighlightForeground,a.localize(1531,"Color of the match highlights in the suggest widget.")),o.registerColor("editorSuggestWidget.focusHighlightForeground",o.listFocusHighlightForeground,a.localize(1532,"Color of the match highlights in the suggest widget when an item is focused.")),o.registerColor("editorSuggestWidgetStatus.foreground",o.transparent(zL,.5),a.localize(1533,"Foreground color of the suggest widget status."));class BL{constructor(e,t){this._service=e,this._key=`suggestWidget.size/${t.getEditorType()}/${t instanceof ct}`}restore(){const e=this._service.get(this._key,0)??"";try{const t=JSON.parse(e);if(o.Dimension.is(t))return o.Dimension.lift(t)}catch{}}store(e){this._service.store(this._key,JSON.stringify(e),0,1)}reset(){this._service.remove(this._key,0)}}let rg=(Di=class{constructor(e,t,i,n,s){this.editor=e,this._storageService=t,this._state=0,this._isAuto=!1,this._loadingTimeout=new a.MutableDisposable,this._pendingLayout=new a.MutableDisposable,this._pendingShowDetails=new a.MutableDisposable,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new a.TimeoutTimer,this._disposables=new a.DisposableStore,this._onDidSelect=new a.PauseableEmitter,this._onDidFocus=new a.PauseableEmitter,this._onDidHide=new a.Emitter,this._onDidShow=new a.Emitter,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new a.Emitter,this.element=new sh,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new KL(this,e),this._persistedSize=new BL(t,e);class r{constructor(m,_,v=!1,b=!1){this.persistedSize=m,this.currentSize=_,this.persistHeight=v,this.persistWidth=b}}let l;this._disposables.add(this.element.onDidWillResize(()=>{this._contentWidget.lockPreference(),l=new r(this._persistedSize.restore(),this.element.size)})),this._disposables.add(this.element.onDidResize(f=>{if(this._resize(f.dimension.width,f.dimension.height),l&&(l.persistHeight=l.persistHeight||!!f.north||!!f.south,l.persistWidth=l.persistWidth||!!f.east||!!f.west),!!f.done){if(l){const{itemHeight:m,defaultSize:_}=this.getLayoutInfo(),v=Math.round(m/2);let{width:b,height:S}=this.element.size;(!l.persistHeight||Math.abs(l.currentSize.height-S)<=v)&&(S=l.persistedSize?.height??_.height),(!l.persistWidth||Math.abs(l.currentSize.width-b)<=v)&&(b=l.persistedSize?.width??_.width),this._persistedSize.store(new o.Dimension(b,S))}this._contentWidget.unlockPreference(),l=void 0}})),this._messageElement=o.append(this.element.domNode,o.$(".message")),this._listElement=o.append(this.element.domNode,o.$(".tree"));const d=this._disposables.add(s.createInstance(ig,this.editor));d.onDidClose(()=>this.toggleDetails(),this,this._disposables),this._details=new TL(d,this.editor);const h=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(134).showIcons);h();const u=s.createInstance(sg,this.editor);this._disposables.add(u),this._disposables.add(u.onDidToggleDetails(()=>this.toggleDetails())),this._list=new o.List("SuggestWidget",this._listElement,{getHeight:f=>this.getLayoutInfo().itemHeight,getTemplateId:f=>"suggestion"},[u],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,multipleSelectionSupport:!1,accessibilityProvider:{getRole:()=>a.isWindows?"listitem":"option",getWidgetAriaLabel:()=>a.localize(1536,"Suggest"),getWidgetRole:()=>"listbox",getAriaLabel:f=>{let m=f.textLabel;const _=a.CompletionItemKinds.toLabel(f.completion.kind);if(typeof f.completion.label!="string"){const{detail:w,description:I}=f.completion.label;w&&I?m=a.localize(1537,"{0} {1}, {2}, {3}",m,w,I,_):w?m=a.localize(1538,"{0} {1}, {2}",m,w,_):I&&(m=a.localize(1539,"{0}, {1}, {2}",m,I,_))}else m=a.localize(1540,"{0}, {1}",m,_);if(!f.isResolved||!this._isDetailsVisible())return m;const{documentation:v,detail:b}=f.completion,S=a.format("{0}{1}",b||"",v?typeof v=="string"?v:v.value:"");return a.localize(1541,"{0}, docs: {1}",m,S)}}}),this._list.style(o.getListStyles({listInactiveFocusBackground:VL,listInactiveFocusOutline:o.activeContrastBorder})),this._status=s.createInstance(eg,this.element.domNode,Tt,void 0);const g=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(134).showStatusBar);g(),this._disposables.add(this._list.onMouseDown(f=>this._onListMouseDownOrTap(f))),this._disposables.add(this._list.onTap(f=>this._onListMouseDownOrTap(f))),this._disposables.add(this._list.onDidChangeSelection(f=>this._onListSelection(f))),this._disposables.add(this._list.onDidChangeFocus(f=>this._onListFocus(f))),this._disposables.add(this.editor.onDidChangeCursorSelection(()=>this._onCursorSelectionChanged())),this._disposables.add(this.editor.onDidChangeConfiguration(f=>{f.hasChanged(134)&&(g(),h()),this._completionModel&&(f.hasChanged(59)||f.hasChanged(135)||f.hasChanged(136))&&this._list.splice(0,this._list.length,this._completionModel.items)})),this._ctxSuggestWidgetVisible=N.Visible.bindTo(i),this._ctxSuggestWidgetDetailsVisible=N.DetailsVisible.bindTo(i),this._ctxSuggestWidgetMultipleSuggestions=N.MultipleSuggestions.bindTo(i),this._ctxSuggestWidgetHasFocusedSuggestion=N.HasFocusedSuggestion.bindTo(i),this._ctxSuggestWidgetDetailsFocused=N.DetailsFocused.bindTo(i);const p=o.trackFocus(this._details.widget.domNode);this._disposables.add(p),this._disposables.add(p.onDidFocus(()=>this._ctxSuggestWidgetDetailsFocused.set(!0))),this._disposables.add(p.onDidBlur(()=>this._ctxSuggestWidgetDetailsFocused.set(!1))),this._disposables.add(o.addStandardDisposableListener(this._details.widget.domNode,"keydown",f=>{this._onDetailsKeydown.fire(f)})),this._disposables.add(this.editor.onMouseDown(f=>this._onEditorMouseDown(f)))}dispose(){this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),this._loadingTimeout.dispose(),this._pendingLayout.dispose(),this._pendingShowDetails.dispose(),this._showTimeout.dispose(),this._contentWidget.dispose(),this.element.dispose(),this._onDidSelect.dispose(),this._onDidFocus.dispose(),this._onDidHide.dispose(),this._onDidShow.dispose(),this._onDetailsKeydown.dispose()}_onEditorMouseDown(e){this._details.widget.domNode.contains(e.target.element)?this._details.widget.domNode.focus():this.element.domNode.contains(e.target.element)&&this.editor.focus()}_onCursorSelectionChanged(){this._state!==0&&this._contentWidget.layout()}_onListMouseDownOrTap(e){typeof e.element>"u"||typeof e.index>"u"||(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation(),this._select(e.element,e.index))}_onListSelection(e){e.elements.length&&this._select(e.elements[0],e.indexes[0])}_select(e,t){const i=this._completionModel;i&&(this._onDidSelect.fire({item:e,index:t,model:i}),this.editor.focus())}_onListFocus(e){if(this._ignoreFocusEvents)return;if(this._state===5&&this._setState(3),!e.elements.length){this._currentSuggestionDetails&&(this._currentSuggestionDetails.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=void 0),this.editor.setAriaOptions({activeDescendant:void 0}),this._ctxSuggestWidgetHasFocusedSuggestion.set(!1);return}if(!this._completionModel)return;this._ctxSuggestWidgetHasFocusedSuggestion.set(!0);const t=e.elements[0],i=e.indexes[0];t!==this._focusedItem&&(this._currentSuggestionDetails?.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=t,this._list.reveal(i),this._currentSuggestionDetails=a.createCancelablePromise(async n=>{const s=a.disposableTimeout(()=>{this._isDetailsVisible()&&this._showDetails(!0,!1)},250),r=n.onCancellationRequested(()=>s.dispose());try{return await t.resolve(n)}finally{s.dispose(),r.dispose()}}),this._currentSuggestionDetails.then(()=>{i>=this._list.length||t!==this._list.element(i)||(this._ignoreFocusEvents=!0,this._list.splice(i,1,[t]),this._list.setFocus([i]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this._showDetails(!1,!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:this._list.getElementID(i)}))}).catch(a.onUnexpectedError)),this._onDidFocus.fire({item:t,index:i,model:this._completionModel})}_setState(e){if(this._state!==e)switch(this._state=e,this.element.domNode.classList.toggle("frozen",e===4),this.element.domNode.classList.remove("message"),e){case 0:o.hide(this._messageElement,this._listElement,this._status.element),this._details.hide(!0),this._status.hide(),this._contentWidget.hide(),this._ctxSuggestWidgetVisible.reset(),this._ctxSuggestWidgetMultipleSuggestions.reset(),this._ctxSuggestWidgetHasFocusedSuggestion.reset(),this._showTimeout.cancel(),this.element.domNode.classList.remove("visible"),this._list.splice(0,this._list.length),this._focusedItem=void 0,this._cappedHeight=void 0,this._explainMode=!1;break;case 1:this.element.domNode.classList.add("message"),this._messageElement.textContent=Ps.LOADING_MESSAGE,o.hide(this._listElement,this._status.element),o.show(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,o.status(Ps.LOADING_MESSAGE);break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=Ps.NO_SUGGESTIONS_MESSAGE,o.hide(this._listElement,this._status.element),o.show(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,o.status(Ps.NO_SUGGESTIONS_MESSAGE);break;case 3:o.hide(this._messageElement),o.show(this._listElement,this._status.element),this._show();break;case 4:o.hide(this._messageElement),o.show(this._listElement,this._status.element),this._show();break;case 5:o.hide(this._messageElement),o.show(this._listElement,this._status.element),this._details.show(),this._show(),this._details.widget.focus();break}}_show(){this._status.show(),this._contentWidget.show(),this._layout(this._persistedSize.restore()),this._ctxSuggestWidgetVisible.set(!0),this._showTimeout.cancelAndSet(()=>{this.element.domNode.classList.add("visible"),this._onDidShow.fire(this)},100)}showTriggered(e,t){this._state===0&&(this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!e,this._isAuto||(this._loadingTimeout.value=a.disposableTimeout(()=>this._setState(1),t)))}showSuggestions(e,t,i,n,s){if(this._contentWidget.setPosition(this.editor.getPosition()),this._loadingTimeout.clear(),this._currentSuggestionDetails?.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==e&&(this._completionModel=e),i&&this._state!==2&&this._state!==0){this._setState(4);return}const r=this._completionModel.items.length,l=r===0;if(this._ctxSuggestWidgetMultipleSuggestions.set(r>1),l){this._setState(n?0:2),this._completionModel=void 0;return}this._focusedItem=void 0,this._onDidFocus.pause(),this._onDidSelect.pause();try{this._list.splice(0,this._list.length,this._completionModel.items),this._setState(i?4:3),this._list.reveal(t,0,t===0?0:this.getLayoutInfo().itemHeight*.33),this._list.setFocus(s?[]:[t])}finally{this._onDidFocus.resume(),this._onDidSelect.resume()}this._pendingLayout.value=o.runAtThisOrScheduleAtNextAnimationFrame(o.getWindow(this.element.domNode),()=>{this._pendingLayout.clear(),this._layout(this.element.size),this._details.widget.domNode.classList.remove("focused")})}focusSelected(){this._list.length>0&&this._list.setFocus([0])}selectNextPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageDown(),!0;case 1:return!this._isAuto;default:return this._list.focusNextPage(),!0}}selectNext(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusNext(1,!0),!0}}selectLast(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollBottom(),!0;case 1:return!this._isAuto;default:return this._list.focusLast(),!0}}selectPreviousPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageUp(),!0;case 1:return!this._isAuto;default:return this._list.focusPreviousPage(),!0}}selectPrevious(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusPrevious(1,!0),!1}}selectFirst(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollTop(),!0;case 1:return!this._isAuto;default:return this._list.focusFirst(),!0}}getFocusedItem(){if(this._state!==0&&this._state!==2&&this._state!==1&&this._completionModel&&this._list.getFocus().length>0)return{item:this._list.getFocusedElements()[0],index:this._list.getFocus()[0],model:this._completionModel}}toggleDetailsFocus(){this._state===5?(this._list.setFocus(this._list.getFocus()),this._setState(3)):this._state===3&&(this._setState(5),this._isDetailsVisible()?this._details.widget.focus():this.toggleDetails(!0))}toggleDetails(e=!1){this._isDetailsVisible()?(this._pendingShowDetails.clear(),this._ctxSuggestWidgetDetailsVisible.set(!1),this._setDetailsVisible(!1),this._details.hide(),this.element.domNode.classList.remove("shows-details")):(tg(this._list.getFocusedElements()[0])||this._explainMode)&&(this._state===3||this._state===5||this._state===4)&&(this._ctxSuggestWidgetDetailsVisible.set(!0),this._setDetailsVisible(!0),this._showDetails(!1,e))}_showDetails(e,t){this._pendingShowDetails.value=o.runAtThisOrScheduleAtNextAnimationFrame(o.getWindow(this.element.domNode),()=>{this._pendingShowDetails.clear(),this._details.show();let i=!1;e?this._details.widget.renderLoading():this._details.widget.renderItem(this._list.getFocusedElements()[0],this._explainMode),this._details.widget.isEmpty?this._details.hide():(this._positionDetails(),this.element.domNode.classList.add("shows-details"),t&&(this._details.widget.focus(),i=!0)),i||this.editor.focus()})}toggleExplainMode(){this._list.getFocusedElements()[0]&&(this._explainMode=!this._explainMode,this._isDetailsVisible()?this._showDetails(!1,!1):this.toggleDetails())}resetPersistedSize(){this._persistedSize.reset()}hideWidget(){this._pendingLayout.clear(),this._pendingShowDetails.clear(),this._loadingTimeout.clear(),this._setState(0),this._onDidHide.fire(this),this.element.clearSashHoverState();const e=this._persistedSize.restore(),t=Math.ceil(this.getLayoutInfo().itemHeight*4.3);e&&e.heightr&&(s=r);const l=this._completionModel?this._completionModel.stats.pLabelLen*i.typicalHalfwidthCharacterWidth:s,d=i.statusBarHeight+this._list.contentHeight+i.borderHeight,h=i.itemHeight+i.statusBarHeight,u=o.getDomNodePagePosition(this.editor.getDomNode()),g=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),p=u.top+g.top+g.height,f=Math.min(t.height-p-i.verticalPadding,d),m=u.top+g.top-i.verticalPadding,_=Math.min(m,d);let v=Math.min(Math.max(_,f)+i.borderHeight,d);n===this._cappedHeight?.capped&&(n=this._cappedHeight.wanted),nv&&(n=v),n>f&&_>f||this._forceRenderingAbove&&m>150?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),v=_):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),v=f),this.element.preferredSize=new o.Dimension(l,i.defaultSize.height),this.element.maxSize=new o.Dimension(r,v),this.element.minSize=new o.Dimension(220,h),this._cappedHeight=n===d?{wanted:this._cappedHeight?.wanted??e.height,capped:n}:void 0}this._resize(s,n)}_resize(e,t){const{width:i,height:n}=this.element.maxSize;e=Math.min(i,e),t=Math.min(n,t);const{statusBarHeight:s}=this.getLayoutInfo();this._list.layout(t-s,e),this._listElement.style.height=`${t-s}px`,this.element.layout(t,e),this._contentWidget.layout(),this._positionDetails()}_positionDetails(){this._isDetailsVisible()&&this._details.placeAtAnchor(this.element.domNode,this._contentWidget.getPosition()?.preference[0]===2)}getLayoutInfo(){const e=this.editor.getOption(59),t=o.clamp(this.editor.getOption(136)||e.lineHeight,8,1e3),i=!this.editor.getOption(134).showStatusBar||this._state===2||this._state===1?0:t,n=this._details.widget.getLayoutInfo().borderWidth,s=2*n;return{itemHeight:t,statusBarHeight:i,borderWidth:n,borderHeight:s,typicalHalfwidthCharacterWidth:e.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new o.Dimension(430,i+12*t)}}_isDetailsVisible(){return this._storageService.getBoolean("expandSuggestionDocs",0,!1)}_setDetailsVisible(e){this._storageService.store("expandSuggestionDocs",e,0,0)}forceRenderingAbove(){this._forceRenderingAbove||(this._forceRenderingAbove=!0,this._layout(this._persistedSize.restore()))}stopForceRenderingAbove(){this._forceRenderingAbove=!1}},Ps=Di,Di.LOADING_MESSAGE=a.localize(1534,"Loading..."),Di.NO_SUGGESTIONS_MESSAGE=a.localize(1535,"No suggestions."),Di);rg=Ps=FL([Ll(1,o.IStorageService),Ll(2,o.IContextKeyService),Ll(3,o.IThemeService),Ll(4,o.IInstantiationService)],rg);class KL{constructor(e,t){this._widget=e,this._editor=t,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._preferenceLocked=!1,this._added=!1,this._hidden=!1}dispose(){this._added&&(this._added=!1,this._editor.removeContentWidget(this))}getId(){return"editor.widget.suggestWidget"}getDomNode(){return this._widget.element.domNode}show(){this._hidden=!1,this._added||(this._added=!0,this._editor.addContentWidget(this))}hide(){this._hidden||(this._hidden=!0,this.layout())}layout(){this._editor.layoutContentWidget(this)}getPosition(){return this._hidden||!this._position||!this._preference?null:{position:this._position,preference:[this._preference]}}beforeRender(){const{height:e,width:t}=this._widget.element.size,{borderWidth:i,horizontalPadding:n}=this._widget.getLayoutInfo();return new o.Dimension(t+2*i+n,e+2*i)}afterRender(e){this._widget._afterRender(e)}setPreference(e){this._preferenceLocked||(this._preference=e)}lockPreference(){this._preferenceLocked=!0}unlockPreference(){this._preferenceLocked=!1}setPosition(e){this._position=e}}var UL=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Os=function(c,e){return function(t,i){e(t,i,c)}},ag;class kL{constructor(e,t){if(this._model=e,this._position=t,this._decorationOptions=o.ModelDecorationOptions.register({description:"suggest-line-suffix",stickiness:1}),e.getLineMaxColumn(t.lineNumber)!==t.column){const n=e.getOffsetAt(t),s=e.getPositionAt(n+1);e.changeDecorations(r=>{this._marker&&r.removeDecoration(this._marker),this._marker=r.addDecoration(a.Range.fromPositions(t,s),this._decorationOptions)})}}dispose(){this._marker&&!this._model.isDisposed()&&this._model.changeDecorations(e=>{e.removeDecoration(this._marker),this._marker=void 0})}delta(e){if(this._model.isDisposed()||this._position.lineNumber!==e.lineNumber)return 0;if(this._marker){const t=this._model.getDecorationRange(this._marker);return this._model.getOffsetAt(t.getStartPosition())-this._model.getOffsetAt(e)}else return this._model.getLineMaxColumn(e.lineNumber)-e.column}}let Je=(kn=class{static get(e){return e.getContribution(ag.ID)}get onWillInsertSuggestItem(){return this._onWillInsertSuggestItem.event}constructor(e,t,i,n,s,r,l){this._memoryService=t,this._commandService=i,this._contextKeyService=n,this._instantiationService=s,this._logService=r,this._telemetryService=l,this._lineSuffix=new a.MutableDisposable,this._toDispose=new a.DisposableStore,this._selectors=new jL(g=>g.priority),this._onWillInsertSuggestItem=new a.Emitter,this._wantsForceRenderingAbove=!1,this.editor=e,this.model=s.createInstance(xl,this.editor),this._selectors.register({priority:0,select:(g,p,f)=>this._memoryService.select(g,p,f)});const d=N.InsertMode.bindTo(n);d.set(e.getOption(134).insertMode),this._toDispose.add(this.model.onDidTrigger(()=>d.set(e.getOption(134).insertMode))),this.widget=this._toDispose.add(new o.WindowIdleValue(o.getWindow(e.getDomNode()),()=>{const g=this._instantiationService.createInstance(rg,this.editor);this._toDispose.add(g),this._toDispose.add(g.onDidSelect(v=>this._insertSuggestion(v,0),this));const p=new IL(this.editor,g,this.model,v=>this._insertSuggestion(v,2));this._toDispose.add(p);const f=N.MakesTextEdit.bindTo(this._contextKeyService),m=N.HasInsertAndReplaceRange.bindTo(this._contextKeyService),_=N.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add(a.toDisposable(()=>{f.reset(),m.reset(),_.reset()})),this._toDispose.add(g.onDidFocus(({item:v})=>{const b=this.editor.getPosition(),S=v.editStart.column,w=b.column;let I=!0;this.editor.getOption(1)==="smart"&&this.model.state===2&&!v.completion.additionalTextEdits&&!(v.completion.insertTextRules&4)&&w-S===v.completion.insertText.length&&(I=this.editor.getModel().getValueInRange({startLineNumber:b.lineNumber,startColumn:S,endLineNumber:b.lineNumber,endColumn:w})!==v.completion.insertText),f.set(I),m.set(!a.Position.equals(v.editInsertEnd,v.editReplaceEnd)),_.set(!!v.provider.resolveCompletionItem||!!v.completion.documentation||v.completion.detail!==v.completion.label)})),this._wantsForceRenderingAbove&&g.forceRenderingAbove(),g})),this._overtypingCapturer=this._toDispose.add(new o.WindowIdleValue(o.getWindow(e.getDomNode()),()=>this._toDispose.add(new Wu(this.editor,this.model)))),this._alternatives=this._toDispose.add(new o.WindowIdleValue(o.getWindow(e.getDomNode()),()=>this._toDispose.add(new Ms(this.editor,this._contextKeyService)))),this._toDispose.add(s.createInstance(yl,e)),this._toDispose.add(this.model.onDidTrigger(g=>{this.widget.value.showTriggered(g.auto,g.shy?250:50),this._lineSuffix.value=new kL(this.editor.getModel(),g.position)})),this._toDispose.add(this.model.onDidSuggest(g=>{if(g.triggerOptions.shy)return;let p=-1;for(const m of this._selectors.itemsOrderedByPriorityDesc)if(p=m.select(this.editor.getModel(),this.editor.getPosition(),g.completionModel.items),p!==-1)break;if(p===-1&&(p=0),this.model.state===0)return;let f=!1;if(g.triggerOptions.auto){const m=this.editor.getOption(134);m.selectionMode==="never"||m.selectionMode==="always"?f=m.selectionMode==="never":m.selectionMode==="whenTriggerCharacter"?f=g.triggerOptions.triggerKind!==1:m.selectionMode==="whenQuickSuggestion"&&(f=g.triggerOptions.triggerKind===1&&!g.triggerOptions.refilter)}this.widget.value.showSuggestions(g.completionModel,p,g.isFrozen,g.triggerOptions.auto,f)})),this._toDispose.add(this.model.onDidCancel(g=>{g.retrigger||this.widget.value.hideWidget()})),this._toDispose.add(this.editor.onDidBlurEditorWidget(()=>{this.model.cancel(),this.model.clear()}));const h=N.AcceptSuggestionsOnEnter.bindTo(n),u=()=>{const g=this.editor.getOption(1);h.set(g==="on"||g==="smart")};this._toDispose.add(this.editor.onDidChangeConfiguration(()=>u())),u()}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose(),this._onWillInsertSuggestItem.dispose()}_insertSuggestion(e,t){if(!e||!e.item){this._alternatives.value.reset(),this.model.cancel(),this.model.clear();return}if(!this.editor.hasModel())return;const i=ee.get(this.editor);if(!i)return;this._onWillInsertSuggestItem.fire({item:e.item});const n=this.editor.getModel(),s=n.getAlternativeVersionId(),{item:r}=e,l=[],d=new a.CancellationTokenSource;t&1||this.editor.pushUndoStop();const h=this.getOverwriteInfo(r,!!(t&8));this._memoryService.memorize(n,this.editor.getPosition(),r);const u=r.isResolved;let g=-1,p=-1;if(Array.isArray(r.completion.additionalTextEdits)){this.model.cancel();const m=o.StableEditorScrollState.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",r.completion.additionalTextEdits.map(_=>{let v=a.Range.lift(_.range);if(v.startLineNumber===r.position.lineNumber&&v.startColumn>r.position.column){const b=this.editor.getPosition().column-r.position.column,S=b,w=a.Range.spansMultipleLines(v)?0:b;v=new a.Range(v.startLineNumber,v.startColumn+S,v.endLineNumber,v.endColumn+w)}return o.EditOperation.replaceMove(v,_.text)})),m.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!u){const m=new a.StopWatch;let _;const v=n.onDidChangeContent(I=>{if(I.isFlush){d.cancel(),v.dispose();return}for(const C of I.changes){const y=a.Range.getEndPosition(C.range);(!_||a.Position.isBefore(y,_))&&(_=y)}}),b=t;t|=2;let S=!1;const w=this.editor.onWillType(()=>{w.dispose(),S=!0,b&2||this.editor.pushUndoStop()});l.push(r.resolve(d.token).then(()=>{if(!r.completion.additionalTextEdits||d.token.isCancellationRequested)return;if(_&&r.completion.additionalTextEdits.some(C=>a.Position.isBefore(_,a.Range.getStartPosition(C.range))))return!1;S&&this.editor.pushUndoStop();const I=o.StableEditorScrollState.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",r.completion.additionalTextEdits.map(C=>o.EditOperation.replaceMove(a.Range.lift(C.range),C.text))),I.restoreRelativeVerticalPositionOfCursor(this.editor),(S||!(b&2))&&this.editor.pushUndoStop(),!0}).then(I=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",m.elapsed(),I),p=I===!0?1:I===!1?0:-2}).finally(()=>{v.dispose(),w.dispose()}))}let{insertText:f}=r.completion;if(r.completion.insertTextRules&4||(f=Ki.escape(f)),this.model.cancel(),i.insert(f,{overwriteBefore:h.overwriteBefore,overwriteAfter:h.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(r.completion.insertTextRules&1),clipboardText:e.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value,reason:o.EditSources.suggest({providerId:a.ProviderId.fromExtensionId(r.extensionId?.value)})}),t&2||this.editor.pushUndoStop(),r.completion.command)if(r.completion.command.id===Dl.id)this.model.trigger({auto:!0,retrigger:!0});else{const m=new a.StopWatch;l.push(this._commandService.executeCommand(r.completion.command.id,...r.completion.command.arguments?[...r.completion.command.arguments]:[]).catch(_=>{r.completion.extensionId?a.onUnexpectedExternalError(_):a.onUnexpectedError(_)}).finally(()=>{g=m.elapsed()}))}t&4&&this._alternatives.value.set(e,m=>{for(d.cancel();n.canUndo();){s!==n.getAlternativeVersionId()&&n.undo(),this._insertSuggestion(m,3|(t&8?8:0));break}}),this._alertCompletionItem(r),Promise.all(l).finally(()=>{this._reportSuggestionAcceptedTelemetry(r,n,u,g,p,e.index,e.model.items),this.model.clear(),d.dispose()})}_reportSuggestionAcceptedTelemetry(e,t,i,n,s,r,l){if(Math.random()>1e-4)return;const d=new Map;for(let p=0;p1?h[0]:-1;this._telemetryService.publicLog2("suggest.acceptedSuggestion",{extensionId:e.extensionId?.value??"unknown",providerId:e.provider._debugDisplayName??"unknown",kind:e.completion.kind,basenameHash:a.hash(o.basename(t.uri)).toString(16),languageId:t.getLanguageId(),fileExtension:o.extname(t.uri),resolveInfo:e.provider.resolveCompletionItem?i?1:0:-1,resolveDuration:e.resolveDuration,commandDuration:n,additionalEditsAsync:s,index:r,firstIndex:g})}getOverwriteInfo(e,t){a.assertType(this.editor.hasModel());let i=this.editor.getOption(134).insertMode==="replace";t&&(i=!i);const n=e.position.column-e.editStart.column,s=(i?e.editReplaceEnd.column:e.editInsertEnd.column)-e.position.column,r=this.editor.getPosition().column-e.position.column,l=this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0;return{overwriteBefore:n+r,overwriteAfter:s+l}}_alertCompletionItem(e){if(a.isNonEmptyArray(e.completion.additionalTextEdits)){const t=a.localize(1514,"Accepting '{0}' made {1} additional edits",e.textLabel,e.completion.additionalTextEdits.length);o.alert(t)}}triggerSuggest(e,t,i){this.editor.hasModel()&&(this.model.trigger({auto:t??!1,completionOptions:{providerFilter:e,kindFilter:i?new Set:void 0}}),this.editor.revealPosition(this.editor.getPosition(),0),this.editor.focus())}triggerSuggestAndAcceptBest(e){if(!this.editor.hasModel())return;const t=this.editor.getPosition(),i=()=>{t.equals(this.editor.getPosition())&&this._commandService.executeCommand(e.fallback)},n=s=>{if(s.completion.insertTextRules&4||s.completion.additionalTextEdits)return!0;const r=this.editor.getPosition(),l=s.editStart.column,d=r.column;return d-l!==s.completion.insertText.length?!0:this.editor.getModel().getValueInRange({startLineNumber:r.lineNumber,startColumn:l,endLineNumber:r.lineNumber,endColumn:d})!==s.completion.insertText};a.Event.once(this.model.onDidTrigger)(s=>{const r=[];a.Event.any(this.model.onDidTrigger,this.model.onDidCancel)(()=>{a.dispose(r),i()},void 0,r),this.model.onDidSuggest(({completionModel:l})=>{if(a.dispose(r),l.items.length===0){i();return}const d=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),l.items),h=l.items[d];if(!n(h)){i();return}this.editor.pushUndoStop(),this._insertSuggestion({index:d,item:h,model:l},7)},void 0,r)}),this.model.trigger({auto:!1,shy:!0}),this.editor.revealPosition(t,0),this.editor.focus()}acceptSelectedSuggestion(e,t){const i=this.widget.value.getFocusedItem();let n=0;e&&(n|=4),t&&(n|=8),this._insertSuggestion(i,n)}acceptNextSuggestion(){this._alternatives.value.next()}acceptPrevSuggestion(){this._alternatives.value.prev()}cancelSuggestWidget(){this.model.cancel(),this.model.clear(),this.widget.value.hideWidget()}focusSuggestion(){this.widget.value.focusSelected()}selectNextSuggestion(){this.widget.value.selectNext()}selectNextPageSuggestion(){this.widget.value.selectNextPage()}selectLastSuggestion(){this.widget.value.selectLast()}selectPrevSuggestion(){this.widget.value.selectPrevious()}selectPrevPageSuggestion(){this.widget.value.selectPreviousPage()}selectFirstSuggestion(){this.widget.value.selectFirst()}toggleSuggestionDetails(){this.widget.value.toggleDetails()}toggleExplainMode(){this.widget.value.toggleExplainMode()}toggleSuggestionFocus(){this.widget.value.toggleDetailsFocus()}resetWidgetSize(){this.widget.value.resetPersistedSize()}forceRenderingAbove(){this.widget.isInitialized?this.widget.value.forceRenderingAbove():this._wantsForceRenderingAbove=!0}stopForceRenderingAbove(){this.widget.isInitialized?this.widget.value.stopForceRenderingAbove():this._wantsForceRenderingAbove=!1}registerSelector(e){return this._selectors.register(e)}},ag=kn,kn.ID="editor.contrib.suggestController",kn);Je=ag=UL([Os(1,Sl),Os(2,o.ICommandService),Os(3,o.IContextKeyService),Os(4,o.IInstantiationService),Os(5,o.ILogService),Os(6,o.ITelemetryService)],Je);class jL{constructor(e){this.prioritySelector=e,this._items=new Array}register(e){if(this._items.indexOf(e)!==-1)throw new Error("Value is already registered");return this._items.push(e),this._items.sort((t,i)=>this.prioritySelector(i)-this.prioritySelector(t)),{dispose:()=>{const t=this._items.indexOf(e);t>=0&&this._items.splice(t,1)}}}get itemsOrderedByPriorityDesc(){return this._items}}const Vc=class Vc extends o.EditorAction{constructor(){super({id:Vc.id,label:a.localize2(1523,"Trigger Suggest"),precondition:o.ContextKeyExpr.and(o.EditorContextKeys.writable,o.EditorContextKeys.hasCompletionItemProvider,N.Visible.toNegated()),kbOpts:{kbExpr:o.EditorContextKeys.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[521,2087]},weight:100}})}run(e,t,i){const n=Je.get(t);if(!n)return;let s;i&&typeof i=="object"&&i.auto===!0&&(s=!0),n.triggerSuggest(void 0,s,void 0)}};Vc.id="editor.action.triggerSuggest";let Dl=Vc;o.registerEditorContribution(Je.ID,Je,2),o.registerEditorAction(Dl);const Ce=190,ae=o.EditorCommand.bindToContribution(Je.get);o.registerEditorCommand(new ae({id:"acceptSelectedSuggestion",precondition:o.ContextKeyExpr.and(N.Visible,N.HasFocusedSuggestion),handler(c){c.acceptSelectedSuggestion(!0,!1)},kbOpts:[{primary:2,kbExpr:o.ContextKeyExpr.and(N.Visible,o.EditorContextKeys.textInputFocus),weight:Ce},{primary:3,kbExpr:o.ContextKeyExpr.and(N.Visible,o.EditorContextKeys.textInputFocus,N.AcceptSuggestionsOnEnter,N.MakesTextEdit),weight:Ce}],menuOpts:[{menuId:Tt,title:a.localize(1515,"Insert"),group:"left",order:1,when:o.ContextKeyExpr.and(N.HasFocusedSuggestion,N.HasInsertAndReplaceRange.toNegated())},{menuId:Tt,title:a.localize(1516,"Insert"),group:"left",order:1,when:o.ContextKeyExpr.and(N.HasFocusedSuggestion,N.HasInsertAndReplaceRange,N.InsertMode.isEqualTo("insert"))},{menuId:Tt,title:a.localize(1517,"Replace"),group:"left",order:1,when:o.ContextKeyExpr.and(N.HasFocusedSuggestion,N.HasInsertAndReplaceRange,N.InsertMode.isEqualTo("replace"))}]})),o.registerEditorCommand(new ae({id:"acceptAlternativeSelectedSuggestion",precondition:o.ContextKeyExpr.and(N.Visible,o.EditorContextKeys.textInputFocus,N.HasFocusedSuggestion),kbOpts:{weight:Ce,kbExpr:o.EditorContextKeys.textInputFocus,primary:1027,secondary:[1026]},handler(c){c.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:Tt,group:"left",order:2,when:o.ContextKeyExpr.and(N.HasFocusedSuggestion,N.HasInsertAndReplaceRange,N.InsertMode.isEqualTo("insert")),title:a.localize(1518,"Replace")},{menuId:Tt,group:"left",order:2,when:o.ContextKeyExpr.and(N.HasFocusedSuggestion,N.HasInsertAndReplaceRange,N.InsertMode.isEqualTo("replace")),title:a.localize(1519,"Insert")}]})),o.CommandsRegistry.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion"),o.registerEditorCommand(new ae({id:"hideSuggestWidget",precondition:N.Visible,handler:c=>c.cancelSuggestWidget(),kbOpts:{weight:Ce,kbExpr:o.EditorContextKeys.textInputFocus,primary:9,secondary:[1033]}})),o.registerEditorCommand(new ae({id:"selectNextSuggestion",precondition:o.ContextKeyExpr.and(N.Visible,o.ContextKeyExpr.or(N.MultipleSuggestions,N.HasFocusedSuggestion.negate())),handler:c=>c.selectNextSuggestion(),kbOpts:{weight:Ce,kbExpr:o.EditorContextKeys.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}},menuOpts:{menuId:Tt,group:"left",order:0,when:N.HasFocusedSuggestion.toNegated(),title:a.localize(1520,"Select")}})),o.registerEditorCommand(new ae({id:"selectNextPageSuggestion",precondition:o.ContextKeyExpr.and(N.Visible,o.ContextKeyExpr.or(N.MultipleSuggestions,N.HasFocusedSuggestion.negate())),handler:c=>c.selectNextPageSuggestion(),kbOpts:{weight:Ce,kbExpr:o.EditorContextKeys.textInputFocus,primary:12,secondary:[2060]}})),o.registerEditorCommand(new ae({id:"selectLastSuggestion",precondition:o.ContextKeyExpr.and(N.Visible,o.ContextKeyExpr.or(N.MultipleSuggestions,N.HasFocusedSuggestion.negate())),handler:c=>c.selectLastSuggestion()})),o.registerEditorCommand(new ae({id:"selectPrevSuggestion",precondition:o.ContextKeyExpr.and(N.Visible,o.ContextKeyExpr.or(N.MultipleSuggestions,N.HasFocusedSuggestion.negate())),handler:c=>c.selectPrevSuggestion(),kbOpts:{weight:Ce,kbExpr:o.EditorContextKeys.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})),o.registerEditorCommand(new ae({id:"selectPrevPageSuggestion",precondition:o.ContextKeyExpr.and(N.Visible,o.ContextKeyExpr.or(N.MultipleSuggestions,N.HasFocusedSuggestion.negate())),handler:c=>c.selectPrevPageSuggestion(),kbOpts:{weight:Ce,kbExpr:o.EditorContextKeys.textInputFocus,primary:11,secondary:[2059]}})),o.registerEditorCommand(new ae({id:"selectFirstSuggestion",precondition:o.ContextKeyExpr.and(N.Visible,o.ContextKeyExpr.or(N.MultipleSuggestions,N.HasFocusedSuggestion.negate())),handler:c=>c.selectFirstSuggestion()})),o.registerEditorCommand(new ae({id:"focusSuggestion",precondition:o.ContextKeyExpr.and(N.Visible,N.HasFocusedSuggestion.negate()),handler:c=>c.focusSuggestion(),kbOpts:{weight:Ce,kbExpr:o.EditorContextKeys.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}}})),o.registerEditorCommand(new ae({id:"focusAndAcceptSuggestion",precondition:o.ContextKeyExpr.and(N.Visible,N.HasFocusedSuggestion.negate()),handler:c=>{c.focusSuggestion(),c.acceptSelectedSuggestion(!0,!1)}})),o.registerEditorCommand(new ae({id:"toggleSuggestionDetails",precondition:o.ContextKeyExpr.and(N.Visible,N.HasFocusedSuggestion),handler:c=>c.toggleSuggestionDetails(),kbOpts:{weight:Ce,kbExpr:o.EditorContextKeys.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}},menuOpts:[{menuId:Tt,group:"right",order:1,when:o.ContextKeyExpr.and(N.DetailsVisible,N.CanResolve),title:a.localize(1521,"Show Less")},{menuId:Tt,group:"right",order:1,when:o.ContextKeyExpr.and(N.DetailsVisible.toNegated(),N.CanResolve),title:a.localize(1522,"Show More")}]})),o.registerEditorCommand(new ae({id:"toggleExplainMode",precondition:N.Visible,handler:c=>c.toggleExplainMode(),kbOpts:{weight:100,primary:2138}})),o.registerEditorCommand(new ae({id:"toggleSuggestionFocus",precondition:N.Visible,handler:c=>c.toggleSuggestionFocus(),kbOpts:{weight:Ce,kbExpr:o.EditorContextKeys.textInputFocus,primary:2570,mac:{primary:778}}})),o.registerEditorCommand(new ae({id:"insertBestCompletion",precondition:o.ContextKeyExpr.and(o.EditorContextKeys.textInputFocus,o.ContextKeyExpr.equals("config.editor.tabCompletion","on"),yl.AtEnd,N.Visible.toNegated(),Ms.OtherSuggestions.toNegated(),ee.InSnippetMode.toNegated()),handler:(c,e)=>{c.triggerSuggestAndAcceptBest(a.isObject(e)?{fallback:"tab",...e}:{fallback:"tab"})},kbOpts:{weight:Ce,primary:2}})),o.registerEditorCommand(new ae({id:"insertNextSuggestion",precondition:o.ContextKeyExpr.and(o.EditorContextKeys.textInputFocus,o.ContextKeyExpr.equals("config.editor.tabCompletion","on"),Ms.OtherSuggestions,N.Visible.toNegated(),ee.InSnippetMode.toNegated()),handler:c=>c.acceptNextSuggestion(),kbOpts:{weight:Ce,kbExpr:o.EditorContextKeys.textInputFocus,primary:2}})),o.registerEditorCommand(new ae({id:"insertPrevSuggestion",precondition:o.ContextKeyExpr.and(o.EditorContextKeys.textInputFocus,o.ContextKeyExpr.equals("config.editor.tabCompletion","on"),Ms.OtherSuggestions,N.Visible.toNegated(),ee.InSnippetMode.toNegated()),handler:c=>c.acceptPrevSuggestion(),kbOpts:{weight:Ce,kbExpr:o.EditorContextKeys.textInputFocus,primary:1026}})),o.registerEditorCommand(new class extends o.EditorCommand{constructor(){super({id:"suggestWidgetCopy",precondition:N.DetailsFocused,kbOpts:{weight:Ce+10,kbExpr:N.DetailsFocused,primary:2081,win:{primary:2081,secondary:[2067]}}})}runEditorCommand(c,e){o.getWindow(e.getDomNode()).document.execCommand("copy")}}),o.registerEditorAction(class extends o.EditorAction{constructor(){super({id:"editor.action.resetSuggestSize",label:a.localize2(1524,"Reset Suggest Widget Size"),precondition:void 0})}run(c,e){Je.get(e)?.resetWidgetSize()}});class $L extends a.Disposable{get selectedItem(){return this._currentSuggestItemInfo}constructor(e,t,i){super(),this.editor=e,this.suggestControllerPreselector=t,this.onWillAccept=i,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentSuggestItemInfo=void 0,this._onDidSelectedItemChange=this._register(new a.Emitter),this.onDidSelectedItemChange=this._onDidSelectedItemChange.event,this._register(e.onKeyDown(s=>{s.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))})),this._register(e.onKeyUp(s=>{s.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))}));const n=Je.get(this.editor);if(n){this._register(n.registerSelector({priority:100,select:(l,d,h)=>{const u=this.editor.getModel();if(!u)return-1;const g=this.suggestControllerPreselector(),p=g?Xt(g,u):void 0;if(!p)return-1;const f=a.Position.lift(d),m=h.map((v,b)=>{const S=or.fromSuggestion(n,u,f,v,this.isShiftKeyPressed),w=Xt(S.getSingleTextEdit(),u),I=hv(p,w);return{index:b,valid:I,prefixLength:w.text.length,suggestItem:v}}).filter(v=>v&&v.valid&&v.prefixLength>0),_=a.findFirstMax(m,a.compareBy(v=>v.prefixLength,a.numberComparator));return _?_.index:-1}}));let s=!1;const r=()=>{s||(s=!0,this._register(n.widget.value.onDidShow(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})),this._register(n.widget.value.onDidHide(()=>{this.isSuggestWidgetVisible=!1,this.update(!1)})),this._register(n.widget.value.onDidFocus(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})))};this._register(a.Event.once(n.model.onDidTrigger)(l=>{r()})),this._register(n.onWillInsertSuggestItem(l=>{const d=this.editor.getPosition(),h=this.editor.getModel();if(!d||!h)return;const u=or.fromSuggestion(n,h,d,l.item,this.isShiftKeyPressed);this.onWillAccept(u)}))}this.update(this._isActive)}update(e){const t=this.getSuggestItemInfo();(this._isActive!==e||!qL(this._currentSuggestItemInfo,t))&&(this._isActive=e,this._currentSuggestItemInfo=t,this._onDidSelectedItemChange.fire())}getSuggestItemInfo(){const e=Je.get(this.editor);if(!e||!this.isSuggestWidgetVisible)return;const t=e.widget.value.getFocusedItem(),i=this.editor.getPosition(),n=this.editor.getModel();if(!(!t||!i||!n))return or.fromSuggestion(e,n,i,t.item,this.isShiftKeyPressed)}stopForceRenderingAbove(){Je.get(this.editor)?.stopForceRenderingAbove()}forceRenderingAbove(){Je.get(this.editor)?.forceRenderingAbove()}}class or{static fromSuggestion(e,t,i,n,s){let{insertText:r}=n.completion,l=!1;if(n.completion.insertTextRules&4){const h=new Ki().parse(r);h.children.length<100&&cl.adjustWhitespace(t,i,!0,h),r=h.toString(),l=!0}const d=e.getOverwriteInfo(n,s);return new or(a.Range.fromPositions(i.delta(0,-d.overwriteBefore),i.delta(0,Math.max(d.overwriteAfter,0))),r,n.completion.kind,l,n.container.incomplete??!1)}constructor(e,t,i,n,s){this.range=e,this.insertText=t,this.completionItemKind=i,this.isSnippetText=n,this.listIncomplete=s}equals(e){return this.range.equalsRange(e.range)&&this.insertText===e.insertText&&this.completionItemKind===e.completionItemKind&&this.isSnippetText===e.isSnippetText}toSelectedSuggestionInfo(){return new a.SelectedSuggestionInfo(this.range,this.insertText,this.completionItemKind,this.isSnippetText)}getSingleTextEdit(){return new a.TextReplacement(this.range,this.insertText)}}function qL(c,e){return c===e?!0:!c||!e?!1:c.equals(e)}class GL extends a.Disposable{constructor(e,t,i){super(),this._editorObs=e,this._handleSuggestAccepted=t,this._suggestControllerPreselector=i,this._suggestWidgetAdaptor=this._register(new $L(this._editorObs.editor,()=>(this._editorObs.forceUpdate(),this._suggestControllerPreselector()),n=>this._editorObs.forceUpdate(s=>{this._handleSuggestAccepted(n)}))),this.selectedItem=o.observableFromEvent(this,n=>this._suggestWidgetAdaptor.onDidSelectedItemChange(()=>{this._editorObs.forceUpdate(s=>n(void 0))}),()=>this._suggestWidgetAdaptor.selectedItem)}stopForceRenderingAbove(){this._suggestWidgetAdaptor.stopForceRenderingAbove()}forceRenderingAbove(){this._suggestWidgetAdaptor.forceRenderingAbove()}}class ZL{constructor(e,t){this.lineNumber=e,this.columnRange=t}}class Mv{constructor(e,t){if(this.startColumn=e,this.endColumnExclusive=t,e>t)throw new a.BugIndicatingError(`startColumn ${e} cannot be after endColumnExclusive ${t}`)}toRange(e){return new a.Range(e,this.startColumn,e,this.endColumnExclusive)}equals(e){return this.startColumn===e.startColumn&&this.endColumnExclusive===e.endColumnExclusive}toZeroBasedOffsetRange(){return new a.OffsetRange(this.startColumn-1,this.endColumnExclusive-1)}}class cn{static fromLineTokens(e){const t=[];for(let i=0;i({text:i.text,metadata:i.metadata})),e)}map(e){const t=[];let i=0;for(const n of this._tokenInfo){const s=new a.OffsetRange(i,i+n.text.length);t.push(e(s,n)),i+=n.text.length}return t}slice(e){const t=[];let i=0;for(const n of this._tokenInfo){const s=i,r=s+n.text.length;if(r>e.start){if(s>=e.endExclusive)break;const l=Math.max(0,e.start-s),d=Math.max(0,r-e.endExclusive);t.push(new Pv(n.text.slice(l,n.text.length-d),n.metadata))}i+=n.text.length}return cn.create(t)}append(e){const t=this._tokenInfo.concat(e._tokenInfo);return cn.create(t)}}class Pv{constructor(e,t){this.text=e,this.metadata=t}}var XL=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},YL=function(c,e){return function(t,i){e(t,i,c)}};class lg{static from(e){if(e)return new lg(e.icon)}constructor(e=a.Codicon.warning){this.icon=e}}const Ov="ghost-text";let rr=class extends a.Disposable{constructor(e,t,i,n){super(),this._editor=e,this._data=t,this._languageService=n,this._isDisposed=o.observableValue(this,!1),this._warningState=o.derived(s=>{const r=this._data.read(s),l=r?.warning;if(!r||!l)return;const d=r.ghostText;return{lineNumber:d.lineNumber,position:new a.Position(d.lineNumber,d.parts[0].column),icon:l.icon}}),this._onDidClick=this._register(new a.Emitter),this.onDidClick=this._onDidClick.event,this._nonWhitespaceCount=o.derived(this,s=>{const r=this._data.read(s);return r?r.ghostText.parts.map(h=>h.lines.map(u=>u.line).join("")).join("").replace(/\s/g,"").length:void 0}),this._extraClassNames=o.derived(this,s=>{const r=this._extraClasses.slice();this._warningState.read(s)&&r.push("warning");const l=this._nonWhitespaceCount.read(s);return this._highlightShortText&&l&&l<3?r.push("short-text"):this._useSyntaxHighlighting.read(s)&&r.push("syntax-highlighted"),r.map(h=>` ${h}`).join("")}),this._state=o.derived(this,s=>{if(this._isDisposed.read(s))return;const r=this._data.read(s);if(!r)return;const l=this._editorObs.model.read(s);if(!l)return;const d=r.ghostText,h=d instanceof Nu?d.columnRange:void 0,u=this._useSyntaxHighlighting.read(s),g=this._extraClassNames.read(s),{inlineTexts:p,additionalLines:f,hiddenRange:m,additionalLinesOriginalSuffix:_}=QL(d,l,Ov+g),v=l.getLineContent(d.lineNumber),b=new a.StringEdit(p.map(R=>a.StringReplacement.insert(R.column-1,R.text))),S=u?l.tokenization.tokenizeLinesAt(d.lineNumber,[b.apply(v),...f.map(R=>R.content)]):void 0,w=b.getNewRanges(),I=p.map((R,D)=>({...R,tokens:S?.[0]?.getTokensInRange(w[D])})),C=f.map((R,D)=>{let T=S?.[D+1]??o.LineTokens.createEmpty(R.content,this._languageService.languageIdCodec);if(D===f.length-1&&_){const A=cn.fromLineTokens(l.tokenization.getLineTokens(_.lineNumber)).slice(_.columnRange.toZeroBasedOffsetRange());T=cn.fromLineTokens(T).append(A).toLineTokens(T.languageIdCodec)}return new HL(T,R.decorations)}),y=this._editor.getSelection()?.getStartPosition().column,x=I.filter(R=>R.text!==""),L=x.length!==0,E=new Fu((L?x[0].column:1)-y,L?0:f.findIndex(R=>R.content!=="")+1,L?1:0,f.length+(L?1:0),0,a.sum(x.map(R=>R.text.length))+a.sum(C.map(R=>R.content.getTextLength())),x.length+(f.length>0?1:0),x.length>1&&C.length===0?x.every(R=>R.text===x[0].text):void 0);return{replacedRange:h,inlineTexts:I,additionalLines:C,hiddenRange:m,lineNumber:d.lineNumber,additionalReservedLineCount:this._minReservedLineCount.read(s),targetTextModel:l,syntaxHighlightingEnabled:u,telemetryViewData:E,handleInlineCompletionShown:r.handleInlineCompletionShown}}),this._decorations=o.derived(this,s=>{const r=this._state.read(s);if(!r)return[];const l=[],d=this._extraClassNames.read(s);r.replacedRange&&l.push({range:r.replacedRange.toRange(r.lineNumber),options:{inlineClassName:"inline-completion-text-to-replace"+d,description:"GhostTextReplacement"}}),r.hiddenRange&&l.push({range:r.hiddenRange.toRange(r.lineNumber),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}});for(const h of r.inlineTexts){let u="";this._highlightShortText&&h.text.length<5&&(u+=" short-text"),l.push({range:a.Range.fromPositions(new a.Position(r.lineNumber,h.column)),options:{description:"ghost-text-decoration",after:{content:h.text,tokens:h.tokens,inlineClassName:(h.preview?"ghost-text-decoration-preview":"ghost-text-decoration")+(this._isClickable?" clickable":"")+d+u+h.lineDecorations.map(g=>" "+g.className).join(" "),cursorStops:a.InjectedTextCursorStops.Left,attachedData:new cg(this)},showIfCollapsed:!0}})}return l}),this.isHovered=o.derived(this,s=>this._isDisposed.read(s)?!1:this._isInlineTextHovered.read(s)||this._additionalLinesWidget.isHovered.read(s)),this.height=o.derived(this,s=>this._editorObs.getOption(75).read(s)+(this._additionalLinesWidget.viewZoneHeight.read(s)??0)),this._extraClasses=i.extraClasses??[],this._isClickable=i.isClickable??!1,this._shouldKeepCursorStable=i.shouldKeepCursorStable??!1,this._minReservedLineCount=i.minReservedLineCount??o.constObservable(0),this._useSyntaxHighlighting=i.useSyntaxHighlighting??o.constObservable(!0),this._highlightShortText=i.highlightShortSuggestions??!1,this._editorObs=o.observableCodeEditor(this._editor),this._additionalLinesWidget=this._register(new WL(this._editor,o.derivedOpts({owner:this,equalsFn:o.equalsIfDefinedC(o.thisEqualsC())},s=>{const r=this._state.read(s);return r?new JL(r.lineNumber,r.additionalLines,r.additionalReservedLineCount):void 0}),this._shouldKeepCursorStable,this._isClickable)),this._isInlineTextHovered=this._editorObs.isTargetHovered(s=>s.target.type===6&&s.target.detail.injectedText?.options.attachedData instanceof cg&&s.target.detail.injectedText.options.attachedData.owner===this,this._store),this._register(a.toDisposable(()=>{this._isDisposed.set(!0,void 0)})),this._register(this._editorObs.setDecorations(this._decorations)),this._isClickable&&(this._register(this._additionalLinesWidget.onDidClick(s=>this._onDidClick.fire(s))),this._register(this._editor.onMouseUp(s=>{if(s.target.type!==6)return;const r=s.target.detail.injectedText?.options.attachedData;r instanceof cg&&r.owner===this&&this._onDidClick.fire(s.event)}))),this._register(o.autorun(s=>{const r=this._state.read(s);r?.handleInlineCompletionShown(r.telemetryViewData)})),this._register(o.autorunWithStore((s,r)=>{}))}static getWarningWidgetContext(e){const t=e.ghostTextViewWarningWidgetData;if(t)return t;if(e.parentElement)return this.getWarningWidgetContext(e.parentElement)}ownsViewZone(e){return this._additionalLinesWidget.viewZoneId===e}};rr=XL([YL(3,o.ILanguageService)],rr);class cg{constructor(e){this.owner=e}}function QL(c,e,t){const i=[],n=[];function s(g,p){if(n.length>0){const f=n[n.length-1];p&&f.decorations.push(new o.LineDecoration(f.content.length+1,f.content.length+1+g[0].line.length,p,0)),f.content+=g[0].line,g=g.slice(1)}for(const f of g)n.push({content:f.line,decorations:p?[new o.LineDecoration(1,f.line.length+1,p,0),...f.lineDecorations]:[...f.lineDecorations]})}const r=e.getLineContent(c.lineNumber);let l,d=0;for(const g of c.parts){let p=g.lines;l===void 0?(i.push({column:g.column,text:p[0].line,preview:g.preview,lineDecorations:p[0].lineDecorations}),p=p.slice(1)):s([{line:r.substring(d,g.column-1),lineDecorations:[]}],void 0),p.length>0&&(s(p,t),l===void 0&&g.column<=r.length&&(l=g.column)),d=g.column-1}let h;l!==void 0&&(h=new ZL(c.lineNumber,new Mv(d+1,r.length+1)));const u=l!==void 0?new Mv(l,r.length+1):void 0;return{inlineTexts:i,additionalLines:n,hiddenRange:u,additionalLinesOriginalSuffix:h}}class JL{constructor(e,t,i){this.lineNumber=e,this.additionalLines=t,this.minReservedLineCount=i}equals(e){return this.lineNumber!==e.lineNumber||this.minReservedLineCount!==e.minReservedLineCount?!1:a.equals(this.additionalLines,e.additionalLines,o.thisEqualsC())}}class WL extends a.Disposable{get viewZoneId(){return this._viewZoneInfo?.viewZoneId}get viewZoneHeight(){return this._viewZoneHeight}constructor(e,t,i,n){super(),this._editor=e,this._lines=t,this._shouldKeepCursorStable=i,this._isClickable=n,this._viewZoneHeight=o.observableValue("viewZoneHeight",void 0),this.editorOptionsChanged=o.observableSignalFromEvent("editorOptionChanged",a.Event.filter(this._editor.onDidChangeConfiguration,s=>s.hasChanged(40)||s.hasChanged(133)||s.hasChanged(113)||s.hasChanged(108)||s.hasChanged(60)||s.hasChanged(59)||s.hasChanged(75))),this._onDidClick=this._register(new a.Emitter),this.onDidClick=this._onDidClick.event,this._viewZoneListener=this._register(new a.MutableDisposable),this.isHovered=o.observableCodeEditor(this._editor).isTargetHovered(s=>Av(s.target.element),this._store),this.hasBeenAccepted=!1,this._editor instanceof o.CodeEditorWidget&&this._shouldKeepCursorStable&&this._register(this._editor.onBeforeExecuteEdit(s=>this.hasBeenAccepted=s.source==="inlineSuggestion.accept")),this._register(o.autorun(s=>{const r=this._lines.read(s);this.editorOptionsChanged.read(s),r?(this.hasBeenAccepted=!1,this.updateLines(r.lineNumber,r.additionalLines,r.minReservedLineCount)):this.clear()}))}dispose(){super.dispose(),this.clear()}clear(){this._viewZoneListener.clear(),this._editor.changeViewZones(e=>{this.removeActiveViewZone(e)})}updateLines(e,t,i){const n=this._editor.getModel();if(!n)return;const{tabSize:s}=n.getOptions();o.observableCodeEditor(this._editor).transaction(r=>{this._editor.changeViewZones(l=>{const d=new a.DisposableStore;this.removeActiveViewZone(l);const h=Math.max(t.length,i);if(h>0){const u=document.createElement("div");eD(u,s,t,this._editor.getOptions(),this._isClickable),this._isClickable&&(d.add(o.addDisposableListener(u,"mousedown",g=>{g.preventDefault()})),d.add(o.addDisposableListener(u,"click",g=>{Av(g.target)&&this._onDidClick.fire(new o.StandardMouseEvent(o.getWindow(g),g))}))),this.addViewZone(l,e,h,u)}this._viewZoneListener.value=d})})}addViewZone(e,t,i,n){const s=e.addZone({afterLineNumber:t,heightInLines:i,domNode:n,afterColumnAffinity:1,onComputedHeight:r=>{this._viewZoneHeight.set(r,void 0)}});this.keepCursorStable(t,i),this._viewZoneInfo={viewZoneId:s,heightInLines:i,lineNumber:t}}removeActiveViewZone(e){this._viewZoneInfo&&(e.removeZone(this._viewZoneInfo.viewZoneId),this.hasBeenAccepted||this.keepCursorStable(this._viewZoneInfo.lineNumber,-this._viewZoneInfo.heightInLines),this._viewZoneInfo=void 0,this._viewZoneHeight.set(void 0,void 0))}keepCursorStable(e,t){if(!this._shouldKeepCursorStable)return;const i=this._editor.getSelection()?.getStartPosition()?.lineNumber;i!==void 0&&e`);for(let v=0,b=t.length;v');const I=w.getLineContent(),C=a.isBasicASCII(I),y=a.containsRTL(I);o.renderViewLine(new o.RenderLineInput(u.isMonospace&&!s,u.canUseHalfwidthRightwardsArrow,I,!1,C,y,0,w,S.decorations.slice(),e,0,u.spaceWidth,u.middotWidth,u.wsmiddotWidth,r,l,d,h!==o.EditorFontLigatures.OFF,null,null,0),f),f.appendString("")}f.appendString(""),o.applyFontInfo(c,u);const m=f.build(),_=Fv?Fv.createHTML(m):m;c.innerHTML=_}const Fv=o.createTrustedTypesPolicy("editorGhostText",{createHTML:c=>c});class ar{constructor(e,t){this.width=e,this.height=t}toString(){return`(${this.width},${this.height})`}transpose(){return new ar(this.height,this.width)}toDimension(){return{width:this.width,height:this.height}}}class K{static fromPoints(e,t){return new K(e.x,e.y,t.x,t.y)}static fromPointSize(e,t){return new K(e.x,e.y,e.x+t.x,e.y+t.y)}static fromLeftTopRightBottom(e,t,i,n){return new K(e,t,i,n)}static fromLeftTopWidthHeight(e,t,i,n){return new K(e,t,e+i,t+n)}static fromRanges(e,t){return new K(e.start,t.start,e.endExclusive,t.endExclusive)}static hull(e){let t=Number.MAX_SAFE_INTEGER,i=Number.MAX_SAFE_INTEGER,n=Number.MIN_SAFE_INTEGER,s=Number.MIN_SAFE_INTEGER;for(const r of e)t=Math.min(t,r.left),i=Math.min(i,r.top),n=Math.max(n,r.right),s=Math.max(s,r.bottom);return new K(t,i,n,s)}get width(){return this.right-this.left}get height(){return this.bottom-this.top}constructor(e,t,i,n){if(this.left=e,this.top=t,this.right=i,this.bottom=n,e>i)throw new a.BugIndicatingError("Invalid arguments: Horizontally offset by "+(e-i));if(t>n)throw new a.BugIndicatingError("Invalid arguments: Vertically offset by "+(t-n))}withMargin(e,t,i,n){let s,r,l,d;return t===void 0&&i===void 0&&n===void 0?s=r=l=d=e:i===void 0&&n===void 0?(s=r=t,l=d=e):(s=n,r=t,l=e,d=i),new K(this.left-s,this.top-l,this.right+r,this.bottom+d)}intersectVertical(e){const t=Math.max(this.top,e.start),i=Math.min(this.bottom,e.endExclusive);return new K(this.left,t,this.right,Math.max(t,i))}intersectHorizontal(e){const t=Math.max(this.left,e.start),i=Math.min(this.right,e.endExclusive);return new K(t,this.top,Math.max(t,i),this.bottom)}toString(){return`Rect{(${this.left},${this.top}), (${this.right},${this.bottom})}`}intersect(e){const t=Math.max(this.left,e.left),i=Math.min(this.right,e.right),n=Math.max(this.top,e.top),s=Math.min(this.bottom,e.bottom);if(!(t>i||n>s))return new K(t,n,i,s)}containsRect(e){return this.left<=e.left&&this.top<=e.top&&this.right>=e.right&&this.bottom>=e.bottom}containsPoint(e){return this.left<=e.x&&this.top<=e.y&&this.right>=e.x&&this.bottom>=e.y}moveToBeContainedIn(e){const t=this.width,i=this.height;let n=this.left,s=this.top;return ne.right&&(n=e.right-t),se.bottom&&(s=e.bottom-i),new K(n,s,n+t,s+i)}withWidth(e){return new K(this.left,this.top,this.left+e,this.bottom)}withHeight(e){return new K(this.left,this.top,this.right,this.top+e)}withTop(e){return new K(this.left,e,this.right,this.bottom)}withLeft(e){return new K(e,this.top,this.right,this.bottom)}translateX(e){return new K(this.left+e,this.top,this.right+e,this.bottom)}translateY(e){return new K(this.left,this.top+e,this.right,this.bottom+e)}getLeftBottom(){return new o.Point(this.left,this.bottom)}getRightBottom(){return new o.Point(this.right,this.bottom)}getRightTop(){return new o.Point(this.right,this.top)}toStyles(){return{position:"absolute",left:`${this.left}px`,top:`${this.top}px`,width:`${this.width}px`,height:`${this.height}px`}}withHorizontalRange(e){return new K(e.start,this.top,e.endExclusive,this.bottom)}getSize(){return new ar(this.width,this.height)}}class lr{constructor(e,t,i,n=null){this.startLineNumbers=e,this.endLineNumbers=t,this.lastLineRelativePosition=i,this.showEndForLine=n}equals(e){return!!e&&this.lastLineRelativePosition===e.lastLineRelativePosition&&this.showEndForLine===e.showEndForLine&&a.equals(this.startLineNumbers,e.startLineNumbers)&&a.equals(this.endLineNumbers,e.endLineNumbers)}static get Empty(){return new lr([],[],0)}}const zv=o.createTrustedTypesPolicy("stickyScrollViewLayer",{createHTML:c=>c}),dg="data-sticky-line-index",Vv="data-sticky-is-line",tD="data-sticky-is-line-number",Bv="data-sticky-is-folding-icon";class iD extends a.Disposable{get height(){return this._height}constructor(e){super(),this._foldingIconStore=this._register(new a.DisposableStore),this._rootDomNode=document.createElement("div"),this._lineNumbersDomNode=document.createElement("div"),this._linesDomNodeScrollable=document.createElement("div"),this._linesDomNode=document.createElement("div"),this._renderedStickyLines=[],this._lineNumbers=[],this._lastLineRelativePosition=0,this._minContentWidthInPx=0,this._isOnGlyphMargin=!1,this._height=-1,this._onDidChangeStickyScrollHeight=this._register(new a.Emitter),this.onDidChangeStickyScrollHeight=this._onDidChangeStickyScrollHeight.event,this._editor=e,this._lineNumbersDomNode.className="sticky-widget-line-numbers",this._lineNumbersDomNode.setAttribute("role","none"),this._linesDomNode.className="sticky-widget-lines",this._linesDomNode.setAttribute("role","list"),this._linesDomNodeScrollable.className="sticky-widget-lines-scrollable",this._linesDomNodeScrollable.appendChild(this._linesDomNode),this._rootDomNode.className="sticky-widget",this._rootDomNode.classList.toggle("peek",e instanceof ct),this._rootDomNode.appendChild(this._lineNumbersDomNode),this._rootDomNode.appendChild(this._linesDomNodeScrollable),this._setHeight(0);const t=()=>{this._linesDomNode.style.left=this._editor.getOption(131).scrollWithEditor?`-${this._editor.getScrollLeft()}px`:"0px"};this._register(this._editor.onDidChangeConfiguration(i=>{i.hasChanged(131)&&t()})),this._register(this._editor.onDidScrollChange(i=>{i.scrollLeftChanged&&t(),i.scrollWidthChanged&&this._updateWidgetWidth()})),this._register(this._editor.onDidChangeModel(()=>{t(),this._updateWidgetWidth()})),t(),this._register(this._editor.onDidLayoutChange(i=>{this._updateWidgetWidth()})),this._updateWidgetWidth()}get lineNumbers(){return this._lineNumbers}get lineNumberCount(){return this._lineNumbers.length}getRenderedStickyLine(e){return this._renderedStickyLines.find(t=>t.lineNumber===e)}getCurrentLines(){return this._lineNumbers}setState(e,t,i){const n=!this._state&&!e,s=this._state&&this._state.equals(e);if(i===void 0&&(n||s))return;const r=this._findRenderingData(e),l=this._lineNumbers;this._lineNumbers=r.lineNumbers,this._lastLineRelativePosition=r.lastLineRelativePosition;const d=this._findIndexToRebuildFrom(l,this._lineNumbers,i);this._renderRootNode(this._lineNumbers,this._lastLineRelativePosition,t,d),this._state=e}_findRenderingData(e){if(!e)return{lineNumbers:[],lastLineRelativePosition:0};const t=[...e.startLineNumbers];e.showEndForLine!==null&&(t[e.showEndForLine]=e.endLineNumbers[e.showEndForLine]);let i=0;for(let n=0;n!e.includes(s));return n===-1?0:n}_updateWidgetWidth(){const e=this._editor.getLayoutInfo(),t=e.contentLeft;this._lineNumbersDomNode.style.width=`${t}px`,this._linesDomNodeScrollable.style.setProperty("--vscode-editorStickyScroll-scrollableWidth",`${this._editor.getScrollWidth()-e.verticalScrollbarWidth}px`),this._rootDomNode.style.width=`${e.width-e.verticalScrollbarWidth}px`}_useFoldingOpacityTransition(e){this._lineNumbersDomNode.style.setProperty("--vscode-editorStickyScroll-foldingOpacityTransition",`opacity ${e?.5:0}s`)}_setFoldingIconsVisibility(e){for(const t of this._renderedStickyLines){const i=t.foldingIcon;i&&i.setVisible(e?!0:i.isCollapsed)}}async _renderRootNode(e,t,i,n){const s=this._editor._getViewModel();if(!s){this._clearWidget();return}if(e.length===0){this._clearWidget();return}const r=[],l=e[e.length-1];let d=0;for(let u=0;uu.scrollWidth))+h.verticalScrollbarWidth,this._renderedStickyLines=r,this._setHeight(d+t),this._editor.layoutOverlayWidget(this)}_clearWidget(){for(let e=0;e{this._isOnGlyphMargin=!0,this._setFoldingIconsVisibility(!0)})),this._foldingIconStore.add(o.addDisposableListener(this._lineNumbersDomNode,o.EventType.MOUSE_LEAVE,()=>{this._isOnGlyphMargin=!1,this._useFoldingOpacityTransition(!0),this._setFoldingIconsVisibility(!1)})))}_renderChildNode(e,t,i,n,s,r,l){const d=new nD(this._editor,e,l,r,this._isOnGlyphMargin,t,i);return this._updatePosition(d,n,s)}_updatePosition(e,t,i){const n=e.lineDomNode,s=e.lineNumberDomNode;if(i){n.style.zIndex="0",s.style.zIndex="0";const l=`${t+this._lastLineRelativePosition+(e.foldingIcon?.isCollapsed?1:0)}px`;n.style.top=l,s.style.top=l}else n.style.zIndex="1",s.style.zIndex="1",n.style.top=`${t}px`,s.style.top=`${t}px`;return e}getId(){return"editor.contrib.stickyScrollWidget"}getDomNode(){return this._rootDomNode}getPosition(){return{preference:2,stackOrdinal:10}}getMinContentWidthInPx(){return this._minContentWidthInPx}focusLineWithIndex(e){0<=e&&e0)return null;const t=this._getRenderedStickyLineFromChildDomNode(e);if(!t)return null;const i=o.getColumnOfNodeOffset(t.characterMapping,e,0);return new a.Position(t.lineNumber,i)}getLineNumberFromChildDomNode(e){return this._getRenderedStickyLineFromChildDomNode(e)?.lineNumber??null}_getRenderedStickyLineFromChildDomNode(e){const t=this.getLineIndexFromChildDomNode(e);return t===null||t<0||t>=this._renderedStickyLines.length?null:this._renderedStickyLines[t]}getLineIndexFromChildDomNode(e){const t=this._getAttributeValue(e,dg);return t?parseInt(t,10):null}isInStickyLine(e){return this._getAttributeValue(e,Vv)!==void 0}isInFoldingIconDomNode(e){return this._getAttributeValue(e,Bv)!==void 0}_getAttributeValue(e,t){for(;e&&e!==this._rootDomNode;){const i=e.getAttribute(t);if(i!==null)return i;e=e.parentElement}}}class nD{constructor(e,t,i,n,s,r,l){this.index=r,this.lineNumber=l;const d=t.coordinatesConverter.convertModelPositionToViewPosition(new a.Position(l,1)).lineNumber,h=t.getViewLineRenderingData(d),u=e.getOption(76),g=e.getOption(117).verticalScrollbarSize;let p;try{p=o.LineDecoration.filter(h.inlineDecorations,d,h.minColumn,h.maxColumn)}catch{p=[]}const f=e.getLineHeightForPosition(new a.Position(l,1)),m=t.getTextDirection(l),_=new o.RenderLineInput(!0,!0,h.content,h.continuesWithWrappedLine,h.isBasicASCII,h.containsRTL,0,h.tokens,p,h.tabSize,h.startVisibleColumn,1,1,1,500,"none",!0,!0,null,m,g),v=new o.StringBuilder(2e3),b=o.renderViewLine(_,v);this.characterMapping=b.characterMapping;let S;zv?S=zv.createHTML(v.build()):S=v.build();const w=document.createElement("span");w.setAttribute(dg,String(r)),w.setAttribute(Vv,""),w.setAttribute("role","listitem"),w.tabIndex=0,w.className="sticky-line-content",w.classList.add(`stickyLine${l}`),w.style.lineHeight=`${f}px`,w.innerHTML=S;const I=document.createElement("span");I.setAttribute(dg,String(r)),I.setAttribute(tD,""),I.className="sticky-line-number",I.style.lineHeight=`${f}px`;const C=i.contentLeft;I.style.width=`${C}px`;const y=document.createElement("span");u.renderType===1||u.renderType===3&&l%10===0?y.innerText=l.toString():u.renderType===2&&(y.innerText=Math.abs(l-e.getPosition().lineNumber).toString()),y.className="sticky-line-number-inner",y.style.width=`${i.lineNumbersWidth}px`,y.style.paddingLeft=`${i.lineNumbersLeft}px`,I.appendChild(y),this.foldingIcon=this._renderFoldingIconForLine(e,n,l,f,s),this.foldingIcon&&(I.appendChild(this.foldingIcon.domNode),this.foldingIcon.domNode.style.left=`${i.lineNumbersWidth+i.lineNumbersLeft}px`,this.foldingIcon.domNode.style.lineHeight=`${f}px`),e.applyFontInfo(w),e.applyFontInfo(I),I.style.lineHeight=`${f}px`,w.style.lineHeight=`${f}px`,I.style.height=`${f}px`,w.style.height=`${f}px`,this.scrollWidth=w.scrollWidth,this.lineDomNode=w,this.lineNumberDomNode=I,this.height=f}_renderFoldingIconForLine(e,t,i,n,s){const r=e.getOption(126);if(!t||r==="never")return;const l=t.regions,d=l.findRange(i),h=l.getStartLineNumber(d);if(!(i===h))return;const g=l.isCollapsed(d),p=new sD(g,h,l.getEndLineNumber(d),n);return p.setVisible(s?!0:g||r==="always"),p.domNode.setAttribute(Bv,""),p}}class sD{constructor(e,t,i,n){this.isCollapsed=e,this.foldingStartLine=t,this.foldingEndLine=i,this.dimension=n,this.domNode=document.createElement("div"),this.domNode.style.width="26px",this.domNode.style.height=`${n}px`,this.domNode.style.lineHeight=`${n}px`,this.domNode.className=o.ThemeIcon.asClassName(e?Va:za)}setVisible(e){this.domNode.style.cursor=e?"pointer":"default",this.domNode.style.opacity=e?"1":"0"}}class cr{constructor(e,t){this.startLineNumber=e,this.endLineNumber=t}}class Rl{constructor(e,t,i){this.range=e,this.children=t,this.parent=i}}class Kv{constructor(e,t,i,n){this.uri=e,this.version=t,this.element=i,this.outlineProviderId=n}}var Tl=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},dr=function(c,e){return function(t,i){e(t,i,c)}},hr;(function(c){c.OUTLINE_MODEL="outlineModel",c.FOLDING_PROVIDER_MODEL="foldingProviderModel",c.INDENTATION_MODEL="indentationModel"})(hr||(hr={}));var ei;(function(c){c[c.VALID=0]="VALID",c[c.INVALID=1]="INVALID",c[c.CANCELED=2]="CANCELED"})(ei||(ei={}));let hg=class extends a.Disposable{constructor(e,t,i,n){switch(super(),this._editor=e,this._modelProviders=[],this._modelPromise=null,this._updateScheduler=this._register(new a.Delayer(300)),this._updateOperation=this._register(new a.DisposableStore),this._editor.getOption(131).defaultModel){case hr.OUTLINE_MODEL:this._modelProviders.push(new ug(this._editor,n));case hr.FOLDING_PROVIDER_MODEL:this._modelProviders.push(new pg(this._editor,t,n));case hr.INDENTATION_MODEL:this._modelProviders.push(new gg(this._editor,i));break}}dispose(){this._modelProviders.forEach(e=>e.dispose()),this._updateOperation.clear(),this._cancelModelPromise(),super.dispose()}_cancelModelPromise(){this._modelPromise&&(this._modelPromise.cancel(),this._modelPromise=null)}async update(e){return this._updateOperation.clear(),this._updateOperation.add({dispose:()=>{this._cancelModelPromise(),this._updateScheduler.cancel()}}),this._cancelModelPromise(),await this._updateScheduler.trigger(async()=>{for(const t of this._modelProviders){const{statusPromise:i,modelPromise:n}=t.computeStickyModel(e);this._modelPromise=n;const s=await i;if(this._modelPromise!==n)return null;switch(s){case ei.CANCELED:return this._updateOperation.clear(),null;case ei.VALID:return t.stickyModel}}return null}).catch(t=>(a.onUnexpectedError(t),null))}};hg=Tl([dr(2,o.IInstantiationService),dr(3,o.ILanguageFeaturesService)],hg);class Uv extends a.Disposable{constructor(e){super(),this._editor=e,this._stickyModel=null}get stickyModel(){return this._stickyModel}_invalid(){return this._stickyModel=null,ei.INVALID}computeStickyModel(e){if(e.isCancellationRequested||!this.isProviderValid())return{statusPromise:this._invalid(),modelPromise:null};const t=a.createCancelablePromise(i=>this.createModelFromProvider(i));return{statusPromise:t.then(i=>this.isModelValid(i)?e.isCancellationRequested?ei.CANCELED:(this._stickyModel=this.createStickyModel(e,i),ei.VALID):this._invalid()).then(void 0,i=>(a.onUnexpectedError(i),ei.CANCELED)),modelPromise:t}}isModelValid(e){return!0}isProviderValid(){return!0}}let ug=class extends Uv{constructor(e,t){super(e),this._languageFeaturesService=t}createModelFromProvider(e){return Rt.create(this._languageFeaturesService.documentSymbolProvider,this._editor.getModel(),e)}createStickyModel(e,t){const{stickyOutlineElement:i,providerID:n}=this._stickyModelFromOutlineModel(t,this._stickyModel?.outlineProviderId),s=this._editor.getModel();return new Kv(s.uri,s.getVersionId(),i,n)}isModelValid(e){return e&&e.children.size>0}_stickyModelFromOutlineModel(e,t){let i;if(a.Iterable.first(e.children.values())instanceof N_){const l=a.Iterable.find(e.children.values(),d=>d.id===t);if(l)i=l.children;else{let d="",h=-1,u;for(const[g,p]of e.children.entries()){const f=this._findSumOfRangesOfGroup(p);f>h&&(u=p,h=f,d=p.id)}t=d,i=u.children}}else i=e.children;const n=[],s=Array.from(i.values()).sort((l,d)=>{const h=new cr(l.symbol.range.startLineNumber,l.symbol.range.endLineNumber),u=new cr(d.symbol.range.startLineNumber,d.symbol.range.endLineNumber);return this._comparator(h,u)});for(const l of s)n.push(this._stickyModelFromOutlineElement(l,l.symbol.selectionRange.startLineNumber));return{stickyOutlineElement:new Rl(void 0,n,void 0),providerID:t}}_stickyModelFromOutlineElement(e,t){const i=[];for(const s of e.children.values())if(s.symbol.selectionRange.startLineNumber!==s.symbol.range.endLineNumber)if(s.symbol.selectionRange.startLineNumber!==t)i.push(this._stickyModelFromOutlineElement(s,s.symbol.selectionRange.startLineNumber));else for(const r of s.children.values())i.push(this._stickyModelFromOutlineElement(r,s.symbol.selectionRange.startLineNumber));i.sort((s,r)=>this._comparator(s.range,r.range));const n=new cr(e.symbol.selectionRange.startLineNumber,e.symbol.range.endLineNumber);return new Rl(n,i,void 0)}_comparator(e,t){return e.startLineNumber!==t.startLineNumber?e.startLineNumber-t.startLineNumber:t.endLineNumber-e.endLineNumber}_findSumOfRangesOfGroup(e){let t=0;for(const i of e.children.values())t+=this._findSumOfRangesOfGroup(i);return e instanceof mu?t+e.symbol.range.endLineNumber-e.symbol.selectionRange.startLineNumber:t}};ug=Tl([dr(1,o.ILanguageFeaturesService)],ug);class kv extends Uv{constructor(e){super(e),this._foldingLimitReporter=this._register(new D_(e))}createStickyModel(e,t){const i=this._fromFoldingRegions(t),n=this._editor.getModel();return new Kv(n.uri,n.getVersionId(),i,void 0)}isModelValid(e){return e!==null}_fromFoldingRegions(e){const t=e.length,i=[],n=new Rl(void 0,[],void 0);for(let s=0;s{this._updateProvider(e,t)})),this._updateProvider(e,t)}_updateProvider(e,t){const i=Zt.getFoldingRangeProviders(this._languageFeaturesService,e.getModel());i.length!==0&&(this.provider.value=new pu(e.getModel(),i,t,this._foldingLimitReporter,void 0))}isProviderValid(){return this.provider!==void 0}async createModelFromProvider(e){return this.provider.value?.compute(e)??null}};pg=Tl([dr(2,o.ILanguageFeaturesService)],pg);var oD=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},jv=function(c,e){return function(t,i){e(t,i,c)}};class rD{constructor(e,t,i,n){this.startLineNumber=e,this.endLineNumber=t,this.top=i,this.height=n}}let fg=class extends a.Disposable{constructor(e,t,i){super(),this._languageFeaturesService=t,this._languageConfigurationService=i,this._onDidChangeStickyScroll=this._register(new a.Emitter),this.onDidChangeStickyScroll=this._onDidChangeStickyScroll.event,this._model=null,this._cts=null,this._stickyModelProvider=null,this._editor=e,this._sessionStore=this._register(new a.DisposableStore),this._updateSoon=this._register(new a.RunOnceScheduler(()=>this.update(),50)),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(131)&&this.readConfiguration()})),this.readConfiguration()}readConfiguration(){this._sessionStore.clear(),this._editor.getOption(131).enabled&&(this._sessionStore.add(this._editor.onDidChangeModel(()=>{this._model=null,this.updateStickyModelProvider(),this._onDidChangeStickyScroll.fire(),this.update()})),this._sessionStore.add(this._editor.onDidChangeHiddenAreas(()=>this.update())),this._sessionStore.add(this._editor.onDidChangeModelContent(()=>this._updateSoon.schedule())),this._sessionStore.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>this.update())),this._sessionStore.add(a.toDisposable(()=>{this._stickyModelProvider?.dispose(),this._stickyModelProvider=null})),this.updateStickyModelProvider(),this.update())}getVersionId(){return this._model?.version}updateStickyModelProvider(){this._stickyModelProvider?.dispose(),this._stickyModelProvider=null,this._editor.hasModel()&&(this._stickyModelProvider=new hg(this._editor,()=>this._updateSoon.schedule(),this._languageConfigurationService,this._languageFeaturesService))}async update(){this._cts?.dispose(!0),this._cts=new a.CancellationTokenSource,await this.updateStickyModel(this._cts.token),this._onDidChangeStickyScroll.fire()}async updateStickyModel(e){if(!this._editor.hasModel()||!this._stickyModelProvider||this._editor.getModel().isTooLargeForTokenization()){this._model=null;return}const t=await this._stickyModelProvider.update(e);e.isCancellationRequested||(this._model=t)}getCandidateStickyLinesIntersecting(e){if(!this._model?.element)return[];const t=[];return this.getCandidateStickyLinesIntersectingFromStickyModel(e,this._model.element,t,0,0,-1),this.filterHiddenRanges(t)}getCandidateStickyLinesIntersectingFromStickyModel(e,t,i,n,s,r){const l=this._editor.getModel();if(!l||t.children.length===0)return;let d=r;const h=[];for(let p=0;pp-f)),g=this.updateIndex(a.binarySearch(h,e.endLineNumber,(p,f)=>p-f));for(let p=u;p<=g;p++){const f=t.children[p];if(!f||!f.range)continue;const{startLineNumber:m,endLineNumber:_}=f.range;if(_>m+1&&e.startLineNumber<=_+1&&m-1<=e.endLineNumber&&m!==d&&l.isValidRange(new a.Range(m,1,_,1))){d=m;const v=this._editor.getLineHeightForPosition(new a.Position(m,1));i.push(new rD(m,_-1,s,v)),this.getCandidateStickyLinesIntersectingFromStickyModel(e,f,i,n+1,s+v,m)}}}filterHiddenRanges(e){const t=this._editor._getViewModel()?.getHiddenAreas();return t?e.filter(i=>!t.some(n=>i.startLineNumber>=n.startLineNumber&&i.endLineNumber<=n.endLineNumber+1)):e}updateIndex(e){return e===-1?0:e<0?-e-2:e}};fg=oD([jv(1,o.ILanguageFeaturesService),jv(2,o.ILanguageConfigurationService)],fg);var aD=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},As=function(c,e){return function(t,i){e(t,i,c)}},mg;let ze=(jn=class extends a.Disposable{constructor(e,t,i,n,s,r,l){super(),this._editor=e,this._contextMenuService=t,this._languageFeaturesService=i,this._instaService=n,this._contextKeyService=l,this._sessionStore=new a.DisposableStore,this._maxStickyLines=Number.MAX_SAFE_INTEGER,this._candidateDefinitionsLength=-1,this._focusedStickyElementIndex=-1,this._enabled=!1,this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1,this._endLineNumbers=[],this._mouseTarget=null,this._onDidChangeStickyScrollHeight=this._register(new a.Emitter),this.onDidChangeStickyScrollHeight=this._onDidChangeStickyScrollHeight.event,this._stickyScrollWidget=new iD(this._editor),this._stickyLineCandidateProvider=new fg(this._editor,i,s),this._register(this._stickyScrollWidget),this._register(this._stickyLineCandidateProvider),this._widgetState=lr.Empty;const d=this._stickyScrollWidget.getDomNode();this._register(this._editor.onDidChangeLineHeight(u=>{u.changes.forEach(g=>{const p=g.lineNumber;this._widgetState.startLineNumbers.includes(p)&&this._renderStickyScroll(p)})})),this._register(this._editor.onDidChangeFont(u=>{u.changes.forEach(g=>{const p=g.lineNumber;this._widgetState.startLineNumbers.includes(p)&&this._renderStickyScroll(p)})})),this._register(this._editor.onDidChangeConfiguration(u=>{this._readConfigurationChange(u)})),this._register(o.addDisposableListener(d,o.EventType.CONTEXT_MENU,async u=>{this._onContextMenu(o.getWindow(d),u)})),this._stickyScrollFocusedContextKey=o.EditorContextKeys.stickyScrollFocused.bindTo(this._contextKeyService),this._stickyScrollVisibleContextKey=o.EditorContextKeys.stickyScrollVisible.bindTo(this._contextKeyService);const h=this._register(o.trackFocus(d));this._register(h.onDidBlur(u=>{this._positionRevealed===!1&&d.clientHeight===0?(this._focusedStickyElementIndex=-1,this.focus()):this._disposeFocusStickyScrollStore()})),this._register(h.onDidFocus(u=>{this.focus()})),this._registerMouseListeners(),this._register(o.addDisposableListener(d,o.EventType.MOUSE_DOWN,u=>{this._onMouseDown=!0})),this._register(this._stickyScrollWidget.onDidChangeStickyScrollHeight(u=>{this._onDidChangeStickyScrollHeight.fire(u)})),this._onDidResize(),this._readConfiguration()}get stickyScrollWidgetHeight(){return this._stickyScrollWidget.height}static get(e){return e.getContribution(mg.ID)}_disposeFocusStickyScrollStore(){this._stickyScrollFocusedContextKey.set(!1),this._focusDisposableStore?.dispose(),this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1}isFocused(){return this._focused}focus(){if(this._onMouseDown){this._onMouseDown=!1,this._editor.focus();return}this._stickyScrollFocusedContextKey.get()!==!0&&(this._focused=!0,this._focusDisposableStore=new a.DisposableStore,this._stickyScrollFocusedContextKey.set(!0),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumbers.length-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}focusNext(){this._focusedStickyElementIndex0&&this._focusNav(!1)}selectEditor(){this._editor.focus()}_focusNav(e){this._focusedStickyElementIndex=e?this._focusedStickyElementIndex+1:this._focusedStickyElementIndex-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex)}goToFocused(){const e=this._stickyScrollWidget.lineNumbers;this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:e[this._focusedStickyElementIndex],column:1})}_revealPosition(e){this._reveaInEditor(e,()=>this._editor.revealPosition(e))}_revealLineInCenterIfOutsideViewport(e){this._reveaInEditor(e,()=>this._editor.revealLineInCenterIfOutsideViewport(e.lineNumber,0))}_reveaInEditor(e,t){this._focused&&this._disposeFocusStickyScrollStore(),this._positionRevealed=!0,t(),this._editor.setSelection(a.Range.fromPositions(e)),this._editor.focus()}_registerMouseListeners(){const e=this._register(new a.DisposableStore),t=this._register(new Ca(this._editor,{extractLineNumberFromMouseEvent:s=>{const r=this._stickyScrollWidget.getEditorPositionFromNode(s.target.element);return r?r.lineNumber:0}})),i=s=>{if(!this._editor.hasModel()||s.target.type!==12||s.target.detail!==this._stickyScrollWidget.getId())return null;const r=s.target.element;if(!r||r.innerText!==r.innerHTML)return null;const l=this._stickyScrollWidget.getEditorPositionFromNode(r);return l?{range:new a.Range(l.lineNumber,l.column,l.lineNumber,l.column+r.innerText.length),textElement:r}:null},n=this._stickyScrollWidget.getDomNode();this._register(o.addStandardDisposableListener(n,o.EventType.CLICK,s=>{if(s.ctrlKey||s.altKey||s.metaKey||!s.leftButton)return;if(s.shiftKey){const h=this._stickyScrollWidget.getLineIndexFromChildDomNode(s.target);if(h===null)return;const u=new a.Position(this._endLineNumbers[h],1);this._revealLineInCenterIfOutsideViewport(u);return}if(this._stickyScrollWidget.isInFoldingIconDomNode(s.target)){const h=this._stickyScrollWidget.getLineNumberFromChildDomNode(s.target);this._toggleFoldingRegionForLine(h);return}if(!this._stickyScrollWidget.isInStickyLine(s.target))return;let d=this._stickyScrollWidget.getEditorPositionFromNode(s.target);if(!d){const h=this._stickyScrollWidget.getLineNumberFromChildDomNode(s.target);if(h===null)return;d=new a.Position(h,1)}this._revealPosition(d)})),this._register(o.addDisposableListener(o.mainWindow,o.EventType.MOUSE_MOVE,s=>{this._mouseTarget=s.target,this._onMouseMoveOrKeyDown(s)})),this._register(o.addDisposableListener(o.mainWindow,o.EventType.KEY_DOWN,s=>{this._onMouseMoveOrKeyDown(s)})),this._register(o.addDisposableListener(o.mainWindow,o.EventType.KEY_UP,()=>{this._showEndForLine!==void 0&&(this._showEndForLine=void 0,this._renderStickyScroll())})),this._register(t.onMouseMoveOrRelevantKeyDown(([s,r])=>{const l=i(s);if(!l||!s.hasTriggerModifier||!this._editor.hasModel()){e.clear();return}const{range:d,textElement:h}=l;if(!d.equalsRange(this._stickyRangeProjectedOnEditor))this._stickyRangeProjectedOnEditor=d,e.clear();else if(h.style.textDecoration==="underline")return;const u=new a.CancellationTokenSource;e.add(a.toDisposable(()=>u.dispose(!0)));let g;To(this._languageFeaturesService.definitionProvider,this._editor.getModel(),new a.Position(d.startLineNumber,d.startColumn+1),!1,u.token).then((p=>{if(!u.token.isCancellationRequested)if(p.length!==0){this._candidateDefinitionsLength=p.length;const f=h;g!==f?(e.clear(),g=f,g.style.textDecoration="underline",e.add(a.toDisposable(()=>{g.style.textDecoration="none"}))):g||(g=f,g.style.textDecoration="underline",e.add(a.toDisposable(()=>{g.style.textDecoration="none"})))}else e.clear()}))})),this._register(t.onCancel(()=>{e.clear()})),this._register(t.onExecute(async s=>{if(s.target.type!==12||s.target.detail!==this._stickyScrollWidget.getId())return;const r=this._stickyScrollWidget.getEditorPositionFromNode(s.target.element);r&&(!this._editor.hasModel()||!this._stickyRangeProjectedOnEditor||(this._candidateDefinitionsLength>1&&(this._focused&&this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:r.lineNumber,column:1})),this._instaService.invokeFunction(l_,s,this._editor,{uri:this._editor.getModel().uri,range:this._stickyRangeProjectedOnEditor})))}))}_onContextMenu(e,t){const i=new o.StandardMouseEvent(e,t);this._contextMenuService.showContextMenu({menuId:o.MenuId.StickyScrollContext,getAnchor:()=>i,menuActionOptions:{renderShortTitle:!0}})}_onMouseMoveOrKeyDown(e){if(!e.shiftKey||!this._mouseTarget||!o.isHTMLElement(this._mouseTarget))return;const t=this._stickyScrollWidget.getLineIndexFromChildDomNode(this._mouseTarget);t===null||this._showEndForLine===t||(this._showEndForLine=t,this._renderStickyScroll())}_toggleFoldingRegionForLine(e){if(!this._foldingModel||e===null)return;const t=this._stickyScrollWidget.getRenderedStickyLine(e),i=t?.foldingIcon;if(!i)return;lu(this._foldingModel,1,[e]),i.isCollapsed=!i.isCollapsed;const n=(i.isCollapsed?this._editor.getTopForLineNumber(i.foldingEndLine):this._editor.getTopForLineNumber(i.foldingStartLine))-this._editor.getOption(75)*t.index+1;this._editor.setScrollTop(n),this._renderStickyScroll(e)}_readConfiguration(){const e=this._editor.getOption(131);if(e.enabled===!1){this._editor.removeOverlayWidget(this._stickyScrollWidget),this._resetState(),this._sessionStore.clear(),this._enabled=!1;return}else e.enabled&&!this._enabled&&(this._editor.addOverlayWidget(this._stickyScrollWidget),this._sessionStore.add(this._editor.onDidScrollChange(i=>{i.scrollTopChanged&&(this._showEndForLine=void 0,this._renderStickyScroll())})),this._sessionStore.add(this._editor.onDidLayoutChange(()=>this._onDidResize())),this._sessionStore.add(this._editor.onDidChangeModelTokens(i=>this._onTokensChange(i))),this._sessionStore.add(this._stickyLineCandidateProvider.onDidChangeStickyScroll(()=>{this._showEndForLine=void 0,this._renderStickyScroll()})),this._enabled=!0);this._editor.getOption(76).renderType===2?this._cursorPositionListener||(this._cursorPositionListener=this._editor.onDidChangeCursorPosition(i=>{this._positionLineNumber!==i.position.lineNumber&&(this._positionLineNumber=i.position.lineNumber,this._showEndForLine=void 0,this._renderStickyScroll(0))}),this._sessionStore.add(this._cursorPositionListener)):this._cursorPositionListener&&(this._sessionStore.delete(this._cursorPositionListener),this._cursorPositionListener.dispose(),this._cursorPositionListener=void 0)}_readConfigurationChange(e){(e.hasChanged(131)||e.hasChanged(81)||e.hasChanged(75)||e.hasChanged(126)||e.hasChanged(76))&&this._readConfiguration(),(e.hasChanged(76)||e.hasChanged(52)||e.hasChanged(126))&&this._renderStickyScroll(0)}_needsUpdate(e){const t=this._stickyScrollWidget.getCurrentLines();for(const i of t)for(const n of e.ranges)if(i>=n.fromLineNumber&&i<=n.toLineNumber)return!0;return!1}_onTokensChange(e){this._needsUpdate(e)&&this._renderStickyScroll(0)}_onDidResize(){const t=this._editor.getLayoutInfo().height/this._editor.getOption(75);this._maxStickyLines=Math.round(t*.25),this._renderStickyScroll(0)}async _renderStickyScroll(e){const t=this._editor.getModel();if(!t||t.isTooLargeForTokenization()){this._resetState();return}const i=this._updateAndGetMinRebuildFromLine(e),n=this._stickyLineCandidateProvider.getVersionId();if(n===void 0||n===t.getVersionId())if(!this._focused)await this._updateState(i);else if(this._focusedStickyElementIndex===-1)await this._updateState(i),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1,this._focusedStickyElementIndex!==-1&&this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);else{const r=this._stickyScrollWidget.lineNumbers[this._focusedStickyElementIndex];await this._updateState(i),this._stickyScrollWidget.lineNumberCount===0?this._focusedStickyElementIndex=-1:(this._stickyScrollWidget.lineNumbers.includes(r)||(this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1),this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}}_updateAndGetMinRebuildFromLine(e){if(e!==void 0){const t=this._minRebuildFromLine!==void 0?this._minRebuildFromLine:1/0;this._minRebuildFromLine=Math.min(e,t)}return this._minRebuildFromLine}async _updateState(e){this._minRebuildFromLine=void 0,this._foldingModel=await Zt.get(this._editor)?.getFoldingModel()??void 0,this._widgetState=this.findScrollWidgetState();const t=this._widgetState.startLineNumbers.length>0;this._stickyScrollVisibleContextKey.set(t),this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,e)}async _resetState(){this._minRebuildFromLine=void 0,this._foldingModel=void 0,this._widgetState=lr.Empty,this._stickyScrollVisibleContextKey.set(!1),this._stickyScrollWidget.setState(void 0,void 0)}findScrollWidgetState(){const e=Math.min(this._maxStickyLines,this._editor.getOption(131).maxLineCount),t=this._editor.getScrollTop();let i=0;const n=[],s=[],r=this._editor.getVisibleRanges();if(r.length!==0){const l=new cr(r[0].startLineNumber,r[r.length-1].endLineNumber),d=this._stickyLineCandidateProvider.getCandidateStickyLinesIntersecting(l);for(const h of d){const u=h.startLineNumber,g=h.endLineNumber,p=h.top,f=p+h.height,m=this._editor.getTopForLineNumber(u)-t,_=this._editor.getBottomForLineNumber(g)-t;if(p>m&&p<=_&&(n.push(u),s.push(g+1),f>_&&(i=_-f)),n.length===e)break}}return this._endLineNumbers=s,new lr(n,s,i,this._showEndForLine)}dispose(){super.dispose(),this._sessionStore.dispose()}},mg=jn,jn.ID="store.contrib.stickyScrollController",jn);ze=mg=aD([As(1,o.IContextMenuService),As(2,o.ILanguageFeaturesService),As(3,o.IInstantiationService),As(4,o.ILanguageConfigurationService),As(5,o.ILanguageFeatureDebounceService),As(6,o.IContextKeyService)],ze);const ur=o.registerColor("inlineEdit.originalBackground",o.transparent(o.diffRemoved,.2),a.localize(1266,"Background color for the original text in inline edits."),!0),$v=o.registerColor("inlineEdit.modifiedBackground",o.transparent(o.diffInserted,.3),a.localize(1267,"Background color for the modified text in inline edits."),!0);o.registerColor("inlineEdit.originalChangedLineBackground",o.transparent(o.diffRemoved,.8),a.localize(1268,"Background color for the changed lines in the original text of inline edits."),!0);const lD=o.registerColor("inlineEdit.originalChangedTextBackground",o.transparent(o.diffRemoved,.8),a.localize(1269,"Overlay color for the changed text in the original text of inline edits."),!0),cD=o.registerColor("inlineEdit.modifiedChangedLineBackground",{light:o.transparent(o.diffInsertedLine,.7),dark:o.transparent(o.diffInsertedLine,.7),hcDark:o.diffInsertedLine,hcLight:o.diffInsertedLine},a.localize(1270,"Background color for the changed lines in the modified text of inline edits."),!0),dD=o.registerColor("inlineEdit.modifiedChangedTextBackground",o.transparent(o.diffInserted,.7),a.localize(1271,"Overlay color for the changed text in the modified text of inline edits."),!0),gr=o.registerColor("inlineEdit.gutterIndicator.primaryForeground",o.buttonForeground,a.localize(1272,"Foreground color for the primary inline edit gutter indicator.")),ti=o.registerColor("inlineEdit.gutterIndicator.primaryBorder",o.buttonBackground,a.localize(1273,"Border color for the primary inline edit gutter indicator.")),pr=o.registerColor("inlineEdit.gutterIndicator.primaryBackground",{light:o.transparent(ti,.5),dark:o.transparent(ti,.4),hcDark:o.transparent(ti,.4),hcLight:o.transparent(ti,.5)},a.localize(1274,"Background color for the primary inline edit gutter indicator.")),hD=o.registerColor("inlineEdit.gutterIndicator.secondaryForeground",o.editorHoverForeground,a.localize(1275,"Foreground color for the secondary inline edit gutter indicator.")),uD=o.registerColor("inlineEdit.gutterIndicator.secondaryBorder",o.editorHoverBorder,a.localize(1276,"Border color for the secondary inline edit gutter indicator.")),_g=o.registerColor("inlineEdit.gutterIndicator.secondaryBackground",o.editorHoverBackground,a.localize(1277,"Background color for the secondary inline edit gutter indicator.")),gD=o.registerColor("inlineEdit.gutterIndicator.successfulForeground",o.buttonForeground,a.localize(1278,"Foreground color for the successful inline edit gutter indicator.")),qv=o.registerColor("inlineEdit.gutterIndicator.successfulBorder",o.buttonBackground,a.localize(1279,"Border color for the successful inline edit gutter indicator.")),vg=o.registerColor("inlineEdit.gutterIndicator.successfulBackground",qv,a.localize(1280,"Background color for the successful inline edit gutter indicator.")),pD=o.registerColor("inlineEdit.gutterIndicator.background",{hcDark:o.transparent("tab.inactiveBackground",.5),hcLight:o.transparent("tab.inactiveBackground",.5),dark:o.transparent("tab.inactiveBackground",.5),light:"#5f5f5f18"},a.localize(1281,"Background color for the inline edit gutter indicator.")),fr=o.registerColor("inlineEdit.originalBorder",{light:o.diffRemoved,dark:o.diffRemoved,hcDark:o.diffRemoved,hcLight:o.diffRemoved},a.localize(1282,"Border color for the original text in inline edits.")),mr=o.registerColor("inlineEdit.modifiedBorder",{light:o.darken(o.diffInserted,.6),dark:o.diffInserted,hcDark:o.diffInserted,hcLight:o.diffInserted},a.localize(1283,"Border color for the modified text in inline edits.")),fD=o.registerColor("inlineEdit.tabWillAcceptModifiedBorder",{light:o.darken(mr,0),dark:o.darken(mr,0),hcDark:o.darken(mr,0),hcLight:o.darken(mr,0)},a.localize(1284,"Modified border color for the inline edits widget when tab will accept it.")),mD=o.registerColor("inlineEdit.tabWillAcceptOriginalBorder",{light:o.darken(fr,0),dark:o.darken(fr,0),hcDark:o.darken(fr,0),hcLight:o.darken(fr,0)},a.localize(1285,"Original border color for the inline edits widget over the original text when tab will accept it."));function _r(c){return c.map(e=>e===Y.Accept?fD:mr)}function Nl(c){return c.map(e=>e===Y.Accept?mD:fr)}function le(c,e){let t;typeof c=="string"?t=Fs(c,e):t=c.map((n,s)=>Fs(n,e).read(s));const i=Fs(o.editorBackground,e);return t.map((n,s)=>n.makeOpaque(i.read(s)))}function ii(c){let e;switch(c){case J.TextEditor:e=o.editorBackground;break;case J.DiffEditor:e=o.editorBackground;break;case J.Notebook:e="notebook.cellEditorBackground";break;default:a.assertNever(c,"Not supported editor type yet")}return o.asCssVariable(e)}function Fs(c,e){return o.observableFromEventOpts({owner:{observeColor:c},equalsFn:(t,i)=>t.equals(i),debugName:()=>`observeColor(${c})`},e.onDidColorThemeChange,()=>{const t=e.getColorTheme().getColor(c);if(!t)throw new a.BugIndicatingError(`Missing color: ${c}`);return t})}const pe=3;function Pt(c,e,t){const i=c.model.read(t);if(!i)return 0;let n=0;for(let r=e.startLineNumber;ri.getLineContent(r));return n<5&&s.some(r=>r.length>0)&&i.uri.scheme!=="file"&&console.log("unexpected width"),n}function _D(c,e,t){o.observableSignalFromEvent(c,c.editor.onDidChangeLineHeight).read(t);const i=c.model.read(t);if(!i)throw new a.BugIndicatingError("Model is required");const n=[];for(let s=e.startLineNumber;sp.isSingleLine()?p.startColumn-1:0),l=e.mapToLineArray(p=>o.indentOfLine(s.getLineContent(p))),d=t.filter(p=>p!=="").map(p=>o.indentOfLine(p)),h=Math.min(...r,...l,...d);let u;if(s.getLineIndentColumn(e.startLineNumber)>=h+1)o.observableCodeEditor(i).scrollTop.read(n),u=i.getOffsetForColumn(e.startLineNumber,h+1);else if(t.length>0)u=Cg(t[0].slice(0,h),i,s);else return{prefixTrim:0,prefixLeftOffset:0};return{prefixTrim:h,prefixLeftOffset:u}}function Cg(c,e,t){const i=e.getOption(59).typicalHalfwidthCharacterWidth,n=t.getOptions().tabSize*i,s=c.split(" ").length-1;return(c.length-s)*i+s*n}function Sg(c){const e=c.layoutInfoContentLeft,t=o.derived({name:"editor.validOverlay.width"},n=>{const s=c.layoutInfoMinimap.read(n).minimapLeft!==0,r=Math.max(0,c.layoutInfoWidth.read(n)-e.read(n));if(s){const l=c.layoutInfoMinimap.read(n).minimapWidth+c.layoutInfoVerticalScrollbarWidth.read(n);return Math.max(0,r-l)}return r}),i=o.derived({name:"editor.validOverlay.height"},n=>c.layoutInfoHeight.read(n)+c.contentHeight.read(n));return o.derived({name:"editor.validOverlay"},n=>K.fromLeftTopWidthHeight(e.read(n),0,t.read(n),i.read(n)))}function bD(c,e){const t=[];for(const i of c){const n=e.mapRange(i.modifiedRange);t.push(new a.RangeMapping(i.originalRange,n))}return t}function Ml(...c){return c.filter(e=>typeof e=="string").join(" ")}function CD(c,e){return new a.Range(e.lineNumber,e.column+c.start,e.lineNumber,e.column+c.endExclusive)}function SD(c,e){let t=0;e:for(let i=0,n=c.length;iSD(i[r-1],t)),a.numberComparator);return e.forEach(r=>{const l=yD(i[r-1],s,t);n.push(new a.TextReplacement(CD(new a.OffsetRange(0,l),new a.Position(r,1)),""))}),new a.TextEdit(n)}class yg{constructor(){this._data=""}moveTo(e){return this._data+=`M ${e.x} ${e.y} `,this}lineTo(e){return this._data+=`L ${e.x} ${e.y} `,this}build(){return this._data}}function ht(c){const e=o.derivedObservableWithCache(void 0,(t,i)=>c.read(t)||i);return o.derivedOpts({debugName:()=>`${c.debugName}.mapOutFalsy`},t=>{if(e.read(t),!!c.read(t))return e})}function fe(c,e=o.DebugLocation.ofCaller()){return{left:o.derived({name:"editor.validOverlay.left"},t=>c(t)?.left,e),top:o.derived({name:"editor.validOverlay.top"},t=>c(t)?.top,e),width:o.derived({name:"editor.validOverlay.width"},t=>{const i=c(t);if(i)return i.width},e),height:o.derived({name:"editor.validOverlay.height"},t=>{const i=c(t);if(i)return i.height},e)}}function ID(c,e){const t=c.getContainerDomNode(),i=o.observableValue("domRect",t.getBoundingClientRect());return e.add(c.onDidLayoutChange(n=>{i.set(t.getBoundingClientRect(),void 0)})),i}var xD=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},wg=function(c,e){return function(t,i){e(t,i,c)}};let Ig=class{constructor(e,t,i,n,s,r){this._editorObs=e,this._data=t,this._close=i,this._contextKeyService=n,this._keybindingService=s,this._commandService=r,this._inlineEditsShowCollapsed=this._editorObs.getOption(71).map(l=>l.edits.showCollapsed)}toDisposableLiveElement(){return this._createHoverContent().toDisposableLiveElement()}_createHoverContent(){const e=o.observableValue("active",void 0),t=_=>({title:_.title,icon:_.icon,keybinding:typeof _.commandId=="string"?this._getKeybinding(_.commandArgs?void 0:_.commandId):o.derived(this,v=>typeof _.commandId=="string"?void 0:this._getKeybinding(_.commandArgs?void 0:_.commandId.read(v)).read(v)),isActive:e.map(v=>v===_.id),onHoverChange:v=>e.set(v?_.id:void 0,void 0),onAction:()=>{const v=typeof _.commandId=="string"?_.commandId:_.commandId.get();return this._close(!0,v),this._commandService.executeCommand(v,..._.commandArgs??[])}}),i=this._data.extensionCommands.map(_=>_.map((v,b)=>ni(t({id:v.command.id+"_"+b,title:v.command.title,icon:v.icon??a.Codicon.symbolEvent,commandId:v.command.id,commandArgs:v.command.arguments})))),n=[];for(const _ of i)_.length>0&&(n.push(xg()),n.push(..._));if(this._data.extensionCommandsOnly)return Gv(n.slice(1));const s=ED(this._data.displayName),r=ni(t({id:"gotoAndAccept",title:a.localize(1256,"Go To / Accept"),icon:a.Codicon.check,commandId:cs})),l=ni(t({id:"reject",title:a.localize(1257,"Reject"),icon:a.Codicon.close,commandId:gm})),d=this._data.alternativeAction?ni(t({id:"alternativeCommand",title:this._data.alternativeAction.command.title,icon:this._data.alternativeAction.icon,commandId:ta})):void 0,h=[],u=this._inlineEditsShowCollapsed.map(_=>ni(t(_?{id:"showExpanded",title:a.localize(1258,"Show Expanded"),icon:a.Codicon.expandAll,commandId:Wd}:{id:"showCollapsed",title:a.localize(1259,"Show Collapsed"),icon:a.Codicon.collapseAll,commandId:Wd}))),g=ni(t({id:"snooze",title:a.localize(1260,"Snooze"),icon:a.Codicon.bellSlash,commandId:"editor.action.inlineSuggest.snooze"})),p=ni(t({id:"settings",title:a.localize(1261,"Settings"),icon:a.Codicon.gear,commandId:"workbench.action.openSettings",commandArgs:["@tag:nextEditSuggestions"]})),f=this._data.action?[this._data.action]:[],m=f.length>0?LD(f.map(_=>({id:_.id,label:_.title+"...",enabled:!0,run:()=>this._commandService.executeCommand(_.id,..._.arguments??[]),class:void 0,tooltip:_.tooltip??_.title})),{hoverDelegate:o.nativeHoverDelegate}):void 0;return Gv([s,r,d,l,u,h.length?xg():void 0,...h,g,p,...n,m?xg():void 0,m])}_getKeybinding(e){return e?o.observableFromEvent(this._contextKeyService.onDidChangeContext,()=>this._keybindingService.lookupKeybinding(e)):o.constObservable(void 0)}};Ig=xD([wg(3,o.IContextKeyService),wg(4,o.IKeybindingService),wg(5,o.ICommandService)],Ig);function Gv(c){return o.n.div({class:"content",style:{margin:4,minWidth:180}},c)}function ED(c){return o.n.div({class:"header",style:{color:o.asCssVariable(o.descriptionForeground),fontSize:"13px",fontWeight:"600",padding:"0 4px",lineHeight:28}},[c])}function ni(c){return o.derived({name:"inlineEdits.option"},e=>o.n.div({class:["monaco-menu-option",c.isActive?.map(t=>t&&"active")],onmouseenter:()=>c.onHoverChange?.(!0),onmouseleave:()=>c.onHoverChange?.(!1),onclick:c.onAction,onkeydown:t=>{t.key==="Enter"&&c.onAction?.()},tabIndex:0,style:{borderRadius:3}},[o.n.elem("span",{style:{fontSize:16,display:"flex"}},[o.ThemeIcon.isThemeIcon(c.icon)?o.renderIcon(c.icon):c.icon.map(t=>o.renderIcon(t))]),o.n.elem("span",{},[c.title]),o.n.div({style:{marginLeft:"auto"},ref:t=>{const i=e.store.add(new o.KeybindingLabel(t,a.OS,{disableTitle:!0,...o.defaultKeybindingLabelStyles,keybindingLabelShadow:void 0,keybindingLabelForeground:o.asCssVariable(o.descriptionForeground),keybindingLabelBackground:"transparent",keybindingLabelBorder:"transparent",keybindingLabelBottomBorder:void 0}));e.store.add(o.autorun(n=>{i.set(c.keybinding.read(n))}))}})]))}function LD(c,e){return o.derived({name:"inlineEdits.actionBar"},t=>o.n.div({class:["action-widget-action-bar"],style:{padding:"3px 24px"}},[o.n.div({ref:i=>{t.store.add(new o.ActionBar(i,e)).push(c,{icon:!1,label:!0})}})]))}function xg(){return o.n.div({id:"inline-edit-gutter-indicator-menu-separator",class:"menu-separator",style:{color:o.asCssVariable(o.editorActionListForeground),padding:"2px 0"}},o.n.div({style:{borderBottom:`1px solid ${o.asCssVariable(o.editorHoverBorder)}`}}))}var DD=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},vr=function(c,e){return function(t,i){e(t,i,c)}};class Zv{constructor(e,t,i,n,s){this.gutterMenuData=e,this.originalRange=t,this.model=i,this.altAction=n,this.customization=s}}class Pl{static fromInlineSuggestion(e){const t=e.action?.kind==="edit"?e.action.alternativeAction:void 0,i=e.source.inlineSuggestions.commands??[];return new Pl(e.gutterMenuLinkAction,e.source.provider.displayName??a.localize(1262,"Inline Suggestion"),i.length>0?[i]:[],t,e.source.provider.modelInfo,e.source.provider.setModelId?.bind(e.source.provider))}constructor(e,t,i,n,s,r,l=!1){this.action=e,this.displayName=t,this.extensionCommands=i,this.alternativeAction=n,this.modelInfo=s,this.setModelId=r,this.extensionCommandsOnly=l}}class Ol{static fromInlineCompletionModel(e){return new Ol(()=>e.accept(),()=>e.jump())}constructor(e,t){this.accept=e,this.jump=t}}const Eg=16,Xv=2;let Al=class extends a.Disposable{constructor(e,t,i,n,s,r,l,d,h,u,g){super(),this._editorObs=e,this._data=t,this._tabAction=i,this._verticalOffset=n,this._isHoveringOverInlineEdit=s,this._focusIsInMenu=r,this._hoverService=l,this._instantiationService=d,this._accessibilityService=h,this._themeService=u,this._userInteractionService=g,this._onDidCloseWithCommand=this._register(new a.Emitter),this._modifierPressed=o.derived(this,f=>this._userInteractionService.readModifierKeyStatus(this._editorObs.editor.getDomNode(),f).shiftKey),this._gutterIndicatorStyles=o.derived(this,f=>{let m=this._tabAction.read(f);const _=this._data.read(f)?.altAction,v=this._modifierPressed.read(f);switch(_&&v&&(m=Y.Inactive),m){case Y.Inactive:return{background:le(_g,this._themeService).read(f).toString(),foreground:le(hD,this._themeService).read(f).toString(),border:le(uD,this._themeService).read(f).toString()};case Y.Jump:return{background:le(pr,this._themeService).read(f).toString(),foreground:le(gr,this._themeService).read(f).toString(),border:le(ti,this._themeService).read(f).toString()};case Y.Accept:return{background:le(vg,this._themeService).read(f).toString(),foreground:le(gD,this._themeService).read(f).toString(),border:le(qv,this._themeService).read(f).toString()};default:a.assertNever()}}),this._state=o.derived(this,f=>{const m=this._originalRangeObs.read(f);if(m)return{range:m,lineOffsetRange:this._editorObs.observeLineOffsetRange(m,f.store)}}),this._lineNumberToRender=o.derived(this,f=>{if(this._verticalOffset.read(f)!==0)return"";const m=this._data.read(f)?.originalRange.startLineNumber,_=this._editorObs.getOption(76).read(f);if(m===void 0||_.renderType===0)return"";if(_.renderType===3){const v=this._editorObs.cursorPosition.read(f);return m%10===0||v&&v.lineNumber===m?m.toString():""}if(_.renderType===2){const v=this._editorObs.cursorPosition.read(f);if(!v)return"";const b=Math.abs(m-v.lineNumber);return b===0?m.toString():b.toString()}return _.renderType===4?_.renderFn?_.renderFn(m):"":m.toString()}),this._availableWidthForIcon=o.derived(this,f=>{const m=this._editorObs.editor.getModel(),_=this._editorObs.editor,v=this._editorObs.layoutInfo.read(f),b=v.decorationsLeft+v.decorationsWidth-v.glyphMarginLeft;if(!m||b<=0)return()=>0;if(v.lineNumbersLeft===0)return()=>b;const S=this._editorObs.getOption(76).read(f);if(S.renderType===2||S.renderType===0)return()=>b;const w=_.getOption(59).typicalHalfwidthCharacterWidth,I=v.lineNumbersLeft+v.lineNumbersWidth,y=(m.getLineCount()+1).toString().length,x=[];for(let L=1;L<=y;L++){const E=10**(L-1),R=_.getTopForLineNumber(E),D=L*w,T=Math.min(b,Math.max(0,I-D-v.glyphMarginLeft));x.push({firstLineNumberWithDigitCount:E,topOfLineNumber:R,usableWidthLeftOfLineNumber:T})}return L=>{for(let E=x.length-1;E>=0;E--)if(L>=x[E].topOfLineNumber)return x[E].usableWidthLeftOfLineNumber;throw new a.BugIndicatingError("Could not find avilable width for icon")}}),this._layout=o.derived(this,f=>{const m=this._state.read(f);if(!m)return;const _=this._editorObs.layoutInfo.read(f),v=this._editorObs.observeLineHeightForLine(m.range.map(Z=>Z.startLineNumber)).read(f),b=1,S=2,w=_.decorationsLeft+_.decorationsWidth-_.glyphMarginLeft-2*b,I=_.height-2*S,C=K.fromLeftTopWidthHeight(b,S,w,I),y=C.withTop(this._stickyScrollHeight.read(f)),x=C.withTop(y.top+S),L=m.lineOffsetRange.read(f),E=K.fromRanges(a.OffsetRange.fromTo(x.left,x.right),L),R=v,D=this._verticalOffset.read(f),T=E.withHeight(R).translateY(D),M=y.containsRect(T),A=this._data.read(f)?.customization?.icon,U=A?o.constObservable(A):this._tabAction.map(Z=>Z===Y.Accept?a.Codicon.keyboardTab:a.Codicon.arrowRight),F=A?o.constObservable(A):o.derived(this,Z=>{if(this._isHoveredOverIconDebounced.read(Z)||this._isHoveredOverInlineEditDebounced.read(Z))return a.Codicon.check;if(this._tabAction.read(Z)===Y.Accept)return a.Codicon.keyboardTab;const te=this._editorObs.cursorLineNumber.read(Z)??0,st=m.range.read(Z).startLineNumber;return te<=st?a.Codicon.keyboardTabAbove:a.Codicon.keyboardTabBelow}),k=22,P=Z=>{const te=this._availableWidthForIcon.read(void 0)(Z.bottom+this._editorObs.editor.getScrollTop())-b;return Math.max(Math.min(te,k),Eg)};if(M){const Z=T;let te;_.lineNumbersWidth===0?te=Math.max(0,Math.min(Math.max(_.lineNumbersLeft-C.left,0),Z.width-k)):te=Math.max(_.lineNumbersLeft+_.lineNumbersWidth-C.left,0);const st=Z.withWidth(te),jr=Eg+Xv,$r=Math.min(Z.width-te,k),ts=Z.withWidth(Math.max($r,jr)).translateX(te),_f=$r>=jr;return{gutterEditArea:E,icon:F,iconDirection:"right",iconRect:ts,iconVisible:_f,pillRect:Z,lineNumberRect:st}}const z=C.intersect(E);if(z&&z.height>=R){const Z=T.moveToBeContainedIn(x).moveToBeContainedIn(z),te=Z.withWidth(P(Z));return{gutterEditArea:E,icon:F,iconDirection:"right",iconRect:te,pillRect:te,iconVisible:!0}}const W=T.moveToBeContainedIn(C),B=W.withWidth(P(W)),ke=B,oe=B.top!!f),this._hoverVisible=o.observableValue(this,!1),this.isHoverVisible=this._hoverVisible,this._isHoveredOverIcon=o.observableValue(this,!1),this._isHoveredOverIconDebounced=o.debouncedObservable(this._isHoveredOverIcon,100),this.isHoveredOverIcon=this._isHoveredOverIconDebounced,this._indicator=o.n.div({class:"inline-edits-view-gutter-indicator",style:{position:"absolute",overflow:"visible"}},ht(this._layout).map(f=>f?[o.n.div({style:{position:"absolute",background:o.asCssVariable(pD),borderRadius:`${pe}px`,...fe(m=>f.read(m).gutterEditArea)}}),o.n.div({class:"icon",ref:this._iconRef,tabIndex:0,onclick:()=>{const _=this._layout.get()?.icon.get()===a.Codicon.check,v=this._data.get();if(!v)throw new a.BugIndicatingError("Gutter indicator data not available");this._editorObs.editor.focus(),_?v.model.accept():v.model.jump()},onmouseenter:()=>{this._showHover()},style:{cursor:"pointer",zIndex:"20",position:"absolute",backgroundColor:this._gutterIndicatorStyles.map(m=>m.background),"--vscodeIconForeground":this._gutterIndicatorStyles.map(m=>m.foreground),border:this._gutterIndicatorStyles.map(m=>`1px solid ${m.border}`),boxSizing:"border-box",borderRadius:`${pe}px`,display:"flex",justifyContent:f.map(m=>m.iconDirection==="bottom"?"flex-start":"flex-end"),transition:this._modifierPressed.map(m=>m?"":"background-color 0.2s ease-in-out, width 0.2s ease-in-out"),...fe(m=>f.read(m).pillRect)}},[o.n.div({className:"line-number",style:{lineHeight:f.map(m=>m.lineNumberRect?m.lineNumberRect.height:0),display:f.map(m=>m.lineNumberRect?"flex":"none"),alignItems:"center",justifyContent:"flex-end",width:f.map(m=>m.lineNumberRect?m.lineNumberRect.width:0),height:"100%",color:this._gutterIndicatorStyles.map(m=>m.foreground)}},this._lineNumberToRender),o.n.div({style:{transform:f.map(m=>`rotate(${RD(m.iconDirection)}deg)`),transition:"rotate 0.2s ease-in-out, opacity 0.2s ease-in-out",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",opacity:f.map(m=>m.iconVisible?"1":"0"),marginRight:f.map(m=>m.pillRect.width-m.iconRect.width-(m.lineNumberRect?.width??0)),width:f.map(m=>m.iconRect.width),position:"relative",right:f.map(m=>m.iconDirection==="top"?"1px":"0"),color:this._data.map(m=>m?.customization?.icon?.color?o.asCssVariable(m.customization.icon.color.id):void 0)}},[f.map((m,_)=>TD(o.renderIcon(m.icon.read(_)),{fontSize:ND(Math.min(m.iconRect.width-Xv,Eg))}))])])]:[])),this._originalRangeObs=ht(this._data.map(f=>f?.originalRange)),this._stickyScrollController=ze.get(this._editorObs.editor),this._stickyScrollHeight=this._stickyScrollController?o.observableFromEvent(this._stickyScrollController.onDidChangeStickyScrollHeight,()=>this._stickyScrollController.stickyScrollWidgetHeight):o.constObservable(0),this._isHoveredOverInlineEditDebounced=o.debouncedObservable(this._isHoveringOverInlineEdit,100);const p=this._indicator.keepUpdated(this._store);this._register(this._editorObs.createOverlayWidget({domNode:p.element,position:o.constObservable(null),allowEditorOverflow:!1,minContentWidthInPx:o.constObservable(0)})),this._register(this._editorObs.editor.onMouseMove(f=>{if(this._state.get()===void 0)return;const v=this._iconRef.element.getBoundingClientRect(),b=K.fromLeftTopWidthHeight(v.left,v.top,v.width,v.height),S=new o.Point(f.event.posx,f.event.posy);this._isHoveredOverIcon.set(b.containsPoint(S),void 0)})),this._register(this._editorObs.editor.onDidScrollChange(()=>{this._isHoveredOverIcon.set(!1,void 0)})),this._register(o.runOnChange(this._isHoveredOverInlineEditDebounced,f=>{f&&this.triggerAnimation()})),this._register(o.autorun(f=>{p.readEffect(f),p.element&&this._editorObs.editor.applyFontInfo(p.element)}))}triggerAnimation(){return this._accessibilityService.isMotionReduced()?new Animation(null,null).finished:this._iconRef.element.animate([{outline:`2px solid ${this._gutterIndicatorStyles.map(t=>t.border).get()}`,outlineOffset:"-1px",offset:0},{outline:"2px solid transparent",outlineOffset:"10px",offset:1}],{duration:500}).finished}_showHover(){if(this._hoverVisible.get())return;const e=this._data.get();if(!e)throw new a.BugIndicatingError("Gutter indicator data not available");const t=new a.DisposableStore,i=t.add(this._instantiationService.createInstance(Ig,this._editorObs,e.gutterMenuData,(r,l)=>{r&&this._editorObs.editor.focus(),l&&this._onDidCloseWithCommand.fire(l),s?.dispose()}).toDisposableLiveElement()),n=this._userInteractionService.createFocusTracker(i.element,t);t.add(o.autorun(r=>{this._focusIsInMenu.set(n.read(r),void 0)})),t.add(a.toDisposable(()=>this._focusIsInMenu.set(!1,void 0)));const s=this._hoverService.showInstantHover({target:this._iconRef.element,content:i.element});s?(this._hoverVisible.set(!0,void 0),t.add(this._editorObs.editor.onDidScrollChange(()=>s.dispose())),t.add(s.onDispose(()=>{this._hoverVisible.set(!1,void 0),t.dispose()}))):t.dispose()}};Al=DD([vr(6,o.IHoverService),vr(7,o.IInstantiationService),vr(8,o.IAccessibilityService),vr(9,o.IThemeService),vr(10,o.IUserInteractionService)],Al);function RD(c){switch(c){case"top":return 90;case"bottom":return-90;case"right":return 0}}function TD(c,e){for(const t in e)c.style[t]=e[t];return c}function ND(c){return`${c}px`}var MD=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Yv=function(c,e){return function(t,i){e(t,i,c)}},xe;(function(c){c.FirstTime="firstTime",c.SecondTime="secondTime",c.Active="active"})(xe||(xe={}));let Lg=class extends a.Disposable{constructor(e,t,i,n,s){super(),this._model=e,this._indicator=t,this._collapsedView=i,this._storageService=n,this._configurationService=s,this._disposables=this._register(new a.MutableDisposable),this._setupDone=o.observableValue({name:"setupDone"},!1),this._activeCompletionId=o.derived(r=>{const l=this._model.read(r);if(!l||!this._setupDone.read(r))return;const d=this._indicator.read(r);if(!(!d||!d.isVisible.read(r)))return l.inlineEdit.inlineCompletion.identity.id}),this._register(this._initializeDebugSetting()),this._disposables.value=this.setupNewUserExperience(),this._setupDone.set(!0,void 0)}setupNewUserExperience(){if(this.getNewUserType()===xe.Active)return;const e=new a.DisposableStore;let t=!1,i=!1,n=0,s=0;return e.add(o.runOnChangeWithCancellationToken(this._activeCompletionId,async(r,l,d,h)=>{if(r===void 0)return;let u=this.getNewUserType();switch(u){case xe.FirstTime:{(n++>=5||t)&&(u=xe.SecondTime,this.setNewUserType(u));break}case xe.SecondTime:{s++>=3&&i&&(u=xe.Active,this.setNewUserType(u));break}}switch(u){case xe.FirstTime:{for(let g=0;g<3&&!h.isCancellationRequested;g++)await this._indicator.get()?.triggerAnimation(),await a.timeout(500);break}case xe.SecondTime:{this._indicator.get()?.triggerAnimation();break}}})),e.add(o.autorun(r=>{this._collapsedView.isVisible.read(r)&&this.getNewUserType()!==xe.Active&&this._collapsedView.triggerAnimation()})),e.add(o.autorun(r=>{const l=this._indicator.read(r);l&&r.store.add(o.runOnChange(l.isHoveredOverIcon,async d=>{d&&(t=!0)}))})),e.add(o.autorun(r=>{const l=this._model.read(r);l&&r.store.add(l.onDidAccept(()=>{i=!0}))})),e}getNewUserType(){return this._storageService.get("inlineEditsGutterIndicatorUserKind",-1,xe.FirstTime)}setNewUserType(e){switch(e){case xe.FirstTime:throw new a.BugIndicatingError("UserKind should not be set to first time");case xe.SecondTime:break;case xe.Active:this._disposables.clear();break}this._storageService.store("inlineEditsGutterIndicatorUserKind",e,-1,0)}_initializeDebugSetting(){const e="editor.inlineSuggest.edits.resetNewUserExperience";return this._configurationService.getValue(e)&&this._storageService.remove("inlineEditsGutterIndicatorUserKind",-1),this._configurationService.onDidChangeConfiguration(i=>{i.affectsConfiguration(e)&&this._configurationService.getValue(e)&&(this._storageService.remove("inlineEditsGutterIndicatorUserKind",-1),this._disposables.value=this.setupNewUserExperience())})}};Lg=MD([Yv(3,o.IStorageService),Yv(4,o.IConfigurationService)],Lg);const Bc=class Bc{constructor(e){this.replacements=e,a.assert(a.checkAdjacentItems(e,(t,i)=>t.lineRange.endLineNumberExclusive<=i.lineRange.startLineNumber))}toString(){return this.replacements.map(e=>e.toString()).join(",")}getNewLineRanges(){const e=[];let t=0;for(const i of this.replacements)e.push(a.LineRange.ofLength(i.lineRange.startLineNumber+t,i.newLines.length)),t+=i.newLines.length-i.lineRange.length;return e}};Bc.empty=new Bc([]);let Dg=Bc;class br{static fromSingleTextEdit(e,t){const i=a.splitLines(e.text);let n=e.range.startLineNumber;const s=t.getValueOfRange(a.Range.fromPositions(new a.Position(e.range.startLineNumber,1),e.range.getStartPosition()));i[0]=s+i[0];let r=e.range.endLineNumber+1;const l=t.getTransformer().getLineLength(e.range.endLineNumber)+1,d=t.getValueOfRange(a.Range.fromPositions(e.range.getEndPosition(),new a.Position(e.range.endLineNumber,l)));i[i.length-1]=i[i.length-1]+d;const h=e.range.startColumn===t.getTransformer().getLineLength(e.range.startLineNumber)+1,u=e.range.endColumn===1;return h&&i[0].length===s.length&&(n++,i.shift()),i.length>0&&n${JSON.stringify(this.newLines)}`}toLineEdit(){return new Dg([this])}}class PD{get lineEdit(){return this.action?.kind==="jumpTo"?new br(a.LineRange.ofLength(this.action.position.lineNumber,0),[]):this.action?.kind==="edit"?br.fromSingleTextEdit(this.edit.toReplacement(this.originalText),this.originalText):new br(new a.LineRange(1,1),[])}get originalLineRange(){return this.lineEdit.lineRange}get modifiedLineRange(){return this.lineEdit.toLineEdit().getNewLineRanges()[0]}get displayRange(){return this.originalText.lineRange.intersect(this.originalLineRange.join(a.LineRange.ofLength(this.originalLineRange.startLineNumber,this.lineEdit.newLines.length)))}constructor(e,t,i,n,s,r,l){this.originalText=e,this.action=t,this.edit=i,this.cursorPosition=n,this.multiCursorPositions=s,this.commands=r,this.inlineCompletion=l}}class OD{constructor(e,t,i){this._model=e,this.inlineEdit=t,this.tabAction=i,this.editorType=this._model.editorType,this.displayLocation=this.inlineEdit.inlineCompletion.hint,this.inViewPort=o.derived(this,n=>xv(this._model.editor,this.inlineEdit.inlineCompletion,n)),this.onDidAccept=this._model.onDidAccept}accept(e){this._model.accept(void 0,e)}handleInlineEditShownNextFrame(e,t){const i=this.inlineEdit.inlineCompletion,n=Date.now();i.addRef(),a.setTimeout0(()=>{this._model.handleInlineSuggestionShown(i,e,t,n),i.removeRef()})}}var AD=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},FD=function(c,e){return function(t,i){e(t,i,c)}};let Rg=class extends a.Disposable{constructor(e,t,i){super(),this._editor=e,this._edit=t,this._accessibilityService=i,this.onDidClick=a.Event.None,this._iconRef=o.n.ref(),this.isHovered=o.constObservable(!1),this._editorObs=o.observableCodeEditor(this._editor);const s=this._edit.map(h=>h?.edit?.replacements[0]??null).map(h=>h?Xt(h,this._editor.getModel()).range.getStartPosition():null),r=this._editorObs.observePosition(s,this._store),l=o.derived(h=>{const u=r.read(h);if(!u)return null;const g=this._editorObs.layoutInfoContentLeft.read(h),p=this._editorObs.scrollLeft.read(h);return new o.Point(g+u.x-p,u.y)}),d=o.n.div({class:"inline-edits-collapsed-view",style:{position:"absolute",overflow:"visible",top:"0px",left:"0px",display:"block"}},[[this.getCollapsedIndicator(l)]]).keepUpdated(this._store).element;this._register(this._editorObs.createOverlayWidget({domNode:d,position:o.constObservable(null),allowEditorOverflow:!1,minContentWidthInPx:o.constObservable(0)})),this.isVisible=this._edit.map((h,u)=>!!h&&l.read(u)!==null)}triggerAnimation(){return this._accessibilityService.isMotionReduced()?new Animation(null,null).finished:this._iconRef.element.animate([{offset:0,transform:"translateY(-3px)"},{offset:.2,transform:"translateY(1px)"},{offset:.36,transform:"translateY(-1px)"},{offset:.52,transform:"translateY(1px)"},{offset:.68,transform:"translateY(-1px)"},{offset:.84,transform:"translateY(1px)"},{offset:1,transform:"translateY(0px)"}],{duration:2e3}).finished}getCollapsedIndicator(e){const t=this._editorObs.layoutInfoContentLeft,i=e.map((s,r)=>s?s.deltaX(-t.read(r)):null),n=this.createIconPath(i);return o.n.svg({class:"collapsedView",ref:this._iconRef,style:{position:"absolute",...fe(s=>Sg(this._editorObs).read(s)),overflow:"hidden",pointerEvents:"none"}},[o.n.svgElem("path",{class:"collapsedViewPath",d:n,fill:o.asCssVariable(ti)})])}createIconPath(e){return e.map(s=>{if(!s)return new yg().build();const r=s.deltaX(-6/2).deltaY(-1),l=r.deltaX(6),d=r.deltaY(1),h=l.deltaY(1),u=d.deltaX(6/2).deltaY(3);return new yg().moveTo(r).lineTo(l).lineTo(h).lineTo(u).lineTo(d).lineTo(r).build()})}};Rg=AD([FD(2,o.IAccessibilityService)],Rg);var zD=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Qv=function(c,e){return function(t,i){e(t,i,c)}};const Fl=14,Tg=0,Ot=4,zl=4,Jv=2;let Ng=class extends a.Disposable{constructor(e,t,i,n,s,r){super(),this._editor=e,this._languageService=r,this._onDidClick=this._register(new a.Emitter),this.onDidClick=this._onDidClick.event,this._isHovered=o.observableValue(this,!1),this.isHovered=this._isHovered,this._viewRef=o.n.ref(),this._editorObs=o.observableCodeEditor(this._editor);const l=i.map((g,p)=>{let f;switch(g){case Y.Inactive:f=_g;break;case Y.Jump:f=pr;break;case Y.Accept:f=vg;break}return{border:le(f,s).read(p).toString(),background:ii(n.read(p))}}),d=t.map(g=>g?this.getState(g):void 0),h=d.map(g=>g?this.getRendering(g,l):void 0);this.minEditorScrollHeight=o.derived(this,g=>{const p=d.read(g);return p?p.rect.read(g).bottom+this._editor.getScrollTop():0});const u=o.n.div({class:"inline-edits-custom-view",style:{position:"absolute",overflow:"visible",top:"0px",left:"0px",display:"block"}},[h]).keepUpdated(this._store);this._register(this._editorObs.createOverlayWidget({domNode:u.element,position:o.constObservable(null),allowEditorOverflow:!1,minContentWidthInPx:o.derivedObservableWithCache(this,(g,p)=>{const f=d.read(g);if(!f)return p??0;const m=f.rect.map(_=>_.right).read(g)+this._editorObs.layoutInfoVerticalScrollbarWidth.read(g)+Ot-this._editorObs.layoutInfoContentLeft.read(g);return Math.max(p??0,m)}).recomputeInitiallyAndOnChange(this._store)})),this._register(o.autorun(g=>{if(!h.read(g)){this._isHovered.set(!1,void 0);return}this._isHovered.set(u.isHovered.read(g),void 0)}))}fitsInsideViewport(e,t,i){const n=this._editorObs.layoutInfoWidth.read(i),s=this._editorObs.layoutInfoContentLeft.read(i),r=this._editor.getLayoutInfo().verticalScrollbarWidth,l=this._editorObs.layoutInfoMinimap.read(i).minimapLeft!==0?this._editorObs.layoutInfoMinimap.read(i).minimapWidth:0,d=Pt(this._editorObs,e,void 0),h=Cg(t,this._editor,this._editor.getModel()),u=Ot+Fl;return d+h+u{const d=e.range.startLineNumber,h=e.range.endLineNumber,u=e.range.startColumn,g=e.range.endColumn,p=this._editor.getModel()?.getLineCount()??0,f=Pt(this._editorObs,new a.LineRange(d,d+1),l),m=d+1<=p?Pt(this._editorObs,new a.LineRange(d+1,d+2),l):void 0,_=d-1>=1?Pt(this._editorObs,new a.LineRange(d-1,d),l):void 0,v=this._editor.getOffsetForColumn(d,u),b=this._editor.getOffsetForColumn(h,g);return{lineWidth:f,lineWidthBelow:m,lineWidthAbove:_,startContentLeftOffset:v,endContentLeftOffset:b}}),i=e.range.startLineNumber,n=e.range.endLineNumber,s=this.fitsInsideViewport(new a.LineRange(i,n+1),e.content,void 0);return{rect:o.derived(this,l=>{const d=this._editorObs.getOption(59).read(l).typicalHalfwidthCharacterWidth,{lineWidth:h,lineWidthBelow:u,lineWidthAbove:g,startContentLeftOffset:p,endContentLeftOffset:f}=t.read(l),m=this._editorObs.layoutInfoContentLeft.read(l),_=this._editorObs.observeLineHeightForLine(i).recomputeInitiallyAndOnChange(l.store).read(l),v=this._editorObs.scrollTop.read(l),b=this._editorObs.scrollLeft.read(l);let S;i===n&&f+5*d>=h&&s?S="end":u!==void 0&&u+Fl-zl-Otd.withMargin(0,Ot));return o.n.div({class:"collapsedView",ref:this._viewRef,style:{position:"absolute",...fe(d=>l.read(d)),overflow:"hidden",boxSizing:"border-box",cursor:"pointer",border:t.map(d=>`1px solid ${d.border}`),borderRadius:`${pe}px`,backgroundColor:t.map(d=>d.background),display:"flex",alignItems:"center",justifyContent:"center",whiteSpace:"nowrap"},onmousedown:d=>{d.preventDefault()},onclick:d=>{this._onDidClick.fire(Yt.create(d))}},[i])}};Ng=zD([Qv(4,o.IThemeService),Qv(5,o.ILanguageService)],Ng);const VD=0,BD=0,Mg=1,KD=1,UD=3,Pg=pe;class kD extends a.Disposable{constructor(e,t,i,n){super(),this._editor=e,this._edit=t,this._uiState=i,this._tabAction=n,this.onDidClick=a.Event.None,this._display=o.derived(this,l=>this._uiState.read(l)?"block":"none"),this._editorMaxContentWidthInRange=o.derived(this,l=>{const d=this._originalDisplayRange.read(l);return d?(this._editorObs.versionId.read(l),o.derivedObservableWithCache(this,(h,u)=>{const g=Pt(this._editorObs,d,h);return Math.max(g,u??0)})):o.constObservable(0)}).map((l,d)=>l.read(d)),this._maxPrefixTrim=o.derived(this,l=>{const d=this._uiState.read(l);return d?bg(d.deletions,d.originalRange,[],this._editor):{prefixTrim:0,prefixLeftOffset:0}}),this._editorLayoutInfo=o.derived(this,l=>{const d=this._edit.read(l);if(!d||!this._uiState.read(l))return null;const u=this._editorObs.layoutInfo.read(l),g=this._editorObs.scrollLeft.read(l),p=this._editorObs.getOption(59).map(w=>w.typicalHalfwidthCharacterWidth).read(l),f=u.contentLeft+Math.max(this._editorMaxContentWidthInRange.read(l),p)-g,m=d.originalLineRange,_=this._originalVerticalStartPosition.read(l)??this._editor.getTopForLineNumber(m.startLineNumber)-this._editorObs.scrollTop.read(l),v=this._originalVerticalEndPosition.read(l)??this._editor.getTopForLineNumber(m.endLineNumberExclusive)-this._editorObs.scrollTop.read(l),b=u.contentLeft+this._maxPrefixTrim.read(l).prefixLeftOffset-g;return f<=b?null:{codeRect:K.fromLeftTopRightBottom(b,_,f,v).withMargin(BD,VD),contentLeft:u.contentLeft}}).recomputeInitiallyAndOnChange(this._store),this._originalOverlay=o.n.div({style:{pointerEvents:"none"}},o.derived(this,l=>{const d=ht(this._editorLayoutInfo).read(l);if(!d)return;const h=d.map(m=>K.fromLeftTopRightBottom(m.contentLeft-Pg-Mg,m.codeRect.top,m.contentLeft,m.codeRect.bottom)),u=o.derived(this,m=>{const _=d.read(m).codeRect,v=h.read(m);return _.intersectHorizontal(new a.OffsetRange(v.left,Number.MAX_SAFE_INTEGER))}),g=this._uiState.map(m=>m?.editorType===J.DiffEditor?UD:KD).read(l),p=u.map(m=>m.withMargin(g,g)),f=ii(this._uiState.map(m=>m?.editorType??J.TextEditor).read(l));return[o.n.div({class:"originalSeparatorDeletion",style:{...p.read(l).toStyles(),borderRadius:`${Pg}px`,border:`${Mg+g}px solid ${f}`,boxSizing:"border-box"}}),o.n.div({class:"originalOverlayDeletion",style:{...u.read(l).toStyles(),borderRadius:`${Pg}px`,border:Nl(this._tabAction).map(m=>`${Mg}px solid ${o.asCssVariable(m)}`),boxSizing:"border-box",backgroundColor:o.asCssVariable(ur)}}),o.n.div({class:"originalOverlayHiderDeletion",style:{...h.read(l).toStyles(),backgroundColor:f}})]})).keepUpdated(this._store),this._nonOverflowView=o.n.div({class:"inline-edits-view",style:{position:"absolute",overflow:"visible",top:"0px",left:"0px",display:this._display}},[[this._originalOverlay]]).keepUpdated(this._store),this.isHovered=o.constObservable(!1),this._editorObs=o.observableCodeEditor(this._editor);const s=o.derived(this,l=>{const d=this._edit.read(l);return d?new a.Position(d.originalLineRange.startLineNumber,1):null}),r=o.derived(this,l=>{const d=this._edit.read(l);return d?new a.Position(d.originalLineRange.endLineNumberExclusive,1):null});this._originalDisplayRange=this._uiState.map(l=>l?.originalRange),this._originalVerticalStartPosition=this._editorObs.observePosition(s,this._store).map(l=>l?.y),this._originalVerticalEndPosition=this._editorObs.observePosition(r,this._store).map(l=>l?.y),this._register(this._editorObs.createOverlayWidget({domNode:this._nonOverflowView.element,position:o.constObservable(null),allowEditorOverflow:!1,minContentWidthInPx:o.derived(this,l=>{const d=this._editorLayoutInfo.read(l);return d===null?0:d.codeRect.width})}))}}var jD=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Wv=function(c,e){return function(t,i){e(t,i,c)}};const Cr=1,$D=1,qD=3,Og=pe;let Ag=class extends a.Disposable{constructor(e,t,i,n,s){super(),this._editor=e,this._input=t,this._tabAction=i,this._languageService=s,this._onDidClick=this._register(new a.Emitter),this.onDidClick=this._onDidClick.event,this._state=o.derived(this,r=>{const l=this._input.read(r);if(!l)return;const d=this._editor.getModel(),h=d.getEOL();if(l.startColumn===1&&l.lineNumber>1&&d.getLineLength(l.lineNumber)!==0&&l.text.endsWith(h)&&!l.text.startsWith(h)){const u=d.getLineLength(l.lineNumber-1)+1;return{lineNumber:l.lineNumber-1,column:u,text:h+l.text.slice(0,-h.length)}}return{lineNumber:l.lineNumber,column:l.startColumn,text:l.text}}),this._trimVertically=o.derived(this,r=>{const l=this._state.read(r),d=l?.text;if(!d||d.trim()==="")return{topOffset:0,bottomOffset:0,linesTop:0,linesBottom:0};const h=this._editor.getLineHeightForPosition(new a.Position(l.lineNumber,1)),u=this._editor.getModel().getEOL();let g=0,p=0,f=0;for(;ff&&d.endsWith(u,m);m-=u.length)p+=1;return{topOffset:g*h,bottomOffset:p*h,linesTop:g,linesBottom:p}}),this._maxPrefixTrim=o.derived(this,r=>{const l=this._state.read(r);if(!l)return{prefixLeftOffset:0,prefixTrim:0};const d=this._editor.getModel(),h=d.getEOL(),u=this._trimVertically.read(r),g=l.text.split(h),p=g.slice(u.linesTop,g.length-u.linesBottom);u.linesTop===0&&(p[0]=d.getLineContent(l.lineNumber)+p[0]);const f=new a.LineRange(l.lineNumber,l.lineNumber+(u.linesTop>0?0:1));return bg([],f,p,this._editor)}),this._ghostText=o.derived(r=>{const l=this._state.read(r),d=this._maxPrefixTrim.read(r);if(!l)return;const u=this._editor.getModel().getEOL(),p=l.text.split(u).map((f,m)=>new o.InlineDecoration(new a.Range(m+1,m===0?1:d.prefixTrim+1,m+1,f.length+1),"modified-background",0));return new Qo(l.lineNumber,[new gl(l.column,l.text,!1,p)])}),this._display=o.derived(this,r=>this._state.read(r)?"block":"none"),this._editorMaxContentWidthInRange=o.derived(this,r=>{const l=this._state.read(r);if(!l)return 0;this._editorObs.versionId.read(r);const d=this._editor.getModel(),h=d.getEOL(),u=l.text.startsWith(h)?"":d.getValueInRange(new a.Range(l.lineNumber,1,l.lineNumber,l.column)),g=d.getValueInRange(new a.Range(l.lineNumber,l.column,l.lineNumber,d.getLineLength(l.lineNumber)+1)),f=(u+l.text+g).split(h),m=o.RenderOptions.fromEditor(this._editor).withSetWidth(!1).withScrollBeyondLastColumn(0),_=f.map(v=>{const b=d.tokenization.tokenizeLinesAt(l.lineNumber,[v])?.[0];let S;return b?S=o.TokenArray.fromLineTokens(b).toLineTokens(v,this._languageService.languageIdCodec):S=o.LineTokens.createEmpty(v,this._languageService.languageIdCodec),o.renderLines(new o.LineSource([S]),m,[],o.$("div"),!0).minWidthInPx});return Math.max(..._)}),this.startLineOffset=this._trimVertically.map(r=>r.topOffset),this.originalLines=this._state.map(r=>r?new a.LineRange(r.lineNumber,Math.min(r.lineNumber+2,this._editor.getModel().getLineCount()+1)):void 0),this._overlayLayout=o.derived(this,r=>{this._ghostText.read(r);const l=this._state.read(r);if(!l)return null;this._editorObs.observePosition(o.observableValue(this,new a.Position(l.lineNumber,l.column)),r.store).read(r);const d=this._editorObs.layoutInfo.read(r),h=this._editorObs.scrollLeft.read(r),u=this._editorObs.layoutInfoVerticalScrollbarWidth.read(r),g=d.contentLeft+this._editorMaxContentWidthInRange.read(r)-h,p=this._maxPrefixTrim.read(r).prefixLeftOffset??0,f=d.contentLeft+p-h;if(g<=f)return null;const{topOffset:m,bottomOffset:_}=this._trimVertically.read(r),v=this._editorObs.scrollTop.read(r),b=this._ghostTextView.height.read(r)-m-_,S=this._editor.getTopForLineNumber(l.lineNumber)-v+m,w=S+b,I=new K(f,S,g,w);return{overlay:I,startsAtContentLeft:p===0,contentLeft:d.contentLeft,minContentWidthRequired:p+I.width+u}}).recomputeInitiallyAndOnChange(this._store),this._modifiedOverlay=o.n.div({style:{pointerEvents:"none"}},o.derived(this,r=>{const l=ht(this._overlayLayout).read(r);if(!l)return;const d=l.map(f=>K.fromLeftTopRightBottom(f.contentLeft-Og-Cr,f.overlay.top,f.contentLeft,f.overlay.bottom)).read(r),h=this._input.map(f=>f?.editorType===J.DiffEditor?qD:$D).read(r),u=l.map(f=>f.overlay.withMargin(0,Cr,0,f.startsAtContentLeft?0:Cr).intersectHorizontal(new a.OffsetRange(d.left,Number.MAX_SAFE_INTEGER))),g=u.map(f=>f.withMargin(h,h)),p=ii(this._input.read(void 0)?.editorType??J.TextEditor);return[o.n.div({class:"originalUnderlayInsertion",style:{...g.read(r).toStyles(),borderRadius:Og,border:`${Cr+h}px solid ${p}`,boxSizing:"border-box"}}),o.n.div({class:"originalOverlayInsertion",style:{...u.read(r).toStyles(),borderRadius:Og,border:_r(this._tabAction).map(f=>`${Cr}px solid ${o.asCssVariable(f)}`),boxSizing:"border-box",backgroundColor:o.asCssVariable($v)}}),o.n.div({class:"originalOverlayHiderInsertion",style:{...d.toStyles(),backgroundColor:p}})]})).keepUpdated(this._store),this._view=o.n.div({class:"inline-edits-view",style:{position:"absolute",overflow:"visible",top:"0px",left:"0px",display:this._display}},[[this._modifiedOverlay]]).keepUpdated(this._store),this._editorObs=o.observableCodeEditor(this._editor),this._ghostTextView=this._register(n.createInstance(rr,this._editor,o.derived(r=>{const l=this._ghostText.read(r);if(l)return{ghostText:l,handleInlineCompletionShown:d=>{},warning:void 0}}),{extraClasses:["inline-edit"],isClickable:!0,shouldKeepCursorStable:!0})),this.isHovered=this._ghostTextView.isHovered,this._register(this._ghostTextView.onDidClick(r=>{this._onDidClick.fire(new Yt(r))})),this._register(this._editorObs.createOverlayWidget({domNode:this._view.element,position:o.constObservable(null),allowEditorOverflow:!1,minContentWidthInPx:o.derived(this,r=>{const l=this._overlayLayout.read(r);return l===null?0:l.minContentWidthRequired})}))}};Ag=jD([Wv(3,o.IInstantiationService),Wv(4,o.ILanguageService)],Ag);var GD=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Hv=function(c,e){return function(t,i){e(t,i,c)}};let Fg=class extends a.Disposable{constructor(e,t,i,n,s,r){super(),this._editor=e,this._edit=t,this._editorType=i,this._tabAction=n,this._languageService=s,this._themeService=r,this._onDidClick=this._register(new a.Emitter),this.onDidClick=this._onDidClick.event,this._maxPrefixTrim=this._edit.map((l,d)=>l?bg(l.replacements.flatMap(h=>[h.originalRange,h.modifiedRange]),l.originalRange,l.modifiedLines,this._editor.editor,d):void 0),this._modifiedLineElements=o.derived(this,l=>{const d=[];let h=0;const u=this._maxPrefixTrim.read(l),g=this._edit.read(l);if(!g||!u)return;const p=u.prefixTrim,f=ZD(g.replacements.map(v=>v.modifiedRange)).map(v=>new a.Range(v.startLineNumber,v.startColumn-p,v.endLineNumber,v.endColumn-p)),m=this._editor.model.get(),_=g.modifiedRange.startLineNumber;for(let v=0;vE.startLineNumber===S)){const E=Math.min(L.endColumn,w.length+1);y.push(new o.InlineDecoration(new a.Range(1,L.startColumn,1,E),"inlineCompletions-modified-bubble",0))}const x=o.renderLines(new o.LineSource([C]),o.RenderOptions.fromEditor(this._editor.editor).withSetWidth(!1).withScrollBeyondLastColumn(0),y,b,!0);this._editor.getOption(59).read(l),h=Math.max(h,x.minWidthInPx),d.push(b)}return{lines:d,requiredWidth:h}}),this._layout=o.derived(this,l=>{const d=this._modifiedLineElements.read(l),h=this._maxPrefixTrim.read(l),u=this._edit.read(l);if(!d||!h||!u)return;const{prefixLeftOffset:g}=h,{requiredWidth:p}=d,f=this._editor.observeLineHeightsForLineRange(u.originalRange).read(l),m=(()=>{const F=f.slice(0,u.modifiedRange.length);for(;F.lengththis._editor.editor.getOffsetForColumn(F,I.getLineMaxColumn(F))-g),y=Math.max(...C,p),x=u.originalRange.startLineNumber,L=u.originalRange.endLineNumberExclusive-1,E=this._editor.editor.getTopForLineNumber(x)-S,R=this._editor.editor.getBottomForLineNumber(L)-S,D=K.fromLeftTopWidthHeight(w+g,E,y,R-E),T=K.fromLeftTopWidthHeight(D.left,D.bottom,D.width,m.reduce((F,k)=>F+k,0)),M=K.hull([D,T]),A=M.intersectVertical(new a.OffsetRange(D.bottom,Number.MAX_SAFE_INTEGER)),U=new K(A.left,A.top,A.right,A.bottom);return{originalLinesOverlay:D,modifiedLinesOverlay:T,background:M,lowerBackground:A,lowerText:U,modifiedLineHeights:m,minContentWidthRequired:g+y+v}}),this._viewZoneInfo=o.derived(l=>{if(!this._editor.getOption(71).map(f=>f.edits.allowCodeShifting==="always").read(l))return;const h=this._layout.read(l),u=this._edit.read(l);if(!h||!u)return;const g=h.lowerBackground.height,p=u.originalRange.endLineNumberExclusive;return{height:g,lineNumber:p}}),this.minEditorScrollHeight=o.derived(this,l=>{const d=ht(this._layout).read(l);return!d||this._viewZoneInfo.read(l)!==void 0?0:d.read(l).lowerText.bottom+this._editor.editor.getScrollTop()}),this._div=o.n.div({class:"line-replacement"},[o.derived(this,l=>{const d=ht(this._layout).read(l),h=this._modifiedLineElements.read(l);if(!d||!h)return[];const u=d.read(l),g=this._editor.layoutInfoContentLeft.read(l),p=this._editorType.read(l)===J.DiffEditor?3:1;h.lines.forEach((v,b)=>{v.style.width=`${u.lowerText.width}px`,v.style.height=`${u.modifiedLineHeights[b]}px`,v.style.position="relative"});const f=_r(this._tabAction).read(l),m=Nl(this._tabAction).read(l),_=ii(this._editorType.read(l));return[o.n.div({style:{position:"absolute",...fe(v=>Sg(this._editor).read(v)),overflow:"hidden",pointerEvents:"none"}},[o.n.div({class:"borderAroundLineReplacement",style:{position:"absolute",...fe(v=>d.read(v).background.translateX(-g).withMargin(p)),borderRadius:`${pe}px`,border:`${p+1}px solid ${_}`,boxSizing:"border-box",pointerEvents:"none"}}),o.n.div({class:"originalOverlayLineReplacement",style:{position:"absolute",...fe(v=>d.read(v).background.translateX(-g)),borderRadius:`${pe}px`,border:le(m,this._themeService).map(v=>`1px solid ${v.toString()}`),pointerEvents:"none",boxSizing:"border-box",background:o.asCssVariable(ur)}}),o.n.div({class:"modifiedOverlayLineReplacement",style:{position:"absolute",...fe(v=>d.read(v).lowerBackground.translateX(-g)),borderRadius:`0 0 ${pe}px ${pe}px`,background:_,boxShadow:`${o.asCssVariable(o.scrollbarShadow)} 0 6px 6px -6px`,border:`1px solid ${o.asCssVariable(f)}`,boxSizing:"border-box",overflow:"hidden",cursor:"pointer",pointerEvents:"auto"},onmousedown:v=>{v.preventDefault()},onclick:v=>this._onDidClick.fire(Yt.create(v))},[o.n.div({style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:o.asCssVariable(cD)}})]),o.n.div({class:"modifiedLinesLineReplacement",style:{position:"absolute",boxSizing:"border-box",...fe(v=>d.read(v).lowerText.translateX(-g)),fontFamily:this._editor.getOption(58),fontSize:this._editor.getOption(61),fontWeight:this._editor.getOption(62),pointerEvents:"none",whiteSpace:"nowrap",borderRadius:`0 0 ${pe}px ${pe}px`,overflow:"hidden"}},[...h.lines])])]})]).keepUpdated(this._store),this.isHovered=this._editor.isTargetHovered(l=>this._isMouseOverWidget(l),this._store),this._previousViewZoneInfo=void 0,this._register(a.toDisposable(()=>this._editor.editor.changeViewZones(l=>this.removePreviousViewZone(l)))),this._register(o.autorunDelta(this._viewZoneInfo,({lastValue:l,newValue:d})=>{l===d||l?.height===d?.height&&l?.lineNumber===d?.lineNumber||this._editor.editor.changeViewZones(h=>{this.removePreviousViewZone(h),d&&this.addViewZone(d,h)})})),this._register(this._editor.createOverlayWidget({domNode:this._div.element,minContentWidthInPx:o.derived(this,l=>this._layout.read(l)?.minContentWidthRequired??0),position:o.constObservable({preference:{top:0,left:0}}),allowEditorOverflow:!1}))}_isMouseOverWidget(e){const t=this._layout.get();return!t||!(e.event instanceof o.EditorMouseEvent)?!1:t.lowerBackground.containsPoint(new o.Point(e.event.relativePos.x,e.event.relativePos.y))}removePreviousViewZone(e){if(!this._previousViewZoneInfo)return;e.removeZone(this._previousViewZoneInfo.id);const t=this._editor.cursorLineNumber.get();t!==null&&t>=this._previousViewZoneInfo.lineNumber&&this._editor.editor.setScrollTop(this._editor.scrollTop.get()-this._previousViewZoneInfo.height),this._previousViewZoneInfo=void 0}addViewZone(e,t){const i=t.addZone({afterLineNumber:e.lineNumber-1,heightInPx:e.height,domNode:o.$("div")});this._previousViewZoneInfo={height:e.height,lineNumber:e.lineNumber,id:i};const n=this._editor.cursorLineNumber.get();n!==null&&n>=e.lineNumber&&this._editor.editor.setScrollTop(this._editor.scrollTop.get()+e.height)}};Fg=GD([Hv(4,o.ILanguageService),Hv(5,o.IThemeService)],Fg);function ZD(c){const e=[];for(;c.length;){let t=c.shift();t.startLineNumber!==t.endLineNumber&&(c.push(new a.Range(t.startLineNumber+1,1,t.endLineNumber,t.endColumn)),t=new a.Range(t.startLineNumber,t.startColumn,t.startLineNumber,Number.MAX_SAFE_INTEGER)),e.push(t)}return e}function XD(c,e){const t={};for(const[r,l]of Object.entries(e))Array.isArray(l)?t[r]={min:0,rules:l}:t[r]={min:l.min??0,rules:l.rules??[{max:l.max,priority:l.priority,share:l.share}]};const i={};let n=0;for(const[r,l]of Object.entries(t))i[r]=l.min,n+=l.min;if(n>c)return null;let s=c-n;for(;s>0;){const r=[];for(const[p,f]of Object.entries(t))for(let m=0;mp.priority)),d=r.filter(p=>p.priority===l),h=d.reduce((p,f)=>p+f.share,0);let u=0;const g=[];for(const p of d){const f=p.rule,m=i[p.partKey],v=(f.max??1/0)-m,b=s*p.share/h,S=Math.min(b,v);g.push({partKey:p.partKey,ruleIndex:p.ruleIndex,amount:S}),u+=S}if(u===0)break;for(const p of g)i[p.partKey]+=p.amount;if(s-=u,s<1e-4)break}return i}var YD=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},zg=function(c,e){return function(t,i){e(t,i,c)}};let Vg=class extends a.Disposable{constructor(e,t,i,n,s,r){super(),this._editor=e,this._data=i,this._themeService=n,this._keybindingService=s,this._contextKeyService=r,this._styles=o.derived(this,d=>({background:le(pr,this._themeService).read(d).toString(),foreground:le(gr,this._themeService).read(d).toString(),border:le(ti,this._themeService).read(d).toString()})),this._pos=o.derived(this,d=>this._editor.observePosition(o.derived(h=>this._data.read(h)?.jumpToPosition||null),d.store)).flatten(),this._layout=o.derived(this,d=>{const h=this._data.read(d);if(!h)return;const u=h.jumpToPosition,g=this._editor.observeLineHeightForLine(o.constObservable(u.lineNumber)).read(d),p=this._editor.scrollLeft.read(d),f=this._pos.read(d);if(!f)return;const m=this._editor.layoutInfo.read(d);return{widgetRect:K.fromLeftTopWidthHeight(f.x+m.contentLeft+2-p,f.y,100,g)}}),this._blink=QD([{value:!0,durationMs:600},{value:!1,durationMs:600}]),this._widget=o.n.div({class:"inline-edit-jump-to-widget",style:{position:"absolute",display:this._layout.map(d=>d?"flex":"none"),alignItems:"center",cursor:"pointer",userSelect:"none",...fe(d=>this._layout.read(d)?.widgetRect)}},o.derived(d=>this._data.read(d)===void 0?[]:o.n.div({style:{display:"flex",alignItems:"center",gap:"4px",padding:"0 4px",height:"100%",backgroundColor:this._styles.map(h=>h.background),"--vscodeIconForeground":this._styles.map(h=>h.foreground),border:this._styles.map(h=>`1px solid ${h.border}`),borderRadius:"3px",boxSizing:"border-box",fontSize:"11px",color:this._styles.map(h=>h.foreground)}},[this._style==="cursor"?o.n.elem("div",{style:{borderLeft:"2px solid",height:14,opacity:this._blink.map(h=>h?"0":"1")}}):[o.derived(()=>o.n.elem("div",{},JD(this._keybinding))),o.n.elem("div",{style:{lineHeight:this._layout.map(h=>h?.widgetRect.height),marginTop:"-2px"}},["to jump"])]]))),this._style=t.style,this._keybinding=this._getKeybinding(cs);const l=this._widget.keepUpdated(this._store);this._register(this._editor.createOverlayWidget({domNode:l.element,position:o.constObservable(null),allowEditorOverflow:!1,minContentWidthInPx:o.constObservable(0)})),this._register(this._editor.setDecorations(o.derived(d=>{const h=this._data.read(d);return h?[{range:a.Range.fromPositions(h.jumpToPosition,h.jumpToPosition),options:{description:"inline-edit-jump-to-decoration",inlineClassNameAffectsLetterSpacing:!0,showIfCollapsed:!0,after:{content:this._style==="label"?" ":" "}}}]:[]})))}_getKeybinding(e,t=o.DebugLocation.ofCaller()){return e?o.observableFromEvent(this,this._contextKeyService.onDidChangeContext,()=>this._keybindingService.lookupKeybinding(e),t):o.constObservable(void 0)}};Vg=YD([zg(3,o.IThemeService),zg(4,o.IKeybindingService),zg(5,o.IContextKeyService)],Vg);function QD(c,e=o.DebugLocation.ofCaller()){let t=0;return o.observableFromEvent(void 0,i=>{t=0;const n=new a.RunOnceScheduler(()=>{t=(t+1)%c.length,i(null),n.schedule(c[t].durationMs)},0);return n.schedule(0),n},()=>c[t].value,e)}function JD(c){return o.derived(e=>o.n.div({style:{},ref:t=>{const i=e.store.add(new o.KeybindingLabel(t,a.OS,{disableTitle:!0,...o.defaultKeybindingLabelStyles,keybindingLabelShadow:void 0,keybindingLabelForeground:o.asCssVariable(gr),keybindingLabelBackground:"transparent",keybindingLabelBorder:o.asCssVariable(gr),keybindingLabelBottomBorder:void 0}));e.store.add(o.autorun(n=>{i.set(c.read(n))}))}}))}var WD=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},HD=function(c,e){return function(t,i){e(t,i,c)}};let Bg=class extends a.Disposable{constructor(e,t,i,n,s){super(),this._previewTextModel=e,this._properties=t,this._parentEditor=i,this._tabAction=n,this._instantiationService=s,this._previewRef=o.n.ref(),this.element=o.n.div({class:"preview",style:{},ref:this._previewRef}),this._state=o.derived(this,r=>{const l=this._properties.read(r);if(!l)return;let d,h;l.nextCursorPosition!==null?(d="original",h=a.LineRange.ofLength(l.nextCursorPosition.lineNumber,1)):l.diff[0].innerChanges?.every(g=>g.modifiedRange.isEmpty())?(d="original",h=a.LineRange.ofLength(l.diff[0].original.startLineNumber,1)):(d="modified",h=a.LineRange.ofLength(l.diff[0].modified.startLineNumber,1));const u=d==="modified"?Ds.snapshot(this._previewTextModel):l.target;return{mode:d,visibleLineRange:h,textModel:u,diff:l.diff}}),this.updatePreviewEditorEffect=o.derived(this,r=>{this._previewEditorObs.model.read(r);const l=this._state.read(r)?.visibleLineRange;if(!l)return;const d=[];l.startLineNumber>1&&d.push(new a.Range(1,1,l.startLineNumber-1,1)),l.endLineNumberExclusivethis._getHorizontalContentRangeInPreviewEditorToShow(this.previewEditor,r)),this.contentHeight=o.derived(this,r=>{const l=this._state.read(r);return l?this._previewEditorObs.observeLineHeightForLine(l.visibleLineRange.startLineNumber):o.constObservable(null)}).flatten(),this._editorDecorations=o.derived(this,r=>{const l=this._state.read(r);if(!l)return;const d={diff:l.diff},h=[],u=[],g=o.ModelDecorationOptions.register({className:"inlineCompletions-char-delete",description:"char-delete",isWholeLine:!1,zIndex:1}),p=o.ModelDecorationOptions.register({className:"inlineCompletions-char-insert",description:"char-insert",isWholeLine:!0}),f=o.ModelDecorationOptions.register({className:"inlineCompletions-char-insert",description:"char-insert",shouldFillLineOnLineBreak:!0});for(const m of d.diff)if(m.modified.isEmpty||m.original.isEmpty)m.original.isEmpty||h.push({range:m.original.toInclusiveRange(),options:g}),m.modified.isEmpty||u.push({range:m.modified.toInclusiveRange(),options:p});else for(const _ of m.innerChanges||[])m.original.contains(_.originalRange.startLineNumber)&&!_.originalRange.isEmpty()&&h.push({range:_.originalRange,options:{description:"char-delete",shouldFillLineOnLineBreak:!1,className:Ml("inlineCompletions-char-delete",_.originalRange.isEmpty()&&"empty"),zIndex:1}}),m.modified.contains(_.modifiedRange.startLineNumber)&&u.push({range:_.modifiedRange,options:f});return{originalDecorations:h,modifiedDecorations:u}}),this.previewEditor=this._register(this._createPreviewEditor()),this._parentEditorObs=o.observableCodeEditor(this._parentEditor),this._register(o.autorun(r=>{const l=this._state.read(r)?.textModel||null;l&&this.previewEditor.setModel(l.dangerouslyGetUnderlyingModel())})),this._previewEditorObs=o.observableCodeEditor(this.previewEditor),this._register(this._previewEditorObs.setDecorations(o.derived(r=>{const l=this._state.read(r),d=this._editorDecorations.read(r);return(l?.mode==="original"?d?.originalDecorations:d?.modifiedDecorations)??[]}))),this._register(o.autorun(r=>{if(!this._properties.read(r))return;const l=this._parentEditorObs.cursorPosition.read(r);l&&this.previewEditor.setPosition(this._previewTextModel.validatePosition(l),"longDistanceHintPreview")})),this._register(o.autorun(r=>{const l=this._state.read(r);if(!l)return;const d=l.visibleLineRange.startLineNumber.toString().length;this.previewEditor.updateOptions({lineNumbersMinChars:d+1})})),this._register(this._instantiationService.createInstance(Al,this._previewEditorObs,o.derived(r=>{const l=this._state.read(r);if(!l)return;const d=this._properties.read(r);if(d)return new Zv(d.inlineSuggestInfo,a.LineRange.ofLength(l.visibleLineRange.startLineNumber,1),d.model,void 0)}),this._tabAction,o.constObservable(0),o.constObservable(!1),o.observableValue(this,!1))),this.updatePreviewEditorEffect.recomputeInitiallyAndOnChange(this._store)}_createPreviewEditor(){return this._instantiationService.createInstance(ct,this._previewRef.element,{glyphMargin:!1,lineNumbers:"on",minimap:{enabled:!1},guides:{indentation:!1,bracketPairs:!1,bracketPairsHorizontal:!1,highlightActiveIndentation:!1},editContext:!1,rulers:[],padding:{top:0,bottom:0},selectOnLineNumbers:!1,selectionHighlight:!1,columnSelection:!1,overviewRulerBorder:!1,overviewRulerLanes:0,revealHorizontalRightPadding:0,bracketPairColorization:{enabled:!0,independentColorPoolPerBracketType:!1},scrollBeyondLastLine:!1,scrollbar:{vertical:"hidden",horizontal:"hidden",handleMouseWheel:!1},readOnly:!0,wordWrap:"off",wordWrapOverride1:"off",wordWrapOverride2:"off"},{contextKeyValues:{[V.inInlineEditsPreviewEditor.key]:!0},contributions:[]},this._parentEditor)}_getHorizontalContentRangeInPreviewEditorToShow(e,t){const i=this._state.read(t);if(!i)return;const n=i.diff,s=this._properties.read(t)?.nextCursorPosition,r=i.visibleLineRange,l=this._previewEditorObs.layoutInfo.read(t),d=Pt(this._previewEditorObs,r,t);let h;if(s)h=a.Range.fromPositions(s);else if(n[0].innerChanges)h=i.mode==="modified"?n[0].innerChanges[0].modifiedRange:n[0].innerChanges[0].originalRange;else return;const u=eR(e.getModel(),h,5),g=this._previewEditorObs.getLeftOfPosition(u.getStartPosition(),t),p=this._previewEditorObs.getLeftOfPosition(u.getEndPosition(),t),f=o.clamp(g,0,d),m=o.clamp(p,f,d),_=e.getModel().getLineFirstNonWhitespaceColumn(u.startLineNumber),v=this._previewEditorObs.getLeftOfPosition(new a.Position(u.startLineNumber,_),t),b=new a.OffsetRange(f,m);return{indentationEnd:v,preferredRangeToReveal:b,maxEditorWidth:d+l.contentLeft,contentWidth:d,nonContentWidth:l.contentLeft}}layout(e,t){this.previewEditor.layout(e),this._previewEditorObs.editor.setScrollLeft(t)}};Bg=WD([HD(4,o.IInstantiationService)],Bg);function eR(c,e,t){const i=e.getStartPosition(),n=e.getEndPosition(),s=c.getLineContent(i.lineNumber);function r(u){const g=s.charAt(u-1);return/[a-zA-Z0-9_]/.test(g)}function l(u){const g=s.charAt(u-1);return g===" "||g===" "}let d=i.column;for(;d>1&&r(d)&&!l(d-1)&&i.column-ds||n===Number.MAX_VALUE?0:n}class eb{constructor(e,t,i){this._lineRangeInfo=e,this.availableSpaceSizes=e.sizes.map((n,s)=>{const r=e.lineRange.startLineNumber+s,l=i(r);return new ar(Math.max(0,t-n.width-l),n.height)}),this.availableSpaceHeightPrefixSums=sR(this.availableSpaceSizes,n=>n.height),this.availableSpaceSizesTransposed=this.availableSpaceSizes.map(n=>n.transpose())}getWidgetVerticalOutline(e,t,i){const n=e-this._lineRangeInfo.lineRange.startLineNumber,s=this._lineRangeInfo.top+this.availableSpaceHeightPrefixSums[n],r=a.OffsetRange.ofStartAndLength(s,t),{previewEditorMargin:l,widgetPadding:d,widgetBorder:h,lowerBarHeight:u}=i;return r.withMargin(l+d+h).withMargin(0,u)}tryFindWidgetOutline(e,t,i,n){if(!(this._lineRangeInfo.lineRange.length<3))return nR(this._lineRangeInfo.lineRange.addMargin(-1,-1),e,s=>{const r=this.getWidgetVerticalOutline(s,t,n),l=tR(r.delta(-this._lineRangeInfo.top),this.availableSpaceSizesTransposed);return lf+m.height,0),p=i.editor.getTopForLineNumber(u);h>0&&p!==g&&(s.push({lineRange:a.LineRange.ofLength(r,u-r),top:l,sizes:d}),r=u,l=p,d=[]),d.push(e[h])}return s.push({lineRange:a.LineRange.ofLength(r,c.endLineNumberExclusive-r),top:l,sizes:d}),o.derived({owner:"splitIntoContinuousLineRanges"},h=>i.observeTopForLineNumber(c.endLineNumberExclusive-1).read(h)).read(n),s}function nR(c,e,t){for(let i=0;;i++){const n=e+i;if(n<=c.endLineNumberExclusive){const r=t(n);if(r!==void 0)return r}const s=e-i;if(s>=c.startLineNumber){const r=t(s);if(r!==void 0)return r}if(sc.endLineNumberExclusive)return}}function sR(c,e){const t=[0];let i=0;for(const n of c)i+=e(n),t.push(i);return t}var oR=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Sr=function(c,e){return function(t,i){e(t,i,c)}};const rR=6,Kg={EMPTY_SPACE:425,OVERLAY:375},aR={previewEditorMargin:2,widgetPadding:2,widgetBorder:1,lowerBarHeight:20,minWidgetWidth:250};let Ug=class extends a.Disposable{constructor(e,t,i,n,s,r,l,d,h){super(),this._editor=e,this._viewState=t,this._previewTextModel=i,this._tabAction=n,this._instantiationService=s,this._themeService=r,this._keybindingService=l,this._modelService=d,this._languageService=h,this.onDidClick=a.Event.None,this._viewWithElement=void 0,this._hintTextPosition=o.derived(this,u=>{const g=this._viewState.read(u);return g?new a.Position(g.hint.lineNumber,Number.MAX_SAFE_INTEGER):null}),this._lineSizesAroundHintPosition=o.derived(this,u=>{const g=this._viewState.read(u),p=this._hintTextPosition.read(u);if(!g||!p)return[];const f=this._editorObs.model.read(u);if(!f)return[];const m=a.LineRange.ofLength(p.lineNumber,1).addMargin(5,5).intersect(a.LineRange.ofLength(1,f.getLineCount()));if(!m)return[];const _=_D(this._editorObs,m,u),v=this._editorObs.observeTopForLineNumber(m.startLineNumber).read(u);return iR(m,_,v,this._editorObs,u)}),this._isVisibleDelayed=o.debouncedObservable2(o.derived(this,u=>this._viewState.read(u)?.hint.isVisible),(u,g)=>u===!0&&g===!1?200:0),this._previewEditorLayoutInfo=o.derived(this,u=>{const g=this._viewState.read(u);if(!g||!this._isVisibleDelayed.read(u))return;const p=this._lineSizesAroundHintPosition.read(u);if(p.length===0)return;const f=this._editorObs.scrollTop.read(u),m=this._editorObs.scrollLeft.read(u),_=this._editorObs.layoutInfo.read(u),v=this._previewEditor.contentHeight.read(u),b=this._previewEditor.horizontalContentRangeInPreviewEditorToShow.read(u);if(!v||!b)return;const S=_.contentWidth-_.verticalScrollbarWidth,w=_.contentLeft+S;if(!this._editorObs.cursorLineNumber.read(u))return;const C=aR,x=v+2;let L,E;const R=te=>te===g.hint.lineNumber?40:20;for(const te of p){const st=new eb(te,S,R);if(E=st,L=st.tryFindWidgetOutline(g.hint.lineNumber,x,w,C),L)break}let D="empty-space";if(!L){D="overlay";const te=Math.min(_.width-_.contentLeft,Kg.OVERLAY),st=E??new eb(p[0],S,R);L={horizontalWidgetRange:a.OffsetRange.ofStartAndLength(w-te,te),verticalWidgetRange:st.getWidgetVerticalOutline(g.hint.lineNumber+2,x,C).delta(10)}}if(!L)return;const T=K.fromRanges(L.horizontalWidgetRange,L.verticalWidgetRange).translateX(-m).translateY(-f),{previewEditorMargin:M,widgetPadding:A,widgetBorder:U,lowerBarHeight:F}=C,k=Math.min(D==="overlay"?Kg.OVERLAY:Kg.EMPTY_SPACE,b.maxEditorWidth+M+A),P=XD(T.width,{spaceBefore:{min:0,max:10,priority:1},content:{min:50,rules:[{max:150,priority:2},{max:k,priority:1}]},spaceAfter:{min:10}});if(!P)return null;const z=lR([P.spaceBefore,P.content,P.spaceAfter],T.left);T.withHorizontalRange(z[0]);const Le=T.withHorizontalRange(z[1]);T.withHorizontalRange(z[2]);const W=Le.withMargin(-A-U-M).withMargin(0,0,-F,0),B=W.width-b.nonContentWidth,ke=B*.8,oe=b.preferredRangeToReveal.intersect(a.OffsetRange.ofStartAndLength(b.preferredRangeToReveal.start,ke))??b.preferredRangeToReveal,Z=cR(b.indentationEnd,B,oe);return{codeEditorSize:W.getSize(),codeScrollLeft:m,contentLeft:_.contentLeft,widgetRect:Le,previewEditorMargin:M,widgetPadding:A,widgetBorder:U,lowerBarHeight:F,desiredPreviewEditorScrollLeft:Z.newScrollPosition}}),this._view=o.n.div({class:"inline-edits-view",style:{position:"absolute",overflow:"visible",top:"0px",left:"0px",display:o.derived(this,u=>this._previewEditorLayoutInfo.read(u)?"block":"none")}},[o.derived(this,u=>[this._widgetContent])]),this._widgetContent=o.derived(this,u=>o.n.div({class:["inline-edits-long-distance-hint-widget","show-file-icons"],style:{position:"absolute",overflow:"hidden",cursor:"pointer",background:o.asCssVariable(o.editorWidgetBackground),padding:this._previewEditorLayoutInfo.map(g=>g?.widgetPadding),boxSizing:"border-box",borderRadius:rR,border:o.derived(g=>`${this._previewEditorLayoutInfo.read(g)?.widgetBorder}px solid ${this._styles.read(g).border}`),display:"flex",flexDirection:"column",opacity:o.derived(g=>this._viewState.read(g)?.hint.isVisible?"1":"0"),transition:"opacity 200ms ease-in-out",...fe(g=>this._previewEditorLayoutInfo.read(g)?.widgetRect)},onmousedown:g=>{g.preventDefault()},onclick:()=>{this._viewState.read(void 0)?.model.jump()}},[o.n.div({class:["editorContainer"],style:{overflow:"hidden",padding:this._previewEditorLayoutInfo.map(g=>g?.previewEditorMargin),background:this._styles.map(g=>g.background),pointerEvents:"none"}},[o.derived(this,g=>this._previewEditor.element)]),o.n.div({class:"bar",style:{color:o.asCssVariable(o.descriptionForeground),pointerEvents:"none",margin:"0 4px",height:this._previewEditorLayoutInfo.map(g=>g?.lowerBarHeight),display:"flex",justifyContent:"space-between",alignItems:"center"}},[o.derived(this,g=>{const p=[],f=this._viewState.read(g);if(!f)return p;const m=this._editorObs.model.read(g)?.uri,_=f.target.uri,v=_&&(!m||_.toString()!==m.toString());if(v){const C=o.basename(_),y=sr(this._modelService,this._languageService,_,Qe.FILE);p.push(o.n.div({class:"target-file",style:{display:"flex",alignItems:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},[o.n.elem("span",{class:y,style:{flexShrink:"0",marginRight:"4px"}}),C]))}else{const C=this._originalOutlineSource.read(g),y=this._originalTargetLineNumber.read(g),x=C?.getAt(y,g).slice(0,1)??[],L=[];if(x.length>0)for(let E=0;E{const g=this._viewState.read(u);return g?g.edit.action?.kind==="jumpTo"?g.edit.action.position.lineNumber:g.diff[0]?.original.startLineNumber??-1:-1}),this._originalOutlineSource=o.derivedDisposable(this,u=>{const g=this._editorObs.model.read(u),p=o.HideUnchangedRegionsFeature._breadcrumbsSourceFactory.read(u);return!g||!p?void 0:p(g,this._instantiationService)}),this._styles=o.derived(u=>{const g=this._tabAction.read(u),p=Fs(o.editorWidgetBorder,this._themeService).read(u),f=o.observableFromEvent(this._themeService.onDidColorThemeChange,()=>{const _=this._themeService.getColorTheme();return _.type==="hcDark"||_.type==="hcLight"}).read(u);let m;if(f)m=p;else{let _;switch(g){case Y.Inactive:_=_g;break;case Y.Jump:_=pr;break;case Y.Accept:_=vg;break}m=le(_,this._themeService).read(u)}return{border:m.toString(),background:ii(this._viewState.map(_=>_?.editorType??J.TextEditor).read(u))}}),this._editorObs=o.observableCodeEditor(this._editor),this._previewEditor=this._register(this._instantiationService.createInstance(Bg,this._previewTextModel,o.derived(u=>{const g=this._viewState.read(u);if(g)return{diff:g.diff,model:g.model,inlineSuggestInfo:g.inlineSuggestInfo,nextCursorPosition:g.nextCursorPosition,target:g.target}}),this._editor,this._tabAction)),this._viewWithElement=this._view.keepUpdated(this._store),this._register(this._editorObs.createOverlayWidget({domNode:this._viewWithElement.element,position:o.constObservable(null),allowEditorOverflow:!1,minContentWidthInPx:o.constObservable(0)})),this._widgetContent.get().keepUpdated(this._store),this._register(o.autorun(u=>{const g=this._previewEditorLayoutInfo.read(u);g&&this._previewEditor.layout(g.codeEditorSize.toDimension(),g.desiredPreviewEditorScrollLeft)})),this._isVisibleDelayed.recomputeInitiallyAndOnChange(this._store)}get isHovered(){return this._widgetContent.get().didMouseMoveDuringHover}};Ug=oR([Sr(4,o.IInstantiationService),Sr(5,o.IThemeService),Sr(6,o.IKeybindingService),Sr(7,o.IModelService),Sr(8,o.ILanguageService)],Ug);function lR(c,e=0){const t=[];let i=e;for(const n of c)t.push(new a.OffsetRange(i,i+n)),i+=n;return t}function cR(c,e,t){const i=new a.OffsetRange(c,c+e);return i.containsRange(t)?{newScrollPosition:c}:t.length>e?{newScrollPosition:t.start}:t.endExclusive>i.endExclusive?{newScrollPosition:t.endExclusive-e}:t.start=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},kg=function(c,e){return function(t,i){e(t,i,c)}};const zs=0,yr=0,We=1,hR=1,uR=3,At=pe,jg=20,tb=12;let Vl=class extends a.Disposable{static fitsInsideViewport(e,t,i,n){const s=o.observableCodeEditor(e),r=s.layoutInfoWidth.read(n),l=s.layoutInfoContentLeft.read(n),d=e.getLayoutInfo().verticalScrollbarWidth,h=s.layoutInfoMinimap.read(n).minimapLeft!==0?s.layoutInfoMinimap.read(n).minimapWidth:0,u=Pt(s,i.displayRange,void 0),g=i.lineEdit.newLines.reduce((m,_)=>Math.max(m,Cg(_,e,t)),0),p=jg,f=tb+2*We;return u+g+p+fthis._uiState.read(g)?"block":"none"),this.previewRef=o.n.ref();const h=this._uiState.map(g=>g?.editorType===J.DiffEditor?uR:hR);this._editorContainer=o.n.div({class:["editorContainer"],style:{position:"absolute",overflow:"hidden",cursor:"pointer"},onmousedown:g=>{g.preventDefault()},onclick:g=>{this._onDidClick.fire(Yt.create(g))}},[o.n.div({class:"preview",style:{pointerEvents:"none"},ref:this.previewRef})]).keepUpdated(this._store),this.isHovered=this._userInteractionService.createHoverTracker(this._editorContainer.element,this._store),this.previewEditor=this._register(this._instantiationService.createInstance(ct,this.previewRef.element,{glyphMargin:!1,lineNumbers:"off",minimap:{enabled:!1},guides:{indentation:!1,bracketPairs:!1,bracketPairsHorizontal:!1,highlightActiveIndentation:!1},editContext:!1,rulers:[],padding:{top:0,bottom:0},folding:!1,selectOnLineNumbers:!1,selectionHighlight:!1,columnSelection:!1,overviewRulerBorder:!1,overviewRulerLanes:0,lineDecorationsWidth:0,lineNumbersMinChars:0,revealHorizontalRightPadding:0,bracketPairColorization:{enabled:!0,independentColorPoolPerBracketType:!1},scrollBeyondLastLine:!1,scrollbar:{vertical:"hidden",horizontal:"hidden",handleMouseWheel:!1},readOnly:!0,wordWrap:"off",wordWrapOverride1:"off",wordWrapOverride2:"off"},{contextKeyValues:{[V.inInlineEditsPreviewEditor.key]:!0},contributions:[]},this._editor)),this._previewEditorObs=o.observableCodeEditor(this.previewEditor),this._activeViewZones=[],this._updatePreviewEditor=o.derived(this,g=>{this._editorContainer.readEffect(g),this._previewEditorObs.model.read(g),this._display.read(g),this._nonOverflowView&&(this._nonOverflowView.element.style.display=this._display.read(g));const p=this._uiState.read(g),f=this._edit.read(g);if(!p||!f)return;const m=f.originalLineRange,_=[];m.startLineNumber>1&&_.push(new a.Range(1,1,m.startLineNumber-1,1)),m.startLineNumber+p.newTextLineCount{v.forEach(w=>S.removeZone(w)),b>0&&this._activeViewZones.push(S.addZone({afterLineNumber:m.startLineNumber+p.newTextLineCount-1,heightInLines:b,showInHiddenAreas:!0,domNode:o.$("div.diagonal-fill.inline-edits-view-zone")}))})}),this._previewEditorWidth=o.derived(this,g=>{const p=this._edit.read(g);return p?(this._updatePreviewEditor.read(g),Pt(this._previewEditorObs,p.modifiedLineRange,g)):0}),this._cursorPosIfTouchesEdit=o.derived(this,g=>{const p=this._editorObs.cursorPosition.read(g),f=this._edit.read(g);if(!(!f||!p))return f.modifiedLineRange.contains(p.lineNumber)?p:void 0}),this._originalStartPosition=o.derived(this,g=>{const p=this._edit.read(g);return p?new a.Position(p.originalLineRange.startLineNumber,1):null}),this._originalEndPosition=o.derived(this,g=>{const p=this._edit.read(g);return p?new a.Position(p.originalLineRange.endLineNumberExclusive,1):null}),this._originalVerticalStartPosition=this._editorObs.observePosition(this._originalStartPosition,this._store).map(g=>g?.y),this._originalVerticalEndPosition=this._editorObs.observePosition(this._originalEndPosition,this._store).map(g=>g?.y),this._originalDisplayRange=this._edit.map(g=>g?.displayRange),this._editorMaxContentWidthInRange=o.derived(this,g=>{const p=this._originalDisplayRange.read(g);return p?(this._editorObs.versionId.read(g),o.derivedObservableWithCache(this,(f,m)=>{const _=Pt(this._editorObs,p,f);return Math.max(_,m??0)})):o.constObservable(0)}).map((g,p)=>g.read(p));const u=ID(this._editor,this._store);this._previewEditorLayoutInfo=o.derived(this,g=>{const p=this._edit.read(g);if(!p||!this._uiState.read(g))return null;const m=p.originalLineRange,_=this._editorObs.scrollLeft.read(g),v=this._editorMaxContentWidthInRange.read(g),b=this._editorObs.layoutInfo.read(g),S=this._previewEditorWidth.read(g),w=b.contentWidth-b.verticalScrollbarWidth,I=u.read(g),C=b.contentLeft+b.contentWidth+I.left,y=o.getWindow(this._editor.getContainerDomNode()).innerWidth-C,x=o.getWindow(this._editor.getContainerDomNode()).innerWidth-I.right,L=Math.min(b.contentWidth*.3,S,100),E=0,R=E+y,D=this._cursorPosIfTouchesEdit.read(g),T=Math.max(w+_-E-Math.max(0,L-R),Math.min(D?vD(this._editorObs,D,g)+50:0,w+_)),M=Math.min(v+jg,T),A=v+jg+S+70,U=T-M;let F,k;M>_?(F=0,k=b.contentLeft+M-_):(F=_-M,k=b.contentLeft);const P=this._originalVerticalStartPosition.read(g)??this._editor.getTopForLineNumber(m.startLineNumber)-this._editorObs.scrollTop.read(g),z=this._originalVerticalEndPosition.read(g)??this._editor.getBottomForLineNumber(m.endLineNumberExclusive-1)-this._editorObs.scrollTop.read(g),Le=b.contentLeft-_;let W=K.fromLeftTopRightBottom(Le,P,k,z);const B=W.height===0;B||(W=W.withMargin(yr,zs));const oe=this._previewEditorObs.observeLineHeightsForLineRange(p.modifiedLineRange).read(g).reduce((_f,_N)=>_f+_N,0),Z=z-P,te=Math.max(Z,oe),st=U===0,jr=0,$r=Math.min(S+tb,x+b.width-b.contentLeft-jr);let ts=K.fromLeftTopWidthHeight(W.right+jr,P,$r,te);return B?ts=ts.withMargin(yr,zs).translateY(yr):ts=ts.withMargin(yr,zs).translateX(zs+We),{codeRect:W,editRect:ts,codeScrollLeft:_,contentLeft:b.contentLeft,isInsertion:B,maxContentWidth:A,shouldShowShadow:st,desiredPreviewEditorScrollLeft:F,previewEditorWidth:$r}}),this._stickyScrollController=ze.get(this._editorObs.editor),this._stickyScrollHeight=this._stickyScrollController?o.observableFromEvent(this._stickyScrollController.onDidChangeStickyScrollHeight,()=>this._stickyScrollController.stickyScrollWidgetHeight):o.constObservable(0),this._shouldOverflow=o.derived(this,g=>!1),this._originalBackgroundColor=o.observableFromEvent(this,this._themeService.onDidColorThemeChange,()=>this._themeService.getColorTheme().getColor(ur)??a.Color.transparent),this._editorBackgroundColor=this._uiState.map(g=>ii(g?.editorType??J.TextEditor)),this._backgroundSvg=o.n.svg({transform:"translate(-0.5 -0.5)",style:{overflow:"visible",pointerEvents:"none",position:"absolute"}},[o.n.svgElem("path",{class:"rightOfModifiedBackgroundCoverUp",d:o.derived(this,g=>{const p=this._previewEditorLayoutInfo.read(g);if(!(!p||this._originalBackgroundColor.read(g).isTransparent()))return new yg().moveTo(p.codeRect.getRightTop()).lineTo(p.codeRect.getRightTop().deltaX(1e3)).lineTo(p.codeRect.getRightBottom().deltaX(1e3)).lineTo(p.codeRect.getRightBottom()).build()}),style:{fill:this._editorBackgroundColor}})]).keepUpdated(this._store),this._originalOverlay=o.n.div({style:{pointerEvents:"none",display:this._previewEditorLayoutInfo.map(g=>g?.isInsertion?"none":"block")}},o.derived(this,g=>{const p=ht(this._previewEditorLayoutInfo).read(g);if(!p)return;const f=this._editorBackgroundColor.read(g),m=h.read(g),_=Nl(this._tabAction).map(E=>`${We}px solid ${o.asCssVariable(E)}`),v=`${We+m}px solid ${f}`,b=p.read(g).codeScrollLeft!==0,S=p.map(E=>E.codeRect.bottomK.fromLeftTopRightBottom(E.contentLeft-At-We,E.codeRect.top,E.contentLeft,E.codeRect.bottom+w)).read(g),C=new a.OffsetRange(I.left,Number.MAX_SAFE_INTEGER),y=p.map(E=>E.codeRect.intersectHorizontal(C)),x=y.map(E=>E.withMargin(m,0,m,m).intersectHorizontal(C)),L=y.map(E=>K.fromLeftTopWidthHeight(E.right-w+We,E.bottom-We,w,w).intersectHorizontal(C));return[o.n.div({class:"originalSeparatorSideBySide",style:{...x.read(g).toStyles(),boxSizing:"border-box",borderRadius:`${At}px 0 0 ${At}px`,borderTop:v,borderBottom:v,borderLeft:b?"none":v}}),o.n.div({class:"originalOverlaySideBySide",style:{...y.read(g).toStyles(),boxSizing:"border-box",borderRadius:`${At}px 0 0 ${At}px`,borderTop:_,borderBottom:_,borderLeft:b?"none":_,backgroundColor:o.asCssVariable(ur)}}),o.n.div({class:"originalCornerCutoutSideBySide",style:{pointerEvents:"none",display:S.map(E=>E?"block":"none"),...L.read(g).toStyles()}},[o.n.div({class:"originalCornerCutoutBackground",style:{position:"absolute",top:"0px",left:"0px",width:"100%",height:"100%",backgroundColor:le(ur,this._themeService).map(E=>E.toString())}}),o.n.div({class:"originalCornerCutoutBorder",style:{position:"absolute",top:"0px",left:"0px",width:"100%",height:"100%",boxSizing:"border-box",borderTop:_,borderRight:_,borderRadius:"0 100% 0 0",backgroundColor:f}})]),o.n.div({class:"originalOverlaySideBySideHider",style:{...I.toStyles(),backgroundColor:f}})]})).keepUpdated(this._store),this._modifiedOverlay=o.n.div({style:{pointerEvents:"none"}},o.derived(this,g=>{const p=ht(this._previewEditorLayoutInfo).read(g);if(!p)return;const f=p.map(y=>y.codeRect.bottom`0 ${At}px ${At}px ${y?At:0}px`),b=le(_r(this._tabAction),this._themeService).map(y=>`1px solid ${y.toString()}`),S=`${We+_}px solid ${m}`,w=p.map(y=>y.editRect.withMargin(0,We)),I=w.map(y=>y.withMargin(_,_,_,0)),C=o.derived(this,y=>{const x=w.read(y),L=p.read(y);return!L.isInsertion||L.contentLeft>=x.left?K.fromLeftTopWidthHeight(x.left,x.top,0,0):new K(L.contentLeft,x.top,x.left,x.top+We*2)});return[o.n.div({class:"modifiedInsertionSideBySide",style:{...C.read(g).toStyles(),backgroundColor:_r(this._tabAction).map(y=>o.asCssVariable(y))}}),o.n.div({class:"modifiedSeparatorSideBySide",style:{...I.read(g).toStyles(),borderRadius:v,borderTop:S,borderBottom:S,borderRight:S,boxSizing:"border-box"}}),o.n.div({class:"modifiedOverlaySideBySide",style:{...w.read(g).toStyles(),borderRadius:v,border:b,boxSizing:"border-box",backgroundColor:o.asCssVariable($v)}})]})).keepUpdated(this._store),this._nonOverflowView=o.n.div({class:"inline-edits-view",style:{position:"absolute",overflow:"visible",top:"0px",left:"0px",display:this._display}},[this._backgroundSvg,o.derived(this,g=>this._shouldOverflow.read(g)?[]:[this._editorContainer,this._originalOverlay,this._modifiedOverlay])]).keepUpdated(this._store),this._register(this._editorObs.createOverlayWidget({domNode:this._nonOverflowView.element,position:o.constObservable(null),allowEditorOverflow:!1,minContentWidthInPx:o.derived(this,g=>{const p=this._previewEditorLayoutInfo.read(g)?.maxContentWidth;return p===void 0?0:p})})),this.previewEditor.setModel(this._previewTextModel),this._register(o.autorun(g=>{const p=this._previewEditorLayoutInfo.read(g);if(!p)return;const f=p.editRect.withMargin(-yr,-zs);this.previewEditor.layout({height:f.height,width:p.previewEditorWidth+15}),this._editorContainer.element.style.top=`${f.top}px`,this._editorContainer.element.style.left=`${f.left}px`,this._editorContainer.element.style.width=`${p.previewEditorWidth+zs}px`})),this._register(o.autorun(g=>{const p=this._previewEditorLayoutInfo.read(g);p&&this._previewEditorObs.editor.setScrollLeft(p.desiredPreviewEditorScrollLeft)})),this._updatePreviewEditor.recomputeInitiallyAndOnChange(this._store)}};Vl=dR([kg(5,o.IInstantiationService),kg(6,o.IThemeService),kg(7,o.IUserInteractionService)],Vl);var gR=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},wr=function(c,e){return function(t,i){e(t,i,c)}};class pR{constructor(e,t,i){this.edit=e,this.editorType=t,this.alternativeAction=i}equals(e){return this.edit.equals(e.edit)&&this.alternativeAction===e.alternativeAction}}const ce=1,ib="word-replacement-view-overlay",nb="word-replacement-view-widget",sb="word-replacement-view-replacement",$g="word-replacement-view-rename";let Vs=(to=class extends a.Disposable{constructor(e,t,i,n,s,r,l,d){super(),this._editor=e,this._viewData=t,this._tabAction=i,this._languageService=n,this._themeService=s,this._keybindingService=r,this._hoverService=l,this._userInteractionService=d,this._onDidClick=this._register(new a.Emitter),this.onDidClick=this._onDidClick.event,this._start=this._editor.observePosition(o.constObservable(this._viewData.edit.range.getStartPosition()),this._store),this._end=this._editor.observePosition(o.constObservable(this._viewData.edit.range.getEndPosition()),this._store),this._line=document.createElement("div"),this._primaryElement=o.observableValue(this,null),this._secondaryElement=o.observableValue(this,null),this.isHovered=o.derived(this,p=>{const f=this._primaryElement.read(p);return f?this._userInteractionService.createHoverTracker(f.element,p.store).read(p):!1}),this._renderTextEffect=o.derived(this,p=>{const f=this._editor.model.read(void 0);if(!f)return;const m=f.getLineContent(this._viewData.edit.range.startLineNumber),_=a.StringReplacement.replace(new a.OffsetRange(this._viewData.edit.range.startColumn-1,this._viewData.edit.range.endColumn-1),this._viewData.edit.text),v=_.replace(m),b=f.tokenization.tokenizeLinesAt(this._viewData.edit.range.startLineNumber,[v])?.[0];let S;b?S=o.TokenArray.fromLineTokens(b).slice(_.getRangeAfterReplace()).toLineTokens(this._viewData.edit.text,this._languageService.languageIdCodec):S=o.LineTokens.createEmpty(this._viewData.edit.text,this._languageService.languageIdCodec);const w=o.renderLines(new o.LineSource([S]),o.RenderOptions.fromEditor(this._editor.editor).withSetWidth(!1).withScrollBeyondLastColumn(0),[],this._line,!0);this._line.style.width=`${w.minWidthInPx}px`});const h=this._editor.observeLineHeightForPosition(this._viewData.edit.range.getStartPosition()),u=o.observableFromPromise(this._viewData.alternativeAction?.count??new Promise(p=>p(void 0))).map(p=>p.value),g=o.derived(this,p=>this._userInteractionService.readModifierKeyStatus(this._editor.editor.getDomNode(),p).shiftKey);this._layout=o.derived(this,p=>{this._renderTextEffect.read(p);const f=this._start.read(p),m=this._end.read(p);if(!f||!m||f.x>m.x||f.y>m.y)return;const _=h.read(p);if(_<=0)return;const v=this._editor.scrollLeft.read(p),b=this._editor.getOption(59).read(p).typicalHalfwidthCharacterWidth,S=3*b,w=4,I=new o.Point(S,w);let C;if(this._viewData.alternativeAction){const R=this._viewData.alternativeAction.label,D=u.read(p),T=g.read(p),M=D!==void 0?D===1?a.localize(1263,"{0} 1 occurrence",R):a.localize(1264,"{0} {1} occurrences",R,D):R,A=a.localize(1265,"{0} show occurrences","[shift]");C={label:D!==void 0&&T?M:R,tooltip:M?`${M} +${A}`:void 0,icon:void 0,count:D,keybinding:this._keybindingService.lookupKeybinding(ta),active:g}}const y=K.fromPoints(f,m).withHeight(_).translateX(-v),x=K.fromPointSize(y.getLeftBottom().add(I),new o.Point(this._viewData.edit.text.length*b,y.height)),L=x.withWidth(x.width+(C?C.label.length*b+8+4+12:0)),E=L.withLeft(y.left);return{alternativeAction:C,originalLine:y,codeLine:x,modifiedLine:L,lowerBackground:E,lineHeight:_}}),this.minEditorScrollHeight=o.derived(this,p=>{const f=ht(this._layout).read(p);return f?f.read(p).modifiedLine.bottom+ce+this._editor.editor.getScrollTop():0}),this._root=o.n.div({class:"word-replacement"},[o.derived(this,p=>{const f=ht(this._layout).read(p);if(!f)return[];const m=Nl(this._tabAction).map(D=>o.asCssVariable(D)).read(p),_=_r(this._tabAction).map(D=>o.asCssVariable(D)).read(p);this._line.style.lineHeight=`${f.read(p).modifiedLine.height+2*ce}px`;const v=o.constObservable(!1),b=f.map(D=>D.alternativeAction),S=o.derived(D=>(b.read(D)?.active.read(D)??!1)||v.read(D)),I=o.observableFromEvent(this._themeService.onDidColorThemeChange,()=>{const D=this._themeService.getColorTheme();return D.type==="hcDark"||D.type==="hcLight"}).read(p)?Fs(o.contrastBorder,this._themeService).read(p):null,C={borderColor:I?I.toString():_,backgroundColor:o.asCssVariable(dD),color:"",opacity:"1"},y={borderColor:I?I.toString():o.asCssVariable(ti),backgroundColor:o.asCssVariable(pr),color:o.asCssVariable(gr),opacity:"1"},x={borderColor:I?I.toString():Fs(o.editorHoverForeground,this._themeService).map(D=>D.transparent(.2).toString()).read(p),backgroundColor:ii(this._viewData.editorType),color:"",opacity:"0.7"},L=ii(this._viewData.editorType),E=o.derived(this,D=>(S.read(D),C)),R=o.derived(this,D=>S.read(D)?y:x);return[o.n.div({id:ib,style:{position:"absolute",...fe(D=>Sg(this._editor).read(D)),overflow:"hidden",pointerEvents:"none"}},[o.n.div({style:{position:"absolute",...fe(D=>f.read(D).lowerBackground.withMargin(ce,2*ce,ce,0)),background:L,cursor:"pointer",pointerEvents:"auto"},onmousedown:D=>this._mouseDown(D)}),o.n.div({id:nb,style:{position:"absolute",...fe(D=>f.read(D).modifiedLine.withMargin(ce,2*ce)),width:void 0,pointerEvents:"auto",boxSizing:"border-box",borderRadius:`${pe}px`,background:L,display:"flex",justifyContent:"left",outline:`2px solid ${L}`},onmousedown:D=>this._mouseDown(D)},[o.n.div({id:sb,style:{fontFamily:this._editor.getOption(58),fontSize:this._editor.getOption(61),fontWeight:this._editor.getOption(62),width:fe(D=>f.read(D).codeLine.withMargin(ce,2*ce)).width,borderRadius:`${pe}px`,border:E.map(D=>`${ce}px solid ${D.borderColor}`),boxSizing:"border-box",padding:`${ce}px`,opacity:E.map(D=>D.opacity),background:E.map(D=>D.backgroundColor),display:"flex",justifyContent:"left",alignItems:"center",pointerEvents:"auto",cursor:"pointer"},obsRef:D=>{this._primaryElement.set(D,void 0)}},[this._line]),o.derived(this,D=>{const T=b.read(D);if(!T)return;const M=document.createElement("div");return D.store.add(new o.KeybindingLabel(M,a.OS,{...o.unthemedKeybindingLabelOptions,disableTitle:!0})).set(T.keybinding),o.n.div({id:$g,style:{position:"relative",borderRadius:`${pe}px`,borderTop:`${ce}px solid`,borderRight:`${ce}px solid`,borderBottom:`${ce}px solid`,borderLeft:`${ce}px solid`,borderColor:R.map(U=>U.borderColor),opacity:R.map(U=>U.opacity),color:R.map(U=>U.color),display:"flex",justifyContent:"center",alignItems:"center",padding:"0 4px 0 1px",marginLeft:"4px",background:R.map(U=>U.backgroundColor),cursor:"pointer",textWrap:"nowrap"},class:"inline-edit-alternative-action-label",obsRef:U=>{this._secondaryElement.set(U,void 0)},ref:U=>{T.tooltip&&D.store.add(this._hoverService.setupDelayedHoverAtMouse(U,{content:T.tooltip,appearance:{compact:!0}}))}},[M,o.$("div.inline-edit-alternative-action-label-separator"),T.icon?o.renderIcon(T.icon):void 0,T.label])})]),o.n.div({style:{position:"absolute",...fe(D=>f.read(D).originalLine.withMargin(ce)),boxSizing:"border-box",borderRadius:`${pe}px`,border:`${ce}px solid ${m}`,background:o.asCssVariable(lD),pointerEvents:"none"}},[]),o.n.svg({width:11,height:14,viewBox:"0 0 11 14",fill:"none",style:{position:"absolute",left:f.map(D=>D.modifiedLine.left-16),top:f.map(D=>D.modifiedLine.top+Math.round((D.lineHeight-14-5)/2)),pointerEvents:"none"},onmousedown:D=>this._mouseDown(D)},[o.n.svgElem("path",{d:"M1 0C1 2.98966 1 5.92087 1 8.49952C1 9.60409 1.89543 10.5 3 10.5H10.5",stroke:o.asCssVariable(o.editorHoverForeground)}),o.n.svgElem("path",{d:"M6 7.5L9.99999 10.49998L6 13.5",stroke:o.asCssVariable(o.editorHoverForeground)})])])]})]).keepUpdated(this._store),this._register(this._editor.createOverlayWidget({domNode:this._root.element,minContentWidthInPx:o.constObservable(0),position:o.constObservable({preference:{top:0,left:0}}),allowEditorOverflow:!1}))}_mouseDown(e){const t=fR(e.target,new Set([nb,sb,$g,ib]));t&&(e.preventDefault(),this._onDidClick.fire(Yt.create(e,t===$g)))}},to.MAX_LENGTH=100,to);Vs=gR([wr(3,o.ILanguageService),wr(4,o.IThemeService),wr(5,o.IKeybindingService),wr(6,o.IHoverService),wr(7,o.IUserInteractionService)],Vs);function fR(c,e){let t=c;for(;t;){if(e.has(t.id))return t.id;t=t.parentElement}return null}class mR extends a.Disposable{constructor(e,t,i){super(),this._originalEditor=e,this._state=t,this._modifiedTextModel=i,this._onDidClick=this._register(new a.Emitter),this.onDidClick=this._onDidClick.event,this.isHovered=o.observableCodeEditor(this._originalEditor).isTargetHovered(s=>s.target.type===6&&s.target.detail.injectedText?.options.attachedData instanceof qg&&s.target.detail.injectedText.options.attachedData.owner===this,this._store),this._tokenizationFinished=bR(this._modifiedTextModel),this._decorations=o.derived(this,s=>{const r=this._state.read(s);if(!r)return;const l=r.modifiedText,d=r.mode==="insertionInline",h=r.diff.length===1&&r.diff[0].innerChanges?.length===1,u=!0,g=[],p=[],f=o.ModelDecorationOptions.register({className:"inlineCompletions-line-insert",description:"line-insert",isWholeLine:!0,marginClassName:"gutter-insert"}),m=o.ModelDecorationOptions.register({className:"inlineCompletions-line-delete",description:"line-delete",isWholeLine:!0,marginClassName:"gutter-delete"}),_=o.ModelDecorationOptions.register({className:"inlineCompletions-char-delete",description:"char-delete",isWholeLine:!1,zIndex:1}),v=o.ModelDecorationOptions.register({className:"inlineCompletions-char-insert",description:"char-insert",isWholeLine:!0}),b=o.ModelDecorationOptions.register({className:"inlineCompletions-char-insert",description:"char-insert",shouldFillLineOnLineBreak:!0}),S=o.ModelDecorationOptions.register({className:"inlineCompletions-char-insert diff-range-empty",description:"char-insert diff-range-empty"}),w=o.ModelDecorationOptions.register({className:"inlineCompletions-original-lines",description:"inlineCompletions-original-lines",isWholeLine:!1,shouldFillLineOnLineBreak:!0}),I=r.mode!=="sideBySide"&&r.mode!=="deletion"&&r.mode!=="insertionInline"&&r.mode!=="lineReplacement",C=r.mode==="lineReplacement";for(const y of r.diff)if(I&&(y.original.isEmpty||g.push({range:y.original.toInclusiveRange(),options:m}),y.modified.isEmpty||p.push({range:y.modified.toInclusiveRange(),options:f})),y.modified.isEmpty||y.original.isEmpty)y.original.isEmpty||g.push({range:y.original.toInclusiveRange(),options:_}),y.modified.isEmpty||p.push({range:y.modified.toInclusiveRange(),options:v});else{const x=d&&_R(y);for(const L of y.innerChanges||[]){if(y.original.contains(L.originalRange.startLineNumber)&&!(C&&L.originalRange.isEmpty())){const E=this._originalEditor.getModel()?.getValueInRange(L.originalRange,1);g.push({range:L.originalRange,options:{description:"char-delete",shouldFillLineOnLineBreak:!1,className:Ml("inlineCompletions-char-delete",L.originalRange.isSingleLine()&&r.mode==="insertionInline"&&"single-line-inline",L.originalRange.isEmpty()&&"empty",(L.originalRange.isEmpty()&&h||r.mode==="deletion"&&E===` +`)&&u&&!x&&"diff-range-empty"),inlineClassName:x?Ml("strike-through","inlineCompletions"):null,zIndex:1}})}if(y.modified.contains(L.modifiedRange.startLineNumber)&&p.push({range:L.modifiedRange,options:L.modifiedRange.isEmpty()&&u&&!x&&h?S:b}),x){const E=l.getValueOfRange(L.modifiedRange),R=E.length>3?[{text:E.slice(0,1),extraClasses:["start"],offsetRange:new a.OffsetRange(L.modifiedRange.startColumn-1,L.modifiedRange.startColumn)},{text:E.slice(1,-1),extraClasses:[],offsetRange:new a.OffsetRange(L.modifiedRange.startColumn,L.modifiedRange.endColumn-2)},{text:E.slice(-1),extraClasses:["end"],offsetRange:new a.OffsetRange(L.modifiedRange.endColumn-2,L.modifiedRange.endColumn-1)}]:[{text:E,extraClasses:["start","end"],offsetRange:new a.OffsetRange(L.modifiedRange.startColumn-1,L.modifiedRange.endColumn)}];this._tokenizationFinished.read(s);const D=this._modifiedTextModel.tokenization.getLineTokens(L.modifiedRange.startLineNumber);for(const{text:T,extraClasses:M,offsetRange:A}of R)g.push({range:a.Range.fromPositions(L.originalRange.getEndPosition()),options:{description:"inserted-text",before:{tokens:D.getTokensInRange(A),content:T,inlineClassName:Ml("inlineCompletions-char-insert",L.modifiedRange.isSingleLine()&&r.mode==="insertionInline"&&"single-line-inline",...M),cursorStops:a.InjectedTextCursorStops.None,attachedData:new qg(this)},zIndex:2,showIfCollapsed:!0}})}}}if(r.editorType===J.DiffEditor)for(const y of r.diff)y.original.isEmpty||g.push({range:y.original.toExclusiveRange(),options:w});return{originalDecorations:g,modifiedDecorations:p}}),this._register(o.observableCodeEditor(this._originalEditor).setDecorations(this._decorations.map(s=>s?.originalDecorations??[])));const n=this._state.map(s=>s?.modifiedCodeEditor);this._register(o.autorunWithStore((s,r)=>{const l=n.read(s);l&&r.add(o.observableCodeEditor(l).setDecorations(this._decorations.map(d=>d?.modifiedDecorations??[])))})),this._register(this._originalEditor.onMouseUp(s=>{if(s.target.type!==6)return;const r=s.target.detail.injectedText?.options.attachedData;r instanceof qg&&r.owner===this&&this._onDidClick.fire(new Yt(s.event))}))}}class qg{constructor(e){this.owner=e}}function _R(c){return c.innerChanges?c.innerChanges.every(e=>o.rangeIsSingleLine(e.modifiedRange)&&o.rangeIsSingleLine(e.originalRange)):!1}let vR=0;function bR(c){return o.observableFromEvent(c.onDidChangeTokens,()=>vR++)}var CR=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},SR=function(c,e){return function(t,i){e(t,i,c)}};let Gg=class extends a.Disposable{constructor(e,t,i,n,s,r){super(),this._editor=e,this._model=t,this._simpleModel=i,this._inlineSuggestInfo=n,this._showCollapsed=s,this._instantiationService=r,this._tabAction=o.derived(u=>this._model.read(u)?.tabAction.read(u)??Y.Inactive),this.displayRange=o.derived(this,u=>{const g=this._uiState.read(u);if(g&&g.target.uri.toString()===this._editorObs.model.read(u)?.uri.toString()){if(g.state?.kind==="custom"){const p=g.state.displayLocation?.range;if(!p)throw new a.BugIndicatingError("custom view should have a range");return new a.LineRange(p.startLineNumber,p.endLineNumber)}return g.state?.kind==="insertionMultiLine"?this._insertion.originalLines.read(u):g.edit.displayRange}}),this._currentInlineEditCache=void 0,this._uiState=o.derived(this,u=>{const g=this._model.read(u),p=this._editorObs.model.read(u);if(!g||!p||!this._constructorDone.read(u))return;const f=g.inlineEdit;let m,_,v;f.edit?(_=a.RangeMapping.fromEdit(f.edit),v=new a.StringText(f.edit.apply(f.originalText)),m=a.lineRangeMappingFromRangeMappings(_,f.originalText,v)):(_=[],m=[],v=f.originalText);let b=this._determineRenderState(g,u,m,v);if(!b){a.onUnexpectedError(new Error(`unable to determine view: tried to render ${this._previousView?.view}`));return}const S=this._getLongDistanceHintState(g,u);if(S&&S.isVisible&&b.viewData.setLongDistanceViewData(S.lineNumber,f.lineEdit.lineRange.startLineNumber),b.kind===O.SideBySide){const C=wD(v.getValue(),f.modifiedLineRange,p.getOptions().tabSize);v=new a.StringText(C.applyToString(v.getValue())),_=bD(_,C),m=a.lineRangeMappingFromRangeMappings(_,f.originalText,v)}this._previewTextModel.setLanguage(p.getLanguageId());const w=this._previewTextModel.getValue();if(w!==v.getValue()){this._previewTextModel.setEOL(p.getEndOfLineSequence());const y=a.StringEdit.replace(new a.OffsetRange(0,w.length),v.getValue()).removeCommonSuffixPrefix(w),x=ul(this._previewTextModel).getTextEdit(y);this._previewTextModel.edit(x)}this._showCollapsed.read(u)&&(b={kind:O.Collapsed,viewData:b.viewData}),g.handleInlineEditShownNextFrame(b.kind,b.viewData);const I=f.action?.kind==="jumpTo"?f.action.position:null;return{state:b,diff:m,edit:f,newText:v.getValue(),newTextLineCount:f.modifiedLineRange.length,editorType:g.editorType,longDistanceHint:S,nextCursorPosition:I,target:f.inlineCompletion.originalTextRef}}),this.inlineEditsIsHovered=o.derived(this,u=>this._sideBySide.isHovered.read(u)||this._wordReplacementViews.read(u).some(g=>g.isHovered.read(u))||this._deletion.isHovered.read(u)||this._inlineDiffView.isHovered.read(u)||this._lineReplacementView.isHovered.read(u)||this._insertion.isHovered.read(u)||this._customView.isHovered.read(u)||this._longDistanceHint.map((g,p)=>g?.isHovered.read(p)??!1).read(u)),this.gutterIndicatorOffset=o.derived(this,u=>this._uiState.read(u)?.state?.kind==="insertionMultiLine"?this._insertion.startLineOffset.read(u):0),this._editorObs=o.observableCodeEditor(this._editor),this._constructorDone=o.observableValue(this,!1),this._previewTextModel=this._register(this._instantiationService.createInstance(o.TextModel,"",this._editor.getModel().getLanguageId(),{...o.TextModel.DEFAULT_CREATION_OPTIONS,bracketPairColorizationOptions:{enabled:!0,independentColorPoolPerBracketType:!1}},null)),this._sideBySide=this._register(this._instantiationService.createInstance(Vl,this._editor,this._model.map(u=>u?.inlineEdit),this._previewTextModel,this._uiState.map(u=>u&&u.state?.kind===O.SideBySide?{newTextLineCount:u.newTextLineCount,editorType:u.editorType}:void 0),this._tabAction)),this._deletion=this._register(this._instantiationService.createInstance(kD,this._editor,this._model.map(u=>u?.inlineEdit),this._uiState.map(u=>u&&u.state?.kind===O.Deletion?{originalRange:u.state.originalRange,deletions:u.state.deletions,editorType:u.editorType}:void 0),this._tabAction)),this._insertion=this._register(this._instantiationService.createInstance(Ag,this._editor,this._uiState.map(u=>u&&u.state?.kind===O.InsertionMultiLine?{lineNumber:u.state.lineNumber,startColumn:u.state.column,text:u.state.text,editorType:u.editorType}:void 0),this._tabAction)),this._inlineCollapsedView=this._register(this._instantiationService.createInstance(Rg,this._editor,this._model.map((u,g)=>this._uiState.read(g)?.state?.kind===O.Collapsed?u?.inlineEdit:void 0))),this._customView=this._register(this._instantiationService.createInstance(Ng,this._editor,this._model.map((u,g)=>this._uiState.read(g)?.state?.kind===O.Custom?u?.displayLocation:void 0),this._tabAction,this._uiState.map(u=>u?.editorType??J.TextEditor))),this._showLongDistanceHint=this._editorObs.getOption(71).map(this,u=>u.edits.showLongDistanceHint),this._longDistanceHint=o.derived(this,u=>{if(this._showLongDistanceHint.read(u))return u.store.add(this._instantiationService.createInstance(Ug,this._editor,this._uiState.map((g,p)=>g?.longDistanceHint?{hint:g.longDistanceHint,newTextLineCount:g.newTextLineCount,edit:g.edit,diff:g.diff,editorType:g.editorType,model:this._simpleModel.read(p),inlineSuggestInfo:this._inlineSuggestInfo.read(p),nextCursorPosition:g.nextCursorPosition,target:g.target}:void 0),this._previewTextModel,this._tabAction))}).recomputeInitiallyAndOnChange(this._store),this._inlineDiffViewState=o.derived(this,u=>{const g=this._uiState.read(u);if(!(!g||!g.state)&&!(g.state.kind==="wordReplacements"||g.state.kind==="insertionMultiLine"||g.state.kind==="collapsed"||g.state.kind==="custom"||g.state.kind==="jumpTo"))return{modifiedText:new a.StringText(g.newText),diff:g.diff,mode:g.state.kind,modifiedCodeEditor:this._sideBySide.previewEditor,editorType:g.editorType}}),this._inlineDiffView=this._register(new mR(this._editor,this._inlineDiffViewState,this._previewTextModel)),this._jumpToView=this._register(this._instantiationService.createInstance(Vg,this._editorObs,{style:"label"},o.derived(u=>{const g=this._uiState.read(u);if(g?.state?.kind===O.JumpTo)return{jumpToPosition:g.state.position}})));const l=o.derivedOpts({equalsFn:o.equals.arrayC(o.equals.thisC())},u=>{const g=this._uiState.read(u);return g?.state?.kind===O.WordReplacements?g.state.replacements.map(p=>new pR(p,g.editorType,g.state?.alternativeAction)):[]});this._wordReplacementViews=o.mapObservableArrayCached(this,l,(u,g)=>g.add(this._instantiationService.createInstance(Vs,this._editorObs,u,this._tabAction))),this._lineReplacementView=this._register(this._instantiationService.createInstance(Fg,this._editorObs,this._uiState.map(u=>u?.state?.kind===O.LineReplacement?{originalRange:u.state.originalRange,modifiedRange:u.state.modifiedRange,modifiedLines:u.state.modifiedLines,replacements:u.state.replacements}:void 0),this._uiState.map(u=>u?.editorType??J.TextEditor),this._tabAction)),this._useCodeShifting=this._editorObs.getOption(71).map(u=>u.edits.allowCodeShifting),this._renderSideBySide=this._editorObs.getOption(71).map(u=>u.edits.renderSideBySide),this._register(o.autorun(u=>{const g=this._model.read(u);g&&u.store.add(a.Event.any(this._sideBySide.onDidClick,this._lineReplacementView.onDidClick,this._insertion.onDidClick,...this._wordReplacementViews.read(u).map(p=>p.onDidClick),this._inlineDiffView.onDidClick,this._customView.onDidClick)(p=>{this._viewHasBeenShownLongerThan(350)&&(p.event.preventDefault(),g.accept(p.alternativeAction))}))})),this._wordReplacementViews.recomputeInitiallyAndOnChange(this._store);const d=o.derived(this,u=>Math.max(...this._wordReplacementViews.read(u).map(g=>g.minEditorScrollHeight.read(u)),this._lineReplacementView.minEditorScrollHeight.read(u),this._customView.minEditorScrollHeight.read(u))).recomputeInitiallyAndOnChange(this._store);let h;this._register(o.autorun(u=>{const g=d.read(u),p=this._editorObs.model.read(u);p&&this._editor.changeViewZones(f=>{const m=this._editor.getScrollHeight(),_=g-m+1;_!==0&&h!==void 0&&(f.removeZone(h),h=void 0),!(_<=0)&&(h=f.addZone({afterLineNumber:p.getLineCount(),heightInPx:_,domNode:o.$("div.minScrollHeightViewZone")}))})})),this._constructorDone.set(!0,void 0)}_getLongDistanceHintState(e,t){if(!e.inlineEdit.inlineCompletion.identity.jumpedTo.read(t)&&e.inlineEdit.action!==void 0)return e.inlineEdit.originalText.uri.toString()!==this._editorObs.model.read(t)?.uri.toString()?{isVisible:!0,lineNumber:e.inlineEdit.cursorPosition.lineNumber}:(this._currentInlineEditCache?.inlineSuggestionIdentity!==e.inlineEdit.inlineCompletion.identity&&(this._currentInlineEditCache={inlineSuggestionIdentity:e.inlineEdit.inlineCompletion.identity,firstCursorLineNumber:e.inlineEdit.cursorPosition.lineNumber}),{lineNumber:this._currentInlineEditCache.firstCursorLineNumber,isVisible:!e.inViewPort.read(t)})}_getCacheId(e){return e.inlineEdit.inlineCompletion.identity.id}_determineView(e,t,i,n){const s=e.inlineEdit,r=this._previousView?.id===this._getCacheId(e)&&this._previousView?.uri.toString()===this._editorObs.model.get().uri.toString(),l=this._previousView?.editorWidth!==this._editorObs.layoutInfoWidth.read(t)&&(this._previousView?.view===O.SideBySide||this._previousView?.view===O.LineReplacement);if(r&&!l)return this._previousView.view;const d=e.inlineEdit.inlineCompletion.action;if(d?.kind==="edit"&&d.alternativeAction)return O.WordReplacements;const h=e.inlineEdit.inlineCompletion.originalTextRef.uri,u=this._editorObs.model.read(t)?.uri;if(u&&h.toString()!==u.toString()||e.displayLocation&&!e.inlineEdit.inlineCompletion.identity.jumpedTo.read(t))return O.Custom;const g=s.originalLineRange.length,p=s.modifiedLineRange.length,f=i.flatMap(_=>_.innerChanges??[]),m=f.length===1;if(e.editorType!==J.DiffEditor){if(m&&this._useCodeShifting.read(t)!=="never"&&rb(i))return wR(i,s.cursorPosition)?O.InsertionInline:O.LineReplacement;if(lb(f,s,n))return O.Deletion;if(ab(i)&&this._useCodeShifting.read(t)==="always")return O.InsertionMultiLine;if(f.every(v=>a.TextLength.ofRange(v.originalRange).columnCountn.getValueOfRange(S.modifiedRange)),b=f.map(S=>e.inlineEdit.originalText.getValueOfRange(S.originalRange));if(!v.some(S=>S.includes(" "))&&!b.some(S=>S.includes(" "))&&(!f.some(S=>S.originalRange.isEmpty())||!cb(f.map(S=>new a.TextReplacement(S.originalRange,"")),s.originalText).some(S=>S.range.isEmpty()&&a.TextLength.ofRange(S.range).columnCount0&&p>0)return g===1&&p===1&&e.editorType!==J.DiffEditor?O.LineReplacement:this._renderSideBySide.read(t)!=="never"&&Vl.fitsInsideViewport(this._editor,this._previewTextModel,s,t)?O.SideBySide:O.LineReplacement;if(e.editorType===J.DiffEditor){if(lb(f,s,n))return O.Deletion;if(ab(i)&&this._useCodeShifting.read(t)==="always")return O.InsertionMultiLine}return O.SideBySide}_determineRenderState(e,t,i,n){if(e.inlineEdit.action?.kind==="jumpTo")return{kind:O.JumpTo,position:e.inlineEdit.action.position,viewData:ob};const s=e.inlineEdit;let r=this._determineView(e,t,i,n);if(this._willRenderAboveCursor(t,s,r))switch(r){case O.LineReplacement:case O.WordReplacements:r=O.SideBySide;break}this._previousView={id:this._getCacheId(e),view:r,editorWidth:this._editor.getLayoutInfo().width,timestamp:Date.now(),uri:this._editorObs.model.get().uri};const l=i.flatMap(p=>p.innerChanges??[]),d=this._editor.getModel(),h=l.map(p=>({originalRange:p.originalRange,modifiedRange:p.modifiedRange,original:s.originalText.getValueOfRange(p.originalRange),modified:n.getValueOfRange(p.modifiedRange)})),u=yR(s,h,d);switch(r){case O.InsertionInline:return{kind:O.InsertionInline,viewData:u};case O.SideBySide:return{kind:O.SideBySide,viewData:u};case O.Collapsed:return{kind:O.Collapsed,viewData:u};case O.Custom:return{kind:O.Custom,displayLocation:e.displayLocation,viewData:u}}if(r===O.Deletion)return{kind:O.Deletion,originalRange:s.originalLineRange,deletions:l.map(p=>p.originalRange),viewData:u};if(r===O.InsertionMultiLine){const p=l[0];return{kind:O.InsertionMultiLine,lineNumber:p.originalRange.startLineNumber,column:p.originalRange.startColumn,text:n.getValueOfRange(p.modifiedRange),viewData:u}}const g=h.map(p=>new a.TextReplacement(p.originalRange,p.modified));if(g.length!==0){if(r===O.WordReplacements){let p=IR(g,s.originalText);return p.some(f=>f.range.isEmpty())&&(p=cb(g,s.originalText)),{kind:O.WordReplacements,replacements:p,alternativeAction:e.inlineEdit.action?.alternativeAction,viewData:u}}if(r===O.LineReplacement)return{kind:O.LineReplacement,originalRange:s.originalLineRange,modifiedRange:s.modifiedLineRange,modifiedLines:s.modifiedLineRange.mapToLineArray(p=>n.getLineAt(p)),replacements:l.map(p=>({originalRange:p.originalRange,modifiedRange:p.modifiedRange})),viewData:u}}}_willRenderAboveCursor(e,t,i){if(this._useCodeShifting.read(e)==="always")return!1;for(const s of t.multiCursorPositions)if(i===O.WordReplacements&&s.lineNumber===t.originalLineRange.startLineNumber+1||i===O.LineReplacement&&s.lineNumber>=t.originalLineRange.endLineNumberExclusive&&s.lineNumber=e}};Gg=CR([SR(5,o.IInstantiationService)],Gg);const ob=new Fu(-1,-1,-1,-1,-1,-1,-1,!0);function yR(c,e,t){if(!c.edit)return ob;const i=c.cursorPosition,n=e.length===0?!1:e[0].modified.startsWith(t.getEOL());return new Fu(c.edit.replacements.length===0?0:c.edit.replacements[0].range.getStartPosition().column-i.column,c.lineEdit.lineRange.startLineNumber-i.lineNumber+(n&&c.lineEdit.lineRange.startLineNumber>=i.lineNumber?1:0),c.lineEdit.lineRange.length,c.lineEdit.newLines.length,e.reduce((r,l)=>r+l.original.length,0),e.reduce((r,l)=>r+l.modified.length,0),e.length,e.every(r=>r.original===e[0].original&&r.modified===e[0].modified))}function rb(c){return c.every(t=>t.innerChanges.every(i=>e(i)));function e(t){return!(!t.originalRange.isEmpty()||!(t.modifiedRange.startLineNumber===t.modifiedRange.endLineNumber))}}function wR(c,e){if(!e||!rb(c))return!1;const t=e;return c.every(n=>n.innerChanges.every(s=>i(s)));function i(n){const s=n.originalRange.getStartPosition();return!!(t.isBeforeOrEqual(s)||s.lineNumberi.innerChanges??[]);if(e.length!==1)return!1;const t=e[0];return!(!t.originalRange.isEmpty()||t.modifiedRange.startLineNumber===t.modifiedRange.endLineNumber)}function lb(c,e,t){return c.map(n=>({original:e.originalText.getValueOfRange(n.originalRange),modified:t.getValueOfRange(n.modifiedRange)})).every(({original:n,modified:s})=>s.trim()===""&&n.length>0&&(n.length>s.length||n.trim()!==""))}function IR(c,e){return db(c,e,t=>/^[a-zA-Z]$/.test(t))}function cb(c,e){return db(c,e,t=>!/^\s$/.test(t))}function db(c,e,t){const i=[];c.sort((s,r)=>a.Range.compareRangesUsingStarts(s.range,r.range));for(const s of c){let r=s.range.startColumn-1,l=s.range.endColumn-2,d="",h="";const u=e.getLineAt(s.range.startLineNumber),g=e.getLineAt(s.range.endLineNumber);if(n(u[r]))for(;n(u[r-1]);)d=u[r-1]+d,r--;if(n(g[l])||l0&&a.Range.areIntersectingOrTouching(i[i.length-1].range,p.range)&&(p=a.TextReplacement.joinReplacements([i.pop(),p],e)),i.push(p)}function n(s){return s===void 0?!1:t(s)}return i}var xR=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ER=function(c,e){return function(t,i){e(t,i,c)}};let Zg=class extends a.Disposable{constructor(e,t,i,n){super(),this._editor=e,this._model=t,this._showCollapsed=i,this._inlineEdit=o.derived(this,s=>{const r=this._model.read(s);if(!r||!this._editor.getModel())return;const d=r.inlineEditState.read(s);if(!d)return;const h=d.inlineSuggestion.action;let u;if(h?.kind==="edit"){const g=h.stringEdit,p=d.inlineSuggestion.originalTextRef.getTransformer(),f=g.replacements.map(m=>{const _=a.Range.fromPositions(p.getPosition(m.replaceRange.start),p.getPosition(m.replaceRange.endExclusive));return new a.TextReplacement(_,m.newText)});u=new a.TextEdit(f)}else u=void 0;return new PD(d.inlineSuggestion.originalTextRef,h,u,r.primaryPosition.read(void 0),r.allPositions.read(void 0),d.inlineSuggestion.source.inlineSuggestions.commands??[],d.inlineSuggestion)}),this._inlineEditModel=o.derived(this,s=>{const r=this._model.read(s);if(!r)return;const l=this._inlineEdit.read(s);if(!l)return;const d=o.derived(this,h=>{if(this._editorObs.isFocused.read(h)){if(r.tabShouldJumpToInlineEdit.read(h))return Y.Jump;if(r.tabShouldAcceptInlineEdit.read(h))return Y.Accept}return Y.Inactive});return new OD(r,l,d)}),this._editorObs=o.observableCodeEditor(this._editor),this.view=this._register(n.createInstance(Gg,this._editor,this._inlineEditModel,this._model.map(s=>s?Ol.fromInlineCompletionModel(s):void 0),this._inlineEdit.map(s=>s?Pl.fromInlineSuggestion(s.inlineCompletion):void 0),this._showCollapsed))}};Zg=xR([ER(3,o.IInstantiationService)],Zg);var LR=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},DR=function(c,e){return function(t,i){e(t,i,c)}};let Xg=($n=class extends a.Disposable{constructor(e,t,i,n){super(),this._editor=e,this._model=t,this._focusIsInMenu=i,this._instantiationService=n,this._ghostTexts=o.derived(this,s=>this._model.read(s)?.ghostTexts.read(s)??[]),this._inlineEdit=o.derived(this,s=>this._model.read(s)?.inlineEditState.read(s)?.inlineSuggestion),this._everHadInlineEdit=o.derivedObservableWithCache(this,(s,r)=>r||!!this._inlineEdit.read(s)||!!this._model.read(s)?.inlineCompletionState.read(s)?.inlineSuggestion?.showInlineEditMenu),this._indicatorIsHoverVisible=o.observableValue(this,void 0),this._showInlineEditCollapsed=o.derived(this,s=>(this._model.read(s)?.showCollapsed.read(s)??!1)&&!this._indicatorIsHoverVisible.read(s)?.read(s)),this._inlineEditWidget=o.derivedDisposable(s=>{if(this._everHadInlineEdit.read(s))return this._instantiationService.createInstance(Zg,this._editor,this._model,this._showInlineEditCollapsed)}),this._gutterIndicatorState=o.derived(s=>{const r=this._model.read(s);if(!r)return;const l=r.state.read(s);if(l?.kind==="ghostText"&&l.inlineSuggestion?.showInlineEditMenu)return{displayRange:a.LineRange.ofLength(l.primaryGhostText.lineNumber,1),tabAction:o.derived(this,d=>this._editorObs.isFocused.read(d)?Y.Accept:Y.Inactive),gutterIndicatorOffset:o.constObservable(RR(l.inlineSuggestion,this._editor)),inlineSuggestion:l.inlineSuggestion,model:r};if(l?.kind==="inlineEdit"){const d=this._inlineEditWidget.read(s)?.view;if(!d)return;const h=d.displayRange.read(s);return h?{displayRange:h,tabAction:o.derived(u=>{if(this._editorObs.isFocused.read(u)){if(r.tabShouldJumpToInlineEdit.read(u))return Y.Jump;if(r.tabShouldAcceptInlineEdit.read(u))return Y.Accept}return Y.Inactive}),gutterIndicatorOffset:d.gutterIndicatorOffset,inlineSuggestion:l.inlineSuggestion,model:r}:void 0}else return}),this._stablizedGhostTexts=mE(this._ghostTexts,this._store),this._editorObs=o.observableCodeEditor(this._editor),this._ghostTextWidgets=o.mapObservableArrayCached(this,this._stablizedGhostTexts,(s,r)=>r.add(this._createGhostText(s))).recomputeInitiallyAndOnChange(this._store),this._inlineEditWidget.recomputeInitiallyAndOnChange(this._store),this._fontFamily=this._editorObs.getOption(71).map(s=>s.fontFamily),this._register(o.createStyleSheetFromObservable(o.derived(s=>` +.monaco-editor .ghost-text-decoration, +.monaco-editor .ghost-text-decoration-preview, +.monaco-editor .ghost-text { + font-family: ${this._fontFamily.read(s)}; +}`))),this._register(new eh(this._editor,this._model,this._instantiationService)),this._indicator=this._register(this._instantiationService.createInstance(Al,this._editorObs,o.derived(s=>{const r=this._gutterIndicatorState.read(s);if(r)return new Zv(Pl.fromInlineSuggestion(r.inlineSuggestion),r.displayRange,Ol.fromInlineCompletionModel(r.model),r.inlineSuggestion.action?.kind==="edit"?r.inlineSuggestion.action.alternativeAction:void 0)}),this._gutterIndicatorState.map((s,r)=>s?.tabAction?.read(r)??Y.Inactive),this._gutterIndicatorState.map((s,r)=>s?.gutterIndicatorOffset?.read(r)??0),this._inlineEditWidget.map((s,r)=>s?.view.inlineEditsIsHovered.read(r)??!1),this._focusIsInMenu)),this._indicatorIsHoverVisible.set(this._indicator.isHoverVisible,void 0),o.derived(s=>{const r=this._inlineEditWidget.read(s);if(r)return s.store.add(this._instantiationService.createInstance(Lg,r._inlineEditModel,o.constObservable(this._indicator),r.view._inlineCollapsedView))}).recomputeInitiallyAndOnChange(this._store)}_createGhostText(e){return this._instantiationService.createInstance(rr,this._editor,o.derived(t=>{const i=this._model.read(t),n=i?.inlineCompletionState.read(t)?.inlineSuggestion;return!i||!n?{ghostText:e.read(t),handleInlineCompletionShown:()=>{},warning:void 0}:{ghostText:e.read(t),handleInlineCompletionShown:s=>i.handleInlineSuggestionShown(n,O.GhostText,s,Date.now()),warning:lg.from(i?.warning.read(t))}}),{useSyntaxHighlighting:this._editorObs.getOption(71).map(t=>t.syntaxHighlightingEnabled),highlightShortSuggestions:!0})}shouldShowHoverAtViewZone(e){return this._ghostTextWidgets.get()[0]?.ownsViewZone(e)??!1}},$n.hot=o.createHotClass($n),$n);Xg=LR([DR(3,o.IInstantiationService)],Xg);function RR(c,e){const t=c.getSingleTextEdit(),i=e.getModel();if(!i)return 0;const n=i.getEOL();if(t.range.isEmpty()&&t.text.startsWith(n)){const s=e.getLineHeightForPosition(t.range.getStartPosition());return TR(t.text,n)*s}return 0}function TR(c,e){if(!e.length)return 0;let t=0,i=0;for(;c.startsWith(e,i);)t++,i+=e.length;return t}var NR=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ft=function(c,e){return function(t,i){e(t,i,c)}},ut;uL(c=>de.get(c));let de=(bt=class extends a.Disposable{static getInFocusedEditorOrParent(e){const t=Ym(e);return t?ut.get(t):null}static get(e){return ox(e.getContribution(ut.ID))}constructor(e,t,i,n,s,r,l,d,h,u){super(),this.editor=e,this._instantiationService=t,this._contextKeyService=i,this._configurationService=n,this._commandService=s,this._debounceService=r,this._languageFeaturesService=l,this._accessibilitySignalService=d,this._keybindingService=h,this._accessibilityService=u,this._enabled=o.derived(this,_=>this._enabledInConfig.read(_)&&(!this._isScreenReaderEnabled.read(_)||!this._editorDictationInProgress.read(_))),this._focusIsInMenu=o.observableValue(this,!1),this._focusIsInEditorOrMenu=o.derived(this,_=>{const v=this._editorObs.isFocused.read(_),b=this._focusIsInMenu.read(_);return v||b}),this._cursorIsInIndentation=o.derived(this,_=>{const v=this._editorObs.cursorPosition.read(_);if(v===null)return!1;const b=this._editorObs.model.read(_);if(!b)return!1;this._editorObs.versionId.read(_);const S=b.getLineIndentColumn(v.lineNumber);return v.column<=S}),this.model=o.derivedDisposable(this,_=>{if(this._editorObs.isReadonly.read(_))return;const v=this._editorObs.model.read(_);return v?this._instantiationService.createInstance(Gu,v,this._suggestWidgetAdapter.selectedItem,this._editorObs.versionId,this._positions,this._debounceValue,this._enabled,this.editor):void 0}),this._playAccessibilitySignal=o.observableSignal(this),this._view=o.derived(_=>_.store.add(this._instantiationService.createInstance(Xg.hot.read(_),this.editor,this.model,this._focusIsInMenu))),this._editorObs=o.observableCodeEditor(this.editor),this._positions=o.derived(this,_=>this._editorObs.selections.read(_)?.map(v=>v.getEndPosition())??[new a.Position(1,1)]),this._suggestWidgetAdapter=this._register(new GL(this._editorObs,_=>this.model.get()?.handleSuggestAccepted(_),()=>this.model.get()?.selectedInlineCompletion.get()?.getSingleTextEdit())),this._enabledInConfig=o.observableFromEvent(this,this.editor.onDidChangeConfiguration,()=>this.editor.getOption(71).enabled),this._isScreenReaderEnabled=o.observableFromEvent(this,this._accessibilityService.onDidChangeScreenReaderOptimized,()=>this._accessibilityService.isScreenReaderOptimized()),this._editorDictationInProgress=o.observableFromEvent(this,this._contextKeyService.onDidChangeContext,()=>this._contextKeyService.getContext(this.editor.getDomNode()).getValue("editorDictation.inProgress")===!0),this._debounceValue=this._debounceService.for(this._languageFeaturesService.inlineCompletionsProvider,"InlineCompletionsDebounce",{min:50,max:50}),this.model.recomputeInitiallyAndOnChange(this._store),this._hideInlineEditOnSelectionChange=this._editorObs.getOption(71).map(_=>!0),this._view.recomputeInitiallyAndOnChange(this._store),ut._instances.add(this),this._register(a.toDisposable(()=>ut._instances.delete(this))),this._register(o.autorun(_=>{const v=this.model.read(_);if(!v)return;const b=v.state.read(_);if(!b||!this._focusIsInEditorOrMenu.read(void 0))return;const S=b.kind==="inlineEdit"?b.nextEditUri:void 0;for(const w of ut._instances)w!==this&&(S&&o.isEqual(S,w.editor.getModel()?.uri)?w.model.read(void 0)?.trigger():w.reject())})),this._register(o.autorun(_=>{const v=this.model.read(_),b=this.editor.getModel()?.uri;!v||!b||_.store.add(v.onDidAccept(()=>{for(const S of ut._instances){if(S===this)continue;const w=S.model.read(void 0)?.state.read(void 0);w?.kind==="inlineEdit"&&o.isEqual(w.nextEditUri,b)&&S.model.read(void 0)?.stop("automatic")}}))})),this._register(o.runOnChange(this._editorObs.onDidType,(_,v)=>{this._enabled.get()&&this.model.get()?.trigger()})),this._register(o.runOnChange(this._editorObs.onDidPaste,(_,v)=>{this._enabled.get()&&this.model.get()?.trigger()}));const g=new Set([o.CoreEditingCommands.Tab.id,o.CoreEditingCommands.DeleteLeft.id,o.CoreEditingCommands.DeleteRight.id,cs,"acceptSelectedSuggestion",tl.ID,el.ID,j.NextMatchFindAction,jo.ID,Ja.ID,Wa.ID,Ha.ID,...o.TriggerInlineEditCommandsRegistry.getRegisteredCommands()]);this._register(this._commandService.onDidExecuteCommand(_=>{if(g.has(_.commandId)&&e.hasTextFocus()&&this._enabled.get()){let v=!1;_.commandId===cs&&(v=!0),this._editorObs.forceUpdate(b=>{this.model.get()?.trigger(b,{noDelay:v})})}})),this._register(o.runOnChange(this._editorObs.selections,(_,v,b)=>{if(b.some(S=>S.reason===3||S.source==="api")){if(!this._hideInlineEditOnSelectionChange.get()&&this.model.get()?.state.get()?.kind==="inlineEdit")return;const S=this.model.get();if(!S)return;S.state.get()?.kind==="ghostText"&&this.model.get()?.stop()}})),this._register(o.autorun(_=>{const v=this._focusIsInEditorOrMenu.read(_),b=this.model.read(void 0);if(v){const S=b?.state.read(void 0);(!S||S.kind!=="inlineEdit"||!S.nextEditUri)&&o.transaction(w=>{for(const I of ut._instances)I!==this&&I.model.read(void 0)?.stop("automatic",w)});return}this._contextKeyService.getContextKeyValue("accessibleViewIsShown")||this._configurationService.getValue("editor.inlineSuggest.keepOnBlur")||e.getOption(71).keepOnBlur||ds.dropDownVisible||b&&(b.state.read(void 0)?.inlineSuggestion?.isFromExplicitRequest&&b.inlineEditAvailable.read(void 0)||o.transaction(S=>{b.stop("automatic",S)}))})),this._register(o.autorun(_=>{const v=this.model.read(_)?.inlineCompletionState.read(_);v?.suggestItem?v.primaryGhostText.lineCount>=2&&this._suggestWidgetAdapter.forceRenderingAbove():this._suggestWidgetAdapter.stopForceRenderingAbove()})),this._register(a.toDisposable(()=>{this._suggestWidgetAdapter.stopForceRenderingAbove()}));const p=o.derivedObservableWithCache(this,(_,v)=>{const S=this.model.read(_)?.state.read(_);return this._suggestWidgetAdapter.selectedItem.get()?v:S?.inlineSuggestion?.semanticId});this._register(o.runOnChangeWithStore(o.derived(_=>(this._playAccessibilitySignal.read(_),p.read(_),{})),async(_,v,b,S)=>{let w=this.model.get(),I=w?.state.get();if(!I||!w||(await a.timeout(50,a.cancelOnDispose(S)),await o.waitForState(this._suggestWidgetAdapter.selectedItem,a.isUndefined,()=>!1,a.cancelOnDispose(S)),w=this.model.get(),I=w?.state.get(),!I||!w))return;const C=I.kind==="ghostText"?w.textModel.getLineContent(I.primaryGhostText.lineNumber):"";this._accessibilitySignalService.playSignal(I.kind==="ghostText"?o.AccessibilitySignal.inlineSuggestion:o.AccessibilitySignal.nextEditSuggestion),this.editor.getOption(12)&&(I.kind==="ghostText"?this._provideScreenReaderUpdate(I.primaryGhostText.renderForScreenReader(C)):this._provideScreenReaderUpdate(""))})),this._register(this._configurationService.onDidChangeConfiguration(_=>{_.affectsConfiguration("accessibility.verbosity.inlineCompletions")&&this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this._configurationService.getValue("accessibility.verbosity.inlineCompletions")})})),this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this._configurationService.getValue("accessibility.verbosity.inlineCompletions")});const f=new _E(this._contextKeyService);this._register(f.bind(V.cursorInIndentation,this._cursorIsInIndentation)),this._register(f.bind(V.hasSelection,_=>!this._editorObs.cursorSelection.read(_)?.isEmpty())),this._register(f.bind(V.cursorAtInlineEdit,this.model.map((_,v)=>_?.inlineEditState?.read(v)?.cursorAtInlineEdit.read(v)))),this._register(f.bind(V.tabShouldAcceptInlineEdit,this.model.map((_,v)=>!!_?.tabShouldAcceptInlineEdit.read(v)))),this._register(f.bind(V.tabShouldJumpToInlineEdit,this.model.map((_,v)=>!!_?.tabShouldJumpToInlineEdit.read(v)))),this._register(f.bind(V.inlineEditVisible,_=>this.model.read(_)?.inlineEditState.read(_)!==void 0)),this._register(f.bind(V.inlineSuggestionHasIndentation,_=>this.model.read(_)?.getIndentationInfo(_)?.startsWithIndentation)),this._register(f.bind(V.inlineSuggestionHasIndentationLessThanTabSize,_=>this.model.read(_)?.getIndentationInfo(_)?.startsWithIndentationLessThanTabSize)),this._register(f.bind(V.suppressSuggestions,_=>{const b=this.model.read(_)?.inlineCompletionState.read(_);return b?.primaryGhostText&&b?.inlineSuggestion?b.inlineSuggestion.source.inlineSuggestions.suppressSuggestions:void 0})),this._register(f.bind(V.inlineSuggestionAlternativeActionVisible,_=>{const S=this.model.read(_)?.inlineEditState.read(_)?.inlineSuggestion.action;return S&&S.kind==="edit"&&S.alternativeAction!==void 0})),this._register(f.bind(V.inlineSuggestionVisible,_=>{const b=this.model.read(_)?.inlineCompletionState.read(_);return!!b?.inlineSuggestion&&b?.primaryGhostText!==void 0&&!b?.primaryGhostText.isEmpty()}));const m=o.derived(this,_=>{const S=this.model.read(_)?.inlineCompletionState.read(_)?.primaryGhostText;return!S||S.isEmpty()?void 0:new a.Position(S.lineNumber,S.parts[0].column)});this._register(f.bind(V.cursorBeforeGhostText,_=>{const v=m.read(_);if(!v)return!1;const b=this._editorObs.cursorPosition.read(_);return b?v.equals(b):!1})),this._register(this._instantiationService.createInstance(Ru,this.editor))}playAccessibilitySignal(e){this._playAccessibilitySignal.trigger(e)}_provideScreenReaderUpdate(e){const t=this._contextKeyService.getContextKeyValue("accessibleViewIsShown"),i=this._keybindingService.lookupKeybinding("editor.action.accessibleView");let n;!t&&i&&this.editor.getOption(169)&&(n=a.localize(1247,"Inspect this in the accessible view ({0})",i.getAriaLabel())),o.alert(n?e+", "+n:e)}shouldShowHoverAt(e){const t=this.model.get()?.primaryGhostText.get();return t?t.parts.some(i=>e.containsPosition(new a.Position(t.lineNumber,i.column))):!1}shouldShowHoverAtViewZone(e){return this._view.get().shouldShowHoverAtViewZone(e)}reject(){o.transaction(e=>{const t=this.model.get();if(t&&(t.stop("explicitCancel",e),this._focusIsInEditorOrMenu.get()))for(const i of ut._instances)i!==this&&!i._focusIsInEditorOrMenu.get()&&i.model.get()?.stop("automatic",e)})}jump(){const e=this.model.get();e&&e.jump()}},ut=bt,bt._instances=new Set,bt.hot=o.createHotClass(bt),bt.ID="editor.contrib.inlineCompletionsController",bt);de=ut=NR([Ft(1,o.IInstantiationService),Ft(2,o.IContextKeyService),Ft(3,o.IConfigurationService),Ft(4,o.ICommandService),Ft(5,o.ILanguageFeatureDebounceService),Ft(6,o.ILanguageFeaturesService),Ft(7,o.IAccessibilitySignalService),Ft(8,o.IKeybindingService),Ft(9,o.IAccessibilityService)],de);const Kc=class Kc extends o.EditorAction{constructor(){super({id:Kc.ID,label:a.localize2(1224,"Show Next Inline Suggestion"),precondition:o.ContextKeyExpr.and(o.EditorContextKeys.writable,V.inlineSuggestionVisible),kbOpts:{weight:100,primary:606}})}async run(e,t){de.get(t)?.model.get()?.next()}};Kc.ID=hm;let Yg=Kc;const Uc=class Uc extends o.EditorAction{constructor(){super({id:Uc.ID,label:a.localize2(1225,"Show Previous Inline Suggestion"),precondition:o.ContextKeyExpr.and(o.EditorContextKeys.writable,V.inlineSuggestionVisible),kbOpts:{weight:100,primary:604}})}async run(e,t){de.get(t)?.model.get()?.previous()}};Uc.ID=dm;let Qg=Uc;const MR="vscode://schemas/inlineCompletionProviderIdArgs";function PR(c){const e=[];return c.providerId&&(e.push(c.providerId.toStringWithoutVersion()),e.push(c.providerId.extensionId+":*")),e}const hb=mx(px({showNoResultNotification:qa(O_()),providerId:qa(vx(MR,lx())),explicit:qa(O_()),changeHintData:qa(hx())}),ux());class OR extends o.EditorAction{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:a.localize2(1226,"Trigger Inline Suggestion"),precondition:o.EditorContextKeys.writable,metadata:{description:a.localize(1213,"Triggers an inline suggestion in the editor."),args:[{name:"args",description:a.localize(1214,"Options for triggering inline suggestions."),isOptional:!0,schema:hb.getJSONSchema()}]}})}async run(e,t,i){const n=e.get(o.INotificationService),s=e.get(o.ILanguageFeaturesService),r=de.get(t),l=hb.validateOrThrow(i),d=l?.providerId?s.inlineCompletionsProvider.all(t.getModel()).find(h=>PR(h).some(u=>u===l.providerId)):void 0;await o.asyncTransaction(async h=>{await r?.model.get()?.trigger(h,{provider:d,explicit:l?.explicit??!0,changeHint:l?.changeHintData?{data:l.changeHintData}:void 0}),r?.playAccessibilitySignal(h)}),l?.showNoResultNotification&&(r?.model.get()?.state.get()||n.notify({severity:o.Severity.Info,message:a.localize(1215,"No inline suggestion is available.")}))}}class AR extends o.EditorAction{constructor(){super({id:"editor.action.inlineSuggest.acceptNextWord",label:a.localize2(1227,"Accept Next Word Of Inline Suggestion"),precondition:o.ContextKeyExpr.and(o.EditorContextKeys.writable,V.inlineSuggestionVisible),kbOpts:{weight:101,primary:2065,kbExpr:o.ContextKeyExpr.and(o.EditorContextKeys.writable,V.inlineSuggestionVisible,V.cursorBeforeGhostText,o.CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate())},menuOpts:[{menuId:o.MenuId.InlineSuggestionToolbar,title:a.localize(1216,"Accept Word"),group:"primary",order:2}]})}async run(e,t){await de.get(t)?.model.get()?.acceptNextWord()}}class FR extends o.EditorAction{constructor(){super({id:"editor.action.inlineSuggest.acceptNextLine",label:a.localize2(1228,"Accept Next Line Of Inline Suggestion"),precondition:o.ContextKeyExpr.and(o.EditorContextKeys.writable,V.inlineSuggestionVisible),kbOpts:{weight:101},menuOpts:[{menuId:o.MenuId.InlineSuggestionToolbar,title:a.localize(1217,"Accept Line"),group:"secondary",order:2}]})}async run(e,t){await de.get(t)?.model.get()?.acceptNextLine()}}class zR extends o.EditorAction{constructor(){super({id:cs,label:a.localize2(1229,"Accept Inline Suggestion"),precondition:o.ContextKeyExpr.or(V.inlineSuggestionVisible,V.inlineEditVisible),menuOpts:[{menuId:o.MenuId.InlineSuggestionToolbar,title:a.localize(1218,"Accept"),group:"primary",order:2},{menuId:o.MenuId.InlineEditsActions,title:a.localize(1219,"Accept"),group:"primary",order:2}],kbOpts:[{primary:2,weight:200,kbExpr:o.ContextKeyExpr.or(o.ContextKeyExpr.and(V.inlineSuggestionVisible,o.EditorContextKeys.tabMovesFocus.toNegated(),N.Visible.toNegated(),o.EditorContextKeys.hoverFocused.toNegated(),V.hasSelection.toNegated(),V.inlineSuggestionHasIndentationLessThanTabSize),o.ContextKeyExpr.and(V.inlineEditVisible,o.EditorContextKeys.tabMovesFocus.toNegated(),N.Visible.toNegated(),o.EditorContextKeys.hoverFocused.toNegated(),V.tabShouldAcceptInlineEdit))}]})}async run(e,t){const i=de.getInFocusedEditorOrParent(e);i&&(i.model.get()?.accept(i.editor),i.editor.focus())}}o.KeybindingsRegistry.registerKeybindingRule({id:cs,weight:202,primary:2,when:o.ContextKeyExpr.and(V.inInlineEditsPreviewEditor)});class VR extends o.EditorAction{constructor(){super({id:ta,label:a.localize2(1230,"Accept Inline Suggestion Alternative Action"),precondition:o.ContextKeyExpr.and(V.inlineSuggestionAlternativeActionVisible,V.inlineEditVisible),menuOpts:[],kbOpts:[{primary:1026,weight:203}]})}async run(e,t){const i=de.getInFocusedEditorOrParent(e);i&&(i.model.get()?.accept(i.editor,!0),i.editor.focus())}}o.KeybindingsRegistry.registerKeybindingRule({id:ta,weight:203,primary:1026,when:o.ContextKeyExpr.and(V.inInlineEditsPreviewEditor)});class BR extends o.EditorAction{constructor(){super({id:um,label:a.localize2(1231,"Jump to next inline edit"),precondition:V.inlineEditVisible,menuOpts:[{menuId:o.MenuId.InlineEditsActions,title:a.localize(1220,"Jump"),group:"primary",order:1,when:V.cursorAtInlineEdit.toNegated()}],kbOpts:{primary:2,weight:201,kbExpr:o.ContextKeyExpr.and(V.inlineEditVisible,o.EditorContextKeys.tabMovesFocus.toNegated(),N.Visible.toNegated(),o.EditorContextKeys.hoverFocused.toNegated(),V.tabShouldJumpToInlineEdit)}})}async run(e,t){const i=de.get(t);i&&i.jump()}}const kc=class kc extends o.EditorAction{constructor(){super({id:kc.ID,label:a.localize2(1232,"Hide Inline Suggestion"),precondition:o.ContextKeyExpr.or(V.inlineSuggestionVisible,V.inlineEditVisible),kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,weight:190,primary:9},menuOpts:[{menuId:o.MenuId.InlineEditsActions,title:a.localize(1221,"Reject"),group:"primary",order:3}]})}async run(e,t){const i=de.getInFocusedEditorOrParent(e);o.transaction(n=>{i?.model.get()?.stop("explicitCancel",n)}),i?.editor.focus()}};kc.ID=gm;let Bl=kc;const jc=class jc extends o.EditorAction{constructor(){super({id:jc.ID,label:a.localize2(1233,"Toggle Inline Suggestions Show Collapsed"),precondition:o.ContextKeyExpr.true()})}async run(e,t){const i=e.get(o.IConfigurationService),n=i.getValue("editor.inlineSuggest.edits.showCollapsed");i.updateValue("editor.inlineSuggest.edits.showCollapsed",!n)}};jc.ID=Wd;let Jg=jc;o.KeybindingsRegistry.registerKeybindingRule({id:Bl.ID,weight:-1,primary:9,secondary:[1033],when:o.ContextKeyExpr.and(V.inInlineEditsPreviewEditor)});const $c=class $c extends o.Action2{constructor(){super({id:$c.ID,title:a.localize(1222,"Always Show Toolbar"),f1:!1,precondition:void 0,menu:[{id:o.MenuId.InlineSuggestionToolbar,group:"secondary",order:10}],toggled:o.ContextKeyExpr.equals("config.editor.inlineSuggest.showToolbar","always")})}async run(e){const t=e.get(o.IConfigurationService),n=t.getValue("editor.inlineSuggest.showToolbar")==="always"?"onHover":"always";t.updateValue("editor.inlineSuggest.showToolbar",n)}};$c.ID="editor.action.inlineSuggest.toggleAlwaysShowToolbar";let Wg=$c;class KR extends o.EditorAction{constructor(){super({id:"editor.action.inlineSuggest.dev.extractRepro",label:a.localize(1223,"Developer: Extract Inline Suggest State"),alias:"Developer: Inline Suggest Extract Repro",precondition:o.ContextKeyExpr.or(V.inlineEditVisible,V.inlineSuggestionVisible)})}async run(e,t){const i=e.get(o.IClipboardService),s=de.get(t)?.model.get();if(!s)return;const r=s.extractReproSample(),d=a.splitLines(JSON.stringify({inlineCompletion:r.inlineCompletion},null,4)).map(u=>"// "+u).join(` +`),h=`${r.documentValue} + +// +${d} +// +`;return await i.writeText(h),{reproCase:h}}}var UR=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Kl=function(c,e){return function(t,i){e(t,i,c)}};class kR{constructor(e,t,i){this.owner=e,this.range=t,this.controller=i}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let Hg=class{constructor(e,t,i,n,s){this._editor=e,this.accessibilityService=t,this._instantiationService=i,this._telemetryService=n,this._markdownRendererService=s,this.hoverOrdinal=4,this.hideCopyButton=!0}suggestHoverAnchor(e){const t=de.get(this._editor);if(!t)return null;const i=e.target;if(i.type===8){const n=i.detail;if(t.shouldShowHoverAtViewZone(n.viewZoneId))return new Co(1e3,this,a.Range.fromPositions(this._editor.getModel().validatePosition(n.positionBefore||n.position)),e.event.posx,e.event.posy,!1)}if(i.type===7&&t.shouldShowHoverAt(i.range))return new Co(1e3,this,i.range,e.event.posx,e.event.posy,!1);if(i.type===6&&i.detail.mightBeForeignElement&&t.shouldShowHoverAt(i.range))return new Co(1e3,this,i.range,e.event.posx,e.event.posy,!1);if(i.type===9&&i.element){const n=rr.getWarningWidgetContext(i.element);if(n&&t.shouldShowHoverAt(n.range))return new Co(1e3,this,n.range,e.event.posx,e.event.posy,!1)}return null}computeSync(e,t){if(this._editor.getOption(71).showToolbar!=="onHover")return[];const i=de.get(this._editor);return i&&i.shouldShowHoverAt(e.range)?[new kR(this,e.range,i)]:[]}renderHoverParts(e,t){const i=new a.DisposableStore,n=t[0];this._telemetryService.publicLog2("inlineCompletionHover.shown"),this.accessibilityService.isScreenReaderOptimized()&&!this._editor.getOption(12)&&i.add(this.renderScreenReaderText(e,n));const s=n.controller.model.get(),r=document.createElement("div");e.fragment.appendChild(r),i.add(o.autorunWithStore((d,h)=>{const u=h.add(this._instantiationService.createInstance(ds.hot.read(d),this._editor,!1,o.constObservable(null),s.selectedInlineCompletionIndex,s.inlineCompletionsCount,s.activeCommands,s.warning,()=>{e.onContentsChanged()}));r.replaceChildren(u.getDomNode())})),s.triggerExplicitly();const l={hoverPart:n,hoverElement:r,dispose(){i.dispose()}};return new qi([l])}getAccessibleContent(e){return a.localize(1248,"There are inline completions here")}renderScreenReaderText(e,t){const i=new a.DisposableStore,n=o.$,s=n("div.hover-row.markdown-hover"),r=o.append(s,n("div.hover-contents",{"aria-live":"assertive"})),l=d=>{const h=a.localize(1249,"Suggestion:"),u=i.add(this._markdownRendererService.render(new o.MarkdownString().appendText(h).appendCodeblock("text",d),{context:this._editor,asyncRenderCallback:()=>{r.className="hover-contents code-hover-contents",e.onContentsChanged()}}));r.replaceChildren(u.element)};return i.add(o.autorun(d=>{const h=t.controller.model.read(d)?.primaryGhostText.read(d);if(h){const u=this._editor.getModel().getLineContent(h.lineNumber);l(h.renderForScreenReader(u))}else o.reset(r)})),e.fragment.appendChild(s),i}};Hg=UR([Kl(1,o.IAccessibilityService),Kl(2,o.IInstantiationService),Kl(3,o.ITelemetryService),Kl(4,o.IMarkdownRendererService)],Hg);class jR{}o.registerEditorContribution(de.ID,rx(de.hot),3),o.registerEditorAction(OR),o.registerEditorAction(Yg),o.registerEditorAction(Qg),o.registerEditorAction(AR),o.registerEditorAction(FR),o.registerEditorAction(zR),o.registerEditorAction(VR),o.registerEditorAction(Jg),o.registerEditorAction(Bl),o.registerEditorAction(BR),o.registerAction2(Wg),o.registerEditorAction(KR),o.registerAction2(o.SnoozeInlineCompletion),o.registerAction2(o.CancelSnoozeInlineCompletion),Gi.register(Hg),ja.register(new jR);var $R=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ep=function(c,e){return function(t,i){e(t,i,c)}},Ir;let xr=(Ri=class{constructor(e,t,i,n){this.textModelResolverService=t,this.languageService=i,this.languageFeaturesService=n,this.toUnhook=new a.DisposableStore,this.toUnhookForKeyboard=new a.DisposableStore,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();const s=new Ca(e);this.toUnhook.add(s),this.toUnhook.add(s.onMouseMoveOrRelevantKeyDown(([r,l])=>{this.startFindDefinitionFromMouse(r,l??void 0)})),this.toUnhook.add(s.onExecute(r=>{this.isEnabled(r)&&this.gotoDefinition(r.target.position,r.hasSideBySideModifier).catch(l=>{a.onUnexpectedError(l)}).finally(()=>{this.removeLinkDecorations()})})),this.toUnhook.add(s.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(e){return e.getContribution(Ir.ID)}async startFindDefinitionFromCursor(e){await this.startFindDefinition(e),this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()})),this.toUnhookForKeyboard.add(this.editor.onKeyDown(t=>{t&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))}startFindDefinitionFromMouse(e,t){if(e.target.type===9&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,t)){this.currentWordAtPosition=null,this.removeLinkDecorations();return}const i=e.target.position;this.startFindDefinition(i)}async startFindDefinition(e){this.toUnhookForKeyboard.clear();const t=e?this.editor.getModel()?.getWordAtPosition(e):null;if(!t){this.currentWordAtPosition=null,this.removeLinkDecorations();return}if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===t.startColumn&&this.currentWordAtPosition.endColumn===t.endColumn&&this.currentWordAtPosition.word===t.word)return;this.currentWordAtPosition=t;const i=new o.EditorState(this.editor,15);this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=a.createCancelablePromise(r=>this.findDefinition(e,r));let n;try{n=await this.previousPromise}catch(r){a.onUnexpectedError(r);return}if(!n||!n.length||!i.validate(this.editor)){this.removeLinkDecorations();return}const s=n[0].originSelectionRange?a.Range.lift(n[0].originSelectionRange):new a.Range(e.lineNumber,t.startColumn,e.lineNumber,t.endColumn);if(n.length>1){let r=s;for(const{originSelectionRange:l}of n)l&&(r=a.Range.plusRange(r,l));this.addDecoration(r,new o.MarkdownString().appendText(a.localize(1120,"Click to show {0} definitions.",n.length)))}else{const r=n[0];return r.uri?this.textModelResolverService.createModelReference(r.uri).then(l=>{if(!l.object||!l.object.textEditorModel){l.dispose();return}const{object:{textEditorModel:d}}=l,{startLineNumber:h}=r.range;if(h<1||h>d.getLineCount()){l.dispose();return}const u=this.getPreviewValue(d,h,r),g=this.languageService.guessLanguageIdByFilepathOrFirstLine(d.uri);this.addDecoration(s,u?new o.MarkdownString().appendCodeblock(g||"",u):void 0),l.dispose()}):void 0}}getPreviewValue(e,t,i){let n=i.range;return n.endLineNumber-n.startLineNumber>=Ir.MAX_SOURCE_PREVIEW_LINES&&(n=this.getPreviewRangeBasedOnIndentation(e,t)),n=e.validateRange(n),this.stripIndentationFromPreviewRange(e,t,n)}stripIndentationFromPreviewRange(e,t,i){let s=e.getLineFirstNonWhitespaceColumn(t);for(let l=t+1;l{const n=!t&&this.editor.getOption(101)&&!this.isInPeekEditor(i);return new Mo({openToSide:t,openInPeek:n,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(i)})}isInPeekEditor(e){const t=e.get(o.IContextKeyService);return ue.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}},Ir=Ri,Ri.ID="editor.contrib.gotodefinitionatposition",Ri.MAX_SOURCE_PREVIEW_LINES=8,Ri);xr=Ir=$R([ep(1,o.ITextModelService),ep(2,o.ILanguageService),ep(3,o.ILanguageFeaturesService)],xr),o.registerEditorContribution(xr.ID,xr,2);var qR=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ub=function(c,e){return function(t,i){e(t,i,c)}};let Ul=(io=class extends a.Disposable{constructor(e,t,i){super(),this._editor=e,this._markerService=i,this._ctxHasDiagnostics=o.EditorContextKeys.selectionHasDiagnostics.bindTo(t),this._store.add(this._editor.onDidChangeCursorSelection(()=>this._update())),this._store.add(this._editor.onDidChangeModel(()=>this._update())),this._store.add(this._markerService.onMarkerChanged(n=>{const s=this._editor.getModel();s&&n.some(r=>o.isEqual(r,s.uri))&&this._update()})),this._update()}dispose(){this._ctxHasDiagnostics.reset(),super.dispose()}_update(){const e=this._editor.getModel(),t=this._editor.getSelection();if(!e||!t){this._ctxHasDiagnostics.reset();return}const n=this._markerService.read({resource:e.uri,severities:o.MarkerSeverity$1.Error|o.MarkerSeverity$1.Warning|o.MarkerSeverity$1.Info}).some(s=>a.Range.areIntersecting({startLineNumber:s.startLineNumber,startColumn:s.startColumn,endLineNumber:s.endLineNumber,endColumn:s.endColumn},t));this._ctxHasDiagnostics.set(n)}},io.ID="editor.contrib.markerSelectionStatus",io);Ul=qR([ub(1,o.IContextKeyService),ub(2,o.IMarkerService)],Ul),o.registerEditorContribution(Ul.ID,Ul,1);class GR extends o.EditorAction{constructor(){super({id:"editor.action.debugEditorGpuRenderer",label:a.localize2(1144,"Developer: Debug Editor GPU Renderer"),precondition:o.ContextKeyExpr.true()})}async run(e,t){const i=e.get(o.IInstantiationService),s=await e.get(o.IQuickInputService).pick([{label:a.localize(1141,"Log Texture Atlas Stats"),id:"logTextureAtlasStats"},{label:a.localize(1142,"Save Texture Atlas"),id:"saveTextureAtlas"},{label:a.localize(1143,"Draw Glyph"),id:"drawGlyph"}],{canPickMany:!1});if(s)switch(s.id){case"logTextureAtlasStats":i.invokeFunction(r=>{const l=r.get(o.ILogService),d=o.ViewGpuContext.atlas;if(!o.ViewGpuContext.atlas){l.error("No texture atlas found");return}const h=d.getStats();l.info(["Texture atlas stats",...h].join(` + +`))});break;case"saveTextureAtlas":i.invokeFunction(async r=>{const l=r.get(o.IWorkspaceContextService),d=r.get(Nv),h=l.getWorkspace().folders;if(h.length>0){const u=o.ViewGpuContext.atlas,g=[];for(const[p,f]of u.pages.entries())g.push(d.writeFile(a.URI.joinPath(h[0].uri,`textureAtlasPage${p}_actual.png`),a.VSBuffer.wrap(new Uint8Array(await(await f.source.convertToBlob()).arrayBuffer()))),d.writeFile(a.URI.joinPath(h[0].uri,`textureAtlasPage${p}_usage.png`),a.VSBuffer.wrap(new Uint8Array(await(await f.getUsagePreview()).arrayBuffer()))));await Promise.all(g)}});break;case"drawGlyph":i.invokeFunction(async r=>{const l=r.get(o.IConfigurationService),d=r.get(Nv),h=r.get(o.IQuickInputService),g=r.get(o.IWorkspaceContextService).getWorkspace().folders;if(g.length===0)return;const p=o.ViewGpuContext.atlas,f=l.getValue("editor.fontFamily"),m=l.getValue("editor.fontSize"),_=new o.GlyphRasterizer(m,f,o.getActiveWindow().devicePixelRatio,o.ViewGpuContext.decorationStyleCache);let v=await h.input({prompt:"Enter a character to draw (prefix with 0x for code point))"});if(!v)return;const b=v.match(/0x(?[0-9a-f]+)/i)?.groups?.codePoint;b!==void 0&&(v=String.fromCodePoint(parseInt(b,16)));const S=0,I=p.getGlyph(_,v,S,0,0);if(!I)return;const C=p.pages[I.pageIndex].source.getContext("2d")?.getImageData(I.x,I.y,I.w,I.h);if(!C)return;const y=new OffscreenCanvas(C.width,C.height);o.ensureNonNullable(y.getContext("2d")).putImageData(C,0,0);const L=await y.convertToBlob({type:"image/png"}),E=a.URI.joinPath(g[0].uri,`glyph_${v}_${S}_${m}px_${f.replaceAll(/[,\\\/\.'\s]/g,"_")}.png`);await d.writeFile(E,a.VSBuffer.wrap(new Uint8Array(await L.arrayBuffer())))});break}}}o.registerEditorAction(GR);var He;(function(c){c.NoAutoFocus="noAutoFocus",c.FocusIfVisible="focusIfVisible",c.AutoFocusImmediately="autoFocusImmediately"})(He||(He={}));class ZR extends o.EditorAction{constructor(){super({id:cm,label:a.localize2(1150,"Show or Focus Hover"),metadata:{description:a.localize2(1151,"Show or focus the editor hover which shows documentation, references, and other content for a symbol at the current cursor position."),args:[{name:"args",schema:{type:"object",properties:{focus:{description:"Controls if and when the hover should take focus upon being triggered by this action.",enum:[He.NoAutoFocus,He.FocusIfVisible,He.AutoFocusImmediately],enumDescriptions:[a.localize(1147,"The hover will not automatically take focus."),a.localize(1148,"The hover will take focus only if it is already visible."),a.localize(1149,"The hover will automatically take focus when it appears.")],default:He.FocusIfVisible}}}}]},precondition:void 0,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:a.KeyChord(2089,2087),weight:100}})}run(e,t,i){if(!t.hasModel())return;const n=ne.get(t);if(!n)return;const s=i?.focus;let r=He.FocusIfVisible;Object.values(He).includes(s)?r=s:typeof s=="boolean"&&s&&(r=He.AutoFocusImmediately);const l=h=>{const u=t.getPosition(),g=new a.Range(u.lineNumber,u.column,u.lineNumber,u.column);n.showContentHover(g,1,2,h)},d=t.getOption(2)===2;n.isHoverVisible?r!==He.NoAutoFocus?n.focus():l(d):l(d||r===He.AutoFocusImmediately)}}class XR extends o.EditorAction{constructor(){super({id:MS,label:a.localize2(1152,"Show Definition Preview Hover"),precondition:void 0,metadata:{description:a.localize2(1153,"Show the definition preview hover in the editor.")}})}run(e,t){const i=ne.get(t);if(!i)return;const n=t.getPosition();if(!n)return;const s=new a.Range(n.lineNumber,n.column,n.lineNumber,n.column),r=xr.get(t);if(!r)return;r.startFindDefinitionFromCursor(n).then(()=>{i.showContentHover(s,1,2,!0)})}}class YR extends o.EditorAction{constructor(){super({id:PS,label:a.localize2(1154,"Hide Hover"),alias:"Hide Content Hover",precondition:void 0})}run(e,t){ne.get(t)?.hideContentHover()}}class QR extends o.EditorAction{constructor(){super({id:OS,label:a.localize2(1155,"Scroll Up Hover"),precondition:o.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:o.EditorContextKeys.hoverFocused,primary:16,weight:100},metadata:{description:a.localize2(1156,"Scroll up the editor hover.")}})}run(e,t){const i=ne.get(t);i&&i.scrollUp()}}class JR extends o.EditorAction{constructor(){super({id:AS,label:a.localize2(1157,"Scroll Down Hover"),precondition:o.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:o.EditorContextKeys.hoverFocused,primary:18,weight:100},metadata:{description:a.localize2(1158,"Scroll down the editor hover.")}})}run(e,t){const i=ne.get(t);i&&i.scrollDown()}}class WR extends o.EditorAction{constructor(){super({id:FS,label:a.localize2(1159,"Scroll Left Hover"),precondition:o.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:o.EditorContextKeys.hoverFocused,primary:15,weight:100},metadata:{description:a.localize2(1160,"Scroll left the editor hover.")}})}run(e,t){const i=ne.get(t);i&&i.scrollLeft()}}class HR extends o.EditorAction{constructor(){super({id:zS,label:a.localize2(1161,"Scroll Right Hover"),precondition:o.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:o.EditorContextKeys.hoverFocused,primary:17,weight:100},metadata:{description:a.localize2(1162,"Scroll right the editor hover.")}})}run(e,t){const i=ne.get(t);i&&i.scrollRight()}}class eT extends o.EditorAction{constructor(){super({id:VS,label:a.localize2(1163,"Page Up Hover"),precondition:o.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:o.EditorContextKeys.hoverFocused,primary:11,secondary:[528],weight:100},metadata:{description:a.localize2(1164,"Page up the editor hover.")}})}run(e,t){const i=ne.get(t);i&&i.pageUp()}}class tT extends o.EditorAction{constructor(){super({id:BS,label:a.localize2(1165,"Page Down Hover"),precondition:o.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:o.EditorContextKeys.hoverFocused,primary:12,secondary:[530],weight:100},metadata:{description:a.localize2(1166,"Page down the editor hover.")}})}run(e,t){const i=ne.get(t);i&&i.pageDown()}}class iT extends o.EditorAction{constructor(){super({id:KS,label:a.localize2(1167,"Go To Top Hover"),precondition:o.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:o.EditorContextKeys.hoverFocused,primary:14,secondary:[2064],weight:100},metadata:{description:a.localize2(1168,"Go to the top of the editor hover.")}})}run(e,t){const i=ne.get(t);i&&i.goToTop()}}class nT extends o.EditorAction{constructor(){super({id:US,label:a.localize2(1169,"Go To Bottom Hover"),precondition:o.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:o.EditorContextKeys.hoverFocused,primary:13,secondary:[2066],weight:100},metadata:{description:a.localize2(1170,"Go to the bottom of the editor hover.")}})}run(e,t){const i=ne.get(t);i&&i.goToBottom()}}class sT extends o.EditorAction{constructor(){super({id:Hr,label:kS,alias:"Increase Hover Verbosity Level",precondition:o.EditorContextKeys.hoverVisible})}run(e,t,i){const n=ne.get(t);if(!n)return;const s=i?.index!==void 0?i.index:n.focusedHoverPartIndex();n.updateHoverVerbosityLevel(a.HoverVerbosityAction.Increase,s,i?.focus)}}class oT extends o.EditorAction{constructor(){super({id:ea,label:jS,alias:"Decrease Hover Verbosity Level",precondition:o.EditorContextKeys.hoverVisible})}run(e,t,i){const n=ne.get(t);if(!n)return;const s=i?.index!==void 0?i.index:n.focusedHoverPartIndex();ne.get(t)?.updateHoverVerbosityLevel(a.HoverVerbosityAction.Decrease,s,i?.focus)}}var rT=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Er=function(c,e){return function(t,i){e(t,i,c)}};const Ve=o.$;class aT{constructor(e,t,i){this.owner=e,this.range=t,this.marker=i}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}const gb={type:1,filter:{include:$.QuickFix},triggerAction:_e.QuickFixHover};let tp=class{constructor(e,t,i,n,s,r){this._editor=e,this._markerDecorationsService=t,this._openerService=i,this._languageFeaturesService=n,this._menuService=s,this._contextKeyService=r,this.hoverOrdinal=1,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1&&!e.supportsMarkerHover)return[];const i=this._editor.getModel(),n=e.range;if(!i.isValidRange(e.range))return[];const s=n.startLineNumber,r=i.getLineMaxColumn(s),l=[];for(const d of t){const h=d.range.startLineNumber===s?d.range.startColumn:1,u=d.range.endLineNumber===s?d.range.endColumn:r,g=this._markerDecorationsService.getMarker(i.uri,d);if(!g)continue;const p=new a.Range(e.range.startLineNumber,h,e.range.startLineNumber,u);l.push(new aT(this,p,g))}return l}renderHoverParts(e,t){if(!t.length)return new qi([]);const i=[];t.forEach(r=>{const l=this._renderMarkerHover(r);e.fragment.appendChild(l.hoverElement),i.push(l)});const n=t.length===1?t[0]:t.sort((r,l)=>o.MarkerSeverity$1.compare(r.marker.severity,l.marker.severity))[0],s=this._renderMarkerStatusbar(e,n);return new qi(i,s)}getAccessibleContent(e){return e.marker.message}_renderMarkerHover(e){const t=new a.DisposableStore,i=Ve("div.hover-row"),n=o.append(i,Ve("div.marker.hover-contents")),{source:s,message:r,code:l,relatedInformation:d}=e.marker;this._editor.applyFontInfo(n);const h=o.append(n,Ve("span"));if(h.style.whiteSpace="pre-wrap",h.innerText=r,s||l)if(l&&typeof l!="string"){const g=Ve("span");if(s){const _=o.append(g,Ve("span"));_.innerText=s}const p=o.append(g,Ve("a.code-link"));p.setAttribute("href",l.target.toString(!0)),t.add(o.addDisposableListener(p,"click",_=>{this._openerService.open(l.target,{allowCommands:!0}),_.preventDefault(),_.stopPropagation()}));const f=o.append(p,Ve("span"));f.innerText=l.value;const m=o.append(n,g);m.style.opacity="0.6",m.style.paddingLeft="6px"}else{const g=o.append(n,Ve("span"));g.style.opacity="0.6",g.style.paddingLeft="6px",g.innerText=s&&l?`${s}(${l})`:s||`(${l})`}if(a.isNonEmptyArray(d))for(const{message:g,resource:p,startLineNumber:f,startColumn:m}of d){const _=o.append(n,Ve("div"));_.style.marginTop="8px";const v=o.append(_,Ve("a"));v.innerText=`${o.basename(p)}(${f}, ${m}): `,v.style.cursor="pointer",t.add(o.addDisposableListener(v,"click",S=>{if(S.stopPropagation(),S.preventDefault(),this._openerService){const w={selection:{startLineNumber:f,startColumn:m}};this._openerService.open(p,{fromUserGesture:!0,editorOptions:w}).catch(a.onUnexpectedError)}}));const b=o.append(_,Ve("span"));b.innerText=g,this._editor.applyFontInfo(b)}return{hoverPart:e,hoverElement:i,dispose:()=>t.dispose()}}_renderMarkerStatusbar(e,t){const i=new a.DisposableStore;if(t.marker.severity===o.MarkerSeverity$1.Error||t.marker.severity===o.MarkerSeverity$1.Warning||t.marker.severity===o.MarkerSeverity$1.Info){const r=sn.get(this._editor);r&&e.statusBar.addAction({label:a.localize(1180,"View Problem"),commandId:jo.ID,run:()=>{e.hide(),r.showAtMarker(t.marker),this._editor.focus()}})}const n=[];for(const[,r]of this._menuService.getMenuActions(o.MenuId.MarkerHoverStatusBar,this._contextKeyService))for(const l of r)l instanceof o.MenuItemAction&&l.enabled&&n.push(l);const s=()=>{for(const r of n)e.statusBar.addAction({label:r.label,commandId:r.id,iconClass:r.class,run:()=>{e.hide(),this._editor.setSelection(a.Range.lift(t.range)),r.run()}})};if(this._editor.getOption(104))s();else{const r=e.statusBar.append(Ve("div"));this.recentMarkerCodeActionsInfo&&(o.IMarkerData.makeKey(this.recentMarkerCodeActionsInfo.marker)===o.IMarkerData.makeKey(t.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||n.length===0&&(r.textContent=a.localize(1181,"No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);const l=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?a.Disposable.None:a.disposableTimeout(()=>r.textContent=a.localize(1182,"Checking for quick fixes..."),200,i);r.textContent||(r.textContent=" ");const d=this.getCodeActions(t.marker);i.add(a.toDisposable(()=>d.cancel())),d.then(h=>{if(l.dispose(),this.recentMarkerCodeActionsInfo={marker:t.marker,hasCodeActions:h.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){h.dispose(),n.length===0?r.textContent=a.localize(1183,"No quick fixes available"):r.style.display="none",s();return}r.style.display="none";let u=!1;i.add(a.toDisposable(()=>{u||h.dispose()})),e.statusBar.addAction({label:a.localize(1184,"Quick Fix..."),commandId:Wr,run:p=>{u=!0;const f=ji.get(this._editor),m=o.getDomNodePagePosition(p);e.hide(),f?.showCodeActions(gb,h,{x:m.left,y:m.top,width:m.width,height:m.height})}});const g=h.validActions.find(p=>p.action.isAI);g?e.statusBar.addAction({label:g.action.title,commandId:g.action.command?.id??"",iconClass:o.ThemeIcon.asClassName(a.Codicon.sparkle),run:()=>{ji.get(this._editor)?.applyCodeAction(g,!1,!1,Ut.FromProblemsHover)}}):s(),e.onContentsChanged()},a.onUnexpectedError)}return i}getCodeActions(e){return a.createCancelablePromise(t=>os(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new a.Range(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),gb,o.Progress.None,t))}};tp=rT([Er(1,o.IMarkerDecorationsService),Er(2,o.IOpenerService),Er(3,o.ILanguageFeaturesService),Er(4,o.IMenuService),Er(5,o.IContextKeyService)],tp);class lT{constructor(e){this._editor=e}computeSync(e){const t=r=>({value:r}),i=this._editor.getLineDecorations(e.lineNumber),n=[],s=e.laneOrLine==="lineNo";if(!i)return n;for(const r of i){const l=r.options.glyphMargin?.position??a.GlyphMarginLane.Center;if(!s&&l!==e.laneOrLine)continue;const d=s?r.options.lineNumberHoverMessage:r.options.glyphMarginHoverMessage;!d||o.isEmptyMarkdownString(d)||n.push(...a.asArray(d).map(t))}return n}}var cT=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},dT=function(c,e){return function(t,i){e(t,i,c)}},ip;const pb=o.$;let np=(qn=class extends a.Disposable{constructor(e,t){super(),this._markdownRendererService=t,this.allowEditorOverflow=!0,this._renderDisposeables=this._register(new a.DisposableStore),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new o.HoverWidget(!0)),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._hoverOperation=this._register(new mm(this._editor,new lT(this._editor))),this._register(this._hoverOperation.onResult(i=>this._withResult(i))),this._register(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(this._editor.onDidChangeConfiguration(i=>{i.hasChanged(59)&&this._updateFont()})),this._register(o.addStandardDisposableListener(this._hover.containerDomNode,"mouseleave",i=>{this._onMouseLeave(i)})),this._editor.addOverlayWidget(this)}dispose(){this._hoverComputerOptions=void 0,this._editor.removeOverlayWidget(this),super.dispose()}getId(){return ip.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(t=>this._editor.applyFontInfo(t))}_onModelDecorationsChanged(){this._isVisible&&this._hoverComputerOptions&&(this._hoverOperation.cancel(),this._hoverOperation.start(0,this._hoverComputerOptions))}showsOrWillShow(e){const t=e.target;return t.type===2&&t.detail.glyphMarginLane?(this._startShowingAt(t.position.lineNumber,t.detail.glyphMarginLane),!0):t.type===3?(this._startShowingAt(t.position.lineNumber,"lineNo"),!0):!1}_startShowingAt(e,t){this._hoverComputerOptions&&this._hoverComputerOptions.lineNumber===e&&this._hoverComputerOptions.laneOrLine===t||(this._hoverOperation.cancel(),this.hide(),this._hoverComputerOptions={lineNumber:e,laneOrLine:t},this._hoverOperation.start(0,this._hoverComputerOptions))}hide(){this._hoverComputerOptions=void 0,this._hoverOperation.cancel(),this._isVisible&&(this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible))}_withResult(e){this._messages=e.value,this._messages.length>0?this._renderMessages(e.options.lineNumber,e.options.laneOrLine,this._messages):this.hide()}_renderMessages(e,t,i){this._renderDisposeables.clear();const n=document.createDocumentFragment();for(const s of i){const r=pb("div.hover-row.markdown-hover"),l=o.append(r,pb("div.hover-contents")),d=this._renderDisposeables.add(this._markdownRendererService.render(s.value,{context:this._editor}));l.appendChild(d.element),n.appendChild(r)}this._updateContents(n),this._showAt(e,t)}_updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._updateFont()}_showAt(e,t){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));const i=this._editor.getLayoutInfo(),n=this._editor.getTopForLineNumber(e),s=this._editor.getScrollTop(),r=this._editor.getOption(75),l=this._hover.containerDomNode.clientHeight,d=n-s-(l-r)/2,h=i.glyphMarginLeft+i.glyphMarginWidth+(t==="lineNo"?i.lineNumbersWidth:0),g=i.height-l,p=Math.max(0,Math.min(Math.round(d),g));if(this._editor.getOption(51)){const m=this._editor.getDomNode();if(m){const _=o.getDomNodePagePosition(m);this._hover.containerDomNode.style.position="fixed",this._hover.containerDomNode.style.left=`${_.left+h}px`,this._hover.containerDomNode.style.top=`${_.top+p}px`}}else this._hover.containerDomNode.style.position="absolute",this._hover.containerDomNode.style.left=`${h}px`,this._hover.containerDomNode.style.top=`${p}px`;this._hover.containerDomNode.style.zIndex="11"}_onMouseLeave(e){const t=this._editor.getDomNode();(!t||!na(t,e.x,e.y))&&this.hide()}},ip=qn,qn.ID="editor.contrib.modesGlyphHoverWidget",qn);np=ip=cT([dT(1,o.IMarkdownRendererService)],np);var hT=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},uT=function(c,e){return function(t,i){e(t,i,c)}};let kl=(no=class extends a.Disposable{constructor(e,t){super(),this._editor=e,this._instantiationService=t,this.shouldKeepOpenOnEditorMouseMoveOrLeave=!1,this._listenersStore=new a.DisposableStore,this._hoverState={mouseDown:!1},this._reactToEditorMouseMoveRunner=this._register(new a.RunOnceScheduler(()=>this._reactToEditorMouseMove(this._mouseMoveEvent),0)),this._hookListeners(),this._register(this._editor.onDidChangeConfiguration(i=>{i.hasChanged(69)&&(this._unhookListeners(),this._hookListeners())}))}_hookListeners(){const e=this._editor.getOption(69);this._hoverSettings={enabled:e.enabled,sticky:e.sticky,hidingDelay:e.hidingDelay},e.enabled!=="off"?(this._listenersStore.add(this._editor.onMouseDown(t=>this._onEditorMouseDown(t))),this._listenersStore.add(this._editor.onMouseUp(()=>this._onEditorMouseUp())),this._listenersStore.add(this._editor.onMouseMove(t=>this._onEditorMouseMove(t))),this._listenersStore.add(this._editor.onKeyDown(t=>this._onKeyDown(t)))):(this._listenersStore.add(this._editor.onMouseMove(t=>this._onEditorMouseMove(t))),this._listenersStore.add(this._editor.onKeyDown(t=>this._onKeyDown(t)))),this._listenersStore.add(this._editor.onMouseLeave(t=>this._onEditorMouseLeave(t))),this._listenersStore.add(this._editor.onDidChangeModel(()=>{this._cancelScheduler(),this.hideGlyphHover()})),this._listenersStore.add(this._editor.onDidChangeModelContent(()=>this._cancelScheduler())),this._listenersStore.add(this._editor.onDidScrollChange(t=>this._onEditorScrollChanged(t)))}_unhookListeners(){this._listenersStore.clear()}_cancelScheduler(){this._mouseMoveEvent=void 0,this._reactToEditorMouseMoveRunner.cancel()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this.hideGlyphHover()}_onEditorMouseDown(e){this._hoverState.mouseDown=!0,!this._isMouseOnGlyphHoverWidget(e)&&this.hideGlyphHover()}_isMouseOnGlyphHoverWidget(e){const t=this._glyphWidget?.getDomNode();return t?na(t,e.event.posx,e.event.posy):!1}_onEditorMouseUp(){this._hoverState.mouseDown=!1}_onEditorMouseLeave(e){this.shouldKeepOpenOnEditorMouseMoveOrLeave||(this._cancelScheduler(),this._isMouseOnGlyphHoverWidget(e))||this.hideGlyphHover()}_shouldNotRecomputeCurrentHoverWidget(e){const t=this._hoverSettings.sticky,i=this._isMouseOnGlyphHoverWidget(e);return t&&i}_onEditorMouseMove(e){if(this.shouldKeepOpenOnEditorMouseMoveOrLeave)return;if(this._mouseMoveEvent=e,this._shouldNotRecomputeCurrentHoverWidget(e)){this._reactToEditorMouseMoveRunner.cancel();return}this._reactToEditorMouseMove(e)}_reactToEditorMouseMove(e){if(!e)return;if(!fm(this._hoverSettings.enabled,this._editor.getOption(86),e)){this.hideGlyphHover();return}this._tryShowHoverWidget(e)||this.hideGlyphHover()}_tryShowHoverWidget(e){return this._getOrCreateGlyphWidget().showsOrWillShow(e)}_onKeyDown(e){if(this._editor.hasModel()){if(this._hoverSettings.enabled==="onKeyboardModifier"&&ih(this._editor.getOption(86),e)&&this._mouseMoveEvent){this._tryShowHoverWidget(this._mouseMoveEvent);return}a.isModifierKey(e.keyCode)||this.hideGlyphHover()}}hideGlyphHover(){this._glyphWidget?.hide()}_getOrCreateGlyphWidget(){return this._glyphWidget||(this._glyphWidget=this._instantiationService.createInstance(np,this._editor)),this._glyphWidget}dispose(){super.dispose(),this._unhookListeners(),this._listenersStore.dispose(),this._glyphWidget?.dispose()}},no.ID="editor.contrib.marginHover",no);kl=hT([uT(1,o.IInstantiationService)],kl);class gT{}class pT{}class fT{}o.registerEditorContribution(ne.ID,ne,2),o.registerEditorContribution(kl.ID,kl,2),o.registerEditorAction(ZR),o.registerEditorAction(XR),o.registerEditorAction(YR),o.registerEditorAction(QR),o.registerEditorAction(JR),o.registerEditorAction(WR),o.registerEditorAction(HR),o.registerEditorAction(eT),o.registerEditorAction(tT),o.registerEditorAction(iT),o.registerEditorAction(nT),o.registerEditorAction(sT),o.registerEditorAction(oT),Gi.register(xo),Gi.register(tp),o.CommandsRegistry.registerCommand(Jd,c=>{c.get(o.IConfigurationService).updateValue("editor.hover.showLongLineWarning",!1)}),o.registerThemingParticipant((c,e)=>{const t=c.getColor(o.editorHoverBorder);t&&(e.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${t.transparent(.5)}; }`))}),ja.register(new gT),ja.register(new pT),ja.register(new fT);function fb(c,e,t,i){if(c.getLineCount()===1&&c.getLineMaxColumn(1)===1)return[];const n=e.getLanguageConfiguration(c.getLanguageId()).indentRulesSupport;if(!n)return[];const s=new o.ProcessedIndentRulesSupport(c,n,e);for(i=Math.min(i,c.getLineCount());t<=i&&s.shouldIgnore(t);)t++;if(t>i-1)return[];const{tabSize:r,indentSize:l,insertSpaces:d}=c.getOptions(),h=(_,v)=>(v=v||1,o.ShiftCommand.shiftIndent(_,_.length+v,r,l,d)),u=(_,v)=>(v=v||1,o.ShiftCommand.unshiftIndent(_,_.length+v,r,l,d)),g=[],p=c.getLineContent(t);let f=a.getLeadingWhitespace(p),m=f;s.shouldIncrease(t)?(m=h(m),f=h(f)):s.shouldIndentNextLine(t)&&(m=h(m)),t++;for(let _=t;_<=i;_++){if(mT(c,_))continue;const v=c.getLineContent(_),b=a.getLeadingWhitespace(v),S=m;s.shouldDecrease(_,S)&&(m=u(m),f=u(f)),b!==m&&g.push(o.EditOperation.replaceMove(new a.Selection(_,1,_,b.length+1),o.normalizeIndentation(m,l,d))),!s.shouldIgnore(_)&&(s.shouldIncrease(_,S)?(f=h(f),m=f):s.shouldIndentNextLine(_,S)?m=h(m):m=f)}return g}function mT(c,e){return c.tokenization.isCheapToTokenize(e)?c.tokenization.getLineTokens(e).getStandardTokenType(0)===2:!1}var _T=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},vT=function(c,e){return function(t,i){e(t,i,c)}};const qc=class qc extends o.EditorAction{constructor(){super({id:qc.ID,label:a.localize2(1189,"Convert Indentation to Spaces"),precondition:o.EditorContextKeys.writable,metadata:{description:a.localize2(1190,"Convert the tab indentation to spaces.")}})}run(e,t){const i=t.getModel();if(!i)return;const n=i.getOptions(),s=t.getSelection();if(!s)return;const r=new wT(s,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[r]),t.pushUndoStop(),i.updateOptions({insertSpaces:!0})}};qc.ID="editor.action.indentationToSpaces";let sp=qc;const Gc=class Gc extends o.EditorAction{constructor(){super({id:Gc.ID,label:a.localize2(1191,"Convert Indentation to Tabs"),precondition:o.EditorContextKeys.writable,metadata:{description:a.localize2(1192,"Convert the spaces indentation to tabs.")}})}run(e,t){const i=t.getModel();if(!i)return;const n=i.getOptions(),s=t.getSelection();if(!s)return;const r=new IT(s,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[r]),t.pushUndoStop(),i.updateOptions({insertSpaces:!1})}};Gc.ID="editor.action.indentationToTabs";let op=Gc;class rp extends o.EditorAction{constructor(e,t,i){super(i),this.insertSpaces=e,this.displaySizeOnly=t}run(e,t){const i=e.get(o.IQuickInputService),n=e.get(o.IModelService),s=t.getModel();if(!s)return;const r=n.getCreationOptions(s.getLanguageId(),s.uri,s.isForSimpleWidget),l=s.getOptions(),d=[1,2,3,4,5,6,7,8].map(u=>({id:u.toString(),label:u.toString(),description:u===r.tabSize&&u===l.tabSize?a.localize(1185,"Configured Tab Size"):u===r.tabSize?a.localize(1186,"Default Tab Size"):u===l.tabSize?a.localize(1187,"Current Tab Size"):void 0})),h=Math.min(s.getOptions().tabSize-1,7);setTimeout(()=>{i.pick(d,{placeHolder:a.localize(1188,"Select Tab Size for Current File"),activeItem:d[h]}).then(u=>{if(u&&s&&!s.isDisposed()){const g=parseInt(u.label,10);this.displaySizeOnly?s.updateOptions({tabSize:g}):s.updateOptions({tabSize:g,indentSize:g,insertSpaces:this.insertSpaces})}})},50)}}const Zc=class Zc extends rp{constructor(){super(!1,!1,{id:Zc.ID,label:a.localize2(1193,"Indent Using Tabs"),precondition:void 0,metadata:{description:a.localize2(1194,"Use indentation with tabs.")}})}};Zc.ID="editor.action.indentUsingTabs";let ap=Zc;const Xc=class Xc extends rp{constructor(){super(!0,!1,{id:Xc.ID,label:a.localize2(1195,"Indent Using Spaces"),precondition:void 0,metadata:{description:a.localize2(1196,"Use indentation with spaces.")}})}};Xc.ID="editor.action.indentUsingSpaces";let lp=Xc;const Yc=class Yc extends rp{constructor(){super(!0,!0,{id:Yc.ID,label:a.localize2(1197,"Change Tab Display Size"),precondition:void 0,metadata:{description:a.localize2(1198,"Change the space size equivalent of the tab.")}})}};Yc.ID="editor.action.changeTabDisplaySize";let cp=Yc;const Qc=class Qc extends o.EditorAction{constructor(){super({id:Qc.ID,label:a.localize2(1199,"Detect Indentation from Content"),precondition:void 0,metadata:{description:a.localize2(1200,"Detect the indentation from content.")}})}run(e,t){const i=e.get(o.IModelService),n=t.getModel();if(!n)return;const s=i.getCreationOptions(n.getLanguageId(),n.uri,n.isForSimpleWidget);n.detectIndentation(s.insertSpaces,s.tabSize)}};Qc.ID="editor.action.detectIndentation";let dp=Qc;class bT extends o.EditorAction{constructor(){super({id:"editor.action.reindentlines",label:a.localize2(1201,"Reindent Lines"),precondition:o.EditorContextKeys.writable,metadata:{description:a.localize2(1202,"Reindent the lines of the editor.")},canTriggerInlineEdits:!0})}run(e,t){const i=e.get(o.ILanguageConfigurationService),n=t.getModel();if(!n)return;const s=fb(n,i,1,n.getLineCount());s.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop())}}class CT extends o.EditorAction{constructor(){super({id:"editor.action.reindentselectedlines",label:a.localize2(1203,"Reindent Selected Lines"),precondition:o.EditorContextKeys.writable,metadata:{description:a.localize2(1204,"Reindent the selected lines of the editor.")},canTriggerInlineEdits:!0})}run(e,t){const i=e.get(o.ILanguageConfigurationService),n=t.getModel();if(!n)return;const s=t.getSelections();if(s===null)return;const r=[];for(const l of s){let d=l.startLineNumber,h=l.endLineNumber;if(d!==h&&l.endColumn===1&&h--,d===1){if(d===h)continue}else d--;const u=fb(n,i,d,h);r.push(...u)}r.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,r),t.pushUndoStop())}}class ST{constructor(e,t){this._initialSelection=t,this._edits=[],this._selectionId=null;for(const i of e)i.range&&typeof i.text=="string"&&this._edits.push(i)}getEditOperations(e,t){for(const n of this._edits)t.addEditOperation(a.Range.lift(n.range),n.text);let i=!1;Array.isArray(this._edits)&&this._edits.length===1&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!1))),i||(this._selectionId=t.trackSelection(this._initialSelection))}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}let jl=(so=class{constructor(e,t){this.editor=e,this._languageConfigurationService=t,this.callOnDispose=new a.DisposableStore,this.callOnModel=new a.DisposableStore,this.callOnDispose.add(e.onDidChangeConfiguration(()=>this.update())),this.callOnDispose.add(e.onDidChangeModel(()=>this.update())),this.callOnDispose.add(e.onDidChangeModelLanguage(()=>this.update()))}update(){this.callOnModel.clear(),!(!this.editor.getOption(17)||this.editor.getOption(16)<4)&&this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste(({range:e})=>{this.trigger(e)}))}trigger(e){const t=this.editor.getSelections();if(t===null||t.length>1)return;const i=this.editor.getModel();if(!i||this.rangeContainsOnlyWhitespaceCharacters(i,e)||!this.editor.getOption(18)&&yT(i,e)||!i.tokenization.isCheapToTokenize(e.getStartPosition().lineNumber))return;const s=this.editor.getOption(16),{tabSize:r,indentSize:l,insertSpaces:d}=i.getOptions(),h=[],u={shiftIndent:m=>o.ShiftCommand.shiftIndent(m,m.length+1,r,l,d),unshiftIndent:m=>o.ShiftCommand.unshiftIndent(m,m.length+1,r,l,d)};let g=e.startLineNumber,p=i.getLineContent(g);if(!/\S/.test(p.substring(0,e.startColumn-1))){const m=o.getGoodIndentForLine(s,i,i.getLanguageId(),g,u,this._languageConfigurationService);if(m!==null){const _=a.getLeadingWhitespace(p),v=be(m,r),b=be(_,r);if(v!==b){const S=$o(v,r,d);h.push({range:new a.Range(g,1,g,_.length+1),text:S}),p=S+p.substring(_.length)}else{const S=o.getIndentMetadata(i,g,this._languageConfigurationService);if(S===0||S===8)return}}}const f=g;for(;gi.tokenization.getLineTokens(v),getLanguageId:()=>i.getLanguageId(),getLanguageIdAtPosition:(v,b)=>i.getLanguageIdAtPosition(v,b)},getLineContent:v=>v===f?p:i.getLineContent(v)},_=o.getGoodIndentForLine(s,m,i.getLanguageId(),g+1,u,this._languageConfigurationService);if(_!==null){const v=be(_,r),b=be(a.getLeadingWhitespace(i.getLineContent(g+1)),r);if(v!==b){const S=v-b;for(let w=g+1;w<=e.endLineNumber;w++){const I=i.getLineContent(w),C=a.getLeadingWhitespace(I),x=be(C,r)+S,L=$o(x,r,d);L!==C&&h.push({range:new a.Range(w,1,w,C.length+1),text:L})}}}}if(h.length>0){this.editor.pushUndoStop();const m=new ST(h,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",m),this.editor.pushUndoStop()}}rangeContainsOnlyWhitespaceCharacters(e,t){const i=s=>s.trim().length===0;let n=!0;if(t.startLineNumber===t.endLineNumber){const r=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);n=i(r)}else for(let s=t.startLineNumber;s<=t.endLineNumber;s++){const r=e.getLineContent(s);if(s===t.startLineNumber){const l=r.substring(t.startColumn-1);n=i(l)}else if(s===t.endLineNumber){const l=r.substring(0,t.endColumn-1);n=i(l)}else n=e.getLineFirstNonWhitespaceColumn(s)===0;if(!n)break}return n}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}},so.ID="editor.contrib.autoIndentOnPaste",so);jl=_T([vT(1,o.ILanguageConfigurationService)],jl);function yT(c,e){const t=i=>o.getStandardTokenTypeAtPosition(c,i)===2;return t(e.getStartPosition())||t(e.getEndPosition())}function mb(c,e,t,i){if(c.getLineCount()===1&&c.getLineMaxColumn(1)===1)return;let n="";for(let r=0;r=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},LT=function(c,e){return function(t,i){e(t,i,c)}},$l;let Bs=(Ti=class{static get(e){return e.getContribution($l.ID)}constructor(e,t){this.editor=e,this.editorWorkerService=t,this.decorations=this.editor.createDecorationsCollection()}dispose(){}run(e,t){this.currentRequest?.cancel();const i=this.editor.getSelection(),n=this.editor.getModel();if(!n||!i)return;let s=i;if(s.startLineNumber!==s.endLineNumber)return;const r=new o.EditorState(this.editor,5),l=n.uri;return this.editorWorkerService.canNavigateValueSet(l)?(this.currentRequest=a.createCancelablePromise(d=>this.editorWorkerService.navigateValueSet(l,s,t)),this.currentRequest.then(d=>{if(!d||!d.range||!d.value||!r.validate(this.editor))return;const h=a.Range.lift(d.range);let u=d.range;const g=d.value.length-(s.endColumn-s.startColumn);u={startLineNumber:u.startLineNumber,startColumn:u.startColumn,endLineNumber:u.endLineNumber,endColumn:u.startColumn+d.value.length},g>1&&(s=new a.Selection(s.startLineNumber,s.startColumn,s.endLineNumber,s.endColumn+g-1));const p=new xT(h,s,d.value);this.editor.pushUndoStop(),this.editor.executeCommand(e,p),this.editor.pushUndoStop(),this.decorations.set([{range:u,options:$l.DECORATION}]),this.decorationRemover?.cancel(),this.decorationRemover=a.timeout(350),this.decorationRemover.then(()=>this.decorations.clear()).catch(a.onUnexpectedError)}).catch(a.onUnexpectedError)):Promise.resolve(void 0)}},$l=Ti,Ti.ID="editor.contrib.inPlaceReplaceController",Ti.DECORATION=o.ModelDecorationOptions.register({description:"in-place-replace",className:"valueSetReplacement"}),Ti);Bs=$l=ET([LT(1,o.IEditorWorkerService)],Bs);class DT extends o.EditorAction{constructor(){super({id:"editor.action.inPlaceReplace.up",label:a.localize2(1286,"Replace with Previous Value"),precondition:o.EditorContextKeys.writable,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:3159,weight:100}})}run(e,t){const i=Bs.get(t);return i?i.run(this.id,!1):Promise.resolve(void 0)}}class RT extends o.EditorAction{constructor(){super({id:"editor.action.inPlaceReplace.down",label:a.localize2(1287,"Replace with Next Value"),precondition:o.EditorContextKeys.writable,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:3161,weight:100}})}run(e,t){const i=Bs.get(t);return i?i.run(this.id,!0):Promise.resolve(void 0)}}o.registerEditorContribution(Bs.ID,Bs,4),o.registerEditorAction(DT),o.registerEditorAction(RT);class TT{constructor(e){this._selection=e,this._selectionId=null}getEditOperations(e,t){const i=NT(e);i&&t.addEditOperation(i.range,i.text),this._selectionId=t.trackSelection(this._selection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}function NT(c){const e=c.getLineCount(),t=c.getLineContent(e),i=a.lastNonWhitespaceIndex(t)===-1;if(!(!e||i))return o.EditOperation.insert(new a.Position(e,c.getLineMaxColumn(e)),c.getEOL())}const Jc=class Jc extends o.EditorAction{constructor(){super({id:Jc.ID,label:a.localize2(1288,"Insert Final New Line"),precondition:o.EditorContextKeys.writable})}run(e,t,i){const n=t.getSelection();if(n===null)return;const s=new TT(n);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop()}};Jc.ID="editor.action.insertFinalNewLine";let hp=Jc;o.registerEditorAction(hp);class MT extends o.EditorAction{constructor(){super({id:"expandLineSelection",label:a.localize2(1289,"Expand Line Selection"),precondition:void 0,kbOpts:{weight:0,kbExpr:o.EditorContextKeys.textInputFocus,primary:2090}})}run(e,t,i){if(i=i||{},!t.hasModel())return;const n=t._getViewModel();n.model.pushStackElement(),n.setCursorStates(i.source,3,o.CursorMoveCommands.expandLineSelection(n,n.getCursorStates())),n.revealAllCursors(i.source,!0)}}o.registerEditorAction(MT);var PT=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ql=function(c,e){return function(t,i){e(t,i,c)}},Gl;const _b=new o.RawContextKey("LinkedEditingInputVisible",!1),OT="linked-editing-decoration";let Ks=(Ni=class extends a.Disposable{static get(e){return e.getContribution(Gl.ID)}constructor(e,t,i,n,s){super(),this.languageConfigurationService=n,this._syncRangesToken=0,this._localToDispose=this._register(new a.DisposableStore),this._editor=e,this._providers=i.linkedEditingRangeProvider,this._enabled=!1,this._visibleContextKey=_b.bindTo(t),this._debounceInformation=s.for(this._providers,"Linked Editing",{max:200}),this._currentDecorations=this._editor.createDecorationsCollection(),this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new a.DisposableStore),this._rangeUpdateTriggerPromise=null,this._rangeSyncTriggerPromise=null,this._currentRequestCts=null,this._currentRequestPosition=null,this._currentRequestModelVersion=null,this._register(this._editor.onDidChangeModel(()=>this.reinitialize(!0))),this._register(this._editor.onDidChangeConfiguration(r=>{(r.hasChanged(78)||r.hasChanged(106))&&this.reinitialize(!1)})),this._register(this._providers.onDidChange(()=>this.reinitialize(!1))),this._register(this._editor.onDidChangeModelLanguage(()=>this.reinitialize(!0))),this.reinitialize(!0)}reinitialize(e){const t=this._editor.getModel(),i=t!==null&&(this._editor.getOption(78)||this._editor.getOption(106))&&this._providers.has(t);if(i===this._enabled&&!e||(this._enabled=i,this.clearRanges(),this._localToDispose.clear(),!i||t===null))return;this._localToDispose.add(a.Event.runAndSubscribe(t.onDidChangeLanguageConfiguration,()=>{this._languageWordPattern=this.languageConfigurationService.getLanguageConfiguration(t.getLanguageId()).getWordDefinition()}));const n=new a.Delayer(this._debounceInformation.get(t)),s=()=>{this._rangeUpdateTriggerPromise=n.trigger(()=>this.updateRanges(),this._debounceDuration??this._debounceInformation.get(t))},r=new a.Delayer(0),l=d=>{this._rangeSyncTriggerPromise=r.trigger(()=>this._syncRanges(d))};this._localToDispose.add(this._editor.onDidChangeCursorPosition(()=>{s()})),this._localToDispose.add(this._editor.onDidChangeModelContent(d=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){const h=this._currentDecorations.getRange(0);if(h&&d.changes.every(u=>h.intersectRanges(u.range))){l(this._syncRangesToken);return}}s()})),this._localToDispose.add({dispose:()=>{n.dispose(),r.dispose()}}),this.updateRanges()}_syncRanges(e){if(!this._editor.hasModel()||e!==this._syncRangesToken||this._currentDecorations.length===0)return;const t=this._editor.getModel(),i=this._currentDecorations.getRange(0);if(!i||i.startLineNumber!==i.endLineNumber)return this.clearRanges();const n=t.getValueInRange(i);if(this._currentWordPattern){const r=n.match(this._currentWordPattern);if((r?r[0].length:0)!==n.length)return this.clearRanges()}const s=[];for(let r=1,l=this._currentDecorations.length;r1){this.clearRanges();return}const i=this._editor.getModel(),n=i.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===n){if(t.equals(this._currentRequestPosition))return;if(this._currentDecorations.length>0){const r=this._currentDecorations.getRange(0);if(r&&r.containsPosition(t))return}}this._currentRequestPosition?.equals(t)||this._currentDecorations.getRange(0)?.containsPosition(t)||this.clearRanges(),this._currentRequestPosition=t,this._currentRequestModelVersion=n;const s=this._currentRequestCts=new a.CancellationTokenSource;try{const r=new a.StopWatch(!1),l=await vb(this._providers,i,t,s.token);if(this._debounceInformation.update(i,r.elapsed()),s!==this._currentRequestCts||(this._currentRequestCts=null,n!==i.getVersionId()))return;let d=[];l?.ranges&&(d=l.ranges),this._currentWordPattern=l?.wordPattern||this._languageWordPattern;let h=!1;for(let g=0,p=d.length;g({range:g,options:Gl.DECORATION}));this._visibleContextKey.set(!0),this._currentDecorations.set(u),this._syncRangesToken++}catch(r){a.isCancellationError(r)||a.onUnexpectedError(r),(this._currentRequestCts===s||!this._currentRequestCts)&&this.clearRanges()}}},Gl=Ni,Ni.ID="editor.contrib.linkedEditing",Ni.DECORATION=o.ModelDecorationOptions.register({description:"linked-editing",stickiness:0,className:OT}),Ni);Ks=Gl=PT([ql(1,o.IContextKeyService),ql(2,o.ILanguageFeaturesService),ql(3,o.ILanguageConfigurationService),ql(4,o.ILanguageFeatureDebounceService)],Ks);class AT extends o.EditorAction{constructor(){super({id:"editor.action.linkedEditing",label:a.localize2(1322,"Start Linked Editing"),precondition:o.ContextKeyExpr.and(o.EditorContextKeys.writable,o.EditorContextKeys.hasRenameProvider),kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:3132,weight:100}})}runCommand(e,t){const i=e.get(o.ICodeEditorService),[n,s]=Array.isArray(t)&&t||[void 0,void 0];return a.URI.isUri(n)&&a.Position.isIPosition(s)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then(r=>{r&&(r.setPosition(s),r.invokeWithinContext(l=>(this.reportTelemetry(l,r),this.run(l,r))))},a.onUnexpectedError):super.runCommand(e,t)}run(e,t){const i=Ks.get(t);return i?Promise.resolve(i.updateRanges(!0)):Promise.resolve()}}const FT=o.EditorCommand.bindToContribution(Ks.get);o.registerEditorCommand(new FT({id:"cancelLinkedEditingInput",precondition:_b,handler:c=>c.clearRanges(),kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,weight:199,primary:9,secondary:[1033]}}));function vb(c,e,t,i){const n=c.ordered(e);return a.first(n.map(s=>async()=>{try{return await s.provideLinkedEditingRanges(e,t,i)}catch(r){a.onUnexpectedExternalError(r);return}}),s=>!!s&&a.isNonEmptyArray(s?.ranges))}o.registerColor("editor.linkedEditingBackground",{dark:a.Color.fromHex("#f00").transparent(.3),light:a.Color.fromHex("#f00").transparent(.3),hcDark:a.Color.fromHex("#f00").transparent(.3),hcLight:a.Color.white},a.localize(1321,"Background color when the editor auto renames on type.")),o.registerModelAndPositionCommand("_executeLinkedEditingProvider",(c,e,t)=>{const{linkedEditingRangeProvider:i}=c.get(o.ILanguageFeaturesService);return vb(i,e,t,a.CancellationToken.None)}),o.registerEditorContribution(Ks.ID,Ks,1),o.registerEditorAction(AT);let zT=class{constructor(e,t){this._link=e,this._provider=t}toJSON(){return{range:this.range,url:this.url,tooltip:this.tooltip}}get range(){return this._link.range}get url(){return this._link.url}get tooltip(){return this._link.tooltip}async resolve(e){return this._link.url?this._link.url:typeof this._provider.resolveLink=="function"?Promise.resolve(this._provider.resolveLink(this._link,e)).then(t=>(this._link=t||this._link,this._link.url?this.resolve(e):Promise.reject(new Error("missing")))):Promise.reject(new Error("missing"))}};const kr=class kr{constructor(e){this._disposables=new a.DisposableStore;let t=[];for(const[i,n]of e){const s=i.links.map(r=>new zT(r,n));t=kr._union(t,s),a.isDisposable(i)&&(this._disposables??=new a.DisposableStore,this._disposables.add(i))}this.links=t}dispose(){this._disposables?.dispose(),this.links.length=0}static _union(e,t){const i=[];let n,s,r,l;for(n=0,r=0,s=e.length,l=t.length;n{try{const d=await r.provideLinks(e,t);d&&(i[l]=[d,r])}catch(d){a.onUnexpectedExternalError(d)}});await Promise.all(n);let s=new Zl(a.coalesce(i));return t.isCancellationRequested&&(s.dispose(),s=Zl.Empty),s}o.CommandsRegistry.registerCommand("_executeLinkProvider",async(c,...e)=>{let[t,i]=e;a.assertType(t instanceof a.URI),typeof i!="number"&&(i=0);const{linkProvider:n}=c.get(o.ILanguageFeaturesService),s=c.get(o.IModelService).getModel(t);if(!s)return[];const r=await bb(n,s,a.CancellationToken.None);if(!r)return[];for(let d=0;d=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Xl=function(c,e){return function(t,i){e(t,i,c)}},up;let Lr=(Gn=class extends a.Disposable{static get(e){return e.getContribution(up.ID)}constructor(e,t,i,n,s){super(),this.editor=e,this.openerService=t,this.notificationService=i,this.languageFeaturesService=n,this.providers=this.languageFeaturesService.linkProvider,this.debounceInformation=s.for(this.providers,"Links",{min:1e3,max:4e3}),this.computeLinks=this._register(new a.RunOnceScheduler(()=>this.computeLinksNow(),1e3)),this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null;const r=this._register(new Ca(e));this._register(r.onMouseMoveOrRelevantKeyDown(([l,d])=>{this._onEditorMouseMove(l,d)})),this._register(r.onExecute(l=>{this.onEditorMouseUp(l)})),this._register(r.onCancel(l=>{this.cleanUpActiveLinkDecoration()})),this._register(e.onDidChangeConfiguration(l=>{l.hasChanged(79)&&(this.updateDecorations([]),this.stop(),this.computeLinks.schedule(0))})),this._register(e.onDidChangeModelContent(l=>{this.editor.hasModel()&&this.computeLinks.schedule(this.debounceInformation.get(this.editor.getModel()))})),this._register(e.onDidChangeModel(l=>{this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.computeLinks.schedule(0)})),this._register(e.onDidChangeModelLanguage(l=>{this.stop(),this.computeLinks.schedule(0)})),this._register(this.providers.onDidChange(l=>{this.stop(),this.computeLinks.schedule(0)})),this.computeLinks.schedule(0)}async computeLinksNow(){if(!this.editor.hasModel()||!this.editor.getOption(79))return;const e=this.editor.getModel();if(!e.isTooLargeForSyncing()&&this.providers.has(e)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=a.createCancelablePromise(t=>bb(this.providers,e,t));try{const t=new a.StopWatch(!1);if(this.activeLinksList=await this.computePromise,this.debounceInformation.update(e,t.elapsed()),e.isDisposed())return;this.updateDecorations(this.activeLinksList.links)}catch(t){a.onUnexpectedError(t)}finally{this.computePromise=null}}}updateDecorations(e){const t=this.editor.getOption(86)==="altKey",i=[],n=Object.keys(this.currentOccurrences);for(const r of n){const l=this.currentOccurrences[r];i.push(l.decorationId)}const s=[];if(e)for(const r of e)s.push(Us.decoration(r,t));this.editor.changeDecorations(r=>{const l=r.deltaDecorations(i,s);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let d=0,h=l.length;d{n.activate(s,i),this.activeLinkDecorationId=n.decorationId})}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){const e=this.editor.getOption(86)==="altKey";if(this.activeLinkDecorationId){const t=this.currentOccurrences[this.activeLinkDecorationId];t&&this.editor.changeDecorations(i=>{t.deactivate(i,e)}),this.activeLinkDecorationId=null}}onEditorMouseUp(e){if(!this.isEnabled(e))return;const t=this.getLinkOccurrence(e.target.position);t&&this.openLinkOccurrence(t,e.hasSideBySideModifier,!0)}openLinkOccurrence(e,t,i=!1){if(!this.openerService)return;const{link:n}=e;n.resolve(a.CancellationToken.None).then(s=>{if(typeof s=="string"&&this.editor.hasModel()){const r=this.editor.getModel().uri;if(r.scheme===a.Schemas.file&&s.startsWith(`${a.Schemas.file}:`)){const l=a.URI.parse(s);if(l.scheme===a.Schemas.file){const d=o.originalFSPath(l);let h=null;d.startsWith("/./")||d.startsWith("\\.\\")?h=`.${d.substr(1)}`:(d.startsWith("//./")||d.startsWith("\\\\.\\"))&&(h=`.${d.substr(2)}`),h&&(s=o.joinPath(r,h))}}}return this.openerService.open(s,{openToSide:t,fromUserGesture:i,allowContributedOpeners:!0,allowCommands:!0,fromWorkspace:!0})},s=>{const r=s instanceof Error?s.message:s;r==="invalid"?this.notificationService.warn(a.localize(1323,"Failed to open this link because it is not well-formed: {0}",n.url.toString())):r==="missing"?this.notificationService.warn(a.localize(1324,"Failed to open this link because its target is missing.")):a.onUnexpectedError(s)})}getLinkOccurrence(e){if(!this.editor.hasModel()||!e)return null;const t=this.editor.getModel().getDecorationsInRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:e.lineNumber,endColumn:e.column},0,!0);for(const i of t){const n=this.currentOccurrences[i.id];if(n)return n}return null}isEnabled(e,t){return!!(e.target.type===6&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey||e.isMiddleClick&&e.mouseMiddleClickAction==="openLink"))}stop(){this.computeLinks.cancel(),this.activeLinksList&&(this.activeLinksList?.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop()}},up=Gn,Gn.ID="editor.linkDetector",Gn);Lr=up=VT([Xl(1,o.IOpenerService),Xl(2,o.INotificationService),Xl(3,o.ILanguageFeaturesService),Xl(4,o.ILanguageFeatureDebounceService)],Lr);const Cb={general:o.ModelDecorationOptions.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:o.ModelDecorationOptions.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})};class Us{static decoration(e,t){return{range:e.range,options:Us._getOptions(e,t,!1)}}static _getOptions(e,t,i){const n={...i?Cb.active:Cb.general};return n.hoverMessage=BT(e,t),n}constructor(e,t){this.link=e,this.decorationId=t}activate(e,t){e.changeDecorationOptions(this.decorationId,Us._getOptions(this.link,t,!0))}deactivate(e,t){e.changeDecorationOptions(this.decorationId,Us._getOptions(this.link,t,!1))}}function BT(c,e){const t=c.url&&/^command:/i.test(c.url.toString()),i=c.tooltip?c.tooltip:t?a.localize(1325,"Execute command"):a.localize(1326,"Follow link"),n=e?a.isMacintosh?a.localize(1327,"cmd + click"):a.localize(1328,"ctrl + click"):a.isMacintosh?a.localize(1329,"option + click"):a.localize(1330,"alt + click");if(c.url){let s="";if(/^command:/i.test(c.url.toString())){const l=c.url.toString().match(/^command:([^?#]+)/);if(l){const d=l[1];s=a.localize(1331,"Execute command {0}",d)}}return new o.MarkdownString("",!0).appendLink(c.url.toString(!0).replace(/ /g,"%20"),i,s).appendMarkdown(` (${n})`)}else return new o.MarkdownString().appendText(`${i} (${n})`)}class KT extends o.EditorAction{constructor(){super({id:"editor.action.openLink",label:a.localize2(1332,"Open Link"),precondition:void 0})}run(e,t){const i=Lr.get(t);if(!i||!t.hasModel())return;const n=t.getSelections();for(const s of n){const r=i.getLinkOccurrence(s.getEndPosition());r&&i.openLinkOccurrence(r,!1)}}}o.registerEditorContribution(Lr.ID,Lr,1),o.registerEditorAction(KT);const uf=class uf extends a.Disposable{constructor(e){super(),this._editor=e,this._register(this._editor.onMouseDown(t=>{const i=this._editor.getOption(133);i>=0&&t.target.type===6&&t.target.position.column>=i&&this._editor.updateOptions({stopRenderingLineAfter:-1})}))}};uf.ID="editor.contrib.longLinesHelper";let Yl=uf;o.registerEditorContribution(Yl.ID,Yl,2);const gf=class gf extends a.Disposable{constructor(e){super(),this._editor=e;const t=o.observableCodeEditor(this._editor),i=t.getOption(171);this._register(o.autorun(n=>{if(!i.read(n))return;const s=t.domNode.read(n);if(!s)return;const r=n.store.add(o.disposableObservableValue("scrollingSession",void 0));n.store.add(this._editor.onMouseDown(d=>{if(r.read(void 0)){r.set(void 0,void 0);return}if(!d.event.middleButton)return;d.event.stopPropagation(),d.event.preventDefault();const u=new a.DisposableStore,g=new o.Point(d.event.posx,d.event.posy),f=UT(o.getWindow(s),g,u).map(v=>v.subtract(g).withThreshold(5)),m=s.getBoundingClientRect(),_=new o.Point(g.x-m.left,g.y-m.top);r.set({mouseDeltaAfterThreshold:f,initialMousePosInEditor:_,didScroll:!1,dispose:()=>u.dispose()},void 0),u.add(this._editor.onMouseUp(v=>{const b=r.read(void 0);b&&b.didScroll&&r.set(void 0,void 0)})),u.add(this._editor.onKeyDown(v=>{r.set(void 0,void 0)}))})),n.store.add(o.autorun(d=>{const h=r.read(d);if(!h)return;let u=Date.now();d.store.add(o.autorun(p=>{Yo.instance.invalidateOnNextAnimationFrame(p);const f=Date.now(),m=f-u;u=f;const _=h.mouseDeltaAfterThreshold.read(void 0),v=m/32,b=_.scale(v),S=new o.Point(this._editor.getScrollLeft(),this._editor.getScrollTop());this._editor.setScrollPosition(kT(S.add(b))),b.isZero()||(h.didScroll=!0)}));const g=o.derived(p=>{const f=h.mouseDeltaAfterThreshold.read(p);let m="";return m+=f.y<0?"n":f.y>0?"s":"",m+=f.x<0?"w":f.x>0?"e":"",m});d.store.add(o.autorun(p=>{s.setAttribute("data-scroll-direction",g.read(p))}))}));const l=n.store.add(o.n.div({class:["scroll-editor-on-middle-click-dot",r.map(d=>d?"":"hidden")],style:{left:r.map(d=>d?d.initialMousePosInEditor.x:0),top:r.map(d=>d?d.initialMousePosInEditor.y:0)}}).toDisposableLiveElement());n.store.add(o.appendRemoveOnDispose(s,l.element)),n.store.add(o.autorun(d=>{const h=r.read(d);s.classList.toggle("scroll-editor-on-middle-click-editor",!!h)}))}))}};gf.ID="editor.contrib.middleScroll";let Ql=gf;function UT(c,e,t){const i=o.observableValue("pos",e);return t.add(o.addDisposableListener(c,"mousemove",n=>{i.set(new o.Point(n.pageX,n.pageY),void 0)})),i}function kT(c){return{scrollLeft:c.x,scrollTop:c.y}}o.registerEditorContribution(Ql.ID,Ql,2);const jT=o.registerColor("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hcDark:null,hcLight:null},a.localize(1615,"Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations."),!0);o.registerColor("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hcDark:null,hcLight:null},a.localize(1616,"Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations."),!0),o.registerColor("editor.wordHighlightTextBackground",jT,a.localize(1617,"Background color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0);const $T=o.registerColor("editor.wordHighlightBorder",{light:null,dark:null,hcDark:o.activeContrastBorder,hcLight:o.activeContrastBorder},a.localize(1618,"Border color of a symbol during read-access, like reading a variable."));o.registerColor("editor.wordHighlightStrongBorder",{light:null,dark:null,hcDark:o.activeContrastBorder,hcLight:o.activeContrastBorder},a.localize(1619,"Border color of a symbol during write-access, like writing to a variable.")),o.registerColor("editor.wordHighlightTextBorder",$T,a.localize(1620,"Border color of a textual occurrence for a symbol."));const qT=o.registerColor("editorOverviewRuler.wordHighlightForeground","#A0A0A0CC",a.localize(1621,"Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),GT=o.registerColor("editorOverviewRuler.wordHighlightStrongForeground","#C0A0C0CC",a.localize(1622,"Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),ZT=o.registerColor("editorOverviewRuler.wordHighlightTextForeground",o.overviewRulerSelectionHighlightForeground,a.localize(1623,"Overview ruler marker color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0),XT=o.ModelDecorationOptions.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:o.themeColorFromId(GT),position:a.OverviewRulerLane.Center},minimap:{color:o.themeColorFromId(o.minimapSelectionOccurrenceHighlight),position:1}}),YT=o.ModelDecorationOptions.register({description:"word-highlight-text",stickiness:1,className:"wordHighlightText",overviewRuler:{color:o.themeColorFromId(ZT),position:a.OverviewRulerLane.Center},minimap:{color:o.themeColorFromId(o.minimapSelectionOccurrenceHighlight),position:1}}),QT=o.ModelDecorationOptions.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",overviewRuler:{color:o.themeColorFromId(o.overviewRulerSelectionHighlightForeground),position:a.OverviewRulerLane.Center},minimap:{color:o.themeColorFromId(o.minimapSelectionOccurrenceHighlight),position:1}}),JT=o.ModelDecorationOptions.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"}),WT=o.ModelDecorationOptions.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:o.themeColorFromId(qT),position:a.OverviewRulerLane.Center},minimap:{color:o.themeColorFromId(o.minimapSelectionOccurrenceHighlight),position:1}});function HT(c){return c===a.DocumentHighlightKind.Write?XT:c===a.DocumentHighlightKind.Text?YT:WT}function e0(c){return c?JT:QT}o.registerThemingParticipant((c,e)=>{const t=c.getColor(o.editorSelectionHighlight);t&&e.addRule(`.monaco-editor .selectionHighlight { background-color: ${t.transparent(.5)}; }`)});var t0=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},i0=function(c,e){return function(t,i){e(t,i,c)}},gp;function si(c,e){const t=e.filter(i=>!c.find(n=>n.equals(i)));if(t.length>=1){const i=t.map(s=>`line ${s.viewState.position.lineNumber} column ${s.viewState.position.column}`).join(", "),n=t.length===1?a.localize(1334,"Cursor added: {0}",i):a.localize(1335,"Cursors added: {0}",i);o.status(n)}}class n0 extends o.EditorAction{constructor(){super({id:"editor.action.insertCursorAbove",label:a.localize2(1344,"Add Cursor Above"),precondition:void 0,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:2576,linux:{primary:1552,secondary:[3088]},weight:100},menuOpts:{menuId:o.MenuId.MenubarSelectionMenu,group:"3_multi",title:a.localize(1336,"&&Add Cursor Above"),order:2}})}run(e,t,i){if(!t.hasModel())return;let n=!0;i&&i.logicalLine===!1&&(n=!1);const s=t._getViewModel();if(s.cursorConfig.readOnly)return;s.model.pushStackElement();const r=s.getCursorStates();s.setCursorStates(i.source,3,o.CursorMoveCommands.addCursorUp(s,r,n)),s.revealTopMostCursor(i.source),si(r,s.getCursorStates())}}class s0 extends o.EditorAction{constructor(){super({id:"editor.action.insertCursorBelow",label:a.localize2(1345,"Add Cursor Below"),precondition:void 0,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:2578,linux:{primary:1554,secondary:[3090]},weight:100},menuOpts:{menuId:o.MenuId.MenubarSelectionMenu,group:"3_multi",title:a.localize(1337,"A&&dd Cursor Below"),order:3}})}run(e,t,i){if(!t.hasModel())return;let n=!0;i&&i.logicalLine===!1&&(n=!1);const s=t._getViewModel();if(s.cursorConfig.readOnly)return;s.model.pushStackElement();const r=s.getCursorStates();s.setCursorStates(i.source,3,o.CursorMoveCommands.addCursorDown(s,r,n)),s.revealBottomMostCursor(i.source),si(r,s.getCursorStates())}}class o0 extends o.EditorAction{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:a.localize2(1346,"Add Cursors to Line Ends"),precondition:void 0,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:1575,weight:100},menuOpts:{menuId:o.MenuId.MenubarSelectionMenu,group:"3_multi",title:a.localize(1338,"Add C&&ursors to Line Ends"),order:4}})}getCursorsForSelection(e,t,i){if(!e.isEmpty()){for(let n=e.startLineNumber;n1&&i.push(new a.Selection(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn))}}run(e,t){if(!t.hasModel())return;const i=t.getModel(),n=t.getSelections(),s=t._getViewModel(),r=s.getCursorStates(),l=[];n.forEach(d=>this.getCursorsForSelection(d,i,l)),l.length>0&&t.setSelections(l),si(r,s.getCursorStates())}}class r0 extends o.EditorAction{constructor(){super({id:"editor.action.addCursorsToBottom",label:a.localize2(1347,"Add Cursors to Bottom"),precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getSelections(),n=t.getModel().getLineCount(),s=[];for(let d=i[0].startLineNumber;d<=n;d++)s.push(new a.Selection(d,i[0].startColumn,d,i[0].endColumn));const r=t._getViewModel(),l=r.getCursorStates();s.length>0&&t.setSelections(s),si(l,r.getCursorStates())}}class a0 extends o.EditorAction{constructor(){super({id:"editor.action.addCursorsToTop",label:a.localize2(1348,"Add Cursors to Top"),precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getSelections(),n=[];for(let l=i[0].startLineNumber;l>=1;l--)n.push(new a.Selection(l,i[0].startColumn,l,i[0].endColumn));const s=t._getViewModel(),r=s.getCursorStates();n.length>0&&t.setSelections(n),si(r,s.getCursorStates())}}class Jl{constructor(e,t,i){this.selections=e,this.revealRange=t,this.revealScrollType=i}}class Dr{static create(e,t){if(!e.hasModel())return null;const i=t.getState();if(!e.hasTextFocus()&&i.isRevealed&&i.searchString.length>0)return new Dr(e,t,!1,i.searchString,i.wholeWord,i.matchCase,null);let n=!1,s,r;const l=e.getSelections();l.length===1&&l[0].isEmpty()?(n=!0,s=!0,r=!0):(s=i.wholeWord,r=i.matchCase);const d=e.getSelection();let h,u=null;if(d.isEmpty()){const g=e.getConfiguredWordAtPosition(d.getStartPosition());if(!g)return null;h=g.word,u=new a.Selection(d.startLineNumber,g.startColumn,d.startLineNumber,g.endColumn)}else h=e.getModel().getValueInRange(d).replace(/\r\n/g,` +`);return new Dr(e,t,n,h,s,r,u)}constructor(e,t,i,n,s,r,l){this._editor=e,this.findController=t,this.isDisconnectedFromFindController=i,this.searchText=n,this.wholeWord=s,this.matchCase=r,this.currentMatch=l}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new Jl(t.concat(e),e,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new Jl(t.slice(0,t.length-1).concat(e),e,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const n=this.currentMatch;return this.currentMatch=null,n}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],i=this._editor.getModel().findNextMatch(this.searchText,t.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(148):null,!1);return i?new a.Selection(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new Jl(t.concat(e),e,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new Jl(t.slice(0,t.length-1).concat(e),e,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const n=this.currentMatch;return this.currentMatch=null,n}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],i=this._editor.getModel().findPreviousMatch(this.searchText,t.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(148):null,!1);return i?new a.Selection(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}selectAll(e){if(!this._editor.hasModel())return[];this.findController.highlightFindOptions();const t=this._editor.getModel();return e?t.findMatches(this.searchText,e,!1,this.matchCase,this.wholeWord?this._editor.getOption(148):null,!1,1073741824):t.findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(148):null,!1,1073741824)}}const Wc=class Wc extends a.Disposable{static get(e){return e.getContribution(Wc.ID)}constructor(e){super(),this._sessionDispose=this._register(new a.DisposableStore),this._editor=e,this._ignoreSelectionChange=!1,this._session=null}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(e){if(!this._session){const t=Dr.create(this._editor,e);if(!t)return;this._session=t;const i={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(i.wholeWordOverride=1,i.matchCaseOverride=1,i.isRegexOverride=2),e.getState().change(i,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection(n=>{this._ignoreSelectionChange||this._endSession()})),this._sessionDispose.add(this._editor.onDidBlurEditorText(()=>{this._endSession()})),this._sessionDispose.add(e.getState().onFindReplaceStateChange(n=>{(n.matchCase||n.wholeWord)&&this._endSession()}))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){const e={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(e,!1)}this._session=null}_setSelections(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1}_expandEmptyToWord(e,t){if(!t.isEmpty())return t;const i=this._editor.getConfiguredWordAtPosition(t.getStartPosition());return i?new a.Selection(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):t}_applySessionResult(e){e&&(this._setSelections(e.selections),e.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange,e.revealScrollType))}getSession(e){return this._session}addSelectionToNextFindMatch(e){if(this._editor.hasModel()){if(!this._session){const t=this._editor.getSelections();if(t.length>1){const n=e.getState().matchCase;if(!Sb(this._editor.getModel(),t,n)){const r=this._editor.getModel(),l=[];for(let d=0,h=t.length;d0&&i.isRegex){const n=this._editor.getModel();i.searchScope?t=n.findMatches(i.searchString,i.searchScope,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(148):null,!1,1073741824):t=n.findMatches(i.searchString,!0,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(148):null,!1,1073741824)}else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll(i.searchScope)}if(t.length>0){const n=this._editor.getSelection();for(let s=0,r=t.length;snew a.Selection(s.range.startLineNumber,s.range.startColumn,s.range.endLineNumber,s.range.endColumn)))}}};Wc.ID="editor.contrib.multiCursorController";let ks=Wc;class js extends o.EditorAction{run(e,t){const i=ks.get(t);if(!i)return;const n=t._getViewModel();if(n){const s=n.getCursorStates(),r=ge.get(t);if(r)this._run(i,r);else{const l=e.get(o.IInstantiationService).createInstance(ge,t);this._run(i,l),l.dispose()}si(s,n.getCursorStates())}}}class l0 extends js{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:a.localize2(1349,"Add Selection to Next Find Match"),precondition:void 0,kbOpts:{kbExpr:o.EditorContextKeys.focus,primary:2082,weight:100},menuOpts:{menuId:o.MenuId.MenubarSelectionMenu,group:"3_multi",title:a.localize(1339,"Add &&Next Occurrence"),order:5}})}_run(e,t){e.addSelectionToNextFindMatch(t)}}class c0 extends js{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:a.localize2(1350,"Add Selection to Previous Find Match"),precondition:void 0,menuOpts:{menuId:o.MenuId.MenubarSelectionMenu,group:"3_multi",title:a.localize(1340,"Add P&&revious Occurrence"),order:6}})}_run(e,t){e.addSelectionToPreviousFindMatch(t)}}class d0 extends js{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:a.localize2(1351,"Move Last Selection to Next Find Match"),precondition:void 0,kbOpts:{kbExpr:o.EditorContextKeys.focus,primary:a.KeyChord(2089,2082),weight:100}})}_run(e,t){e.moveSelectionToNextFindMatch(t)}}class h0 extends js{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:a.localize2(1352,"Move Last Selection to Previous Find Match"),precondition:void 0})}_run(e,t){e.moveSelectionToPreviousFindMatch(t)}}class u0 extends js{constructor(){super({id:"editor.action.selectHighlights",label:a.localize2(1353,"Select All Occurrences of Find Match"),precondition:void 0,kbOpts:{kbExpr:o.EditorContextKeys.focus,primary:3114,weight:100},menuOpts:{menuId:o.MenuId.MenubarSelectionMenu,group:"3_multi",title:a.localize(1341,"Select All &&Occurrences"),order:7}})}_run(e,t){e.selectAll(t)}}class g0 extends js{constructor(){super({id:"editor.action.changeAll",label:a.localize2(1354,"Change All Occurrences"),precondition:o.ContextKeyExpr.and(o.EditorContextKeys.writable,o.EditorContextKeys.editorTextFocus),kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(e,t){e.selectAll(t)}}class p0{constructor(e,t,i,n,s){this._model=e,this._searchText=t,this._matchCase=i,this._wordSeparators=n,this._cachedFindMatches=null,this._modelVersionId=this._model.getVersionId(),s&&this._model===s._model&&this._searchText===s._searchText&&this._matchCase===s._matchCase&&this._wordSeparators===s._wordSeparators&&this._modelVersionId===s._modelVersionId&&(this._cachedFindMatches=s._cachedFindMatches)}findMatches(){return this._cachedFindMatches===null&&(this._cachedFindMatches=this._model.findMatches(this._searchText,!0,!1,this._matchCase,this._wordSeparators,!1).map(e=>e.range),this._cachedFindMatches.sort(a.Range.compareRangesUsingStarts)),this._cachedFindMatches}}let Wl=(Zn=class extends a.Disposable{constructor(e,t){super(),this._languageFeaturesService=t,this.editor=e,this._isEnabled=e.getOption(122),this._isEnabledMultiline=e.getOption(124),this._maxLength=e.getOption(123),this._decorations=e.createDecorationsCollection(),this.updateSoon=this._register(new a.RunOnceScheduler(()=>this._update(),300)),this.state=null,this._register(e.onDidChangeConfiguration(n=>{this._isEnabled=e.getOption(122),this._isEnabledMultiline=e.getOption(124),this._maxLength=e.getOption(123)})),this._register(e.onDidChangeCursorSelection(n=>{this._isEnabled&&(n.selection.isEmpty()?n.reason===3?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())})),this._register(e.onDidChangeModel(n=>{this._setState(null)})),this._register(e.onDidChangeModelContent(n=>{this._isEnabled&&this.updateSoon.schedule()}));const i=ge.get(e);i&&this._register(i.getState().onFindReplaceStateChange(n=>{this._update()})),this.updateSoon.schedule()}_update(){this._setState(gp._createState(this.state,this._isEnabled,this._isEnabledMultiline,this._maxLength,this.editor))}static _createState(e,t,i,n,s){if(!t||!s.hasModel())return null;if(!i){const g=s.getSelection();if(g.startLineNumber!==g.endLineNumber)return null}const r=ks.get(s);if(!r)return null;const l=ge.get(s);if(!l)return null;let d=r.getSession(l);if(!d){const g=s.getSelections();if(g.length>1){const f=l.getState().matchCase;if(!Sb(s.getModel(),g,f))return null}d=Dr.create(s,l)}if(!d||d.currentMatch||/^[ \t]+$/.test(d.searchText)||n>0&&d.searchText.length>n)return null;const h=l.getState(),u=h.matchCase;if(h.isRevealed){let g=h.searchString;u||(g=g.toLowerCase());let p=d.searchText;if(u||(p=p.toLowerCase()),g===p&&d.matchCase===h.matchCase&&d.wholeWord===h.wholeWord&&!h.isRegex)return null}return new p0(s.getModel(),d.searchText,d.matchCase,d.wholeWord?s.getOption(148):null,e)}_setState(e){if(this.state=e,!this.state){this._decorations.clear();return}if(!this.editor.hasModel())return;const t=this.editor.getModel();if(t.isTooLargeForTokenization())return;const i=this.state.findMatches(),n=this.editor.getSelections();n.sort(a.Range.compareRangesUsingStarts);const s=[];for(let h=0,u=0,g=i.length,p=n.length;h=p)s.push(f),h++;else{const m=a.Range.compareRangesUsingStarts(f,n[u]);m<0?((n[u].isEmpty()||!a.Range.areIntersecting(f,n[u]))&&s.push(f),h++):(m>0||h++,u++)}}const r=this.editor.getOption(90)!=="off",l=this._languageFeaturesService.documentHighlightProvider.has(t)&&r,d=s.map(h=>({range:h,options:e0(l)}));this._decorations.set(d)}dispose(){this._setState(null),super.dispose()}},gp=Zn,Zn.ID="editor.contrib.selectionHighlighter",Zn);Wl=gp=t0([i0(1,o.ILanguageFeaturesService)],Wl);function Sb(c,e,t){const i=yb(c,e[0],!t);for(let n=1,s=e.length;n{const[t,i,n]=e;a.assertType(a.URI.isUri(t)),a.assertType(a.Position.isIPosition(i)),a.assertType(typeof n=="string"||!n);const s=c.get(o.ILanguageFeaturesService),r=await c.get(o.ITextModelService).createModelReference(t);try{const l=await wb(s.signatureHelpProvider,r.object.textEditorModel,a.Position.lift(i),{triggerKind:a.SignatureHelpTriggerKind.Invoke,isRetrigger:!1,triggerCharacter:n},a.CancellationToken.None);return l?(setTimeout(()=>l.dispose(),0),l.value):void 0}finally{r.dispose()}});var oi;(function(c){c.Default={type:0};class e{constructor(n,s){this.request=n,this.previouslyActiveHints=s,this.type=2}}c.Pending=e;class t{constructor(n){this.hints=n,this.type=1}}c.Active=t})(oi||(oi={}));const Hc=class Hc extends a.Disposable{constructor(e,t,i=Hc.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new a.Emitter),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=oi.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new a.MutableDisposable),this.triggerChars=new a.CharacterSet,this.retriggerChars=new a.CharacterSet,this.triggerId=0,this.editor=e,this.providers=t,this.throttledDelayer=this._register(new a.Delayer(i)),this._register(this.editor.onDidBlurEditorWidget(()=>this.cancel())),this._register(this.editor.onDidChangeConfiguration(()=>this.onEditorConfigurationChange())),this._register(this.editor.onDidChangeModel(n=>this.onModelChanged())),this._register(this.editor.onDidChangeModelLanguage(n=>this.onModelChanged())),this._register(this.editor.onDidChangeCursorSelection(n=>this.onCursorChange(n))),this._register(this.editor.onDidChangeModelContent(n=>this.onModelContentChange())),this._register(this.providers.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType(n=>this.onDidType(n))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(e){this._state.type===2&&this._state.request.cancel(),this._state=e}cancel(e=!1){this.state=oi.Default,this.throttledDelayer.cancel(),e||this._onChangedHints.fire(void 0)}trigger(e,t){const i=this.editor.getModel();if(!i||!this.providers.has(i))return;const n=++this.triggerId;this._pendingTriggers.push(e),this.throttledDelayer.trigger(()=>this.doTrigger(n),t).catch(a.onUnexpectedError)}next(){if(this.state.type!==1)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=t%e===e-1,n=this.editor.getOption(98).cycle;if((e<2||i)&&!n){this.cancel();return}this.updateActiveSignature(i&&n?0:t+1)}previous(){if(this.state.type!==1)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=t===0,n=this.editor.getOption(98).cycle;if((e<2||i)&&!n){this.cancel();return}this.updateActiveSignature(i&&n?e-1:t-1)}updateActiveSignature(e){this.state.type===1&&(this.state=new oi.Active({...this.state.hints,activeSignature:e}),this._onChangedHints.fire(this.state.hints))}async doTrigger(e){const t=this.state.type===1||this.state.type===2,i=this.getLastActiveHints();if(this.cancel(!0),this._pendingTriggers.length===0)return!1;const n=this._pendingTriggers.reduce(_0);this._pendingTriggers=[];const s={triggerKind:n.triggerKind,triggerCharacter:n.triggerCharacter,isRetrigger:t,activeSignatureHelp:i};if(!this.editor.hasModel())return!1;const r=this.editor.getModel(),l=this.editor.getPosition();this.state=new oi.Pending(a.createCancelablePromise(d=>wb(this.providers,r,l,s,d)),i);try{const d=await this.state.request;return e!==this.triggerId?(d?.dispose(),!1):!d||!d.value.signatures||d.value.signatures.length===0?(d?.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1):(this.state=new oi.Active(d.value),this._lastSignatureHelpResult.value=d,this._onChangedHints.fire(this.state.hints),!0)}catch(d){return e===this.triggerId&&(this.state=oi.Default),a.onUnexpectedError(d),!1}}getLastActiveHints(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}get isTriggered(){return this.state.type===1||this.state.type===2||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars.clear(),this.retriggerChars.clear();const e=this.editor.getModel();if(e)for(const t of this.providers.ordered(e)){for(const i of t.signatureHelpTriggerCharacters||[])if(i.length){const n=i.charCodeAt(0);this.triggerChars.add(n),this.retriggerChars.add(n)}for(const i of t.signatureHelpRetriggerCharacters||[])i.length&&this.retriggerChars.add(i.charCodeAt(0))}}onDidType(e){if(!this.triggerOnType)return;const t=e.length-1,i=e.charCodeAt(t);(this.triggerChars.has(i)||this.isTriggered&&this.retriggerChars.has(i))&&this.trigger({triggerKind:a.SignatureHelpTriggerKind.TriggerCharacter,triggerCharacter:e.charAt(t)})}onCursorChange(e){e.source==="mouse"?this.cancel():this.isTriggered&&this.trigger({triggerKind:a.SignatureHelpTriggerKind.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:a.SignatureHelpTriggerKind.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(98).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}};Hc.DEFAULT_DELAY=120;let pp=Hc;function _0(c,e){switch(e.triggerKind){case a.SignatureHelpTriggerKind.Invoke:return e;case a.SignatureHelpTriggerKind.ContentChange:return c;case a.SignatureHelpTriggerKind.TriggerCharacter:default:return e}}var v0=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ib=function(c,e){return function(t,i){e(t,i,c)}},fp;const Ee=o.$,b0=o.registerIcon("parameter-hints-next",a.Codicon.chevronDown,a.localize(1358,"Icon for show next parameter hint.")),C0=o.registerIcon("parameter-hints-previous",a.Codicon.chevronUp,a.localize(1359,"Icon for show previous parameter hint."));let mp=(Xn=class extends a.Disposable{constructor(e,t,i,n){super(),this.editor=e,this.model=t,this.markdownRendererService=n,this.renderDisposeables=this._register(new a.DisposableStore),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.keyVisible=dn.Visible.bindTo(i),this.keyMultipleSignatures=dn.MultipleSignatures.bindTo(i)}createParameterHintDOMNodes(){const e=Ee(".editor-widget.parameter-hints-widget"),t=o.append(e,Ee(".phwrapper"));t.tabIndex=-1;const i=o.append(t,Ee(".controls")),n=o.append(i,Ee(".button"+o.ThemeIcon.asCSSSelector(C0))),s=o.append(i,Ee(".overloads")),r=o.append(i,Ee(".button"+o.ThemeIcon.asCSSSelector(b0)));this._register(o.addDisposableListener(n,"click",p=>{o.EventHelper.stop(p),this.previous()})),this._register(o.addDisposableListener(r,"click",p=>{o.EventHelper.stop(p),this.next()}));const l=Ee(".body"),d=new o.DomScrollableElement(l,{alwaysConsumeMouseWheel:!0});this._register(d),t.appendChild(d.getDomNode());const h=o.append(l,Ee(".signature")),u=o.append(l,Ee(".docs"));e.style.userSelect="text",this.domNodes={element:e,signature:h,overloads:s,docs:u,scrollbar:d},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection(p=>{this.visible&&this.editor.layoutContentWidget(this)}));const g=()=>{if(!this.domNodes)return;const p=this.editor.getOption(59),f=this.domNodes.element;f.style.fontSize=`${p.fontSize}px`,f.style.lineHeight=`${p.lineHeight/p.fontSize}`,f.style.setProperty("--vscode-parameterHintsWidget-editorFontFamily",p.fontFamily),f.style.setProperty("--vscode-parameterHintsWidget-editorFontFamilyDefault",o.EDITOR_FONT_DEFAULTS.fontFamily)};g(),this._register(a.Event.chain(this.editor.onDidChangeConfiguration.bind(this.editor),p=>p.filter(f=>f.hasChanged(59)))(g)),this._register(this.editor.onDidLayoutChange(p=>this.updateMaxHeight())),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParameterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout(()=>{this.domNodes?.element.classList.add("visible")},100),this.editor.layoutContentWidget(this))}hide(){this.renderDisposeables.clear(),this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,this.domNodes?.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(e){if(this.renderDisposeables.clear(),!this.domNodes)return;const t=e.signatures.length>1;this.domNodes.element.classList.toggle("multiple",t),this.keyMultipleSignatures.set(t),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";const i=e.signatures[e.activeSignature];if(!i)return;const n=o.append(this.domNodes.signature,Ee(".code")),s=i.parameters.length>0,r=i.activeParameter??e.activeParameter;if(s)this.renderParameters(n,i,r);else{const h=o.append(n,Ee("span"));h.textContent=i.label}const l=i.parameters[r];if(l?.documentation){const h=Ee("span.documentation");if(typeof l.documentation=="string")h.textContent=l.documentation;else{const u=this.renderMarkdownDocs(l.documentation);h.appendChild(u.element)}o.append(this.domNodes.docs,Ee("p",{},h))}if(i.documentation!==void 0)if(typeof i.documentation=="string")o.append(this.domNodes.docs,Ee("p",{},i.documentation));else{const h=this.renderMarkdownDocs(i.documentation);o.append(this.domNodes.docs,h.element)}const d=this.hasDocs(i,l);if(this.domNodes.signature.classList.toggle("has-docs",d),this.domNodes.docs.classList.toggle("empty",!d),this.domNodes.overloads.textContent=String(e.activeSignature+1).padStart(e.signatures.length.toString().length,"0")+"/"+e.signatures.length,l){let h="";const u=i.parameters[r];Array.isArray(u.label)?h=i.label.substring(u.label[0],u.label[1]):h=u.label,u.documentation&&(h+=typeof u.documentation=="string"?`, ${u.documentation}`:`, ${u.documentation.value}`),i.documentation&&(h+=typeof i.documentation=="string"?`, ${i.documentation}`:`, ${i.documentation.value}`),this.announcedLabel!==h&&(o.alert(a.localize(1360,"{0}, hint",h)),this.announcedLabel=h)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(e){const t=this.renderDisposeables.add(this.markdownRendererService.render(e,{context:this.editor,asyncRenderCallback:()=>{this.domNodes?.scrollbar.scanDomNode()}}));return t.element.classList.add("markdown-docs"),t}hasDocs(e,t){return!!(t&&typeof t.documentation=="string"&&a.assertReturnsDefined(t.documentation).length>0||t&&typeof t.documentation=="object"&&a.assertReturnsDefined(t.documentation).value.length>0||e.documentation&&typeof e.documentation=="string"&&a.assertReturnsDefined(e.documentation).length>0||e.documentation&&typeof e.documentation=="object"&&a.assertReturnsDefined(e.documentation.value).length>0)}renderParameters(e,t,i){const[n,s]=this.getParameterLabelOffsets(t,i),r=document.createElement("span");r.textContent=t.label.substring(0,n);const l=document.createElement("span");l.textContent=t.label.substring(n,s),l.className="parameter active";const d=document.createElement("span");d.textContent=t.label.substring(s),o.append(e,r,l,d)}getParameterLabelOffsets(e,t){const i=e.parameters[t];if(i){if(Array.isArray(i.label))return i.label;if(i.label.length){const n=new RegExp(`(\\W|^)${a.escapeRegExpCharacters(i.label)}(?=\\W|$)`,"g");n.test(e.label);const s=n.lastIndex-i.label.length;return s>=0?[s,n.lastIndex]:[0,0]}else return[0,0]}else return[0,0]}next(){this.editor.focus(),this.model.next()}previous(){this.editor.focus(),this.model.previous()}getDomNode(){return this.domNodes||this.createParameterHintDOMNodes(),this.domNodes.element}getId(){return fp.ID}updateMaxHeight(){if(!this.domNodes)return;const t=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=t;const i=this.domNodes.element.getElementsByClassName("phwrapper");i.length&&(i[0].style.maxHeight=t)}},fp=Xn,Xn.ID="editor.widget.parameterHintsWidget",Xn);mp=fp=v0([Ib(2,o.IContextKeyService),Ib(3,o.IMarkdownRendererService)],mp),o.registerColor("editorHoverWidget.highlightForeground",o.listHighlightForeground,a.localize(1361,"Foreground color of the active item in the parameter hint."));var S0=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},xb=function(c,e){return function(t,i){e(t,i,c)}},_p;let $s=(Yn=class extends a.Disposable{static get(e){return e.getContribution(_p.ID)}constructor(e,t,i){super(),this.editor=e,this.model=this._register(new pp(e,i.signatureHelpProvider)),this._register(this.model.onChangedHints(n=>{n?(this.widget.value.show(),this.widget.value.render(n)):this.widget.rawValue?.hide()})),this.widget=new a.Lazy(()=>this._register(t.createInstance(mp,this.editor,this.model)))}cancel(){this.model.cancel()}previous(){this.widget.rawValue?.previous()}next(){this.widget.rawValue?.next()}trigger(e){this.model.trigger(e,0)}},_p=Yn,Yn.ID="editor.controller.parameterHints",Yn);$s=_p=S0([xb(1,o.IInstantiationService),xb(2,o.ILanguageFeaturesService)],$s);class y0 extends o.EditorAction{constructor(){super({id:"editor.action.triggerParameterHints",label:a.localize2(1357,"Trigger Parameter Hints"),precondition:o.EditorContextKeys.hasSignatureHelpProvider,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:3082,weight:100}})}run(e,t){$s.get(t)?.trigger({triggerKind:a.SignatureHelpTriggerKind.Invoke})}}o.registerEditorContribution($s.ID,$s,2),o.registerEditorAction(y0);const vp=175,bp=o.EditorCommand.bindToContribution($s.get);o.registerEditorCommand(new bp({id:"closeParameterHints",precondition:dn.Visible,handler:c=>c.cancel(),kbOpts:{weight:vp,kbExpr:o.EditorContextKeys.focus,primary:9,secondary:[1033]}})),o.registerEditorCommand(new bp({id:"showPrevParameterHint",precondition:o.ContextKeyExpr.and(dn.Visible,dn.MultipleSignatures),handler:c=>c.previous(),kbOpts:{weight:vp,kbExpr:o.EditorContextKeys.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}})),o.registerEditorCommand(new bp({id:"showNextParameterHint",precondition:o.ContextKeyExpr.and(dn.Visible,dn.MultipleSignatures),handler:c=>c.next(),kbOpts:{weight:vp,kbExpr:o.EditorContextKeys.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}));const pf=class pf extends a.Disposable{constructor(e){super(),this._editor=e,this._editorObs=o.observableCodeEditor(this._editor),this._placeholderText=this._editorObs.getOption(100),this._state=o.derivedOpts({owner:this,equalsFn:o.structuralEquals},t=>{const i=this._placeholderText.read(t);if(i&&this._editorObs.valueIsEmpty.read(t))return{placeholder:i}}),this._shouldViewBeAlive=w0(this,t=>this._state.read(t)?.placeholder!==void 0),this._view=o.derived(t=>{if(!this._shouldViewBeAlive.read(t))return;const i=o.h("div.editorPlaceholder");t.store.add(o.autorun(n=>{const s=this._state.read(n),r=s?.placeholder!==void 0;i.root.style.display=r?"block":"none",i.root.innerText=s?.placeholder??""})),t.store.add(o.autorun(n=>{const s=this._editorObs.layoutInfo.read(n);i.root.style.left=`${s.contentLeft}px`,i.root.style.width=s.contentWidth-s.verticalScrollbarWidth+"px",i.root.style.top=`${this._editor.getTopForLineNumber(0)}px`})),t.store.add(o.autorun(n=>{i.root.style.fontFamily=this._editorObs.getOption(58).read(n),i.root.style.fontSize=this._editorObs.getOption(61).read(n)+"px",i.root.style.lineHeight=this._editorObs.getOption(75).read(n)+"px"})),t.store.add(this._editorObs.createOverlayWidget({allowEditorOverflow:!1,minContentWidthInPx:o.constObservable(0),position:o.constObservable(null),domNode:i.root}))}),this._view.recomputeInitiallyAndOnChange(this._store)}};pf.ID="editor.contrib.placeholderText";let Hl=pf;function w0(c,e){return o.derivedObservableWithCache(c,(t,i)=>i===!0?!0:e(t))}var I0=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},x0=function(c,e){return function(t,i){e(t,i,c)}};class E0{constructor(e){this.instantiationService=e}init(...e){}}function L0(c){return c()}let Eb=class extends E0{constructor(e,t){super(t),this.init(e)}};Eb=I0([x0(1,o.IInstantiationService)],Eb),o.registerEditorContribution(Hl.ID,L0(()=>Hl),0),o.registerColor("editor.placeholder.foreground",o.ghostTextForeground,a.localize(1380,"Foreground color of the placeholder text in the editor."));var D0=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Lb=function(c,e){return function(t,i){e(t,i,c)}};let ec=(oo=class extends a.Disposable{constructor(e,t,i){super(),this.editor=e,this.languageConfigurationService=t,this.editorWorkerService=i,this.decorations=this.editor.createDecorationsCollection(),this.options=this.createOptions(e.getOption(81)),this.computePromise=null,this.currentOccurrences={},this._register(e.onDidChangeModel(n=>{this.currentOccurrences={},this.options=this.createOptions(e.getOption(81)),this.stop(),this.computeSectionHeaders.schedule(0)})),this._register(e.onDidChangeModelLanguage(n=>{this.currentOccurrences={},this.options=this.createOptions(e.getOption(81)),this.stop(),this.computeSectionHeaders.schedule(0)})),this._register(t.onDidChange(n=>{const s=this.editor.getModel()?.getLanguageId();s&&n.affects(s)&&(this.currentOccurrences={},this.options=this.createOptions(e.getOption(81)),this.stop(),this.computeSectionHeaders.schedule(0))})),this._register(e.onDidChangeConfiguration(n=>{this.options&&!n.hasChanged(81)||(this.options=this.createOptions(e.getOption(81)),this.updateDecorations([]),this.stop(),this.computeSectionHeaders.schedule(0))})),this._register(this.editor.onDidChangeModelContent(n=>{this.computeSectionHeaders.schedule()})),this._register(e.onDidChangeModelTokens(n=>{this.computeSectionHeaders.isScheduled()||this.computeSectionHeaders.schedule(1e3)})),this.computeSectionHeaders=this._register(new a.RunOnceScheduler(()=>{this.findSectionHeaders()},250)),this.computeSectionHeaders.schedule(0)}createOptions(e){if(!e||!this.editor.hasModel())return;const t=this.editor.getModel().getLanguageId();if(!t)return;const i=this.languageConfigurationService.getLanguageConfiguration(t).comments,n=this.languageConfigurationService.getLanguageConfiguration(t).foldingRules;if(!(!i&&!n?.markers))return{foldingRules:n,markSectionHeaderRegex:e.markSectionHeaderRegex,findMarkSectionHeaders:e.showMarkSectionHeaders,findRegionSectionHeaders:e.showRegionSectionHeaders}}findSectionHeaders(){if(!this.editor.hasModel()||!this.options?.findMarkSectionHeaders&&!this.options?.findRegionSectionHeaders)return;const e=this.editor.getModel();if(e.isDisposed()||e.isTooLargeForSyncing())return;const t=e.getVersionId();this.editorWorkerService.findSectionHeaders(e.uri,this.options).then(i=>{e.isDisposed()||e.getVersionId()!==t||this.updateDecorations(i)})}updateDecorations(e){const t=this.editor.getModel();t&&(e=e.filter(s=>{if(!s.shouldBeInComments)return!0;const r=t.validateRange(s.range),l=t.tokenization.getLineTokens(r.startLineNumber),d=l.findTokenIndexAtOffset(r.startColumn-1),h=l.getStandardTokenType(d),u=t.getLanguageIdAtPosition(r.startLineNumber,r.startColumn);return l.getLanguageId(d)===u&&h===1}));const i=Object.values(this.currentOccurrences).map(s=>s.decorationId),n=e.map(s=>R0(s));this.editor.changeDecorations(s=>{const r=s.deltaDecorations(i,n);this.currentOccurrences={};for(let l=0,d=r.length;l0?t[0]:[]}async function Nb(c,e,t,i,n){const s=O0(c,e),r=await Promise.all(s.map(async l=>{let d,h=null;try{d=await l.provideDocumentSemanticTokens(e,l===t?i:null,n)}catch(u){h=u,d=null}return(!d||!tc(d)&&!Rb(d))&&(d=null),new P0(l,d,h)}));for(const l of r){if(l.error)throw l.error;if(l.tokens)return l}return r.length>0?r[0]:null}function A0(c,e){const t=c.orderedGroups(e);return t.length>0?t[0]:null}class F0{constructor(e,t){this.provider=e,this.tokens=t}}function z0(c,e){return c.has(e)}function Mb(c,e){const t=c.orderedGroups(e);return t.length>0?t[0]:[]}async function Cp(c,e,t,i){const n=Mb(c,e),s=await Promise.all(n.map(async r=>{let l;try{l=await r.provideDocumentRangeSemanticTokens(e,t,i)}catch(d){a.onUnexpectedExternalError(d),l=null}return(!l||!tc(l))&&(l=null),new F0(r,l)}));for(const r of s)if(r.tokens)return r;return s.length>0?s[0]:null}o.CommandsRegistry.registerCommand("_provideDocumentSemanticTokensLegend",async(c,...e)=>{const[t]=e;a.assertType(t instanceof a.URI);const i=c.get(o.IModelService).getModel(t);if(!i)return;const{documentSemanticTokensProvider:n}=c.get(o.ILanguageFeaturesService),s=A0(n,i);return s?s[0].getLegend():c.get(o.ICommandService).executeCommand("_provideDocumentRangeSemanticTokensLegend",t)}),o.CommandsRegistry.registerCommand("_provideDocumentSemanticTokens",async(c,...e)=>{const[t]=e;a.assertType(t instanceof a.URI);const i=c.get(o.IModelService).getModel(t);if(!i)return;const{documentSemanticTokensProvider:n}=c.get(o.ILanguageFeaturesService);if(!Tb(n,i))return c.get(o.ICommandService).executeCommand("_provideDocumentRangeSemanticTokens",t,i.getFullModelRange());const s=await Nb(n,i,null,null,a.CancellationToken.None);if(!s)return;const{provider:r,tokens:l}=s;if(!l||!tc(l))return;const d=Db({id:0,type:"full",data:l.data});return l.resultId&&r.releaseDocumentSemanticTokens(l.resultId),d}),o.CommandsRegistry.registerCommand("_provideDocumentRangeSemanticTokensLegend",async(c,...e)=>{const[t,i]=e;a.assertType(t instanceof a.URI);const n=c.get(o.IModelService).getModel(t);if(!n)return;const{documentRangeSemanticTokensProvider:s}=c.get(o.ILanguageFeaturesService),r=Mb(s,n);if(r.length===0)return;if(r.length===1)return r[0].getLegend();if(!i||!a.Range.isIRange(i))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),r[0].getLegend();const l=await Cp(s,n,a.Range.lift(i),a.CancellationToken.None);if(l)return l.provider.getLegend()}),o.CommandsRegistry.registerCommand("_provideDocumentRangeSemanticTokens",async(c,...e)=>{const[t,i]=e;a.assertType(t instanceof a.URI),a.assertType(a.Range.isIRange(i));const n=c.get(o.IModelService).getModel(t);if(!n)return;const{documentRangeSemanticTokensProvider:s}=c.get(o.ILanguageFeaturesService),r=await Cp(s,n,a.Range.lift(i),a.CancellationToken.None);if(!(!r||!r.tokens))return Db({id:0,type:"full",data:r.tokens.data})});const Sp="editor.semanticHighlighting";function ic(c,e,t){const i=t.getValue(Sp,{overrideIdentifier:c.getLanguageId(),resource:c.uri})?.enabled;return typeof i=="boolean"?i:e.getColorTheme().semanticHighlighting}var Pb=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},gt=function(c,e){return function(t,i){e(t,i,c)}},ri;let yp=class extends a.Disposable{constructor(e,t,i,n,s,r){super(),this._watchers=new a.ResourceMap,this._providerChangeListeners=this._register(new a.DisposableStore);const l=r.documentSemanticTokensProvider,d=p=>{this._watchers.get(p.uri)?.dispose(),this._watchers.set(p.uri,new wp(p,e,i,s,r))},h=(p,f)=>{f.dispose(),this._watchers.delete(p.uri)},u=()=>{for(const p of t.getModels()){const f=this._watchers.get(p.uri);ic(p,i,n)?f||d(p):f&&h(p,f)}},g=()=>{this._providerChangeListeners.clear();for(const p of l.allNoModel())typeof p.onDidChange=="function"&&this._providerChangeListeners.add(p.onDidChange(()=>{for(const f of this._watchers.values())f.handleProviderDidChange(p)}))};t.getModels().forEach(p=>{ic(p,i,n)&&d(p)}),this._register(t.onModelAdded(p=>{ic(p,i,n)&&d(p)})),this._register(t.onModelRemoved(p=>{const f=this._watchers.get(p.uri);f&&h(p,f)})),this._register(n.onDidChangeConfiguration(p=>{p.affectsConfiguration(Sp)&&u()})),this._register(i.onDidColorThemeChange(u)),g(),this._register(l.onDidChange(()=>{g();for(const p of this._watchers.values())p.handleRegistryChange()}))}dispose(){a.dispose(this._watchers.values()),this._watchers.clear(),super.dispose()}};yp=Pb([gt(0,o.ISemanticTokensStylingService),gt(1,o.IModelService),gt(2,o.IThemeService),gt(3,o.IConfigurationService),gt(4,o.ILanguageFeatureDebounceService),gt(5,o.ILanguageFeaturesService)],yp);let wp=(Mi=class extends a.Disposable{constructor(e,t,i,n,s){super(),this._semanticTokensStylingService=t,this._relevantProviders=new Set,this._isDisposed=!1,this._model=e,this._provider=s.documentSemanticTokensProvider,this._debounceInformation=n.for(this._provider,"DocumentSemanticTokens",{min:ri.REQUEST_MIN_DELAY,max:ri.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new a.RunOnceScheduler(()=>this._fetchDocumentSemanticTokensNow(),ri.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._providersChangedDuringRequest=!1,this._updateRelevantProviders(),this._register(this._model.onDidChangeContent(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeAttached(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeLanguage(()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._updateRelevantProviders(),this._fetchDocumentSemanticTokens.schedule(0)})),this._register(i.onDidColorThemeChange(r=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._fetchDocumentSemanticTokens.schedule(0)}handleRegistryChange(){this._updateRelevantProviders(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))}handleProviderDidChange(e){if(this._relevantProviders.has(e)){if(this._currentDocumentRequestCancellationTokenSource){this._providersChangedDuringRequest=!0;return}this._fetchDocumentSemanticTokens.schedule(0)}}_updateRelevantProviders(){this._relevantProviders=new Set(this._provider.all(this._model))}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!Tb(this._provider,this._model)){this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1);return}if(!this._model.isAttachedToEditor())return;const e=new a.CancellationTokenSource,t=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,i=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,n=Nb(this._provider,this._model,t,i,e.token);this._currentDocumentRequestCancellationTokenSource=e,this._providersChangedDuringRequest=!1;const s=[],r=this._model.onDidChangeContent(d=>{s.push(d)}),l=new a.StopWatch(!1);n.then(d=>{if(this._debounceInformation.update(this._model,l.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,r.dispose(),!d)this._setDocumentSemanticTokens(null,null,null,s);else{const{provider:h,tokens:u}=d,g=this._semanticTokensStylingService.getStyling(h);this._setDocumentSemanticTokens(h,u||null,g,s)}},d=>{d&&(a.isCancellationError(d)||typeof d.message=="string"&&d.message.indexOf("busy")!==-1)||a.onUnexpectedError(d),this._currentDocumentRequestCancellationTokenSource=null,r.dispose(),(s.length>0||this._providersChangedDuringRequest)&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))})}static _copy(e,t,i,n,s){s=Math.min(s,i.length-n,e.length-t);for(let r=0;r{(n.length>0||this._providersChangedDuringRequest)&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed){e&&t&&e.releaseDocumentSemanticTokens(t.resultId);return}if(!e||!i){this._model.tokenization.setSemanticTokens(null,!1);return}if(!t){this._model.tokenization.setSemanticTokens(null,!0),r();return}if(Rb(t)){if(!s){this._model.tokenization.setSemanticTokens(null,!0);return}if(t.edits.length===0)t={resultId:t.resultId,data:s.data};else{let l=0;for(const p of t.edits)l+=(p.data?p.data.length:0)-p.deleteCount;const d=s.data,h=new Uint32Array(d.length+l);let u=d.length,g=h.length;for(let p=t.edits.length-1;p>=0;p--){const f=t.edits[p];if(f.start>d.length){i.warnInvalidEditStart(s.resultId,t.resultId,p,f.start,d.length),this._model.tokenization.setSemanticTokens(null,!0);return}const m=u-(f.start+f.deleteCount);m>0&&(ri._copy(d,u-m,h,g-m,m),g-=m),f.data&&(ri._copy(f.data,0,h,g-f.data.length,f.data.length),g-=f.data.length),u=f.start}u>0&&ri._copy(d,0,h,0,u),t={resultId:t.resultId,data:h}}}if(tc(t)){this._currentDocumentResponse=new V0(e,t.resultId,t.data);const l=o.toMultilineTokens2(t,i,this._model.getLanguageId());if(n.length>0)for(const d of n)for(const h of l)for(const u of d.changes)h.applyEdit(u.range,u.text);this._model.tokenization.setSemanticTokens(l,!0)}else this._model.tokenization.setSemanticTokens(null,!0);r()}},ri=Mi,Mi.REQUEST_MIN_DELAY=300,Mi.REQUEST_MAX_DELAY=2e3,Mi);wp=ri=Pb([gt(1,o.ISemanticTokensStylingService),gt(2,o.IThemeService),gt(3,o.ILanguageFeatureDebounceService),gt(4,o.ILanguageFeaturesService)],wp);class V0{constructor(e,t,i){this.provider=e,this.resultId=t,this.data=i}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}o.registerEditorFeature(yp);var B0=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Rr=function(c,e){return function(t,i){e(t,i,c)}};let nc=(ro=class extends a.Disposable{constructor(e,t,i,n,s,r){super(),this._semanticTokensStylingService=t,this._themeService=i,this._configurationService=n,this._editor=e,this._provider=r.documentRangeSemanticTokensProvider,this._debounceInformation=s.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new a.RunOnceScheduler(()=>this._tokenizeViewportNow(),100)),this._outstandingRequests=[],this._rangeProvidersChangeListeners=[];const l=()=>{this._editor.hasModel()&&this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()))},d=()=>{if(this._cleanupProviderListeners(),this._editor.hasModel()){const h=this._editor.getModel();for(const u of this._provider.all(h)){const g=u.onDidChange?.(()=>{this._cancelAll(),l()});g&&this._rangeProvidersChangeListeners.push(g)}}};this._register(this._editor.onDidScrollChange(()=>{l()})),this._register(this._editor.onDidChangeModel(()=>{d(),this._cancelAll(),l()})),this._register(this._editor.onDidChangeModelLanguage(()=>{d(),this._cancelAll(),l()})),this._register(this._editor.onDidChangeModelContent(h=>{this._cancelAll(),l()})),d(),this._register(this._provider.onDidChange(()=>{d(),this._cancelAll(),l()})),this._register(this._configurationService.onDidChangeConfiguration(h=>{h.affectsConfiguration(Sp)&&(this._cancelAll(),l())})),this._register(this._themeService.onDidColorThemeChange(()=>{this._cancelAll(),l()})),l()}dispose(){this._cleanupProviderListeners(),super.dispose()}_cleanupProviderListeners(){a.dispose(this._rangeProvidersChangeListeners),this._rangeProvidersChangeListeners=[]}_cancelAll(){for(const e of this._outstandingRequests)e.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(e){for(let t=0,i=this._outstandingRequests.length;tthis._requestRange(e,i)))}_requestRange(e,t){const i=e.getVersionId(),n=a.createCancelablePromise(r=>Promise.resolve(Cp(this._provider,e,t,r))),s=new a.StopWatch(!1);return n.then(r=>{if(this._debounceInformation.update(e,s.elapsed()),!r||!r.tokens||e.isDisposed()||e.getVersionId()!==i)return;const{provider:l,tokens:d}=r,h=this._semanticTokensStylingService.getStyling(l);e.tokenization.setPartialSemanticTokens(t,o.toMultilineTokens2(d,h,e.getLanguageId()))}).then(()=>this._removeOutstandingRequest(n),()=>this._removeOutstandingRequest(n)),n}},ro.ID="editor.contrib.viewportSemanticTokens",ro);nc=B0([Rr(1,o.ISemanticTokensStylingService),Rr(2,o.IThemeService),Rr(3,o.IConfigurationService),Rr(4,o.ILanguageFeatureDebounceService),Rr(5,o.ILanguageFeaturesService)],nc),o.registerEditorContribution(nc.ID,nc,1);class K0{constructor(e=!0){this.selectSubwords=e}provideSelectionRanges(e,t){const i=[];for(const n of t){const s=[];i.push(s),this.selectSubwords&&this._addInWordRanges(s,e,n),this._addWordRanges(s,e,n),this._addWhitespaceLine(s,e,n),s.push({range:e.getFullModelRange()})}return i}_addInWordRanges(e,t,i){const n=t.getWordAtPosition(i);if(!n)return;const{word:s,startColumn:r}=n,l=i.column-r;let d=l,h=l,u=0;for(;d>=0;d--){const g=s.charCodeAt(d);if(d!==l&&(g===95||g===45))break;if(a.isLowerAsciiLetter(g)&&a.isUpperAsciiLetter(u))break;u=g}for(d+=1;h0&&t.getLineFirstNonWhitespaceColumn(i.lineNumber)===0&&t.getLineLastNonWhitespaceColumn(i.lineNumber)===0&&e.push({range:new a.Range(i.lineNumber,1,i.lineNumber,t.getLineMaxColumn(i.lineNumber))})}}var U0=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},k0=function(c,e){return function(t,i){e(t,i,c)}},Ip;class xp{constructor(e,t){this.index=e,this.ranges=t}mov(e){const t=this.index+(e?1:-1);if(t<0||t>=this.ranges.length)return this;const i=new xp(t,this.ranges);return i.ranges[t].equalsRange(this.ranges[this.index])?i.mov(e):i}}let Tr=(Qn=class{static get(e){return e.getContribution(Ip.ID)}constructor(e,t){this._editor=e,this._languageFeaturesService=t,this._ignoreSelection=!1}dispose(){this._selectionListener?.dispose()}async run(e){if(!this._editor.hasModel())return;const t=this._editor.getSelections(),i=this._editor.getModel();if(this._state||await Ab(this._languageFeaturesService.selectionRangeProvider,i,t.map(s=>s.getPosition()),this._editor.getOption(129),a.CancellationToken.None).then(s=>{if(!(!a.isNonEmptyArray(s)||s.length!==t.length)&&!(!this._editor.hasModel()||!a.equals(this._editor.getSelections(),t,(r,l)=>r.equalsSelection(l)))){for(let r=0;rl.containsPosition(t[r].getStartPosition())&&l.containsPosition(t[r].getEndPosition())),s[r].unshift(t[r]);this._state=s.map(r=>new xp(0,r)),this._selectionListener?.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition(()=>{this._ignoreSelection||(this._selectionListener?.dispose(),this._state=void 0)})}}),!this._state)return;this._state=this._state.map(s=>s.mov(e));const n=this._state.map(s=>a.Selection.fromPositions(s.ranges[s.index].getStartPosition(),s.ranges[s.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(n)}finally{this._ignoreSelection=!1}}},Ip=Qn,Qn.ID="editor.contrib.smartSelectController",Qn);Tr=Ip=U0([k0(1,o.ILanguageFeaturesService)],Tr);class Ob extends o.EditorAction{constructor(e,t){super(t),this._forward=e}async run(e,t){const i=Tr.get(t);i&&await i.run(this._forward)}}class j0 extends Ob{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:a.localize2(1449,"Expand Selection"),precondition:void 0,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:1553,mac:{primary:3345,secondary:[1297]},weight:100},menuOpts:{menuId:o.MenuId.MenubarSelectionMenu,group:"1_basic",title:a.localize(1447,"&&Expand Selection"),order:2}})}}o.CommandsRegistry.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");class $0 extends Ob{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:a.localize2(1450,"Shrink Selection"),precondition:void 0,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:1551,mac:{primary:3343,secondary:[1295]},weight:100},menuOpts:{menuId:o.MenuId.MenubarSelectionMenu,group:"1_basic",title:a.localize(1448,"&&Shrink Selection"),order:3}})}}o.registerEditorContribution(Tr.ID,Tr,4),o.registerEditorAction(j0),o.registerEditorAction($0);async function Ab(c,e,t,i,n){const s=c.all(e).concat(new K0(i.selectSubwords));s.length===1&&s.unshift(new wl);const r=[],l=[];for(const d of s)r.push(Promise.resolve(d.provideSelectionRanges(e,t,n)).then(h=>{if(a.isNonEmptyArray(h)&&h.length===t.length)for(let u=0;u{if(d.length===0)return[];d.sort((p,f)=>a.Position.isBefore(p.getStartPosition(),f.getStartPosition())?1:a.Position.isBefore(f.getStartPosition(),p.getStartPosition())||a.Position.isBefore(p.getEndPosition(),f.getEndPosition())?-1:a.Position.isBefore(f.getEndPosition(),p.getEndPosition())?1:0);const h=[];let u;for(const p of d)(!u||a.Range.containsRange(p,u)&&!a.Range.equalsRange(p,u))&&(h.push(p),u=p);if(!i.selectLeadingAndTrailingWhitespace)return h;const g=[h[0]];for(let p=1;pa.Position.isIPosition(r)));const n=c.get(o.ILanguageFeaturesService).selectionRangeProvider,s=await c.get(o.ITextModelService).createModelReference(t);try{return Ab(n,s.object.textEditorModel,i.map(a.Position.lift),{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},a.CancellationToken.None)}finally{s.dispose()}});const Ep=Object.freeze({View:a.localize2(1692,"View"),Help:a.localize2(1693,"Help"),Test:a.localize2(1694,"Test"),File:a.localize2(1695,"File"),Preferences:a.localize2(1696,"Preferences"),Developer:a.localize2(1697,"Developer")});class q0 extends o.EditorAction2{constructor(){super({id:"editor.action.toggleStickyScroll",title:{...a.localize2(1498,"Toggle Editor Sticky Scroll"),mnemonicTitle:a.localize(1494,"&&Toggle Editor Sticky Scroll")},metadata:{description:a.localize2(1499,"Toggle/enable the editor sticky scroll which shows the nested scopes at the top of the viewport")},category:Ep.View,toggled:{condition:o.ContextKeyExpr.equals("config.editor.stickyScroll.enabled",!0),title:a.localize(1495,"Sticky Scroll"),mnemonicTitle:a.localize(1496,"&&Sticky Scroll")},menu:[{id:o.MenuId.CommandPalette},{id:o.MenuId.MenubarAppearanceMenu,group:"4_editor",order:3},{id:o.MenuId.StickyScrollContext}]})}async runEditorCommand(e,t){const i=e.get(o.IConfigurationService),n=!i.getValue("editor.stickyScroll.enabled"),s=ze.get(t)?.isFocused();i.updateValue("editor.stickyScroll.enabled",n),s&&t.focus()}}const sc=100;class G0 extends o.EditorAction2{constructor(){super({id:"editor.action.focusStickyScroll",title:{...a.localize2(1500,"Focus Editor Sticky Scroll"),mnemonicTitle:a.localize(1497,"&&Focus Editor Sticky Scroll")},precondition:o.ContextKeyExpr.and(o.ContextKeyExpr.has("config.editor.stickyScroll.enabled"),o.EditorContextKeys.stickyScrollVisible),menu:[{id:o.MenuId.CommandPalette}]})}runEditorCommand(e,t){ze.get(t)?.focus()}}class Z0 extends o.EditorAction2{constructor(){super({id:"editor.action.selectNextStickyScrollLine",title:a.localize2(1501,"Select the next editor sticky scroll line"),precondition:o.EditorContextKeys.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:sc,primary:18}})}runEditorCommand(e,t){ze.get(t)?.focusNext()}}class X0 extends o.EditorAction2{constructor(){super({id:"editor.action.selectPreviousStickyScrollLine",title:a.localize2(1502,"Select the previous sticky scroll line"),precondition:o.EditorContextKeys.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:sc,primary:16}})}runEditorCommand(e,t){ze.get(t)?.focusPrevious()}}class Y0 extends o.EditorAction2{constructor(){super({id:"editor.action.goToFocusedStickyScrollLine",title:a.localize2(1503,"Go to the focused sticky scroll line"),precondition:o.EditorContextKeys.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:sc,primary:3}})}runEditorCommand(e,t){ze.get(t)?.goToFocused()}}class Q0 extends o.EditorAction2{constructor(){super({id:"editor.action.selectEditor",title:a.localize2(1504,"Select Editor"),precondition:o.EditorContextKeys.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:sc,primary:9}})}runEditorCommand(e,t){ze.get(t)?.selectEditor()}}o.registerEditorContribution(ze.ID,ze,1),o.registerAction2(q0),o.registerAction2(G0),o.registerAction2(X0),o.registerAction2(Z0),o.registerAction2(Y0),o.registerAction2(Q0);var Fb=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Nr=function(c,e){return function(t,i){e(t,i,c)}};class J0{constructor(e,t,i,n,s,r,l){this.range=e,this.insertText=t,this.filterText=i,this.additionalTextEdits=n,this.command=s,this.gutterMenuLinkAction=r,this.completion=l,this.doNotLog=!0}}let Lp=class extends a.RefCountedDisposable{constructor(e,t,i,n,s,r){super(s.disposable),this.model=e,this.line=t,this.word=i,this.completionModel=n,this._suggestMemoryService=r}canBeReused(e,t,i){return this.model===e&&this.line===t&&this.word.word.length>0&&this.word.startColumn===i.startColumn&&this.word.endColumn=0&&l.resolve(a.CancellationToken.None)}return e}};Lp=Fb([Nr(5,Sl)],Lp);let Dp=class extends a.Disposable{constructor(e,t,i,n){super(),this._languageFeatureService=e,this._clipboardService=t,this._suggestMemoryService=i,this._editorService=n,this._store.add(e.inlineCompletionsProvider.register("*",this))}async provideInlineCompletions(e,t,i,n){if(i.selectedSuggestionInfo)return;let s;for(const f of this._editorService.listCodeEditors())if(f.getModel()===e){s=f;break}if(!s)return;const r=s.getOption(102);if(Es.isAllOff(r))return;e.tokenization.tokenizeIfCheap(t.lineNumber);const l=e.tokenization.getLineTokens(t.lineNumber),d=l.getStandardTokenType(l.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if(Es.valueFor(r,d)!=="inline")return;let h=e.getWordAtPosition(t),u;if(h?.word||(u=this._getTriggerCharacterInfo(e,t)),!h?.word&&!u||(h||(h=e.getWordUntilPosition(t)),h.endColumn!==t.column))return;let g;const p=e.getValueInRange(new a.Range(t.lineNumber,1,t.lineNumber,t.column));if(!u&&this._lastResult?.canBeReused(e,t.lineNumber,h)){const f=new Rv(p,t.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=f,this._lastResult.acquire(),g=this._lastResult}else{const f=await bu(this._languageFeatureService.completionProvider,e,t,new Ko(void 0,xl.createSuggestFilter(s).itemKind,u?.providers),u&&{triggerKind:1,triggerCharacter:u.ch},n);let m;f.needsClipboard&&(m=await this._clipboardService.readText());const _=new Wt(f.items,t.column,new Rv(p,0),Il.None,s.getOption(134),s.getOption(128),{boostFullMatch:!1,firstMatchCanBeWeak:!1},m);g=new Lp(e,t.lineNumber,h,_,f,this._suggestMemoryService)}return this._lastResult=g,g}handleItemDidShow(e,t){t.completion.resolve(a.CancellationToken.None)}disposeInlineCompletions(e){e.release()}_getTriggerCharacterInfo(e,t){const i=e.getValueInRange(a.Range.fromPositions({lineNumber:t.lineNumber,column:t.column-1},t)),n=new Set;for(const s of this._languageFeatureService.completionProvider.all(e))s.triggerCharacters?.includes(i)&&n.add(s);if(n.size!==0)return{providers:n,ch:i}}};Dp=Fb([Nr(0,o.ILanguageFeaturesService),Nr(1,o.IClipboardService),Nr(2,Sl),Nr(3,o.ICodeEditorService)],Dp),o.registerEditorFeature(Dp);class W0 extends o.EditorAction{constructor(){super({id:"editor.action.forceRetokenize",label:a.localize2(1584,"Developer: Force Retokenize"),precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getModel();i.tokenization.resetTokenization();const n=new a.StopWatch;i.tokenization.forceTokenization(i.getLineCount()),n.stop(),console.log(`tokenization took ${n.elapsed()}`)}}o.registerEditorAction(W0);const ed=class ed extends o.Action2{constructor(){super({id:ed.ID,title:a.localize2(1582,"Toggle Tab Key Moves Focus"),precondition:void 0,keybinding:{primary:2091,mac:{primary:1323},weight:100},metadata:{description:a.localize2(1583,"Determines whether the tab key moves focus around the workbench or inserts the tab character in the current editor. This is also called tab trapping, tab navigation, or tab focus mode.")},f1:!0})}run(){const t=!o.TabFocus.getTabFocusMode();o.TabFocus.setTabFocusMode(t),t?o.alert(a.localize(1580,"Pressing Tab will now move focus to the next focusable element")):o.alert(a.localize(1581,"Pressing Tab will now insert the tab character"))}};ed.ID="editor.action.toggleTabFocusMode";let Rp=ed;o.registerAction2(Rp);var H0=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},zb=function(c,e){return function(t,i){e(t,i,c)}};let Tp=class extends a.Disposable{get enabled(){return this._enabled}set enabled(e){e?(this.el.setAttribute("aria-disabled","false"),this.el.tabIndex=0,this.el.style.pointerEvents="auto",this.el.style.opacity="1",this.el.style.cursor="pointer",this._enabled=!1):(this.el.setAttribute("aria-disabled","true"),this.el.tabIndex=-1,this.el.style.pointerEvents="none",this.el.style.opacity="0.4",this.el.style.cursor="default",this._enabled=!0),this._enabled=e}constructor(e,t,i={},n,s){super(),this._link=t,this._hoverService=n,this._enabled=!0,this.el=o.append(e,o.$("a.monaco-link",{tabIndex:t.tabIndex??0,href:t.href},t.label)),this.hoverDelegate=i.hoverDelegate??o.getDefaultHoverDelegate("mouse"),this.setTooltip(t.title),this.el.setAttribute("role","button");const r=this._register(new o.DomEmitter(this.el,"click")),l=this._register(new o.DomEmitter(this.el,"keydown")),d=a.Event.chain(l.event,g=>g.map(p=>new o.StandardKeyboardEvent(p)).filter(p=>p.keyCode===3||p.keyCode===10)),h=this._register(new o.DomEmitter(this.el,o.EventType$1.Tap)).event;this._register(o.Gesture.addTarget(this.el));const u=a.Event.any(r.event,d,h);this._register(u(g=>{this.enabled&&(o.EventHelper.stop(g,!0),i?.opener?i.opener(this._link.href):s.open(this._link.href,{allowCommands:!0}))})),this.enabled=!0}setTooltip(e){!this.hover&&e?this.hover=this._register(this._hoverService.setupManagedHover(this.hoverDelegate,this.el,e)):this.hover&&this.hover.update(e)}};Tp=H0([zb(3,o.IHoverService),zb(4,o.IOpenerService)],Tp);var Vb=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Np=function(c,e){return function(t,i){e(t,i,c)}};const e1=26;let Mp=class extends a.Disposable{constructor(e,t){super(),this._editor=e,this.instantiationService=t,this.banner=this._register(this.instantiationService.createInstance(Pp))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(e){this.banner.show({...e,onClose:()=>{this.hide(),e.onClose?.()}}),this._editor.setBanner(this.banner.element,e1)}};Mp=Vb([Np(1,o.IInstantiationService)],Mp);let Pp=class extends a.Disposable{constructor(e,t){super(),this.instantiationService=e,this.markdownRendererService=t,this.element=o.$("div.editor-banner"),this.element.tabIndex=0}getAriaLabel(e){if(e.ariaLabel)return e.ariaLabel;if(typeof e.message=="string")return e.message}getBannerMessage(e){if(typeof e=="string"){const t=o.$("span");return t.innerText=e,t}return this.markdownRendererService.render(e).element}clear(){o.clearNode(this.element)}show(e){o.clearNode(this.element);const t=this.getAriaLabel(e);t&&this.element.setAttribute("aria-label",t);const i=o.append(this.element,o.$("div.icon-container"));i.setAttribute("aria-hidden","true"),e.icon&&i.appendChild(o.$(`div${o.ThemeIcon.asCSSSelector(e.icon)}`));const n=o.append(this.element,o.$("div.message-container"));if(n.setAttribute("aria-hidden","true"),n.appendChild(this.getBannerMessage(e.message)),this.messageActionsContainer=o.append(this.element,o.$("div.message-actions-container")),e.actions)for(const r of e.actions)this._register(this.instantiationService.createInstance(Tp,this.messageActionsContainer,{...r,tabIndex:-1},{}));const s=o.append(this.element,o.$("div.action-container"));this.actionBar=this._register(new o.ActionBar(s)),this.actionBar.push(this._register(new o.Action("banner.close",a.localize(1585,"Close Banner"),o.ThemeIcon.asClassName(o.widgetClose),!0,()=>{typeof e.onClose=="function"&&e.onClose()})),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};Pp=Vb([Np(0,o.IInstantiationService),Np(1,o.IMarkdownRendererService)],Pp);var Op=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Mr=function(c,e){return function(t,i){e(t,i,c)}};const t1=o.registerIcon("extensions-warning-message",a.Codicon.warning,a.localize(1586,"Icon shown with a warning message in the extensions editor."));let Pr=(ao=class extends a.Disposable{constructor(e,t,i,n){super(),this._editor=e,this._editorWorkerService=t,this._workspaceTrustService=i,this._highlighter=null,this._bannerClosed=!1,this._updateState=s=>{if(s&&s.hasMore){if(this._bannerClosed)return;const r=Math.max(s.ambiguousCharacterCount,s.nonBasicAsciiCharacterCount,s.invisibleCharacterCount);let l;if(s.nonBasicAsciiCharacterCount>=r)l={message:a.localize(1587,"This document contains many non-basic ASCII unicode characters"),command:new Ar};else if(s.ambiguousCharacterCount>=r)l={message:a.localize(1588,"This document contains many ambiguous unicode characters"),command:new hn};else if(s.invisibleCharacterCount>=r)l={message:a.localize(1589,"This document contains many invisible unicode characters"),command:new Or};else throw new Error("Unreachable");this._bannerController.show({id:"unicodeHighlightBanner",message:l.message,icon:t1,actions:[{label:l.command.shortLabel,href:`command:${l.command.desc.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(n.createInstance(Mp,e)),this._register(this._editor.onDidChangeModel(()=>{this._bannerClosed=!1,this._updateHighlighter()})),this._options=e.getOption(142),this._register(i.onDidChangeTrust(s=>{this._updateHighlighter()})),this._register(e.onDidChangeConfiguration(s=>{s.hasChanged(142)&&(this._options=e.getOption(142),this._updateHighlighter())})),this._updateHighlighter()}dispose(){this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),super.dispose()}_updateHighlighter(){if(this._updateState(null),this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),!this._editor.hasModel())return;const e=i1(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([e.nonBasicASCII,e.ambiguousCharacters,e.invisibleCharacters].every(i=>i===!1))return;const t={nonBasicASCII:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments,includeStrings:e.includeStrings,allowedCodePoints:Object.keys(e.allowedCharacters).map(i=>i.codePointAt(0)),allowedLocales:Object.keys(e.allowedLocales).map(i=>i==="_os"?a.safeIntl.NumberFormat().value.resolvedOptions().locale:i==="_vscode"?a.language:i)};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new Ap(this._editor,t,this._updateState,this._editorWorkerService):this._highlighter=new n1(this._editor,t,this._updateState)}getDecorationInfo(e){return this._highlighter?this._highlighter.getDecorationInfo(e):null}},ao.ID="editor.contrib.unicodeHighlighter",ao);Pr=Op([Mr(1,o.IEditorWorkerService),Mr(2,o.IWorkspaceTrustManagementService),Mr(3,o.IInstantiationService)],Pr);function i1(c,e){return{nonBasicASCII:e.nonBasicASCII===o.inUntrustedWorkspace?!c:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments===o.inUntrustedWorkspace?!c:e.includeComments,includeStrings:e.includeStrings===o.inUntrustedWorkspace?!c:e.includeStrings,allowedCharacters:e.allowedCharacters,allowedLocales:e.allowedLocales}}let Ap=class extends a.Disposable{constructor(e,t,i,n){super(),this._editor=e,this._options=t,this._updateState=i,this._editorWorkerService=n,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new a.RunOnceScheduler(()=>this._update(),250)),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}const e=this._model.getVersionId();this._editorWorkerService.computedUnicodeHighlights(this._model.uri,this._options).then(t=>{if(this._model.isDisposed()||this._model.getVersionId()!==e)return;this._updateState(t);const i=[];if(!t.hasMore)for(const n of t.ranges)i.push({range:n,options:oc.instance.getDecorationFromOptions(this._options)});this._decorations.set(i)})}getDecorationInfo(e){if(!this._decorations.has(e))return null;const t=this._editor.getModel();if(!o.isModelDecorationVisible(t,e))return null;const i=t.getValueInRange(e.range);return{reason:Kb(i,this._options),inComment:o.isModelDecorationInComment(t,e),inString:o.isModelDecorationInString(t,e)}}};Ap=Op([Mr(3,o.IEditorWorkerService)],Ap);class n1 extends a.Disposable{constructor(e,t,i){super(),this._editor=e,this._options=t,this._updateState=i,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new a.RunOnceScheduler(()=>this._update(),250)),this._register(this._editor.onDidLayoutChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidScrollChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeHiddenAreas(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}const e=this._editor.getVisibleRanges(),t=[],i={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(const n of e){const s=a.UnicodeTextModelHighlighter.computeUnicodeHighlights(this._model,this._options,n);for(const r of s.ranges)i.ranges.push(r);i.ambiguousCharacterCount+=i.ambiguousCharacterCount,i.invisibleCharacterCount+=i.invisibleCharacterCount,i.nonBasicAsciiCharacterCount+=i.nonBasicAsciiCharacterCount,i.hasMore=i.hasMore||s.hasMore}if(!i.hasMore)for(const n of i.ranges)t.push({range:n,options:oc.instance.getDecorationFromOptions(this._options)});this._updateState(i),this._decorations.set(t)}getDecorationInfo(e){if(!this._decorations.has(e))return null;const t=this._editor.getModel(),i=t.getValueInRange(e.range);return o.isModelDecorationVisible(t,e)?{reason:Kb(i,this._options),inComment:o.isModelDecorationInComment(t,e),inString:o.isModelDecorationInString(t,e)}:null}}const Bb=a.localize(1590,"Configure Unicode Highlight Options");let Fp=class{constructor(e,t){this._editor=e,this._markdownRendererService=t,this.hoverOrdinal=5}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];const i=this._editor.getModel(),n=this._editor.getContribution(Pr.ID);if(!n)return[];const s=[],r=new Set;let l=300;for(const d of t){const h=n.getDecorationInfo(d);if(!h)continue;const g=i.getValueInRange(d.range).codePointAt(0),p=Vp(g);let f;switch(h.reason.kind){case 0:{a.isBasicASCII(h.reason.confusableWith)?f=a.localize(1591,"The character {0} could be confused with the ASCII character {1}, which is more common in source code.",p,Vp(h.reason.confusableWith.codePointAt(0))):f=a.localize(1592,"The character {0} could be confused with the character {1}, which is more common in source code.",p,Vp(h.reason.confusableWith.codePointAt(0)));break}case 1:f=a.localize(1593,"The character {0} is invisible.",p);break;case 2:f=a.localize(1594,"The character {0} is not a basic ASCII character.",p);break}if(r.has(f))continue;r.add(f);const m={codePoint:g,reason:h.reason,inComment:h.inComment,inString:h.inString},_=a.localize(1595,"Adjust settings"),v=o.createCommandUri(rc.ID,m),b=new o.MarkdownString("",!0).appendMarkdown(f).appendText(" ").appendLink(v,_,Bb);s.push(new Ae(this,d.range,[b],!1,l++))}return s}renderHoverParts(e,t){return Vy(e,t,this._editor,this._markdownRendererService)}getAccessibleContent(e){return e.contents.map(t=>t.value).join(` +`)}};Fp=Op([Mr(1,o.IMarkdownRendererService)],Fp);function zp(c){return`U+${c.toString(16).padStart(4,"0")}`}function Vp(c){let e=`\`${zp(c)}\``;return a.InvisibleCharacters.isInvisibleCharacter(c)||(e+=` "${`${s1(c)}`}"`),e}function s1(c){return c===96?"`` ` ``":"`"+String.fromCodePoint(c)+"`"}function Kb(c,e){return a.UnicodeTextModelHighlighter.computeUnicodeHighlightReason(c,e)}const td=class td{constructor(){this.map=new Map}getDecorationFromOptions(e){return this.getDecoration(!e.includeComments,!e.includeStrings)}getDecoration(e,t){const i=`${e}${t}`;let n=this.map.get(i);return n||(n=o.ModelDecorationOptions.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:e,hideInStringTokens:t}),this.map.set(i,n)),n}};td.instance=new td;let oc=td;class o1 extends o.EditorAction{constructor(){super({id:hn.ID,label:a.localize2(1604,"Disable highlighting of characters in comments"),precondition:void 0}),this.shortLabel=a.localize(1596,"Disable Highlight In Comments")}async run(e,t){const i=e.get(o.IConfigurationService);i&&this.runAction(i)}async runAction(e){await e.updateValue(o.unicodeHighlightConfigKeys.includeComments,!1,2)}}class r1 extends o.EditorAction{constructor(){super({id:hn.ID,label:a.localize2(1605,"Disable highlighting of characters in strings"),precondition:void 0}),this.shortLabel=a.localize(1597,"Disable Highlight In Strings")}async run(e,t){const i=e.get(o.IConfigurationService);i&&this.runAction(i)}async runAction(e){await e.updateValue(o.unicodeHighlightConfigKeys.includeStrings,!1,2)}}const id=class id extends o.Action2{constructor(){super({id:id.ID,title:a.localize2(1606,"Disable highlighting of ambiguous characters"),precondition:void 0,f1:!1}),this.shortLabel=a.localize(1598,"Disable Ambiguous Highlight")}async run(e,t){const i=e.get(o.IConfigurationService);i&&this.runAction(i)}async runAction(e){await e.updateValue(o.unicodeHighlightConfigKeys.ambiguousCharacters,!1,2)}};id.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters";let hn=id;const nd=class nd extends o.Action2{constructor(){super({id:nd.ID,title:a.localize2(1607,"Disable highlighting of invisible characters"),precondition:void 0,f1:!1}),this.shortLabel=a.localize(1599,"Disable Invisible Highlight")}async run(e,t){const i=e.get(o.IConfigurationService);i&&this.runAction(i)}async runAction(e){await e.updateValue(o.unicodeHighlightConfigKeys.invisibleCharacters,!1,2)}};nd.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters";let Or=nd;const sd=class sd extends o.Action2{constructor(){super({id:sd.ID,title:a.localize2(1608,"Disable highlighting of non basic ASCII characters"),precondition:void 0,f1:!1}),this.shortLabel=a.localize(1600,"Disable Non ASCII Highlight")}async run(e,t){const i=e.get(o.IConfigurationService);i&&this.runAction(i)}async runAction(e){await e.updateValue(o.unicodeHighlightConfigKeys.nonBasicASCII,!1,2)}};sd.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters";let Ar=sd;const od=class od extends o.Action2{constructor(){super({id:od.ID,title:a.localize2(1609,"Show Exclude Options"),precondition:void 0,f1:!1})}async run(e,t){const{codePoint:i,reason:n,inString:s,inComment:r}=t,l=String.fromCodePoint(i),d=e.get(o.IQuickInputService),h=e.get(o.IConfigurationService);function u(m){return a.InvisibleCharacters.isInvisibleCharacter(m)?a.localize(1601,"Exclude {0} (invisible character) from being highlighted",zp(m)):a.localize(1602,"Exclude {0} from being highlighted",`${zp(m)} "${l}"`)}const g=[];if(n.kind===0)for(const m of n.notAmbiguousInLocales)g.push({label:a.localize(1603,'Allow unicode characters that are more common in the language "{0}".',m),run:async()=>{l1(h,[m])}});if(g.push({label:u(i),run:()=>a1(h,[i])}),r){const m=new o1;g.push({label:m.label,run:async()=>m.runAction(h)})}else if(s){const m=new r1;g.push({label:m.label,run:async()=>m.runAction(h)})}function p(m){return typeof m.desc.title=="string"?m.desc.title:m.desc.title.value}if(n.kind===0){const m=new hn;g.push({label:p(m),run:async()=>m.runAction(h)})}else if(n.kind===1){const m=new Or;g.push({label:p(m),run:async()=>m.runAction(h)})}else if(n.kind===2){const m=new Ar;g.push({label:p(m),run:async()=>m.runAction(h)})}else c1(n);const f=await d.pick(g,{title:Bb});f&&await f.run()}};od.ID="editor.action.unicodeHighlight.showExcludeOptions";let rc=od;async function a1(c,e){const t=c.getValue(o.unicodeHighlightConfigKeys.allowedCharacters);let i;typeof t=="object"&&t?i=t:i={};for(const n of e)i[String.fromCodePoint(n)]=!0;await c.updateValue(o.unicodeHighlightConfigKeys.allowedCharacters,i,2)}async function l1(c,e){const t=c.inspect(o.unicodeHighlightConfigKeys.allowedLocales).user?.value;let i;typeof t=="object"&&t?i=Object.assign({},t):i={};for(const n of e)i[n]=!0;await c.updateValue(o.unicodeHighlightConfigKeys.allowedLocales,i,2)}function c1(c){throw new Error(`Unexpected value: ${c}`)}o.registerAction2(hn),o.registerAction2(Or),o.registerAction2(Ar),o.registerAction2(rc),o.registerEditorContribution(Pr.ID,Pr,1),Gi.register(Fp);var d1=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ub=function(c,e){return function(t,i){e(t,i,c)}};const kb="ignoreUnusualLineTerminators";function h1(c,e,t){c.setModelProperty(e.uri,kb,t)}function u1(c,e){return c.getModelProperty(e.uri,kb)}let ac=(lo=class extends a.Disposable{constructor(e,t,i){super(),this._editor=e,this._dialogService=t,this._codeEditorService=i,this._isPresentingDialog=!1,this._config=this._editor.getOption(143),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(143)&&(this._config=this._editor.getOption(143),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(n=>{n.isUndoing||this._checkForUnusualLineTerminators()})),this._checkForUnusualLineTerminators()}async _checkForUnusualLineTerminators(){if(this._config==="off"||!this._editor.hasModel())return;const e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators()||u1(this._codeEditorService,e)===!0||this._editor.getOption(104))return;if(this._config==="auto"){e.removeUnusualLineTerminators(this._editor.getSelections());return}if(this._isPresentingDialog)return;let i;try{this._isPresentingDialog=!0,i=await this._dialogService.confirm({title:a.localize(1610,"Unusual Line Terminators"),message:a.localize(1611,"Detected unusual line terminators"),detail:a.localize(1612,"The file '{0}' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.",o.basename(e.uri)),primaryButton:a.localize(1613,"&&Remove Unusual Line Terminators"),cancelButton:a.localize(1614,"Ignore")})}finally{this._isPresentingDialog=!1}if(!i.confirmed){h1(this._codeEditorService,e,!0);return}e.removeUnusualLineTerminators(this._editor.getSelections())}},lo.ID="editor.contrib.unusualLineTerminatorsDetector",lo);ac=d1([Ub(1,o.IDialogService),Ub(2,o.ICodeEditorService)],ac),o.registerEditorContribution(ac.ID,ac,1);var g1=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},p1=function(c,e){return function(t,i){e(t,i,c)}};class jb{constructor(){this.selector={language:"*"}}provideDocumentHighlights(e,t,i){if(e.isDisposed())return;const n=[],s=e.getWordAtPosition({lineNumber:t.lineNumber,column:t.column});return s?e.findMatches(s.word,!0,!1,!0,a.USUAL_WORD_SEPARATORS,!1).map(l=>({range:l.range,kind:a.DocumentHighlightKind.Text})):Promise.resolve(n)}provideMultiDocumentHighlights(e,t,i,n){if(e.isDisposed())return;const s=new a.ResourceMap,r=e.getWordAtPosition({lineNumber:t.lineNumber,column:t.column});if(!r)return Promise.resolve(s);for(const l of[e,...i]){if(l.isDisposed())continue;const h=l.findMatches(r.word,!0,!1,!0,a.USUAL_WORD_SEPARATORS,!1).map(u=>({range:u.range,kind:a.DocumentHighlightKind.Text}));h&&s.set(l.uri,h)}return s}}let Bp=class extends a.Disposable{constructor(e){super(),this._register(e.documentHighlightProvider.register("*",new jb)),this._register(e.multiDocumentHighlightProvider.register("*",new jb))}};Bp=g1([p1(0,o.ILanguageFeaturesService)],Bp);var $b=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},pt=function(c,e){return function(t,i){e(t,i,c)}},G,Kp;const Up=new o.RawContextKey("hasWordHighlights",!1);function qb(c,e,t,i){const n=c.ordered(e);return a.first(n.map(s=>()=>Promise.resolve(s.provideDocumentHighlights(e,t,i)).then(void 0,a.onUnexpectedExternalError)),s=>s!=null).then(s=>{if(s){const r=new a.ResourceMap;return r.set(e.uri,s),r}return new a.ResourceMap})}function f1(c,e,t,i,n){const s=c.ordered(e);return a.first(s.map(r=>()=>{const l=n.filter(d=>a.shouldSynchronizeModel(d)).filter(d=>o.score(r.selector,d.uri,d.getLanguageId(),!0,void 0,void 0)>0);return Promise.resolve(r.provideMultiDocumentHighlights(e,t,l,i)).then(void 0,a.onUnexpectedExternalError)}),r=>r!=null)}class Gb{constructor(e,t,i){this._model=e,this._selection=t,this._wordSeparators=i,this._wordRange=this._getCurrentWordRange(e,t),this._result=null}get result(){return this._result||(this._result=a.createCancelablePromise(e=>this._compute(this._model,this._selection,this._wordSeparators,e))),this._result}_getCurrentWordRange(e,t){const i=e.getWordAtPosition(t.getPosition());return i?new a.Range(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):null}cancel(){this.result.cancel()}}class m1 extends Gb{constructor(e,t,i,n){super(e,t,i),this._providers=n}_compute(e,t,i,n){return qb(this._providers,e,t.getPosition(),n).then(s=>s||new a.ResourceMap)}}class _1 extends Gb{constructor(e,t,i,n,s){super(e,t,i),this._providers=n,this._otherModels=s}_compute(e,t,i,n){return f1(this._providers,e,t.getPosition(),n,this._otherModels).then(s=>s||new a.ResourceMap)}}function v1(c,e,t,i){return new m1(e,t,i,c)}function b1(c,e,t,i,n){return new _1(e,t,i,c,n)}o.registerModelAndPositionCommand("_executeDocumentHighlights",async(c,e,t)=>{const i=c.get(o.ILanguageFeaturesService);return(await qb(i.documentHighlightProvider,e,t,a.CancellationToken.None))?.get(e.uri)});let kp=(Pi=class{constructor(e,t,i,n,s,r,l,d){this.toUnhook=new a.DisposableStore,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=new a.ResourceMap,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=void 0,this.runDelayer=this.toUnhook.add(new a.Delayer(50)),this.editor=e,this.providers=t,this.multiDocumentProviders=i,this.codeEditorService=r,this.textModelService=s,this.configurationService=l,this.logService=d,this._hasWordHighlights=Up.bindTo(n),this._ignorePositionChangeEvent=!1,this.occurrencesHighlightEnablement=this.editor.getOption(90),this.occurrencesHighlightDelay=this.configurationService.getValue("editor.occurrencesHighlightDelay"),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition(h=>{this._ignorePositionChangeEvent||this.occurrencesHighlightEnablement!=="off"&&this.runDelayer.trigger(()=>{this._onPositionChanged(h)}).catch(a.onUnexpectedError)})),this.toUnhook.add(e.onDidFocusEditorText(h=>{this.occurrencesHighlightEnablement!=="off"&&(this.workerRequest||this.runDelayer.trigger(()=>{this._run()}).catch(a.onUnexpectedError))})),this.toUnhook.add(e.onDidChangeModelContent(h=>{a.matchesScheme(this.model.uri,"output")||this._stopAll()})),this.toUnhook.add(e.onDidChangeModel(h=>{!h.newModelUrl&&h.oldModelUrl?this._stopSingular():G.query&&this._run()})),this.toUnhook.add(e.onDidChangeConfiguration(h=>{const u=this.editor.getOption(90);if(this.occurrencesHighlightEnablement!==u)switch(this.occurrencesHighlightEnablement=u,u){case"off":this._stopAll();break;case"singleFile":this._stopAll(G.query?.modelInfo?.modelURI);break;case"multiFile":G.query&&this._run(!0);break;default:console.warn("Unknown occurrencesHighlight setting value:",u);break}})),this.toUnhook.add(this.configurationService.onDidChangeConfiguration(h=>{if(h.affectsConfiguration("editor.occurrencesHighlightDelay")){const u=l.getValue("editor.occurrencesHighlightDelay");this.occurrencesHighlightDelay!==u&&(this.occurrencesHighlightDelay=u)}})),this.toUnhook.add(e.onDidBlurEditorWidget(()=>{const h=this.codeEditorService.getFocusedCodeEditor();h?h.getModel()?.uri.scheme===a.Schemas.vscodeNotebookCell&&this.editor.getModel()?.uri.scheme!==a.Schemas.vscodeNotebookCell&&this._stopAll():this._stopAll()})),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=void 0,G.query&&this._run()}hasDecorations(){return this.decorations.length>0}restore(e){this.occurrencesHighlightEnablement!=="off"&&(this.runDelayer.cancel(),this.runDelayer.trigger(()=>{this._run(!1,e)}).catch(a.onUnexpectedError))}stop(){this.occurrencesHighlightEnablement!=="off"&&this._stopAll()}_getSortedHighlights(){return this.decorations.getRanges().sort(a.Range.compareRangesUsingStarts)}moveNext(){const e=this._getSortedHighlights(),i=(e.findIndex(s=>s.containsPosition(this.editor.getPosition()))+1)%e.length,n=e[i];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);const s=this._getWord();if(s){const r=this.editor.getModel().getLineContent(n.startLineNumber);o.alert(`${r}, ${i+1} of ${e.length} for '${s.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){const e=this._getSortedHighlights(),i=(e.findIndex(s=>s.containsPosition(this.editor.getPosition()))-1+e.length)%e.length,n=e[i];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);const s=this._getWord();if(s){const r=this.editor.getModel().getLineContent(n.startLineNumber);o.alert(`${r}, ${i+1} of ${e.length} for '${s.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeSingleDecorations(){if(!this.editor.hasModel())return;const e=G.storedDecorationIDs.get(this.editor.getModel().uri);e&&(this.editor.removeDecorations(e),G.storedDecorationIDs.delete(this.editor.getModel().uri),this.decorations.length>0&&(this.decorations.clear(),this._hasWordHighlights.set(!1)))}_removeAllDecorations(e){const t=this.codeEditorService.listCodeEditors(),i=[];for(const n of t){if(!n.hasModel()||o.isEqual(n.getModel().uri,e))continue;const s=G.storedDecorationIDs.get(n.getModel().uri);if(!s)continue;n.removeDecorations(s),i.push(n.getModel().uri);const r=ai.get(n);r?.wordHighlighter&&r.wordHighlighter.decorations.length>0&&(r.wordHighlighter.decorations.clear(),r.wordHighlighter.workerRequest=null,r.wordHighlighter._hasWordHighlights.set(!1))}for(const n of i)G.storedDecorationIDs.delete(n)}_stopSingular(){this._removeSingleDecorations(),this.editor.hasTextFocus()&&(this.editor.getModel()?.uri.scheme!==a.Schemas.vscodeNotebookCell&&G.query?.modelInfo?.modelURI.scheme!==a.Schemas.vscodeNotebookCell?(G.query=null,this._run()):G.query?.modelInfo&&(G.query.modelInfo=null)),this.renderDecorationsTimer!==void 0&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=void 0),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_stopAll(e){this._removeAllDecorations(e),this.renderDecorationsTimer!==void 0&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=void 0),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){if(this.occurrencesHighlightEnablement==="off"){this._stopAll();return}if(e.source!=="api"&&e.reason!==3){this._stopAll();return}this._run()}_getWord(){const e=this.editor.getSelection(),t=e.startLineNumber,i=e.startColumn;return this.model.isDisposed()?null:this.model.getWordAtPosition({lineNumber:t,column:i})}getOtherModelsToHighlight(e){if(!e)return[];if(e.uri.scheme===a.Schemas.vscodeNotebookCell){const s=[],r=this.codeEditorService.listCodeEditors();for(const l of r){const d=l.getModel();d&&d!==e&&d.uri.scheme===a.Schemas.vscodeNotebookCell&&s.push(d)}return s}const i=[],n=this.codeEditorService.listCodeEditors();for(const s of n){if(!o.isDiffEditor(s))continue;const r=s.getModel();r&&e===r.modified&&i.push(r.modified)}if(i.length)return i;if(this.occurrencesHighlightEnablement==="singleFile")return[];for(const s of n){const r=s.getModel();r&&r!==e&&i.push(r)}return i}async _run(e,t){if(this.editor.hasTextFocus()){const n=this.editor.getSelection();if(!n||n.startLineNumber!==n.endLineNumber){G.query=null,this._stopAll();return}const s=n.startColumn,r=n.endColumn,l=this._getWord();if(!l||l.startColumn>s||l.endColumn{n===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=l||[],this._beginRenderDecorations(t??this.occurrencesHighlightDelay))},a.onUnexpectedError)}catch(l){this.logService.error("Unexpected error during occurrence request. Log: ",l)}finally{r.dispose()}}else if(this.model.uri.scheme===a.Schemas.vscodeNotebookCell){const n=++this.workerRequestTokenId;if(this.workerRequestCompleted=!1,!G.query||!G.query.modelInfo)return;const s=await this.textModelService.createModelReference(G.query.modelInfo.modelURI);try{this.workerRequest=this.computeWithModel(s.object.textEditorModel,G.query.modelInfo.selection,[this.model]),this.workerRequest?.result.then(r=>{n===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=r||[],this._beginRenderDecorations(t??this.occurrencesHighlightDelay))},a.onUnexpectedError)}catch(r){this.logService.error("Unexpected error during occurrence request. Log: ",r)}finally{s.dispose()}}}computeWithModel(e,t,i){return i.length?b1(this.multiDocumentProviders,e,t,this.editor.getOption(148),i):v1(this.providers,e,t,this.editor.getOption(148))}_beginRenderDecorations(e){const t=new Date().getTime(),i=this.lastCursorPositionChangeTime+e;t>=i?(this.renderDecorationsTimer=void 0,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},i-t)}renderDecorations(){this.renderDecorationsTimer=void 0;const e=this.codeEditorService.listCodeEditors();for(const t of e){const i=ai.get(t);if(!i)continue;const n=[],s=t.getModel()?.uri;if(s&&this.workerRequestValue.has(s)){const r=G.storedDecorationIDs.get(s),l=this.workerRequestValue.get(s);if(l)for(const h of l)h.range&&n.push({range:h.range,options:HT(h.kind)});let d=[];t.changeDecorations(h=>{d=h.deltaDecorations(r??[],n)}),G.storedDecorationIDs=G.storedDecorationIDs.set(s,d),n.length>0&&(i.wordHighlighter?.decorations.set(n),i.wordHighlighter?._hasWordHighlights.set(!0))}}this.workerRequest=null}dispose(){this._stopSingular(),this.toUnhook.dispose()}},G=Pi,Pi.storedDecorationIDs=new a.ResourceMap,Pi.query=null,Pi);kp=G=$b([pt(4,o.ITextModelService),pt(5,o.ICodeEditorService),pt(6,o.IConfigurationService),pt(7,o.ILogService)],kp);let ai=(Jn=class extends a.Disposable{static get(e){return e.getContribution(Kp.ID)}constructor(e,t,i,n,s,r,l){super(),this._wordHighlighter=null;const d=()=>{e.hasModel()&&!e.getModel().isTooLargeForTokenization()&&e.getModel().uri.scheme!==a.Schemas.accessibleView&&(this._wordHighlighter=new kp(e,i.documentHighlightProvider,i.multiDocumentHighlightProvider,t,s,n,r,l))};this._register(e.onDidChangeModel(h=>{this._wordHighlighter&&(!h.newModelUrl&&h.oldModelUrl?.scheme!==a.Schemas.vscodeNotebookCell&&this.wordHighlighter?.stop(),this._wordHighlighter.dispose(),this._wordHighlighter=null),d()})),d()}get wordHighlighter(){return this._wordHighlighter}saveViewState(){return!!(this._wordHighlighter&&this._wordHighlighter.hasDecorations())}moveNext(){this._wordHighlighter?.moveNext()}moveBack(){this._wordHighlighter?.moveBack()}restoreViewState(e){this._wordHighlighter&&e&&this._wordHighlighter.restore(250)}dispose(){this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),super.dispose()}},Kp=Jn,Jn.ID="editor.contrib.wordHighlighter",Jn);ai=Kp=$b([pt(1,o.IContextKeyService),pt(2,o.ILanguageFeaturesService),pt(3,o.ICodeEditorService),pt(4,o.ITextModelService),pt(5,o.IConfigurationService),pt(6,o.ILogService)],ai);class Zb extends o.EditorAction{constructor(e,t){super(t),this._isNext=e}run(e,t){const i=ai.get(t);i&&(this._isNext?i.moveNext():i.moveBack())}}class C1 extends Zb{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:a.localize2(1624,"Go to Next Symbol Highlight"),precondition:Up,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:65,weight:100}})}}class S1 extends Zb{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:a.localize2(1625,"Go to Previous Symbol Highlight"),precondition:Up,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:1089,weight:100}})}}class y1 extends o.EditorAction{constructor(){super({id:"editor.action.wordHighlight.trigger",label:a.localize2(1626,"Trigger Symbol Highlight"),precondition:void 0,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:0,weight:100}})}run(e,t){const i=ai.get(t);i&&i.restoreViewState(!0)}}o.registerEditorContribution(ai.ID,ai,0),o.registerEditorAction(C1),o.registerEditorAction(S1),o.registerEditorAction(y1),o.registerEditorFeature(Bp);class lc extends o.EditorCommand{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){if(!t.hasModel())return;const n=a.getMapForWordSeparators(t.getOption(148),t.getOption(147)),s=t.getModel(),r=t.getSelections(),l=r.length>1,d=r.map(h=>{const u=new a.Position(h.positionLineNumber,h.positionColumn),g=this._move(n,s,u,this._wordNavigationType,l);return this._moveTo(h,g,this._inSelectionMode)});if(s.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,d.map(h=>o.CursorState.fromModelSelection(h))),d.length===1){const h=new a.Position(d[0].positionLineNumber,d[0].positionColumn);t.revealPosition(h,0)}}_moveTo(e,t,i){return i?new a.Selection(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new a.Selection(t.lineNumber,t.column,t.lineNumber,t.column)}}class li extends lc{_move(e,t,i,n,s){return o.WordOperations.moveWordLeft(e,t,i,n,s)}}class ci extends lc{_move(e,t,i,n,s){return o.WordOperations.moveWordRight(e,t,i,n)}}class w1 extends li{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}class I1 extends li{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}class x1 extends li{constructor(){super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:o.ContextKeyExpr.and(o.EditorContextKeys.textInputFocus,o.ContextKeyExpr.and(o.CONTEXT_ACCESSIBILITY_MODE_ENABLED,o.IsWindowsContext)?.negate()),primary:2063,mac:{primary:527},weight:100}})}}class E1 extends li{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}class L1 extends li{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}class D1 extends li{constructor(){super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:o.ContextKeyExpr.and(o.EditorContextKeys.textInputFocus,o.ContextKeyExpr.and(o.CONTEXT_ACCESSIBILITY_MODE_ENABLED,o.IsWindowsContext)?.negate()),primary:3087,mac:{primary:1551},weight:100}})}}class R1 extends li{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,i,n,s){return super._move(a.getMapForWordSeparators(o.EditorOptions.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n,s)}}class T1 extends li{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,i,n,s){return super._move(a.getMapForWordSeparators(o.EditorOptions.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n,s)}}class N1 extends ci{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}class M1 extends ci{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:o.ContextKeyExpr.and(o.EditorContextKeys.textInputFocus,o.ContextKeyExpr.and(o.CONTEXT_ACCESSIBILITY_MODE_ENABLED,o.IsWindowsContext)?.negate()),primary:2065,mac:{primary:529},weight:100}})}}class P1 extends ci{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}class O1 extends ci{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}class A1 extends ci{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:o.ContextKeyExpr.and(o.EditorContextKeys.textInputFocus,o.ContextKeyExpr.and(o.CONTEXT_ACCESSIBILITY_MODE_ENABLED,o.IsWindowsContext)?.negate()),primary:3089,mac:{primary:1553},weight:100}})}}class F1 extends ci{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}class z1 extends ci{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,i,n,s){return super._move(a.getMapForWordSeparators(o.EditorOptions.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n,s)}}class V1 extends ci{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,i,n,s){return super._move(a.getMapForWordSeparators(o.EditorOptions.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n,s)}}class cc extends o.EditorCommand{constructor(e){super({canTriggerInlineEdits:!0,...e}),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){const n=e?.get(o.ILanguageConfigurationService);if(!t.hasModel()||!n)return;const s=a.getMapForWordSeparators(t.getOption(148),t.getOption(147)),r=t.getModel(),l=t.getSelections(),d=t.getOption(10),h=t.getOption(15),u=n.getLanguageConfiguration(r.getLanguageId()).getAutoClosingPairs(),g=t._getViewModel(),p=l.map(f=>{const m=this._delete({wordSeparators:s,model:r,selection:f,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(13),autoClosingBrackets:d,autoClosingQuotes:h,autoClosingPairs:u,autoClosedCharacters:g.getCursorAutoClosedCharacters()},this._wordNavigationType);return new o.ReplaceCommand(m,"")});t.pushUndoStop(),t.executeCommands(this.id,p),t.pushUndoStop()}}class jp extends cc{_delete(e,t){const i=o.WordOperations.deleteWordLeft(e,t);return i||new a.Range(1,1,1,1)}}class $p extends cc{_delete(e,t){const i=o.WordOperations.deleteWordRight(e,t);if(i)return i;const n=e.model.getLineCount(),s=e.model.getLineMaxColumn(n);return new a.Range(n,s,n,s)}}class B1 extends jp{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:o.EditorContextKeys.writable})}}class K1 extends jp{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:o.EditorContextKeys.writable})}}class U1 extends jp{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:o.EditorContextKeys.writable,kbOpts:{kbExpr:o.EditorContextKeys.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}class k1 extends $p{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:o.EditorContextKeys.writable})}}class j1 extends $p{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:o.EditorContextKeys.writable})}}class $1 extends $p{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:o.EditorContextKeys.writable,kbOpts:{kbExpr:o.EditorContextKeys.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}class q1 extends o.EditorAction{constructor(){super({id:"deleteInsideWord",precondition:o.EditorContextKeys.writable,label:a.localize2(1628,"Delete Word"),metadata:{description:a.localize2(1629,"Delete the word at the cursor"),args:[{name:"args",schema:{type:"object",properties:{onlyWord:{type:"boolean",default:!1,description:a.localize(1627,"Delete only the word and leave surrounding whitespace")}}}}]}})}run(e,t,i){if(!t.hasModel())return;const n=!!(i&&typeof i=="object"&&i.onlyWord),s=a.getMapForWordSeparators(t.getOption(148),t.getOption(147)),r=t.getModel(),d=t.getSelections().map(h=>{const u=o.WordOperations.deleteInsideWord(s,r,h,n);return new o.ReplaceCommand(u,"")});t.pushUndoStop(),t.executeCommands(this.id,d),t.pushUndoStop()}}o.registerEditorCommand(new w1),o.registerEditorCommand(new I1),o.registerEditorCommand(new x1),o.registerEditorCommand(new E1),o.registerEditorCommand(new L1),o.registerEditorCommand(new D1),o.registerEditorCommand(new N1),o.registerEditorCommand(new M1),o.registerEditorCommand(new P1),o.registerEditorCommand(new O1),o.registerEditorCommand(new A1),o.registerEditorCommand(new F1),o.registerEditorCommand(new R1),o.registerEditorCommand(new T1),o.registerEditorCommand(new z1),o.registerEditorCommand(new V1),o.registerEditorCommand(new B1),o.registerEditorCommand(new K1),o.registerEditorCommand(new U1),o.registerEditorCommand(new k1),o.registerEditorCommand(new j1),o.registerEditorCommand(new $1),o.registerEditorAction(q1);class G1 extends cc{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:o.EditorContextKeys.writable,kbOpts:{kbExpr:o.EditorContextKeys.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){const i=o.WordPartOperations.deleteWordPartLeft(e);return i||new a.Range(1,1,1,1)}}class Z1 extends cc{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:o.EditorContextKeys.writable,kbOpts:{kbExpr:o.EditorContextKeys.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){const i=o.WordPartOperations.deleteWordPartRight(e);if(i)return i;const n=e.model.getLineCount(),s=e.model.getLineMaxColumn(n);return new a.Range(n,s,n,s)}}class Xb extends lc{_move(e,t,i,n,s){return o.WordPartOperations.moveWordPartLeft(e,t,i,s)}}class X1 extends Xb{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:o.EditorContextKeys.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}o.CommandsRegistry.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");class Y1 extends Xb{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:o.EditorContextKeys.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}}o.CommandsRegistry.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class Yb extends lc{_move(e,t,i,n,s){return o.WordPartOperations.moveWordPartRight(e,t,i)}}class Q1 extends Yb{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:o.EditorContextKeys.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}class J1 extends Yb{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:o.EditorContextKeys.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}}o.registerEditorCommand(new G1),o.registerEditorCommand(new Z1),o.registerEditorCommand(new X1),o.registerEditorCommand(new Y1),o.registerEditorCommand(new Q1),o.registerEditorCommand(new J1);const ff=class ff extends a.Disposable{constructor(e){super(),this.editor=e,this._register(this.editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit()))}_onDidAttemptReadOnlyEdit(){const e=me.get(this.editor);if(e&&this.editor.hasModel()){let t=this.editor.getOptions().get(105);t||(this.editor.isSimpleWidget?t=new o.MarkdownString(a.localize(1427,"Cannot edit in read-only input")):t=new o.MarkdownString(a.localize(1428,"Cannot edit in read-only editor"))),e.showMessage(t,this.editor.getPosition())}}};ff.ID="editor.contrib.readOnlyMessageController";let dc=ff;o.registerEditorContribution(dc.ID,dc,2);var W1=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Qb=function(c,e){return function(t,i){e(t,i,c)}};let qp=class extends a.Disposable{constructor(e,t,i){super(),this._textModel=e,this._languageFeaturesService=t,this._outlineModelService=i,this._currentModel=o.observableValue(this,void 0);const n=o.observableSignalFromEvent("documentSymbolProvider.onDidChange",this._languageFeaturesService.documentSymbolProvider.onDidChange),s=o.observableSignalFromEvent("_textModel.onDidChangeContent",a.Event.debounce(r=>this._textModel.onDidChangeContent(r),()=>{},100));this._register(o.autorunWithStore(async(r,l)=>{n.read(r),s.read(r);const d=l.add(new o.DisposableCancellationTokenSource),h=await this._outlineModelService.getOrCreate(this._textModel,d.token);l.isDisposed||this._currentModel.set(h,void 0)}))}getBreadcrumbItems(e,t){const i=this._currentModel.read(t);if(!i)return[];const n=i.asListOfDocumentSymbols().filter(s=>e.contains(s.range.startLineNumber)&&!e.contains(s.range.endLineNumber));return n.sort(a.reverseOrder(a.compareBy(s=>s.range.endLineNumber-s.range.startLineNumber,a.numberComparator))),n.map(s=>({name:s.name,kind:s.kind,startLineNumber:s.range.startLineNumber}))}getAt(e,t){const i=this._currentModel.read(t);if(!i)return[];const n=i.asListOfDocumentSymbols().filter(s=>new a.LineRange(s.range.startLineNumber,s.range.endLineNumber).contains(e));return n.length===0?[]:(n.sort(a.reverseOrder(a.compareBy(s=>s.range.endLineNumber-s.range.startLineNumber,a.numberComparator))),n.map(s=>({name:s.name,kind:s.kind,startLineNumber:s.range.startLineNumber})))}};qp=W1([Qb(1,o.ILanguageFeaturesService),Qb(2,Bo)],qp),o.HideUnchangedRegionsFeature.setBreadcrumbsSourceFactory((c,e)=>e.createInstance(qp,c));var Jb=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},qs=function(c,e){return function(t,i){e(t,i,c)}};let hc=(co=class extends a.Disposable{constructor(e,t,i,n){super();const s=this._register(o.observableCodeEditor(e)),r=o.derived(d=>s.model.read(d)?.uri),l=this._register(t.createInstance(Gp,o.MenuId.EditorContent,e.contextKeyService,r));this._register(o.autorun(d=>{l.hasActions.read(d)&&d.store.add(s.createOverlayWidget({allowEditorOverflow:!1,domNode:l.element,minContentWidthInPx:o.constObservable(0),position:o.constObservable({preference:1})}))}))}},co.ID="editor.contrib.floatingToolbar",co);hc=Jb([qs(1,o.IInstantiationService),qs(2,o.IKeybindingService),qs(3,o.IMenuService)],hc);let Gp=class extends a.Disposable{constructor(e,t,i,n,s,r){super();const l=this._register(r.createMenu(e,t)),d=o.observableFromEvent(this,l.onDidChange,()=>l.getActions()),h=o.derived(u=>{const g=d.read(u),{primary:p}=o.getActionBarActions(g,()=>!0);return p.filter(f=>f.id!==o.Separator.ID)});this.hasActions=o.derived(u=>h.read(u).length>0),this.element=o.h("div.floating-menu-overlay-widget").root,this._register(a.toDisposable(()=>this.element.remove())),this._register(o.autorun(u=>{const g=h.read(u),p=g.length>0,f=p?g[0].id:void 0,m=g.length===1;if(this.element.classList.toggle("single-button",m),this.element.style.height=m?"28px":"26px",!p)return;const _=n.createInstance(o.MenuWorkbenchToolBar,this.element,e,{actionViewItemProvider:(v,b)=>{if(v instanceof o.MenuItemAction)return n.createInstance(class extends o.MenuEntryActionViewItem{render(S){super.render(S),v.id===f&&this.element?.classList.add("primary")}updateLabel(){const S=s.lookupKeybinding(v.id),w=S?S.getLabel():void 0;this.options.label&&this.label&&(this.label.textContent=w?`${this._commandAction.label} (${w})`:this._commandAction.label)}},v,{...b,keybindingNotRenderedWithLabel:!0})},hiddenItemStrategy:0,menuOptions:{shouldForwardArgs:!0},telemetrySource:"editor.overlayToolbar",toolbarOptions:{primaryGroup:()=>!0,useSeparatorsInPrimaryActions:!0}});u.store.add(_),u.store.add(o.autorun(v=>{const b=i.read(v);_.context=b}))}))}};Gp=Jb([qs(3,o.IInstantiationService),qs(4,o.IKeybindingService),qs(5,o.IMenuService)],Gp),o.registerEditorContribution(hc.ID,hc,1);const mf=class mf extends a.Disposable{constructor(e){super(),this.editor=e,this.widget=null,a.isIOS&&(this._register(e.onDidChangeConfiguration(()=>this.update())),this.update())}update(){const e=!this.editor.getOption(104);!this.widget&&e?this.widget=new Zp(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}};mf.ID="editor.contrib.iPadShowKeyboard";let uc=mf;const rd=class rd extends a.Disposable{constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(o.addDisposableListener(this._domNode,"touchstart",t=>{this.editor.focus()})),this._register(o.addDisposableListener(this._domNode,"focus",t=>{this.editor.focus()})),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return rd.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}};rd.ID="editor.contrib.ShowKeyboardWidget";let Zp=rd;o.registerEditorContribution(uc.ID,uc,3);var H1=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Wb=function(c,e){return function(t,i){e(t,i,c)}},Xp;let Fr=(Wn=class extends a.Disposable{static get(e){return e.getContribution(Xp.ID)}constructor(e,t,i){super(),this._editor=e,this._languageService=i,this._widget=null,this._register(this._editor.onDidChangeModel(n=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(n=>this.stop())),this._register(a.TokenizationRegistry.onDidChange(n=>this.stop())),this._register(this._editor.onKeyUp(n=>n.keyCode===9&&this.stop()))}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new Yp(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}},Xp=Wn,Wn.ID="editor.contrib.inspectTokens",Wn);Fr=Xp=H1([Wb(1,o.IStandaloneThemeService),Wb(2,o.ILanguageService)],Fr);class eN extends o.EditorAction{constructor(){super({id:"editor.action.inspectTokens",label:o.InspectTokensNLS.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,t){Fr.get(t)?.launch()}}function tN(c){let e="";for(let t=0,i=c.length;to.NullState,tokenize:(n,s,r)=>o.nullTokenize(e,r),tokenizeEncoded:(n,s,r)=>o.nullTokenizeEncoded(i,r)}}const ad=class ad extends a.Disposable{constructor(e,t){super(),this.allowEditorOverflow=!0,this._editor=e,this._languageService=t,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=iN(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(i=>this._compute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return ad._ID}_compute(e){const t=this._getTokensAtLine(e.lineNumber);let i=0;for(let d=t.tokens1.length-1;d>=0;d--){const h=t.tokens1[d];if(e.column-1>=h.offset){i=d;break}}let n=0;for(let d=t.tokens2.length>>>1;d>=0;d--)if(e.column-1>=t.tokens2[d<<1]){n=d;break}const s=this._model.getLineContent(e.lineNumber);let r="";if(i=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Qp=function(c,e){return function(t,i){e(t,i,c)}},zr;let Jp=(Hn=class{constructor(e,t,i){this.quickInputService=e,this.keybindingService=t,this.contextKeyService=i,this.registry=o.Registry.as(o.Extensions$1.Quickaccess)}provide(e){const t=new a.DisposableStore;return t.add(e.onDidAccept(()=>{const[i]=e.selectedItems;i&&this.quickInputService.quickAccess.show(i.prefix,{preserveValue:!0})})),t.add(e.onDidChangeValue(i=>{const n=this.registry.getQuickAccessProvider(i.substr(zr.PREFIX.length),this.contextKeyService);n?.prefix&&n.prefix!==zr.PREFIX&&this.quickInputService.quickAccess.show(n.prefix,{preserveValue:!0})})),e.items=this.getQuickAccessProviders().filter(i=>i.prefix!==zr.PREFIX),t}getQuickAccessProviders(){return this.registry.getQuickAccessProviders(this.contextKeyService).sort((t,i)=>t.prefix.localeCompare(i.prefix)).flatMap(t=>this.createPicks(t))}createPicks(e){return e.helpEntries.map(t=>{const i=t.prefix||e.prefix,n=i||"…";return{prefix:i,label:n,keybinding:t.commandId?this.keybindingService.lookupKeybinding(t.commandId):void 0,ariaLabel:a.localize(1811,"{0}, {1}",n,t.description),description:t.description}})}},zr=Hn,Hn.PREFIX="?",Hn);Jp=zr=nN([Qp(0,o.IQuickInputService),Qp(1,o.IKeybindingService),Qp(2,o.IContextKeyService)],Jp),o.Registry.as(o.Extensions$1.Quickaccess).registerQuickAccessProvider({ctor:Jp,prefix:"",helpEntries:[{description:o.QuickHelpNLS.helpQuickAccessActionLabel}]});class Hb{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,t,i){const n=new a.DisposableStore;e.canAcceptInBackground=!!this.options?.canAcceptInBackground,e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const s=n.add(new a.MutableDisposable);return s.value=this.doProvide(e,t,i),n.add(this.onDidActiveTextEditorControlChange(()=>{s.value=void 0,s.value=this.doProvide(e,t)})),n}doProvide(e,t,i){const n=new a.DisposableStore,s=this.activeTextEditorControl;if(s&&this.canProvideWithTextEditor(s)){const r={editor:s},l=o.getCodeEditor(s);if(l){let d=s.saveViewState()??void 0;n.add(l.onDidChangeCursorPosition(()=>{d=s.saveViewState()??void 0})),r.restoreViewState=()=>{d&&s===this.activeTextEditorControl&&s.restoreViewState(d)},n.add(a.createSingleCallFunction(t.onCancellationRequested)(()=>r.restoreViewState?.()))}n.add(a.toDisposable(()=>this.clearDecorations(s))),n.add(this.provideWithTextEditor(r,e,t,i))}else n.add(this.provideWithoutTextEditor(e,t));return n}canProvideWithTextEditor(e){return!0}gotoLocation({editor:e},t){e.setSelection(t.range,"code.jump"),e.revealRangeInCenter(t.range,0),t.preserveFocus||e.focus();const i=this.getModel(e);if(i){const n=i.getLineContent(t.range.startLineNumber);o.status(a.localize(1381,"Line {0}, column {1}: {2}",t.range.startLineNumber,t.range.startColumn,n))}}getModel(e){return o.isDiffEditor(e)?e.getModel()?.modified:e.getModel()}addDecorations(e,t){e.changeDecorations(i=>{const n=[];this.rangeHighlightDecorationId&&(n.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),n.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const s=[{range:t,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:o.themeColorFromId(o.overviewRulerRangeHighlight),position:a.OverviewRulerLane.Full}}}],[r,l]=i.deltaDecorations(n,s);this.rangeHighlightDecorationId={rangeHighlightId:r,overviewRulerDecorationId:l}})}clearDecorations(e){const t=this.rangeHighlightDecorationId;t&&(e.changeDecorations(i=>{i.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}}const Oi=class Oi extends Hb{constructor(){super({canAcceptInBackground:!0})}get useZeroBasedOffset(){return this.storageService.getBoolean(Oi.ZERO_BASED_OFFSET_STORAGE_KEY,-1,!1)}set useZeroBasedOffset(e){this.storageService.store(Oi.ZERO_BASED_OFFSET_STORAGE_KEY,e,-1,0)}provideWithoutTextEditor(e){const t=a.localize(1382,"Open a text editor first to go to a line or an offset.");return e.items=[{label:t}],e.ariaLabel=t,a.Disposable.None}provideWithTextEditor(e,t,i){const n=e.editor,s=new a.DisposableStore;t.ariaLabel=a.localize(1383,"Go to line. Type a line number, optionally followed by colon and column number."),s.add(t.onDidAccept(h=>{const[u]=t.selectedItems;if(u){if(!u.lineNumber)return;this.gotoLocation(e,{range:this.toRange(u.lineNumber,u.column),keyMods:t.keyMods,preserveFocus:h.inBackground}),h.inBackground||t.hide()}}));const r={iconClass:o.ThemeIcon.asClassName(a.Codicon.indexZero),tooltip:a.localize(1384,"Toggle Zero-Based Offset"),location:o.QuickInputButtonLocation.Input,toggle:{checked:this.useZeroBasedOffset}},l=()=>{const h=t.value.trim().substring(Oi.GO_TO_LINE_PREFIX.length),{inOffsetMode:u,lineNumber:g,column:p,label:f}=this.parsePosition(n,h);if(t.buttons=u?[r]:[],t.items=[{lineNumber:g,column:p,label:f,ariaLabel:g?a.localize(1385,"Go to line {0}, column {1}. Press Enter to navigate.",g,p||1):f}],!g){this.clearDecorations(n);return}const m=this.toRange(g,p);n.revealRangeInCenter(m,0),this.addDecorations(n,m)};s.add(t.onDidTriggerButton(h=>{h===r&&(this.useZeroBasedOffset=h.toggle?.checked??!this.useZeroBasedOffset,l())})),l(),s.add(t.onDidChangeValue(()=>l()));const d=o.getCodeEditor(n);return d&&d.getOptions().get(76).renderType===2&&(d.updateOptions({lineNumbers:"on"}),s.add(a.toDisposable(()=>d.updateOptions({lineNumbers:"relative"})))),s}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){const i=this.getModel(e);if(!i)return{label:a.localize(1386,"Open a text editor first to go to a line or an offset.")};if(t.startsWith(":")){let n=parseInt(t.substring(1),10);const s=i.getValueLength();if(isNaN(n))return{inOffsetMode:!0,label:this.useZeroBasedOffset?a.localize(1387,"Type a character position to go to (from 0 to {0}).",s-1):a.localize(1388,"Type a character position to go to (from 1 to {0}).",s)};{const r=n<0;this.useZeroBasedOffset||(n-=Math.sign(n)),r&&(n+=s);const l=i.getPositionAt(n),d=o.CursorColumns.visibleColumnFromColumn(i.getLineContent(l.lineNumber),l.column,i.getOptions().tabSize)+1;return{...l,inOffsetMode:!0,label:a.localize(1389,"Press 'Enter' to go to line {0} at column {1}.",l.lineNumber,d)}}}else{const n=t.split(/,|:|#/),s=i.getLineCount();let r=parseInt(n[0]?.trim(),10);if(n.length<1||isNaN(r))return{label:a.localize(1390,"Type a line number to go to (from 1 to {0}).",s)};r=r>=0?r:s+1+r,r=Math.min(Math.max(1,r),s);const l=i.getOptions().tabSize,d=i.getLineContent(r),h=o.CursorColumns.visibleColumnFromColumn(d,i.getLineMaxColumn(r),l)+1;let u=parseInt(n[1]?.trim(),10);if(n.length<2||isNaN(u))return{lineNumber:r,column:1,label:n.length<2?a.localize(1391,"Press 'Enter' to go to line {0} or enter colon : to add a column number.",r):a.localize(1392,"Press 'Enter' to go to line {0} or enter a column number (from 1 to {1}).",r,h)};u=u>=0?u:h+u,u=Math.min(Math.max(1,u),h);const g=o.CursorColumns.columnFromVisibleColumn(d,u-1,l);return{lineNumber:r,column:g,label:a.localize(1393,"Press 'Enter' to go to line {0} at column {1}.",r,u)}}}};Oi.GO_TO_LINE_PREFIX=":",Oi.GO_TO_OFFSET_PREFIX="::",Oi.ZERO_BASED_OFFSET_STORAGE_KEY="gotoLine.useZeroBasedOffset";let Wp=Oi;var sN=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},eC=function(c,e){return function(t,i){e(t,i,c)}};let di=class extends Wp{constructor(e,t){super(),this.editorService=e,this.storageService=t,this.onDidActiveTextEditorControlChange=a.Event.None}get activeTextEditorControl(){return this.editorService.getFocusedCodeEditor()??void 0}};di=sN([eC(0,o.ICodeEditorService),eC(1,o.IStorageService)],di);let tC=(es=class extends o.EditorAction{constructor(){super({id:es.ID,label:o.GoToLineNLS.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:o.EditorContextKeys.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(o.IQuickInputService).quickAccess.show(di.GO_TO_LINE_PREFIX)}},es.ID="editor.action.gotoLine",es);o.registerEditorAction(tC),o.Registry.as(o.Extensions$1.Quickaccess).registerQuickAccessProvider({ctor:di,prefix:di.GO_TO_LINE_PREFIX,helpEntries:[{description:o.GoToLineNLS.gotoLineActionLabel,commandId:tC.ID}]});const ld=class ld extends o.EditorAction{constructor(){super({id:ld.ID,label:o.GoToLineNLS.gotoOffsetActionLabel,alias:"Go to Offset...",precondition:void 0})}run(e){e.get(o.IQuickInputService).quickAccess.show(di.GO_TO_OFFSET_PREFIX)}};ld.ID="editor.action.gotoOffset";let gc=ld;o.registerEditorAction(gc),o.Registry.as(o.Extensions$1.Quickaccess).registerQuickAccessProvider({ctor:di,prefix:di.GO_TO_OFFSET_PREFIX,helpEntries:[{description:o.GoToLineNLS.gotoOffsetActionLabel,commandId:gc.ID}]});const iC=[void 0,[]];function Hp(c,e,t=0,i=0){const n=e;return n.values&&n.values.length>1?oN(c,n.values,t,i):nC(c,e,t,i)}function oN(c,e,t,i){let n=0;const s=[];for(const r of e){const[l,d]=nC(c,r,t,i);if(typeof l!="number")return iC;n+=l,s.push(...d)}return[n,rN(s)]}function nC(c,e,t,i){const n=o.fuzzyScore(e.normalized,e.normalizedLowercase,t,c,c.toLowerCase(),i,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return n?[n[0],o.createMatches(n)]:iC}function rN(c){const e=c.sort((n,s)=>n.start-s.start),t=[];let i;for(const n of e)!i||!aN(i,n)?(i=n,t.push(n)):(i.start=Math.min(i.start,n.start),i.end=Math.max(i.end,n.end));return t}function aN(c,e){return!(c.end=0,r=sC(c);let l;const d=c.split(oC);if(d.length>1)for(const h of d){const u=sC(h),{pathNormalized:g,normalized:p,normalizedLowercase:f}=rC(h);p&&(l||(l=[]),l.push({original:h,originalLowercase:h.toLowerCase(),pathNormalized:g,normalized:p,normalizedLowercase:f,expectContiguousMatch:u}))}return{original:c,originalLowercase:e,pathNormalized:t,normalized:i,normalizedLowercase:n,values:l,containsPathSeparator:s,expectContiguousMatch:r}}function rC(c){let e;a.isWindows?e=c.replace(/\//g,a.sep):e=c.replace(/\\/g,a.sep);const t=e.replace(/[\*\u2026\s"]/g,"").replace(new RegExp("(?<=.)#$"),"");return{pathNormalized:e,normalized:t,normalizedLowercase:t.toLowerCase()}}function aC(c){return Array.isArray(c)?ef(c.map(e=>e.original).join(oC)):ef(c.original)}var lN=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},lC=function(c,e){return function(t,i){e(t,i,c)}},pc;let un=(it=class extends Hb{constructor(e,t,i=Object.create(null)){super(i),this._languageFeaturesService=e,this._outlineModelService=t,this.options=i,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,a.localize(1394,"To go to a symbol, first open a text editor with symbol information.")),a.Disposable.None}provideWithTextEditor(e,t,i,n){const s=e.editor,r=this.getModel(s);return r?this._languageFeaturesService.documentSymbolProvider.has(r)?this.doProvideWithEditorSymbols(e,r,t,i,n):this.doProvideWithoutEditorSymbols(e,r,t,i):a.Disposable.None}doProvideWithoutEditorSymbols(e,t,i,n){const s=new a.DisposableStore;return this.provideLabelPick(i,a.localize(1395,"The active text editor does not provide symbol information.")),(async()=>!await this.waitForLanguageSymbolRegistry(t,s)||n.isCancellationRequested||s.add(this.doProvideWithEditorSymbols(e,t,i,n)))(),s}provideLabelPick(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}async waitForLanguageSymbolRegistry(e,t){if(this._languageFeaturesService.documentSymbolProvider.has(e))return!0;const i=new a.DeferredPromise,n=t.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>{this._languageFeaturesService.documentSymbolProvider.has(e)&&(n.dispose(),i.complete(!0))}));return t.add(a.toDisposable(()=>i.complete(!1))),i.p}doProvideWithEditorSymbols(e,t,i,n,s){const r=e.editor,l=new a.DisposableStore;l.add(i.onDidAccept(g=>{const[p]=i.selectedItems;if(p&&p.range){if(i.keyMods.shift&&p.attach){p.attach(i.keyMods,g);return}this.gotoLocation(e,{range:p.range.selection,keyMods:i.keyMods,preserveFocus:g.inBackground}),s?.handleAccept?.(p,g.inBackground),g.inBackground||i.hide()}})),l.add(i.onDidTriggerItemButton(({item:g})=>{g&&g.range&&(this.gotoLocation(e,{range:g.range.selection,keyMods:i.keyMods,forceSideBySide:!0}),i.hide())}));const d=this.getDocumentSymbols(t,n),h=l.add(new a.MutableDisposable),u=async g=>{h?.value?.cancel(),i.busy=!1,h.value=new a.CancellationTokenSource,i.busy=!0;try{const p=ef(i.value.substr(pc.PREFIX.length).trim()),f=await this.doGetSymbolPicks(d,p,void 0,h.value.token,t);if(n.isCancellationRequested)return;if(f.length>0){if(i.items=f,g&&p.original.length===0){const m=a.findLast(f,_=>!!(_.type!=="separator"&&_.range&&a.Range.containsPosition(_.range.decoration,g)));m&&(i.activeItems=[m])}}else p.original.length>0?this.provideLabelPick(i,a.localize(1396,"No matching editor symbols")):this.provideLabelPick(i,a.localize(1397,"No editor symbols"))}finally{n.isCancellationRequested||(i.busy=!1)}};return l.add(i.onDidChangeValue(()=>u(void 0))),u(r.getSelection()?.getPosition()),l.add(i.onDidChangeActive(()=>{const[g]=i.activeItems;g&&g.range&&(r.revealRangeInCenter(g.range.selection,0),this.addDecorations(r,g.range.decoration))})),l}async doGetSymbolPicks(e,t,i,n,s){const r=await e;if(n.isCancellationRequested)return[];const l=t.original.indexOf(pc.SCOPE_PREFIX)===0,d=l?1:0;let h,u;t.values&&t.values.length>1?(h=aC(t.values[0]),u=aC(t.values.slice(1))):h=t;let g;const p=this.options?.openSideBySideDirection?.();p&&(g=[{iconClass:p==="right"?o.ThemeIcon.asClassName(a.Codicon.splitHorizontal):o.ThemeIcon.asClassName(a.Codicon.splitVertical),tooltip:p==="right"?a.localize(1398,"Open to the Side"):a.localize(1399,"Open to the Bottom")}]);const f=[];for(let v=0;vd){let D=!1;if(h!==t&&([y,x]=Hp(w,{...t,values:void 0},d,I),typeof y=="number"&&(D=!0)),typeof y!="number"&&([y,x]=Hp(w,h,d,I),typeof y!="number"))continue;if(!D&&u){if(C&&u.original.length>0&&([L,E]=Hp(C,u)),typeof L!="number")continue;typeof y=="number"&&(y+=L)}}const R=b.tags&&b.tags.indexOf(1)>=0;f.push({index:v,kind:b.kind,score:y,label:w,ariaLabel:a.getAriaLabelForSymbol(b.name,b.kind),description:C,highlights:R?void 0:{label:x,description:E},range:{selection:a.Range.collapseToStart(b.selectionRange),decoration:b.range},uri:s.uri,symbolName:S,strikethrough:R,buttons:g})}const m=f.sort((v,b)=>l?this.compareByKindAndScore(v,b):this.compareByScore(v,b));let _=[];if(l){let w=function(){b&&typeof v=="number"&&S>0&&(b.label=a.format(nf[v]||tf,S))},v,b,S=0;for(const I of m)v!==I.kind?(w(),v=I.kind,S=1,b={type:"separator"},_.push(b)):S++,_.push(I);w()}else m.length>0&&(_=[{label:a.localize(1400,"symbols ({0})",f.length),type:"separator"},...m]);return _}compareByScore(e,t){if(typeof e.score!="number"&&typeof t.score=="number")return 1;if(typeof e.score=="number"&&typeof t.score!="number")return-1;if(typeof e.score=="number"&&typeof t.score=="number"){if(e.score>t.score)return-1;if(e.scoret.index?1:0}compareByKindAndScore(e,t){const i=nf[e.kind]||tf,n=nf[t.kind]||tf,s=i.localeCompare(n);return s===0?this.compareByScore(e,t):s}async getDocumentSymbols(e,t){const i=await this._outlineModelService.getOrCreate(e,t);return t.isCancellationRequested?[]:i.asListOfDocumentSymbols()}},pc=it,it.PREFIX="@",it.SCOPE_PREFIX=":",it.PREFIX_BY_CATEGORY=`${it.PREFIX}${it.SCOPE_PREFIX}`,it);un=pc=lN([lC(0,o.ILanguageFeaturesService),lC(1,Bo)],un);const tf=a.localize(1401,"properties ({0})"),nf={5:a.localize(1402,"methods ({0})"),11:a.localize(1403,"functions ({0})"),8:a.localize(1404,"constructors ({0})"),12:a.localize(1405,"variables ({0})"),4:a.localize(1406,"classes ({0})"),22:a.localize(1407,"structs ({0})"),23:a.localize(1408,"events ({0})"),24:a.localize(1409,"operators ({0})"),10:a.localize(1410,"interfaces ({0})"),2:a.localize(1411,"namespaces ({0})"),3:a.localize(1412,"packages ({0})"),25:a.localize(1413,"type parameters ({0})"),1:a.localize(1414,"modules ({0})"),6:a.localize(1415,"properties ({0})"),9:a.localize(1416,"enumerations ({0})"),21:a.localize(1417,"enumeration members ({0})"),14:a.localize(1418,"strings ({0})"),0:a.localize(1419,"files ({0})"),17:a.localize(1420,"arrays ({0})"),15:a.localize(1421,"numbers ({0})"),16:a.localize(1422,"booleans ({0})"),18:a.localize(1423,"objects ({0})"),19:a.localize(1424,"keys ({0})"),7:a.localize(1425,"fields ({0})"),13:a.localize(1426,"constants ({0})")};var cN=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},sf=function(c,e){return function(t,i){e(t,i,c)}};let of=class extends un{constructor(e,t,i){super(t,i),this.editorService=e,this.onDidActiveTextEditorControlChange=a.Event.None}get activeTextEditorControl(){return this.editorService.getFocusedCodeEditor()??void 0}};of=cN([sf(0,o.ICodeEditorService),sf(1,o.ILanguageFeaturesService),sf(2,Bo)],of);const cd=class cd extends o.EditorAction{constructor(){super({id:cd.ID,label:o.QuickOutlineNLS.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:o.EditorContextKeys.hasDocumentSymbolProvider,kbOpts:{kbExpr:o.EditorContextKeys.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(o.IQuickInputService).quickAccess.show(un.PREFIX,{itemActivation:o.ItemActivation.NONE})}};cd.ID="editor.action.quickOutline";let fc=cd;o.registerEditorAction(fc),o.Registry.as(o.Extensions$1.Quickaccess).registerQuickAccessProvider({ctor:of,prefix:un.PREFIX,helpEntries:[{description:o.QuickOutlineNLS.quickOutlineActionLabel,prefix:un.PREFIX,commandId:fc.ID},{description:o.QuickOutlineNLS.quickOutlineByCategoryActionLabel,prefix:un.PREFIX_BY_CATEGORY}]});function dN(c){const e=new Map;for(const t of c)e.set(t,(e.get(t)??0)+1);return e}class Vr{constructor(){this.chunkCount=0,this.chunkOccurrences=new Map,this.documents=new Map}calculateScores(e,t){const i=this.computeEmbedding(e),n=new Map,s=[];for(const[r,l]of this.documents){if(t.isCancellationRequested)return[];for(const d of l.chunks){const h=this.computeSimilarityScore(d,i,n);h>0&&s.push({key:r,score:h})}}return s}static termFrequencies(e){return dN(Vr.splitTerms(e))}static*splitTerms(e){const t=i=>i.toLowerCase();for(const[i]of e.matchAll(new RegExp("\\b\\p{Letter}[\\p{Letter}\\d]{2,}\\b","gu"))){yield t(i);const n=i.replace(/([a-z])([A-Z])/g,"$1 $2").split(/\s+/g);if(n.length>1)for(const s of n)s.length>2&&new RegExp("\\p{Letter}{3,}","gu").test(s)&&(yield t(s))}}updateDocuments(e){for(const{key:t}of e)this.deleteDocument(t);for(const t of e){const i=[];for(const n of t.textChunks){const s=Vr.termFrequencies(n);for(const r of s.keys())this.chunkOccurrences.set(r,(this.chunkOccurrences.get(r)??0)+1);i.push({text:n,tf:s})}this.chunkCount+=i.length,this.documents.set(t.key,{chunks:i})}return this}deleteDocument(e){const t=this.documents.get(e);if(t){this.documents.delete(e),this.chunkCount-=t.chunks.length;for(const i of t.chunks)for(const n of i.tf.keys()){const s=this.chunkOccurrences.get(n);if(typeof s=="number"){const r=s-1;r<=0?this.chunkOccurrences.delete(n):this.chunkOccurrences.set(n,r)}}}}computeSimilarityScore(e,t,i){let n=0;for(const[s,r]of Object.entries(t)){const l=e.tf.get(s);if(!l)continue;let d=i.get(s);typeof d!="number"&&(d=this.computeIdf(s),i.set(s,d));const h=l*d;n+=h*r}return n}computeEmbedding(e){const t=Vr.termFrequencies(e);return this.computeTfidf(t)}computeIdf(e){const t=this.chunkOccurrences.get(e)??0;return t>0?Math.log((this.chunkCount+1)/t):0}computeTfidf(e){const t=Object.create(null);for(const[i,n]of e){const s=this.computeIdf(i);s>0&&(t[i]=n*s)}return t}}function hN(c){const e=c.slice(0);e.sort((i,n)=>n.score-i.score);const t=e[0]?.score??0;if(t>0)for(const i of e)i.score/=t;return e}var hi;(function(c){c[c.NO_ACTION=0]="NO_ACTION",c[c.CLOSE_PICKER=1]="CLOSE_PICKER",c[c.REFRESH_PICKER=2]="REFRESH_PICKER",c[c.REMOVE_ITEM=3]="REMOVE_ITEM"})(hi||(hi={}));function rf(c){return Array.isArray(c.items)}function cC(c){const e=c;return!!e.picks&&e.additionalPicks instanceof Promise}class uN extends a.Disposable{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t,i){const n=new a.DisposableStore;e.canAcceptInBackground=!!this.options?.canAcceptInBackground,e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let s;const r=n.add(new a.MutableDisposable),l=async()=>{s?.dispose(!0),e.busy=!1;const h=r.value=new a.DisposableStore;s=h.add(new a.CancellationTokenSource(t));const u=s.token;let g=e.value.substring(this.prefix.length);this.options?.shouldSkipTrimPickFilter||(g=g.trim());const p=this._getPicks(g,h,u,i),f=(_,v)=>{let b,S;if(rf(_)?(b=_.items,S=_.active):b=_,b.length===0){if(v)return!1;(g.length>0||e.hideInput)&&this.options?.noResultsPick&&(a.isFunction(this.options.noResultsPick)?b=[this.options.noResultsPick(g)]:b=[this.options.noResultsPick])}return e.items=b,S&&(e.activeItems=[S]),!0},m=async _=>{let v=!1,b=!1;await Promise.all([(async()=>{typeof _.mergeDelay=="number"&&(await a.timeout(_.mergeDelay),u.isCancellationRequested)||b||(v=f(_.picks,!0))})(),(async()=>{e.busy=!0;try{const S=await _.additionalPicks;if(u.isCancellationRequested)return;let w,I;rf(_.picks)?(w=_.picks.items,I=_.picks.active):w=_.picks;let C,y;if(rf(S)?(C=S.items,y=S.active):C=S,C.length>0||!v){let x;if(!I&&!y){const L=e.activeItems[0];L&&w.indexOf(L)!==-1&&(x=L)}f({items:[...w,...C],active:I||y||x})}}finally{u.isCancellationRequested||(e.busy=!1),b=!0}})()])};if(p!==null)if(cC(p))await m(p);else if(!(p instanceof Promise))f(p);else{e.busy=!0;try{const _=await p;if(u.isCancellationRequested)return;cC(_)?await m(_):f(_)}finally{u.isCancellationRequested||(e.busy=!1)}}};n.add(e.onDidChangeValue(()=>l())),l(),n.add(e.onDidAccept(h=>{if(i?.handleAccept){h.inBackground||e.hide(),i.handleAccept?.(e.activeItems[0],h.inBackground);return}const[u]=e.selectedItems;if(typeof u?.accept=="function"){if(o.isKeyModified(e.keyMods)&&!!u.attach){u.attach(e.keyMods,h);return}h.inBackground||e.hide(),u.accept(e.keyMods,h)}}));const d=async(h,u)=>{if(typeof u.trigger!="function")return;const g=u.buttons?.indexOf(h)??-1;if(g>=0){const p=u.trigger(g,e.keyMods),f=typeof p=="number"?p:await p;if(t.isCancellationRequested)return;switch(f){case hi.NO_ACTION:break;case hi.CLOSE_PICKER:e.hide();break;case hi.REFRESH_PICKER:l();break;case hi.REMOVE_ITEM:{const m=e.items.indexOf(u);if(m!==-1){const _=e.items.slice(),v=_.splice(m,1),b=e.activeItems.filter(w=>w!==v[0]),S=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=_,b&&(e.activeItems=b),e.keepScrollPosition=S}break}}}};return n.add(e.onDidTriggerItemButton(({button:h,item:u})=>d(h,u))),n.add(e.onDidTriggerSeparatorButton(({button:h,separator:u})=>d(h,u))),n}}var dC=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ui=function(c,e){return function(t,i){e(t,i,c)}},gn,X;let af=(Ct=class extends uN{constructor(e,t,i,n,s,r){super(gn.PREFIX,e),this.keybindingService=i,this.commandService=n,this.telemetryService=s,this.dialogService=r,this.commandsHistory=this._register(t.createInstance(lf)),this.options=e}async _getPicks(e,t,i,n){const s=await this.getCommandPicks(i);if(i.isCancellationRequested)return[];const r=a.createSingleCallFunction(()=>{const f=new Vr;f.updateDocuments(s.map(_=>({key:_.commandId,textChunks:[this.getTfIdfChunk(_)]})));const m=f.calculateScores(e,i);return hN(m).filter(_=>_.score>gn.TFIDF_THRESHOLD).slice(0,gn.TFIDF_MAX_RESULTS)}),l=[];for(const f of s){const m=gn.WORD_FILTER(e,f.label)??void 0;let _;if(f.commandAlias&&(_=gn.WORD_FILTER(e,f.commandAlias)??void 0),m||_)f.highlights={label:m,detail:this.options.showAlias?_:void 0},l.push(f);else if(e===f.commandId)l.push(f);else if(e.length>=3){const v=r();if(i.isCancellationRequested)return[];const b=v.find(S=>S.key===f.commandId);b&&(f.tfIdfScore=b.score,l.push(f))}}const d=new Map;for(const f of l){const m=d.get(f.label);m?(f.description=f.commandId,m.description=m.commandId):d.set(f.label,f)}l.sort((f,m)=>{if(f.tfIdfScore&&m.tfIdfScore)return f.tfIdfScore===m.tfIdfScore?f.label.localeCompare(m.label):m.tfIdfScore-f.tfIdfScore;if(f.tfIdfScore)return 1;if(m.tfIdfScore)return-1;const _=this.commandsHistory.peek(f.commandId),v=this.commandsHistory.peek(m.commandId);if(_&&v)return _>v?-1:1;if(_)return-1;if(v)return 1;if(this.options.suggestedCommandIds){const w=this.options.suggestedCommandIds.has(f.commandId),I=this.options.suggestedCommandIds.has(m.commandId);if(w&&I)return 0;if(w)return-1;if(I)return 1}const b=f.commandCategory===Ep.Developer.value,S=m.commandCategory===Ep.Developer.value;return b&&!S?1:!b&&S?-1:f.label.localeCompare(m.label)});const h=[];let u=!1,g=!0,p=!!this.options.suggestedCommandIds;for(let f=0;f{const f=await this.getAdditionalCommandPicks(s,l,e,i);if(i.isCancellationRequested)return[];const m=f.map(_=>this.toCommandPick(_,n));return g&&m[0]?.type!=="separator"&&m.unshift({type:"separator",label:a.localize(1807,"similar commands")}),m})()}:h}toCommandPick(e,t,i=!1){if(e.type==="separator")return e;const n=e.tooltip??e.commandDescription?.value,s=this.keybindingService.lookupKeybinding(e.commandId),r=s?a.localize(1808,"{0}, {1}",e.label,s.getAriaLabel()):e.label,l=e.buttons||[],d=i?[...l,{iconClass:o.ThemeIcon.asClassName(a.Codicon.close),tooltip:a.localize(1809,"Remove from Recently Used")}]:e.buttons;return{...e,tooltip:n,ariaLabel:r,detail:this.options.showAlias&&e.commandAlias!==e.label?e.commandAlias:void 0,keybinding:s,buttons:d,accept:async()=>{this.commandsHistory.push(e.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.commandId,from:t?.from??"quick open"});try{e.args?.length?await this.commandService.executeCommand(e.commandId,...e.args):await this.commandService.executeCommand(e.commandId)}catch(h){a.isCancellationError(h)||this.dialogService.error(a.localize(1810,"Command '{0}' resulted in an error",e.label),Qr(h))}},trigger:i?(h,u)=>{const g=l.length;return h===g?(this.commandsHistory.remove(e.commandId),hi.REMOVE_ITEM):e.trigger?e.trigger(h,u):hi.NO_ACTION}:e.trigger}}getTfIdfChunk({label:e,commandAlias:t,commandDescription:i}){let n=e;return t&&t!==e&&(n+=` - ${t}`),i&&i.value!==e&&(n+=` - ${i.value===i.original?i.value:`${i.value} (${i.original})`}`),n}},gn=Ct,Ct.PREFIX=">",Ct.TFIDF_THRESHOLD=.5,Ct.TFIDF_MAX_RESULTS=5,Ct.WORD_FILTER=o.or(o.matchesBaseContiguousSubString,o.matchesWords),Ct);af=gn=dC([ui(1,o.IInstantiationService),ui(2,o.IKeybindingService),ui(3,o.ICommandService),ui(4,o.ITelemetryService),ui(5,o.IDialogService)],af);let lf=(nt=class extends a.Disposable{constructor(e,t,i){super(),this.storageService=e,this.configurationService=t,this.logService=i,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>this.updateConfiguration(e))),this._register(this.storageService.onWillSaveState(e=>{e.reason===o.WillSaveStateReason.SHUTDOWN&&this.saveState()}))}updateConfiguration(e){e&&!e.affectsConfiguration("workbench.commandPalette.history")||(this.configuredCommandsHistoryLength=X.getConfiguredCommandHistoryLength(this.configurationService),X.cache&&X.cache.limit!==this.configuredCommandsHistoryLength&&(X.cache.limit=this.configuredCommandsHistoryLength,X.hasChanges=!0))}load(){const e=this.storageService.get(X.PREF_KEY_CACHE,0);let t;if(e)try{t=JSON.parse(e)}catch(n){this.logService.error(`[CommandsHistory] invalid data: ${n}`)}const i=X.cache=new a.LRUCache(this.configuredCommandsHistoryLength,1);if(t){let n;t.usesLRU?n=t.entries:n=t.entries.sort((s,r)=>s.value-r.value),n.forEach(s=>i.set(s.key,s.value))}X.counter=this.storageService.getNumber(X.PREF_KEY_COUNTER,0,X.counter)}push(e){X.cache&&(X.cache.set(e,X.counter++),X.hasChanges=!0)}peek(e){return X.cache?.peek(e)}remove(e){X.cache&&(X.cache.delete(e),X.hasChanges=!0)}saveState(){if(!X.cache||!X.hasChanges)return;const e={usesLRU:!0,entries:[]};X.cache.forEach((t,i)=>e.entries.push({key:i,value:t})),this.storageService.store(X.PREF_KEY_CACHE,JSON.stringify(e),0,0),this.storageService.store(X.PREF_KEY_COUNTER,X.counter,0,0),X.hasChanges=!1}static getConfiguredCommandHistoryLength(e){const i=e.getValue().workbench?.commandPalette?.history;return typeof i=="number"?i:X.DEFAULT_COMMANDS_HISTORY_LENGTH}},X=nt,nt.DEFAULT_COMMANDS_HISTORY_LENGTH=50,nt.PREF_KEY_CACHE="commandPalette.mru.cache",nt.PREF_KEY_COUNTER="commandPalette.mru.counter",nt.counter=1,nt.hasChanges=!1,nt);lf=X=dC([ui(0,o.IStorageService),ui(1,o.IConfigurationService),ui(2,o.ILogService)],lf);class gN extends af{constructor(e,t,i,n,s,r){super(e,t,i,n,s,r)}getCodeEditorCommandPicks(){const e=this.activeTextEditorControl;if(!e)return[];const t=[];for(const i of e.getSupportedActions()){let n;i.metadata?.description&&(o.isLocalizedString(i.metadata.description)?n=i.metadata.description:n={original:i.metadata.description,value:i.metadata.description}),t.push({commandId:i.id,commandAlias:i.alias,commandDescription:n,label:o.stripIcons(i.label)||i.id})}return t}}var pN=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Gs=function(c,e){return function(t,i){e(t,i,c)}};let Br=class extends gN{get activeTextEditorControl(){return this.codeEditorService.getFocusedCodeEditor()??void 0}constructor(e,t,i,n,s,r){super({showAlias:!1},e,i,n,s,r),this.codeEditorService=t}async getCommandPicks(){return this.getCodeEditorCommandPicks()}hasAdditionalCommandPicks(){return!1}async getAdditionalCommandPicks(){return[]}};Br=pN([Gs(0,o.IInstantiationService),Gs(1,o.ICodeEditorService),Gs(2,o.IKeybindingService),Gs(3,o.ICommandService),Gs(4,o.ITelemetryService),Gs(5,o.IDialogService)],Br);const dd=class dd extends o.EditorAction{constructor(){super({id:dd.ID,label:o.QuickCommandNLS.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:o.EditorContextKeys.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(o.IQuickInputService).quickAccess.show(Br.PREFIX)}};dd.ID="editor.action.quickCommand";let mc=dd;o.registerEditorAction(mc),o.Registry.as(o.Extensions$1.Quickaccess).registerQuickAccessProvider({ctor:Br,prefix:Br.PREFIX,helpEntries:[{description:o.QuickCommandNLS.quickCommandHelp,commandId:mc.ID}]});var fN=function(c,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(c,e,t,i);else for(var l=c.length-1;l>=0;l--)(r=c[l])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Zs=function(c,e){return function(t,i){e(t,i,c)}};let cf=class extends Wi{constructor(e,t,i,n,s,r,l){super(!0,e,t,i,n,s,r,l)}};cf=fN([Zs(1,o.IContextKeyService),Zs(2,o.ICodeEditorService),Zs(3,o.INotificationService),Zs(4,o.IInstantiationService),Zs(5,o.IStorageService),Zs(6,o.IConfigurationService)],cf),o.registerEditorContribution(Wi.ID,cf,4);class mN extends o.EditorAction{constructor(){super({id:"editor.action.toggleHighContrast",label:o.ToggleHighContrastNLS.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){const i=e.get(o.IStandaloneThemeService),n=i.getColorTheme();o.isHighContrast(n.type)?(i.setTheme(this._originalThemeName||(o.isDark(n.type)?o.VS_DARK_THEME_NAME:o.VS_LIGHT_THEME_NAME)),this._originalThemeName=null):(i.setTheme(o.isDark(n.type)?o.HC_BLACK_THEME_NAME:o.HC_LIGHT_THEME_NAME),this._originalThemeName=n.themeName)}}o.registerEditorAction(mN),hC.FindWidget=pa})); diff --git a/emrg/gui/vendor/monaco/vs/ts.worker-2QLmBukE.js b/emrg/gui/vendor/monaco/vs/ts.worker-2QLmBukE.js new file mode 100644 index 00000000..a7125cff --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/ts.worker-2QLmBukE.js @@ -0,0 +1 @@ +define("vs/ts.worker-2QLmBukE", ["require", "exports"], (function(require, r){"use strict";const e=""+new URL(require.toUrl("./assets/ts.worker-BWKtMYOk.js"),document.baseURI).href;r.__worker_url_0__=e})); diff --git a/emrg/gui/vendor/monaco/vs/tsMode-B0S_kp2q.js b/emrg/gui/vendor/monaco/vs/tsMode-B0S_kp2q.js new file mode 100644 index 00000000..96d3f33f --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/tsMode-B0S_kp2q.js @@ -0,0 +1,11 @@ +define("vs/tsMode-B0S_kp2q",["exports","./ts.worker-2QLmBukE","./editor-KLE6jdfb","./workers-BBttULjf","./monaco.contribution-BE88ZNGY"],(function(b,z,r,J,G){"use strict";class I{constructor(e,t){this._modeId=e,this._defaults=t,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker()),this._updateExtraLibsToken=0,this._extraLibsChangeListener=this._defaults.onDidExtraLibsChange(()=>this._updateExtraLibs())}dispose(){this._configChangeListener.dispose(),this._extraLibsChangeListener.dispose(),this._stopWorker()}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}async _updateExtraLibs(){if(!this._worker)return;const e=++this._updateExtraLibsToken,t=await this._worker.getProxy();this._updateExtraLibsToken===e&&t.updateExtraLibs(this._defaults.getExtraLibs())}_getClient(){return this._client||(this._client=(async()=>(this._worker=J.createWebWorker({moduleId:"vs/language/typescript/tsWorker",createWorker:()=>new Worker(z.__worker_url_0__,{type:"module"}),label:this._modeId,keepIdleModels:!0,createData:{compilerOptions:this._defaults.getCompilerOptions(),extraLibs:this._defaults.getExtraLibs(),customWorkerPath:this._defaults.workerOptions.customWorkerPath,inlayHintsOptions:this._defaults.inlayHintsOptions}}),this._defaults.getEagerModelSync()?await this._worker.withSyncedResources(r.editor.getModels().filter(e=>e.getLanguageId()===this._modeId).map(e=>e.uri)):await this._worker.getProxy()))()),this._client}async getLanguageServiceWorker(...e){const t=await this._getClient();return this._worker&&await this._worker.withSyncedResources(e),t}}const s={};s["lib.d.ts"]=!0,s["lib.decorators.d.ts"]=!0,s["lib.decorators.legacy.d.ts"]=!0,s["lib.dom.asynciterable.d.ts"]=!0,s["lib.dom.d.ts"]=!0,s["lib.dom.iterable.d.ts"]=!0,s["lib.es2015.collection.d.ts"]=!0,s["lib.es2015.core.d.ts"]=!0,s["lib.es2015.d.ts"]=!0,s["lib.es2015.generator.d.ts"]=!0,s["lib.es2015.iterable.d.ts"]=!0,s["lib.es2015.promise.d.ts"]=!0,s["lib.es2015.proxy.d.ts"]=!0,s["lib.es2015.reflect.d.ts"]=!0,s["lib.es2015.symbol.d.ts"]=!0,s["lib.es2015.symbol.wellknown.d.ts"]=!0,s["lib.es2016.array.include.d.ts"]=!0,s["lib.es2016.d.ts"]=!0,s["lib.es2016.full.d.ts"]=!0,s["lib.es2016.intl.d.ts"]=!0,s["lib.es2017.arraybuffer.d.ts"]=!0,s["lib.es2017.d.ts"]=!0,s["lib.es2017.date.d.ts"]=!0,s["lib.es2017.full.d.ts"]=!0,s["lib.es2017.intl.d.ts"]=!0,s["lib.es2017.object.d.ts"]=!0,s["lib.es2017.sharedmemory.d.ts"]=!0,s["lib.es2017.string.d.ts"]=!0,s["lib.es2017.typedarrays.d.ts"]=!0,s["lib.es2018.asyncgenerator.d.ts"]=!0,s["lib.es2018.asynciterable.d.ts"]=!0,s["lib.es2018.d.ts"]=!0,s["lib.es2018.full.d.ts"]=!0,s["lib.es2018.intl.d.ts"]=!0,s["lib.es2018.promise.d.ts"]=!0,s["lib.es2018.regexp.d.ts"]=!0,s["lib.es2019.array.d.ts"]=!0,s["lib.es2019.d.ts"]=!0,s["lib.es2019.full.d.ts"]=!0,s["lib.es2019.intl.d.ts"]=!0,s["lib.es2019.object.d.ts"]=!0,s["lib.es2019.string.d.ts"]=!0,s["lib.es2019.symbol.d.ts"]=!0,s["lib.es2020.bigint.d.ts"]=!0,s["lib.es2020.d.ts"]=!0,s["lib.es2020.date.d.ts"]=!0,s["lib.es2020.full.d.ts"]=!0,s["lib.es2020.intl.d.ts"]=!0,s["lib.es2020.number.d.ts"]=!0,s["lib.es2020.promise.d.ts"]=!0,s["lib.es2020.sharedmemory.d.ts"]=!0,s["lib.es2020.string.d.ts"]=!0,s["lib.es2020.symbol.wellknown.d.ts"]=!0,s["lib.es2021.d.ts"]=!0,s["lib.es2021.full.d.ts"]=!0,s["lib.es2021.intl.d.ts"]=!0,s["lib.es2021.promise.d.ts"]=!0,s["lib.es2021.string.d.ts"]=!0,s["lib.es2021.weakref.d.ts"]=!0,s["lib.es2022.array.d.ts"]=!0,s["lib.es2022.d.ts"]=!0,s["lib.es2022.error.d.ts"]=!0,s["lib.es2022.full.d.ts"]=!0,s["lib.es2022.intl.d.ts"]=!0,s["lib.es2022.object.d.ts"]=!0,s["lib.es2022.regexp.d.ts"]=!0,s["lib.es2022.string.d.ts"]=!0,s["lib.es2023.array.d.ts"]=!0,s["lib.es2023.collection.d.ts"]=!0,s["lib.es2023.d.ts"]=!0,s["lib.es2023.full.d.ts"]=!0,s["lib.es2023.intl.d.ts"]=!0,s["lib.es2024.arraybuffer.d.ts"]=!0,s["lib.es2024.collection.d.ts"]=!0,s["lib.es2024.d.ts"]=!0,s["lib.es2024.full.d.ts"]=!0,s["lib.es2024.object.d.ts"]=!0,s["lib.es2024.promise.d.ts"]=!0,s["lib.es2024.regexp.d.ts"]=!0,s["lib.es2024.sharedmemory.d.ts"]=!0,s["lib.es2024.string.d.ts"]=!0,s["lib.es5.d.ts"]=!0,s["lib.es6.d.ts"]=!0,s["lib.esnext.array.d.ts"]=!0,s["lib.esnext.collection.d.ts"]=!0,s["lib.esnext.d.ts"]=!0,s["lib.esnext.decorators.d.ts"]=!0,s["lib.esnext.disposable.d.ts"]=!0,s["lib.esnext.error.d.ts"]=!0,s["lib.esnext.float16.d.ts"]=!0,s["lib.esnext.full.d.ts"]=!0,s["lib.esnext.intl.d.ts"]=!0,s["lib.esnext.iterator.d.ts"]=!0,s["lib.esnext.promise.d.ts"]=!0,s["lib.esnext.sharedmemory.d.ts"]=!0,s["lib.scripthost.d.ts"]=!0,s["lib.webworker.asynciterable.d.ts"]=!0,s["lib.webworker.d.ts"]=!0,s["lib.webworker.importscripts.d.ts"]=!0,s["lib.webworker.iterable.d.ts"]=!0;function x(g,e,t=0){if(typeof g=="string")return g;if(g===void 0)return"";let o="";if(t){o+=e;for(let n=0;ne.text).join(""):""}class k{constructor(e){this._worker=e}_textSpanToRange(e,t){let o=e.getPositionAt(t.start),n=e.getPositionAt(t.start+t.length),{lineNumber:l,column:p}=o,{lineNumber:a,column:i}=n;return{startLineNumber:l,startColumn:p,endLineNumber:a,endColumn:i}}}class P{constructor(e){this._worker=e,this._libFiles={},this._hasFetchedLibFiles=!1,this._fetchLibFilesPromise=null}isLibFile(e){return e&&e.path.indexOf("/lib.")===0?!!s[e.path.slice(1)]:!1}getOrCreateModel(e){const t=r.Uri.parse(e),o=r.editor.getModel(t);if(o)return o;if(this.isLibFile(t)&&this._hasFetchedLibFiles)return r.editor.createModel(this._libFiles[t.path.slice(1)],"typescript",t);const n=G.typescriptDefaults.getExtraLibs()[e];return n?r.editor.createModel(n.content,"typescript",t):null}_containsLibFile(e){for(let t of e)if(this.isLibFile(t))return!0;return!1}async fetchLibFilesIfNecessary(e){this._containsLibFile(e)&&await this._fetchLibFiles()}_fetchLibFiles(){return this._fetchLibFilesPromise||(this._fetchLibFilesPromise=this._worker().then(e=>e.getLibFiles()).then(e=>{this._hasFetchedLibFiles=!0,this._libFiles=e})),this._fetchLibFilesPromise}}class O extends k{constructor(e,t,o,n){super(n),this._libFiles=e,this._defaults=t,this._selector=o,this._disposables=[],this._listener=Object.create(null);const l=i=>{if(i.getLanguageId()!==o)return;const c=()=>{const{onlyVisible:w}=this._defaults.getDiagnosticsOptions();w?i.isAttachedToEditor()&&this._doValidate(i):this._doValidate(i)};let u;const d=i.onDidChangeContent(()=>{clearTimeout(u),u=window.setTimeout(c,500)}),m=i.onDidChangeAttached(()=>{const{onlyVisible:w}=this._defaults.getDiagnosticsOptions();w&&(i.isAttachedToEditor()?c():r.editor.setModelMarkers(i,this._selector,[]))});this._listener[i.uri.toString()]={dispose(){d.dispose(),m.dispose(),clearTimeout(u)}},c()},p=i=>{r.editor.setModelMarkers(i,this._selector,[]);const c=i.uri.toString();this._listener[c]&&(this._listener[c].dispose(),delete this._listener[c])};this._disposables.push(r.editor.onDidCreateModel(i=>l(i))),this._disposables.push(r.editor.onWillDisposeModel(p)),this._disposables.push(r.editor.onDidChangeModelLanguage(i=>{p(i.model),l(i.model)})),this._disposables.push({dispose(){for(const i of r.editor.getModels())p(i)}});const a=()=>{for(const i of r.editor.getModels())p(i),l(i)};this._disposables.push(this._defaults.onDidChange(a)),this._disposables.push(this._defaults.onDidExtraLibsChange(a)),r.editor.getModels().forEach(i=>l(i))}dispose(){this._disposables.forEach(e=>e&&e.dispose()),this._disposables=[]}async _doValidate(e){const t=await this._worker(e.uri);if(e.isDisposed())return;const o=[],{noSyntaxValidation:n,noSemanticValidation:l,noSuggestionDiagnostics:p}=this._defaults.getDiagnosticsOptions();n||o.push(t.getSyntacticDiagnostics(e.uri.toString())),l||o.push(t.getSemanticDiagnostics(e.uri.toString())),p||o.push(t.getSuggestionDiagnostics(e.uri.toString()));const a=await Promise.all(o);if(!a||e.isDisposed())return;const i=a.reduce((u,d)=>d.concat(u),[]).filter(u=>(this._defaults.getDiagnosticsOptions().diagnosticCodesToIgnore||[]).indexOf(u.code)===-1),c=i.map(u=>u.relatedInformation||[]).reduce((u,d)=>d.concat(u),[]).map(u=>u.file?r.Uri.parse(u.file.fileName):null);await this._libFiles.fetchLibFilesIfNecessary(c),!e.isDisposed()&&r.editor.setModelMarkers(e,this._selector,i.map(u=>this._convertDiagnostics(e,u)))}_convertDiagnostics(e,t){const o=t.start||0,n=t.length||1,{lineNumber:l,column:p}=e.getPositionAt(o),{lineNumber:a,column:i}=e.getPositionAt(o+n),c=[];return t.reportsUnnecessary&&c.push(r.MarkerTag.Unnecessary),t.reportsDeprecated&&c.push(r.MarkerTag.Deprecated),{severity:this._tsDiagnosticCategoryToMarkerSeverity(t.category),startLineNumber:l,startColumn:p,endLineNumber:a,endColumn:i,message:x(t.messageText,` +`),code:t.code.toString(),tags:c,relatedInformation:this._convertRelatedInformation(e,t.relatedInformation)}}_convertRelatedInformation(e,t){if(!t)return[];const o=[];return t.forEach(n=>{let l=e;if(n.file&&(l=this._libFiles.getOrCreateModel(n.file.fileName)),!l)return;const p=n.start||0,a=n.length||1,{lineNumber:i,column:c}=l.getPositionAt(p),{lineNumber:u,column:d}=l.getPositionAt(p+a);o.push({resource:l.uri,startLineNumber:i,startColumn:c,endLineNumber:u,endColumn:d,message:x(n.messageText,` +`)})}),o}_tsDiagnosticCategoryToMarkerSeverity(e){switch(e){case 1:return r.MarkerSeverity.Error;case 3:return r.MarkerSeverity.Info;case 0:return r.MarkerSeverity.Warning;case 2:return r.MarkerSeverity.Hint}return r.MarkerSeverity.Info}}class v extends k{get triggerCharacters(){return["."]}async provideCompletionItems(e,t,o,n){const l=e.getWordUntilPosition(t),p=new r.Range(t.lineNumber,l.startColumn,t.lineNumber,l.endColumn),a=e.uri,i=e.getOffsetAt(t),c=await this._worker(a);if(e.isDisposed())return;const u=await c.getCompletionsAtPosition(a.toString(),i);return!u||e.isDisposed()?void 0:{suggestions:u.entries.map(m=>{let w=p;if(m.replacementSpan){const A=e.getPositionAt(m.replacementSpan.start),F=e.getPositionAt(m.replacementSpan.start+m.replacementSpan.length);w=new r.Range(A.lineNumber,A.column,F.lineNumber,F.column)}const C=[];return m.kindModifiers!==void 0&&m.kindModifiers.indexOf("deprecated")!==-1&&C.push(r.languages.CompletionItemTag.Deprecated),{uri:a,position:t,offset:i,range:w,label:m.name,insertText:m.name,sortText:m.sortText,kind:v.convertKind(m.kind),tags:C}})}}async resolveCompletionItem(e,t){const o=e,n=o.uri,l=o.position,p=o.offset,i=await(await this._worker(n)).getCompletionEntryDetails(n.toString(),p,o.label);return i?{uri:n,position:l,label:i.name,kind:v.convertKind(i.kind),detail:S(i.displayParts),documentation:{value:v.createDocumentationString(i)}}:o}static convertKind(e){switch(e){case f.primitiveType:case f.keyword:return r.languages.CompletionItemKind.Keyword;case f.variable:case f.localVariable:return r.languages.CompletionItemKind.Variable;case f.memberVariable:case f.memberGetAccessor:case f.memberSetAccessor:return r.languages.CompletionItemKind.Field;case f.function:case f.memberFunction:case f.constructSignature:case f.callSignature:case f.indexSignature:return r.languages.CompletionItemKind.Function;case f.enum:return r.languages.CompletionItemKind.Enum;case f.module:return r.languages.CompletionItemKind.Module;case f.class:return r.languages.CompletionItemKind.Class;case f.interface:return r.languages.CompletionItemKind.Interface;case f.warning:return r.languages.CompletionItemKind.File}return r.languages.CompletionItemKind.Property}static createDocumentationString(e){let t=S(e.documentation);if(e.tags)for(const o of e.tags)t+=` + +${M(o)}`;return t}}function M(g){let e=`*@${g.name}*`;if(g.name==="param"&&g.text){const[t,...o]=g.text;e+=`\`${t.text}\``,o.length>0&&(e+=` — ${o.map(n=>n.text).join(" ")}`)}else Array.isArray(g.text)?e+=` — ${g.text.map(t=>t.text).join(" ")}`:g.text&&(e+=` — ${g.text}`);return e}class D extends k{constructor(){super(...arguments),this.signatureHelpTriggerCharacters=["(",","]}static _toSignatureHelpTriggerReason(e){switch(e.triggerKind){case r.languages.SignatureHelpTriggerKind.TriggerCharacter:return e.triggerCharacter?e.isRetrigger?{kind:"retrigger",triggerCharacter:e.triggerCharacter}:{kind:"characterTyped",triggerCharacter:e.triggerCharacter}:{kind:"invoked"};case r.languages.SignatureHelpTriggerKind.ContentChange:return e.isRetrigger?{kind:"retrigger"}:{kind:"invoked"};case r.languages.SignatureHelpTriggerKind.Invoke:default:return{kind:"invoked"}}}async provideSignatureHelp(e,t,o,n){const l=e.uri,p=e.getOffsetAt(t),a=await this._worker(l);if(e.isDisposed())return;const i=await a.getSignatureHelpItems(l.toString(),p,{triggerReason:D._toSignatureHelpTriggerReason(n)});if(!i||e.isDisposed())return;const c={activeSignature:i.selectedItemIndex,activeParameter:i.argumentIndex,signatures:[]};return i.items.forEach(u=>{const d={label:"",parameters:[]};d.documentation={value:S(u.documentation)},d.label+=S(u.prefixDisplayParts),u.parameters.forEach((m,w,C)=>{const A=S(m.displayParts),F={label:A,documentation:{value:S(m.documentation)}};d.label+=A,d.parameters.push(F),wM(d)).join(` + +`):"",u=S(a.displayParts);return{range:this._textSpanToRange(e,a.textSpan),contents:[{value:"```typescript\n"+u+"\n```\n"},{value:i+(c?` + +`+c:"")}]}}}class R extends k{async provideDocumentHighlights(e,t,o){const n=e.uri,l=e.getOffsetAt(t),p=await this._worker(n);if(e.isDisposed())return;const a=await p.getDocumentHighlights(n.toString(),l,[n.toString()]);if(!(!a||e.isDisposed()))return a.flatMap(i=>i.highlightSpans.map(c=>({range:this._textSpanToRange(e,c.textSpan),kind:c.kind==="writtenReference"?r.languages.DocumentHighlightKind.Write:r.languages.DocumentHighlightKind.Text})))}}class H extends k{constructor(e,t){super(t),this._libFiles=e}async provideDefinition(e,t,o){const n=e.uri,l=e.getOffsetAt(t),p=await this._worker(n);if(e.isDisposed())return;const a=await p.getDefinitionAtPosition(n.toString(),l);if(!a||e.isDisposed()||(await this._libFiles.fetchLibFilesIfNecessary(a.map(c=>r.Uri.parse(c.fileName))),e.isDisposed()))return;const i=[];for(let c of a){const u=this._libFiles.getOrCreateModel(c.fileName);u&&i.push({uri:u.uri,range:this._textSpanToRange(u,c.textSpan)})}return i}}class E extends k{constructor(e,t){super(t),this._libFiles=e}async provideReferences(e,t,o,n){const l=e.uri,p=e.getOffsetAt(t),a=await this._worker(l);if(e.isDisposed())return;const i=await a.getReferencesAtPosition(l.toString(),p);if(!i||e.isDisposed()||(await this._libFiles.fetchLibFilesIfNecessary(i.map(u=>r.Uri.parse(u.fileName))),e.isDisposed()))return;const c=[];for(let u of i){const d=this._libFiles.getOrCreateModel(u.fileName);d&&c.push({uri:d.uri,range:this._textSpanToRange(d,u.textSpan)})}return c}}class W extends k{async provideDocumentSymbols(e,t){const o=e.uri,n=await this._worker(o);if(e.isDisposed())return;const l=await n.getNavigationTree(o.toString());if(!l||e.isDisposed())return;const p=(i,c)=>({name:i.text,detail:"",kind:y[i.kind]||r.languages.SymbolKind.Variable,range:this._textSpanToRange(e,i.spans[0]),selectionRange:this._textSpanToRange(e,i.spans[0]),tags:[],children:i.childItems?.map(d=>p(d,i.text)),containerName:c});return l.childItems?l.childItems.map(i=>p(i)):[]}}const h=class h{};h.unknown="",h.keyword="keyword",h.script="script",h.module="module",h.class="class",h.interface="interface",h.type="type",h.enum="enum",h.variable="var",h.localVariable="local var",h.function="function",h.localFunction="local function",h.memberFunction="method",h.memberGetAccessor="getter",h.memberSetAccessor="setter",h.memberVariable="property",h.constructorImplementation="constructor",h.callSignature="call",h.indexSignature="index",h.constructSignature="construct",h.parameter="parameter",h.typeParameter="type parameter",h.primitiveType="primitive type",h.label="label",h.alias="alias",h.const="const",h.let="let",h.warning="warning";let f=h,y=Object.create(null);y[f.module]=r.languages.SymbolKind.Module,y[f.class]=r.languages.SymbolKind.Class,y[f.enum]=r.languages.SymbolKind.Enum,y[f.interface]=r.languages.SymbolKind.Interface,y[f.memberFunction]=r.languages.SymbolKind.Method,y[f.memberVariable]=r.languages.SymbolKind.Property,y[f.memberGetAccessor]=r.languages.SymbolKind.Property,y[f.memberSetAccessor]=r.languages.SymbolKind.Property,y[f.variable]=r.languages.SymbolKind.Variable,y[f.const]=r.languages.SymbolKind.Variable,y[f.localVariable]=r.languages.SymbolKind.Variable,y[f.variable]=r.languages.SymbolKind.Variable,y[f.function]=r.languages.SymbolKind.Function,y[f.localFunction]=r.languages.SymbolKind.Function;class _ extends k{static _convertOptions(e){return{ConvertTabsToSpaces:e.insertSpaces,TabSize:e.tabSize,IndentSize:e.tabSize,IndentStyle:2,NewLineCharacter:` +`,InsertSpaceAfterCommaDelimiter:!0,InsertSpaceAfterSemicolonInForStatements:!0,InsertSpaceBeforeAndAfterBinaryOperators:!0,InsertSpaceAfterKeywordsInControlFlowStatements:!0,InsertSpaceAfterFunctionKeywordForAnonymousFunctions:!0,InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis:!1,InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets:!1,InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces:!1,PlaceOpenBraceOnNewLineForControlBlocks:!1,PlaceOpenBraceOnNewLineForFunctions:!1}}_convertTextChanges(e,t){return{text:t.newText,range:this._textSpanToRange(e,t.span)}}}class V extends _{constructor(){super(...arguments),this.canFormatMultipleRanges=!1}async provideDocumentRangeFormattingEdits(e,t,o,n){const l=e.uri,p=e.getOffsetAt({lineNumber:t.startLineNumber,column:t.startColumn}),a=e.getOffsetAt({lineNumber:t.endLineNumber,column:t.endColumn}),i=await this._worker(l);if(e.isDisposed())return;const c=await i.getFormattingEditsForRange(l.toString(),p,a,_._convertOptions(o));if(!(!c||e.isDisposed()))return c.map(u=>this._convertTextChanges(e,u))}}class K extends _{get autoFormatTriggerCharacters(){return[";","}",` +`]}async provideOnTypeFormattingEdits(e,t,o,n,l){const p=e.uri,a=e.getOffsetAt(t),i=await this._worker(p);if(e.isDisposed())return;const c=await i.getFormattingEditsAfterKeystroke(p.toString(),a,o,_._convertOptions(n));if(!(!c||e.isDisposed()))return c.map(u=>this._convertTextChanges(e,u))}}class j extends _{async provideCodeActions(e,t,o,n){const l=e.uri,p=e.getOffsetAt({lineNumber:t.startLineNumber,column:t.startColumn}),a=e.getOffsetAt({lineNumber:t.endLineNumber,column:t.endColumn}),i=_._convertOptions(e.getOptions()),c=o.markers.filter(w=>w.code).map(w=>w.code).map(Number),u=await this._worker(l);if(e.isDisposed())return;const d=await u.getCodeFixesAtPosition(l.toString(),p,a,c,i);return!d||e.isDisposed()?{actions:[],dispose:()=>{}}:{actions:d.filter(w=>w.changes.filter(C=>C.isNewFile).length===0).map(w=>this._tsCodeFixActionToMonacoCodeAction(e,o,w)),dispose:()=>{}}}_tsCodeFixActionToMonacoCodeAction(e,t,o){const n=[];for(const p of o.changes)for(const a of p.textChanges)n.push({resource:e.uri,versionId:void 0,textEdit:{range:this._textSpanToRange(e,a.span),text:a.newText}});return{title:o.description,edit:{edits:n},diagnostics:t.markers,kind:"quickfix"}}}class B extends k{constructor(e,t){super(t),this._libFiles=e}async provideRenameEdits(e,t,o,n){const l=e.uri,p=l.toString(),a=e.getOffsetAt(t),i=await this._worker(l);if(e.isDisposed())return;const c=await i.getRenameInfo(p,a,{allowRenameOfImportPath:!1});if(c.canRename===!1)return{edits:[],rejectReason:c.localizedErrorMessage};if(c.fileToRename!==void 0)throw new Error("Renaming files is not supported.");const u=await i.findRenameLocations(p,a,!1,!1,!1);if(!u||e.isDisposed())return;const d=[];for(const m of u){const w=this._libFiles.getOrCreateModel(m.fileName);if(w)d.push({resource:w.uri,versionId:void 0,textEdit:{range:this._textSpanToRange(w,m.textSpan),text:o}});else throw new Error(`Unknown file ${m.fileName}.`)}return{edits:d}}}class U extends k{async provideInlayHints(e,t,o){const n=e.uri,l=n.toString(),p=e.getOffsetAt({lineNumber:t.startLineNumber,column:t.startColumn}),a=e.getOffsetAt({lineNumber:t.endLineNumber,column:t.endColumn}),i=await this._worker(n);return e.isDisposed()?null:{hints:(await i.provideInlayHints(l,p,a)).map(d=>({...d,label:d.text,position:e.getPositionAt(d.position),kind:this._convertHintKind(d.kind)})),dispose:()=>{}}}_convertHintKind(e){switch(e){case"Parameter":return r.languages.InlayHintKind.Parameter;case"Type":return r.languages.InlayHintKind.Type;default:return r.languages.InlayHintKind.Type}}}let T,L;function Q(g){L=$(g,"typescript")}function q(g){T=$(g,"javascript")}function X(){return new Promise((g,e)=>{if(!T)return e("JavaScript not registered!");g(T)})}function Y(){return new Promise((g,e)=>{if(!L)return e("TypeScript not registered!");g(L)})}function $(g,e){const t=[],o=new I(e,g),n=(...a)=>o.getLanguageServiceWorker(...a),l=new P(n);function p(){const{modeConfiguration:a}=g;Z(t),a.completionItems&&t.push(r.languages.registerCompletionItemProvider(e,new v(n))),a.signatureHelp&&t.push(r.languages.registerSignatureHelpProvider(e,new D(n))),a.hovers&&t.push(r.languages.registerHoverProvider(e,new N(n))),a.documentHighlights&&t.push(r.languages.registerDocumentHighlightProvider(e,new R(n))),a.definitions&&t.push(r.languages.registerDefinitionProvider(e,new H(l,n))),a.references&&t.push(r.languages.registerReferenceProvider(e,new E(l,n))),a.documentSymbols&&t.push(r.languages.registerDocumentSymbolProvider(e,new W(n))),a.rename&&t.push(r.languages.registerRenameProvider(e,new B(l,n))),a.documentRangeFormattingEdits&&t.push(r.languages.registerDocumentRangeFormattingEditProvider(e,new V(n))),a.onTypeFormattingEdits&&t.push(r.languages.registerOnTypeFormattingEditProvider(e,new K(n))),a.codeActions&&t.push(r.languages.registerCodeActionProvider(e,new j(n))),a.inlayHints&&t.push(r.languages.registerInlayHintsProvider(e,new U(n))),a.diagnostics&&t.push(new O(l,g,e,n))}return p(),n}function Z(g){for(;g.length;)g.pop().dispose()}b.Adapter=k,b.CodeActionAdaptor=j,b.DefinitionAdapter=H,b.DiagnosticsAdapter=O,b.DocumentHighlightAdapter=R,b.FormatAdapter=V,b.FormatHelper=_,b.FormatOnTypeAdapter=K,b.InlayHintsAdapter=U,b.Kind=f,b.LibFiles=P,b.OutlineAdapter=W,b.QuickInfoAdapter=N,b.ReferenceAdapter=E,b.RenameAdapter=B,b.SignatureHelpAdapter=D,b.SuggestAdapter=v,b.WorkerManager=I,b.flattenDiagnosticMessageText=x,b.getJavaScriptWorker=X,b.getTypeScriptWorker=Y,b.setupJavaScript=q,b.setupTypeScript=Q,Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/twig-C6taOxMV.js b/emrg/gui/vendor/monaco/vs/twig-C6taOxMV.js new file mode 100644 index 00000000..8791ceb1 --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/twig-C6taOxMV.js @@ -0,0 +1 @@ +define("vs/twig-C6taOxMV",["exports"],(function(t){"use strict";const e={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["{#","#}"]},brackets:[["{#","#}"],["{%","%}"],["{{","}}"],["(",")"],["[","]"],[""],["<",">"]],autoClosingPairs:[{open:"{# ",close:" #}"},{open:"{% ",close:" %}"},{open:"{{ ",close:" }}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}]},i={defaultToken:"",tokenPostfix:"",ignoreCase:!0,keywords:["apply","autoescape","block","deprecated","do","embed","extends","flush","for","from","if","import","include","macro","sandbox","set","use","verbatim","with","endapply","endautoescape","endblock","endembed","endfor","endif","endmacro","endsandbox","endset","endwith","true","false"],tokenizer:{root:[[/\s+/],[/{#/,"comment.twig","@commentState"],[/{%[-~]?/,"delimiter.twig","@blockState"],[/{{[-~]?/,"delimiter.twig","@variableState"],[/)/,["delimiter.html","tag.html","","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/|>=|<=/,"operators.twig"],[/(starts with|ends with|matches)(\s+)/,["operators.twig",""]],[/(in)(\s+)/,["operators.twig",""]],[/(is)(\s+)/,["operators.twig",""]],[/\||~|:|\.{1,2}|\?{1,2}/,"operators.twig"],[/[^\W\d][\w]*/,{cases:{"@keywords":"keyword.twig","@default":"variable.twig"}}],[/\d+(\.\d+)?/,"number.twig"],[/\(|\)|\[|\]|{|}|,/,"delimiter.twig"],[/"([^#"\\]*(?:\\.[^#"\\]*)*)"|\'([^\'\\]*(?:\\.[^\'\\]*)*)\'/,"string.twig"],[/"/,"string.twig","@stringState"],[/=>/,"operators.twig"],[/=/,"operators.twig"]],doctype:[[/[^>]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value.html"],[/'([^']*)'/,"attribute.value.html"],[/[\w\-]+/,"attribute.name.html"],[/=/,"delimiter.html"],[/[ \t\r\n]+/]],script:[[/type/,"attribute.name.html","@scriptAfterType"],[/"([^"]*)"/,"attribute.value.html"],[/'([^']*)'/,"attribute.value.html"],[/[\w\-]+/,"attribute.name.html"],[/=/,"delimiter.html"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/=/,"delimiter.html","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value.html",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value.html",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value.html"],[/'([^']*)'/,"attribute.value.html"],[/[\w\-]+/,"attribute.name.html"],[/=/,"delimiter.html"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]],style:[[/type/,"attribute.name.html","@styleAfterType"],[/"([^"]*)"/,"attribute.value.html"],[/'([^']*)'/,"attribute.value.html"],[/[\w\-]+/,"attribute.name.html"],[/=/,"delimiter.html"],[/>/,{token:"delimiter.html",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/=/,"delimiter.html","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value.html",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value.html",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value.html"],[/'([^']*)'/,"attribute.value.html"],[/[\w\-]+/,"attribute.name.html"],[/=/,"delimiter.html"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}};t.conf=e,t.language=i,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/typescript-_2t_511t.js b/emrg/gui/vendor/monaco/vs/typescript-_2t_511t.js new file mode 100644 index 00000000..c59c5f16 --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/typescript-_2t_511t.js @@ -0,0 +1 @@ +define("vs/typescript-_2t_511t",["exports","./editor-KLE6jdfb"],(function(n,e){"use strict";const t={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:e.languages.IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:e.languages.IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:e.languages.IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:e.languages.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],folding:{markers:{start:new RegExp("^\\s*//\\s*#?region\\b"),end:new RegExp("^\\s*//\\s*#?endregion\\b")}}},o={defaultToken:"invalid",tokenPostfix:".ts",keywords:["abstract","any","as","asserts","bigint","boolean","break","case","catch","class","continue","const","constructor","debugger","declare","default","delete","do","else","enum","export","extends","false","finally","for","from","function","get","if","implements","import","in","infer","instanceof","interface","is","keyof","let","module","namespace","never","new","null","number","object","out","package","private","protected","public","override","readonly","require","global","return","satisfies","set","static","string","super","switch","symbol","this","throw","true","try","type","typeof","undefined","unique","unknown","var","void","while","with","yield","async","await","of"],operators:["<=",">=","==","!=","===","!==","=>","+","-","**","*","/","%","++","--","<<",">",">>>","&","|","^","!","~","&&","||","??","?",":","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=","@"],symbols:/[=>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([dgimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/\$\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"common"}]}};n.conf=t,n.language=o,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/typespec-8OfoLt6R.js b/emrg/gui/vendor/monaco/vs/typespec-8OfoLt6R.js new file mode 100644 index 00000000..78b8cf5f --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/typespec-8OfoLt6R.js @@ -0,0 +1 @@ +define("vs/typespec-8OfoLt6R",["exports"],(function(e){"use strict";const t=n=>`\\b${n}\\b`,o=n=>`(?!${n})`,i=t("[_a-zA-Z][_a-zA-Z0-9]*"),r=t("[_a-zA-Z-0-9]+"),s=["import","model","scalar","namespace","op","interface","union","using","is","extends","enum","alias","return","void","if","else","projection","dec","extern","fn"],c=["true","false","null","unknown","never"],a="[ \\t\\r\\n]",g="[0-9]+",l={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"/**",close:" */",notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],indentationRules:{decreaseIndentPattern:new RegExp("^((?!.*?/\\*).*\\*/)?\\s*[\\}\\]].*$"),increaseIndentPattern:new RegExp("^((?!//).)*(\\{([^}\"'`/]*|(\\t|[ ])*//.*)|\\([^)\"'`/]*|\\[[^\\]\"'`/]*)$"),unIndentedLinePattern:new RegExp("^(\\t|[ ])*[ ]\\*[^/]*\\*/\\s*$|^(\\t|[ ])*[ ]\\*/\\s*$|^(\\t|[ ])*[ ]\\*([ ]([^\\*]|\\*(?!/))*)?$")}},k={defaultToken:"",tokenPostfix:".tsp",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],symbols:/[=:;<>]+/,keywords:s,namedLiterals:c,escapes:'\\\\(u{[0-9A-Fa-f]+}|n|r|t|\\\\|"|\\${)',tokenizer:{root:[{include:"@expression"},{include:"@whitespace"}],stringVerbatim:[{regex:'(|"|"")[^"]',action:{token:"string"}},{regex:`"""${o('"')}`,action:{token:"string",next:"@pop"}}],stringLiteral:[{regex:"\\${",action:{token:"delimiter.bracket",next:"@bracketCounting"}},{regex:'[^\\\\"$]+',action:{token:"string"}},{regex:"@escapes",action:{token:"string.escape"}},{regex:"\\\\.",action:{token:"string.escape.invalid"}},{regex:'"',action:{token:"string",next:"@pop"}}],bracketCounting:[{regex:"{",action:{token:"delimiter.bracket",next:"@bracketCounting"}},{regex:"}",action:{token:"delimiter.bracket",next:"@pop"}},{include:"@expression"}],comment:[{regex:"[^\\*]+",action:{token:"comment"}},{regex:"\\*\\/",action:{token:"comment",next:"@pop"}},{regex:"[\\/*]",action:{token:"comment"}}],whitespace:[{regex:a},{regex:"\\/\\*",action:{token:"comment",next:"@comment"}},{regex:"\\/\\/.*$",action:{token:"comment"}}],expression:[{regex:'"""',action:{token:"string",next:"@stringVerbatim"}},{regex:`"${o('""')}`,action:{token:"string",next:"@stringLiteral"}},{regex:g,action:{token:"number"}},{regex:i,action:{cases:{"@keywords":{token:"keyword"},"@namedLiterals":{token:"keyword"},"@default":{token:"identifier"}}}},{regex:`@${i}`,action:{token:"tag"}},{regex:`#${r}`,action:{token:"directive"}}]}};e.conf=l,e.language=k,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/vb-Dyb2648j.js b/emrg/gui/vendor/monaco/vs/vb-Dyb2648j.js new file mode 100644 index 00000000..e1f8e66b --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/vb-Dyb2648j.js @@ -0,0 +1 @@ +define("vs/vb-Dyb2648j",["exports"],(function(e){"use strict";const n={comments:{lineComment:"'",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"],["addhandler","end addhandler"],["class","end class"],["enum","end enum"],["event","end event"],["function","end function"],["get","end get"],["if","end if"],["interface","end interface"],["module","end module"],["namespace","end namespace"],["operator","end operator"],["property","end property"],["raiseevent","end raiseevent"],["removehandler","end removehandler"],["select","end select"],["set","end set"],["structure","end structure"],["sub","end sub"],["synclock","end synclock"],["try","end try"],["while","end while"],["with","end with"],["using","end using"],["do","loop"],["for","next"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"<",close:">",notIn:["string","comment"]}],folding:{markers:{start:new RegExp("^\\s*#Region\\b"),end:new RegExp("^\\s*#End Region\\b")}}},t={defaultToken:"",tokenPostfix:".vb",ignoreCase:!0,brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.array",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.angle",open:"<",close:">"},{token:"keyword.tag-addhandler",open:"addhandler",close:"end addhandler"},{token:"keyword.tag-class",open:"class",close:"end class"},{token:"keyword.tag-enum",open:"enum",close:"end enum"},{token:"keyword.tag-event",open:"event",close:"end event"},{token:"keyword.tag-function",open:"function",close:"end function"},{token:"keyword.tag-get",open:"get",close:"end get"},{token:"keyword.tag-if",open:"if",close:"end if"},{token:"keyword.tag-interface",open:"interface",close:"end interface"},{token:"keyword.tag-module",open:"module",close:"end module"},{token:"keyword.tag-namespace",open:"namespace",close:"end namespace"},{token:"keyword.tag-operator",open:"operator",close:"end operator"},{token:"keyword.tag-property",open:"property",close:"end property"},{token:"keyword.tag-raiseevent",open:"raiseevent",close:"end raiseevent"},{token:"keyword.tag-removehandler",open:"removehandler",close:"end removehandler"},{token:"keyword.tag-select",open:"select",close:"end select"},{token:"keyword.tag-set",open:"set",close:"end set"},{token:"keyword.tag-structure",open:"structure",close:"end structure"},{token:"keyword.tag-sub",open:"sub",close:"end sub"},{token:"keyword.tag-synclock",open:"synclock",close:"end synclock"},{token:"keyword.tag-try",open:"try",close:"end try"},{token:"keyword.tag-while",open:"while",close:"end while"},{token:"keyword.tag-with",open:"with",close:"end with"},{token:"keyword.tag-using",open:"using",close:"end using"},{token:"keyword.tag-do",open:"do",close:"loop"},{token:"keyword.tag-for",open:"for",close:"next"}],keywords:["AddHandler","AddressOf","Alias","And","AndAlso","As","Async","Boolean","ByRef","Byte","ByVal","Call","Case","Catch","CBool","CByte","CChar","CDate","CDbl","CDec","Char","CInt","Class","CLng","CObj","Const","Continue","CSByte","CShort","CSng","CStr","CType","CUInt","CULng","CUShort","Date","Decimal","Declare","Default","Delegate","Dim","DirectCast","Do","Double","Each","Else","ElseIf","End","EndIf","Enum","Erase","Error","Event","Exit","False","Finally","For","Friend","Function","Get","GetType","GetXMLNamespace","Global","GoSub","GoTo","Handles","If","Implements","Imports","In","Inherits","Integer","Interface","Is","IsNot","Let","Lib","Like","Long","Loop","Me","Mod","Module","MustInherit","MustOverride","MyBase","MyClass","NameOf","Namespace","Narrowing","New","Next","Not","Nothing","NotInheritable","NotOverridable","Object","Of","On","Operator","Option","Optional","Or","OrElse","Out","Overloads","Overridable","Overrides","ParamArray","Partial","Private","Property","Protected","Public","RaiseEvent","ReadOnly","ReDim","RemoveHandler","Resume","Return","SByte","Select","Set","Shadows","Shared","Short","Single","Static","Step","Stop","String","Structure","Sub","SyncLock","Then","Throw","To","True","Try","TryCast","TypeOf","UInteger","ULong","UShort","Using","Variant","Wend","When","While","Widening","With","WithEvents","WriteOnly","Xor"],tagwords:["If","Sub","Select","Try","Class","Enum","Function","Get","Interface","Module","Namespace","Operator","Set","Structure","Using","While","With","Do","Loop","For","Next","Property","Continue","AddHandler","RemoveHandler","Event","RaiseEvent","SyncLock"],symbols:/[=>0&&i.push(o[r]);return i}const c=e("true false"),m=e(` + alias + break + case + const + const_assert + continue + continuing + default + diagnostic + discard + else + enable + fn + for + if + let + loop + override + requires + return + struct + switch + var + while + `),l=e(` + NULL + Self + abstract + active + alignas + alignof + as + asm + asm_fragment + async + attribute + auto + await + become + binding_array + cast + catch + class + co_await + co_return + co_yield + coherent + column_major + common + compile + compile_fragment + concept + const_cast + consteval + constexpr + constinit + crate + debugger + decltype + delete + demote + demote_to_helper + do + dynamic_cast + enum + explicit + export + extends + extern + external + fallthrough + filter + final + finally + friend + from + fxgroup + get + goto + groupshared + highp + impl + implements + import + inline + instanceof + interface + layout + lowp + macro + macro_rules + match + mediump + meta + mod + module + move + mut + mutable + namespace + new + nil + noexcept + noinline + nointerpolation + noperspective + null + nullptr + of + operator + package + packoffset + partition + pass + patch + pixelfragment + precise + precision + premerge + priv + protected + pub + public + readonly + ref + regardless + register + reinterpret_cast + require + resource + restrict + self + set + shared + sizeof + smooth + snorm + static + static_assert + static_cast + std + subroutine + super + target + template + this + thread_local + throw + trait + try + type + typedef + typeid + typename + typeof + union + unless + unorm + unsafe + unsized + use + using + varying + virtual + volatile + wgsl + where + with + writeonly + yield + `),u=e(` + read write read_write + function private workgroup uniform storage + perspective linear flat + center centroid sample + vertex_index instance_index position front_facing frag_depth + local_invocation_id local_invocation_index + global_invocation_id workgroup_id num_workgroups + sample_index sample_mask + rgba8unorm + rgba8snorm + rgba8uint + rgba8sint + rgba16uint + rgba16sint + rgba16float + r32uint + r32sint + r32float + rg32uint + rg32sint + rg32float + rgba32uint + rgba32sint + rgba32float + bgra8unorm +`),p=e(` + bool + f16 + f32 + i32 + sampler sampler_comparison + texture_depth_2d + texture_depth_2d_array + texture_depth_cube + texture_depth_cube_array + texture_depth_multisampled_2d + texture_external + texture_external + u32 + `),d=e(` + array + atomic + mat2x2 + mat2x3 + mat2x4 + mat3x2 + mat3x3 + mat3x4 + mat4x2 + mat4x3 + mat4x4 + ptr + texture_1d + texture_2d + texture_2d_array + texture_3d + texture_cube + texture_cube_array + texture_multisampled_2d + texture_storage_1d + texture_storage_2d + texture_storage_2d_array + texture_storage_3d + vec2 + vec3 + vec4 + `),x=e(` + vec2i vec3i vec4i + vec2u vec3u vec4u + vec2f vec3f vec4f + vec2h vec3h vec4h + mat2x2f mat2x3f mat2x4f + mat3x2f mat3x3f mat3x4f + mat4x2f mat4x3f mat4x4f + mat2x2h mat2x3h mat2x4h + mat3x2h mat3x3h mat3x4h + mat4x2h mat4x3h mat4x4h + `),f=e(` + bitcast all any select arrayLength abs acos acosh asin asinh atan atanh atan2 + ceil clamp cos cosh countLeadingZeros countOneBits countTrailingZeros cross + degrees determinant distance dot exp exp2 extractBits faceForward firstLeadingBit + firstTrailingBit floor fma fract frexp inverseBits inverseSqrt ldexp length + log log2 max min mix modf normalize pow quantizeToF16 radians reflect refract + reverseBits round saturate sign sin sinh smoothstep sqrt step tan tanh transpose + trunc dpdx dpdxCoarse dpdxFine dpdy dpdyCoarse dpdyFine fwidth fwidthCoarse fwidthFine + textureDimensions textureGather textureGatherCompare textureLoad textureNumLayers + textureNumLevels textureNumSamples textureSample textureSampleBias textureSampleCompare + textureSampleCompareLevel textureSampleGrad textureSampleLevel textureSampleBaseClampToEdge + textureStore atomicLoad atomicStore atomicAdd atomicSub atomicMax atomicMin + atomicAnd atomicOr atomicXor atomicExchange atomicCompareExchangeWeak pack4x8snorm + pack4x8unorm pack2x16snorm pack2x16unorm pack2x16float unpack4x8snorm unpack4x8unorm + unpack2x16snorm unpack2x16unorm unpack2x16float storageBarrier workgroupBarrier + workgroupUniformLoad +`),_=e(` + & + && + -> + / + = + == + != + > + >= + < + <= + % + - + -- + + + ++ + | + || + * + << + >> + += + -= + *= + /= + %= + &= + |= + ^= + >>= + <<= + `),g=/enable|requires|diagnostic/,n=new RegExp("[_\\p{XID_Start}]\\p{XID_Continue}*","u"),t="variable.predefined",h={tokenPostfix:".wgsl",defaultToken:"invalid",unicode:!0,atoms:c,keywords:m,reserved:l,predeclared_enums:u,predeclared_types:p,predeclared_type_generators:d,predeclared_type_aliases:x,predeclared_intrinsics:f,operators:_,symbols:/[!%&*+\-\.\/:;<=>^|_~,]+/,tokenizer:{root:[[g,"keyword","@directive"],[n,{cases:{"@atoms":t,"@keywords":"keyword","@reserved":"invalid","@predeclared_enums":t,"@predeclared_types":t,"@predeclared_type_generators":t,"@predeclared_type_aliases":t,"@predeclared_intrinsics":t,"@default":"identifier"}}],{include:"@commentOrSpace"},{include:"@numbers"},[/[{}()\[\]]/,"@brackets"],["@","annotation","@attribute"],[/@symbols/,{cases:{"@operators":"operator","@default":"delimiter"}}],[/./,"invalid"]],commentOrSpace:[[/\s+/,"white"],[/\/\*/,"comment","@blockComment"],[/\/\/.*$/,"comment"]],blockComment:[[/[^\/*]+/,"comment"],[/\/\*/,"comment","@push"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],attribute:[{include:"@commentOrSpace"},[/\w+/,"annotation","@pop"]],directive:[{include:"@commentOrSpace"},[/[()]/,"@brackets"],[/,/,"delimiter"],[n,"meta.content"],[/;/,"delimiter","@pop"]],numbers:[[/0[fh]/,"number.float"],[/[1-9][0-9]*[fh]/,"number.float"],[/[0-9]*\.[0-9]+([eE][+-]?[0-9]+)?[fh]?/,"number.float"],[/[0-9]+\.[0-9]*([eE][+-]?[0-9]+)?[fh]?/,"number.float"],[/[0-9]+[eE][+-]?[0-9]+[fh]?/,"number.float"],[/0[xX][0-9a-fA-F]*\.[0-9a-fA-F]+(?:[pP][+-]?[0-9]+[fh]?)?/,"number.hex"],[/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*(?:[pP][+-]?[0-9]+[fh]?)?/,"number.hex"],[/0[xX][0-9a-fA-F]+[pP][+-]?[0-9]+[fh]?/,"number.hex"],[/0[xX][0-9a-fA-F]+[iu]?/,"number.hex"],[/[1-9][0-9]*[iu]?/,"number"],[/0[iu]?/,"number"]]}};a.conf=s,a.language=h,Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})); diff --git a/emrg/gui/vendor/monaco/vs/workers-BBttULjf.js b/emrg/gui/vendor/monaco/vs/workers-BBttULjf.js new file mode 100644 index 00000000..84c5bc8b --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/workers-BBttULjf.js @@ -0,0 +1 @@ +define("vs/workers-BBttULjf",["exports","./editor-KLE6jdfb","./toggleHighContrast-qGX7E9o7"],(function(c,l,u){"use strict";function a(e,o){const r=globalThis.MonacoEnvironment;if(r?.createTrustedTypesPolicy)try{return r.createTrustedTypesPolicy(e,o)}catch(t){console.error(t);return}try{return globalThis.trustedTypes?.createPolicy(e,o)}catch(t){console.error(t);return}}let n;typeof self=="object"&&self.constructor&&self.constructor.name==="DedicatedWorkerGlobalScope"&&globalThis.workerttPolicy!==void 0?n=globalThis.workerttPolicy:n=a("defaultWorkerFactory",{createScriptURL:e=>e});function i(e){const o=e.label,r=globalThis.MonacoEnvironment;if(r){if(typeof r.getWorker=="function")return r.getWorker("workerMain.js",o);if(typeof r.getWorkerUrl=="function"){const t=r.getWorkerUrl("workerMain.js",o);return new Worker(n?n.createScriptURL(t):t,{name:o,type:"module"})}}if(e.createWorker)return e.createWorker();throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function s(e){const o=Promise.resolve(i({label:e.label??"monaco-editor-worker",moduleId:e.moduleId,createWorker:e.createWorker})).then(r=>(r.postMessage("ignore"),r.postMessage(e.createData),r));return l.editor.createWebWorker({worker:o,host:e.host,keepIdleModels:e.keepIdleModels})}c.createWebWorker=s})); diff --git a/emrg/gui/vendor/monaco/vs/xml-cZjNDqDT.js b/emrg/gui/vendor/monaco/vs/xml-cZjNDqDT.js new file mode 100644 index 00000000..f206e89c --- /dev/null +++ b/emrg/gui/vendor/monaco/vs/xml-cZjNDqDT.js @@ -0,0 +1 @@ +define("vs/xml-cZjNDqDT",["exports","./editor-KLE6jdfb"],(function(e,t){"use strict";const n={comments:{blockComment:[""]},brackets:[["<",">"]],autoClosingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],surroundingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],onEnterRules:[{beforeText:new RegExp("<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:t.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:t.languages.IndentAction.Indent}}]},a={defaultToken:"",tokenPostfix:".xml",ignoreCase:!0,qualifiedName:/(?:[\w\.\-]+:)?[\w\.\-]+/,tokenizer:{root:[[/[^<&]+/,""],{include:"@whitespace"},[/(<)(@qualifiedName)/,[{token:"delimiter"},{token:"tag",next:"@tag"}]],[/(<\/)(@qualifiedName)(\s*)(>)/,[{token:"delimiter"},{token:"tag"},"",{token:"delimiter"}]],[/(<\?)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/(<\!)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/<\!\[CDATA\[/,{token:"delimiter.cdata",next:"@cdata"}],[/&\w+;/,"string.escape"]],cdata:[[/[^\]]+/,""],[/\]\]>/,{token:"delimiter.cdata",next:"@pop"}],[/\]/,""]],tag:[[/[ \t\r\n]+/,""],[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/,["attribute.name","","attribute.value"]],[/@qualifiedName/,"attribute.name"],[/\?>/,{token:"delimiter",next:"@pop"}],[/(\/)(>)/,[{token:"tag"},{token:"delimiter",next:"@pop"}]],[/>/,{token:"delimiter",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[//,{token:"comment",next:"@pop"}],[/